[
https://issues.jboss.org/browse/AS7-5770?page=com.atlassian.jira.plugin.s...
]
Lucas Galfaso commented on AS7-5770:
------------------------------------
Here is a stacktrace, we where expecting the exception that we where generating and we get
InvocationTargetException
Caused by: java.lang.reflect.InvocationTargetException
at
org.jboss.as.cmp.component.interceptors.CmpEntityBeanEjbCreateMethodInterceptorFactory.invokeEjbCreate(CmpEntityBeanEjbCreateMethodInterceptorFactory.java:47)
at
org.jboss.as.ejb3.component.entity.interceptors.EntityBeanEjbCreateMethodInterceptorFactory$1.processInvocation(EntityBeanEjbCreateMethodInterceptorFactory.java:86)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)
at
org.jboss.as.ee.component.ViewService$DefaultViewInstanceFactory.createViewInstance(ViewService.java:280)
at org.jboss.as.ee.component.ViewService$View.createInstance(ViewService.java:157)
at
org.jboss.as.ejb3.component.entity.interceptors.EntityBeanHomeCreateInterceptorFactory$1.processInvocation(EntityBeanHomeCreateInterceptorFactory.java:76)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInCallerTx(CMTTxInterceptor.java:202)
at org.jboss.as.ejb3.tx.CMTTxInterceptor.required(CMTTxInterceptor.java:306)
at org.jboss.as.ejb3.tx.CMTTxInterceptor.processInvocation(CMTTxInterceptor.java:190)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
at
org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
at
org.jboss.as.ejb3.component.interceptors.LoggingInterceptor.processInvocation(LoggingInterceptor.java:59)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
at
org.jboss.as.ejb3.component.interceptors.EjbExceptionTransformingInterceptorFactories$2.processInvocation(EjbExceptionTransformingInterceptorFactories.java:89)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
at
org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
at
org.jboss.as.ejb3.component.interceptors.AdditionalSetupInterceptor.processInvocation(AdditionalSetupInterceptor.java:32)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
at org.jboss.as.ee.component.TCCLInterceptor.processInvocation(TCCLInterceptor.java:45)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)
at org.jboss.as.ee.component.ViewService$View.invoke(ViewService.java:165)
at
org.jboss.as.ee.component.ViewDescription$1.processInvocation(ViewDescription.java:173)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)
at
org.jboss.as.ee.component.ProxyInvocationHandler.invoke(ProxyInvocationHandler.java:72)
at com.vasoftware.sf.server.apps.sfmain.core.FolderLocalHome$$$view524.create(Unknown
Source)
at
com.vasoftware.sf.server.apps.sfmain.core.FolderHelperBean.createFolderExtension(FolderHelperBean.java:220)
at
org.jboss.as.ee.component.ManagedReferenceMethodInterceptorFactory$ManagedReferenceMethodInterceptor.processInvocation(ManagedReferenceMethodInterceptorFactory.java:72)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53)
at
org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:36)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
at
org.jboss.as.jpa.interceptor.SBInvocationInterceptor.processInvocation(SBInvocationInterceptor.java:47)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
at org.jboss.invocation.InitialInterceptor.processInvocation(InitialInterceptor.java:21)
... 64 more
Caused by: com.vasoftware.sf.common.ObjectAlreadyExistsException: Attempt to create
duplicate object: projects.fldr577964137/fold4817f9138b187a4f0000b419 [null]
at com.vasoftware.sf.server.apps.sfmain.core.FolderBean.ejbCreate(FolderBean.java:184)
... 110 more
It would take some time to build a small app that reproduce this, but still possible
BTW, making the proposed modification (here and ejbPostCreate), everything went back to
normal.
EJB2 entity bean creation exceptions are wrapped with
InvocationTargetException
-------------------------------------------------------------------------------
Key: AS7-5770
URL:
https://issues.jboss.org/browse/AS7-5770
Project: Application Server 7
Issue Type: Feature Request
Components: EJB
Affects Versions: 7.1.1.Final
Environment: Mac OSX, Java 7
Reporter: Lucas Galfaso
Assignee: jaikiran pai
When ejbCreate throws an exception, the exception is wrapped in
InvocationTargetException. The root cause looks like it is at
CmpEntityBeanEjbCreateMethodInterceptorFactory::invokeEjbCreate
and the line
ejbCreate.invoke(instance.getInstance(), params);
this class overrided this method from EntityBeanEjbCreateMethodInterceptorFactory that
does handle this case, so it might be possible to just replace this line with
super.invokeEjbCreate(context, ejbCreate, instance,
params)ejbCreate.invoke(instance.getInstance(), params);
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira