3 Replies Latest reply on Feb 15, 2002 1:15 PM by Gary A. Clark

    How do I attack a InstantiationException on a finder?

    Gary A. Clark Newbie

      I'm attempting to configure JBoss (2.4.3) to talk to our legacy application (Progress database) and am having some problems. The Progress logfile indicates that JBoss is connected, however any finder (I've tried findByPrimaryKey and findAll) fail.

      To make matters more complicated, I'm trying to configure our development environment (TogetherSoft ControlCenter) to do all of the work to create a CMB entity bean.


      This is one of the snippits I'm testing with. In this case, the findAll is the cause of the exception.

      Object objref = initial.lookup("testing.UsersBean");
      UsersHome home =
      (UsersHome) PortableRemoteObject.narrow(objref,
      UsersHome.class);
      Collection c = home.findAll();
      System.out.println(c.size());
      )

      Here is the stack trace from JBoss.

      [UsersBean 02-14 10:48:21] TRANSACTION ROLLBACK EXCEPTION:Could not instantiate bean; nested exception is:
      java.lang.InstantiationException: testing.UsersBean; nested exception is:
      java.rmi.ServerException: Could not instantiate bean; nested exception is:
      java.lang.InstantiationException: testing.UsersBean
      [UsersBean 02-14 10:48:21] java.rmi.ServerException: Could not instantiate bean; nested exception is:
      [UsersBean 02-14 10:48:21] java.lang.InstantiationException: testing.UsersBean
      [UsersBean 02-14 10:48:21] java.lang.InstantiationException: testing.UsersBean
      [UsersBean 02-14 10:48:21] at java.lang.Class.newInstance0(Native Method)
      [UsersBean 02-14 10:48:21] at java.lang.Class.newInstance(Class.java:237)
      [UsersBean 02-14 10:48:21] at org.jboss.ejb.Container.createBeanClassInstance(Container.java:159)
      [UsersBean 02-14 10:48:21] at org.jboss.ejb.plugins.AbstractInstancePool.get(AbstractInstancePool.java:143)
      [UsersBean 02-14 10:48:21] at org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(EntityInstanceInterceptor.java:143)
      [UsersBean 02-14 10:48:21] at org.jboss.ejb.plugins.EntityLockInterceptor.invokeHome(EntityLockInterceptor.java:108)
      [UsersBean 02-14 10:48:21] at org.jboss.ejb.plugins.TxInterceptorCMT.invokeNext(TxInterceptorCMT.java:135)
      [UsersBean 02-14 10:48:21] at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:307)
      [UsersBean 02-14 10:48:21] at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:86)
      [UsersBean 02-14 10:48:21] at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:103)
      [UsersBean 02-14 10:48:21] at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:106)
      [UsersBean 02-14 10:48:21] at org.jboss.ejb.EntityContainer.invokeHome(EntityContainer.java:420)
      [UsersBean 02-14 10:48:21] at org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invokeHome(JRMPContainerInvoker.java:372)
      [UsersBean 02-14 10:48:21] at java.lang.reflect.Method.invoke(Native Method)
      [UsersBean 02-14 10:48:21] at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:241)
      [UsersBean 02-14 10:48:21] at sun.rmi.transport.Transport$1.run(Transport.java:152)
      [UsersBean 02-14 10:48:21] at java.security.AccessController.doPrivileged(Native Method)
      [UsersBean 02-14 10:48:21] at sun.rmi.transport.Transport.serviceCall(Transport.java:148)
      [UsersBean 02-14 10:48:21] at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:465)
      [UsersBean 02-14 10:48:21] at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:706)
      [UsersBean 02-14 10:48:21] at java.lang.Thread.run(Thread.java:484)


      Sorry, but this is all the information I have to go on. Anyone have an idea as to what is going on or know how to get the container to print out a little more information as to why it cannot create the bean instance?

      TIA,
      Gary Clark
      Senior Programmer
      JELD-WEN, inc.