ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Murray, Tom" <mur...@UU.NET>
Subject ejbjar and weblogic errors
Date Fri, 12 Oct 2001 21:24:29 GMT

I am using the Weblogic 5.10 sp9 application server.  I am trying to use ant
1.4 to build 
the EJB deploy jar file. Unfortunately, I can keep getting an error when the
ejbjar 
section of the build.xml file is executed. The specific error is:

  
[ejbc] ERROR: Error from ejbc: Bean "DHCP" specified in weblogic-ejb-jar.xml
was not found in ejb-jar.xml  (Below is the complete ant -debug output)

I believe the problem may be with my build.xml file.  Essentially, the
build.xml
creates a build directory, creates build/META-INF, copy *.xml to
build/META-INF, compiles
the *.java into the build directory and runs the ejbjar section.

I am enclosing the contents of the build.xml, weblogic-ejb-jar.xml,
ejb-jar.xml and the 
ant -debug output for the ejbjar section.

Any help would be greatly appreciated!

Thanks in advance for you help.

Tom.


I have the following setup:

Current directory

# ls 
DHCP.java
DHCPBean.java
DHCPBeanHome.java
DHCPBeanPK.java
DHCP-rdbms.xml
weblogic-ejb-jar.xml
ejb-jar.xml
build.xml

#######################
# Contents of build.xml
#######################
<project name="MyProject" default="dist" basedir=".">

<!-- set global properties for this build -->
<property name="src" value="."/>
<property name="build" value="build"/>
<property name="meta" value="${build}/META-INF"/>
<property name="client_classes"  value="/weblogic/myserver/clientclasses"/>
<property name="server_classes"  value="/weblogic/myserver/serverclasses"/>
<property name="classpath"
value="${client_classes},${server_classes},/weblogic/classes,/weblogic/lib/w
eblogicaux.jar"/>


<target name="init">
        <!-- Create the build directory structure -->
        <mkdir dir="${build}"/>
        <!-- Create the META-INF -->
        <mkdir dir="${meta}"/>
        <!-- Copy src *.xml files to the build META-INF -->
        <copy todir="${meta}">
                <fileset dir=".">
                        <include name="*.xml"/>
                        <exclude name="build.xml"/>
                </fileset>
        </copy>
</target>

<!-- Compile the java code from ${src} into ${build} -->
        <target name="compile" depends="init">
                <javac  srcdir="${src}" 
                                destdir="${build}"
                                includes="*.java"
                                classpath="${classpath}"
                />
        </target>

<target name="dist" depends="compile">
<!-- srcdir is the base dir where .class files are stored -->
<!-- descriptordir is the META-INF dir where .xml files are located -->
<ejbjar srcdir="${build}"
            descriptordir="${meta}"
            basejarname="TESTICQ">

     <support dir="${build}">
     </support>

<!-- destdir is the final location of the jar file to be deployed -->

     <weblogic destdir="deploy"
                newCMP="true"
                classpath="${classpath},/weblogic"/>
      <include name="**/*-ejb-jar.xml"/>
      <exclude name="**/*-weblogic-ejb-jar.xml"/>
</ejbjar>


############################################
CONTENTS of the weblogic-ejb-jar.xml file:
############################################
<?xml version="1.0"?>

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

<weblogic-ejb-jar>
    <weblogic-enterprise-bean>
      <ejb-name>DHCP</ejb-name>
      <caching-descriptor>
        <max-beans-in-free-pool>20</max-beans-in-free-pool>
        <initial-beans-in-free-pool>0</initial-beans-in-free-pool>
        <max-beans-in-cache>100</max-beans-in-cache>
        <idle-timeout-seconds>10</idle-timeout-seconds>
        <cache-strategy>Read-Write</cache-strategy>
      </caching-descriptor>
      <persistence-descriptor>
          <is-modified-method-name>isModified</is-modified-method-name>
        <persistence-type>
          <type-identifier>WebLogic_CMP_RDBMS</type-identifier>
          <type-version>5.1.0</type-version>
          <type-storage>META-INF/DHCP-rdbms.xml</type-storage>
        </persistence-type>
        <persistence-use>
          <type-identifier>WebLogic_CMP_RDBMS</type-identifier>
          <type-version>5.1.0</type-version>
        </persistence-use>
      </persistence-descriptor>
      <jndi-name>DHCPBeanHome</jndi-name>
    </weblogic-enterprise-bean>
  </weblogic-ejb-jar>

