• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

unable to access LogServlet...not the same error that Juliane had

 
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi there,
I thought I'd check my Servlet 2 program before sending if off for nitpicking and got a 500 Internal Server Error java.lang.NoClassDefFoundError: javax/servlet/http/HttpServlet followed by lots of lines of errors that don't quite match Juliane Gross's errors (May 11 2003).
If I run a program that doesn't use JavaRanchCommon.zip/.jar then the program runs OK, so I'm supposing that it might be a problem with either my version of JavaRanchCommon.zip/.jar or a classpath problem (XP Home, service pack 2 applied) - the only thing that happened between my sending Servlets 1 to be nitpicked and checking Servlets 2, was that I installed a program that uses Oracle 10i Lite and that amended the classpath settings so that it's settings appear at the end of the command.
I set up a new user and still the non-Javaranch prog works OK and the others fail with the error - the Orion DateServlet runs without any problems.
Sorry for the length of the message - this is with trying the various programs supplied by Orion:

http://localhost - works OK
http://localhost/servlet/DateServlet - works OK

http://localhost/servlet/BeeServlet and JDBC 2 both give this error:
500 Internal Server Error
java.lang.NoClassDefFoundError: javax/servlet/http/HttpServlet
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at com.evermind[Orion/2.0.2 (build 11157)]._as.findClass(.:276)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at com.evermind[Orion/2.0.2 (build 11157)]._as.findClass(.:276)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at com.evermind[Orion/2.0.2 (build 11157)]._ay._lke(.:1607)
at com.evermind[Orion/2.0.2 (build 11157)]._ay._bxd(.:3976)
at com.evermind[Orion/2.0.2 (build 11157)]._ay._nlc(.:1847)
at com.evermind[Orion/2.0.2 (build 11157)]._ax._ltc(.:501)
at com.evermind[Orion/2.0.2 (build 11157)]._ax._uab(.:191)
at com.evermind[Orion/2.0.2 (build 11157)]._bf.run(.:62)

http://localhost/servlet/LinkCheckerServlet
500 Internal Server Error
java.lang.NullPointerException
at LinkCheckerServlet.doGet(LinkCheckerServlet.java:71)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:195)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:309)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:336)
at com.evermind[Orion/2.0.2 (build 11157)]._cub._pod(.:521)
at com.evermind[Orion/2.0.2 (build 11157)]._cub._bmc(.:177)
at com.evermind[Orion/2.0.2 (build 11157)]._ax._ltc(.:666)
at com.evermind[Orion/2.0.2 (build 11157)]._ax._uab(.:191)
at com.evermind[Orion/2.0.2 (build 11157)]._bf.run(.:62)

http://localhost/servlet/FingerServlet
500 Internal Server Error
java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at FingerServlet.finger(FingerServlet.java:102)
at FingerServlet.doGet(FingerServlet.java:73)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:195)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:309)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:336)
at com.evermind[Orion/2.0.2 (build 11157)]._cub._pod(.:521)
at com.evermind[Orion/2.0.2 (build 11157)]._cub._bmc(.:177)
at com.evermind[Orion/2.0.2 (build 11157)]._ax._ltc(.:666)
at com.evermind[Orion/2.0.2 (build 11157)]._ax._uab(.:191)
at com.evermind[Orion/2.0.2 (build 11157)]._bf.run(.:62)

I ended up unintalling J2EE and Orion and reinstalling them and checking the Classpath, but I still get the same error - any suggestions will be gratefully received - my next step is to try running under Tomcat instead of Orion to see if that will work!
All the best,
Kate!!
 
Sheriff
Posts: 4012
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Kate. I'm going to move this over to the Cattle Drive where there's more traffic so you're more likely to get help with this. Hang on...
 
Sheriff
Posts: 9109
12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Do you have the JavaRanchCommon.jar in orion/lib ?
 
village idiot
Posts: 1208
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I seem to recall having a problem along these lines on several occaisions. Once had to do not having my classpath set up right, and the other time was when I had to update my common files from the original version to the zipped version. It seems I unzipped the files into their own folder, so the path wasn't correct, and the files couldn't be found even though they were there. I'm not at home so I can't research my solution, but it looks similar to what was going on with my problem.
 
Kate Head
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi there,
Marilyn; Yes, JavaRanchCommon.jar is in orion/lib, but the date of the file is very out of date - is it worth downloading again?
Carol; I don't remember unzipping the .zip file, but I could be wrong - if you have any further info. I'm all ears!
All the best,
Kate!!
 
Carol Murphy
village idiot
Posts: 1208
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Kate, you DON'T want to unzip the file. But, the version you have may very well be out of date. When I had to switch to the new zip version in order to use the application for updating the assignment log, I thought it would be a good idea to retain the original file since it worked with my older assignments. Not being familiar with zip files, I unzipped the new file into its own folder and put a copy all of the places I thought a copy might be needed. Once I sorted that out and downloaded a fresh copy of the zip file and put it as-is in all the appropriate places, the fact that I hadn't taken the original out also caused some problems as I recall.........
So I would recommend getting the most current version of the common file and storing your existing version somewhere safe in case you need it. Good luck!
I'm going to try and locate my correspondence from my episode to see if there is something in there that might help. Keep asking questions, someone out there will be able to help you figure this out.
 
Carol Murphy
village idiot
Posts: 1208
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Kate, I checked my system and I have both the original JavaRanchCommon.jar directory, which is not a zip file, and JavaRanchCommon.zip, which is a zip file in orion/lib. Perhaps you need to change the file extension from jar to zip?
 
Marilyn de Queiroz
Sheriff
Posts: 9109
12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It seems that in most of these cases, starting fresh is the best way to proceed.

I suggest that you delete all your JavaRanchCommon.jar and JavaRanchCommon.zip files. Download the latest jar that contains the com.javaranch.common package. Update your classpath to include jr.jar instead of JavaRanchCommon.jar or zip. Replace JavaRanchCommon.jar in orion/lib with jr.jar. The new jar will work with the old assignments (it is backward compatible) and will be required when we update the servlets and JDBC assignments (which we're in the process of doing now). It will also be the jar that newer students will download for OOP assignments.

After you replace the jar/zip's, I suggest that you recompile/rerun Assignment OOP1 just to prove to yourself that you've got your classpath correctly set up. Then try BeeServlet again.

If you have any trouble downloading the jar, let us know. I think IE is smarter now than it was when we originally included the jar in the assignments, but you may still need to right click and use "save as" to download jr.jar.
 
Kate Head
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi there,
Thanks for that advice Marilyn - I've downloaded the jr.jar and will have a go at amending the classpath later on today. I was wondering if it matters whereabouts in the classpath the jr.jar bit goes as I've got loads of Oracle classpath commands from another program that I installed that seem to be at the end of command?
All the best,
Kate!!
 
Kate Head
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi there,
I've just sent JDBC-2 2nd attempt (using Tomcat rather than Orion).
All the best,
Kate!!
 
Marilyn de Queiroz
Sheriff
Posts: 9109
12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Does that mean that you were unable to get it to work on Orion? I wonder if the Oracle stuff is interfering with the orion stuff. Oracle used orion's code base for their OC4J server, so it would not surprise me if it did interfere. Have you tried using jr.jar with the oracle server? On the other hand, I have orion, OC4J, JRun, and Tomcat installed and they don't seem to interfere with each other.
[ December 08, 2004: Message edited by: Marilyn de Queiroz ]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic