• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem in Maven2 pom for converting ejb2.1 project into sources.

 
Conan King
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I have a strange problem, Am trying to build a ejb 2.1 project in maven. we use Weblogic 9.2 server and the ejb components use annotations.

Using Ant build xml the following code runs fine and generates the home and remote interfaces:

<path id="dependencyfinder">
<pathelement location="${BEA_HOME}/jdk150_06/lib/tools.jar"/>
<pathelement location="${BEA_HOME}/weblogic92/server/lib/weblogic.jar"/>
<pathelement location="${BEA_HOME}/weblogic92/server/lib/webservices.jar"/>
<pathelement location="${BEA_HOME}/weblogic92/server/lib/wls-api.jar"/>
<pathelement location="${BEA_HOME}/weblogic92/server/lib/api.jar"/>
</path>



<taskdef name="ejbgen" classname="com.bea.wls.ejbgen.ant.EJBGenAntTask">
<classpath refid="dependencyfinder"/>
</taskdef>
<target name="ejb-generate">
<ejbgen source="1.5" outputDir = "C:\workspace\eclipseworkspace\demoEJB\testEJB\.apt_src"
descriptorDir = "C:\workspace\eclipseworkspace\demoEJB\testEJB\src\main\java\META-INF"
forceGeneration = "true">

<fileset dir="C:\workspace\eclipseworkspace\demoEJB\testEJB\src\main\java" includes="**/*Bean.java" />
</ejbgen>
</target>


However the same thing called from maven gives compilation errors due to annotations:

Maven code:


<configuration>
<tasks>

<path id="dependencyfinder">
<pathelement location="${BEA_HOME}/jdk150_06/lib/tools.jar"/>
<pathelement location="${BEA_HOME}/weblogic92/server/lib/weblogic.jar"/>
<pathelement location="${BEA_HOME}/weblogic92/server/lib/webservices.jar"/>
<pathelement location="${BEA_HOME}/weblogic92/server/lib/wls-api.jar"/>
<pathelement location="${BEA_HOME}/weblogic92/server/lib/api.jar"/>
</path>

<taskdef name="ejbgen" classname="com.bea.wls.ejbgen.ant.EJBGenAntTask">
<classpath refid="dependencyfinder"/>
</taskdef>
<echo message="!!!EJBGEN - REMOTE / HOME GENERATION!!!"/>

<ejbgen source="1.5" outputDir = "${basedir}\.apt_src"
descriptorDir = "${basedir}\src\main\java\META-INF"
forceGeneration = "true">

<fileset dir="${basedir}\src\main\java" includes="**/*Bean.java" />
</ejbgen>

</tasks>
</configuration>

The error given is like this:

[JAM] Error: unexpected exception thrown:
com.bea.util.jam.internal.javadoc.JavadocParsingException: Parsing failure in C:\workspace\eclipseworkspace\demoEJB
.java at line 18. Most likely, an annotation is declared whose type has not been imported.

If anybody has faced such problems with annotations in ejb projects in WL 9.2 please let me know.
 
Jim Yingst
Wanderer
Sheriff
Posts: 18671
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Look, I'm a fan of Robert E. Howard too. But maybe you missed our JavaRanch display name policy. If you must hide your real identity, choose something less obvious. Thanks.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic