ok, I found the error.  I needed an application.xml describing the ear
file:

=============== 
<!DOCTYPE application PUBLIC '-//Sun Microsystems, Inc.//DTD J2EE
Application 1.3//EN' 'http://java.sun.com/dtd/application_1_3.dtd'>
<application>
  <display-name></display-name>
  <module>
    <web>
      <web-uri>MyToolsWeb.war</web-uri>
      <context-root>mytools</context-root>
    </web>
  </module>
  <module>
    <ejb>MyToolsEJB.jar</ejb>
  </module>
</application>
=============== 

and I needed to add a target to put the application.xml into the
appropriate dir:
=============== 
  <target name="app-init">
    <!-- Create the build directory structure used by compile and copy
the deployment descriptors into it-->
    <mkdir dir="${dist}/META-INF"/>
  </target>

  <target name="copy-application-xml">
        <copy todir="${dist}/META-INF">
            <fileset dir="${src}/${meta.home}"
includes="application.xml" />
        </copy>
  </target> 
  

  <target name="ear" depends="build.jar, build.war, app-init,
copy-application-xml">
        <jar 
                        jarfile="${dist}/${app.earname}" 
                        basedir="${dist}" 
 
excludes="**/${nonejbcompiled.jarname},**/${common.jarname},**/${meta.ho
me}/**" 
                update="yes"/>
  </target>
=============== 

> -----Original Message-----
> From: Walter Moore [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, September 12, 2007 7:38 AM
> To: user@ant.apache.org
> Subject: RE: clientgen error: Could not find ejbjar for component 
> 
> I'm sending this again, because I never saw it come accross. 
>  
> 
>       
>       
>       
>       I hope this is the right list for this problem. If not, please
> forgive me.
>        
>       I'm having a problem using clientgen. It complains that it can
> not find 'ejbjar'.
>        
>       Have you seen this error before?
>       
>       ==============================================
>       [clientgen] Generating client jar for MyTools.ear ...
>        
>       BUILD FAILED
>       file:c:/opt/MyTools/build.xml:260:
> weblogic.webservice.tools.build.WSBuildException: Could not 
> find ejbjar
> for component MyTools in ear
>       
>       ==============================================
>       
>       
>       
>       I am using weblogic 8.1 sp3 and java 1.4.2_12
>       
>       Here is the weblogic-ejb-jar.xml:
>       ==============================================
>       <weblogic-ejb-jar>
>         <weblogic-enterprise-bean>
>              <ejb-name>MyTools</ejb-name>
>              <enable-call-by-reference>True</enable-call-by-reference>
>              <jndi-name>MyTools</jndi-name>
>         </weblogic-enterprise-bean>
>       
>         <weblogic-enterprise-bean>
>           <ejb-name>UtilEJB</ejb-name>
>           <local-jndi-name>Util</local-jndi-name>
>         </weblogic-enterprise-bean>
>       </weblogic-ejb-jar>
>       
>       ==============================================
>       
>       
>       
>       Here is the ejb-jar.xml:
>       ==============================================
>       <ejb-jar>
>         <enterprise-beans>
>           <session>
>             <ejb-name>MyTools</ejb-name>
>             <home>MyPackage.webservices.MyToolsHome</home>
>             <remote>MyPackage.webservices.MyToolsRemote</remote>
>             <ejb-class>MyPackage.webservices.MyTools</ejb-class>
>             <session-type>Stateless</session-type>
>             <transaction-type>Container</transaction-type>
>             <ejb-local-ref>
>               <ejb-ref-name>ejb/Util</ejb-ref-name>
>               <ejb-ref-type>Session</ejb-ref-type>
>               <local-home>MyPackage.util.UtilLocalHome</local-home>
>               <local>MyPackage.util.UtilLocal</local>
>               <ejb-link>UtilEJB</ejb-link>
>             </ejb-local-ref>
>           </session>
>       
>           <session>
>             <ejb-name>UtilEJB</ejb-name>
>             <local-home>MyPackage.util.UtilLocalHome</local-home>
>             <local>MyPackage.util.UtilLocal</local>
>             <ejb-class>MyPackage.util.UtilEJB</ejb-class>
>             <session-type>Stateless</session-type>
>             <transaction-type>Container</transaction-type>
>           </session>
>         </enterprise-beans>
>         <assembly-descriptor>
>           <container-transaction>
>             <method>
>               <ejb-name>MyTools</ejb-name>
>               <method-name>*</method-name>
>             </method>
>             <trans-attribute>Required</trans-attribute>
>           </container-transaction>
>           <container-transaction>
>             <method>
>               <ejb-name>UtilEJB</ejb-name>
>               <method-name>*</method-name>
>             </method>
>             <trans-attribute>Required</trans-attribute>
>           </container-transaction>
>         </assembly-descriptor>
>       </ejb-jar>
>       ==============================================
>       
>       
>       
>       Here are the relevant build.xml targets:
>       
>       ==============================================
>       <target name="generate.type.info.xml">     
>          <autotype  
>             javaComponents="MyPackage.webservices.MyToolsRemote"
>          targetNamespace="http://myhost.mydomain.com";
>          packageName="MyPackage.webservices.types"  
>          keepgenerated="False"
>          destDir="${build}" >   
>           <classpath refid="build.classpath.builddir" />
>          </autotype>
>       </target>
>       <target name="generate.webservices.xml">     
>            <source2wsdd 
>       
> javaSource="${src}/${meta.home}/webservices/MyTools.java"     
>                 ejbLink="MyToolsEJB.jar#MyTools"      
>                 ddFile="${build}/WEB-INF/web-services.xml"    
>                 typesInfo="${build}/types.xml"        
>                 serviceURI="/MyTools"         
>                 sourcePath="{build}" >        
>               <classpath refid="build.classpath.builddir" />
>             </source2wsdd>
>       </target>
>       <target name="generate.client.jar">
>         <clientgen 
>               autotype="False"
>               ear="${dist}/${app.earname}"
>               serviceName="MyTools" 
>               warName="${servlet.warname}"
>               packageName="MyPackage.webservices.client"
>               useServerTypes="True"
>               clientJar="${dist}/MyToolsClient.jar" >
>               <classpath refid="build.classpath" />
>         </clientgen>
>       </target>
>       ==============================================
>       thanks,
>       Walter Moore
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to