OK, I am running JRun 3.0 on Redhat 6.2. I have JRun installed under the
default directory of /opt/JRun and I have jdk1.2.2 installed under
/usr/local/jdk1.2.2

I just added in my version of the CLASSPATH and my servlet is working again.
Here is what I used for a CLASSPATH.
CLASSPATH=.:/usr/local/jdk1.2.2/lib/tools.jar:/opt/JRun/lib/jrun.jar:/opt/JR
un/lib/jsp.jar

I have no idea of my CLASSPATH is correct or not, since I can only guess
what my required libraries are. Since it works again maybe the above was a
good guess.

I will try running in Netscape and see what happens as you suggest.

10 minutes later:

OK, now its giving me that error again after recompiling. It looks like
something is wrong with how the servlet knows about the bean I am using.
Below is the error that I get in both IE 5.0 and Netscape 4.72.
shopping.Item I assume is the line import shopping.Item; from the servlet.

500 Internal Server Error

/rhii/servlet/ShopServlet:

shopping.Item
java.lang.ClassCastException: shopping.Item
        at
jrun__Shopcart__ShopCart2ejsp16._jspService(jrun__Shopcart__ShopCart2ejsp16.
java:50)
        at allaire.jrun.jsp.HttpJSPServlet.service(HttpJSPServlet.java:40)
        at allaire.jrun.servlet.JRunSE.service(JRunSE.java:1013)
        at allaire.jrun.servlet.JRunSE.runServlet(JRunSE.java:925)
        at
allaire.jrun.servlet.JRunNamedDispatcher.forward(JRunNamedDispatcher.java:34
)
        at allaire.jrun.jsp.JSPServlet.service(JSPServlet.java:174)
        at allaire.jrun.servlet.JRunSE.service(JRunSE.java:1013)
        at allaire.jrun.servlet.JRunSE.runServlet(JRunSE.java:925)
        at
allaire.jrun.servlet.JRunRequestDispatcher.forward(JRunRequestDispatcher.jav
a:88)
        at ShopServlet.doPost(ShopServlet.java:64)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:772)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
        at allaire.jrun.servlet.JRunSE.service(JRunSE.java:1013)
        at allaire.jrun.servlet.JRunSE.runServlet(JRunSE.java:925)
        at
allaire.jrun.servlet.JRunNamedDispatcher.forward(JRunNamedDispatcher.java:34
)
        at allaire.jrun.servlet.Invoker.service(Invoker.java:84)
        at allaire.jrun.servlet.JRunSE.service(JRunSE.java:1013)
        at allaire.jrun.servlet.JRunSE.runServlet(JRunSE.java:925)
        at
allaire.jrun.servlet.JRunRequestDispatcher.forward(JRunRequestDispatcher.jav
a:88)
        at allaire.jrun.servlet.JRunSE.service(JRunSE.java:1131)
        at allaire.jrun.servlet.JvmContext.dispatch(JvmContext.java:330)
        at allaire.jrun.jrpp.ProxyEndpoint.run(ProxyEndpoint.java:354)
        at allaire.jrun.ThreadPool.run(ThreadPool.java:267)
        at allaire.jrun.WorkerThread.run(WorkerThread.java:74)

Aaron

                <<:::..:::...::: Aaron Prohaska :::..:::...:::>>
VerdeSoft Internet Services
mailto:[EMAIL PROTECTED]          http://www.verdesoft.net/


-----Original Message-----
From: Donald Vandenbeld [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 25, 2000 12:40 PM
To: Aaron Prohaska
Subject: Re: Compiling your beans...


Ah, I see the problem, the lines get cut off :-)
I am attaching a text file with the two classpath lines in it...

The line that starts with 'jar' should actually be a part of the line above
it.

This classpath only works for Linux or Unix and only works with Resin 1.1
that has been installed in /usr/local/resin1.1.

What servlet engine are you using?  What platform (Windows, Linux) are you
running it on?

When you say that you are getting an error, what kind of error?  If it's a
500 Servlet Exception or just a 500 then there is an error in your code.  If
you are using Internet Explorer, it very hard to find out where the error
is.  If you use Netscape as your browser, you'll get lots more information
about the error (which will help you find it).  As well, you might want to
turn off JIT.  JIT compiles your code.  If your code isn't compiled it'll
run a little slower, but you'll get the line number of the error in your
error 500 message!!!  If you want to turn off JIT, simple add:

set JAVA_COMPILER=NONE
to your autoexec.bat file if you are running your servlet engine under
Windows

If you are running Linux, add:
JAVA_COMPILER=NONE
export JAVA_COMPILER
to the .bashrc file in your home directory.

Hope this helps,
Donald

----- Original Message -----
From: "Aaron Prohaska" <[EMAIL PROTECTED]>
To: "'Donald Vandenbeld'" <[EMAIL PROTECTED]>; "Zoot-List (E-mail)"
<[EMAIL PROTECTED]>
Sent: Tuesday, July 25, 2000 12:52 PM
Subject: RE: Compiling your beans...


