用JBuidler9和Weblogic7部署entity bean时出错,请高手帮我解决 发表

03-09-15 starjava

D:\j2sdk1.4.2\bin\javaw -classpath D:\bea7\weblogic700\server\lib\weblogic_sp.jar;D:\bea7\weblogic700\server\lib\weblogic.jar;D:\bea7\weblogic700\server\lib\webservices.jar;D:\bea7\weblogic700\server\lib\webservices.jar; weblogic.Deployer -user NakoRuru -adminurl http://nakoruru:7001 -password 1234567890 -activate -name Cmp -upload -source G:/project/cmpSample/Cmp.jar -targets myserver

Operation started, waiting for notifications...

...

#TaskID Action Status Target Type Application Source

1 Activate Failed myserver Server Cmp D:\bea7\user_projects\mydomain\myserver\upload\Cmp\Cmp.jar

Exception:weblogic.management.ApplicationException: activate failed forCmp

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

Unable to deploy EJB: Student from Cmp.jar:

weblogic.ejb20.WLDeploymentException: Error while reading 'META-INF/weblogic-cmp-rdbms-jar.xml'. The error was:

ZipFile closed.

at weblogic.ejb20.persistence.PersistenceType.setTypeSpecificFile(PersistenceType.java:541)

at weblogic.ejb20.persistence.PersistenceType.setupDeployer(PersistenceType.java:408)

at weblogic.ejb20.deployer.CMPInfoImpl.setup(CMPInfoImpl.java:115)

at weblogic.ejb20.deployer.ClientDrivenBeanInfoImpl.activate(ClientDrivenBeanInfoImpl.java:927)

at weblogic.ejb20.deployer.EJBDeployer.activate(EJBDeployer.java:1302)

at weblogic.ejb20.deployer.EJBModule.activate(EJBModule.java:342)

at weblogic.j2ee.J2EEApplicationContainer.activateModule(J2EEApplicationContainer.java:1509)

at weblogic.j2ee.J2EEApplicationContainer.activate(J2EEApplicationContainer.java:970)

at weblogic.j2ee.J2EEApplicationContainer.activate(J2EEApplicationContainer.java:957)

at weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(SlaveDeployer.java:1074)

at weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDeployer.java:700)

at weblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHandler.java:24)

at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:152)

at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:133)

banq
2003-09-15 12:07
weblogic-cmp-rdbms-jar.xml'这个文件出错啊

banq
2003-09-15 12:08
weblogic-cmp-rdbms-jar.xml这个文件是CMP与数据表字段对应文件,检查XML格式等情况。

starjava
2003-09-15 13:07
Benq:你好!

  我这个EJB是容器管理持久性!对应Student表(id Number,name varchar2(12),sex varchar2(2)),jbuilder9自动生成的weblogic-cmp-rdbms-jar.xml文件如下:

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

<!DOCTYPE weblogic-rdbms-jar PUBLIC '-//BEA Systems, Inc.//DTD WebLogic 7.0.0 EJB RDBMS Persistence//EN' 'http://www.bea.com/servers/wls700/dtd/weblogic-rdbms20-persistence-700.dtd'>

<weblogic-rdbms-jar>

<weblogic-rdbms-bean>

<ejb-name>Student</ejb-name>

<data-source-name>DataSource</data-source-name>

<table-map>

<table-name>STUDENT</table-name>

<field-map>

<cmp-field>id</cmp-field>

<dbms-column>ID</dbms-column>

</field-map>

<field-map>

<cmp-field>name</cmp-field>

<dbms-column>NAME</dbms-column>

</field-map>

<field-map>

<cmp-field>sex</cmp-field>

<dbms-column>SEX</dbms-column>

</field-map>

</table-map>

</weblogic-rdbms-bean>

</weblogic-rdbms-jar>

2.weblogic-ejb-jar.xml如下:

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

<!DOCTYPE weblogic-ejb-jar PUBLIC '-//BEA Systems, Inc.//DTD WebLogic 7.0.0 EJB//EN' 'http://www.bea.com/servers/wls700/dtd/weblogic-ejb-jar.dtd'>

<weblogic-ejb-jar>

<weblogic-enterprise-bean>

<ejb-name>Student</ejb-name>

<entity-descriptor>

<persistence>

<persistence-use>

<type-identifier>WebLogic_CMP_RDBMS</type-identifier>

<type-version>6.0</type-version>

<type-storage>META-INF/weblogic-cmp-rdbms-jar.xml</type-storage>

</persistence-use>

</persistence>

</entity-descriptor>

<local-jndi-name>Student</local-jndi-name>

</weblogic-enterprise-bean>

</weblogic-ejb-jar>

