[jboss-jira] [JBoss JIRA] Commented: (JBAS-9266) java.lang.reflect.UndeclaredThrowableException when using @ApplicationException in combination with @InterceptorBinding
Carlo de Wolf (JIRA)
jira-events at lists.jboss.org
Thu Apr 7 14:44:33 EDT 2011
[ https://issues.jboss.org/browse/JBAS-9266?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12594333#comment-12594333 ]
Carlo de Wolf commented on JBAS-9266:
-------------------------------------
Next time please attach the relevant piece of the stacktrace.
{noformat}
java.lang.reflect.UndeclaredThrowableException
at $Proxy3.throwApplicationError(Unknown Source)
at Client.main(Client.java:9)
Caused by: java.lang.ClassNotFoundException: org.jboss.weld.exceptions.WeldException
{noformat}
> java.lang.reflect.UndeclaredThrowableException when using @ApplicationException in combination with @InterceptorBinding
> -----------------------------------------------------------------------------------------------------------------------
>
> Key: JBAS-9266
> URL: https://issues.jboss.org/browse/JBAS-9266
> Project: JBoss Application Server
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: EJB
> Affects Versions: 6.0.0.Final
> Reporter: Felix Ullrich
> Assignee: Carlo de Wolf
> Attachments: ejbModule.zip
>
>
> If I'm using @InterceptorBinding a thrown Exception out of an EJB marked with @ApplicationException dont reach the client. Instead of the @ApplicationException I get a java.lang.reflect.UndeclaredThrowableException.
> I've attached a minimal example.
> My client-main-program looks like this:
> {code:title=Bar.java|borderStyle=solid}
> public static void main(final String[] args) throws NamingException {
>
> final InitialContext context = new InitialContext();
> context.lookup("StatefulTestBean/remote");
>
> try {
> statefulTest.throwApplicationError();
> } catch (final Exception e) {
> System.out.println(e);
> }
> }
> {code}
> The excepted output would be:
> {code}
> error.AppError
> {code}
> but its:
> {code}
> java.lang.reflect.UndeclaredThrowableException
> {code}
> If you comment out the annotation @InterceptorAnnotation in the StatefulTestBean.java and redeploy the application then everything is fine - you get the expetced AppError-Exception.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list