用JBuilder6.0+WebLogic6.0開發EJB的一個問題?
我用http://bdn.borland.com/article/images/28943/12289_3jbweblogic.pdf上的Working with entity beans的例子,在JBuilder6.0+WebLogic6.0環境上開發,make成功後在運行時提示如下錯誤;
C:\JBuilder6\jdk1.3.1\bin\javaw -classpath "D:\Zhunian\MyProject\TestEntity\TestEnt\classes;C:\bea\wlserver6.1\lib\weblogic_sp.jar;C:\bea\wlserver6.1\lib\weblogic.jar;C:\JBuilder6\lib\jdsserver.jar;C:\JBuilder6\lib\beandt.jar;C:\JBuilder6\lib\dx.jar;C:\JBuilder6\lib\jbuilder.jar;C:\JBuilder6\lib\help.jar;C:\JBuilder6\lib\gnuregexp.jar;C:\JBuilder6\jdk1.3.1\demo\jfc\Java2D\Java2Demo.jar;C:\JBuilder6\jdk1.3.1\jre\lib\i18n.jar;C:\JBuilder6\jdk1.3.1\jre\lib\jaws.jar;C:\JBuilder6\jdk1.3.1\jre\lib\rt.jar;C:\JBuilder6\jdk1.3.1\jre\lib\sunrsasign.jar;C:\JBuilder6\jdk1.3.1\lib\dt.jar;C:\JBuilder6\jdk1.3.1\lib\htmlconverter.jar;C:\JBuilder6\jdk1.3.1\lib\tools.jar" testent.EmpSesTestClient
-- Initializing bean access.
javax.naming.NameNotFoundException: Unable to resolve EmployeeSes. Resolved: '' Unresolved:'EmployeeSes' ; remaining name ''
at weblogic.rmi.internal.BasicOutboundRequest.sendReceive(BasicOutboundRequest.java:85)
at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:253)
at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:220)-- Failed initializing bean access.
at weblogic.rmi.internal.ProxyStub.invoke(ProxyStub.java:35)
at $Proxy0.lookup(Unknown Source)
at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:323)
at javax.naming.InitialContext.lookup(InitialContext.java:350)
at testent.EmpSesTestClient.<init>(EmpSesTestClient.java:27)
at testent.EmpSesTestClient.main(EmpSesTestClient.java:155)
-- Calling create()
java.lang.NullPointerException
at testent.EmpSesTestClient.create(EmpSesTestClient.java:79)
at testent.EmpSesTestClient.main(EmpSesTestClient.java:157)
-- Failed: create()
-- Return value from create(): null.
Error in getEmpName(): Remote interface reference is null. It must be created by calling one of the Home interface methods first.
Employee Name from the Test Client is =
我又試著部署,提示如下錯誤;
C:\JBuilder6\jdk1.3.1\bin\javaw -classpath ";C:\bea\wlserver6.1\lib\weblogic_sp.jar;C:\bea\wlserver6.1\lib\weblogic.jar;" weblogic.deploy -component TestEntMod:myserver deploy 19781025 TestEntMod D:/Zhunian/MyProject/TestEntity/TestEnt/TestEntMod.jar
weblogic.j2ee.DeploymentException: Error deploying application TestEntMod:
Unable to deploy EJB: Employee from TestEntMod.jar:
The DataSource with the JNDI name: DemoDataSource could not be located. Please ensure that the DataSource has been deployed successfully and that the JNDI name in your EJB Deployment descriptor is correct.
at weblogic.deploy.deploy(deploy.java:665)
at weblogic.deploy.runBody(deploy.java:358)
at weblogic.utils.compiler.Tool.run(Tool.java:79)
at weblogic.deploy.main(deploy.java:1601)
Error deploying application TestEntMod:
Unable to deploy EJB: Employee from TestEntMod.jar:
The DataSource with the JNDI name: DemoDataSource could not be located. Please ensure that the DataSource has been deployed successfully and that the JNDI name in your EJB Deployment descriptor is correct.
不知是何故,請指教,謝謝.