03

Deadlock updating StepExecution at the end of processing a chunk

września
No Comments |  Posted by admin |  Category:Forum
I am seeing deadlocks with DB2 when I run a partitioned job. The job configured to use retry in the usual way, and I have verified that this is working correctly.

The DeadlockLoserDataAccessException is at the very last step of processing in TaskletStep$ChunkTransactionCallback.doInTransacti on(TransactionStatus) where it is updating the step execution. Throwing at this point causes processing that partition/step to be terminated in an UNKNOWN state. Since the retry logic is applied within the chunk at the read/process/write stages, there doesn’t seem to be any hope for a retry at this level.

I did see the this thread that deals with handling deadlock in other contexts, but it is clearly not the same situation.

I am not seeing the deadlocks when running with Oracle, MySQL or SQL Server as the backend. When the job is partitioned into more parallel threads (or the commit interval is made smaller), the deadlocks happen more frequently.

I’d be interested if anyone has seen this issue. I suspect that DB2 configuration might mitigate the problem (e.g., increase locklist and maxlocks to avoid lock escalation). It does seem to be something of a weak spot in the Spring Batch fault tolerance.

more...
03

Session Management

września
No Comments |  Posted by admin |  Category:Forum
This is probably an oft repeated question and yet I have a problem understanding the difference between what the documentation says vs what I am observing in my code. I have wired a hibernate DAO into spring and the code fails when I try to access an associated object lazily with a lazy initialization failed error.

