都是weblogic和ejb惹的祸

04-06-10 shaokun305
在jb9和weblogic8。1配置好后,新建立了一个ejbmodule,自动生成了一个entry bean,但是部署时候报错,其中的代码我一行也没有改,全是jb9自动生成的,希望高手给看看什么问题。谢谢!!

错误信息:

D:\bea\jdk141_05\bin\javaw -classpath D:\bea\weblogic81\server\lib\weblogic_sp.jar;D:\bea\weblogic81\server\lib\weblogic.jar;D:\bea\weblogic81\server\lib\webservices.jar; weblogic.Deployer -user weblogic -adminurl http://chenshaokun:7001 -password weblogic -activate -name ejbmodule -upload -source "C:/Documents and Settings/Administrator/jbproject/testejb/ejbmodule.jar" -targets myserver

Initiated Task: [1] [Deployer:149026]Deploy application ejbmodule on myserver.

Task 1 failed: [Deployer:149026]Deploy application ejbmodule on myserver.

Deployment failed on Server myserver

weblogic.management.DeploymentException:

Exception:weblogic.management.ApplicationException: activate failed for ejbmodule

Module: ejbmodule Error: Exception activating module: EJBModule(ejbmodule,status=PREPARED)

Unable to deploy EJB: Attachment from ejbmodule.jar:

[EJB:011028]The DataSource with the JNDI name: DataSource 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.

1
difficult
2004-06-10 17:09
你datasource设置不正确,先在application server上设置好datasource,再在entitybean中用此datasource

SportsBaby1980
2004-06-10 17:09
呵呵

很明显的你没配置好DataSource啊

在部署的时候

weblogic找不到你指定的DataSource JNDI name

你得让WebLogic 也能找到 DataSource

shaokun305
2004-06-10 17:25
在jb9的工程中又一个xml文件:jndi-definitions.xml,他的里面已经自动生成了DataSource

内容:

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE jndi-definitions PUBLIC "-//Borland Corporation//DTD JndiDefinitions//EN" "http://www.borland.com/devsupport/appserver/dtds/jndi-definitions.dtd">

<jndi-definitions>

<visitransact-datasource>

<jndi-name>serial://datasources/DataSource</jndi-name>

<driver-datasource-jndiname>serial://datasources/driverDataSource</driver-datasource-jndiname>

<property>

<prop-name>connectionType</prop-name>

<prop-type>Enumerated</prop-type>

<prop-value>Direct</prop-value>

</property>

<property>

<prop-name>dialect</prop-name>

<prop-type>Enumerated</prop-type>

<prop-value>none</prop-value>

</property>

</visitransact-datasource>

<driver-datasource>

<jndi-name>serial://datasources/driverDataSource</jndi-name>

<datasource-class-name>com.inprise.visitransact.jdbc1w2.InpriseConnectionPoolDataSource</datasource-class-name>

<property>

<prop-name>user</prop-name>

<prop-type>String</prop-type>

<prop-value>oa</prop-value>

</property>

<property>

<prop-name>password</prop-name>

<prop-type>String</prop-type>

<prop-value>oa</prop-value>

</property>

<property>

<prop-name>url</prop-name>

<prop-type>String</prop-type>

<prop-value>jdbc:microsoft:sqlserver://127.0.0.1:1433;DatabaseName=zwerp</prop-value>

</property>

<property>

<prop-name>driverClassName</prop-name>

<prop-type>String</prop-type>

<prop-value>com.microsoft.jdbc.sqlserver.SQLServerDriver</prop-value>

</property>

</driver-datasource>

</jndi-definitions>

但是在要生成的jar包中的META-INF中没有发现这个文件,只有:ejb-jar.xml,weblogic-cmp-rdbms-jar.xml,weblogic-ejb-jar.xml这三个xml文件,我该把上面那个文件中的代码复制到那个xml中?谢谢。急!!

shaokun305
2004-06-10 17:26
在jb9的工程中又一个xml文件:jndi-definitions.xml,他的里面已经自动生成了DataSource

内容:

<pre>

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE jndi-definitions PUBLIC "-//Borland Corporation//DTD JndiDefinitions//EN" "http://www.borland.com/devsupport/appserver/dtds/jndi-definitions.dtd">

<jndi-definitions>

<visitransact-datasource>

<jndi-name>serial://datasources/DataSource</jndi-name>

<driver-datasource-jndiname>serial://datasources/driverDataSource</driver-datasource-jndiname>

<property>

<prop-name>connectionType</prop-name>

<prop-type>Enumerated</prop-type>

<prop-value>Direct</prop-value>

</property>

<property>

<prop-name>dialect</prop-name>

<prop-type>Enumerated</prop-type>

<prop-value>none</prop-value>

</property>

</visitransact-datasource>

<driver-datasource>

<jndi-name>serial://datasources/driverDataSource</jndi-name>

<datasource-class-name>com.inprise.visitransact.jdbc1w2.InpriseConnectionPoolDataSource</datasource-class-name>

<property>

<prop-name>user</prop-name>

<prop-type>String</prop-type>

<prop-value>oa</prop-value>

</property>

<property>

<prop-name>password</prop-name>

<prop-type>String</prop-type>

<prop-value>oa</prop-value>

</property>

<property>

<prop-name>url</prop-name>

<prop-type>String</prop-type>

<prop-value>jdbc:microsoft:sqlserver://127.0.0.1:1433;DatabaseName=zwerp</prop-value>

</property>

<property>

<prop-name>driverClassName</prop-name>

<prop-type>String</prop-type>

<prop-value>com.microsoft.jdbc.sqlserver.SQLServerDriver</prop-value>

</property>

</driver-datasource>

</jndi-definitions>

</pre>

但是在要生成的jar包中的META-INF中没有发现这个文件,只有:ejb-jar.xml,weblogic-cmp-rdbms-jar.xml,weblogic-ejb-jar.xml这三个xml文件,我该把上面那个文件中的代码复制到那个xml中?谢谢。急!!

猜你喜欢
2Go 1 2 下一页