• 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
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

BeeServlet and MVC2... again

 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,
I can't believe how much time I've spent on this... this seems to be
the weeding out point but I not giving up .

I have not been able to get the example working for MVC2, ActionServlet and the BeeServlet (sounds familiar....? ;)
And I have read various forum posts and believe I have tried all if not most of the suggestions which date back to early 2000s

My installation is Windows XP, SP3 running jdk1.6.0_17,and Orion 2.0.7.
I have tried java_ee_sdk6, j2ee_sdk_1_4_03, j2sdkee_1_3_1, executed javac against different -source and -targets (1.3, 1.4)

BeeServlet 1st version works, as well as ReverseServlet.

I have manipulated the classpath variable always pointing to jr.jar.
I have attempted various combinations of j2ee.jar in the classpath and have put orion.jar in the classpath.

It appears the dreaded 500 Internal Server Error keeps popping up when I access http://localhost/servlet/BeeServlet,
and I have basically focused my efforts on the runtime activities.

Here is what I discovered:

If I start orion as follows:

cd orion
java -verbose -jar orion.jar | find "HttpServlet"

then orion will load HttpServletRequest and HttpServletResponse from orion.jar



When I attempt to access http://localhost/servlet/BeeServlet two more load statements pop up
but not the HttpServlet class, and the 500 error pops up in the browser with the long list
of class references. I think this is getting called from LogServlet which ActionServlet inherits from.



When I access reverse.html and hit submit, HttpServlet loads...



It looks like as long as I have orion.jar in the classpath, the j2ee.jar or javaee.jar is not required for compilation.
But orion is always accessing servlet class during runtime from orion.jar

I have put the jr.jar and j2ee.jar in the orion/lib or orion/default-web-app/WEB-INF/lib folders...

I would appreciate any additional pointers... I guess I have not de-installed jdk1.6 yet.
I have not recompiled the classes in orion.jar or in jr.jar.

So many permutations. I'm definitely missing something....

Thanks in advance,

Vince
 
Greenhorn
Posts: 14
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Vince,
I'm hardly an expert here but I too was having troubles getting JSPs to work with Orion. Have a look at the thread "Orion JSP error parsing, syntax error, cannot read" https://coderanch.com/t/487353/Cattle-Drive/Orion-JSP-error-parsing-syntax, which mainly relates to tools.jar .

FYI, I'm starting Orion using a simple Windows batch file consisting of


By the way, were you able to run the Orion example JSPs? I was not. I have a Win XP system PATH setting to Java 1.6.0 .

Hope this helps.
 
Sheriff
Posts: 9109
12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Vince Mansel wrote:Hi all,
My installation is Windows XP, SP3 running jdk1.6.0_17,and Orion 2.0.7.
I have tried java_ee_sdk6, j2ee_sdk_1_4_03, j2sdkee_1_3_1, executed javac against different -source and -targets (1.3, 1.4)

I have manipulated the classpath variable always pointing to jr.jar.
I have attempted various combinations of j2ee.jar in the classpath and have put orion.jar in the classpath.

It looks like as long as I have orion.jar in the classpath, the j2ee.jar or javaee.jar is not required for compilation.
But orion is always accessing servlet class during runtime from orion.jar

I have put the jr.jar and j2ee.jar in the orion/lib or orion/default-web-app/WEB-INF/lib folders...

Vince


You should not need j2ee.jar at all when you are using orion.jar ... definitely not in your classpath.

I haven't worked with these for a while. I'll try to spend some time on it this weekend to see if I have the same issue(s).
 
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
Hey Vince, when I was setting this all up I had problems with the second bee servlet because of package issues if I remember correctly. I have orion set up inside Program Files on my current system which runs XP, and it installed orion there without me realizing it. (I had done this before on a 98 system, which was a bit different.) So I left it there rather than set it up again. The second servlet is in a package, if I remember correctly. And my classpath for my XP system which worked for these assignments is:

.;C:\Program Files\Java\j2re1.4.2\lib\ext\QTJava.zip;C:\j2sdkee1.3.1\lib\j2ee.jar;C:\Program Files\Java\jrcommon-2-bin.jar;C:\mysql-connector-java-5.1.5\mysql-connector-java-5.1.5-bin.jar;

I'm gonna go back and try to run through all these again too, to see if I can help in any way. I had problems with this part as well, but it was a while ago, and it will take me some time to dig through the pile that landed on top of these assignments!
Hang in there!