I do a session.save() on the pojo (per documentation this should persist the object. However, I notice that this does not work when the invocation is from a web container. Strangely, it works when I run a junit test for the same service.

When I change the code to session.persist() it works for both variations. The only difference between save and persist per documentation is that save returns a serialized id whereas persist does not return anything. Can someone help.

more...
03

Spring EXCEL – POI Error on Dialog to Open the generated XLS-Rendering view with null

września
No Comments |  Posted by admin |  Category:Forum
Default Spring EXCEL – POI Error on Dialog to Open the generated XLS-Rendering view with null

I am trying to generate excel file of a records listed on a page. on the List page i placed a link for export.. on click has event – path requestContext/excel.xls

in web.xml – has servlet mapping *.xls to spring controller
Spring controller has bean of class – SimpleURLHandlerMapping
defined a prop key
<prop key="/user/excel.xls">excelExportController</prop>

ExcelExportController implements Controller (Spring Controller) and defines handlerequest.
return new ModelAndView(new ExcelExportPage(), modelMap);
//ExcelExportPage extends AbstractExcelView
rotected void buildExcelDocument(Map model, HSSFWorkbook wb,
HttpServletRequest request, HttpServletResponse response)
throws Exception
{
ExcelExportPage excelPageObj = new ExcelExportPage();
excelPageObj= (ExcelExportPage)model.get("excelObj");
// Entire Excel Generation and data population logic

}//buildExcelDocument Method Ends.

=====================================
On execution.. a popup is dispalyed excel.xls to Open/Save/cancel – Save Works fine.
When i click open…
i get following error.

please refer website:
http://www.zabada.com/tutorials/exce…ng-and-poi.php

- start:
[9/3/10 14:01:26:071 CDT] 00000029 SystemOut O DEBUG <,> [DispatcherServlet(doDispatch)] – Cleared thread-bound request context: com.ibm.ws.webcontainer.srt.SRTServletRequest@73ea 73ea
[9/3/10 14:01:26:071 CDT] 00000029 SystemOut O DEBUG <,> [FrameworkServlet(processRequest)] – Successfully completed request
[9/3/10 14:01:29:618 CDT] 00000028 SystemOut O DEBUG <,> [DispatcherServlet(getHandler)] – Testing handler map [org.springframework.web.servlet.handler.SimpleUrlH andlerMapping@cae0cae] in DispatcherServlet with name ’spring-controller’
[9/3/10 14:01:29:618 CDT] 00000028 SystemOut O DEBUG <,> [DispatcherServlet(getHandler)] – Testing handler map [com.jpmorgan.isd.config.app.SimpleUrlHandlerMappin g2@38de38de] in DispatcherServlet with name ’spring-controller’
[9/3/10 14:01:29:618 CDT] 00000028 SystemOut O DEBUG <,> [AbstractUrlHandlerMapping(getHandlerInternal)] – Looking up handler for [/user/cases_for_client.xls]
[9/3/10 14:01:29:618 CDT] 00000028 SystemOut O DEBUG <,> [DispatcherServlet(getHandler)] – Testing handler map [com.jpmorgan.isd.config.app.SimpleUrlHandlerMappin g2@2a002a00] in DispatcherServlet with name ’spring-controller’
[9/3/10 14:01:29:618 CDT] 00000028 SystemOut O DEBUG <,> [AbstractUrlHandlerMapping(getHandlerInternal)] – Looking up handler for [/user/cases_for_client.xls]
[9/3/10 14:01:29:618 CDT] 00000028 SystemOut O DEBUG <,> [DispatcherServlet(getHandler)] – Testing handler map [org.springframework.web.servlet.handler.SimpleUrlH andlerMapping@2d8a2d8a] in DispatcherServlet with name ’spring-controller’
[9/3/10 14:01:29:618 CDT] 00000028 SystemOut O DEBUG <,> [DispatcherServlet(getHandlerAdapter)] – Testing handler adapter [org.springframework.web.servlet.mvc.HttpRequestHan dlerAdapter@57d057d0]
[9/3/10 14:01:29:618 CDT] 00000028 SystemOut O DEBUG <,> [DispatcherServlet(getHandlerAdapter)] – Testing handler adapter [org.springframework.web.servlet.mvc.SimpleControll erHandlerAdapter@652e652e]
[9/3/10 14:01:29:618 CDT] 00000028 SystemOut O DEBUG <,> [DispatcherServlet(getLastModified)] – Last-Modified value for [/ISDWeb/user/cases_for_client.xls] is [-1]
[9/3/10 14:01:29:618 CDT] 00000028 SystemOut O DEBUG <,> [DispatcherServlet(doService)] – DispatcherServlet with name ’spring-controller’ received request for [/ISDWeb/user/cases_for_client.xls]
[9/3/10 14:01:29:618 CDT] 00000028 SystemOut O DEBUG <,> [DispatcherServlet(doDispatch)] – Bound request context to thread: com.ibm.ws.webcontainer.srt.SRTServletRequest@73ea 73ea
[9/3/10 14:01:29:618 CDT] 00000028 SystemOut O DEBUG <,> [DispatcherServlet(getHandlerAdapter)] – Testing handler adapter [org.springframework.web.servlet.mvc.HttpRequestHan dlerAdapter@57d057d0]
[9/3/10 14:01:29:618 CDT] 00000028 SystemOut O DEBUG <,> [DispatcherServlet(getHandlerAdapter)] – Testing handler adapter [org.springframework.web.servlet.mvc.SimpleControll erHandlerAdapter@652e652e]
[9/3/10 14:01:29:618 CDT] 00000028 SystemOut O DEBUG <,> [ControllerBase(handleRequestInternal)] – start:
[9/3/10 14:01:29:633 CDT] 00000028 SystemOut O DEBUG <,> [DispatcherServlet(render)] – Rendering view [com.jpmorgan.isd.model.excelexport.ExcelExportPage : unnamed] in DispatcherServlet with name ’spring-controller’
[9/3/10 14:01:29:633 CDT] 00000028 SystemOut O DEBUG <,> [AbstractView(render)] – Rendering view with name ‘null’ with model {excelObj=com.jpmorgan.isd.model.excelexport.Excel ExportPage: unnamed, wasMainMaximised=null} and static attributes {}
[9/3/10 14:01:29:821 CDT] 00000028 SystemOut O DEBUG <,> [AbstractExcelView(renderMergedOutputModel)] – Created Excel Workbook from scratch
[9/3/10 14:01:29:962 CDT] 00000028 SystemOut O DEBUG <,> [DispatcherServlet(doDispatch)] – Cleared thread-bound request context: com.ibm.ws.webcontainer.srt.SRTServletRequest@73ea 73ea
[9/3/10 14:01:29:962 CDT] 00000028 SystemOut O DEBUG <,> [FrameworkServlet(processRequest)] – Successfully completed request
[9/3/10 14:02:05:117 CDT] 0000002c SystemOut O DEBUG <,> [DispatcherServlet(getHandler)] – Testing handler map [org.springframework.web.servlet.handler.SimpleUrlH andlerMapping@cae0cae] in DispatcherServlet with name ’spring-controller’
[9/3/10 14:02:05:117 CDT] 0000002c SystemOut O DEBUG <,> [DispatcherServlet(getHandler)] – Testing handler map [com.jpmorgan.isd.config.app.SimpleUrlHandlerMappin g2@38de38de] in DispatcherServlet with name ’spring-controller’
[9/3/10 14:02:05:117 CDT] 0000002c SystemOut O DEBUG <,> [AbstractUrlHandlerMapping(getHandlerInternal)] – Looking up handler for [/user/cases_for_client.xls]
[9/3/10 14:02:05:117 CDT] 0000002c SystemOut O DEBUG <,> [DispatcherServlet(getHandler)] – Testing handler map [com.jpmorgan.isd.config.app.SimpleUrlHandlerMappin g2@2a002a00] in DispatcherServlet with name ’spring-controller’
[9/3/10 14:02:05:117 CDT] 0000002c SystemOut O DEBUG <,> [AbstractUrlHandlerMapping(getHandlerInternal)] – Looking up handler for [/user/cases_for_client.xls]
[9/3/10 14:02:05:117 CDT] 0000002c SystemOut O DEBUG <,> [DispatcherServlet(getHandler)] – Testing handler map [org.springframework.web.servlet.handler.SimpleUrlH andlerMapping@2d8a2d8a] in DispatcherServlet with name ’spring-controller’
[9/3/10 14:02:05:117 CDT] 0000002c SystemOut O DEBUG <,> [DispatcherServlet(getHandlerAdapter)] – Testing handler adapter [org.springframework.web.servlet.mvc.HttpRequestHan dlerAdapter@57d057d0]
[9/3/10 14:02:05:117 CDT] 0000002c SystemOut O DEBUG <,> [DispatcherServlet(getHandlerAdapter)] – Testing handler adapter [org.springframework.web.servlet.mvc.SimpleControll erHandlerAdapter@652e652e]
[9/3/10 14:02:05:117 CDT] 0000002c SystemOut O DEBUG <,> [DispatcherServlet(getLastModified)] – Last-Modified value for [/ISDWeb/user/cases_for_client.xls] is [-1]
[9/3/10 14:02:05:117 CDT] 0000002c SystemOut O DEBUG <,> [DispatcherServlet(doService)] – DispatcherServlet with name ’spring-controller’ received request for [/ISDWeb/user/cases_for_client.xls]
[9/3/10 14:02:05:117 CDT] 0000002c SystemOut O DEBUG <,> [DispatcherServlet(doDispatch)] – Bound request context to thread: com.ibm.ws.webcontainer.srt.SRTServletRequest@73ea 73ea
[9/3/10 14:02:05:117 CDT] 0000002c SystemOut O DEBUG <,> [DispatcherServlet(getHandlerAdapter)] – Testing handler adapter [org.springframework.web.servlet.mvc.HttpRequestHan dlerAdapter@57d057d0]
[9/3/10 14:02:05:117 CDT] 0000002c SystemOut O DEBUG <,> [DispatcherServlet(getHandlerAdapter)] – Testing handler adapter [org.springframework.web.servlet.mvc.SimpleControll erHandlerAdapter@652e652e]
[9/3/10 14:02:05:117 CDT] 0000002c SystemOut O DEBUG <,> [ControllerBase(handleRequestInternal)] – start:
[9/3/10 14:02:05:117 CDT] 0000002c SystemOut O DEBUG <,> [DispatcherServlet(render)] – Rendering view [com.jpmorgan.isd.model.excelexport.ExcelExportPage : unnamed] in DispatcherServlet with name ’spring-controller’
[9/3/10 14:02:05:117 CDT] 0000002c SystemOut O DEBUG <,> [AbstractView(render)] – Rendering view with name ‘null’ with model {excelObj=com.jpmorgan.isd.model.excelexport.Excel ExportPage: unnamed, wasMainMaximised=null} and static attributes {}
[9/3/10 14:02:05:117 CDT] 0000002c SystemOut O DEBUG <,> [AbstractExcelView(renderMergedOutputModel)] – Created Excel Workbook from scratch
[9/3/10 14:02:05:133 CDT] 0000002c SystemOut O DEBUG <,> [DispatcherServlet(doDispatch)] – Cleared thread-bound request context: com.ibm.ws.webcontainer.srt.SRTServletRequest@73ea 73ea
[9/3/10 14:02:05:133 CDT] 0000002c SystemOut O DEBUG <,> [FrameworkServlet(processRequest)] – Successfully completed request

Please Help/suggest.

more...
03

Spring EXCEL – POI Error on Dialog to Open the generated XLS-Rendering view with null

września
No Comments |  Posted by admin |  Category:Forum
I am trying to generate excel file of a records listed on a page. on the List page i placed a link for export.. on click has event – path requestContext/excel.xls

in web.xml – has servlet mapping *.xls to spring controller
Spring controller has bean of class – SimpleURLHandlerMapping
defined a prop key
<prop key="/user/excel.xls">excelExportController</prop>

ExcelExportController implements Controller (Spring Controller) and defines handlerequest.
return new ModelAndView(new ExcelExportPage(), modelMap);
//ExcelExportPage extends AbstractExcelView
rotected void buildExcelDocument(Map model, HSSFWorkbook wb,
HttpServletRequest request, HttpServletResponse response)
throws Exception
{
ExcelExportPage excelPageObj = new ExcelExportPage();
excelPageObj= (ExcelExportPage)model.get("excelObj");
// Entire Excel Generation and data population logic

}//buildExcelDocument Method Ends.

=====================================
On execution.. a popup is dispalyed excel.xls to Open/Save/cancel – Save Works fine.
When i click open…
i get following error.

please refer website:
http://www.zabada.com/tutorials/exce…ng-and-poi.php

- start:
[9/3/10 14:01:26:071 CDT] 00000029 SystemOut O DEBUG <,> [DispatcherServlet(doDispatch)] – Cleared thread-bound request context: com.ibm.ws.webcontainer.srt.SRTServletRequest@73ea 73ea
[9/3/10 14:01:26:071 CDT] 00000029 SystemOut O DEBUG <,> [FrameworkServlet(processRequest)] – Successfully completed request
[9/3/10 14:01:29:618 CDT] 00000028 SystemOut O DEBUG <,> [DispatcherServlet(getHandler)] – Testing handler map [org.springframework.web.servlet.handler.SimpleUrlH andlerMapping@cae0cae] in DispatcherServlet with name ’spring-controller’
[9/3/10 14:01:29:618 CDT] 00000028 SystemOut O DEBUG <,> [DispatcherServlet(getHandler)] – Testing handler map [com.jpmorgan.isd.config.app.SimpleUrlHandlerMappin g2@38de38de] in DispatcherServlet with name ’spring-controller’
[9/3/10 14:01:29:618 CDT] 00000028 SystemOut O DEBUG <,> [AbstractUrlHandlerMapping(getHandlerInternal)] – Looking up handler for [/user/cases_for_client.xls]
[9/3/10 14:01:29:618 CDT] 00000028 SystemOut O DEBUG <,> [DispatcherServlet(getHandler)] – Testing handler map [com.jpmorgan.isd.config.app.SimpleUrlHandlerMappin g2@2a002a00] in DispatcherServlet with name ’spring-controller’
[9/3/10 14:01:29:618 CDT] 00000028 SystemOut O DEBUG <,> [AbstractUrlHandlerMapping(getHandlerInternal)] – Looking up handler for [/user/cases_for_client.xls]
[9/3/10 14:01:29:618 CDT] 00000028 SystemOut O DEBUG <,> [DispatcherServlet(getHandler)] – Testing handler map [org.springframework.web.servlet.handler.SimpleUrlH andlerMapping@2d8a2d8a] in DispatcherServlet with name ’spring-controller’
[9/3/10 14:01:29:618 CDT] 00000028 SystemOut O DEBUG <,> [DispatcherServlet(getHandlerAdapter)] – Testing handler adapter [org.springframework.web.servlet.mvc.HttpRequestHan dlerAdapter@57d057d0]
[9/3/10 14:01:29:618 CDT] 00000028 SystemOut O DEBUG <,> [DispatcherServlet(getHandlerAdapter)] – Testing handler adapter [org.springframework.web.servlet.mvc.SimpleControll erHandlerAdapter@652e652e]
[9/3/10 14:01:29:618 CDT] 00000028 SystemOut O DEBUG <,> [DispatcherServlet(getLastModified)] – Last-Modified value for [/ISDWeb/user/cases_for_client.xls] is [-1]
[9/3/10 14:01:29:618 CDT] 00000028 SystemOut O DEBUG <,> [DispatcherServlet(doService)] – DispatcherServlet with name ’spring-controller’ received request for [/ISDWeb/user/cases_for_client.xls]
[9/3/10 14:01:29:618 CDT] 00000028 SystemOut O DEBUG <,> [DispatcherServlet(doDispatch)] – Bound request context to thread: com.ibm.ws.webcontainer.srt.SRTServletRequest@73ea 73ea
[9/3/10 14:01:29:618 CDT] 00000028 SystemOut O DEBUG <,> [DispatcherServlet(getHandlerAdapter)] – Testing handler adapter [org.springframework.web.servlet.mvc.HttpRequestHan dlerAdapter@57d057d0]
[9/3/10 14:01:29:618 CDT] 00000028 SystemOut O DEBUG <,> [DispatcherServlet(getHandlerAdapter)] – Testing handler adapter [org.springframework.web.servlet.mvc.SimpleControll erHandlerAdapter@652e652e]
[9/3/10 14:01:29:618 CDT] 00000028 SystemOut O DEBUG <,> [ControllerBase(handleRequestInternal)] – start:
[9/3/10 14:01:29:633 CDT] 00000028 SystemOut O DEBUG <,> [DispatcherServlet(render)] – Rendering view [com.jpmorgan.isd.model.excelexport.ExcelExportPage : unnamed] in DispatcherServlet with name ’spring-controller’
[9/3/10 14:01:29:633 CDT] 00000028 SystemOut O DEBUG <,> [AbstractView(render)] – Rendering view with name ‘null’ with model {excelObj=com.jpmorgan.isd.model.excelexport.Excel ExportPage: unnamed, wasMainMaximised=null} and static attributes {}
[9/3/10 14:01:29:821 CDT] 00000028 SystemOut O DEBUG <,> [AbstractExcelView(renderMergedOutputModel)] – Created Excel Workbook from scratch
[9/3/10 14:01:29:962 CDT] 00000028 SystemOut O DEBUG <,> [DispatcherServlet(doDispatch)] – Cleared thread-bound request context: com.ibm.ws.webcontainer.srt.SRTServletRequest@73ea 73ea
[9/3/10 14:01:29:962 CDT] 00000028 SystemOut O DEBUG <,> [FrameworkServlet(processRequest)] – Successfully completed request
[9/3/10 14:02:05:117 CDT] 0000002c SystemOut O DEBUG <,> [DispatcherServlet(getHandler)] – Testing handler map [org.springframework.web.servlet.handler.SimpleUrlH andlerMapping@cae0cae] in DispatcherServlet with name ’spring-controller’
[9/3/10 14:02:05:117 CDT] 0000002c SystemOut O DEBUG <,> [DispatcherServlet(getHandler)] – Testing handler map [com.jpmorgan.isd.config.app.SimpleUrlHandlerMappin g2@38de38de] in DispatcherServlet with name ’spring-controller’
[9/3/10 14:02:05:117 CDT] 0000002c SystemOut O DEBUG <,> [AbstractUrlHandlerMapping(getHandlerInternal)] – Looking up handler for [/user/cases_for_client.xls]
[9/3/10 14:02:05:117 CDT] 0000002c SystemOut O DEBUG <,> [DispatcherServlet(getHandler)] – Testing handler map [com.jpmorgan.isd.config.app.SimpleUrlHandlerMappin g2@2a002a00] in DispatcherServlet with name ’spring-controller’
[9/3/10 14:02:05:117 CDT] 0000002c SystemOut O DEBUG <,> [AbstractUrlHandlerMapping(getHandlerInternal)] – Looking up handler for [/user/cases_for_client.xls]
[9/3/10 14:02:05:117 CDT] 0000002c SystemOut O DEBUG <,> [DispatcherServlet(getHandler)] – Testing handler map [org.springframework.web.servlet.handler.SimpleUrlH andlerMapping@2d8a2d8a] in DispatcherServlet with name ’spring-controller’
[9/3/10 14:02:05:117 CDT] 0000002c SystemOut O DEBUG <,> [DispatcherServlet(getHandlerAdapter)] – Testing handler adapter [org.springframework.web.servlet.mvc.HttpRequestHan dlerAdapter@57d057d0]
[9/3/10 14:02:05:117 CDT] 0000002c SystemOut O DEBUG <,> [DispatcherServlet(getHandlerAdapter)] – Testing handler adapter [org.springframework.web.servlet.mvc.SimpleControll erHandlerAdapter@652e652e]
[9/3/10 14:02:05:117 CDT] 0000002c SystemOut O DEBUG <,> [DispatcherServlet(getLastModified)] – Last-Modified value for [/ISDWeb/user/cases_for_client.xls] is [-1]
[9/3/10 14:02:05:117 CDT] 0000002c SystemOut O DEBUG <,> [DispatcherServlet(doService)] – DispatcherServlet with name ’spring-controller’ received request for [/ISDWeb/user/cases_for_client.xls]
[9/3/10 14:02:05:117 CDT] 0000002c SystemOut O DEBUG <,> [DispatcherServlet(doDispatch)] – Bound request context to thread: com.ibm.ws.webcontainer.srt.SRTServletRequest@73ea 73ea
[9/3/10 14:02:05:117 CDT] 0000002c SystemOut O DEBUG <,> [DispatcherServlet(getHandlerAdapter)] – Testing handler adapter [org.springframework.web.servlet.mvc.HttpRequestHan dlerAdapter@57d057d0]
[9/3/10 14:02:05:117 CDT] 0000002c SystemOut O DEBUG <,> [DispatcherServlet(getHandlerAdapter)] – Testing handler adapter [org.springframework.web.servlet.mvc.SimpleControll erHandlerAdapter@652e652e]
[9/3/10 14:02:05:117 CDT] 0000002c SystemOut O DEBUG <,> [ControllerBase(handleRequestInternal)] – start:
[9/3/10 14:02:05:117 CDT] 0000002c SystemOut O DEBUG <,> [DispatcherServlet(render)] – Rendering view [com.jpmorgan.isd.model.excelexport.ExcelExportPage : unnamed] in DispatcherServlet with name ’spring-controller’
[9/3/10 14:02:05:117 CDT] 0000002c SystemOut O DEBUG <,> [AbstractView(render)] – Rendering view with name ‘null’ with model {excelObj=com.jpmorgan.isd.model.excelexport.Excel ExportPage: unnamed, wasMainMaximised=null} and static attributes {}
[9/3/10 14:02:05:117 CDT] 0000002c SystemOut O DEBUG <,> [AbstractExcelView(renderMergedOutputModel)] – Created Excel Workbook from scratch
[9/3/10 14:02:05:133 CDT] 0000002c SystemOut O DEBUG <,> [DispatcherServlet(doDispatch)] – Cleared thread-bound request context: com.ibm.ws.webcontainer.srt.SRTServletRequest@73ea 73ea
[9/3/10 14:02:05:133 CDT] 0000002c SystemOut O DEBUG <,> [FrameworkServlet(processRequest)] – Successfully completed request

Please Help/suggest.

more...
03

org.hibernate.exception.ConstraintViolationExcepti on

września
No Comments |  Posted by admin |  Category:Forum
Hi,

In my service method I move a unique value from one object to the other.
The psuedo code in my service method is as follows:

/**
* Moves the value of LocationNo from object 1 to object 2
**/
@Transactional
public void moveLocaionNo() {

Location locationObj1 = myDao.getLocation(1);
Location locationObj2 = myDao.getLocation(2);

// LocationNo is unique in the database.
String tempLocationNo = locationObj1.getLocationNo();

// Delete the unique value from object 1 & save object 1
locationObj1.setLocationNo("");
myDao.updateLocation(locationObj1);

// Copy the unique value to Object 2 and save object 2
// This part of the code causes a unique constraint violation,
// it shouldn’t since the whole update is done within the same transaction
locationObj2.setLocationNo(tempLocationNo );
myDao.updateLocation(locationObj2);

It’s as if the updates are not done in the right order when hibernate Update executes.
Help is urgently needed! Thanks

more...
03

Spring Element decoration rendering problem in IE

września
No Comments |  Posted by admin |  Category:Forum
Hi,

I am using SWF 2.1.0 with Spring 3.0.1. I am facing problem while rendering tiles fragments in IE (version8). The Spring Ajax Event decorator submit the form and gets the response. The fragments has the text field which has Spring.ElementDecoration. After getting the response the text field converted into dijit div fields but it appears in 3 seperate boxes in IE browser. It is working fine in firefox.

The dojo.eval called for all ElementDecoration but css is not applied for the dijit control!

Any fixes for this?

Thanks in advance.

more...
03

what should be in a plan file

września
No Comments |  Posted by admin |  Category:Forum
I have two artifacts:

one is a configuration, the other one is an application bundle. At the same time, this application bundle has two dependencies: bundle a and bundle b.

So in my plan file, I will list the first two artifacts: the configuration and the application bundle. My question is if I should put the two dependencies(bundle a and bundle b) in the plan file or not? Or I just put bundle a and bundle b in the Spring DM repository:

springsource-dm-server-2.0.2.RELEASE/repository/usr

Thanks,
Michael

more...
03

Portlet MVC / PortletModeParameterHandlerMapping / Annotations

września
No Comments |  Posted by admin |  Category:Forum
I am starting to work with the Annotated controllers, I have a lot of experience with the old controllers.

I always used the PortletModeParameterHandlerMapping before which allowed me to switch between controllers.

http://static.springsource.org/sprin…erMapping.html

In a jsp, to switch controllers all one had to do was set up a request parameter with the value of action, and you could switch controllers.

Right now I’m not seeing how to switch between controllers when using the annotated controllers?

Can someone point me in the right direction? Is this possible?

This is the code I’m trying to replicate:

Xml configuration:

Code:

        <bean id="portletModeParameterHandlerMapping" class="org.springframework.web.portlet.handler.PortletModeParameterHandlerMapping">
                <property name="portletModeParameterMap">
                        <map>
                                <entry key="view">
                                        <map>
                                                <entry key="index" value-ref="displayIndexController" />
                                                <entry key="detail" value-ref="displayDetailController" />                                               
                                        </map>                               
                                </entry>
                        </map>
                </property>
        </bean>


Code in jsp:

Code:

<a href="<portlet:renderURL>
                        <portlet:param name="action" value="detail" />
                        <portlet:param name="locationId" value="${location.id}" />
            </portlet:renderURL>">Details</a>


Where the parameter "action" is the default parameter to change controllers.

more...
03

CXF plugin – JAXB error

września
No Comments |  Posted by admin |  Category:Forum
Hi all, I am fairly new to Grails and CXF. I have a simple parent-child relationship and I want to expose some methods through SOAP-CXF using the Grails-CXF plugin.

I have the following 2 simple domain classes.

@XmlAccessorType(XmlAccessType.FIELD)
class Dealership {

static hasMany = [technicians:Technician]

String description

static constraints = {
description(blank: false , maxSize:100)
}
}

@XmlAccessorType(XmlAccessType.FIELD)
class Technician {

Dealership dealership
String firstName
String lastName

static constraints = {
firstName(blank: false , maxSize:100)
lastName(blank: false , maxSize:100)
}
}

and the following service class :

class DealershipManagementService {

static expose=[ 'cxf' ]

Dealership retrieveDealership(Integer id) {
return Dealership.get( id )
}
}

When I call the generated WebService retrieveDealership(1), I get the error :
Marshalling Error: A cycle is detected in the object graph. This will cause infinitely deep XML

Any help on how to fix this ?

Regards,

Martin

more...
03

NoSuchMethodError: javax/persistence/OneToMany.orphanRemoval()Z

września
No Comments |  Posted by admin |  Category:Forum
I am having problems running my unit tests within Rational Application Developer. It looks to me like some class path issue, but I can seem to get the right jars in place. Currenlt I have the following jars:

antlr-2.7.6.jar
cglib-nodep-2.2.jar
commons-collections-3.1.jar
commons-logging-1.1.1.jar
dom4j-1.6.1.jar
hibernate-jpa-2.0-api-1.0.0.Final.jar
hibernate3.jar
javassist-3.9.0.GA.jar
jta-1.1.jar
log4j-1.2.5.jar
org.springframework.aop-3.0.4.RELEASE.jar
org.springframework.asm-3.0.4.RELEASE.jar
org.springframework.beans-3.0.1.RELEASE-A.jar
org.springframework.context-3.0.4.RELEASE.jar
org.springframework.core-3.0.4.RELEASE.jar
org.springframework.expression-3.0.4.RELEASE.jar
org.springframework.jdbc-3.0.4.RELEASE.jar
org.springframework.jms-3.0.4.RELEASE.jar
org.springframework.orm-3.0.4.RELEASE.jar
org.springframework.test-3.0.4.RELEASE.jar
org.springframework.transaction-3.0.4.RELEASE.jar
org.springframework.web-3.0.4.RELEASE.jar
org.springframework.web.servlet-3.0.1.RELEASE-A.jar
slf4j-api-1.5.8.jar
slf4j-log4j12-1.5.8.jar
wicket-1.4.7.jar
wicket-auth-roles-1.4.7.jar
wicket-datetime-1.4.7.jar
wicket-devutils-1.4.7.jar
wicket-extensions-1.4.7.jar
wicket-guice-1.4.7.jar
wicket-ioc-1.4.7.jar
wicket-jmx-1.4.7.jar
wicket-objectsizeof-agent-1.4.7.jar
wicket-spring-1.4.7.jar
wicket-velocity-1.4.7.jar
junit-4.8.1.jar
commons-dbcp-1.4.jar

And here is the error I am encountering:

java.lang.IllegalStateException: Failed to load ApplicationContext
at org.springframework.test.context.TestContext.getAp plicationContext(TestContext.java:308)
at org.springframework.test.context.support.Dependenc yInjectionTestExecutionListener.injectDependencies (DependencyInjectionTestExecutionListener.java:109 )
at org.springframework.test.context.support.Dependenc yInjectionTestExecutionListener.prepareTestInstanc e(DependencyInjectionTestExecutionListener.java:75 )
at org.springframework.test.context.TestContextManage r.prepareTestInstance(TestContextManager.java:333)
at org.springframework.test.context.junit4.SpringJUni t4ClassRunner.createTest(SpringJUnit4ClassRunner.j ava:220)
at org.springframework.test.context.junit4.SpringJUni t4ClassRunner$1.runReflectiveCall(SpringJUnit4Clas sRunner.java:301)
at org.junit.internal.runners.model.ReflectiveCallabl e.run(ReflectiveCallable.java:15)
at org.springframework.test.context.junit4.SpringJUni t4ClassRunner.methodBlock(SpringJUnit4ClassRunner. java:303)
at org.springframework.test.context.junit4.SpringJUni t4ClassRunner.runChild(SpringJUnit4ClassRunner.jav a:240)
at org.junit.runners.BlockJUnit4ClassRunner.runChild( BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner. java:193)
at org.junit.runners.ParentRunner$1.schedule(ParentRu nner.java:52)
at org.junit.runners.ParentRunner.runChildren(ParentR unner.java:191)
at org.junit.runners.ParentRunner.access$000(ParentRu nner.java:42)
at org.junit.runners.ParentRunner$2.evaluate(ParentRu nner.java:184)
at org.springframework.test.context.junit4.statements .RunBeforeTestClassCallbacks.evaluate(RunBeforeTes tClassCallbacks.java:61)
at org.springframework.test.context.junit4.statements .RunAfterTestClassCallbacks.evaluate(RunAfterTestC lassCallbacks.java:70)
at org.junit.runners.ParentRunner.run(ParentRunner.ja va:236)
at org.springframework.test.context.junit4.SpringJUni t4ClassRunner.run(SpringJUnit4ClassRunner.java:180 )
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestR eference.run(JUnit4TestReference.java:45)
at org.eclipse.jdt.internal.junit.runner.TestExecutio n.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRu nner.runTests(RemoteTestRunner.java:460)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRu nner.runTests(RemoteTestRunner.java:673)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRu nner.run(RemoteTestRunner.java:386)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRu nner.main(RemoteTestRunner.java:196)
Caused by: org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name ’sessionFactory’ defined in URL [file:test/resources/test-app-config.xml]: Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: javax/persistence/OneToMany.orphanRemoval()Z
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.initializeBean(Abstract AutowireCapableBeanFactory.java:1403)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.doCreateBean(AbstractAu towireCapableBeanFactory.java:513)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBean(AbstractAuto wireCapableBeanFactory.java:450)
at org.springframework.beans.factory.support.Abstract BeanFactory$1.getObject(AbstractBeanFactory.java:2 90)
at org.springframework.beans.factory.support.DefaultS ingletonBeanRegistry.getSingleton(DefaultSingleton BeanRegistry.java:222)
at org.springframework.beans.factory.support.Abstract BeanFactory.doGetBean(AbstractBeanFactory.java:287 )
at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:189)
at org.springframework.beans.factory.support.DefaultL istableBeanFactory.preInstantiateSingletons(Defaul tListableBeanFactory.java:545)
at org.springframework.context.support.AbstractApplic ationContext.finishBeanFactoryInitialization(Abstr actApplicationContext.java:895)
at org.springframework.context.support.AbstractApplic ationContext.refresh(AbstractApplicationContext.ja va:425)
at org.springframework.test.context.support.AbstractG enericContextLoader.loadContext(AbstractGenericCon textLoader.java:84)
at org.springframework.test.context.support.AbstractG enericContextLoader.loadContext(AbstractGenericCon textLoader.java:1)
at org.springframework.test.context.TestContext.loadA pplicationContext(TestContext.java:280)
at org.springframework.test.context.TestContext.getAp plicationContext(TestContext.java:304)
… 24 more
Caused by: java.lang.NoSuchMethodError: javax/persistence/OneToMany.orphanRemoval()Z
at org.hibernate.cfg.AnnotationBinder.processElementA nnotations(AnnotationBinder.java:1745)
at org.hibernate.cfg.AnnotationBinder.processIdProper tiesIfNotAlready(AnnotationBinder.java:738)
at org.hibernate.cfg.AnnotationBinder.bindClass(Annot ationBinder.java:702)
at org.hibernate.cfg.AnnotationConfiguration.processA rtifactsOfType(AnnotationConfiguration.java:631)
at org.hibernate.cfg.AnnotationConfiguration.secondPa ssCompile(AnnotationConfiguration.java:352)
at org.hibernate.cfg.Configuration.buildMappings(Conf iguration.java:1206)
at org.springframework.orm.hibernate3.LocalSessionFac toryBean.buildSessionFactory(LocalSessionFactoryBe an.java:717)
at org.springframework.orm.hibernate3.AbstractSession FactoryBean.afterPropertiesSet(AbstractSessionFact oryBean.java:211)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.invokeInitMethods(Abstr actAutowireCapableBeanFactory.java:1460)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.initializeBean(Abstract AutowireCapableBeanFactory.java:1400)
… 37 more

I have read the following related posts:

http://opensource.atlassian.com/proj…rowse/HHH-4955
https://forum.hibernate.org/viewtopic.php?f=1&t=1003996

but can’t seem to figure my way around this problem.

Any help would greatly be appreciated

Regards,

Steven H.

more...