Unexpected behavior while tracing output
purringpigeon Oct 27, 2014 11:35 AMHello,
This one is very odd to me, and likely it's something I am doing incorrectly. It just seems odd that the behavior is so different.
I have the following statement:
traceln("a"," dispatched at: " + $1.getTimeStamp());
This traces out just fine - to the console it includes the thread name, but to the file it simple outputs:
dispatched at: Mon Oct 27 09:27:50 MDT 2014
To assist in tracing the threads I changed the above line to:
traceln("a",Thread.currentThread().getName() + " dispatched at: " + $1.getTimeStamp());
However when this runs I get the following error:
2014-10-27|08:33:40,174 ERROR [org.jboss.as.ejb3] (Thread-132 (HornetQ-client-global-threads-1505424423)) javax.ejb.EJBTransactionRolledbackException: MethodExpression.interpret : exception invoking method traceln file TaskMDB.btm line 56
2014-10-27|08:33:40,174 ERROR [org.jboss.as.ejb3.invocation] (Thread-132 (HornetQ-client-global-threads-1505424423)) JBAS014134: EJB Invocation failed on component TaskEventHandlerMDB for method public abstract void javax.jms.MessageListener.onMessage(javax.jms.Message): javax.ejb.EJBTransactionRolledbackException: MethodExpression.interpret : exception invoking method traceln file TaskMDB.btm line 56
at org.jboss.as.ejb3.tx.CMTTxInterceptor.handleInCallerTx(CMTTxInterceptor.java:137)
at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInCallerTx(CMTTxInterceptor.java:202)
at org.jboss.as.ejb3.tx.CMTTxInterceptor.required(CMTTxInterceptor.java:304)
at org.jboss.as.ejb3.tx.CMTTxInterceptor.processInvocation(CMTTxInterceptor.java:188)
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.ShutDownInterceptorFactory$1.processInvocation(ShutDownInterceptorFactory.java:42)
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.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:43)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
at org.jboss.as.ejb3.component.messagedriven.MessageDrivenComponentDescription$5$1.processInvocation(MessageDrivenComponentDescription.java:184)
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:181)
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 javax.jms.MessageListener$$$view163.onMessage(Unknown Source)
at sun.reflect.GeneratedMethodAccessor422.invoke(Unknown Source) [:1.7.0_25]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_25]
at java.lang.reflect.Method.invoke(Method.java:606) [rt.jar:1.7.0_25]
at org.jboss.as.ejb3.inflow.MessageEndpointInvocationHandler.doInvoke(MessageEndpointInvocationHandler.java:142)
at org.jboss.as.ejb3.inflow.AbstractInvocationHandler.invoke(AbstractInvocationHandler.java:73)
at com.sun.proxy.$Proxy49.onMessage(Unknown Source)
at org.hornetq.ra.inflow.HornetQMessageHandler.onMessage(HornetQMessageHandler.java:311)
at org.hornetq.core.client.impl.ClientConsumerImpl.callOnMessage(ClientConsumerImpl.java:1033)
at org.hornetq.core.client.impl.ClientConsumerImpl.access$400(ClientConsumerImpl.java:50)
at org.hornetq.core.client.impl.ClientConsumerImpl$Runner.run(ClientConsumerImpl.java:1178)
at org.hornetq.utils.OrderedExecutorFactory$OrderedExecutor$1.run(OrderedExecutorFactory.java:100)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_25]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_25]
at java.lang.Thread.run(Thread.java:724) [rt.jar:1.7.0_25]
Caused by: org.jboss.byteman.rule.exception.ExecuteException: MethodExpression.interpret : exception invoking method traceln file TaskMDB.btm line 56
at org.jboss.byteman.rule.expression.MethodExpression.interpret(MethodExpression.java:353) [byteman.jar:]
at org.jboss.byteman.rule.Action.interpret(Action.java:144) [byteman.jar:]
at org.jboss.byteman.rule.helper.InterpretedHelper.fire(InterpretedHelper.java:169) [byteman.jar:]
at org.jboss.byteman.rule.helper.InterpretedHelper.execute0(InterpretedHelper.java:137) [byteman.jar:]
at org.jboss.byteman.rule.helper.InterpretedHelper.execute(InterpretedHelper.java:100) [byteman.jar:]
at org.jboss.byteman.rule.Rule.execute(Rule.java:684) [byteman.jar:]
at org.jboss.byteman.rule.Rule.execute(Rule.java:653) [byteman.jar:]
at insureworx.workflow.eventhandler.ejb.TaskEventHandlerMDB.processEvent(TaskEventHandlerMDB.java)
at insureworx.ejbservices.eventhandler.ejb.EventHandlerBase.onMessage(EventHandlerBase.java:126)
at sun.reflect.GeneratedMethodAccessor473.invoke(Unknown Source) [:1.7.0_25]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_25]
at java.lang.reflect.Method.invoke(Method.java:606) [rt.jar:1.7.0_25]
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.ejb3.component.invocationmetrics.ExecutionTimeInterceptor.processInvocation(ExecutionTimeInterceptor.java:43)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
at org.jboss.invocation.InitialInterceptor.processInvocation(InitialInterceptor.java:21)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)
at org.jboss.as.ee.component.interceptors.ComponentDispatcherInterceptor.processInvocation(ComponentDispatcherInterceptor.java:53)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
at org.jboss.as.ejb3.component.pool.PooledInstanceInterceptor.processInvocation(PooledInstanceInterceptor.java:51)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInCallerTx(CMTTxInterceptor.java:200)
... 38 more
Caused by: java.lang.ClassCastException: java.util.Date cannot be cast to java.lang.String
at org.jboss.byteman.rule.expression.PlusExpression.interpret(PlusExpression.java:75) [byteman.jar:]
at org.jboss.byteman.rule.expression.MethodExpression.interpret(MethodExpression.java:335) [byteman.jar:]
... 64 more