Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [virgo-dev] EclipseLink JPA [WAS: class loaders in context.xml]

Hi Chris,
    Very useful information. Thanks.
 
On the subject of the byte code weaving support in virgo, my read of the virgo programmers guide is that it requires modification of the manifest in third-party libraries -- is that correct? Also, is virgo weaving applicable to WARs? I would appreciate if you could expand on the virgo documentation with an example.  
 
On the particulars, I noticed that virgo 2.1.0 is distributed with "com.springsource.org.aspectj.weaver-1.6.6.RELEASE.jar" but not with the one that our WAR requires, namely  "spring-instrument-tomcat-3.0.0.RELEASE.jar". Was this omission intentional? Does it mean that aspectj weaving works out-of-the box in virgo?
 
As part of my testing, I dropped the missing jar in all the library locations, including lib/kernel, one at the time, but didn't resolve the problem. Could I have done something in the WAR to make it work?
--
Thanks & regards,
sd
On Wed, Nov 17, 2010 at 4:45 AM, Christopher Frost <frostc@xxxxxxxxxx> wrote:
Hi,

I would be surprised if EclipseLink would not run on OSGi but it won't have any nice integration with the OSGi services model. Virgo fully supports byte code weaving but I haven't tried EclipseLink on Virgo myself. Fortunately a project is under way to provide this close integration with OSGi. It's called Gemini JPA and can be found here, http://www.eclipse.org/gemini/jpa/

Hopefully you will find something useful here, the project lead for both EclipseLink and Gemini.Web is the same guy and I'm sure he will pipe up and answer questions on their forum. They are well aware of Virgo and I believe they have tried running on Virgo as well. As such I suspect they will know a lot more about this than I do.

Chris.



On 17/11/2010 05:28, Saadat Dowlati wrote:
Hi,
     As an alternative solution for JPA, hence to avoid this class loader problem (which was for Spring-JPA-Tomcat bytecode weaving), I came across the following link:
 
 
Is EclipseLink JPA supported in Virgo?  If yes, are instructions in the link above applicable to virgo?
If not, any other alternatives?
 
Thank you in advance,
--
sd 

On Tue, Nov 16, 2010 at 11:07 AM, Christopher Frost <frostc@xxxxxxxxxx> wrote:
Hi,

I'm afraid I'm out of educated guesses now. Will have to see if anyone else in the community has any ideas.

Chris.

On 16/11/2010 06:15, Saadat Dowlati wrote:
Hi Chris,
    Yes, the log shows that virgo is havinng problem with the loaderClass in the context.xml file. I also tried delegate="true", but didn't help. What do you mean by "depending on how the custom classloader is initialised"?
 
Is there any workaround? I would appreciate any other pointers.
--
Thanks,
sd

On Mon, Nov 15, 2010 at 11:19 AM, Christopher Frost <frostc@xxxxxxxxxx> wrote:
Hi,

Thanks for trying Virgo out.

I believe that the classloader you are trying to use there would constitute a custom classloader. Before trying to 'fix' this it would be best to confirm this is the problem. I would look in the config/serviceability.xml file and up the level of logging, maybe to 'DEBUG'. Then restart with the '-clean' option and deploy your app again. Now go and look in the log.log file and see what the first error to occur is. Now you will see the real cause.

If it is indeed classloading related from the application 'war' bundle then you could trying setting delegate="true". This might work, by falling back to the original classloader that is OSGi friendly, depending on how the custom classloader is initialised. 

Thanks,
Chris.

On 14/11/2010 21:31, Saadat Dowlati wrote:
Hello,
       We have become very interested in VWS and are trying to migrate our application from Tomcat. As the first step, following the documentation, I dropped our application WAR (which works on Tomcat 6) in the pickup directory. According to the log, VWS installs the WAR, but fails to start it.
