aspose file tools*
The moose likes Cattle Drive and the fly likes got stuck with orion - please help Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » This Site » Cattle Drive
Bookmark "got stuck with orion - please help" Watch "got stuck with orion - please help" New topic
Author

got stuck with orion - please help

juliane gross
Ranch Hand

Joined: May 30, 2002
Posts: 161
I installed the orion server on my notebook
(SUSE 8.1).
But if I try to run my BeeServlet, it says:
"500 Internal Server Error".
On my other PC orion is running fine.
I checked all paths, classpaths, put
JavaRanchCommon.jar into orion's lib-directory, etc.
Both Computers seem to be installed pretty much the same way, and I cannot find anything visibly wrong.
Since the moo.html runs fine I suspect the error to be something with JavaRanchCommon.jar. (?)
The whole error message, if I put this into my browser:

goes like this:
java.lang.NoClassDefFoundError: javax/servlet/http/HttpServlet
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:502)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:250)
at java.net.URLClassLoader.access$100(URLClassLoader.java:54)
at java.net.URLClassLoader$1.run(URLClassLoader.java:193)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:186)
at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
at java.lang.ClassLoader.loadClass(ClassLoader.java:292)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:265)
at java.lang.ClassLoader.loadClass(ClassLoader.java:292)
at java.lang.ClassLoader.loadClass(ClassLoader.java:292)
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:502)
at com.evermind[Orion/2.0.1 (build 11096)]._as.findClass(.:276)
at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:217)
at com.evermind[Orion/2.0.1 (build 11096)]._ay._lae(.:1607)
at com.evermind[Orion/2.0.1 (build 11096)]._ay._brd(.:3976)
at com.evermind[Orion/2.0.1 (build 11096)]._ay._nhc(.:1847)
at com.evermind[Orion/2.0.1 (build 11096)]._ax._lpc(.:455)
at com.evermind[Orion/2.0.1 (build 11096)]._ax._tzb(.:189)
at com.evermind[Orion/2.0.1 (build 11096)]._bf.run(.:62)
And again, I apreciate your time and help very much!

Juliane
Barry Gaunt
Ranch Hand

Joined: Aug 03, 2002
Posts: 7729
Hi Juliane, did you copy tools.jar into the orion top-level directory?
I mean like:
cp $JAVA_HOME/lib/tools.jar $ORION_HOME/

-Barry
[ May 11, 2003: Message edited by: Barry Gaunt ]

Ask a Meaningful Question and HowToAskQuestionsOnJavaRanch
Getting someone to think and try something out is much more useful than just telling them the answer.
juliane gross
Ranch Hand

Joined: May 30, 2002
Posts: 161
thanks for answering, Barry.
Yes, tools.jar is there.
*what* is going wrong??
maybe notebooks need some different special care & grooming??
Juliane
Barry Gaunt
Ranch Hand

Joined: Aug 03, 2002
Posts: 7729
OK, if you do http://localhost:8080 you should get Orion's initial page.
What happens if you try to run one of their test JSP applications?
jason adam
Chicken Farmer ()
Ranch Hand

Joined: May 08, 2001
Posts: 1932
You downloaded the J2EE SDK and put the j2ee.jar into your classpath, also? That javax stuff is a standard J2EE package, I'd verify all that is set correctly.
juliane gross
Ranch Hand

Joined: May 30, 2002
Posts: 161
Hi, thanks for caring!
Yes and No, some orion servlets are runnning fine (HelloWorldServlet, and DateServlet),
others are not running, like:
FingerServlet
(Error message:
500 Internal Server Error
java.net.ConnectException: Connection refused)
..and more similar lines..
or LinkCheckerServlet
(Error message:
500 Internal Server Error
java.lang.NullPointerException)
...and more similar lines..
This is my profile.local:
export JAVA_HOME=/usr/java/j2sdk1.4.1_01
export J2EE_HOME=/usr/java/j2sdkee1.3.1
export PATH=$JAVA_HOME/bin:usr/bin:$PATH
export CLASSPATH=$JAVA_HOME/jul/JavaRanchCommon.zip:$JAVA_
HOME/lib/mysql-connector-java-2.0.14-bin.jar:$J2EE_HOME/lib/j2ee.jar:.
this is a riddle..
maybe it needs just a fresh day to be solved..
Nice evening to everybody out there, anyway!
and thanx again!
Juliane
Marilyn de Queiroz
Sheriff