####################################
CONTENTS of the ejb-jar.xml file:
####################################
<?xml version="1.0"?>

<!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise
JavaBeans 1.1//EN' 'http://java.sun.com/j2ee/dtds/ejb-jar_1_1.dtd'>

<ejb-jar>
    <enterprise-beans>
      <entity>
        <ejb-name>DHCP</ejb-name>
        <home>com.uunet.seceng.icq.entity.DHCPBeanHome</home>
        <remote>com.uunet.seceng.icq.entity.DHCP</remote>
        <ejb-class>com.uunet.seceng.icq.entity.DHCPBean</ejb-class>
        <persistence-type>Container</persistence-type>
 
<prim-key-class>com.uunet.seceng.icq.entity.DHCPBeanPK</prim-key-class>
        <reentrant>False</reentrant>
        <cmp-field>
          <field-name>dhcpid</field-name>
        </cmp-field>
        <cmp-field>
          <field-name>interfaceid</field-name>
        </cmp-field>
        <cmp-field>
          <field-name>poolname</field-name>
        </cmp-field>
        <cmp-field>
          <field-name>network</field-name>
        </cmp-field>
      </entity>
    </enterprise-beans>
    <assembly-descriptor>
      <container-transaction>
        <method>
          <ejb-name>DHCP</ejb-name>
          <method-intf>Remote</method-intf>
          <method-name>*</method-name>
        </method>
        <trans-attribute>Required</trans-attribute>
      </container-transaction>
    </assembly-descriptor>
  </ejb-jar>

###############################
# ant -debug  (ejbjar section)
###############################
dist:
FileSet: Setup file scanner in dir
/export/home/murray/ICQ/com/uunet/seceng/icq/entity/build/META-INF with
patternSet{ includes: [**/*-ejb-jar.xml] excludes:
[**/*-weblogic-ejb-jar.xml] }
   [ejbjar] 1 deployment descriptors located.
   [ejbjar] Mapped publicId -//Sun Microsystems, Inc.//DTD Enterprise