Hmmmm, interesting twist. When I try to go to the index page i get a test servlet page instead. i tried changing the xml to go to a different page, but that didn't work, so I tried restarting Orion when I noticed this error message on the console:
Error starting HTTP-Server: Address already in use: JVM_Bind
Then Orion/2.0.7 initialized

I've never seen that before, and I can't get the console to respond.....
Weird.
 
Vince Mansel
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Mark Judman wrote:Vince,
I'm hardly an expert here but I too was having troubles getting JSPs to work with Orion. Have a look at the thread "Orion JSP error parsing, syntax error, cannot read" https://coderanch.com/t/487353/Cattle-Drive/Orion-JSP-error-parsing-syntax, which mainly relates to tools.jar .

FYI, I'm starting Orion using a simple Windows batch file consisting of


By the way, were you able to run the Orion example JSPs? I was not. I have a Win XP system PATH setting to Java 1.6.0 .

Hope this helps.



Mark,
Thanks. I saw that link but my issue is not during the Orion startup.
I do start with the java -jar orion.jar also and all of the Orion examples run without issue.

There is one class that does not, FingerServlet in C:\orion\default-web-app\WEB-INF\classes
invoked with (http://localhost/servlet/FingerServlet)

Vince
 
Vince Mansel
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Carol Murphy wrote:
Hmmmm, interesting twist. When I try to go to the index page i get a test servlet page instead. i tried changing the xml to go to a different page, but that didn't work, so I tried restarting Orion when I noticed this error message on the console:
Error starting HTTP-Server: Address already in use: JVM_Bind
Then Orion/2.0.7 initialized

I've never seen that before, and I can't get the console to respond.....
Weird.


Carol,
I saw that same error right off the bat when starting Orion. My Skype app was sitting on TCP Port 80.
I quit Skype and restarted orion, and then orion initialized successfully and I accessed the server with http://localhost .

There is also the file where the port can be edited to 8080 for Orion: C:\orion\config\default-web-site.xml

In this case, I can access the server with http://localhost:8080 .

Vince
 
Vince Mansel
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Two more items to report...

The good news is that I replicated (as near as I can tell) my java environment on a DESKTOP WinXP, SP2 machine
by FTP'ing the install files from my laptop to the desktop.

BeeServlet with ActionServlett/MVC2 is a buzzin...

My original development machine is my laptop PC. Which I carry when I travel and to work... oh no

What I discovered (on the laptop) is extending from LogServlet does not work. The 500 Internal Server Error pops
up (I modified NowServlet to extend LogServlet and that exposes the problem)

This works...


and this does not...


So something really funky is going on... argh! Anybody else seeing this?
I will continue troubleshooting....
 
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
Thanks, Vince. Just got home and saw your response. I'll try monkeying with that tomorrow. I can't think of anything that would be using the port orion was using, which is 80, right?
Nothing new has been installed on this system that I can think of that would be using that port, but I'll try your solution tomorrow when I have a few fresh brain cells!
 
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
Well Vince, I switched ports which solved the JVM_Bind issue, but now I get a page the just says "It Works!" When I direct my browser to localhost. But the index.html in the orion defaultwebapp directory is the one you're supposed to see when you go to localhost. And I can't find the index html anywhere in orion. Just plain wierd
 
Vince Mansel
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Interesting.... you need to find what app or process is listening on what port...

on a windows machine, to see if port 80 is use (it is), do:


To check which app is using what ports:


I have orion listening on port 80 and I see the following:

Click <Ctrl>-c when you see the port you are interested in...

Perhaps, find a known good index.html page for orion and use it to test.

 
Vince Mansel
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Since this has evolved a bit, I have moved this thread over here:

https://coderanch.com/t/488024/Servlets/java/HttpServlet-not-found-Laptop-but

Carol, may I suggest we start a new thread on your Orion issue.

Thanks, Vince
 
Vince Mansel
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey!!!

My Bee is buzzin!!!

Resolved here:

https://coderanch.com/t/488024/Servlets/java/HttpServlet-not-found-Laptop-but

Thanks all,

Vince
 
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Vince, you just saved me a ton of time and frustration and helped me conserve my inventory of obscenities for future debugging. I couldn't even compile the first example BeeServlet, so I came here and found your thread, and followed the link to the other thread, and looked around, and Lo! I found a second copy of jr.jar lurking in another directory off C:\Java. I simply renamed the file and Presto! I have a buzzing bee. THANKS!
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic