4 Replies Latest reply on Sep 27, 2004 9:33 AM by Angelo Immediata

    JBoss Ejb error

    Angelo Immediata Newbie

      Hi all! I'm newbie in JBoss...
      I have read the JAAS howto tutorial but i have some problems... I have an EJB (WorkflowEngine WE) that is in a secure-domain called danetworkflow; i have created a new EJB (Message Driven Bean MDB) that is tring to call WE.. since they weren't in the same security-domain i had an exception (Principal=null); now i have modified my ejb-jar.xml file and my jboss.xml, i post them:

      JBoss.xml:

      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE jboss PUBLIC "-//JBoss//DTD JBOSS 3.0//EN" "http://www.jboss.org/j2ee/dtd/jboss_3_0.dtd">

      <jboss>

      <security-domain>java:/jaas/danetworkflow</security-domain>
      <enterprise-beans>

      <!--
      To add beans that you have deployment descriptor info for, add
      a file to your XDoclet merge directory called jboss-beans.xml that contains
      the <session></session>, <entity></entity> and <message-driven></message-driven>
      markup for those beans.
      -->

      <message-driven>
      <ejb-name>BbkCmdRcvBean</ejb-name>
      <destination-jndi-name>queue/BBkEvtMgrQueue</destination-jndi-name>
      </message-driven>

      </enterprise-beans>

      <resource-managers>
      </resource-managers>

      </jboss>


      ejb-jar.xml:
      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">

      <ejb-jar >

      <description><![CDATA[No Description.]]></description>
      <display-name>Generated by XDoclet</display-name>

      <enterprise-beans>

      <!-- Session Beans -->
      <!--
      To add session beans that you have deployment descriptor info for, add
      a file to your XDoclet merge directory called session-beans.xml that contains
      the <session></session> markup for those beans.
      -->

      <!-- Entity Beans -->
      <!--
      To add entity beans that you have deployment descriptor info for, add
      a file to your XDoclet merge directory called entity-beans.xml that contains
      the <entity></entity> markup for those beans.
      -->

      <!-- Message Driven Beans -->
      <message-driven >
      <description><![CDATA[<!-- begin-user-doc --> You can insert your documentation for '<em><b>BbkCmdRcvBean</b></em>'.]]></description>

      <ejb-name>BbkCmdRcvBean</ejb-name>

      <ejb-class>com.bbk.evtmgr.ejbs.BbkCmdRcvBean</ejb-class>

      <transaction-type>Container</transaction-type>
      <acknowledge-mode>Auto-acknowledge</acknowledge-mode>
      <message-driven-destination>
      <destination-type>javax.jms.Queue</destination-type>
      </message-driven-destination>
      <security-identity>
      <run-as>
      <role-name>StaffManagementRole_0</role-name>
      </run-as>
      </security-identity>

      </message-driven>

      <!--
      To add message driven beans that you have deployment descriptor info for, add
      a file to your XDoclet merge directory called message-driven-beans.xml that contains
      the <message-driven></message-driven> markup for those beans.
      -->

      </enterprise-beans>

      <!-- Relationships -->

      <!-- Assembly Descriptor -->
      <assembly-descriptor >
      <!--
      To add additional assembly descriptor info here, add a file to your
      XDoclet merge directory called assembly-descriptor.xml that contains
      the <assembly-descriptor></assembly-descriptor> markup.
      -->

      <!-- finder permissions -->
      <method-permission >
      <description><![CDATA[description not supported yet by ejbdoclet]]></description>
      <role-name>StaffManagementRole_0</role-name>
      <method >
      <description><![CDATA[description not supported yet by ejbdoclet]]></description>
      <ejb-name>BbkCmdRcvBean</ejb-name>
      <method-name>*</method-name>
      </method>
      </method-permission>
      <!-- transactions -->

      <!-- finder transactions -->
      <container-transaction >
      <method >
      <ejb-name>BbkCmdRcvBean</ejb-name>
      <method-name>*</method-name>
      </method>
      <trans-attribute>Required</trans-attribute>
      </container-transaction>
      </assembly-descriptor>

      </ejb-jar>

      Even if i have done this i have this exception:

      12:39:31,187 INFO [STDOUT] Message Driven Bean got message org.jboss.mq.SpyObjectMessage {
      Header {
      jmsDestination : QUEUE.BBkEvtMgrQueue
      jmsDeliveryMode : 2
      jmsExpiration : 0
      jmsPriority : 4
      jmsMessageID : ID:13-10960223709261
      jmsTimeStamp : 1096022370926
      jmsCorrelationID: null
      jmsReplyTo : null
      jmsType : null
      jmsRedelivered : true
      jmsProperties : {JMS_JBOSS_REDELIVERY_COUNT=5}
      jmsPropReadWrite: false
      msgReadOnly : true
      producerClientId: ID:13
      }
      }
      12:39:31,187 ERROR [LogInterceptor] TransactionRolledbackException in method: public abstract de.danet.an.workflow.ejbs.WorkflowEngine de.danet.an.workflow.ejbs.WorkflowEngineHome.create() throws javax.ejb.CreateException,java.rmi.RemoteException, causedBy:
      javax.ejb.EJBException: Invalid invocation, check your deployment packaging, method=public abstract de.danet.an.workflow.ejbs.WorkflowEngine de.danet.an.workflow.ejbs.WorkflowEngineHome.create() throws javax.ejb.CreateException,java.rmi.RemoteException
      at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invokeHome(StatelessSessionContainer.java:632)
      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invokeHome(CachedConnectionInterceptor.java:205)
      at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invokeHome(StatelessSessionInstanceInterceptor.java:51)
      at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:88)
      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:315)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:128)
      at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:94)
      at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:120)
      at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invokeHome(ProxyFactoryFinderInterceptor.java:93)
      at org.jboss.ejb.StatelessSessionContainer.internalInvokeHome(StatelessSessionContainer.java:319)
      at org.jboss.ejb.Container.invoke(Container.java:743)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:61)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:53)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:185)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
      at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:97)
      at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:90)
      at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:46)
      at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:53)
      at org.jboss.proxy.ejb.HomeInterceptor.invoke(HomeInterceptor.java:173)
      at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:85)
      at $Proxy161.create(Unknown Source)
      at de.danet.an.workflow.ejbs.client.StandardWorkflowServiceFactory.newWorkflowService(StandardWorkflowServiceFactory.java:206)
      at com.bbk.evtmgr.ejbs.BbkCmdRcvBean.onMessage(BbkCmdRcvBean.java:156)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.ejb.MessageDrivenContainer$ContainerInterceptor.invoke(MessageDrivenContainer.java:458)
      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:185)
      at org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor.invoke(MessageDrivenInstanceInterceptor.java:62)
      at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:84)
      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:315)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:148)
      at org.jboss.ejb.plugins.RunAsSecurityInterceptor.invoke(RunAsSecurityInterceptor.java:90)
      at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
      at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
      at org.jboss.ejb.MessageDrivenContainer.internalInvoke(MessageDrivenContainer.java:372)
      at org.jboss.ejb.Container.invoke(Container.java:723)
      at org.jboss.ejb.plugins.jms.JMSContainerInvoker.invoke(JMSContainerInvoker.java:914)
      at org.jboss.ejb.plugins.jms.JMSContainerInvoker$MessageListenerImpl.onMessage(JMSContainerInvoker.java:1208)
      at org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:276)
      at org.jboss.mq.SpyMessageConsumer.sessionConsumerProcessMessage(SpyMessageConsumer.java:871)
      at org.jboss.mq.SpyMessageConsumer.addMessage(SpyMessageConsumer.java:159)
      at org.jboss.mq.SpySession.run(SpySession.java:347)
      at org.jboss.jms.asf.StdServerSession.run0(StdServerSession.java:200)
      at org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:180)
      at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:748)
      at java.lang.Thread.run(Thread.java:534)
      12:39:31,197 INFO [STDOUT] [StandardWorkflowServiceFactory,ERROR] Invalid invocation, check your deployment packaging, method=public abstract de.danet.an.workflow.ejbs.WorkflowEngine de.danet.an.workflow.ejbs.WorkflowEngineHome.create() throws javax.ejb.CreateException,java.rmi.RemoteException; nested exception is:
      javax.ejb.EJBException: Invalid invocation, check your deployment packaging, method=public abstract de.danet.an.workflow.ejbs.WorkflowEngine de.danet.an.workflow.ejbs.WorkflowEngineHome.create() throws javax.ejb.CreateException,java.rmi.RemoteException
      javax.transaction.TransactionRolledbackException: Invalid invocation, check your deployment packaging, method=public abstract de.danet.an.workflow.ejbs.WorkflowEngine de.danet.an.workflow.ejbs.WorkflowEngineHome.create() throws javax.ejb.CreateException,java.rmi.RemoteException; nested exception is:
      javax.ejb.EJBException: Invalid invocation, check your deployment packaging, method=public abstract de.danet.an.workflow.ejbs.WorkflowEngine de.danet.an.workflow.ejbs.WorkflowEngineHome.create() throws javax.ejb.CreateException,java.rmi.RemoteException
      at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:214)
      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:315)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:128)
      at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:94)
      at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:120)
      at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invokeHome(ProxyFactoryFinderInterceptor.java:93)
      at org.jboss.ejb.StatelessSessionContainer.internalInvokeHome(StatelessSessionContainer.java:319)
      at org.jboss.ejb.Container.invoke(Container.java:743)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:61)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:53)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:185)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
      at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:97)
      at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:90)
      at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:46)
      at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:53)
      at org.jboss.proxy.ejb.HomeInterceptor.invoke(HomeInterceptor.java:173)
      at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:85)
      at $Proxy161.create(Unknown Source)
      at de.danet.an.workflow.ejbs.client.StandardWorkflowServiceFactory.newWorkflowService(StandardWorkflowServiceFactory.java:206)
      at com.bbk.evtmgr.ejbs.BbkCmdRcvBean.onMessage(BbkCmdRcvBean.java:156)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.ejb.MessageDrivenContainer$ContainerInterceptor.invoke(MessageDrivenContainer.java:458)
      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:185)
      at org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor.invoke(MessageDrivenInstanceInterceptor.java:62)
      at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:84)
      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:315)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:148)
      at org.jboss.ejb.plugins.RunAsSecurityInterceptor.invoke(RunAsSecurityInterceptor.java:90)
      at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
      at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
      at org.jboss.ejb.MessageDrivenContainer.internalInvoke(MessageDrivenContainer.java:372)
      at org.jboss.ejb.Container.invoke(Container.java:723)
      at org.jboss.ejb.plugins.jms.JMSContainerInvoker.invoke(JMSContainerInvoker.java:914)
      at org.jboss.ejb.plugins.jms.JMSContainerInvoker$MessageListenerImpl.onMessage(JMSContainerInvoker.java:1208)
      at org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:276)
      at org.jboss.mq.SpyMessageConsumer.sessionConsumerProcessMessage(SpyMessageConsumer.java:871)
      at org.jboss.mq.SpyMessageConsumer.addMessage(SpyMessageConsumer.java:159)
      at org.jboss.mq.SpySession.run(SpySession.java:347)
      at org.jboss.jms.asf.StdServerSession.run0(StdServerSession.java:200)
      at org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:180)
      at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:748)
      at java.lang.Thread.run(Thread.java:534)
      Caused by: javax.ejb.EJBException: Invalid invocation, check your deployment packaging, method=public abstract de.danet.an.workflow.ejbs.WorkflowEngine de.danet.an.workflow.ejbs.WorkflowEngineHome.create() throws javax.ejb.CreateException,java.rmi.RemoteException
      at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invokeHome(StatelessSessionContainer.java:632)
      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invokeHome(CachedConnectionInterceptor.java:205)
      at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invokeHome(StatelessSessionInstanceInterceptor.java:51)
      at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:88)
      ... 51 more
      12:39:31,197 ERROR [BbkCmdRcvBean] com.bbk.evtmgr.ejbs.BbkCmdRcvBean
      de.danet.an.workflow.api.FactoryConfigurationError: Cannot create WorkflowEngineEJB: Invalid invocation, check your deployment packaging, method=public abstract de.danet.an.workflow.ejbs.WorkflowEngine de.danet.an.workflow.ejbs.WorkflowEngineHome.create() throws javax.ejb.CreateException,java.rmi.RemoteException; nested exception is:
      javax.ejb.EJBException: Invalid invocation, check your deployment packaging, method=public abstract de.danet.an.workflow.ejbs.WorkflowEngine de.danet.an.workflow.ejbs.WorkflowEngineHome.create() throws javax.ejb.CreateException,java.rmi.RemoteException
      at de.danet.an.workflow.ejbs.client.StandardWorkflowServiceFactory.newWorkflowService(StandardWorkflowServiceFactory.java:220)
      at com.bbk.evtmgr.ejbs.BbkCmdRcvBean.onMessage(BbkCmdRcvBean.java:156)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.ejb.MessageDrivenContainer$ContainerInterceptor.invoke(MessageDrivenContainer.java:458)
      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:185)
      at org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor.invoke(MessageDrivenInstanceInterceptor.java:62)
      at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:84)
      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:315)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:148)
      at org.jboss.ejb.plugins.RunAsSecurityInterceptor.invoke(RunAsSecurityInterceptor.java:90)
      at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
      at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
      at org.jboss.ejb.MessageDrivenContainer.internalInvoke(MessageDrivenContainer.java:372)
      at org.jboss.ejb.Container.invoke(Container.java:723)
      at org.jboss.ejb.plugins.jms.JMSContainerInvoker.invoke(JMSContainerInvoker.java:914)
      at org.jboss.ejb.plugins.jms.JMSContainerInvoker$MessageListenerImpl.onMessage(JMSContainerInvoker.java:1208)
      at org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:276)
      at org.jboss.mq.SpyMessageConsumer.sessionConsumerProcessMessage(SpyMessageConsumer.java:871)
      at org.jboss.mq.SpyMessageConsumer.addMessage(SpyMessageConsumer.java:159)
      at org.jboss.mq.SpySession.run(SpySession.java:347)
      at org.jboss.jms.asf.StdServerSession.run0(StdServerSession.java:200)
      at org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:180)
      at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:748)
      at java.lang.Thread.run(Thread.java:534)
      12:39:31,197 INFO [STDOUT] Finishing onMessage