The error messages don't provide any hint as to the root cause: 
[2010-11-14 16:12:05.472] fs-watcher                   <HD0001I> Hot deployer processing 'CREATED' event for file 'EMA-Server.war'.
[2010-11-14 16:12:06.122] fs-watcher                   <DE0000I> Installing bundle 'EMA-Server' version '0.0.0'.
[2010-11-14 16:12:09.285] fs-watcher                   <DE0001I> Installed bundle 'EMA-Server' version '0.0.0'.
[2010-11-14 16:12:09.311] fs-watcher                   <DE0004I> Starting bundle 'EMA-Server' version '0.0.0'.
[2010-11-14 16:12:09.316] Thread-3                     <WE0000I> Starting web bundle 'EMA-Server' version '0.0.0' with context path '/EMA-Server'.
[2010-11-14 16:12:14.696] Thread-3                     <WE0005E> Failed to start web bundle 'EMA-Server' version '0.0.0': consult the serviceability log for further details.
[2010-11-14 16:12:14.701] start-signalling-4           <DE0006E> Start failed for bundle 'EMA-Server' version '0.0.0'. org.eclipse.virgo.kernel.deployer.core.DeploymentException: W
eb application failed to start
        at org.eclipse.virgo.web.core.internal.WebBundleLifecycleListener.onStarted(WebBundleLifecycleListener.java:129)
        at org.eclipse.virgo.kernel.install.artifact.internal.ArtifactStateMonitor.onStarted(ArtifactStateMonitor.java:205)
        at org.eclipse.virgo.kernel.install.artifact.internal.AbstractInstallArtifact.asyncStartSucceeded(AbstractInstallArtifact.java:273)
        at org.eclipse.virgo.kernel.install.artifact.internal.AbstractInstallArtifact.access$0(AbstractInstallArtifact.java:270)
        at org.eclipse.virgo.kernel.install.artifact.internal.AbstractInstallArtifact$StateMonitorSignal.signalSuccessfulCompletion(AbstractInstallArtifact.java:223)
        at org.eclipse.virgo.kernel.core.internal.BundleStartTracker$1.run(BundleStartTracker.java:140)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:619)
Caused by: org.eclipse.gemini.web.core.WebApplicationStartFailedException: org.eclipse.gemini.web.core.spi.ServletContainerException: Web application at '/EMA-Server' failed to sta
rt. Check the logs for more details.
        at org.eclipse.gemini.web.internal.StandardWebApplication.start(StandardWebApplication.java:107)
        at org.eclipse.virgo.web.core.internal.WebBundleLifecycleListener.onStarted(WebBundleLifecycleListener.java:120)
        ... 8 common frames omitted
Caused by: org.eclipse.gemini.web.core.spi.ServletContainerException: Web application at '/EMA-Server' failed to start. Check the logs for more details.
        at org.eclipse.gemini.web.tomcat.internal.TomcatServletContainer.startWebApplication(TomcatServletContainer.java:123)
        at org.eclipse.gemini.web.internal.StandardWebApplication.start(StandardWebApplication.java:90)
        ... 9 common frames omitted 
 
While searching in the documentation, I came across the following note. It got my attention, as we use the TomcatInstrumentableClassLoader in the Tomcat's context.xml packaged in our WAR file.
Note that the following context configuration features are not supported in Virgo Web Server:
  • Custom class loaders

 Is TomcatInstrumentableClassLoader  considered a "Custom class loader" in VWS? If yes, is there any workaround for it? Here's the line from our context.xml file:
 
 <Loader
  loaderClass="org.springframework.instrument.classloading.tomcat.TomcatInstrumentableClassLoader"
  useSystemClassLoaderAsParent="false" />
Thanks in advance,
--
sd
 

--
Chris Frost
SpringSource, a division of VMware

Virgo Website, Wiki and Forum


_______________________________________________
virgo-dev mailing list
virgo-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/virgo-dev



--
Chris Frost
SpringSource, a division of VMware

Virgo Website, Wiki and Forum


_______________________________________________
virgo-dev mailing list
virgo-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/virgo-dev



--
Chris Frost
SpringSource, a division of VMware

Virgo Website, Wiki and Forum


_______________________________________________
virgo-dev mailing list
virgo-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/virgo-dev



Back to the top