Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Exception while running the java program through run.bat file

 
sumanta panda
Ranch Hand
Posts: 224
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 48363
56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 104
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic