Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Virgo » Virgo and Mobicents, Integration issues(Bundle errors when loading org.eclipse.virgo.web.tomcat_3.5.0.RELEASE.plan)
Virgo and Mobicents, Integration issues [message #897777] Wed, 25 July 2012 08:50 Go to next message
Chen Fliesher is currently offline Chen FliesherFriend
Messages: 8
Registered: July 2012
Junior Member
I am trying to integrate Mobicents 1.7 with Virgo Tomcat 3.5.
I allready post this on dev, and forwarded here.

When the org.eclipse.virgo.web.tomcat_3.5.0.RELEASE.plan is starting,
the bundle org.eclipse.gemini.web.tomcat fained to start due to missing class:

Caused by: java.lang.ClassNotFoundException: org.apache.catalina.Service
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 97 common frames omitted

I managed to get this error, after doing the following:
1. Using Bundlor, I bundled all MSS jars
2. on lib directory I added all the MSS jars

dnsjava-2.1.0.jar
jain-sip-api-1.2.0.jar
jain-sip-ri-1.2.169.jar
junit-4.10.jar
mobicents-jain-sip-ext-1.1.jar
mobicents-jain-sip-ha-core-1.3.1.FINAL.jar
sip-servlets-annotations-1.7.0.FINAL.jar
sip-servlets-application-router-1.7.0.FINAL.jar
sip-servlets-catalina-7-1.7.0.FINAL.jar
sip-servlets-client-1.7.0.FINAL.jar
sip-servlets-core-api-1.7.0.FINAL.jar
sip-servlets-impl-1.7.0.FINAL.jar
sip-servlets-jruby-1.7.0.FINAL.jar
sip-servlets-spec-1.7.0.FINAL.jar
sip-servlets-tomcat-7-1.7.0.FINAL.jar
stun4j-1.0.MOBICENTS.jar

3. I didn't change the java-profile6, since it didn't change the error. I tried to add to the org.osgi.framework.bootdelegation part both org.apache.catalina and org.mobicents.servlet.sip.startup, but no change was noticed.

Any ideas?

It seems not according the manual to add MSS jars into VIRGO_HOME\lib, since this place shoulkd be the kernel only.
However, the message only changed to the above, after doing those changes.

Is anyone tried to add tomcat extensions to Virgo Tomcat like
org.mobicents.servlet.sip.startup.SipStandardEngine ?

Below you can see the original post,
Thanks boris for your answer.



------------------------------------------------------------------
Hi Chen,

It looks like you have a configuration issue here.
In addition to adding the relevant jars in VIRGO_HOME/lib you also need to
add the described in the tomcat-server.xml packages in Virgo's java
profile, so they can be loaded by the embedded Tomcat.
Your particular stacktrace shows that you need to add package
org.mobicents.servlet.sip.*startup* into the
VIRGO_HOME/configuration/java6-server.profile
file under the *org.osgi.framework.bootdelegation * property.
In should look like similar to this:

.....

org.osgi.framework.bootdelegation = \
*org.mobicents.servlet.sip.startup,\*

org.eclipse.virgo.kernel.authentication,\
com.sun.*,\

.....


Best Regards,
Bobby


On Mon, Jul 23, 2012 at 11:39 AM, Glyn Normington <gnormington@vmware.com>wrote:

> Hi Chen
>
> I think you're on your own since Virgo was designed for OSGi applications
> or WAR files. However, it would be much better to post your question to the
> Virgo forum since that's where most users hang out.
>
> Regards,
> Glyn
>
> On 22 Jul 2012, at 17:17, Chen Fliesher wrote:
>
> Hi,
> I'm trying to deploy mobicents (Sip Servlet Implementation and Sip Stack
> Impl) on Virgo 3.5.
> However, Mobicents jars must be part of the virgo libs. Mobicents is not
> an OSGI application.
> I tried to copy all the relevant jars into VIRGO_HOME/lib and edit
> the VIRGO_HOME/configuration/tomcat-server.xml so I added another server.
>
> <Service name="Sip-Servlets"
>
> className="org.mobicents.servlet.sip.startup.SipStandardService"
>
> sipApplicationDispatcherClassName="org.mobicents.servlet.sip.core.SipApplicationDispatcherImpl"
> concurrencyControlMode="None"
> congestionControlCheckingInterval="-1"
>
> darConfigurationFileLocation="configuration/dars/mobicents-dar.properties"
>
> sipStackPropertiesFile="configuration/mss-sip-stack.properties">
>
> <Engine defaultHost="localhost" name="Sip-Servlets"
> className="org.mobicents.servlet.sip.startup.SipStandardEngine">
>
> <Host className="org.mobicents.servlet.sip.startup.SipStandardHost"
> appBase="pickup" autoDeploy="true" name="localhost" unpackWARs="true"
> configClass="org.mobicents.servlet.sip.startup.SipContextConfig">
> </Host>
>
> ....
>
> Since the added jars are not recognized by Virgo I had to change the
> configuration/java6-server.profile to include those jars.
>
> However, I still recieves the following error
> [2012-07-23 03:15:43.120] system-artifacts <DE0006E> Start
> failed for bundle 'org.eclipse.gemini.web.tomcat' version '2.1.0.RELEASE'.
> org.eclipse.virgo.kernel.deployer.core.DeploymentException: BundleException
> at
> org.eclipse.virgo.kernel.install.artifact.internal.bundle.StandardBundleDriver.startBundle(StandardBundleDriver.java:197)
> at
> org.eclipse.virgo.kernel.install.artifact.internal.bundle.StandardBundleDriver.start(StandardBundleDriver.java:176)
> at
> org.eclipse.virgo.kernel.install.artifact.internal.bundle.StandardBundleInstallArtifact.doStart(StandardBundleInstallArtifact.java:276)
> at
> org.eclipse.virgo.kernel.install.artifact.internal.AbstractInstallArtifact.driveDoStart(AbstractInstallArtifact.java:231)
> at
> org.eclipse.virgo.kernel.install.artifact.internal.bundle.StandardBundleInstallArtifact.start(StandardBundleInstallArtifact.java:265)
> at
> org.eclipse.virgo.kernel.install.artifact.internal.StandardPlanInstallArtifact.doStart(StandardPlanInstallArtifact.java:130)
> at
> org.eclipse.virgo.kernel.install.artifact.internal.AbstractInstallArtifact.driveDoStart(AbstractInstallArtifact.java:231)
> at
> org.eclipse.virgo.kernel.install.artifact.internal.AbstractInstallArtifact.start(AbstractInstallArtifact.java:221)
> at
> org.eclipse.virgo.kernel.deployer.core.internal.PipelinedApplicationDeployer.start(PipelinedApplicationDeployer.java:376)
> at
> org.eclipse.virgo.kernel.deployer.core.internal.PipelinedApplicationDeployer.deploy(PipelinedApplicationDeployer.java:257)
> at
> org.eclipse.virgo.kernel.userregion.internal.InitialArtifactDeployer$ArtifactDeployingRunnable.deployArtifacts(InitialArtifactDeployer.java:164)
> at
> org.eclipse.virgo.kernel.userregion.internal.InitialArtifactDeployer$ArtifactDeployingRunnable.run(InitialArtifactDeployer.java:154)
> at java.lang.Thread.run(Unknown Source)
> Caused by: org.osgi.framework.BundleException: Exception in
> org.eclipse.gemini.web.tomcat.internal.Activator.start() of bundle
> org.eclipse.gemini.web.tomcat.
> at
> org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:734)
> at
> org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:683)
> at
> org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:381)
> at
> org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:300)
> at
> org.eclipse.virgo.kernel.core.internal.StandardBundleStarter.start(StandardBundleStarter.java:57)
> at
> org.eclipse.virgo.kernel.core.internal.StandardBundleStarter.start(StandardBundleStarter.java:45)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at
> org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
> at
> org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:56)
> at
> org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:60)
> at
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
> at
> org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
> at
> org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
> at
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
> at
> org.eclipse.gemini.blueprint.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:57)
> at
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
> at
> org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
> at
> org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
> at
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
> at
> org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
> at $Proxy39.start(Unknown Source)
> at
> org.eclipse.virgo.kernel.install.artifact.internal.bundle.StandardBundleDriver.startBundle(StandardBundleDriver.java:195)
> ... 12 common frames omitted
> Caused by: org.eclipse.gemini.web.core.spi.ServletContainerException:
> Error parsing Tomcat XML configuration.
> at
> org.eclipse.gemini.web.tomcat.internal.OsgiAwareEmbeddedTomcat.configure(OsgiAwareEmbeddedTomcat.java:313)
> at
> org.eclipse.gemini.web.tomcat.internal.TomcatServletContainerFactory.createContainer(TomcatServletContainerFactory.java:27)
> at
> org.eclipse.gemini.web.tomcat.internal.Activator.createContainer(Activator.java:107)
> at
> org.eclipse.gemini.web.tomcat.internal.Activator.start(Activator.java:58)
> at
> org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:711)
> at java.security.AccessController.doPrivileged(Native Method)
> at
> org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:702)
> ... 36 common frames omitted
> Caused by: org.xml.sax.SAXParseException: Error at (61, 77) :
> org.mobicents.servlet.sip.startup.SipStandardService
> at
> org.apache.tomcat.util.digester.Digester.createSAXException(Digester.java:2687)
> at
> org.apache.tomcat.util.digester.Digester.createSAXException(Digester.java:2719)
> at
> org.apache.tomcat.util.digester.Digester.startElement(Digester.java:1279)
> at
> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown
> Source)
> at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown
> Source)
> at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown
> Source)
> at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown
> Source)
> at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
> Source)
> at
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
> Source)
> at
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
> Source)
> at
> com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
> at
> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown
> Source)
> at
> com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown
> Source)
> at
> org.apache.tomcat.util.digester.Digester.parse(Digester.java:1556)
> at
> org.eclipse.gemini.web.tomcat.internal.OsgiAwareEmbeddedTomcat.configure(OsgiAwareEmbeddedTomcat.java:309)
> ... 42 common frames omitted
> Caused by: java.lang.ClassNotFoundException:
> org.mobicents.servlet.sip.startup.SipStandardService
> at
> org.eclipse.gemini.web.tomcat.internal.loading.ChainedClassLoader.doLoadClass(ChainedClassLoader.java:180)
> at
> org.eclipse.gemini.web.tomcat.internal.loading.ChainedClassLoader.loadClass(ChainedClassLoader.java:163)
> at
> org.apache.tomcat.util.digester.ObjectCreateRule.begin(ObjectCreateRule.java:144)
> at
> org.apache.tomcat.util.digester.Digester.startElement(Digester.java:1276)
> ... 54 common frames omitted
>
> Is there a way to do this,
> have someone managed to create a sip application on virgo ?
>
> Thanks in advanced,
> Chen
>
>
> --
> Chen Fleisher
> _______________________________________________
> virgo-dev mailing list
> virgo-dev@eclipse.org
> https://dev.eclipse.org/mailman/listinfo/virgo-dev
>
>
>
> _______________________________________________
> virgo-dev mailing list
> virgo-dev@eclipse.org
> https://dev.eclipse.org/mailman/listinfo/virgo-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://dev.eclipse.org/mailman/private/virgo-dev/attachments/20120723/2ec324c2/attachment.html>

------------------------------

_______________________________________________
Re: Virgo and Mobicents, Integration issues [message #899534 is a reply to message #897777] Wed, 01 August 2012 10:55 Go to previous message
Chen Fliesher is currently offline Chen FliesherFriend
Messages: 8
Registered: July 2012
Junior Member
I managed to do it after a lot of troubles.

I will just point some of the issues I encountered:

1. The org.eclipse.virgo.web.tomcat.support.ServerLifecycleLoggingListener must be removed since it cause null pointer exception when checking a Connector which is not apache implementation.

2. Use Fragment-Host and DynamicImport-Bundle were needed. To support MSS implemnetation of tomcat components, such as Service/Connector etc.

3. Remove log4j references from MSS classes (LogViewer for example), since MSS uses Log4j 1.2.14, while Virgo uses 1.2.16. There is a major difference in terms of class package locations.

After all those changes were implemented I managed to run succesfully the B2BUA example.
Previous Topic:Virgo Bundlor and Class Inheritance across Bundles
Next Topic:How to configure Embeded tomcat settings programatically in Virgo
Goto Forum:
  


Current Time: Sun Dec 21 05:32:50 GMT 2014

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

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