>
> Donald, in the CLASSPATH does the : delimite seperate paths and what does
> jar:/path mean? Also on the first line at the end you have
> :/usr/local/resin1.1/lib/resin, what is the resin at the end, a file or
> directory? I am having a problem now where I had gone and changed some
code
> which created a new error, so I changed the code back to when it was
> working, but it still does not work anymore. I don't know if my CLASSPATH
> has anything to do with it, but I need to get it setup properly anyway.
>
> thanks,
>
> Aaron
>
> <<:::..:::...::: Aaron Prohaska :::..:::...:::>>
> VerdeSoft Internet Services
> mailto:[EMAIL PROTECTED] http://www.verdesoft.net/
>
>
> -----Original Message-----
> From: Donald Vandenbeld [mailto:[EMAIL PROTECTED]]
> Sent: Friday, July 21, 2000 3:33 PM
> To: Aaron Prohaska
> Subject: Re: Compiling your beans...
>
>
> Nope, I simply put the following two lines in the file /etc/profile:
>
>
CLASSPATH=.:/usr/local/jdk1.2.2/lib/tools.jar:/usr/local/resin1.1/lib/resin.
> jar:/usr/local/resin1.1/lib/jsdk22.jar:/usr/local/resin1.1/lib/jdk12.jar
> export CLASSPATH
>
> Then when you reboot, the CLASSPATH will be set for any account you log in
> as.
>
> If you want, you can add those two lines to .bashrc in your home
directory.
> Then you just have to log out and log back in again.
>
> Donald
>
> ----- Original Message -----
> From: "Aaron Prohaska" <[EMAIL PROTECTED]>
> To: "'Donald Vandenbeld'" <[EMAIL PROTECTED]>
> Sent: Friday, July 21, 2000 4:43 PM
> Subject: RE: Compiling your beans...
>
>
> >
> >
> > Donald, I had posted a question about the CLASSPATH a while back in the
> > redhat list and of course got many different suggestions on how to set
it.
> I
> > am not sure if I did this correctly since I am now having problems. When
> you
> > set your CLASSPATH how are you doing it? Are you setting it in a file
and
> > then using the export CLASSPATH command?
> >
> > thanks,
> >
> > Aaron
> >
> > <<:::..:::...::: Aaron Prohaska :::..:::...:::>>
> > VerdeSoft Internet Services
> > mailto:[EMAIL PROTECTED] http://www.verdesoft.net/
> >
> >
> > -----Original Message-----
> > From: Donald Vandenbeld [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, July 21, 2000 1:14 PM
> > To: Aaron Prohaska
> > Subject: Re: Compiling your beans...
> >
> >
> >
> >
> > You have to set the classpath in Linux to include the 'important'
> libraries
> > from your servlet/jsp engine.
> >
> > I'm using Resin under RedHat 6.2, for instance.  It's installed in
> > /usr/local/resin1.1 and it's library files are in
/usr/local/resin1.1/lib.
> > Java is installed in /usr/local/jdk1.2.2.
> >
> > To get things to compile, I set my classpath using:
> >
>
CLASSPATH=.:/usr/local/jdk1.2.2/lib/tools.jar:/usr/local/resin1.1/lib/resin.
> > jar:/usr/local/resin1.1/lib/jsdk22.jar:/usr/local/resin1.1/lib/jdk12.jar
> > export CLASSPATH
> >
> > You'll have to change the directories (and the jar files) to be correct
> for
> > your setup.
> >
> > You can either put those lines in /etc/profile or in the .bashrc file in
> > your home directory.  Once you do this you'll have to restart your
machine
> > or log into your machine again to have the CLASSPATH set.
> >
> > That should fix your problems.
> >
> > Cheers, Donald
> >
> > ----- Original Message -----
> > From: "Aaron Prohaska" <[EMAIL PROTECTED]>
> > To: "'Donald Vandenbeld'" <[EMAIL PROTECTED]>
> > Sent: Friday, July 21, 2000 2:20 PM
> > Subject: RE: Compiling your beans...
> >
> >
> > >
> > >
> > > The JBuilder I am using is on my W2K machine. I can now compile on
> > > Win/JBuilder, just not on linux from the command line. When compiling
on
> > > Linux from the command line I get this:
> > >
> > > ShopServlet.java:12: Package javax.servlet not found in import.
> > > import javax.servlet.*;
> > >        ^
> > > ShopServlet.java:13: Package javax.servlet.http not found in import.
> > > import javax.servlet.http.*;
> > >        ^
> > > ShopServlet.java:16: Superclass HttpServlet of class ShopServlet not
> > found.
> > > public class ShopServlet extends HttpServlet {
> > >                                  ^
> > > 3 errors
> > >
> > > Why would javac when compiling a servlet not be able to find these
> > standerd
> > > imports?
> > >
> > > Aaron
> > >
> > > <<:::..:::...::: Aaron Prohaska :::..:::...:::>>
> > > VerdeSoft Internet Services
> > > mailto:[EMAIL PROTECTED] http://www.verdesoft.net/
> > >
> > >
> > > -----Original Message-----
> > > From: Donald Vandenbeld [mailto:[EMAIL PROTECTED]]
> > > Sent: Friday, July 21, 2000 7:02 AM
> > > To: [EMAIL PROTECTED]
> > > Subject: Compiling your beans...
> > >
> > >
> > >
> > >
> > > Hi there Aaron,
> > >
> > > I've never tried using JBuilder under linux so I'm not sure what your
> > > compile problem might be.  This won't be much of a problem, though,
> > > because you can move your class files from Windows to Linux and
> > > everything will be fine (god I love Java!).  What kind of error
message
> > > do you get when compiling under Linux?  When I get home tonight I'll
try
> > > installing JBuilder on my Linux development system and try compiling
> > > some beans... (or are you compiling from the console in Linux??)
> > >
> > > Cheers, Donald
> > >
> > >
> > >
> >
> >
>
>

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to