4 Replies Latest reply on Mar 14, 2002 7:17 AM by g_babu

    Problem in JBoss invoking bean constuctors?

    g_babu

      Hello,
      I have an abstract base class that provides default impl for all ejbXXX methods. My bean extends this class and I get exception when I call business methods. But when my bean does not extend the base class it works fine. Is this a known problem? Thanks

      java.lang.NoSuchMethodError
      at net.infosim.stablenet.svc.impl.SessionAdapter.(Unknown Source)
      at net.infosim.stablenet.svc.impl.core.key.KeySvcBean.(Unknown Source)
      at java.lang.Class.newInstance0(Native Method)
      at java.lang.Class.newInstance(Class.java:237)
      at org.jboss.ejb.Container.createBeanClassInstance(Container.java:363)
      at org.jboss.ejb.plugins.AbstractInstancePool.get(AbstractInstancePool.java:153)
      at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:59)
      at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:98)
      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:156)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:65)
      at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:131)
      at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:166)
      at org.jboss.ejb.StatelessSessionContainer.invoke(StatelessSessionContainer.java:280)
      at org.jboss.ejb.Container.invoke(Container.java:528)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
      at org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invoke(JRMPContainerInvoker.java:411)
      at java.lang.reflect.Method.invoke(Native Method)
      at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:241)
      at sun.rmi.transport.Transport$1.run(Transport.java:152)
      at java.security.AccessController.doPrivileged(Native Method)
      at sun.rmi.transport.Transport.serviceCall(Transport.java:148)
      at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:465)
      at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:706)
      at java.lang.Thread.run(Thread.java:484)
      [2002-03-13 15:30:14,180,StatelessSessionContainer,ERROR] invoke returned an exception
      javax.transaction.TransactionRolledbackException: null; nested exception is:
      java.lang.NoSuchMethodError
      java.lang.NoSuchMethodError
      at net.infosim.stablenet.svc.impl.SessionAdapter.(Unknown Source)
      at net.infosim.stablenet.svc.impl.core.key.KeySvcBean.(Unknown Source)
      at java.lang.Class.newInstance0(Native Method)
      at java.lang.Class.newInstance(Class.java:237)
      at org.jboss.ejb.Container.createBeanClassInstance(Container.java:363)
      at org.jboss.ejb.plugins.AbstractInstancePool.get(AbstractInstancePool.java:153)
      at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:59)
      at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:98)
      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:156)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:65)
      at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:131)
      at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:166)
      at org.jboss.ejb.StatelessSessionContainer.invoke(StatelessSessionContainer.java:280)
      at org.jboss.ejb.Container.invoke(Container.java:528)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
      at org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invoke(JRMPContainerInvoker.java:411)
      at java.lang.reflect.Method.invoke(Native Method)
      at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:241)
      at sun.rmi.transport.Transport$1.run(Transport.java:152)
      at java.security.AccessController.doPrivileged(Native Method)
      at sun.rmi.transport.Transport.serviceCall(Transport.java:148)
      at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:465)
      at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:706)
      at java.lang.Thread.run(Thread.java:484)
      [2002-03-13 15:33:11,259,EnterpriseContextCachePolicy,DEBUG] Resized cache for bean KeyEntityBean: old capacity = 1000, new capacity = 50

        • 1. Re: Problem in JBoss invoking bean constuctors?

          Have you compiled over one version of the abstract
          class and deployed a different version?

          Regards,
          Adrian

          • 2. Re: Problem in JBoss invoking bean constuctors?
            g_babu

            Noop. I double checked it before posting the message. The problem seems to be calling the base class's default constructor. Thanks

            Ganesh

            • 3. Re: Problem in JBoss invoking bean constuctors?

              Weird,

              Can you post the code?
              Have you tried making the default constructor
              explicit? I normally do this just so I can javadoc it.

              Regards,
              Adrian

              • 4. Re: Problem in JBoss invoking bean constuctors?
                g_babu

                Hello Adrian,
                Thanks for the reply. I have narrowed down the problem to ResourceBundle. I have a bundle.properties which is in the same pkg as bean class. I try to get the bundle in the setSessionContext method. It is not finding the bundle. Why? Thanks

                Ganesh

                Here is the stack trace,

                java.rmi.ServerException: Can't find bundle for base name net.infosim.stablenet.svc.impl.core.key.Bundle, locale en_US; nested exception is:
                java.util.MissingResourceException: Can't find bundle for base name net.infosim.stablenet.svc.impl.core.key.Bundle, locale en_US
                java.util.MissingResourceException: Can't find bundle for base name net.infosim.stablenet.svc.impl.core.key.Bundle, locale en_US
                at java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:712)
                at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:683)
                at java.util.ResourceBundle.getBundle(ResourceBundle.java:559)
                at net.infosim.stablenet.svc.impl.core.key.TestBean.setSessionContext(Unknown Source)
                at org.jboss.ejb.StatelessSessionEnterpriseContext.(StatelessSessionEnterpriseContext.java:48)
                at org.jboss.ejb.plugins.StatelessSessionInstancePool.create(StatelessSessionInstancePool.java:63)
                at org.jboss.ejb.plugins.AbstractInstancePool.get(AbstractInstancePool.java:153)
                at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:59)
                at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:98)
                at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:156)
                at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:65)
                at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:131)
                at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:166)
                at org.jboss.ejb.StatelessSessionContainer.invoke(StatelessSessionContainer.java:280)
                at org.jboss.ejb.Container.invoke(Container.java:528)
                at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
                at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
                at org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invoke(JRMPContainerInvoker.java:411)
                at java.lang.reflect.Method.invoke(Native Method)
                at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:241)
                at sun.rmi.transport.Transport$1.run(Transport.java:152)
                at java.security.AccessController.doPrivileged(Native Method)
                at sun.rmi.transport.Transport.serviceCall(Transport.java:148)
                at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:465)
                at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:706)
                at java.lang.Thread.run(Thread.java:484)
                [2002-03-14 13:09:43,973,EnterpriseContextCachePolicy,DEBUG] Resized cache for bean KeyEntityBean: old capacity = 1000, new capacity = 50