5 Replies Latest reply on Mar 19, 2004 1:54 PM by alanc_yang

    why java.rmi.StubNotfoundException was thrown

    alanc_yang Newbie

      How the stub code suppose to be generated for xmbean client/server to work? The following is straight out of the sample provided with the doc that encountered the issue that it cannot find the stub class. How to solve this problem?

      Thanks in advance.
      Alan

      -------------------------

      C:\examples>ant -Dchap=chap2 -Dex=xmbean1 run-example
      Buildfile: build.xml

      validate:
      [java] ImplementationTitle: JBoss [WonderLand]
      [java] ImplementationVendor: JBoss.org
      [java] ImplementationVersion: 3.2.3 (build: CVSTag=JBoss_3_2_3 date=200402110851)
      [java] SpecificationTitle: JBoss
      [java] SpecificationVendor: JBoss (http://www.jboss.org/)
      [java] SpecificationVersion: 3.2.3
      [java] JBoss version is: 3.2.3



      fail_if_not_valid:

      init:
      [echo] Using jboss.dist=r:\

      compile:

      run-example:

      prepare:

      chap2-ex1xmbean1-sar:

      run-examplexmbean1:
      [java] JNDIMap Class: org.jboss.mx.modelmbean.XMBean
      [java] JNDIMap Operations:
      [java] + void start()
      [java] + void stop()
      [java] + void put(java.lang.Object chap2.xmbean:service=JNDIMap,java.lang.Object cha
      p2.xmbean:service=JNDIMap)
      [java] + java.lang.Object get(java.lang.Object chap2.xmbean:service=JNDIMap)
      [java] + java.lang.String getJndiName()
      [java] + void setJndiName(java.lang.String chap2.xmbean:service=JNDIMap)
      [java] + [Ljava.lang.String; getInitialValues()
      [java] + void setInitialValues([Ljava.lang.String; chap2.xmbean:service=JNDIMap)
      [java] java.rmi.StubNotFoundException: Stub class not found: org.jboss.chap2.xmbean.T
      estXMBean1$Listener_Stub; nested exception is:
      [java] java.lang.ClassNotFoundException: org.jboss.chap2.xmbean.TestXMBean1$Liste
      ner_Stub
      [java] at sun.rmi.server.RemoteProxy.getStub(RemoteProxy.java:98)
      [java] at sun.rmi.server.RemoteProxy.getStub(RemoteProxy.java:55)
      [java] at sun.rmi.server.UnicastServerRef.setSkeleton(UnicastServerRef.java:179)
      [java] at sun.rmi.server.UnicastServerRef.exportObject(UnicastServerRef.java:142)

      [java] at sun.rmi.server.UnicastServerRef.exportObject(UnicastServerRef.java:129)

      [java] at java.rmi.server.UnicastRemoteObject.exportObject(UnicastRemoteObject.ja
      va:275)
      [java] at java.rmi.server.UnicastRemoteObject.exportObject(UnicastRemoteObject.ja
      va:178)
      [java] at java.rmi.server.UnicastRemoteObject.exportObject(UnicastRemoteObject.ja
      va:155)
      [java] at org.jboss.chap2.xmbean.TestXMBean1$Listener.(TestXMBean1.java:28)

      [java] at org.jboss.chap2.xmbean.TestXMBean1.main(TestXMBean1.java:73)
      [java] Caused by: java.lang.ClassNotFoundException: org.jboss.chap2.xmbean.TestXMBean
      1$Listener_Stub
      [java] at java.net.URLClassLoader$1.run(URLClassLoader.java:199)
      [java] at java.security.AccessController.doPrivileged(Native Method)
      [java] at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
      [java] at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
      [java] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
      [java] at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
      [java] at sun.rmi.server.RemoteProxy.loadClassFromClass(RemoteProxy.java:191)
      [java] at sun.rmi.server.RemoteProxy.getStub(RemoteProxy.java:93)
      [java] ... 9 more
      [java] Exception in thread "main"

      [java] Java Result: 1

      BUILD SUCCESSFUL
      Total time: 10 seconds