Here are the results of your code snippet below in a clean build of jboss. It looks like it's printed in a, b, c order if I go by the line in ApplicationBean that caused each stack trace.
And unless I'm doing something else wrong, my patch does something odd with 3-level deep exceptions, so I think it is broken too.
-Casey
15:30:33,708 ERROR [STDERR] org.jboss.deployment.DeploymentException: c; - nested throwable is: org.jboss.deployment.DeploymentException: b; - nested throwable is: org.jboss.deployment.DeploymentException: a
15:30:33,709 ERROR [STDERR] + nested throwable:
15:30:33,709 ERROR [STDERR] org.jboss.deployment.DeploymentException: b; - nested throwable is: org.jboss.deployment.DeploymentException: a
15:30:33,709 ERROR [STDERR] + nested throwable:
15:30:33,710 ERROR [STDERR] org.jboss.deployment.DeploymentException: a
15:30:33,710 ERROR [STDERR] at f5.ApplicationBean.ejbPostCreate(ApplicationBean.java:67)
15:30:33,711 ERROR [STDERR] at java.lang.reflect.Method.invoke(Native Method)
15:30:33,711 ERROR [STDERR] at org.jboss.ejb.plugins.CMPPersistenceManager.postCreateEntity(CMPPersistenceManager.java:284)
15:30:33,756 ERROR [STDERR] at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.postCreateEntity(CachedConnectionInterceptor.java:239)
15:30:33,757 ERROR [STDERR] at org.jboss.ejb.EntityContainer.postCreateHome(EntityContainer.java:716)
15:30:33,757 ERROR [STDERR] at java.lang.reflect.Method.invoke(Native Method)
15:30:33,758 ERROR [STDERR] at org.jboss.ejb.EntityContainer$ContainerInterceptor.invoke(EntityContainer.java:1164)
15:30:33,758 ERROR [STDERR] at org.jboss.ejb.plugins.cmp.jdbc.JDBCRelationInterceptor.invoke(JDBCRelationInterceptor.java:190)
15:30:33,758 ERROR [STDERR] at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invoke(EntitySynchronizationInterceptor.java:313)
15:30:33,759 ERROR [STDERR] at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:147)
15:30:33,759 ERROR [STDERR] at org.jboss.ejb.plugins.EntityInstanceInterceptor.invoke(EntityInstanceInterceptor.java:193)
15:30:33,759 ERROR [STDERR] at org.jboss.ejb.plugins.EntityLockInterceptor.invoke(EntityLockInterceptor.java:107)
15:30:33,760 ERROR [STDERR] at org.jboss.ejb.plugins.EntityCreationInterceptor.invokeHome(EntityCreationInterceptor.java:59)
15:30:33,760 ERROR [STDERR] at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:98)
15:30:33,761 ERROR [STDERR] at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:167)
15:30:33,761 ERROR [STDERR] at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:52)
15:30:33,761 ERROR [STDERR] at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:104)
15:30:33,762 ERROR [STDERR] at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:109)
15:30:33,762 ERROR [STDERR] at org.jboss.ejb.EntityContainer.invokeHome(EntityContainer.java:487)
15:30:33,762 ERROR [STDERR] at org.jboss.ejb.Container.invoke(Container.java:727)
15:30:33,763 ERROR [STDERR] at org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:1055)
15:30:33,763 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:492)
15:30:33,763 ERROR [STDERR] at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:364)
15:30:33,764 ERROR [STDERR] at java.lang.reflect.Method.invoke(Native Method)
15:30:33,764 ERROR [STDERR] at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:241)
15:30:33,765 ERROR [STDERR] at sun.rmi.transport.Transport$1.run(Transport.java:152)
15:30:33,765 ERROR [STDERR] at java.security.AccessController.doPrivileged(Native Method)
15:30:33,765 ERROR [STDERR] at sun.rmi.transport.Transport.serviceCall(Transport.java:148)
15:30:33,766 ERROR [STDERR] at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:465)
15:30:33,766 ERROR [STDERR] at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:706)
15:30:33,766 ERROR [STDERR] at java.lang.Thread.run(Thread.java:484)
15:30:33,767 ERROR [STDERR] + throwable:
15:30:33,767 ERROR [STDERR] org.jboss.deployment.DeploymentException: b; - nested throwable is: org.jboss.deployment.DeploymentException: a
15:30:33,767 ERROR [STDERR] at f5.ApplicationBean.ejbPostCreate(ApplicationBean.java:68)
15:30:33,768 ERROR [STDERR] at java.lang.reflect.Method.invoke(Native Method)
15:30:33,768 ERROR [STDERR] at org.jboss.ejb.plugins.CMPPersistenceManager.postCreateEntity(CMPPersistenceManager.java:284)
15:30:33,768 ERROR [STDERR] at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.postCreateEntity(CachedConnectionInterceptor.java:239)
15:30:33,769 ERROR [STDERR] at org.jboss.ejb.EntityContainer.postCreateHome(EntityContainer.java:716)
15:30:33,769 ERROR [STDERR] at java.lang.reflect.Method.invoke(Native Method)
15:30:33,769 ERROR [STDERR] at org.jboss.ejb.EntityContainer$ContainerInterceptor.invoke(EntityContainer.java:1164)
15:30:33,770 ERROR [STDERR] at org.jboss.ejb.plugins.cmp.jdbc.JDBCRelationInterceptor.invoke(JDBCRelationInterceptor.java:190)
15:30:33,770 ERROR [STDERR] at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invoke(EntitySynchronizationInterceptor.java:313)
15:30:33,770 ERROR [STDERR] at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:147)
15:30:33,771 ERROR [STDERR] at org.jboss.ejb.plugins.EntityInstanceInterceptor.invoke(EntityInstanceInterceptor.java:193)
15:30:33,771 ERROR [STDERR] at org.jboss.ejb.plugins.EntityLockInterceptor.invoke(EntityLockInterceptor.java:107)
15:30:33,772 ERROR [STDERR] at org.jboss.ejb.plugins.EntityCreationInterceptor.invokeHome(EntityCreationInterceptor.java:59)
15:30:33,772 ERROR [STDERR] at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:98)
15:30:33,772 ERROR [STDERR] at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:167)
15:30:33,773 ERROR [STDERR] at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:52)
15:30:33,773 ERROR [STDERR] at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:104)
15:30:33,773 ERROR [STDERR] at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:109)
15:30:33,774 ERROR [STDERR] at org.jboss.ejb.EntityContainer.invokeHome(EntityContainer.java:487)
15:30:33,785 ERROR [STDERR] at org.jboss.ejb.Container.invoke(Container.java:727)
15:30:33,786 ERROR [STDERR] at org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:1055)
15:30:33,786 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:492)
15:30:33,786 ERROR [STDERR] at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:364)
15:30:33,786 ERROR [STDERR] at java.lang.reflect.Method.invoke(Native Method)
15:30:33,787 ERROR [STDERR] at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:241)
15:30:33,787 ERROR [STDERR] at sun.rmi.transport.Transport$1.run(Transport.java:152)
15:30:33,787 ERROR [STDERR] at java.security.AccessController.doPrivileged(Native Method)
15:30:33,787 ERROR [STDERR] at sun.rmi.transport.Transport.serviceCall(Transport.java:148)
15:30:33,788 ERROR [STDERR] at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:465)
15:30:33,788 ERROR [STDERR] at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:706)
15:30:33,788 ERROR [STDERR] at java.lang.Thread.run(Thread.java:484)
15:30:33,788 ERROR [STDERR] + throwable:
15:30:33,789 ERROR [STDERR] org.jboss.deployment.DeploymentException: c; - nested throwable is: org.jboss.deployment.DeploymentException: b; - nested throwable is: org.jboss.deployment.DeploymentException: a
15:30:33,789 ERROR [STDERR] at f5.ApplicationBean.ejbPostCreate(ApplicationBean.java:69)
15:30:33,789 ERROR [STDERR] at java.lang.reflect.Method.invoke(Native Method)
15:30:33,789 ERROR [STDERR] at org.jboss.ejb.plugins.CMPPersistenceManager.postCreateEntity(CMPPersistenceManager.java:284)
15:30:33,790 ERROR [STDERR] at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.postCreateEntity(CachedConnectionInterceptor.java:239)
15:30:33,790 ERROR [STDERR] at org.jboss.ejb.EntityContainer.postCreateHome(EntityContainer.java:716)
15:30:33,790 ERROR [STDERR] at java.lang.reflect.Method.invoke(Native Method)
15:30:33,790 ERROR [STDERR] at org.jboss.ejb.EntityContainer$ContainerInterceptor.invoke(EntityContainer.java:1164)
15:30:33,791 ERROR [STDERR] at org.jboss.ejb.plugins.cmp.jdbc.JDBCRelationInterceptor.invoke(JDBCRelationInterceptor.java:190)
15:30:33,791 ERROR [STDERR] at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invoke(EntitySynchronizationInterceptor.java:313)
15:30:33,791 ERROR [STDERR] at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:147)
15:30:33,791 ERROR [STDERR] at org.jboss.ejb.plugins.EntityInstanceInterceptor.invoke(EntityInstanceInterceptor.java:193)
15:30:33,792 ERROR [STDERR] at org.jboss.ejb.plugins.EntityLockInterceptor.invoke(EntityLockInterceptor.java:107)
15:30:33,792 ERROR [STDERR] at org.jboss.ejb.plugins.EntityCreationInterceptor.invokeHome(EntityCreationInterceptor.java:59)
15:30:33,792 ERROR [STDERR] at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:98)
15:30:33,793 ERROR [STDERR] at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:167)
15:30:33,793 ERROR [STDERR] at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:52)
15:30:33,793 ERROR [STDERR] at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:104)
15:30:33,793 ERROR [STDERR] at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:109)
15:30:33,794 ERROR [STDERR] at org.jboss.ejb.EntityContainer.invokeHome(EntityContainer.java:487)
15:30:33,794 ERROR [STDERR] at org.jboss.ejb.Container.invoke(Container.java:727)
15:30:33,794 ERROR [STDERR] at org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:1055)
15:30:33,794 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:492)
15:30:33,795 ERROR [STDERR] at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:364)
15:30:33,795 ERROR [STDERR] at java.lang.reflect.Method.invoke(Native Method)
15:30:33,795 ERROR [STDERR] at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:241)
15:30:33,796 ERROR [STDERR] at sun.rmi.transport.Transport$1.run(Transport.java:152)
15:30:33,797 ERROR [STDERR] at java.security.AccessController.doPrivileged(Native Method)
15:30:33,797 ERROR [STDERR] at sun.rmi.transport.Transport.serviceCall(Transport.java:148)
15:30:33,797 ERROR [STDERR] at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:465)
15:30:33,798 ERROR [STDERR] at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:706)
15:30:33,798 ERROR [STDERR] at java.lang.Thread.run(Thread.java:484)
-----Original Message-----
From: Jason Dillon [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 17, 2002 4:51 PM
To: Casey Haakenson
Cc: [EMAIL PROTECTED]; 'marc fleury'; David
Jencks; Scott M Stark
Subject: Re: [JBoss-dev] Are we logging the exception enough!!!
Ok, do me a favor (cause I am really busy right now). Do something like
this:
<snip>
Exception a = new DeploymentException("a");
Exception b = new DeploymentException("b", a);
Exception c = new DeploymentException("c", b);
c.printStackTrace();
</snip>
Logically the order printed should list the stack traces c, b, a... but
that might be a bug in the current printing logic.
--jason