Hi, can somebody help ...
I have install JWSDP 2.0 on my Windows XP PC. Also I have JDK 1.6
installed
When I run the following command:
Xjc.bat c:\nims-ws\t.xsd
I get the following error
parsing a schema...
compiling a schema...
Exception in thread "main" java.lang.IllegalArgumentException: Expected
class ja
vax.xml.bind.annotation.XmlAccessType but found class
javax.xml.bind.annotation.
AccessType
at
com.sun.codemodel.TypedAnnotationWriter.checkType(TypedAnnotationWrit
er.java:187)
at
com.sun.codemodel.TypedAnnotationWriter.invoke(TypedAnnotationWriter.
java:101)
at $Proxy1.value(Unknown Source)
at
com.sun.tools.xjc.generator.bean.ImplStructureStrategy$1.createClasse
s(ImplStructureStrategy.java:46)
at
com.sun.tools.xjc.generator.bean.BeanGenerator.generateClassDef(BeanG
enerator.java:371)
at
com.sun.tools.xjc.generator.bean.BeanGenerator.getClazz(BeanGenerator
.java:403)
at
com.sun.tools.xjc.generator.bean.BeanGenerator.<init>(BeanGenerator.j
ava:178)
at
com.sun.tools.xjc.generator.bean.BeanGenerator.generate(BeanGenerator
.java:151)
at com.sun.tools.xjc.model.Model.generateCode(Model.java:228)
at com.sun.tools.xjc.Driver.run(Driver.java:293)
at com.sun.tools.xjc.Driver.run(Driver.java:170)
at com.sun.tools.xjc.Driver._main(Driver.java:95)
at com.sun.tools.xjc.Driver.access$000(Driver.java:53)
at com.sun.tools.xjc.Driver$1.run(Driver.java:75)
C:\nims-ws> type build.bar
The system cannot find the file specified.
C:\nims-ws> type build.bat
echo off
PATH=C:\Program Files\Java\jdk1.6.0\bin;c:\Program
Files\Java\jdk1.6.0\\lib;c:\S
un\jwsdp-2.0\jwsdp-shared\bin;c:\Sun\jwsdp-2.0\jaxb\bin
set
CLASSPATH=c:\Sun\jwsdp-2.0\jaxb\lib\jaxb-api.jar;c:\Sun\jwsdp-2.0\jaxb\l
ib\j
axb-impl.jar;c:\Sun\jwsdp-2.0\jaxb\lib\jaxb-xjc.jar;c:\Sun\jwsdp-2.0\jws
dp-share
d\lib\activation.jar;c:\Sun\jwsdp-2.0\sjsxp\lib\jsr173_api.jar;c:\Sun\jw
sdp-2.0\
sjsxp\lib\sjsxp.jar
set JAVA_HOME=c:\Program Files\Java\jdk1.6.0
xjc.bat c:\nims-ws\t.xsd -p com.allstream.nims.prp.jaxb
parsing a schema...
compiling a schema...
Exception in thread "main" java.lang.IllegalArgumentException: Expected
class ja
vax.xml.bind.annotation.XmlAccessType but found class
javax.xml.bind.annotation.
AccessType
at
com.sun.codemodel.TypedAnnotationWriter.checkType(TypedAnnotationWrit
er.java:187)
at
com.sun.codemodel.TypedAnnotationWriter.invoke(TypedAnnotationWriter.
java:101)
at $Proxy1.value(Unknown Source)
at
com.sun.tools.xjc.generator.bean.ImplStructureStrategy$1.createClasse
s(ImplStructureStrategy.java:46)
at
com.sun.tools.xjc.generator.bean.BeanGenerator.generateClassDef(BeanG
enerator.java:371)
at
com.sun.tools.xjc.generator.bean.BeanGenerator.getClazz(BeanGenerator
.java:403)
at
com.sun.tools.xjc.generator.bean.BeanGenerator.<init>(BeanGenerator.j
ava:178)
at
com.sun.tools.xjc.generator.bean.BeanGenerator.generate(BeanGenerator
.java:151)
at com.sun.tools.xjc.model.Model.generateCode(Model.java:228)
at com.sun.tools.xjc.Driver.run(Driver.java:293)
at com.sun.tools.xjc.Driver.run(Driver.java:170)
at com.sun.tools.xjc.Driver._main(Driver.java:95)
at com.sun.tools.xjc.Driver.access$000(Driver.java:53)
at com.sun.tools.xjc.Driver$1.run(Driver.java:75)