wood burning stoves*
The moose likes Java in General and the fly likes Exception while running the java program through run.bat file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Exception while running the java program through run.bat file" Watch "Exception while running the java program through run.bat file" New topic
Author

Exception while running the java program through run.bat file

sumanta panda
Ranch Hand

Joined: Jun 23, 2008
Posts: 224
Dear All,
I have a standalone application which is running succesffully through eclipse ide.The main java program is manager.ProcessorManager.java file.I called same java file in the run.bat file.

My doubt is in the run.bat what is the meaning of manager.ProcessorManager VALIDATE %1.


But when i execute samething in my run.bat it is trowing exception.The exception message is

Exception in thread "main" java.lang.NoSuchMethodError: com.sun.org.apache.xerce
s.internal.parsers.XML11Configuration.getFeature0(Ljava/lang/String;)Z
at com.sun.org.apache.xerces.internal.parsers.XIncludeAwareParserConfigu
ration.getFeature(XIncludeAwareParserConfiguration.java:278)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.reset(Ab
stractSAXParser.java:2098)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.
java:147)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Ab
stractSAXParser.java:1242)
at com.sun.org.apache.xalan.internal.xsltc.dom.XSLTCDTMManager.getDTM(XS
LTCDTMManager.java:391)
at com.sun.org.apache.xalan.internal.xsltc.dom.XSLTCDTMManager.getDTM(XS
LTCDTMManager.java:231)
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.getDOM(T
ransformerImpl.java:493)
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transfor
m(TransformerImpl.java:663)
at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transfor
m(TransformerImpl.java:300)
at processor.DataValidationProcessor.process(DataValidationProcessor.jav
a:687)
at processor.DataValidationProcessor.run(DataValidationProcessor.java:16
7)
at manager.ProcessorManager.processFile(ProcessorManager.java:454)
at manager.ProcessorManager.init(ProcessorManager.java:205)
at manager.ProcessorManager.main(ProcessorManager.java:102)


The run.bat is





Please suggest.

Thanks in advance.

Regards,
Sumanta Panda
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 39478
    
  28
How are you setting your CLASSPATH in the bat file? It looks as though you cannot gain access to a method. Have you changed the definition of any of the classes? If you look in the API documentation it might suggest you compiled your code against one version of the XML11Configuration class and now have a different version. You didn't tell us what was in your .bat file.
syruss kumar
Ranch Hand

Joined: Jul 23, 2009
Posts: 97
You have to set your lib files in your required file in the CLASSPATH while creating the batch file like this

echo "Launching Java Application..."
java -jar "location of java file"

put your required file in your lib folder and create a jar or set in the set path for the corresponding files


All search starts with beginner's luck and all search ends with victor's severly tested.
 
 
subject: Exception while running the java program through run.bat file