arpoodle
asked on
java -jar fil.jar config.xml failing miserably
I'm executing the following, with the results as shown:
C:\jasper_mysql>java -jar jasper-mysql.jar configure.xml
java.lang.ClassNotFoundExc eption: org.apache.crimson.parser. XMLReaderI mpl
at org.xml.sax.helpers.XMLRea derFactory .loadClass (Unknown Source)
at org.xml.sax.helpers.XMLRea derFactory .createXML Reader(Unk nown Source)
at net.sf.jasperreports.mysql .Daemon.lo adConfig(U nknown Source)
at net.sf.jasperreports.mysql .Daemon.ma in(Unknown Source)
Exception: SAX2 driver class org.apache.crimson.parser. XMLReaderI mpl not found
You probably enterd a bad filename.
I've ensured the paths are accurate (or I believe so)
can anyone assist in getting this .jar file running?
a
C:\jasper_mysql>java -jar jasper-mysql.jar configure.xml
java.lang.ClassNotFoundExc
at org.xml.sax.helpers.XMLRea
at org.xml.sax.helpers.XMLRea
at net.sf.jasperreports.mysql
at net.sf.jasperreports.mysql
Exception: SAX2 driver class org.apache.crimson.parser.
You probably enterd a bad filename.
I've ensured the paths are accurate (or I believe so)
can anyone assist in getting this .jar file running?
a
You are missing some .jar's.
Look at 'jasper' for dependencies.
;JOOP!
Look at 'jasper' for dependencies.
;JOOP!
Your setup to use a xml parser that is not available
try changing your default xml (sax) parser
try changing your default xml (sax) parser
try to see:
echo %classpath%
and see if all the jar are included
echo %classpath%
and see if all the jar are included
ASKER
Giant2:
echo %classpath% returns:
C:\jasperreports-mysql-1.0 .2>echo %CLASSPATH%
%CLASSPATH%
C:\jasperreports-mysql-1.0 .2>
objects:
Without wanting to sound stupid, how do I change the XML parser. I don'r recall installing one, or is it part of the JDK?
sciuriware:
Ther's nothing in the jasper install info regarding any dependancies.
CEHJ: that command executed with exact same errors
echo %classpath% returns:
C:\jasperreports-mysql-1.0
%CLASSPATH%
C:\jasperreports-mysql-1.0
objects:
Without wanting to sound stupid, how do I change the XML parser. I don'r recall installing one, or is it part of the JDK?
sciuriware:
Ther's nothing in the jasper install info regarding any dependancies.
CEHJ: that command executed with exact same errors
So you have no classpath declared.
Pass it in the commandline (-classpath....)
http://java.sun.com/j2se/1.3/docs/tooldocs/win32/classpath.html
Bye, Giant.
Pass it in the commandline (-classpath....)
http://java.sun.com/j2se/1.3/docs/tooldocs/win32/classpath.html
Bye, Giant.
ASKER
where would the classpath normaly point? to the JDK?
sorry.. I've done very little with Java apps,
a
sorry.. I've done very little with Java apps,
a
ASKER
I've executed
C:\>set CLASSPATH=C:\Program Files\Java\jdk1.5.0_06\lib
but it still gives the same error.
playing with the source build coughs these errors:
compile:
[javac] Compiling 42 source files to C:\jasperreports-mysql-1.0 .2\build\c las
ses
BUILD FAILED
C:\jasperreports-mysql-1.0 .2\build.x ml:61: Unable to find a javac compiler;
com.sun.tools.javac.Main is not on the classpath.
Perhaps JAVA_HOME does not point to the JDK
Total time: 1 second
which does suggest a path issue.
C:\>set CLASSPATH=C:\Program Files\Java\jdk1.5.0_06\lib
but it still gives the same error.
playing with the source build coughs these errors:
compile:
[javac] Compiling 42 source files to C:\jasperreports-mysql-1.0
ses
BUILD FAILED
C:\jasperreports-mysql-1.0
com.sun.tools.javac.Main is not on the classpath.
Perhaps JAVA_HOME does not point to the JDK
Total time: 1 second
which does suggest a path issue.
>>Without wanting to sound stupid, how do I change the XML parser.
By doing what i said. If the program ignores it, then you'll have to use the specified parser
By doing what i said. If the program ignores it, then you'll have to use the specified parser
is your build.xml a correct xml?
Try to open it in a browser.
Try to open it in a browser.
ASKER
i'm using a precomiled .jar file, there's nowhere to set the XML parser, it was simply a JAR and WAR file to download. the WAR gets deployed, and the JAR runs as a "poller" to connect to databases specified in the configure.xml
I've checked JAVA_HOME and CLASSPATH and still have the same result:
C:\jasper_mysql>echo %CLASSPATH%
C:\Program Files\Java\jdk1.5.0_06\lib ;c:\crimso n-1.1.3;C: \Program Files\Java\jre
1.5.0_06
C:\jasper_mysql>echo %JAVA_HOME%
C:\Program Files\Java\jdk1.5.0_06
C:\jasper_mysql>java -jar jasper-mysql.jar configure.xml
java.lang.ClassNotFoundExc eption: org.apache.crimson.parser. XMLReaderI mpl
at org.xml.sax.helpers.XMLRea derFactory .loadClass (Unknown Source)
at org.xml.sax.helpers.XMLRea derFactory .createXML Reader(Unk nown Source)
at net.sf.jasperreports.mysql .Daemon.lo adConfig(U nknown Source)
at net.sf.jasperreports.mysql .Daemon.ma in(Unknown Source)
Exception: SAX2 driver class org.apache.crimson.parser. XMLReaderI mpl not found
You probably enterd a bad filename.
C:\jasper_mysql>
I've checked JAVA_HOME and CLASSPATH and still have the same result:
C:\jasper_mysql>echo %CLASSPATH%
C:\Program Files\Java\jdk1.5.0_06\lib
1.5.0_06
C:\jasper_mysql>echo %JAVA_HOME%
C:\Program Files\Java\jdk1.5.0_06
C:\jasper_mysql>java -jar jasper-mysql.jar configure.xml
java.lang.ClassNotFoundExc
at org.xml.sax.helpers.XMLRea
at org.xml.sax.helpers.XMLRea
at net.sf.jasperreports.mysql
at net.sf.jasperreports.mysql
Exception: SAX2 driver class org.apache.crimson.parser.
You probably enterd a bad filename.
C:\jasper_mysql>
>>I've checked JAVA_HOME and CLASSPATH and still have the same result:
It's nothing to do with that really. See my last two answers. You need to download the Crimson parser from the link I gave you and put it in your classpath
It's nothing to do with that really. See my last two answers. You need to download the Crimson parser from the link I gave you and put it in your classpath
ASKER
I've done that, CLASSPATH now includes it:
C:\Program Files\Java\jdk1.5.0_06\lib ;C:\Progra m Files\Java\jre1.5.0_06;c:\ crimson-1. 1.3
but still the same error.
I can even compile from source now, but then can't run the jar it produces
a
C:\Program Files\Java\jdk1.5.0_06\lib
but still the same error.
I can even compile from source now, but then can't run the jar it produces
a
>can't run the jar it produces
you must create a correct manifest file
you must create a correct manifest file
ASKER
that aside, I shoud stil be able to run the app from the original, precomiled jar I downloaded, no?
a
a
>from the original, precomiled jar I downloaded
Yes, if it's created in correct manner.
Yes, if it's created in correct manner.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
it was the crimson parser, or lack of that was the issue.
Thanks :D
still need to debug some output, and the config file, but at last it's trying to make a connection now :D
a
Thanks :D
still need to debug some output, and the config file, but at last it's trying to make a connection now :D
a
:-)
Just as a final remark, excuse the thing about the classpath from me:
>>and put it in your classpath
as i was forgetting you're running a jar. You can in fact get rid of that classpath as it's redundant and in fact incorrect (jar files need to be named explicitly, including the file name in a classpath, not just the directories)
>>and put it in your classpath
as i was forgetting you're running a jar. You can in fact get rid of that classpath as it's redundant and in fact incorrect (jar files need to be named explicitly, including the file name in a classpath, not just the directories)
ASKER
thanks.
makes sense.
Just have to work out why Tomcat doesn't like a certain XML configuration file now
a
makes sense.
Just have to work out why Tomcat doesn't like a certain XML configuration file now
a
java -Dorg.xml.sax.driver=org.x