Joined: Jul 22, 2000
Posts: 9046
    
  10
Did you copy JavaRanchCommon.zip to /orion/lib/JavaRanchCommon.jar ??


JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
juliane gross
Ranch Hand

Joined: May 30, 2002
Posts: 161
Yes, Marilyn I did.
I copied JavaRanchCommon.zip to orion/lib
and there I "renamed" it.
Should work like this, shouldn't it?
***sigh***

Juliane
Barry Gaunt
Ranch Hand

Joined: Aug 03, 2002
Posts: 7729
Hi Juliane,
you can also copy the j2ee.jar and mysql-*.jar files into the /orion/lib directory together with JavaRanchCommon.jar.
In fact I copied all of the required jar files into an /orion/default-web-app/WEB-INF/lib directory, restarted the orion server and things worked ok. The jars in the lib directories are automatically added to the application's classpath.
Don't worry we'll solve it!
-Barry
[ May 12, 2003: Message edited by: Barry Gaunt ]
John Hembree
hired gun
Ranch Hand

Joined: Mar 07, 2003
Posts: 250

A couple of things come to mind, first you say
notice the :.: in the classpath, it has something to do with processing the file in the current directory, I think but I had to add it to get things to work. HTH
Edited to prevent overwidth rendering -BFG
Hey, all I did was to put a couple of returns in, but half the message has disappeared. Sorry John - Barry
[ May 12, 2003: Message edited by: Barry Gaunt ]
No problem, I was going to edit it myself this morning, but ran into the same problem and then out of time.
[ May 12, 2003: Message edited by: John Hembree ]
Barry Gaunt
Ranch Hand

Joined: Aug 03, 2002
Posts: 7729
If I remember correctly, John had written that there was a reference to JavaRanchCommon.zip in your classpath, but you had renamed the file to JavaRanchCommon.jar, so there was a possibility that the correct file was not found.
The example path using :.: is the one John used to get things to work.
Once again, sorry about that messed up post.
juliane gross
Ranch Hand

Joined: May 30, 2002
Posts: 161
Originally posted by Barry Gaunt:

Don't worry we'll solve it!
-Barry

Yes, this is one of the points what is so fantastic about JavaRanch..
I'll meet my stubborn notebook later in the
evening, and then I let you know what will
happen.
Thank you, too, John, I'll check out what
Barry left of your message
Juliane
juliane gross
Ranch Hand

Joined: May 30, 2002
Posts: 161
I checked my CLASSPATH,and added JavaRanchCommon.jar to it (now it has both: the
.jar and the .zip, hope this is fine).
I let CLASSPATH end with :.:
I copied j2ee.jar and JavaRanchCommon.jar also to /orion/lib directory.
I also copied them to the WEB-INF in a lib-directory.
I restarted the computer.
I restarted orion.
Still: most of orion's own example servlets run fine, but not BeeServlet.

Now I would like to check whether my j2EE is principly okay - maybe it got corrupt during download?
Could this be possible?
Does anybody know of a quick-and-easy way to check it's general functionality?
I am short of installing everything completely new:
orion and J2EE ..

All other tips are highly welcome ...
and thanks again for taking your time, you're great folks out there
Juliane
Barry Gaunt
Ranch Hand

Joined: Aug 03, 2002
Posts: 7729
Is your BeeServlet "straight from the hive"? That is, have you made *any* changes to it?
Recompile it and copy the class file to the WEB-INF/classes directory one more time.
John Hembree
hired gun
Ranch Hand

Joined: Mar 07, 2003
Posts: 250

I also have tools.jar located in my orion root directory instead of /orion/lib. My system is running RedHat 8.0
Barry Gaunt
Ranch Hand

