2 Replies Latest reply on Dec 16, 2002 8:56 AM by Volkmar

    Sun: 1, JBoss: 0 or: the joys of porting J2EE apps

    Volkmar Newbie

      Hello JBoss experts,

      I REALLY need your help with a connection-related problem.
      The problem: I have coded an application using Sun's Reference Implementation server,
      and have (since completion) ported, or tried to port, this to JBoss.
      After having successfully navigated the depths of scylla and caryptis (read: jboss.xml
      and oracle-service.xml/login-config.xml) I can deploy my application on jboss 3.0.0,
      3.0.3, 3.0.4 and 3.2.0 beta2. There are no error messages on deployment, but there are
      errors when starting up the GUI client.
      The point where it repeatably fails is when I load up or create new bean 'A', and then from
      bean 'A' try to (never goes trough) create or load up bean B.
      These two beans are BMP EJBs; the first bean is instantiated by retrieving the primary key
      (Integer) from a stateless session bean, which then passes that integer to the GUI, which then
      instantiates the first bean (bean 'A').
      I have given unchecked permissions throughout the app, and all the transaction attributes are
      set to 'required'.
      The strange thing is this: according to which version of JBoss I run this on, I get different
      error messages regarding the instantiation (or attempt thereof, rather...) of the second bean.
      The most frustrating thing of all: this app runs with no problems whatsoever on Sun's Reference
      Implementation, and I'd hate to settle on a score of Sun: 1, JBoss: 0
      The setup and error message:
      JBoss 3.2.0beta2
      Oracle 9i, Release 2

      13:25:31,274 WARN [StatelessSessionEnterpriseContext] no match found for security role Admin in the deployment descriptor.
      13:26:03,028 ERROR [STDERR] Customer Bean Set Entity called: Mon Dec 16 13:26:03 CET 2002
      13:26:04,430 ERROR [STDERR] Customer Bean Set Entity called: Mon Dec 16 13:26:04 CET 2002
      13:26:28,166 ERROR [STDERR] SQLException in OrderBean.storeOrder
      13:26:28,166 ERROR [STDERR] Connection handle is not currently associated with a ManagedConnection
      13:26:28,171 ERROR [LogInterceptor] EJBException, causedBy:
      java.sql.SQLException: Connection handle is not currently associated with a ManagedConnection
      at org.jboss.resource.adapter.jdbc.WrappedConnection.checkStatus(WrappedConnection.java:774)
      at org.jboss.resource.adapter.jdbc.WrappedConnection.prepareStatement(WrappedConnection.java:188)
      at Beans.OrderBean.storeOrder(OrderBean.java:451)
      at Beans.OrderBean.ejbStore(OrderBean.java:120)
      at sun.reflect.GeneratedMethodAccessor46.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.ejb.plugins.BMPPersistenceManager.storeEntity(BMPPersistenceManager.java:472)
      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.storeEntity(CachedConnectionInterceptor.java:388)
      at org.jboss.ejb.EntityContainer.storeEntity(EntityContainer.java:700)
      at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invoke(EntitySynchronizationInterceptor.java:332)
      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:186)
      at org.jboss.ejb.plugins.EntityReentranceInterceptor.invoke(EntityReentranceInterceptor.java:91)
      at org.jboss.ejb.plugins.EntityInstanceInterceptor.invoke(EntityInstanceInterceptor.java:163)
      at org.jboss.ejb.plugins.EntityLockInterceptor.invoke(EntityLockInterceptor.java:107)
      at org.jboss.ejb.plugins.EntityCreationInterceptor.invoke(EntityCreationInterceptor.java:69)
      at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:108)
      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:210)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:101)
      at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:130)
      at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:206)
      at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:154)
      at org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:481)
      at org.jboss.ejb.Container.invoke(Container.java:680)
      at org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:1026)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
      at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:340)
      at sun.reflect.GeneratedMethodAccessor45.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
      at sun.rmi.transport.Transport$1.run(Transport.java:148)
      at java.security.AccessController.doPrivileged(Native Method)
      at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
      at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
      at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
      at java.lang.Thread.run(Thread.java:536)

      I also have no idea why it is giving me that warning about the security role not found...
      I have a method in my client which displays the role associated with the login details, and it
      correctly displays the role name.
      Can anyone please help guide me in the right direction ?!? I have no idea how to approach this problem,
      or where to investigate first: oracle connection pooling, user authentication, ejb-jar.xml tags,
      bean code... *sniff*
      Anyone ?

      Thanks in advance


      P.S. If you need to see code/config files, I'll be more than glad to post these !

        • 1. Re: Sun: 1, JBoss: 0 or: the joys of porting J2EE apps

          You get this:

          3:25:31,274 WARN [StatelessSessionEnterpriseContext] no match found for security role Admin in the deployment descriptor.

          if you ejb-jar is missing this:


          • 2. Re: Sun: 1, JBoss: 0 or: the joys of porting J2EE apps
            Volkmar Newbie

            Hi Juha,

            Kitos for your quick response. (I hope that was the correct spelling ?) This is what's puzzling me: my deployment descriptor
            has the following:

            The Administrator role


            So the tag is definitely there... I can'T remember right now whether the assembly-descriptor is not supposed to have the method persmiisions inside it too, but I think that JBoss would have told me if the ejb-jar.xml had been malformed...

            I'm still looking into it...
            Not much progress though...