You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Keith Kee <ke...@netsco.com> on 2001/05/03 19:07:59 UTC

iplanet deployment tool

Hi:
  I am using the May 1 snapshot of jakarta-ant with the new iplanet
deployment tool. To test the new task, I using the iplanet's sample
helloworld source. In my build.xml I have the following target:
     <target name="stubs" depends="build">
    <ejbjar srcdir="${classes.dir}"
            basejarname="ncrmri"
            descriptordir="${basedir}/xmls">
       <iplanet destdir="${lib.dir}"
                iashome="${ias.home}"
                keepgenerated="no"
                debug="yes" >
            <classpath>
               <pathelement location="${classes.dir}" />
               <path refid="build.cpath" />
            </classpath>
       </iplanet>
    </ejbjar>
  </target>

The ejb-jar.xml is as shown,
   <?xml version="1.0" encoding="UTF-8"?>

<!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>
    <session>
      <display-name>TheGreeter</display-name>
      <ejb-name>TheGreeter</ejb-name>
      <home>samples.helloworld.ejb.GreeterHome</home>
      <remote>samples.helloworld.ejb.Greeter</remote>
      <ejb-class>samples.helloworld.ejb.GreeterEJB</ejb-class>
      <session-type>Stateless</session-type>
      <transaction-type>Bean</transaction-type>
    </session>
  </enterprise-beans>
  <assembly-descriptor>
    <container-transaction>
      <method>
        <ejb-name>TheGreeter</ejb-name>
        <method-name>*</method-name>
      </method>
      <trans-attribute>NotSupported</trans-attribute>
    </container-transaction>
  </assembly-descriptor>
</ejb-jar>

And the ias-ejb-jar.xml is as shown:
   <?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE ias-ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD iAS Enterprise
Java
Beans 1.0//EN'
'http://developer.iplanet.com/appserver/dtds/IASEjb_jar_1_0.dtd'>

<ias-ejb-jar>
  <enterprise-beans>
    <session>
      <ejb-name>TheGreeter</ejb-name>
      <guid>{bd498e60-3c98-11d4-a006-0010a4e78552}</guid>
      <pass-timeout>0</pass-timeout>
      <is-thread-safe>false</is-thread-safe>
      <pass-by-value>false</pass-by-value>
      <session-timeout>0</session-timeout>
    </session>
  </enterprise-beans>
</ias-ejb-jar>

The deployment tool seems to be looking one too many EJB in the descriptor
file.


Buildfile: build.xml

prepare:

build:

stubs:
EJBInfo...
EJB name: TheGreeter
              home:      samples.helloworld.ejb.GreeterHome
              remote:    samples.helloworld.ejb.Greeter
              impl:      samples.helloworld.ejb.GreeterEJB
              beantype:  stateless
              cmp:       false
              iiop:      false
              hasession: false
TheGreeter is up to date.
EJBInfo...
EJB name: TheGreeter
              home:      null
              remote:    null
              impl:      null
              beantype:  entity
              cmp:       false
              iiop:      false
              hasession: false

BUILD FAILED

/home/keith/tmp/helloworld/src/build.xml:166: An error has occurred while
trying to execute the iAS ejbc utility
--- Nested Exception ---
org.apache.tools.ant.taskdefs.optional.ejb.IPlanetEjbc$EjbcException: A home
interface was not found for the TheGreeter EJB.
        at
org.apache.tools.ant.taskdefs.optional.ejb.IPlanetEjbc$EjbInfo.checkConfigur
ation(Unknown Source)
        at
org.apache.tools.ant.taskdefs.optional.ejb.IPlanetEjbc$EjbInfo.access$000(Un
known Source)
        at
org.apache.tools.ant.taskdefs.optional.ejb.IPlanetEjbc.execute(Unknown
Source)
        at
org.apache.tools.ant.taskdefs.optional.ejb.IPlanetDeploymentTool.parseEjbFil
es(Unknown Source)
        at
org.apache.tools.ant.taskdefs.optional.ejb.GenericDeploymentTool.processDesc
riptor(Unknown Source)
        at
org.apache.tools.ant.taskdefs.optional.ejb.IPlanetDeploymentTool.processDesc
riptor(Unknown Source)
        at org.apache.tools.ant.taskdefs.optional.ejb.EjbJar.execute(Unknown
Source)
        at org.apache.tools.ant.Target.execute(Target.java:153)
        at org.apache.tools.ant.Project.runTarget(Project.java:908)
        at org.apache.tools.ant.Project.executeTarget(Project.java:536)
        at org.apache.tools.ant.Project.executeTargets(Project.java:510)
        at org.apache.tools.ant.Main.runBuild(Main.java:421)
        at org.apache.tools.ant.Main.main(Main.java:149)

Total time: 7 seconds

Has somebody had an sucesss with it?

Thanks
keith