Joined: Aug 03, 2002
Posts: 7729
How's it going Juliane? Any nearer solving the problem? Did you check that these jar files allow read access to orion? Maybe a "chmod o+r" on all of the jar files wouldn't be a bad thing.
I have been installing and upgrading MySQL on my Suse 8.1 system and getting it working with JDBC and Orion. I have encountered a few problems, especially with the creating of users and granting of privileges, but I can at least get a servlet working with JDBC and MySQL.
-Barry
[ May 13, 2003: Message edited by: Barry Gaunt ]
paul wheaton
Trailboss

Joined: Dec 14, 1998
Posts: 20580
    ∞

Marilyn asked me to check in here.
My first thought was that it had something to do with orion not finding the javax libs. But if the other servlets are working okay, then that can't be the case.
Just making sure I understand correctly: You have two computers. Windows on one and linux on the other, right? The windows computer is running everything just fine and the linux computer is choking, right?


permaculture Wood Burning Stoves 2.0 - 4-DVD set
juliane gross
Ranch Hand

Joined: May 30, 2002
Posts: 161
Hi,
I am happy about your attention!
Last weekend I tried all your suggestions in a completely systematical way, but no results so far.
Barry, your suggestion concerning chmod will be the next one to try, Thank you!
Paul, I use 2 computers, both with Linux. I try to get my notebook running with Suse 8.1/orion.
(I almost never use windows any more; I have windows/Linux double boot on my notebook though).
Before this I had (!! !!)working Linux Suse 8.1/orion on my other PC nicely. I did my first servlet with this.
But on that PC MySQL was not working, as well as other things, so I wanted to install everything new and "perfect".
I am at this task since last weekend but not finished today (due more to lack of time than to problems - so far..)
Anyway, I need to have orion running on my notebook because I don't like not to know why this doesn't work, and because I like to take my notebook with it's Java things with me "to places"
I'll try those chmod thing next (tomorrow) and
let you know what happens.
Thank you again, I apreciate your help VERY much.

Juliane
[ May 20, 2003: Message edited by: juliane gross ]
juliane gross
Ranch Hand

Joined: May 30, 2002
Posts: 161
I renamed JavaRanchCommon.zip to .jar in my CLASSPATH also.
(Which is working fine with my other assignments using it).
My CLASSPATH is pointing to:
JAVA_HOME/lib/JavaRanchCommon.jar
rights: -rwxr-xr--
J2EE_HOME/lib/j2ee.jar
rights: -rwxr-xr-x
In home/orion
I have tools.jar (rights: -rwxrwxr--)

Meanwhile, I have all those jars also in the other directories you suggested.
Could this duplication be a problem?
Do I have to put tools.jar in the CLASSPATH, too?
Thank you, Java friends out there!
Juliane
Marilyn de Queiroz
Sheriff

Joined: Jul 22, 2000
Posts: 9046
    
  10
I renamed JavaRanchCommon.zip to .jar in my CLASSPATH also. (Which is working fine with my other assignments using it).

Not a problem. The .zip ending is because of downloading problems we encountered.

My CLASSPATH is pointing to:
JAVA_HOME/lib/JavaRanchCommon.jar
rights: -rwxr-xr--


I think I would put an x on the end. I'm not a Linux expert, but I don't think it would hurt and it might help.

J2EE_HOME/lib/j2ee.jar
rights: -rwxr-xr-x


Yes, like this one.
In home/orion
I have tools.jar (rights: -rwxrwxr--)


And an 'x' on the end of this one too(?).

Meanwhile, I have all those jars also in the other directories you suggested.
Could this duplication be a problem?


I think orion only sees things in it's own tree (orion home and its subdirectories).
Do I have to put tools.jar in the CLASSPATH, too?
No. Stuff in JAVA_HOME (where you originally copied tools.jar from) is found "automatically" by java applications, but the orion server needs its own copy.
juliane gross
Ranch Hand

