facebook

Error when running XDoclet

  1. MyEclipse IDE
  2.  > 
  3. General Development
Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #205225 Reply

    mercatorgeo
    Member

    I’m currently porting a J2EE project from JBuilder to (My)Eclipse.
    This has introduced me to the need to use XDoclet for the EJB’s, since JBuilder uses a different mechanism to manage the ejb-jar.xml file.

    Please note that I am totally unfamiliar with XDoclet at the moment, I’ve just found out that I’ll have to update the sources for the beans with custom javadoc tags, specifying the EJB properties.

    I have a few questions:
    1) Is there an automated way to reverse-engineer the existing ejb-jar.xml file into XDoclet javadoc tags?

    2) I’ve added a “Standard EJB” XDoclet configuration to the EJB project. I don’t expect many results, as there are no xdoclet tags in my source, but when I run XDoclet using the context menu, an error appears:

    BUILD FAILED: Unable to load default ProjectHelper due to java.lang.NoClassDefFoundError: org/xml/sax/SAXParseException

    I’m running MyEclipse 3.7GA on Eclipse 3.0M7, with no other plugins installed.
    OS is Suse Linux 8.2

    To be able to run Eclipse 3.0, I have JDK 1.4.3 installed, and I run Eclipse using the -vm parameter.
    However, the project has IBMJava2-1.3.1 as a build target. Could that be the cause of some confusion for XDoclet (I noticed it needs at least Java 1.4)?

    #205226 Reply

    Riyad Kalla
    Member

    XDoclet 1.2 (what we support currently) should run on any Java2 platform, 1.3 included (see: http://xdoclet.sourceforge.net/install.html) but this does look like an install/PATH issue. Can you drop to your console and type ‘java -version’, what do you see? If you run Eclipse, go to Help->About and click on ‘Configuration Details’ and paste it in here for us to look at, that’d be great.

    #205229 Reply

    mercatorgeo
    Member

    java -version:
    java version “1.3.1”
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1-b24)
    Java HotSpot(TM) Client VM (build 1.3.1-b24, mixed mode)

    as for the config details, it’s quite big, so I’ll copy only things that seemed possibly relevant to me (ask for more if needed)
    JAVA related:

    java.awt.graphicsenv=sun.awt.X11GraphicsEnvironment
    java.awt.printerjob=sun.print.PSPrinterJob
    java.class.path=/opt/eclipse/startup.jar
    java.class.version=48.0
    java.endorsed.dirs=/usr/java/j2sdk1.4.1_03/jre/lib/endorsed
    java.ext.dirs=/usr/java/j2sdk1.4.1_03/jre/lib/ext
    java.home=/usr/java/j2sdk1.4.1_03/jre
    java.io.tmpdir=/tmp
    java.library.path=/usr/java/j2sdk1.4.1_03/jre/lib/i386/client:/usr/java/j2sdk1.4.1_03/jre/lib/i386:/usr/java/j2sdk1.4.1_03/jre/../lib/i386
    java.naming.factory.initial=org.apache.naming.java.javaURLContextFactory
    java.naming.factory.url.pkgs=org.apache.naming
    java.runtime.name=Java(TM) 2 Runtime Environment, Standard Edition
    java.runtime.version=1.4.1_03-b02
    java.specification.name=Java Platform API Specification
    java.specification.vendor=Sun Microsystems Inc.
    java.specification.version=1.4
    java.util.prefs.PreferencesFactory=java.util.prefs.FileSystemPreferencesFactory
    java.vendor=Sun Microsystems Inc.
    java.vendor.url=http://java.sun.com/
    java.vendor.url.bug=http://java.sun.com/cgi-bin/bugreport.cgi
    java.version=1.4.1_03
    java.vm.info=mixed mode
    java.vm.name=Java HotSpot(TM) Client VM
    java.vm.specification.name=Java Virtual Machine Specification
    java.vm.specification.vendor=Sun Microsystems Inc.
    java.vm.specification.version=1.0
    java.vm.vendor=Sun Microsystems Inc.
    java.vm.version=1.4.1_03-b02

    error log:
    !SESSION Mar 25, 2004 11:50:29.561 ———————————————
    java.version=1.4.1_03
    java.vendor=Sun Microsystems Inc.
    BootLoader constants: OS=linux, ARCH=x86, WS=gtk, NL=en_US
    Command-line arguments: -data /home/marijn/workspace
    !ENTRY org.eclipse.osgi Mar 25, 2004 11:50:29.562
    !MESSAGE Bundle reference:file:/opt/eclipse/plugins/org.eclipse.jdt.debug_3.0.0 [52] was not resolved
    !ENTRY org.eclipse.osgi Mar 25, 2004 11:50:29.577
    !MESSAGE Bundle reference:file:/opt/eclipse/plugins/org.eclipse.debug.ui_3.0.0 [68] was not resolved
    !ENTRY org.eclipse.team.cvs.core 4 0 Mar 25, 2004 14:12:26.578
    !MESSAGE Resource /Servlets2000/.xdoclet is not local.
    !STACK 1
    org.eclipse.core.internal.resources.ResourceException: Resource /Servlets2000/.xdoclet is not local.
    at org.eclipse.core.internal.resources.Resource.checkLocal(Resource.java:309)
    at org.eclipse.core.internal.resources.Resource.getSessionProperty(Resource.java:934)
    at org.eclipse.team.internal.ccvs.core.resources.FileModificationManager.isCleanUpdate(FileModificationManager.java:201)
    at org.eclipse.team.internal.ccvs.core.resources.FileModificationManager.resourceChanged(FileModificationManager.java:177)
    at org.eclipse.team.internal.ccvs.core.resources.FileModificationManager$1.visit(FileModificationManager.java:88)
    at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:67)
    at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:76)
    at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:76)
    at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:49)
    at org.eclipse.team.internal.ccvs.core.resources.FileModificationManager.resourceChanged(FileModificationManager.java:65)
    at org.eclipse.core.internal.events.NotificationManager$2.run(NotificationManager.java:255)
    at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:819)
    at org.eclipse.core.runtime.Platform.run(Platform.java:493)
    at org.eclipse.core.internal.events.NotificationManager.notify(NotificationManager.java:248)
    at org.eclipse.core.internal.events.NotificationManager.broadcastChanges(NotificationManager.java:142)
    at org.eclipse.core.internal.resources.Workspace.broadcastChanges(Workspace.java:154)
    at org.eclipse.core.internal.resources.Workspace.endOperation(Workspace.java:856)
    at org.eclipse.core.internal.resources.File.create(File.java:170)
    at org.eclipse.core.internal.resources.File.create(File.java:183)
    at org.jboss.ide.eclipse.xdoclet.run.configuration.ProjectConfigurations$1.run(ProjectConfigurations.java:146)
    at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:101)
    !ENTRY org.eclipse.core.resources 4 369 Mar 25, 2004 14:12:26.588
    !MESSAGE Resource /Servlets2000/.xdoclet is not local.
    !ENTRY org.eclipse.team.cvs.core 4 0 Mar 25, 2004 14:12:26.710
    !MESSAGE Resource /Servlets2000/xdoclet-build.xml is not local.
    !STACK 1
    org.eclipse.core.internal.resources.ResourceException: Resource /Servlets2000/xdoclet-build.xml is not local.
    at org.eclipse.core.internal.resources.Resource.checkLocal(Resource.java:309)
    at org.eclipse.core.internal.resources.Resource.getSessionProperty(Resource.java:934)
    at org.eclipse.team.internal.ccvs.core.resources.FileModificationManager.isCleanUpdate(FileModificationManager.java:201)
    at org.eclipse.team.internal.ccvs.core.resources.FileModificationManager.resourceChanged(FileModificationManager.java:177)
    at org.eclipse.team.internal.ccvs.core.resources.FileModificationManager$1.visit(FileModificationManager.java:88)
    at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:67)
    at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:76)
    at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:76)
    at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:49)
    at org.eclipse.team.internal.ccvs.core.resources.FileModificationManager.resourceChanged(FileModificationManager.java:65)
    at org.eclipse.core.internal.events.NotificationManager$2.run(NotificationManager.java:255)
    at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:819)
    at org.eclipse.core.runtime.Platform.run(Platform.java:493)
    at org.eclipse.core.internal.events.NotificationManager.notify(NotificationManager.java:248)
    at org.eclipse.core.internal.events.NotificationManager.broadcastChanges(NotificationManager.java:142)
    at org.eclipse.core.internal.resources.Workspace.broadcastChanges(Workspace.java:154)
    at org.eclipse.core.internal.resources.Workspace.endOperation(Workspace.java:856)
    at org.eclipse.core.internal.resources.File.create(File.java:170)
    at org.eclipse.core.internal.resources.File.create(File.java:183)
    at org.jboss.ide.eclipse.xdoclet.run.configuration.ProjectConfigurations$1.run(ProjectConfigurations.java:183)
    at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:101)
    !ENTRY org.eclipse.core.resources 4 369 Mar 25, 2004 14:12:26.714
    !MESSAGE Resource /Servlets2000/xdoclet-build.xml is not local.
    !ENTRY de.bb.bje.eclipse 4 1 Mar 25, 2004 14:41:06.583
    !MESSAGE JSP Compiler broken
    !STACK 1
    Java Model Exception: Java Model Status [helpfiles does not exist.]
    at org.eclipse.jdt.internal.core.JavaElement.newNotPresentException(JavaElement.java:525)
    at org.eclipse.jdt.internal.core.JavaModelManager.getPerProjectInfoCheckExistence(JavaModelManager.java:804)
    at org.eclipse.jdt.internal.core.JavaProject.getPerProjectInfo(JavaProject.java:1671)
    at org.eclipse.jdt.internal.core.JavaProject.getResolvedClasspath(JavaProject.java:1782)
    at org.eclipse.jdt.internal.core.JavaProject.getResolvedClasspath(JavaProject.java:1762)
    at de.bb.bje.eclipse.support.JspCompiler.getClassPath(Unknown Source)
    at de.bb.bje.eclipse.BejyPlugin.getClassLoader(Unknown Source)
    at de.bb.bje.eclipse.BejyPlugin.getCC(Unknown Source)
    at de.bb.bje.eclipse.editors.BJspEditor$1.run(Unknown Source)
    !ENTRY org.eclipse.jdt.core 4 969 Mar 25, 2004 14:41:06.583
    !MESSAGE helpfiles does not exist.

    The “Resource /Servlets2000/.xdoclet is not local.” has a different error message than was shown in the console, but this is the entire error log for today !?

    #205236 Reply

    Scott Anderson
    Participant

    First, this problem is caused by a configuration problem within the XML processing environment being used by XDoclet. I believe your first thought that it may be caused by targeting the IBM 1.3.1 JDK for the project to be a good place to start. Can you try creating a simple EJB jar project that targets JDK 1.4.1 and then see if XDoclet behaves differently when run for that project?

    #205242 Reply

    mercatorgeo
    Member

    OK it’s getting weirder here….

    If I use project -> rebuild all (rebuild per project is alway disabled?)
    then XDoclet seems to run. For all 6 projects that have an XDoclet section in the project properties, a console is shown with the message

    Buildfile: /home/marijn/workspace/Servlets2000/xdoclet-build.xml

    _generation_:
    BUILD SUCCESSFUL
    Total time: 602 milliseconds

    But after the build completes, I get a popup saying:

    Build problems
    Errors during build.
    Ant build /home/marijn/workspace/RoofEJB/xdoclet-build.xml already in progress. Concurrent Ant builds are possible if you specify to build in a separate JRE.

    This is after I’ve removed the “standard EJB” from the EJB project, so now I don’t have any XDoclet configuration in any of the projects in the workspace. Still, since I’ve viewed the project properties, a lot of XDoclet specific files are resent in the projects.
    Why are these not removed?

    When I ran “rebuild all projects” with a “standard EJB” XDoclet configuration on the EJB project, XDoclet would also run, (even creating EJB helper classes althoug no javadoc tags are present) but crash halfway through the process. This generated a lot of .java files, that were incomplete (these files contain only the file header up to the opening brace for the class)

    [edit]
    Scott. I missed your reply, the above is still with the 1.4/1.3 mixup. I’ll try a pure 1.4 project now
    [/edit]

    #205245 Reply

    mercatorgeo
    Member

    Next part of the story: I switched the Build/Run JRE to 1.4 (the project compiles fine in 1.4), and now XDoclet rran from the context menu as well as whe I used project > rebuild all.

    After switching back, XDoclet crashes with the ClassNotFoundException if run from the context menu (MyEclipse > run XDoclet) but it starts normally when I use project > rebuild all (Even if the results from running are very weird, but I’ll open a new topic for that).
    It seems that a different VM is passed to XDoclet when called from the context menu as opposed to the general rebuild.

    #205253 Reply

    Scott Anderson
    Participant

    It seems that a different VM is passed to XDoclet when called from the context menu as opposed to the general rebuild.

    Wow, now that is weird. So, in short setting the project up to JRE 1.4 causes everything to work properly, but using IBM’s 1.3.1 JDK causes problems. Right?

    #205256 Reply

    mercatorgeo
    Member

    @scott wrote:

    Wow, now that is weird. So, in short setting the project up to JRE 1.4 causes everything to work properly, but using IBM’s 1.3.1 JDK causes problems. Right?

    Right. But only for the XDoclet runner called from the context menu in the navigator pane. If XDoclet is run (using JDK 131) as a part of the rebuild all projects action, it does run, but concurrently for all projects configured with XDoclet, causing concurrency problems with ANT

    #205267 Reply

    Scott Anderson
    Participant

    If XDoclet is run (using JDK 131)

    This is an unsupported case for Eclipse 3.0 builds because Eclipes 3.0 mandates you use JDK 1.4.1 or later for all operations.

    it does run, but concurrently for all projects configured with XDoclet, causing concurrency problems with ANT

    The Eclipse team is still working on getting the deadlock and race conditions eliminated from the multi-threading code. It’s quite fragile at the moment. Hopefully M8 will help a bit here.

    #205272 Reply

    mercatorgeo
    Member

    @scott wrote:

    This is an unsupported case for Eclipse 3.0 builds because Eclipes 3.0 mandates you use JDK 1.4.1 or later for all operations.

    I run Eclipse with the -vm parameter, specifying the 1.4 JDK.
    But my project needs 1.3.1 for the target webserver. That should not be a problem, right? I just specify 1.3.1 as the target JRE.

    What happens then, is that apparently for some reason, ANT/XDoclet also run under the 1.3.1 JRE. That should not happen, because I’ve specified -vm1.4.1

    #205692 Reply

    Marko
    Member

    @mercatorgeo wrote:

    …when I run XDoclet using the context menu, an error appears:

    BUILD FAILED: Unable to load default ProjectHelper due to java.lang.NoClassDefFoundError: org/xml/sax/SAXParseException

    I’m running MyEclipse 3.7GA on Eclipse 3.0M7, with no other plugins installed.

    Solution (at least it helped me :wink:):
    Go to Window>>Preferences>>Ant>>Runtime>>Classpath>>Ant Home Entries and add these 2 External JARs:

      %ECLIPSE_HOME%\plugins\org.apache.xerces_4.0.13\xercesImpl.jar
      %ECLIPSE_HOME%\plugins\org.apache.xerces_4.0.13\xmlParserAPIs.jar

    …where %ECLIPSE_HOME% is your base Eclipse directory (e.g. C:\Eclipse)

    #232556 Reply

    janina.cosma
    Member

    Hi,

    Thank you for the answer, inter1marko, it also helped me.

    Janina

Viewing 12 posts - 1 through 12 (of 12 total)
Reply To: Error when running XDoclet

You must be logged in to post in the forum log in