Hi,
I am trying to replicate the example of Batik in a servlet located in the
example found here:
http://www.xml.com/pub/a/2002/02/27/batik/index.html
I am struggling with this and I appreciate any help you can offer. Attached
is exactly what i have done and maybe you can help me figure out what I am
doing wrong. Any help, direction to a book I should read, or anything would
be great.
here is what I have done:
I installed IIS 5.0 web server on my local Windows 2000 machine.
I installed JRun 3.1 to act as a servlet container.
The Java Runtime for JRun is JDK1.3.1_02
I have downloaded batik1.1.1.zip and unzipped the contents of that file into
c:\batik1.1.1
I have downloaded batik-src-1.1.1 and unzipped the contents of that file
into c:\batik-src-1.1.1
I am pretty sure Jrun is working and able to run servlets because the sample
servlets that are supplied with the jrun installation are working.
I have saved Artist.java and Artmaker.java to this directory (these files
come from the website listed above)
c:\progra~1\allaire\jrun\servers\default\default-app\web-inf\classes\
My classpath is not defined at this point, and I compile Artist.java with
this command line entry (I tabbed it out for clarity)
javac -classpath
c:\Progra~1\Allaire\JRun\lib\ext\servlet.jar;
c:\Progra~1\Allaire\JRun\lib\ext\tools.jar;
c:\Progra~1\Allaire\JRun\lib\ext\parser.jar;
Artist.java
this compiles with no errors.
My classpath is still not defined at this point.
Then I compile ArtMaker.java with this command line entry (I tabbed it out
for clarity)
javac -classpath
c:\Progra~1\Allaire\JRun\lib\ext\servlet.jar;
c:\Progra~1\Allaire\JRun\lib\ext\tools.jar;
c:\Progra~1\Allaire\JRun\lib\ext\parser.jar;
c:\batik-src-1.1.1\xml-batik\sources;
c:\Progra~1\Allaire\JRun\servers\default\default-app\WEB-INF\classes
ArtMaker.java
I have to add the 4th classpath so it can make it through the Batik
Transcoder code in ArtMaker.java.
c:\batik-src-1.1.1\xml-batik\sources is the location of the Batik org
directory.
Somehow I think I am doing something wrong here.
I have to add the 5th line to the classpath because now it needs the
Artist.class (previously compiled) to compile ArtMaker.java to
ArtMaker.class.
ArtMaker.java compiles with no errors.
Okay, so now I have 2 class files (Artist.class and ArtMaker.class) in this
directory:
c:\progra~1\allaire\jrun\servers\default\default-app\web-inf\classes\
Now I have to make sure the Jrun classpath includes the needed batik jars.
I go into the JRUN admin and change the CLASSPATH Setting to:
{jrun.rootdir}/servers/lib
{jrun.server.rootdir}/lib
C:/batik1.1.1/batik-1.1.1/lib/batik-transcoder.jar
C:/batik1.1.1/batik-1.1.1/lib/crimson-parser.jar
C:/batik1.1.1/batik-1.1.1/lib/js.jar
C:/batik1.1.1/batik-1.1.1/lib/batik-svg-dom.jar
C:/batik1.1.1/batik-1.1.1/lib/batik-svggen.jar
C:/batik1.1.1/batik-1.1.1/lib/batik-awt-util.jar
C:/batik1.1.1/batik-1.1.1/lib/batik-bridge.jar
C:/batik1.1.1/batik-1.1.1/lib/batik-css.jar
C:/batik1.1.1/batik-1.1.1/lib/batik-dom.jar
I don't know if I need all these jars in the classpath or if I am missing
some. I think this is where my error is.
I restart JRUN, seems to be working, will run other servlets.
so I go to http://localhost/artmaker.html
(this comes from the above url as well)
i click on the "follow your muse" button, link and get...
500 Internal Server Error
/servlet/ArtMaker:
org/apache/batik/util/SVGConstants
java.lang.NoClassDefFoundError: org/apache/batik/util/SVGConstants
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:493)
at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:111)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:248)
at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:286)
at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:493)
at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:111)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:248)
at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:286)
at java.lang.ClassLoader.loadClass(ClassLoader.java:292)
at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
at
allaire.jrun.servlet.JRunServletLoader.loadClass(../servlet/JRunServletLoade
r.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)
at java.lang.Class.newInstance0(Native Method)
at java.lang.Class.newInstance(Class.java:237)
at
allaire.jrun.servlet.JRunServletLoader.loadServletInstance(../servlet/JRunSe
rvletLoader.java:197)
at
allaire.jrun.servlet.JRunServletLoader.loadServletInstance(../servlet/JRunSe
rvletLoader.java:161)
at
allaire.jrun.servlet.JRunServletLoader.loadServlet(../servlet/JRunServletLoa
der.java:149)
at
allaire.jrun.servlet.JRunSE.getServletReference(../servlet/JRunSE.java:1705)
at
allaire.jrun.servlet.JRunSE.getNamedDispatcher(../servlet/JRunSE.java:1962)
at allaire.jrun.servlet.Invoker.service(../servlet/Invoker.java:64)
at allaire.jrun.servlet.JRunSE.service(../servlet/JRunSE.java:1416)
at
allaire.jrun.session.JRunSessionService.service(../session/JRunSessionServic
e.java:1082)
at
allaire.jrun.servlet.JRunSE.runServlet(../servlet/JRunSE.java:1270)
at
allaire.jrun.servlet.JRunRequestDispatcher.forward(../servlet/JRunRequestDis
patcher.java:89)
at allaire.jrun.servlet.JRunSE.service(../servlet/JRunSE.java:1552)
at allaire.jrun.servlet.JRunSE.service(../servlet/JRunSE.java:1542)
at
allaire.jrun.servlet.JvmContext.dispatch(../servlet/JvmContext.java:364)
at allaire.jrun.http.WebEndpoint.run(../http/WebEndpoint.java:115)
at allaire.jrun.ThreadPool.run(../ThreadPool.java:272)
at allaire.jrun.WorkerThread.run(../WorkerThread.java:75)
I would very, very much appreciate any help you can provide. I feel like I
am right on the verge of this and just can't figure it out.
thanks,
will carter
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]