3:  ejb-jar.xml如下:

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

<!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">

<ejb-jar>

<enterprise-beans>

<entity>

<display-name>Student</display-name>

<ejb-name>Student</ejb-name>

<local-home>testejb.StudentHome</local-home>

<local>testejb.Student</local>

<ejb-class>testejb.StudentBean</ejb-class>

<persistence-type>Container</persistence-type>

<prim-key-class>java.math.BigDecimal</prim-key-class>

<reentrant>False</reentrant>

<cmp-version>2.x</cmp-version>

<abstract-schema-name>Student</abstract-schema-name>

<cmp-field>

<field-name>id</field-name>

</cmp-field>

<cmp-field>

<field-name>name</field-name>

</cmp-field>

<cmp-field>

<field-name>sex</field-name>

</cmp-field>

<primkey-field>id</primkey-field>

</entity>

</enterprise-beans>

<assembly-descriptor>

<container-transaction>

<method>

<ejb-name>Student</ejb-name>

<method-name>*</method-name>

</method>

<trans-attribute>Required</trans-attribute>

</container-transaction>

</assembly-descriptor>

</ejb-jar>

以下三个文件都是由jbuilder9自动生成!不知有什么错误?谢谢!

starjava
2003-09-15 13:21
Benq:你好!

  我这个EJB是容器管理持久性!对应Student表(id Number,name varchar2(12),sex varchar2(2)),jbuilder9自动生成的weblogic-cmp-rdbms-jar.xml文件如下:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE weblogic-rdbms-jar PUBLIC '-//BEA Systems, Inc.//DTD WebLogic 7.0.0 EJB RDBMS Persistence//EN' 'http://www.bea.com/servers/wls700/dtd/weblogic-rdbms20-persistence-700.dtd'>
<weblogic-rdbms-jar>
    <weblogic-rdbms-bean>
        <ejb-name>Student</ejb-name>
        <data-source-name>DataSource</data-source-name>
        <table-map>
            <table-name>STUDENT</table-name>
            <field-map>
                <cmp-field>id</cmp-field>
                <dbms-column>ID</dbms-column>
            </field-map>
            <field-map>
                <cmp-field>name</cmp-field>
                <dbms-column>NAME</dbms-column>
            </field-map>
            <field-map>
                <cmp-field>sex</cmp-field>
                <dbms-column>SEX</dbms-column>
            </field-map>
        </table-map>
    </weblogic-rdbms-bean>
</weblogic-rdbms-jar>


2.weblogic-ejb-jar.xml如下:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE weblogic-ejb-jar PUBLIC '-//BEA Systems, Inc.//DTD WebLogic 7.0.0 EJB//EN' 'http://www.bea.com/servers/wls700/dtd/weblogic-ejb-jar.dtd'>
<weblogic-ejb-jar>
    <weblogic-enterprise-bean>
        <ejb-name>Student</ejb-name>
        <entity-descriptor>
            <persistence>
                <persistence-use>
                    <type-identifier>WebLogic_CMP_RDBMS</type-identifier>
                    <type-version>6.0</type-version>
                    <type-storage>META-INF/weblogic-cmp-rdbms-jar.xml</type-storage>
                </persistence-use>
            </persistence>
        </entity-descriptor>
        <local-jndi-name>Student</local-jndi-name>
    </weblogic-enterprise-bean>
</weblogic-ejb-jar>

3:  ejb-jar.xml如下:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
<ejb-jar>
    <enterprise-beans>
        <entity>
            <display-name>Student</display-name>
            <ejb-name>Student</ejb-name>
            <local-home>testejb.StudentHome</local-home>
            <local>testejb.Student</local>
            <ejb-class>testejb.StudentBean</ejb-class>
            <persistence-type>Container</persistence-type>
            <prim-key-class>java.math.BigDecimal</prim-key-class>
            <reentrant>False</reentrant>
            <cmp-version>2.x</cmp-version>
            <abstract-schema-name>Student</abstract-schema-name>
            <cmp-field>
                <field-name>id</field-name>
            </cmp-field>
            <cmp-field>
                <field-name>name</field-name>
            </cmp-field>
            <cmp-field>
                <field-name>sex</field-name>
            </cmp-field>
            <primkey-field>id</primkey-field>
        </entity>
    </enterprise-beans>
    <assembly-descriptor>
        <container-transaction>
            <method>
                <ejb-name>Student</ejb-name>
                <method-name>*</method-name>
            </method>
            <trans-attribute>Required</trans-attribute>
        </container-transaction>
    </assembly-descriptor>
</ejb-jar>

以下三个文件都是由jbuilder9自动生成!不知有什么错误?谢谢!

猜你喜欢
2Go 1 2 下一页