Joined: May 30, 2002
Posts: 161
Thanx, Marilyn.
Changing rights to your suggestion did not help.
This is my last try and then I will give up.
I think, the error message might give a clue
(at least for some experienced error message reader):
java.lang.NoClassDefFoundError: javax/servlet/http/HttpServlet
at java.lang.ClassLoader.defineClass0(Native Method)
...
[full code is on top message]
DateServlet is running fine.
moo.html is working alright.
Maybe orion/javaRanchCommon.jar or orion/jsdkee1.3.1 are not running on notebooks?
Is there anybody who is running this combinations successfully (Linux-based) on his/her notebook?
I feel like :roll:
I do send chocolate to never mind which place on earth, I promise, to you moose groomers, whom I have ridden on their nerves, if you can solve this.
I _do_. Try me.
[ May 23, 2003: Message edited by: juliane gross ]
Marilyn de Queiroz
Sheriff

Joined: Jul 22, 2000
Posts: 9046
    
  10
Originally posted by juliane gross:
Maybe orion/javaRanchCommon.jar or orion/jsdkee1.3.1 are not running on notebooks?

Not true. The original assignments were run on a notebook by the author, Paul Wheaton.
Marilyn de Queiroz
Sheriff

Joined: Jul 22, 2000
Posts: 9046
    
  10
Originally posted by juliane gross:
I think, the error message might give a clue
(at least for some experienced error message reader):
java.lang.NoClassDefFoundError: javax/servlet/http/HttpServlet
at java.lang.ClassLoader.defineClass0(Native Method)
...
[full code is on top message]


Thanks for reminding us to look at the original message, Juliane.

javax.servlet.http.HttpServlet is in j2ee.jar so this message is telling us that the servlet that is running cannot find that class in the j2ee.jar. I see that you have it in your classpath, but is $J2EE_HOME/lib/j2ee.jar actually where the j2ee.jar is located?

If so, then perhaps your j2ee.jar is corrupted.
[ May 23, 2003: Message edited by: Marilyn de Queiroz ]
Barry Gaunt
Ranch Hand

Joined: Aug 03, 2002
Posts: 7729
Juliane, I have just gone though a brand new installation of orion on my Suse 8.1 laptop.
$ORION_HOME is /home/orion/orion
I have copied:
1. tools.jar to $ORION_HOME
2. JavaRanchCommon.jar to:
$ORION_HOME/def-web-app/WEB-INF/lib
3. j2ee.jar to:
$ORION_HOME/def-web-app/WEB-INF/lib
My PATH variables are:
echo $PATH
/opt/j2sdk1.4.1_02/bin:/usr/local/bin:/usr/bin
:/usr/X11R6/bin:/bin:/opt/gnome2/bin
:/opt/gnome/bin:/opt/kde3/bin:/opt/gnome/bin:.
echo $CLASSPATH
/home/orion/orion/default-web-app/WEB-INF/lib/JavaRanchCommon.jar
:/opt/j2sdkee1.3.1/lib/j2ee.jar
I copied BeeServlet.class to:
$ORION_HOME/def-web-app/WEB-INF/classes
And everything worked first time.
So I suggest you do the same, including a fresh download of the J2EE distribution.
-Barry
[ May 23, 2003: Message edited by: Barry Gaunt ]
juliane gross
Ranch Hand

Joined: May 30, 2002
Posts: 161
Tatiii ! Tataaa!
Everything is working fine now. Bees are buzzing, Moo's are moosing and there is one happy java-lover who craves to get her hands on that second servlet assignment out there.

I had to install EVERYTHING new, though (well, I successfully de-bugged a couple of other not-willing-to-work-thingies on the way
and now I am with Suse 8.2, which is even still nicer!)
(I send you a copy of Suse 8.2 if you like, Barry! )
Sorry though, that I'll never know what really was the bug.
but on the fresh install orion ran just fine on first try like it should be.
To all of you helping, thank you very much!
I am very happy about the existence of JavaRanch and it's helpful and friendly java-gurus!

juliane
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: got stuck with orion - please help