CMP+Oracle 报错!!!! Help

03-11-19 bluedolphine

开发工具是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代表什么??

xfzhu2003
2003-12-05 15:08

select Object(i) as i