1 Reply Latest reply on Oct 4, 2002 3:57 PM by Adrian Brock

    I meet "java.lang.InstantiationException" when i try cmp 2.0

    kk Newbie

      i deployed a cmp then use jsp to test it.
      it throw error

      2002-10-04 14:08:11,000 ERROR [org.jboss.ejb.plugins.LogInterceptor] EJBException, causedBy:
      java.lang.InstantiationException
      at sun.reflect.InstantiationExceptionConstructorAccessorImpl.newInstance(InstantiationExceptionConstructorAccessorImpl.java:30)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
      at java.lang.Class.newInstance0(Class.java:296)
      at java.lang.Class.newInstance(Class.java:249)
      at org.jboss.ejb.plugins.jaws.JAWSPersistenceManager.createBeanClassInstance(JAWSPersistenceManager.java:165)
      at org.jboss.ejb.plugins.CMPPersistenceManager.createBeanClassInstance(CMPPersistenceManager.java:165)
      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.createBeanClassInstance(CachedConnectionInterceptor.java:251)
      at org.jboss.ejb.EntityContainer.createBeanClassInstance(EntityContainer.java:294)
      at org.jboss.ejb.plugins.AbstractInstancePool.get(AbstractInstancePool.java:209)
      at org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(EntityInstanceInterceptor.java:76)
      at org.jboss.ejb.plugins.EntityLockInterceptor.invokeHome(EntityLockInterceptor.java:79)
      at org.jboss.ejb.plugins.EntityCreationInterceptor.invokeHome(EntityCreationInterceptor.java:44)
      at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:111)
      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:178)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:52)
      at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:105)
      at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:129)
      at org.jboss.ejb.EntityContainer.invokeHome(EntityContainer.java:487)
      at org.jboss.ejb.Container.invoke(Container.java:730)
      at org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:1058)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
      at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:98)
      at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:102)
      at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:77)
      at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:80)
      at org.jboss.proxy.ejb.HomeInterceptor.invoke(HomeInterceptor.java:198)
      at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:76)
      at $Proxy925.create(Unknown Source)
      at org.apache.jsp.testCmp$jsp._jspService(testCmp$jsp.java:95)
      at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:201)
      at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
      at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:366)
      at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:284)
      at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:577)
      at org.mortbay.http.HttpContext.handle(HttpContext.java:1674)
      at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:544)
      at org.mortbay.http.HttpContext.handle(HttpContext.java:1624)
      at org.mortbay.http.HttpServer.service(HttpServer.java:875)
      at org.jboss.jetty.Jetty.service(Jetty.java:541)
      at org.mortbay.http.HttpConnection.service(HttpConnection.java:785)
      at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:935)
      at org.mortbay.http.HttpConnection.handle(HttpConnection.java:802)
      at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:200)
      at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:294)
      at org.mortbay.util.ThreadPool$JobRunner.run(ThreadPool.java:743)
      at java.lang.Thread.run(Thread.java:536)


      ==========================================================
      my config is
      ejb-jar.xml

      <ejb-name>CustomerEJB</ejb-name>
      com.gdb.app.sample.ejb.CustomerHomeRemote
      com.gdb.app.sample.ejb.CustomerRemote
      <ejb-class>com.gdb.app.sample.ejb.CustomerBean</ejb-class>
      <persistence-type>Container</persistence-type>
      <prim-key-class>java.lang.Integer</prim-key-class>
      False
      <cmp-version>2.x</cmp-version>
      <abstract-schema-name>Customer</abstract-schema-name>
      <cmp-field><field-name>id</field-name></cmp-field>
      <cmp-field><field-name>lastName</field-name></cmp-field>
      <cmp-field><field-name>firstName</field-name></cmp-field>
      <primkey-field>id</primkey-field>
      <security-identity><use-caller-identity/></security-identity>