Lin, I'll try and replicate your issue. I'll be back to you in a bit. Take care, Jeremy
On 9/20/05, lin sun <[EMAIL PROTECTED]> wrote: > > I was able to get further... You are right the > classpath isn't setup correctly. My openejb_home is > set to 0916's openejb home directory, but the jar file > is named as openejb-core-1.0-beta1.jar. > > Here's the new error I am getting: > > E:\try\app>c:\j2sdk1.4.2_09\bin\java -cp > c:\j2sdk1.4.2_09\lib\tools.jar;E:\try\o > penejb-1.0-20050916\openejb-1.0-20050916\lib\openejb-core-1.0-20050916.jar > ;E:\tr > y\openejb- > 1.0-20050916\openejb-1.0-20050916\lib\openejb-loader-1.0-20050916.jar; > E:\try\openejb- > 1.0-20050916\openejb-1.0-20050916\beans\openejb-webadmin-clientto > ols.jar;E:\try\openejb- > 1.0-20050916\openejb-1.0-20050916\beans\openejb-webadmin- > ejbgen.jar;E:\try\openejb- > 1.0-20050916\openejb-1.0-20050916\beans\openejb-webadm > in-main.jar;. > -Dopenejb.home=E:\try\openejb-1.0-20050916\openejb-1.0-20050916 > or > g.acme.HelloWorld > javax.naming.NamingException: Cannot lookup /Hello: > Received error: Error while > communicating with server: ; nested exception is: > java.rmi.RemoteException: Error reading > response from server: ; nested e > xception is: > java.lang.NoClassDefFoundError: > javax/ejb/EJBMetaData > at > org.openejb.client.JNDIContext.lookup(JNDIContext.java:260) > at > javax.naming.InitialContext.lookup(InitialContext.java:347) > at > org.acme.HelloWorld.main(HelloWorld.java:18) > > > > --- David Blevins <[EMAIL PROTECTED]> wrote: > > > Hmm, what command are you using to run the client? > > Seems that the > > classpath isn't getting setup correctly. > > > > -David > > > > On Sep 20, 2005, at 10:58 AM, lin sun wrote: > > > > > This worked fine for me. Thanks! > > > > > > I was able to see "DEBUG: STATELESS Hello" > > in > > > the openejb.log. > > > > > > But I still cannot run the HelloWorld client > > > successfully... kept getting the following after I > > > made sure I've included the > > > openejb-core-1.0-20050916.jar to the classpath. > > > > > > javax.naming.NoInitialContextException: Cannot > > > instantiate class: org.openejb.cl <http://org.openejb.cl> > > > ient.RemoteInitialContextFactory [Root exception > > is > > > java.lang.ClassNotFoundExcep > > > tion: > > org.openejb.client.RemoteInitialContextFactory] > > > at > > > > > > javax.naming.spi.NamingManager.getInitialContext(Unknown > > > Source) > > > at > > > > > > javax.naming.InitialContext.getDefaultInitCtx(Unknown > > > Source) > > > at > > javax.naming.InitialContext.init(Unknown > > > Source) > > > at > > javax.naming.InitialContext.<init>(Unknown > > > Source) > > > at > > > org.acme.HelloWorld.main(HelloWorld.java:16) > > > Caused by: java.lang.ClassNotFoundException: > > > org.openejb.client.RemoteInitialCon > > > textFactory > > > at java.net.URLClassLoader$1.run(Unknown > > > Source) > > > at > > > java.security.AccessController.doPrivileged(Native > > > Method) > > > at > > java.net.URLClassLoader.findClass(Unknown > > > Source) > > > at java.lang.ClassLoader.loadClass(Unknown > > > Source) > > > at > > > sun.misc.Launcher$AppClassLoader.loadClass(Unknown > > > Source) > > > at java.lang.ClassLoader.loadClass(Unknown > > > Source) > > > at > > > java.lang.ClassLoader.loadClassInternal(Unknown > > > Source) > > > at java.lang.Class.forName0(Native Method) > > > at java.lang.Class.forName(Unknown Source) > > > at > > > > > > com.sun.naming.internal.VersionHelper12.loadClass(Unknown > > > Source) > > > ... 5 more > > > --- David Blevins <[EMAIL PROTECTED]> wrote: > > > > > > > > >> Hi Lin, > > >> > > >> That's a hard bug to keep out of the system. > > >> Basically the windows > > >> VM holds a lock on the files when they are > > accessed > > >> by a classloader > > >> and they become un-removable while the VM is > > still > > >> running. > > >> > > >> Try just copying for now and we'll see if we > > can't > > >> re-fix that code. > > >> The command for copying is: > > >> > > >> > > >> > > >> > > > > > > E:\try\openejb-1.0-20050916\openejb-1.0-20050916\bin>openejb > > > > > >> > > >> deploy -a -c -f \try\app\myejb.jar > > >> > > >> Please let us know how that goes (it's nice for > > >> people reading the > > >> archives). > > >> > > >> Thanks, > > >> David > > >> > > >> On Sep 19, 2005, at 1:15 PM, lin sun wrote: > > >> > > >> > > >>> Tried the 09/16's build...was able to pass the > > >>> original error, but got "cannot move jar...make > > >>> > > >> sure > > >> > > >>> jar is not used by another program" error. I > > >>> > > >> know it > > >> > > >>> is not, since I can delete the jar file fine. > > >>> > > >>> > > >>> > > >> > > >> > > > > > > E:\try\openejb-1.0-20050916\openejb-1.0-20050916\bin>openejb > > > > > >>> deploy -a -m -f \tr > > >>> y\app\myejb.jar > > >>> OpenEJB Deploy Tool 1.0-20050916 build: > > >>> 20050916-2036 > > >>> http://www.openejb.org > > >>> > > >>> This jar contains the following beans: > > >>> Hello > > >>> > > >>> > > >>> > > >>> > > >> > > >> > > > > > > ----------------------------------------------------------- > > > > > >>> Deploying bean: Hello > > >>> > > >>> > > >> > > >> > > > > > > ----------------------------------------------------------- > > > > > >>> > > >>> ==--- Step 1 ---== > > >>> > > >>> Auto assigning the ejb-name as the deployment id > > >>> > > >> for > > >> > > >>> this bean. > > >>> > > >>> Deployment ID: Hello > > >>> ==--- Step 2 ---== > > >>> > > >>> Auto assigning the container the bean will run > > in. > > >>> > > >>> Container: Default Stateless Container > > >>> > > >>> ERROR in \try\app\myejb.jar > > >>> Deploy option -m. Could not move jar > > >>> E:\try\app\myejb.jar to E:\try\openejb-1.0 > > >>> -20050916\openejb-1.0-20050916\beans\myejb.jar. > > >>> > > >> Make > > >> > > >>> sure the jar is not open i > > >>> n another program. > > >>> > > >>> --- Marco Mistroni <[EMAIL PROTECTED]> wrote: > > >>> > > >>> > > >>> > > >>>> Hello, > > >>>> there's a message that Mr David Blevin just > > >>>> > > >> posted > > >> > > >>>> when i raised same > > >>>> problem > > >>>> here's the answer > > >>>> Marco, > > >>>> > > >>>> I've put up an unstable (i.e. non-official) > > build > > >>>> > > >> of > > >> > > >>>> 1.0 containing > > >>>> Jeremy's fix. > > >>>> > > >>>> Download here: > > > === message truncated === > > > thanks, > > Lin > > > > __________________________________ > Yahoo! Mail - PC Magazine Editors' Choice 2005 > http://mail.yahoo.com > -- Take care, Jeremy
