CMP+Oracle 報錯!!!! Help

bluedolphine發表於2003-11-19
開發工具是JBuilder9.0+oracle+weblogic.
程式採用的是CMP,在Sessionbean裡的setSessionContext中可建立資料庫的lookup,程式程式碼編譯透過,可編譯EJB的jar包報錯:

There have been deprecation warnings. Please consult the documentation for a better alternative.
"ejb20.jar": C:\JBuilder9\jdk1.4\bin\javaw -classpath "F:\WSPRO\EJBtest\classes;C:\bea\weblogic81\server\lib\weblogic_sp.jar;C:\bea\weblogic81\server\lib\weblogic.jar;C:\bea\weblogic81\server\lib\webservices.jar;C:\oracle\ora81\jdbc\lib\classes12.zip;" weblogic.appc -keepgenerated -forceGeneration -compiler C:/JBuilder9/jdk1.4/bin/javac F:/WSPRO/EJBTest/ejb20.jar.jar -output F:/WSPRO/EJBTest/ejb20.jar

"ejb20.jar": <2003-11-19 下午22時09分40秒 CST> <Warning> <EJB> <BEA-010054> <EJB Deployment: InfoSession has a class test.ejb.InfoSessionBean that is in the classpath. This class should only be located in the ejb-jar file.>
"ejb20.jar": <2003-11-19 下午22時09分40秒 CST> <Warning> <EJB> <BEA-010054> <EJB Deployment: InfoSession has a class test.ejb.InfoSessionHome that is in the classpath. This class should only be located in the ejb-jar file.>
"ejb20.jar": <2003-11-19 下午22時09分40秒 CST> <Warning> <EJB> <BEA-010054> <EJB Deployment: InfoSession has a class test.ejb.InfoSession that is in the classpath. This class should only be located in the ejb-jar file.>
"ejb20.jar": <2003-11-19 下午22時09分40秒 CST> <Warning> <EJB> <BEA-010054> <EJB Deployment: Info has a class test.ejb.InfoBean that is in the classpath. This class should only be located in the ejb-jar file.>
"ejb20.jar": <2003-11-19 下午22時09分40秒 CST> <Warning> <EJB> <BEA-010054> <EJB Deployment: Info has a class test.ejb.InfoHome that is in the classpath. This class should only be located in the ejb-jar file.>
"ejb20.jar": <2003-11-19 下午22時09分40秒 CST> <Warning> <EJB> <BEA-010054> <EJB Deployment: Info has a class test.ejb.Info that is in the classpath. This class should only be located in the ejb-jar file.>
"ejb20.jar": <2003-11-19 下午22時09分40秒 CST> <Warning> <EJB> <BEA-010202> <Call-by-reference is not enabled for the EJB 'InfoSession'. The server will have better performance if it is enabled. To enable call-by-reference, set the enable-call-by-reference element to True in the weblogic-ejb-jar.xml deployment descriptor for this EJB.>
"ejb20.jar": <2003-11-19 下午22時09分41秒 CST> <Warning> <EJB> <BEA-012032> <Warning: for EJB Info, a weblogic-query element in the CMP deploment descriptor has no matching query element in the ejb-jar.xml descriptor. The settings specified in the weblogic-query element will be ignored. The EJB method referred to by the weblogic-query element is findByUserName(String).>
"ejb20.jar": [J2EE:160121]Errors encountered while compiling module 'F:\WSPRO\EJBTest\ejb20.jar.jar':
"ejb20.jar": [EJB:011017]Error while reading 'META-INF/weblogic-cmp-rdbms-jar.xml'. The error was:
"ejb20.jar":
"ejb20.jar": Query:
"ejb20.jar": EJB Name: Info
"ejb20.jar": Method Name: findAll
"ejb20.jar": Parameter Types: ()
"ejb20.jar": SELECT i FROM =>> INFO <<= AS i ORDERBY i.userid
"ejb20.jar": EJB QL compilation encountered error: [EJB:013015]Could not find an entity EJB for abstract schema name, 'INFO', which is declared in a range variable declaration. Verify that an EJB is defined in the ejb-jar.xml descriptor with this abstract schema name.
"ejb20.jar": Query:
"ejb20.jar": EJB Name: Info
"ejb20.jar": Method Name: findByUserName
"ejb20.jar": Parameter Types: (java.lang.String)
"ejb20.jar": SELECT i FROM =>> INFO <<= AS i WHERE i.username = ?1 ORDERBY i.userid
"ejb20.jar": EJB QL compilation encountered error: [EJB:013015]Could not find an entity EJB for abstract schema name, 'INFO', which is declared in a range variable declaration. Verify that an EJB is defined in the ejb-jar.xml descriptor with this abstract schema name.
"ejb20.jar": .
懷疑資料庫的連線不對。請問CMP中如何建立資料庫的連線。看到一個例子連線的是JBuilder帶的JDatastore,只要在setsessioncontext裡lookup “java:comp/env/ejb/Employee”就行了,那麼comp/env/ejb代表什麼??

相關文章