aspose file tools*
The moose likes Cattle Drive and the fly likes unable to access LogServlet...not the same error that  Juliane had Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » This Site » Cattle Drive
Bookmark "unable to access LogServlet...not the same error that  Juliane had" Watch "unable to access LogServlet...not the same error that  Juliane had" New topic
Author

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

Kate Head
Ranch Hand

Joined: Oct 31, 2002
Posts: 67
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!!
Pauline McNamara
Sheriff

Joined: Jan 19, 2001
Posts: 4012
    
    6
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...
Marilyn de Queiroz
Sheriff

Joined: Jul 22, 2000
Posts: 9046
    
  10
Do you have the JavaRanchCommon.jar in orion/lib ?


JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
Carol Murphy
village idiot
Bartender

Joined: Mar 15, 2001
Posts: 1195
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

Joined: Oct 31, 2002
Posts: 67
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
Bartender

Joined: Mar 15, 2001
Posts: 1195
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
Bartender

Joined: Mar 15, 2001
Posts: 1195
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

Joined: Jul 22, 2000
Posts: 9046
    
  10
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

Joined: Oct 31, 2002
Posts: 67
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

Joined: Oct 31, 2002
Posts: 67
Hi there,
I've just sent JDBC-2 2nd attempt (using Tomcat rather than Orion).
All the best,
Kate!!
Marilyn de Queiroz
Sheriff

Joined: Jul 22, 2000
Posts: 9046
    
  10
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 ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: unable to access LogServlet...not the same error that Juliane had