GeeCON Prague 2014*
The moose likes JBoss/WildFly and the fly likes XDoclet Error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "XDoclet Error" Watch "XDoclet Error" New topic
Author

XDoclet Error

Bianca Wade
Greenhorn

Joined: Nov 19, 2005
Posts: 5
I am currently going through a tutorial to get the JBoss IDE working. I set up the XDoclet Configuration, but I get the following error in the console:

BUILD FAILED
java.lang.UnsupportedClassVersionError: xjavadoc/ant/XJavadocTask (Unsupported major.minor version 49.0)

In the file xdoclet-build.xml, this line is where the error occurs
<taskdef classpathref="xdoclet.classpath" classname="xdoclet.modules.ejb.EjbDocletTask" name="ejbdoclet"/>
saying that the "Task could not be defined within the Ant Editor context"

Any tips?
Alejandro Almeida Ruiz
Greenhorn

Joined: Nov 28, 2005
Posts: 1
check what version of XDoclet you are using.
i dont know what are you doing, I supose that you are trying to make the generation of interfaces for an ejb cmp. If you are doing that, check the version of ejb that you are using. For ejb 2.1 you have to use xdoclet 1.2.3, and you have to override the files of xdoclet in jboss pluggin libs inside jboss.xdoclet.core 1.4.... or something like that inside plugins of eclipse. After that you have to go in eclipse to windows->prefe..->jbossIde-> xdoclet-> and refresh xdoclet for update your eclipse xdoclet to 1.2.3.

Another way is using ant files with ant_home, xdoclet_home variables but is more complicate
Stephen Parry
Greenhorn

Joined: Dec 09, 2005
Posts: 1
OK, I have a way round this one but it's not easy.

Basically there is one jar compiled with 1.5 instead of 1.4 that I have found so far. It does not use any 1.5 features itself, although it allows javadoc generation for 1.5 source code! It can therefore be readily recompiled for 1.4. Here are brief instructions.

PLEASE NOTE: ignore all references to Maven in the release notes etc for xjavadoc. The Maven build appears to be totally broken with all versions of Maven. Use cvs and ant.

Use CVS to get the source for xjavadoc:

md /cvswork
cd /cvswork
cvs -d server:anonymous@cvs.sourceforge.net:/cvsroot/xdoclet checkout -P -D "2005-06-11 12:33" -- xjavadoc

Hit enter for the password.

Ensure you have Ant 1.6.5 on your system
Ensure you have junit.jar from junit3.8.1 on your classpath or in %ANT_HOME%/lib
Ensure your 1.4 java runtime is the first on the path etc.
execute ant to build the jar:

cd /cvswork/xjavadoc
ant

If all works you should get:
/cvswork/xjavadoc/target/xjavadoc-1.5-snapshot.jar

rename it to:
xjavadoc-1.5-snapshot050611.jar

copy it over the one in %ECLIPSE_HOME%/plugins/org.jboss.ide.eclipse.xdoclet.core_1.5.0.RC1

BEWARE: I have only conducted the most cursory testing on this patch, but xdoclet now runs where as before it did not.
Bianca Wade
Greenhorn

Joined: Nov 19, 2005
Posts: 5
Honestly, I didn't understand that, but I figured it out. I'm using the Eclipse IDE, and my problem was in the configuration. I went through a tutorial which explained how to add the configuration. What it didn't say is to add the standards for the web and ejb.
Ken Loh
Ranch Hand

Joined: Feb 16, 2005
Posts: 190
Come again ?

Originally posted by Bianca Wade:
Honestly, I didn't understand that, but I figured it out. I'm using the Eclipse IDE, and my problem was in the configuration. I went through a tutorial which explained how to add the configuration. What it didn't say is to add the standards for the web and ejb.
Eric Soyke
Greenhorn

Joined: Feb 02, 2006
Posts: 1
I ran into this same issue trying to run XDoclets on Eclipse (w/MyEclipse plugin). If you are using MyEclipse, make sure to check the JDK setting for XDoclet (where you would add Standard EJB as he was saying). Right click on the project->properties->MyEclipse-XDoclet->Build tab. Make sure the Java Language Support value wasn't somehow set to 1.5 (and you are compiling/running 1.4.2 or earlier).
[ February 02, 2006: Message edited by: Eric Soyke ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: XDoclet Error