ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antoine Levy Lambert <anto...@gmx.de>
Subject Re: ejbgen fails with 1.6
Date Mon, 14 Dec 2009 14:20:09 GMT
Hello Martin,

I am not sure I follow 100 % of what you wrote. Did you find a bug in 
ant ? or is the bug elsewhere ?

Regards,

Antoine


Martin Gainty wrote:
> http://download.oracle.com/docs/cd/E13226_01/workshop/docs81/doc/en/core/index.html
>
> the documentation states:
> The name of the Recording bean is given in the definition of that bean:
>
>   /**
>  * @ejbgen:entity prim-key-class="bands.RecordingBeanPK" 
>  *   ejb-name = "Recording"
>  *   data-source-name="cgSampleDataSource"
>  *   table-name="recording_Sample"
>  *   abstract-schema-name = "Recording"
>  *
>  * ...
> */
> abstract public class RecordingBean extends GenericEntityBean implements EntityBean
> {
>   //put something useful here
> }
>
> //and here is the ant script target we need to invoke
> <!-- build split-dir components -->
>   <target name="build.split.dir" depends="banner, prepare">
>     <!-- Build worker components first -->
>     <wlcompile srcdir="${medrec.ear.src.dir}" destdir="${dest.dir}"
>                includes="entityEjbs, mainWebApp">
>       <!-- ejbgen source="${sourceVersion}"/ -->
>       <ejbgen outputdir="ejb-gen" forceGeneration="no" source="1.6">
>       <classpath>
>         <pathelement location="$WL_HOME/tools/eclipse_pkgs/1.1/pkgs\eclipse/plugins/com.bea.workshop.upgrade81.thirdparty_1.0.20.200904250235\lib\ejbgen.jar"/>
>         <pathelement location="$WL_HOME/samples/server/medrec/build/swing_client/wsclient"/>
>         <pathelement location="$WL_HOME/samples/server/medrec/build/medrec/controller"/>
>       </classpath>
>       <fileset dir="$WL_HOME/samples/server/medrec/src/medrecEar/entityEjbs/com/bea/medrec/entities"
includes="VitalSignsEJB.ejb" />
>       <fileset dir="$WL_HOME/samples/server/medrec/src/medrecEar/entityEjbs/com/bea\medrec/entities"
includes="PhysicianEJB.ejb" />
>       <fileset dir="$WL_HOME/samples/server/medrec/src/medrecEar/entityEjbs/com\bea\medrec/entities"
includes="PrescriptionEJB.ejb" />
>       <fileset dir="$WL_HOME/samples/server/medrec/src/medrecEar/entityEjbs/com/bea/medrec/entities"
includes="RecordEJB.ejb" />
>       <fileset dir="$WL_HOME/samples/server/medrec/src/medrecEar/entityEjbs/com/bea\medrec/entities"
includes="GroupEJB.ejb" />
>       <fileset dir="$WL_HOME/samples/server/medrec/src/medrecEar/entityEjbs/com/bea\medrec/entities"
includes="PatientEJB.ejb" />
>       <fileset dir="$WL_HOME/samples/server/medrec/src/medrecEar/entityEjbs/com/bea/medrec/entities"
includes="RecordingBean.ejb" />
>       </ejbgen>
>   
> produces this exception:
> build.split.dir:
>    [ejbgen] Exception in thread "main" java.lang.RuntimeException: Unknown javad
> oc problem: result=1, root=null:
>    [ejbgen] Loading source file $TEMP/RecordingBean.java...
>    [ejbgen] $TEMP/RecordingBean.java:13: illegal start of type
>    [ejbgen]    ...
>    [ejbgen]    ^
>    [ejbgen] $TEMP/RecordingBean.java:13: ';' expected
>    [ejbgen]    ...
>    [ejbgen]       ^
>    [ejbgen] $TEMP/RecordingBean.java:14: reached end of file while parsing
>    [ejbgen] }
>    [ejbgen]  ^
>    [ejbgen] 3 errors
>
>    [ejbgen]     at com.bea.util.jam.internal.javadoc.JavadocRunner.run(JavadocRu
> nner.java:154)
>    [ejbgen]     at com.bea.util.jam.internal.javadoc.JavadocClassBuilder.initJav
> adoc(JavadocClassBuilder.java:269)
>    [ejbgen]     at com.bea.util.jam.internal.javadoc.JavadocClassBuilder.init(Ja
> vadocClassBuilder.java:96)
>    [ejbgen]     at com.bea.util.jam.provider.CompositeJamClassBuilder.init(Compo
> siteJamClassBuilder.java:45)
>    [ejbgen]     at com.bea.util.jam.provider.JamServiceFactoryImpl.createBuilder
> (JamServiceFactoryImpl.java:178)
>    [ejbgen]     at com.bea.util.jam.provider.JamServiceFactoryImpl.createClassLo
> ader(JamServiceFactoryImpl.java:137)
>    [ejbgen]     at com.bea.util.jam.provider.JamServiceFactoryImpl.createService
> (JamServiceFactoryImpl.java:78)
>    [ejbgen]     at com.bea.sgen.loader.JClassLoaderImpl.load(JClassLoaderImpl.ja
> va:107)
>    [ejbgen]     at com.bea.sgen.SGen.run(SGen.java:190)
>    [ejbgen]     at com.bea.wls.ejbgen.EJBGen.main(EJBGen.java:212)
>    [ejbgen]     at com.bea.wls.ejbgen.EJBGen.main(EJBGen.java:238)
>    [ejbgen]     at weblogic.tools.ejbgen.EJBGen.main(EJBGen.java:21)
>     [javac] Compiling 9 source files to E:\Weblogic\WEBLOG~3\wlserver_10.0\sampl
>
> //commenting out the last test RecordingBeanEJB.ejb 
> build.split.dir:
>    [ejbgen] EJBGen WebLogic Server 10.0 SP2  Sat Apr 25 01:45:38 EDT 2009 121394
> 2
>    [ejbgen]  Warning:  No EJBGen file found!
>     [javac] Compiling 8 source files to E:\Weblogic\WEBLOG~3\wlserver_10.0\sampl
> es\server\medrec\build\medrecEar\entityEjbs
>    [ejbgen] EJBGen WebLogic Server 10.0 SP2  Sat Apr 25 01:45:38 EDT 2009 121394
> 2
>
>    [ejbgen]  Creating E:\Weblogic\WEBLOG~3\wlserver_10.0\samples\server\medrec\b
> uild\medrecEar\sessionEjbs\com\bea\medrec\controller\AdminSessionHome.java
>    [ejbgen]  Creating E:\Weblogic\WEBLOG~3\wlserver_10.0\samples\server\medrec\b
> uild\medrecEar\sessionEjbs\com\bea\medrec\controller\RecordSessionHome.java
>    [ejbgen]  Creating E:\Weblogic\WEBLOG~3\wlserver_10.0\samples\server\medrec\b
> uild\medrecEar\sessionEjbs\com\bea\medrec\controller\PatientSessionHome.java
>    [ejbgen]  Creating E:\Weblogic\WEBLOG~3\wlserver_10.0\samples\server\medrec\b
> uild\medrecEar\sessionEjbs\com\bea\medrec\controller\MailSessionHome.java
>    [ejbgen]  Creating E:\Weblogic\WEBLOG~3\wlserver_10.0\samples\server\medrec\b
> uild\medrecEar\sessionEjbs\com\bea\medrec\controller\AdminSession.java
>    [ejbgen]  Creating E:\Weblogic\WEBLOG~3\wlserver_10.0\samples\server\medrec\b
> uild\medrecEar\sessionEjbs\com\bea\medrec\controller\RecordSession.java
>    [ejbgen]  Creating E:\Weblogic\WEBLOG~3\wlserver_10.0\samples\server\medrec\b
> uild\medrecEar\sessionEjbs\com\bea\medrec\controller\PatientSession.java
>    [ejbgen]  Creating E:\Weblogic\WEBLOG~3\wlserver_10.0\samples\server\medrec\b
> uild\medrecEar\sessionEjbs\com\bea\medrec\controller\MailSession.java
>    [ejbgen]  Creating E:\Weblogic\WEBLOG~3\wlserver_10.0\samples\server\medrec\b
> uild\medrecEar\sessionEjbs\\ejb-jar.xml
>    [ejbgen] /C:/TEMP/com/bea/medrec/controller/AdminSessionEJB.java:82: Warning:
>   EJB Local Reference 'ejb/local/prescription' doesn't have a JNDI name.  Not ge
> nerating <ejb-local-reference-descriptor> for it.
>
>
> //i thought the folks at weblogic might have mis-interpreted the doc
> //so i went back to the original testcase from cedric
> http://beust.com/ejbgen
>
> java -classpath ejbgen.jar;$JAVA_HOME/lib/tools.jar;$WL_HOME/samples/domains/medrec/security/MedRecDBMSPlugin.jar;$WL_HOME/server/lib/weblogic.jar;$WL_HOME/samples/server/medrec/build/swing_client/wsclient;$WL_HOME/samples/server/medrec/build/medrecEar/sessionEjbs;$WL_HOME/samples/server/medrec/build/medrecEar/entityEjbs;$WL_HOME/samples/domains/medrec/security/MedRecDBMSPlugin.jar;$WL_HOME/server/lib/weblogic.jar;%CLASSPATH%;$JAVAMAIL_HOME/mail-1.3.3.jar;$JAF_HOME/jaf-1.1/activation.jar;$AXIS_2_15/lib/axis2-codegen-1.5.jar;.;$ANT_HOME/lib/ant.jar;$JUNIT_HOME/junit-4.7.jar;%CLASSPATH%
 
> weblogic.tools.ejbgen.EJBGen AccountBean.java
>
> Exception in thread "main" java.lang.NoSuchMethodError: com.sun.javadoc.Annotati
> onDesc.memberValues()[Lcom/sun/javadoc/AnnotationDesc$MemberValuePair;
>         at com.bea.util.jam.internal.java15.Javadoc15DelegateImpl.populateAnnota
> tion(Javadoc15DelegateImpl.java:93)
>         at com.bea.util.jam.internal.java15.Javadoc15DelegateImpl.extractAnnotat
> ions(Javadoc15DelegateImpl.java:85)
>         at com.bea.util.jam.internal.java15.Javadoc15DelegateImpl.extractAnnotat
> ions(Javadoc15DelegateImpl.java:60)
>         at com.bea.util.jam.internal.javadoc.JavadocClassBuilder.addAnnotations(
> JavadocClassBuilder.java:338)
>         at com.bea.util.jam.internal.javadoc.JavadocClassBuilder.populate(Javado
> cClassBuilder.java:246)
>         at com.bea.util.jam.internal.javadoc.JavadocClassBuilder.populate(Javado
> cClassBuilder.java:211)
>         at com.bea.util.jam.provider.CompositeJamClassBuilder.populate(Composite
> JamClassBuilder.java:62)
>         at com.bea.util.jam.internal.JamClassLoaderImpl.loadClass(JamClassLoader
> Impl.java:95)
>         at com.bea.util.jam.annotation.AnnotationProxy.initFromJavadocTag(Annota
> tionProxy.java:137)
>         at com.bea.util.jam.internal.elements.AnnotatedElementImpl.addAnnotation
> ForTag(AnnotatedElementImpl.java:158)
>         at com.bea.util.jam.internal.javadoc.JavadocClassBuilder.addAnnotations(
> JavadocClassBuilder.java:332)
>         at com.bea.util.jam.internal.javadoc.JavadocClassBuilder.populate(Javado
> cClassBuilder.java:246)
>         at com.bea.util.jam.internal.javadoc.JavadocClassBuilder.populate(Javado
> cClassBuilder.java:230)
>         at com.bea.util.jam.internal.javadoc.JavadocClassBuilder.populate(Javado
> cClassBuilder.java:214)
>         at com.bea.util.jam.provider.CompositeJamClassBuilder.populate(Composite
> JamClassBuilder.java:62)
>         at com.bea.util.jam.internal.JamClassLoaderImpl.loadClass(JamClassLoader
> Impl.java:95)
>         at com.bea.util.jam.internal.JamServiceImpl.getAllClasses(JamServiceImpl
> .java:67)
>         at com.bea.sgen.SGen.loadClassesNew(SGen.java:331)
>         at com.bea.sgen.SGen.run(SGen.java:187)
>         at com.bea.wls.ejbgen.EJBGen.main(EJBGen.java:303)
>         at com.bea.wls.ejbgen.EJBGen.main(EJBGen.java:311)
>         at weblogic.tools.ejbgen.EJBGen.main(EJBGen.java:21)
>
> and the contents of the 1.6 tools.jar javap ./com/sun/javadoc/AnnotationDesc
> Compiled from "AnnotationDesc.java"
> public interface com.sun.javadoc.AnnotationDesc{
>     public abstract com.sun.javadoc.AnnotationTypeDoc annotationType();
>     public abstract com.sun.javadoc.AnnotationDesc$ElementValuePair[] elementVal
> ues();
> }
>
> its clear ElementValuePair has substituted in memberValuePair 
> com.sun.javadoc.Annotati
> onDesc.memberValues()[Lcom/sun/javadoc/AnnotationDesc$MemberValuePair;
> this is a P1 bug
> Environment:
> ANT 1.71
>
> Weblogic 10.3
>
> java -version
> java version "1.6.0_16"
> Java(TM) SE Runtime Environment (build 1.6.0_16-b01)
> Java HotSpot(TM) Client VM (build 14.2-b01, mixed mode)
>
> I will file a JIRA
>
> thank you
> Martin Gainty 
> ______________________________________________ 
> please do not alter/modify or dirsupt this transmission
>
>
>  		 	   		  
> _________________________________________________________________
> Your E-mail and More On-the-Go. Get Windows Live Hotmail Free.
> http://clk.atdmt.com/GBL/go/171222985/direct/01/
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message