To JJams_King:
我想问大侠,我用的开发环境来执行我的例子,是不是就不用启动我的Inprise Application
Server 4.0,我再开发环境中启动我的服务器端,在窗口中出现了以下结果:
E:/JBUILDER4/JDK1.3/bin/javaw -classpath "C:/Inprise/AppServer/lib/navigator.jar;C:/Inprise/AppServer/lib/vbdev.jar;C:/Inprise/AppServer/lib/vbejb.jar;C:/Inprise/AppServer/lib/vbjdev.jar;C:/Inprise/AppServer/lib/vbjorb.jar;C:/WINDOWS/jbproject/HelloWorldEJB/classes;E:/JBuilder4/lib/jaxp.jar;E:/JBuilder4/lib/parser.jar;E:/JBUILDER4/JDK1.3/DEMO/JFC/Java2D/Java2Demo.jar;E:/JBUILDER4/JDK1.3/JRE/LIB/I18N.JAR;E:/JBUILDER4/JDK1.3/JRE/LIB/JAWS.JAR;E:/JBUILDER4/JDK1.3/JRE/LIB/RT.JAR;E:/JBUILDER4/JDK1.3/JRE/LIB/sunrsasign.jar;E:/JBUILDER4/JDK1.3/LIB/DT.JAR;E:/JBUILDER4/JDK1.3/LIB/TOOLS.JAR" com.inprise.ejb.Container ejbcontainer "C:/WINDOWS/jbproject/HelloWorldEJB/HelloWorld.jar" -jts -jns -jss -jdb
Inprise EJB Container
=====================
server version : 4.1.1
server build date : Aug 18, 2000
java version : 1.3.0
java vendor : Sun Microsystems Inc.
heap size : 1984 Kb
java class path : C:/Inprise/AppServer/lib/navigator.jar
: C:/Inprise/AppServer/lib/vbdev.jar
: C:/Inprise/AppServer/lib/vbejb.jar
: C:/Inprise/AppServer/lib/vbjdev.jar
: C:/Inprise/AppServer/lib/vbjorb.jar
: C:/WINDOWS/jbproject/HelloWorldEJB/classes
: E:/JBuilder4/lib/jaxp.jar
: E:/JBuilder4/lib/parser.jar
: E:/JBUILDER4/JDK1.3/DEMO/JFC/Java2D/Java2Demo.jar
: E:/JBUILDER4/JDK1.3/JRE/LIB/I18N.JAR
: E:/JBUILDER4/JDK1.3/JRE/LIB/JAWS.JAR
: E:/JBUILDER4/JDK1.3/JRE/LIB/RT.JAR
: E:/JBUILDER4/JDK1.3/JRE/LIB/sunrsasign.jar
: E:/JBUILDER4/JDK1.3/LIB/DT.JAR
: E:/JBUILDER4/JDK1.3/LIB/TOOLS.JAR
=====================
Initializing ORB......do
ne
Initializing JNS......................................................................................................................do
ne
Initializing JTS....do
ne
Initializing JSS....Developer's License (no connection limit)
Copyright (c) 1996-2000 Inprise Corporation. All rights reserved.
License for JDataStore development only - not for redistribution
Registered to:
Inprise Application Server Development Licensee
Inprise Application Server Customer
.........do
ne
Initializing JDB.............do
ne
Initializing EJBs....java.lang.ClassNotFoundException: helloworldejb.HelloHelper
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:286)
at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
at java.lang.ClassLoader.findSystemClass(ClassLoader.java:620)
at com.inpri.se.ejb.util.ClassLoaderDriver$LocalClassLoader.loadClass(ClassLoaderDriver.java:472)
at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
at com.inprise.ejb.Global.loadClass(Global.java:116)
at com.inprise.ejb.EJBHome.<init>(EJBHome.java:75)
at com.inprise.ejb.StatelessSessionHome.<init>(StatelessSessionHome.java:14)
at com.inprise.ejb.Container.load(Container.java:854)
at com.inprise.ejb.Container.run(Container.java:597)
at com.inprise.ejb.Container.run(Container.java:1241)
at com.inprise.ejb.Container.main(Container.java:1246)
>>>> EJB LOG >>>>
Could not deploy ejb-jar C:/WINDOWS/jbproject/HelloWorldEJB/HelloWorld.jar
java.lang.Error: Invalid helper class: helloworldejb.HelloHelper
at com.inprise.ejb.EJBHome.<init>(EJBHome.java:82)
at com.inprise.ejb.StatelessSessionHome.<init>(StatelessSessionHome.java:14)
at com.inprise.ejb.Container.load(Container.java:854)
at com.inprise.ejb.Container.run(Container.java:597)
at com.inprise.ejb.Container.run(Container.java:1241)
at com.Undoing effects of a partial deployment ...
Jar name = C:/WINDOWS/jbproject/HelloWorldEJB/HelloWorld.jar
The home name is : Hello
.do
ne
inprise.ejb.Container.main(Container.java:1246)
<<<< EJB LOG <<<<
Container [ejbcontainer] is ready
EJB Container Statistics
========================
Time Tue Feb 06 19:58:30 CST 2001
Memory (used) 1139 Kb (max 1139 Kb)
Memory (total) 1984 Kb (max 1984 Kb)
Memory (free) 42.0%
------------------------
Home Hello
Total in memory 0
Total in use 0
========================
运行客户端后出现以下情况:
E:/JBUILDER4/JDK1.3/bin/javaw -classpath "C:/WINDOWS/jbproject/HelloWorldEJB/classes;C:/Inprise/AppServer/lib/vbdev.jar;C:/Inprise/AppServer/lib/vbejb.jar;C:/Inprise/AppServer/lib/vbjdev.jar;C:/Inprise/AppServer/lib/vbjorb.jar;C:/Inprise/AppServer/lib/navigator.jar;E:/JBuilder4/lib/jaxp.jar;E:/JBuilder4/lib/parser.jar;E:/JBUILDER4/JDK1.3/DEMO/JFC/Java2D/Java2Demo.jar;E:/JBUILDER4/JDK1.3/JRE/LIB/I18N.JAR;E:/JBUILDER4/JDK1.3/JRE/LIB/JAWS.JAR;E:/JBUILDER4/JDK1.3/JRE/LIB/RT.JAR;E:/JBUILDER4/JDK1.3/JRE/LIB/sunrsasign.jar;E:/JBUILDER4/JDK1.3/LIB/DT.JAR;E:/JBUILDER4/JDK1.3/LIB/TOOLS.JAR" helloworldejb.HelloWorldClient
zhf,hello
javax.naming.NameNotFoundException. Root exception is org.omg.CosNaming.NamingContextPackage.NotFound
at org.omg.CosNaming.NamingContextPackage.NotFoundHelper.read(NotFoundHelper.java:34)
at org.omg.CosNaming.NamingContextPackage.NotFoundHelper.extract(NotFoundHelper.java:50)
at org.omg.CosNaming._NamingContextStub.resolve(_NamingContextStub.java:161)
at com.sun.jndi.cosnaming.CNCtx.callResolve(CNCtx.java:324)
at com.sun.jndi.cosnaming.CNCtx.lookup(CNCtx.java:373)
at com.sun.jndi.cosnaming.CNCtx.lookup(CNCtx.java:351)
at javax.naming.InitialContext.lookup(InitialContext.java:350)
at javax.naming.InitialContext.lookup(InitialContext.java:350)
at helloworldejb.HelloWorldClient.main(HelloWorldClient.java:66)
请问这是如何?