- This topic has 6 replies, 2 voices, and was last updated 19 years, 5 months ago by
Greg.
-
AuthorPosts
-
mwkohoutMemberI’m using ME’s xdoclet generation functionality to generate my session ejb home and remote interfaces and ejb-jar.xml and jboss.xml.
Within the IDE, by right clicking the project and selecting to run the MyEclipse->Run XDoclet menu item, it appears that all my files are being properly generated.
However, when I take the ant build file that MyEclipse generates(by requesting that MyEclipse generate a xdoclet-build.xml file, within the Build Pane of the Project’s XDoclet configuration) and run it outside the IDE it fails to work correctly-it no longer updates the remote or home interfaces, and the ejb-jar.xml and jboss.xml file are generated incorrectly(ejb-jar.xml appears to be a template of the real thing, without any declarations of the beans I’ve created–all stateless session beans and ditto for the jboss.xml).
In summary, given that MyEclipse seems to be generating this stuff fine(thus my xdoclet markup in the java files must be fine), why is this failing? Am I using a version of ant that’s too old?
The ant I’m using on the command line is version 1.6.2 and the xdoclet version is from the xdoclet included with my version of ME, com.genuitec.jboss.ide.eclipse.xdoclet.core_4.0.0.
I’ll post a follow up with the exact error message.
here’s my MyEclipse setup info:
*** Date: Mon Nov 21 17:04:42 CST 2005*** System properties:
OS=WindowsXP
OS version=5.1
Java version=1.4.2_08*** MyEclipse details:
MyEclipse Enterprise WorkbenchVersion: 4.0.2 GA
Build id: 20051010-4.0.2-GA*** Eclipse details:
Eclipse SDKVersion: 3.1.1
Build id: M20050929-0840Eclipse Platform
Version: 3.1.1
Build id: M20050929-0840Eclipse RCP
Version: 3.1.1
Build id: M20050929-0840Eclipse Java Development Tools
Version: 3.1.1
Build id: M20050929-0840Eclipse Plug-in Development Environment
Version: 3.1.1
Build id: M20050929-0840Eclipse Project SDK
Version: 3.1.1
Build id: M20050929-0840Eclipse startup command=-os
win32
-ws
win32
-arch
x86
-launcher
D:\eclipse3.1.1\eclipse\eclipse.exe
-name
Eclipse
-showsplash
600
-exitdata
274_58
-vm
C:\WINDOWS\system32\javaw.exe
mwkohoutMember[ejbdoclet] Nov 21, 2005 5:03:13 PM xdoclet.XDocletMain start
[ejbdoclet] INFO: Running <remoteinterface/>
[ejbdoclet] Nov 21, 2005 5:03:14 PM xdoclet.XDocletMain start
[ejbdoclet] INFO: Running <homeinterface/>
[ejbdoclet] Nov 21, 2005 5:03:14 PM xdoclet.XDocletMain start
[ejbdoclet] INFO: Running <dataobject/>
[ejbdoclet] Nov 21, 2005 5:03:15 PM xdoclet.XDocletMain start
[ejbdoclet] INFO: Running <entitypk/>
[ejbdoclet] Nov 21, 2005 5:03:15 PM xdoclet.XDocletMain start
[ejbdoclet] INFO: Running <entitycmp/>
[ejbdoclet] Nov 21, 2005 5:03:15 PM xdoclet.XDocletMain start
[ejbdoclet] INFO: Running <entitybmp/>
[ejbdoclet] Nov 21, 2005 5:03:15 PM xdoclet.XDocletMain start
[ejbdoclet] INFO: Running <deploymentdescriptor/>
[ejbdoclet] Generating EJB deployment descriptor (ejb-jar.xml).
[ejbdoclet] Nov 21, 2005 5:03:16 PM xdoclet.XDocletMain start
[ejbdoclet] SEVERE: Running XDoclet failed.
[ejbdoclet] Nov 21, 2005 5:03:16 PM xdoclet.XDocletMain start
[ejbdoclet] SEVERE: <<Generated file [file:D:/3.1%20Workspaces/JSVRefactor/ejb-a
dminconsole/src/META-INF/ejb-jar.xml:line 33] Message=[The content of element ty
pe “enterprise-beans” is incomplete, it must match “(session|entity|message-driv
en)+”.] is not valid according to its DTD or XML Schema. This might be due to so
me missing tags in your source.>>
[ejbdoclet] org.xml.sax.SAXParseException: The content of element type “enterpri
se-beans” is incomplete, it must match “(session|entity|message-driven)+”.
[ejbdoclet] at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseExce
ption(Unknown Source)
[ejbdoclet] at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Sour
ce)
[ejbdoclet] at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown S
ource)
[ejbdoclet] at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown S
ource)
[ejbdoclet] at org.apache.xerces.impl.dtd.XMLDTDValidator.handleEndElement(U
nknown Source)
[ejbdoclet] at org.apache.xerces.impl.dtd.XMLDTDValidator.endElement(Unknown
Source)
[ejbdoclet] at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEnd
Element(Unknown Source)
[ejbdoclet] at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$Fragmen
tContentDispatcher.dispatch(Unknown Source)
[ejbdoclet] at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDoc
ument(Unknown Source)
[ejbdoclet] at org.apache.xerces.parsers.XML11Configuration.parse(Unknown So
urce)
[ejbdoclet] at org.apache.xerces.parsers.XML11Configuration.parse(Unknown So
urce)
[ejbdoclet] at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
[ejbdoclet] at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Sou
rce)
[ejbdoclet] at xdoclet.util.XmlValidator.doValidate(XmlValidator.java:271)
[ejbdoclet] at xdoclet.util.XmlValidator.validate(XmlValidator.java:221)
[ejbdoclet] at xdoclet.XmlSubTask.engineFinished(XmlSubTask.java:281)
[ejbdoclet] at xdoclet.TemplateSubTask.startEngine(TemplateSubTask.java:564)[ejbdoclet] at xdoclet.TemplateSubTask.startProcessForAll(TemplateSubTask.ja
va:618)
[ejbdoclet] at xdoclet.TemplateSubTask.startProcess(TemplateSubTask.java:599
)
[ejbdoclet] at xdoclet.XmlSubTask.startProcess(XmlSubTask.java:227)
[ejbdoclet] at xdoclet.modules.ejb.dd.EjbDotXmlSubTask.execute(EjbDotXmlSubT
ask.java:240)
GregMemberWhat directory relative to your sources and eclipse project are you running the ant tool? This looks like some sort of path problem where it isn’t being run in the identical context as the MyEclipse built-in xdoclet.
mwkohoutMemberI’m running it relative the top directory of the project-here’s my project layout:
ejb-project
src dir
src/META-INF dir
build.xmlWhich begs the question: what context is MyEclipse running it’s xdoclet from? And, if that’s the case why does the generated build script fail?
thanks
Mike
mwkohoutMembersorry-my formatting of text didn’t make it to the last post(knew I should have previewed)
ejb-project is the root of the project, src is a child folder of ejb-project, META-INF is a child of src, and build.xml is a child of ejb-project.
mwkohoutMemberthe basedir provided by ant(via ${basedir} ) on the command line and from within Eclipse is the same:
[echo] project basedir: D:\3.1 Workspaces\JSVRefactor\ejb-adminconsole
GregMemberThe context the MyEclipse xdoclet-build.xml script is run from the top of your MyEclipse EJB project. It looks like from the XDoclet error that when you build it externally it can’t find the EJB source. Can you post the contents of your xdoclet-build.xml file?
-
AuthorPosts