tags:

views:

198

answers:

3

I got error while binding the xml schema int Java Object by using the JAXB complier XJC ..I got the following error..

C:\Siva\jaxbw-plugin\lib>java -jar jaxb-xjc.jar xjc -p C:\Siva\jars\test.jaxb C:
\Siva\jars\Emp.xsd -d C:\Siva\jars\objects
parsing a schema...
[ERROR] C:\Siva\jaxbw-plugin\lib\xjc (The system cannot find the file specified)

unknown location

Failed to parse a schema.

Can you anybody give the solutions for this error ?

+1  A: 

Seems like the file C:\Siva\jaxbw-plugin\lib\xjc does not exist. You should just do xjc -p C:\Siva\jars\test.jaxb C:\Siva\jars\Emp.xsd -d C:\Siva\jars\objects

Valentin Rocher
+2  A: 

You're not running the XJC tool properly.

XJC should be executed either through one of the supplied batch scripts (xjc.bat, in your case), or from Ant.

https://jaxb.dev.java.net/nonav/2.2-ea/docs/xjc.html

It seems likely that you should be running it like this:

xjc -p C:\Siva\jars\test.jaxb C:\Siva\jars\Emp.xsd -d C:\Siva\jars\objects
skaffman
A: 

Thank you so much Skaffman and Valentin for giving the suggestion..

SivaGanesh