Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Virgo » Configure Virgo to identify Web Context correct path(Failure to resolve web context due to /localhost prefix)
Configure Virgo to identify Web Context correct path [message #899883] Thu, 02 August 2012 13:18 Go to next message
Chen Fliesher is currently offline Chen Fliesher
Messages: 8
Registered: July 2012
Junior Member
Hi,
I am trying to load a simple servlet. A war file with 1 Servlet class.
This is on a 3.5 Virgo/Tomcat. Any assistence will be appricated.

The exception I get is regarding the servlet location:
Quote:

[2012-08-03 03:52:28.924] DEBUG start-signalling-3 o.e.gemini.web.tomcat.internal.loading.BundleWebappClassLoader Searching the application's bundle
[2012-08-03 03:52:28.925] DEBUG start-signalling-3 org.eclipse.gemini.web.tomcat.internal.loading.BundleDirContext Name '/localhost/call-forwarding-1.7.0.FINAL/WEB-INF/classes/some/package/example/CallForwardingServlet.class' does not exist. javax.naming.NameNotFoundException: Name '/localhost/call-forwarding-1.7.0.FINAL/WEB-INF/classes/some/package/example/CallForwardingServlet.class' does not exist.
at org.eclipse.gemini.web.tomcat.internal.loading.BundleDirContext.getNamedEntry(BundleDirContext.java:104)
at org.eclipse.gemini.web.tomcat.internal.loading.BundleDirContext.doGetAttributes(BundleDirContext.java:169)
at org.apache.naming.resources.BaseDirContext.getAttributes(BaseDirContext.java:1089)
at org.apache.naming.resources.BaseDirContext.getAttributes(BaseDirContext.java:1042)
at org.apache.naming.resources.ProxyDirContext.cacheLoad(ProxyDirContext.java:1613)
at org.apache.naming.resources.ProxyDirContext.cacheLookup(ProxyDirContext.java:1536)
at org.apache.naming.resources.ProxyDirContext.lookup(ProxyDirContext.java:297)
at org.apache.naming.resources.DirContextURLConnection.getInputStream(DirContextURLConnection.java:391)
at org.apache.catalina.startup.ContextConfig.processAnnotationsJndi(ContextConfig.java:1978)
at org.apache.catalina.startup.ContextConfig.processAnnotationsJndi(ContextConfig.java:1970)
at org.apache.catalina.startup.ContextConfig.processAnnotationsJndi(ContextConfig.java:1970)
at org.apache.catalina.startup.ContextConfig.processAnnotationsJndi(ContextConfig.java:1970)
at org.apache.catalina.startup.ContextConfig.processAnnotationsJndi(ContextConfig.java:1970)
at org.apache.catalina.startup.ContextConfig.processAnnotationsJndi(ContextConfig.java:1970)
at org.apache.catalina.startup.ContextConfig.processAnnotationsUrl(ContextConfig.java:1893)
at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1251)
at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:855)
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:345)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5161)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:895)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:871)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:615)
at org.eclipse.gemini.web.tomcat.internal.TomcatServletContainer.startWebApplication(TomcatServletContainer.java:125)
at org.eclipse.gemini.web.internal.StandardWebApplication.start(StandardWebApplication.java:95)
at org.eclipse.virgo.web.core.internal.WebBundleLifecycleListener.onStarted(WebBundleLifecycleListener.java:122)
at org.eclipse.virgo.kernel.install.artifact.internal.StandardArtifactStateMonitor.onStarted(StandardArtifactStateMonitor.java:271)
at org.eclipse.virgo.kernel.install.artifact.internal.AbstractInstallArtifact.asyncStartSucceeded(AbstractInstallArtifact.java:319)
at org.eclipse.virgo.kernel.install.artifact.internal.AbstractInstallArtifact.access$0(AbstractInstallArtifact.java:316)
at org.eclipse.virgo.kernel.install.artifact.internal.AbstractInstallArtifact$StateMonitorSignal.signalSuccessfulCompletion(AbstractInstallArtifact.java:252)
at org.eclipse.virgo.kernel.core.internal.BundleStartTracker$1.run(BundleStartTracker.java:140)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)


Is it beacuse the localhost get's in the way ? or is it my packaging that suppose to be different ?


I use the following web.xml
Quote:

<web-app>
<app-name>CallForwardingB2BUAApplication</app-name>
<context-param>
<param-name>contextClass</param-name>
<param-value>org.eclipse.virgo.web.dm.ServerOsgiBundleXmlWebApplicationContext</param-value>
</context-param>

<servlet>
<servlet-name>CallForwardingB2BUASipServlet</servlet-name>
<display-name>CallForwardingB2BUASipServlet</display-name>
<description>Call Forwarding B2BUA SIP servlet</description>
<servlet-class>
some.package.example.CallForwardingServlet
</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
</web-app>


And the following MANIFEST.MF

Quote:

Manifest-Version: 2.0
Bundle-ClassPath: WEB-INF/classes
Export-Package: some.package.example;version="1.7.0";uses
:="javax.servlet,javax.servlet.sip"
Build-Jdk: 1.6.0_30
Bundle-Version: 1.7.0
Tool: Bundlor 1.0.0.RELEASE
Created-By: Apache Maven
Bundle-SymbolicName: call_forwarding
Import-Package: javax.servlet,javax.servlet.sip,org.apache.log4j
Archiver-Version: Plexus Archiver



Thanks in advanced
Chen
Re: Configure Virgo to identify Web Context correct path [message #900454 is a reply to message #899883] Tue, 07 August 2012 03:34 Go to previous messageGo to next message
Chen Fliesher is currently offline Chen Fliesher
Messages: 8
Registered: July 2012
Junior Member
The problem was that the war in pickup dir was not extracted. There for the relevant class was not reached. I generated it on a different directory (webapp) and change the tomcat-server.xml as well and it worked. However, The duplication of war + extracted war is still a problem.
Re: Configure Virgo to identify Web Context correct path [message #900603 is a reply to message #899883] Tue, 07 August 2012 13:59 Go to previous message
Chen Fliesher is currently offline Chen Fliesher
Messages: 8
Registered: July 2012
Junior Member
Took me a while, but it appears there is a bug in Gimini 1.0.0



Once the Jar was replaced, it worked like charm.
Previous Topic:Clean doesn't work as expected
Next Topic:Hibernate Session Factory
Goto Forum:
  


Current Time: Wed Jul 30 05:27:08 EDT 2014

Powered by FUDForum. Page generated in 0.02028 seconds