[JBoss Seam] - UndeclaredThrowableException from SeamTest, but not within J
by stu2
This is with Seam current from CVS, on OS X 1.4.8 with Eclipse 3.2.2.
When I run a SeamTest in which a declared business exception is thrown, an UndeclaredThrowableException is thrown from the generated proxy rather than the declared exception. It all runs fine when I deploy the application in JBoss. Just not via SeamTest. And the exception is declared in the SLSB interface so UndeclaredThrowableException isn't appropriate.
I'm stuck stepping through the source because the problem appears to be in the generated proxy for the SLSB, and I don't know where that's created. I've traced through the JDK, JBoss embedded EJB and AOP code and didn't notice anything odd until the exception makes its way back into the proxy (though I'm not familiar with the above code so maybe I missed something?
I'm not really sure what I sould provide on this, so forgive me for being a bit on the verbose side.
Any idea what's going on here? This feels like a problem in SeamTest because it runs in Jboss, but I'm not on familiar enough ground here to actually spot what's going on.
Now for details.
First, in the debugger, here's where the exception will be rethrown as an UndeclaredThrowableException:
| $Proxy66.ingest(byte[], CsvFeedDefinition, Map) line: not available
| StatelessLocalProxy.invoke(Object, Method, Object[]) line: 79
| StatelessContainer.localInvoke(Method, Object[], FutureHolder) line: 181
| EJBContainerInvocation(MethodInvocation).invokeNext() line: 98
|
The SLSB method generating the original IngestWithValidationErrorsException is:
| public FeedIngestResult ingest
| (byte [] feedFile, CsvFeedDefinition feedDefinition,
| Map<String, FeedItem> previousFeedItemMap)
| throws IngestWithValidationErrorsException
| {
| ....
|
The top exception I see is:
|
| java.lang.reflect.UndeclaredThrowableException
| at $Proxy67.processFeedImport(Unknown Source)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)
| at org.jboss.seam.intercept.ClientSideInterceptor$1.proceed(ClientSideInterceptor.java:72)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:57)
| at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:103)
| at org.jboss.seam.intercept.ClientSideInterceptor.invoke(ClientSideInterceptor.java:50)
| at org.javassist.tmp.java.lang.Object_$$_javassist_2.processFeedImport(Object_$$_javassist_2.java)
| at com.fb.core.action.FeedMappingAction.applyMappingsToFeed(FeedMappingAction.java:267)
| ...trimmed out lots of lines that probably aren't interesting
|
caused by
| Caused by: java.lang.reflect.InvocationTargetException
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)
| at org.jboss.seam.intercept.ClientSideInterceptor$1.proceed(ClientSideInterceptor.java:72)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:57)
| at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:103)
| at org.jboss.seam.intercept.ClientSideInterceptor.invoke(ClientSideInterceptor.java:50)
| at org.javassist.tmp.java.lang.Object_$$_javassist_3.ingest(Object_$$_javassist_3.java)
| at com.fb.core.business.IngestServiceImpl.processFeedImport(IngestServiceImpl.java:56)
|
caused by
| Caused by: com.fb.core.business.exception.IngestWithValidationErrorsException
| at com.fb.core.business.ingest.CsvIngestUtil.ingest(CsvIngestUtil.java:109)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:109)
| at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166)
| at org.jboss.seam.intercept.EJBInvocationContext.proceed(EJBInvocationContext.java:37)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:57)
| at org.jboss.seam.interceptors.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:27)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
| at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:103)
| at org.jboss.seam.intercept.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:53)
| at sun.reflect.GeneratedMethodAccessor23.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:118)
| at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
| at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
| at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
| at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:126)
| at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:201)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
| at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
| at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
| at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:78)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
| at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
| at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
| at org.jboss.ejb3.stateless.StatelessContainer.localInvoke(StatelessContainer.java:181)
| at org.jboss.ejb3.stateless.StatelessLocalProxy.invoke(StatelessLocalProxy.java:79)
| at $Proxy66.ingest(Unknown Source)
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4027013#4027013
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4027013
19Â years, 1Â month
[JBoss Seam] - Re: Conversation and Tree+Tab Layout with @End
by tony.herstellï¼ gmail.com
in pages.xml
| <pages no-conversation-view-id="/mainmenu.xhtml">
| <page view-id="/userCRUD.xhtml" timeout="300000">
| Reason: #{cRUDUserController.mode} User ( #{user.username} )
| </page>
| <page view-id="/userConfirm.xhtml" timeout="300000">
| Reason: Confirm #{cRUDUserController.mode} User
| (#{user.username} )
| </page>
| <page view-id="/userRegistration.xhtml" timeout="300000">
| Reason: Registration of new User
| </page>
|
| <page view-id="/organisationCRUD.xhtml" timeout="300000">
| Reason: #{cRUDOrganisationController.mode} Organisation (
| #{organisation.name} )
| </page>
| <page view-id="/organisationConfirm.xhtml" timeout="300000">
| Reason: Confirm #{cRUDOrganisationController.mode} Organisation
| (#{organisation.name} )
| </page>
|
| <page view-id="/upload.xhtml" timeout="300000">
| Reason: Upload Image
| </page>
|
| @CacheConfig(idleTimeoutSeconds=1800)
| @Stateful
| @Name("findOrganisationController")
| @Scope(ScopeType.SESSION)
|
web.xml
| <session-config>
| <session-timeout>15</session-timeout>
| </session-config>
|
It would take one of the main guys to explain properly what they do... I just added them as I was told to by Gavin. I don't think its in the Doco anywhere.
Summat about it timing after after the default session timeout in JBoss
:?
:/
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4027011#4027011
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4027011
19Â years, 1Â month
[JBoss Portal] - Re: Layout : show single window without region / bug and pat
by Antoine_h
The JIRA is :
http://jira.jboss.com/jira/browse/JBPORTAL-1316
the patch code is :
| String windowID = null;
| // we have the windowName (which is the window name), but we need the
| // window id
| Map portletContexts = page.getWindowContextMap();
| for (Iterator i = portletContexts.keySet().iterator(); i.hasNext();) {
| windowID = (String) i.next();
| WindowContext portletContext = (WindowContext) portletContexts
| .get(windowID);
| if (windowName.equals(portletContext.getWindowName())) {
| if (log.isDebugEnabled()) {
| log.debug("found the portlet to render: " + windowName);
| }
| break;
| }
| }
|
| if (windowID == null) {
| log
| .warn("can't find the window id of the window name on this page. Page ["
| + page.getPageName()
| + "] Window ["
| + windowName
| + "]. This window won't be shown in page.");
| return;
| }
| if (page.getWindowContext(windowID) == null) {
| log.warn("no such window on this page. Page [" + page.getPageName()
| + "] Window name [" + windowName + "]" + "] Window Id ["
| + windowID + "]");
| return;
| }
|
| WindowContext windowContext = page.getWindowContext(windowID);
| RenderContext renderContext = (RenderContext) request
| .getAttribute(LayoutConstants.ATTR_RENDERCONTEXT);
|
| renderContext = renderContext.getContext(windowContext);
|
| try {
| renderContext.render();
| out.write(renderContext.getMarkupFragment().toString());
| out.flush();
| } catch (RenderException e) {
| throw new JspException(e);
| }
|
(more readable than in the JIRA without code format).
To replace in the PortletTagHandler class from :
if (page.getWindowContext(windowName) == null)
{
log.debug("no such window on this page. Page [" + page.getPageName() + "] Window [" + windowName + "]");
return;
}
.../...
To : the end of the method.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4027008#4027008
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4027008
19Â years, 1Â month