Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Virgo » Servlet ClassNotFound exception
Servlet ClassNotFound exception [message #824625] Mon, 19 March 2012 22:11 Go to next message
James Gartner is currently offline James GartnerFriend
Messages: 30
Registered: March 2012
Member
Folks,
I was going through the documentation on how to deploy a standard WAR file (virgo-Tomcat 3.0.2.RELEASE), and I used the admin web console to upload the war file.
All seems to be ok -- says started the bundle and the web bundle.
When I try to connect to this web app, I get that the service is not available, and in the log it has a ClassnotFound... salesController:

ERROR http-bio-8090-exec-10 o.a.c.c.C.[.[localhost].[/saleservice].[SalesController] Allocate exception for servlet SalesController java.lang.ClassNotFoundException: com.nnnnn.sales.SalesController

Well, looking at the directories, I see:

C:\JavaApps\virgo-tomcat-server-3.0.2.RELEASE\virgo-tomcat-server-3.0.2.RELEASE\work\org.eclipse.virgo.kernel.deployer_3.0.2.RELEASE\staging\global\bundle\saleservice\0.0.0\saleservice.war\WEB-INF\classes\com\nnnnn\sales
there IS the SalesController.class file. The web.xml is there, etc -- it all looks normal.

This war file does work if deployed to a stand-alone Tomcat server.

Any ideas what is going on and how to debug??
Re: Servlet ClassNotFound exception [message #824868 is a reply to message #824625] Tue, 20 March 2012 07:03 Go to previous messageGo to next message
Violeta Georgieva is currently offline Violeta GeorgievaFriend
Messages: 278
Registered: October 2010
Senior Member
Can you try to modify the org.eclipse.virgo.web.properties properties file located in the $SERVER_HOME/repository/ext directory. Change the WABHeaders property to have a value of defaulted. Then redeploy the application.
Re: Servlet ClassNotFound exception [message #825250 is a reply to message #824868] Tue, 20 March 2012 16:59 Go to previous messageGo to next message
James Gartner is currently offline James GartnerFriend
Messages: 30
Registered: March 2012
Member
Thanks Violeta, I changed as you suggested, restarted virgo-tomcat, used the webconsole to re-upload the war file.

Still doesn't work. I see a couple of things in the virgo-server log file that I'm not sure about with this:

Here is the warning message that the WABHeaders WAS changed:
WE0006W WABHeaders set to 'defaulted' in org.eclipse.virgo.web.properties. This option may not be supported in future releases.

I also see this, but not sure if it's important ( I just have the standard virgo-tomcat installation done here):
ERROR system-artifacts org.apache.catalina.startup.HostConfig Application base [C:\JavaApps\virgo-tomcat-server-3.0.2.RELEASE\virgo-tomcat-server-3.0.2.RELEASE\webapps] for host [localhost] does not exist or is not a directory. deployOnStartUp and autoDeploy have been set to false to prevent deployment errors. Other errors may still occur.

NOW, when I go to the localhost:8090/saleservice, (used 8090 since have other stuff running at 8080), I don't even get the ClassNotFound exception. I just get in the web browser that:
The requested resource (/saleservice/) is not available.

There is NOTHING now in the log file to indicate a ClassException or anything else. I do see this in the access logs:
"GET /saleservice HTTP/1.1" 302 139
"GET /saleservice/ HTTP/1.1" 404 991
Re: Servlet ClassNotFound exception [message #825295 is a reply to message #825250] Tue, 20 March 2012 17:43 Go to previous messageGo to next message
James Gartner is currently offline James GartnerFriend
Messages: 30
Registered: March 2012
Member
Violeta, it looks like it is now working -- it took 3 reboots of virgo before it worked (I only did some changes to the config and repository/ext for the ssh.properties and telnet.properties files). Thanks very much for your help with this.
Re: Servlet ClassNotFound exception [message #825442 is a reply to message #825250] Tue, 20 March 2012 21:06 Go to previous message
Violeta Georgieva is currently offline Violeta GeorgievaFriend
Messages: 278
Registered: October 2010
Senior Member
Quote:
Here is the warning message that the WABHeaders WAS changed:
WE0006W WABHeaders set to 'defaulted' in org.eclipse.virgo.web.properties. This option may not be supported in future releases.


I'll fix the problem with the plain web applications transformation. You can track https://bugs.eclipse.org/bugs/show_bug.cgi?id=354730


Quote:
ERROR system-artifacts org.apache.catalina.startup.HostConfig Application base [C:\JavaApps\virgo-tomcat-server-3.0.2.RELEASE\virgo-tomcat-server-3.0.2.RELEASE\webapps] for host [localhost] does not exist or is not a directory. deployOnStartUp and autoDeploy have been set to false to prevent deployment errors. Other errors may still occur.


This is fixed with https://bugs.eclipse.org/bugs/show_bug.cgi?id=360571 in 3.5.0.M01. You should not worry, it's just a log. You can apply the fix on your system - it is in the tomcat-server.xml file.



It's great that everything is working now.

[Updated on: Tue, 20 March 2012 21:07]

Report message to a moderator

Previous Topic:Virgo 3.0.2 Released
Next Topic:Deploying EclipseRT bundles to Eclipse-embedded Virgo Tomcat doesn't work
Goto Forum:
  


Current Time: Fri Apr 19 22:00:18 GMT 2024

Powered by FUDForum. Page generated in 0.03255 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top