1 Reply Latest reply on Aug 23, 2001 4:53 PM by Marijan Vukcevich

    NoClassDefFoundError: javax/rmi/PortableRemoteObject

    raja Newbie

      hi! all,
      i am able to run build successfully for intro-interest-compile and other commands, but for client i am getting the following error,
      any suggestions please ...
      any classpath problem ???

      bash-2.03$ ant intro-interest-client
      Buildfile: build.xml

      validate:

      fail_if_not_valid:

      init:
      [echo] Using JBoss directory=/home/ankemr/JBoss-2.2.2_Tomcat-3.2.2/jboss
      [echo] Using base classpath=/home/ankemr/JBoss-2.2.2_Tomcat-3.2.2/jboss/client/ejb.jar:/home/ankemr/JBoss-2.2.2_Tomcat-3.2.2/jboss/client/jaas.jar:/home/ankemr/JBoss-2.2.2_Tomcat-3.2.2/jboss/client/jbosssx-client.jar:/home/ankemr/JBoss-2.2.2_Tomcat-3.2.2/jboss/client/jboss-client.jar:/home/ankemr/JBoss-2.2.2_Tomcat-3.2.2/jboss/client/jnp-client.jar:/home/ankemr/JBoss-2.2.2_Tomcat-3.2.2/tomcat/lib/servlet.jar
      [echo] Using Source directory=/home/ankemr/examples/examples
      [echo] Using Build directory=/home/ankemr/examples/examples/build-examples

      intro-interest-client:

      compile:

      interest-client:
      [java] Got context
      [java] Exception in thread "main" java.lang.NoClassDefFoundError: javax/rmi/PortableRemoteObject
      [java] Got reference
      [java] at org.jboss.docs.interest.InterestClient.main(InterestClient.java:35)
      [java] Java Result: 1

      BUILD SUCCESSFUL

      Total time: 3 seconds

      thank you in advance

        • 1. Deployment Error with Primary Key Class
          Marijan Vukcevich Newbie

          Hi guys,

          i hope someone can help me. If try to deploy my Bean, I get the following error:

          Bean : UnitMeasureDfn
          Method : public String ejbCreate(UnitMeasureValue) throws CreateException
          Section: 12.2.3
          Warning: The return type must be the entity bean's primary key type.
          
          18:19:32,285 WARN [verifier] EJB spec violation:
          Bean : UnitMeasureDfn
          Method : public String ejbFindByPrimaryKey(String) throws FinderException
          Section: 12.2.5
          Warning: The result type for the ejbFindByPrimaryKey method must be the primary key type.
          
          18:19:32,295 WARN [verifier] EJB spec violation:
          Bean : UnitMeasureDfn
          Method : public String ejbFindByPrimaryKey(String) throws FinderException
          Section: 12.2.5
          Warning: The ejbFindByPrimaryKey method must be a single-object finder.
          
          18:19:32,295 WARN [verifier] EJB spec violation:
          Bean : UnitMeasureDfn
          Method : public String ejbFindByPrimaryKey(String) throws FinderException
          Section: 12.2.5
          Warning: The return type of a finder method must be the entity bean's primary key type, or a collection of primary keys (see Specification Section 12.1.7)
          
          18:19:32,645 ERROR [MainDeployer] could not create deployment: file:/D:/jboss-3.2.5/server/all/deploy/DefecttrackMgr.jar
          org.jboss.deployment.DeploymentException: Verification of Enterprise Beans failed, see above for error messages.
           at org.jboss.ejb.EJBDeployer.create(EJBDeployer.java:517)
           at org.jboss.deployment.MainDeployer.create(MainDeployer.java:790)
           at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:644)
           at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:608)
           at sun.reflect.GeneratedMethodAccessor25.invoke(Unknown Source)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
           at java.lang.reflect.Method.invoke(Method.java:324)
           at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60)
           at org.jboss.mx.server.Invocation.dispatch(Invocation.java:61)
           at org.jboss.mx.server.Invocation.dispatch(Invocation.java:53)
           at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
           at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:185)
           at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
           at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
           at $Proxy7.deploy(Unknown Source)
           at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:304)
           at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:460)
           at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:201)
           at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:212)
           at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:191)
          


          But my Methods are definetly defined as:

          public UnitMeasurePK ejbCreate(UnitMeasureValue umVO) throws javax.ejb.CreateException
          
          public UnitMeasurePK ejbFindByPrimaryKey(com.motorola.cfcdefect.ejb.unit.UnitMeasurePK pk)throws javax.ejb.FinderException
          
          here the Primary keys:
          /**
           * @return Returns the unit_def_code.
           * @ejb.pk-field
           * @ejb.persistence
           * @ejb.interface-method
           */
           public String getUnit_def_code() {
           return unit_def_code;
           }
           /**
           * @param unit_def_code The unit_def_code to set.
           * @ejb.interface-method
           */
           public void setUnit_def_code(String unit_def_code) {
           this.unit_def_code = unit_def_code;
           }
          
           /**
           * @return Returns the wip_loc
           * @ejb.pk-field
           * @ejb.persistence
           * @ejb.interface-method
           */
           public String getWip_loc()
           {
           return wip_loc;
           }
          
           /**
           * @param wip_loc The wip_loc to set.
           * @ejb.interface-method
           */
           public void setWip_loc(String wip_loc)
           {
           this.wip_loc = wip_loc;
           }
          


          and my ejb-jar looks like this:
           <entity >
           <description><![CDATA[<!-- begin-user-doc --> Persistent Bean for '<em><b>UnitMeasureDfnBean</b></em>'.]]></description>
          
           <ejb-name>UnitMeasureDfn</ejb-name>
          
           <home>com.motorola.cfcdefect.ejb.unit.UnitMeasureDfnHome</home>
           <remote>com.motorola.cfcdefect.ejb.unit.UnitMeasureDfn</remote>
           <local-home>com.motorola.cfcdefect.ejb.unit.UnitMeasureDfnLocalHome</local-home>
           <local>com.motorola.cfcdefect.ejb.unit.UnitMeasureDfnLocal</local>
          
           <ejb-class>com.motorola.cfcdefect.ejb.unit.UnitMeasureDfnBMP</ejb-class>
           <persistence-type>Bean</persistence-type>
           <prim-key-class>com.motorola.cfcdefect.ejb.unit.UnitMeasurePK</prim-key-class>
           <reentrant>False</reentrant>
          
           <resource-ref >
           <res-ref-name>jdbc/OraPicassoDS</res-ref-name>
           <res-type>javax.sql.Datasource</res-type>
           <res-auth>Container</res-auth>
           </resource-ref>
          
           </entity>
          


          Can somebody help me please? Its urgent

          olcman