You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@xmlbeans.apache.org by be_tnt <de...@lucent.com> on 2006/07/10 14:58:08 UTC
Error with Ant and XMLBean
Hello,
I am starting to use XMLBean. I have loaded the plugin for Eclipse and would
like to create a ant build file. I am also new in creating Ant file.
What I did until now is:
<project name="NeBiIntf" basedir="." default="compile">
<description>
Ant files for the NebiLight project
</description>
<!-- set global properties for this build -->
<property environment="env"/>
<property name="xsdLocation" location="Schemas"/>
<property name="xsdbuild" location="build/xsd"/>
<property name="dist" location="dist"/>
<property name="xsd.jar" location="lib/xsd"/>
<target name="init">
<!-- Create the time stamp -->
<tstamp/>
<!-- Create the build directory structure used by compile -->
<mkdir dir="${xsdbuild}"/>
<!-- Create the lib directory -->
<mkdir dir="${xsd.jar}"/>
<property name="xmlbeans.home" value="${env.XMLBEANS_HOME}"/>
<echo message="xmlbeans.home: ${xmlbeans.home}"/>
<!-- check for xbean.jar from binary distribution -->
<available
property="xmlbeans.lib"
value="${xmlbeans.home}/lib"
file="${xmlbeans.home}/lib/xbean.jar" />
<!-- Define the xmlbean task -->
<taskdef name="xmlbean" classname="org.apache.xmlbeans.impl.tool.XMLBean"
classpath="C:\XMLBeans\xmlbeans-2.1.0\lib\xbean.jar" />
</target>
<!-- =================================
target: compile
================================= -->
<target name="compile" depends="init" description="Xsd Java classes
generation">
<!-- Generate the java classes from ${xsdLocation} into ${xsdbuild}
-->
<echo message="Generating Java classes based on the xml schemas." />
<xmlbean schema="Schemas" destfile="${xsdbuild}/NeBiLightSchemas.jar" >
</xmlbean>
</target>
</project>
My xsd files are located under the schemas directory. When trying to execute
this ant file, I got the following error:
BUILD FAILED
C:\data\build.xml:49: java.lang.NoClassDefFoundError:
javax/xml/stream/XMLStreamException
Any help would be appreciated.
--
View this message in context: http://www.nabble.com/Error-with-Ant-and-XMLBean-tf1918288.html#a5251270
Sent from the Xml Beans - User forum at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: user-help@xmlbeans.apache.org
Re: Error with Ant and XMLBean
Posted by be_tnt <de...@lucent.com>.
yes
--
View this message in context: http://www.nabble.com/Error-with-Ant-and-XMLBean-tf1918288.html#a5251923
Sent from the Xml Beans - User forum at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: user-help@xmlbeans.apache.org
Re: Error with Ant and XMLBean
Posted by Alex Soto <al...@grifols.com>.
you compiling with eclipse?
be_tnt wrote:
> Thx. I have added the jsr in the classpath as follows:
>
> <taskdef name="xmlbean" classname="org.apache.xmlbeans.impl.tool.XMLBean"
> classpath="C:\XMLBeans\xmlbeans-2.1.0\lib\xbean.jar;C:\XMLBeans\xmlbeans-2.1.0\lib\jsr173_1.0_api.jar"
> />
>
> Now it seems it created the java classes but when it does the compile
> command, I have got 100 errors. Most of them are [xmlbean]
> C:\DOCUME~1\decoker\LOCALS~1\Temp\xbean18294.d\src\com\lucent\gripp\datadictionnary\AcceptedRRListXmlBean.java:16:
> package org.apache.xmlbeans does not exist
> [xmlbean] public interface AcceptedRRListXmlBean extends
> org.apache.xmlbeans.XmlString
>
> :o(
>
La información contenida en el presente e-mail es confidencial y está reservada para el uso exclusivo de su destinatario. Se prohíbe estrictamente la distribución, copia o utilización de esta información sin el previo permiso de su destinatario. Si usted no fuera el destinatario, por favor notifíquelo inmediatamente al remitente y elimine el presente mensaje de su sistema informático.
Information contained in this e-mail is confidential and is intended for the use of the addressee only. Any dissemination, distribution, copying or use of this communication without prior permission of the addressee is strictly prohibited. If you are not the intended addressee, please notify the sender immediately by reply and then delete this message from your computer system.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: user-help@xmlbeans.apache.org
Re: Error with Ant and XMLBean
Posted by be_tnt <de...@lucent.com>.
So I should upgrade to the next version? is it easy to do?
--
View this message in context: http://www.nabble.com/Error-with-Ant-and-XMLBean-tf1918288.html#a5253435
Sent from the Xml Beans - User forum at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: user-help@xmlbeans.apache.org
Re: Error with Ant and XMLBean
Posted by Alex Soto <al...@grifols.com>.
i can't remember exactly but i know that some ant executor in some 3.1
eclipse version has a bug.
be_tnt wrote:
> I have eclipse 3.1.
>
> I added the javasource argument and the noupa one. What does exactly this
> last one?
>
> BTW it did not change the compilation output. But I have checked the java
> source generated and there are some stranges thing about the package name.
>
La información contenida en el presente e-mail es confidencial y está reservada para el uso exclusivo de su destinatario. Se prohíbe estrictamente la distribución, copia o utilización de esta información sin el previo permiso de su destinatario. Si usted no fuera el destinatario, por favor notifíquelo inmediatamente al remitente y elimine el presente mensaje de su sistema informático.
Information contained in this e-mail is confidential and is intended for the use of the addressee only. Any dissemination, distribution, copying or use of this communication without prior permission of the addressee is strictly prohibited. If you are not the intended addressee, please notify the sender immediately by reply and then delete this message from your computer system.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: user-help@xmlbeans.apache.org
Re: Error with Ant and XMLBean
Posted by be_tnt <de...@lucent.com>.
I have eclipse 3.1.
I added the javasource argument and the noupa one. What does exactly this
last one?
BTW it did not change the compilation output. But I have checked the java
source generated and there are some stranges thing about the package name.
--
View this message in context: http://www.nabble.com/Error-with-Ant-and-XMLBean-tf1918288.html#a5252523
Sent from the Xml Beans - User forum at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: user-help@xmlbeans.apache.org
Re: Error with Ant and XMLBean
Posted by Alex Soto <al...@grifols.com>.
<target name="impXmlBeans" depends="init">
<xmlbean javasource="1.5"
schema="${impr.xsd}"
destfile="${DEST_JAR}/${imp.name}.jar"
classpath="${SHARED}/jar/xbean-2.1.0.jar;${SHARED}/jar/jsr173-1.0.jar"
classgendir="${DEST_DOC}/${imp.name}/classes"
srcgendir="${DEST_DOC}/${imp.name}/sources/"
noupa="true">
</xmlbean>
</target>
this works on eclipse 3.2
be_tnt wrote:
> I found the problem. I have created the following section at the beginning of
> my file:
>
> <path id="project.class.path">
> <pathelement path="C:\XMLBeans\xmlbeans-2.1.0\lib\xbean.jar;C"/>
> <pathelement path="C:\XMLBeans\xmlbeans-2.1.0\lib\jsr173_1.0_api.jar"/>
> </path>
>
> And changed the following command:
>
> <taskdef name="xmlbean" classname="org.apache.xmlbeans.impl.tool.XMLBean"
> classpathref="project.class.path" />
>
> and:
>
> <xmlbean schema="Schemas" destfile="${xsdbuild}/NeBiLightSchemas.jar"
> classpathref="project.class.path" >
> </xmlbean>
>
> Something strange in the output I have got:
>
> [xmlbean] Note: Some input files use or override a deprecated API.
> [xmlbean] Note: Recompile with -Xlint:deprecation for details.
>
> What should I do?
>
La información contenida en el presente e-mail es confidencial y está reservada para el uso exclusivo de su destinatario. Se prohíbe estrictamente la distribución, copia o utilización de esta información sin el previo permiso de su destinatario. Si usted no fuera el destinatario, por favor notifíquelo inmediatamente al remitente y elimine el presente mensaje de su sistema informático.
Information contained in this e-mail is confidential and is intended for the use of the addressee only. Any dissemination, distribution, copying or use of this communication without prior permission of the addressee is strictly prohibited. If you are not the intended addressee, please notify the sender immediately by reply and then delete this message from your computer system.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: user-help@xmlbeans.apache.org
Re: Error with Ant and XMLBean
Posted by be_tnt <de...@lucent.com>.
I found the problem. I have created the following section at the beginning of
my file:
<path id="project.class.path">
<pathelement path="C:\XMLBeans\xmlbeans-2.1.0\lib\xbean.jar;C"/>
<pathelement path="C:\XMLBeans\xmlbeans-2.1.0\lib\jsr173_1.0_api.jar"/>
</path>
And changed the following command:
<taskdef name="xmlbean" classname="org.apache.xmlbeans.impl.tool.XMLBean"
classpathref="project.class.path" />
and:
<xmlbean schema="Schemas" destfile="${xsdbuild}/NeBiLightSchemas.jar"
classpathref="project.class.path" >
</xmlbean>
Something strange in the output I have got:
[xmlbean] Note: Some input files use or override a deprecated API.
[xmlbean] Note: Recompile with -Xlint:deprecation for details.
What should I do?
--
View this message in context: http://www.nabble.com/Error-with-Ant-and-XMLBean-tf1918288.html#a5251546
Sent from the Xml Beans - User forum at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: user-help@xmlbeans.apache.org
Re: Error with Ant and XMLBean
Posted by be_tnt <de...@lucent.com>.
Thx. I have added the jsr in the classpath as follows:
<taskdef name="xmlbean" classname="org.apache.xmlbeans.impl.tool.XMLBean"
classpath="C:\XMLBeans\xmlbeans-2.1.0\lib\xbean.jar;C:\XMLBeans\xmlbeans-2.1.0\lib\jsr173_1.0_api.jar"
/>
Now it seems it created the java classes but when it does the compile
command, I have got 100 errors. Most of them are [xmlbean]
C:\DOCUME~1\decoker\LOCALS~1\Temp\xbean18294.d\src\com\lucent\gripp\datadictionnary\AcceptedRRListXmlBean.java:16:
package org.apache.xmlbeans does not exist
[xmlbean] public interface AcceptedRRListXmlBean extends
org.apache.xmlbeans.XmlString
:o(
--
View this message in context: http://www.nabble.com/Error-with-Ant-and-XMLBean-tf1918288.html#a5251405
Sent from the Xml Beans - User forum at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: user-help@xmlbeans.apache.org
Re: Error with Ant and XMLBean
Posted by Alex Soto <al...@grifols.com>.
put jsr jar into classpath too.
be_tnt wrote:
> Hello,
>
> I am starting to use XMLBean. I have loaded the plugin for Eclipse and would
> like to create a ant build file. I am also new in creating Ant file.
>
> What I did until now is:
>
> <project name="NeBiIntf" basedir="." default="compile">
> <description>
> Ant files for the NebiLight project
> </description>
>
> <!-- set global properties for this build -->
> <property environment="env"/>
> <property name="xsdLocation" location="Schemas"/>
> <property name="xsdbuild" location="build/xsd"/>
> <property name="dist" location="dist"/>
> <property name="xsd.jar" location="lib/xsd"/>
>
> <target name="init">
> <!-- Create the time stamp -->
> <tstamp/>
>
> <!-- Create the build directory structure used by compile -->
> <mkdir dir="${xsdbuild}"/>
>
> <!-- Create the lib directory -->
> <mkdir dir="${xsd.jar}"/>
>
> <property name="xmlbeans.home" value="${env.XMLBEANS_HOME}"/>
> <echo message="xmlbeans.home: ${xmlbeans.home}"/>
>
> <!-- check for xbean.jar from binary distribution -->
> <available
> property="xmlbeans.lib"
> value="${xmlbeans.home}/lib"
> file="${xmlbeans.home}/lib/xbean.jar" />
>
> <!-- Define the xmlbean task -->
> <taskdef name="xmlbean" classname="org.apache.xmlbeans.impl.tool.XMLBean"
> classpath="C:\XMLBeans\xmlbeans-2.1.0\lib\xbean.jar" />
>
> </target>
> <!-- =================================
> target: compile
> ================================= -->
> <target name="compile" depends="init" description="Xsd Java classes
> generation">
> <!-- Generate the java classes from ${xsdLocation} into ${xsdbuild}
> -->
> <echo message="Generating Java classes based on the xml schemas." />
> <xmlbean schema="Schemas" destfile="${xsdbuild}/NeBiLightSchemas.jar" >
> </xmlbean>
> </target>
> </project>
>
> My xsd files are located under the schemas directory. When trying to execute
> this ant file, I got the following error:
> BUILD FAILED
> C:\data\build.xml:49: java.lang.NoClassDefFoundError:
> javax/xml/stream/XMLStreamException
>
> Any help would be appreciated.
>
La información contenida en el presente e-mail es confidencial y está reservada para el uso exclusivo de su destinatario. Se prohíbe estrictamente la distribución, copia o utilización de esta información sin el previo permiso de su destinatario. Si usted no fuera el destinatario, por favor notifíquelo inmediatamente al remitente y elimine el presente mensaje de su sistema informático.
Information contained in this e-mail is confidential and is intended for the use of the addressee only. Any dissemination, distribution, copying or use of this communication without prior permission of the addressee is strictly prohibited. If you are not the intended addressee, please notify the sender immediately by reply and then delete this message from your computer system.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: user-help@xmlbeans.apache.org