0 Replies Latest reply on Aug 1, 2002 5:04 AM by tdang

    Is it a bug?

    tdang

      Hi!

      I am using JBoss 3.0 final. I have a class like this:

      public class Helper {

      private int size;

      public Helper() {
      this(0);
      }

      public Helper(int size) {
      this.size = size;
      }
      ...
      }


      I use this class in a CMP 2.0 bean in this way:

      public abstract class MyBean implements EntityBean {
      ...
      protected Helper help = new Helper();
      ...
      }

      While deployment I got the following error:

      2002-08-01 09:54:54,484 ERROR [org.jboss.ejb.EjbModule] Initialization failed
      org.jboss.util.NestedRuntimeException: Failed to create new proxy target; - nested throwable: (java.lang.reflect.InvocationTargetException)
      at org.jboss.proxy.compiler.Proxy.newProxyInstance(Proxy.java:52)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCCreateBeanClassInstanceCommand.(JDBCCreateBeanClassInstanceCommand.java:52)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCCommandFactory.createCreateBeanClassInstanceCommand(JDBCCommandFactory.java:97)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.create(JDBCStoreManager.java:357)
      at org.jboss.ejb.plugins.CMPPersistenceManager.create(CMPPersistenceManager.java:155)
      at org.jboss.ejb.EntityContainer.create(EntityContainer.java:337)
      ...

      at java.lang.Thread.run(Thread.java:479)
      + nested throwable:
      java.lang.reflect.InvocationTargetException:
      java.lang.NoSuchMethodError: Helper: method ()V not found
      at MyBean.(MyBean.java:21)



      Instead of using: protected Helper help = new Helper(), I use protected Helper help = new Helper(10), I have no problem. Why that?

      Every commemts are welcome.