JavaBeans 1.1//EN to resource /weblogic/ejb/deployment/xml/ejb-jar.dtd
   [ejbjar] Could not resolve ( publicId: -//BEA Systems, Inc.//DTD WebLogic
5.1.0 EJB//EN, systemId:
http://www.bea.com/servers/wls510/dtd/weblogic-ejb-jar.dtd) to a local
entity
FileSet: Setup file scanner in dir
/export/home/murray/ICQ/com/uunet/seceng/icq/entity/build with patternSet{
includes: [] excludes: [] }
   [ejbjar] Mapped publicId -//BEA Systems, Inc.//DTD WebLogic 5.1.0 EJB//EN
to resource /weblogic/ejb/deployment/xml/weblogic-ejb-jar.dtd
   [ejbjar] Resolved -//BEA Systems, Inc.//DTD WebLogic 5.1.0 EJB//EN to
local resource /weblogic/ejb/deployment/xml/weblogic-ejb-jar.dtd
Class com.uunet.seceng.icq.entity.DHCPBeanHome loaded from parent loader
   [ejbjar] looking at interface com.uunet.seceng.icq.entity.DHCPBeanHome
   [ejbjar]      implements javax.ejb.EJBHome
Class com.uunet.seceng.icq.entity.DHCPBeanPK loaded from parent loader
   [ejbjar] looking at class com.uunet.seceng.icq.entity.DHCPBeanPK
Class com.uunet.seceng.icq.entity.DHCPBean loaded from parent loader
   [ejbjar] looking at class com.uunet.seceng.icq.entity.DHCPBean
Class com.uunet.seceng.icq.entity.DHCP loaded from parent loader
   [ejbjar] looking at interface com.uunet.seceng.icq.entity.DHCP
   [ejbjar]      implements javax.ejb.EJBObject
   [ejbjar] building TESTICQ.jar with 7 files
   [ejbjar] adding file 'com/uunet/seceng/icq/entity/DHCPBeanHome.class'
   [ejbjar] adding file 'com/uunet/seceng/icq/entity/DHCPBeanPK.class'
   [ejbjar] adding file 'com/uunet/seceng/icq/entity/DHCPBean.class'
   [ejbjar] adding file 'META-INF/ejb-jar.xml'
   [ejbjar] adding file 'com/uunet/seceng/icq/entity/DHCP.class'
   [ejbjar] adding file 'META-INF/weblogic-ejb-jar.xml'
   [ejbjar] adding file 'META-INF/DHCP-rdbms.xml'
   +Task: java
   [ejbjar] Unrecognized publicId -//BEA Systems, Inc.//DTD WebLogic 5.1.0
EJB//EN - using EJB 1.1 compiler
   [ejbjar] Calling weblogic.ejbc for
/export/home/murray/ICQ/com/uunet/seceng/icq/entity/deploy/TESTICQ-generic.j
ar
     [ejbc] Forking /opt/j2sdk1_3_0_02/jre/../bin/java weblogic.ejbc
/export/home/murray/ICQ/com/uunet/seceng/icq/entity/deploy/TESTICQ-generic.j
ar /export/home/murray/ICQ/com/uunet/seceng/icq/entity/deploy/TESTICQ.jar
Execute:Java13CommandLauncher: /opt/j2sdk1_3_0_02/jre/../bin/java
weblogic.ejbc
/export/home/murray/ICQ/com/uunet/seceng/icq/entity/deploy/TESTICQ-generic.j
ar /export/home/murray/ICQ/com/uunet/seceng/icq/entity/deploy/TESTICQ.jar
     [ejbc] weblogic.ejb.deployment.dd.DescriptorLoaderException: Received
low-level error when processing DOM: message was
     [ejbc] "weblogic.xml.dom.ChildCountException"
     [ejbc]     at
weblogic.ejb.deployment.dd.DescriptorLoader.addDOMProcessingError(Descriptor
Loader.java:1731)
     [ejbc]     at
weblogic.ejb.deployment.dd.DescriptorLoader.createEntityBeanDescriptors(Desc
riptorLoader.java:924)
     [ejbc]     at
weblogic.ejb.deployment.dd.DescriptorLoader.createDeploymentUnit(DescriptorL
oader.java:259)
     [ejbc]     at weblogic.ejbc.runBody(ejbc.java:299)
     [ejbc]     at weblogic.utils.compiler.Tool.run(Tool.java:80)
     [ejbc]     at weblogic.ejbc.main(ejbc.java:353)
     [ejbc] weblogic.ejb.deployment.dd.DescriptorLoaderException: Received
low-level error when processing DOM: message was
     [ejbc] "weblogic.xml.dom.ChildCountException"     [ejbc]     at
weblogic.ejb.deployment.dd.DescriptorLoader.addDOMProcessingError(Descriptor
Loader.java:1731)
     [ejbc]     at
weblogic.ejb.deployment.dd.DescriptorLoader.createSessionBeanDescriptors(Des
criptorLoader.java:1078)
     [ejbc]     at
weblogic.ejb.deployment.dd.DescriptorLoader.createDeploymentUnit(DescriptorL
oader.java:261)
     [ejbc]     at weblogic.ejbc.runBody(ejbc.java:299)
     [ejbc]     at weblogic.utils.compiler.Tool.run(Tool.java:80)
     [ejbc]     at weblogic.ejbc.main(ejbc.java:353)
     [ejbc] ERROR: Error from ejbc: Received low-level error when processing
DOM: message was
     [ejbc] "weblogic.xml.dom.ChildCountException"
     [ejbc] ERROR: Error from ejbc: Received low-level error when processing
DOM: message was
     [ejbc] "weblogic.xml.dom.ChildCountException"
     [ejbc] ERROR: Error from ejbc: Bean "DHCP" specified in
weblogic-ejb-jar.xml was not found in
     [ejbc] ejb-jar.xml
     [ejbc] ERROR: ejbc found errors










Mime
View raw message