[jboss-jira] [JBoss JIRA] Closed: (AS7-194) java.lang.reflect.UndeclaredThrowableException when using @ApplicationException in combination with @InterceptorBinding
Stuart Douglas (JIRA)
jira-events at lists.jboss.org
Mon Jul 11 02:27:23 EDT 2011
[ https://issues.jboss.org/browse/AS7-194?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Stuart Douglas closed AS7-194.
------------------------------
Assignee: Stuart Douglas (was: Marius Bogoevici)
Fix Version/s: 7.0.0.Final
(was: 7.1.0.Alpha1)
Resolution: Done
> java.lang.reflect.UndeclaredThrowableException when using @ApplicationException in combination with @InterceptorBinding
> -----------------------------------------------------------------------------------------------------------------------
>
> Key: AS7-194
> URL: https://issues.jboss.org/browse/AS7-194
> Project: Application Server 7
> Issue Type: Bug
> Components: CDI / Weld, EJB
> Environment: AS 7: https://github.com/wolfc/jboss-as/commits/JBAS-9266
> Reporter: Felix Ullrich
> Assignee: Stuart Douglas
> Fix For: 7.0.0.Final
>
> 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