Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 368781 - greenpages fails to deploy - Cannot load db driver
Summary: greenpages fails to deploy - Cannot load db driver
Status: CLOSED FIXED
Alias: None
Product: Virgo
Classification: RT
Component: tooling (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P2 major (vote)
Target Milestone: 3.7.0.M01   Edit
Assignee: Chris Frost CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 368785 398481
  Show dependency tree
 
Reported: 2012-01-16 17:55 EST by Miles Parker CLA
Modified: 2013-01-26 15:17 EST (History)
9 users (show)

See Also:
b.kapukaranov: review+


Attachments
Patch for Greenpages commit 31d27b2dd00441d6373b82560e4d86ab2a829d7c (1.45 KB, application/octet-stream)
2012-02-28 11:22 EST, Glyn Normington CLA
glyn.normington: review+
Details
Error popup when deploying Greenpages PAR (58.66 KB, image/png)
2013-01-23 12:59 EST, Chris Frost CLA
no flags Details
Contents of the greenpages par (21.77 KB, image/png)
2013-01-24 16:47 EST, Chris Frost CLA
no flags Details
Modified greenpages project (43.09 KB, image/png)
2013-01-24 19:42 EST, Leo Dos Santos CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Miles Parker CLA 2012-01-16 17:55:33 EST
The load for the H2 Driver is failing when attempting to start and run the Virog greenpages sample app from Virgo Tooling. The application runs fine under stand-alone. See the stack trace below. Leo also replicated this independently, as did user on this news group posting:

http://www.eclipse.org/forums/index.php/t/261958/

I'm going to take a run at this, but would appreciate any ideas from folks more familiar with the application ide of things.


[2012-01-16 14:47:14.831] region-dm-13                 <AG0000E> Application context creation failure for bundle 'greenpages-2.5.0.RELEASE-greenpages.db' version '2.5.0'. org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in URL [bundleentry://130.fwk1785166310/META-INF/spring/module-context.xml]: Invocation of init method failed; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC driver class 'org.h2.Driver'
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1420)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:580)
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
	at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.access$1600(AbstractDelegatedExecutionApplicationContext.java:69)
	at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:355)
	at org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)
	at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:320)
	at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:132)
	at org.eclipse.virgo.kernel.agent.dm.ContextPropagatingTaskExecutor$2.run(ContextPropagatingTaskExecutor.java:95)
	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:680)
Caused by: org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC driver class 'org.h2.Driver'
	at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1146)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1544)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1485)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1417)
	... 17 common frames omitted
Caused by: org.eclipse.virgo.kernel.osgi.framework.ExtendedClassNotFoundException: org.h2.Driver in KernelBundleClassLoader: [bundle=greenpages-2.5.0.RELEASE-synthetic.context_2.5.0.RELEASE]
	at org.eclipse.virgo.kernel.userregion.internal.equinox.KernelBundleClassLoader.loadClass(KernelBundleClassLoader.java:138)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
	at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1138)
	... 24 common frames omitted
Caused by: java.lang.ClassNotFoundException: org.h2.Driver
	at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:513)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:429)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:417)
	at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
	at org.eclipse.virgo.kernel.userregion.internal.equinox.KernelBundleClassLoader.loadClass(KernelBundleClassLoader.java:134)
	... 26 common frames omitted
Comment 1 Miles Parker CLA 2012-01-17 22:30:36 EST
OK, by connecting to console, I can establish that the class is actually there:

Bundles containing [org/h2/Driver.class]:
  86	com.springsource.org.h2

 So the question is, why can it not be recognized in Eclipse scenario when it can it manual build scenario? Is it possible that we're using a different version of the relvant org.springframework and something is broken there?
Comment 2 Miles Parker CLA 2012-01-17 22:45:45 EST
One issue is that org.h2.Driver is using Class.forName, which is an anti-pattern in the Equinox universe. See e.g. http://wiki.eclipse.org/Context_Class_Loader_Enhancements#Context_Class_Loader_2

            try {
            	try {
                Class.forName(driverClassName);
            	}catch (ClassNotFoundException e) {
            		driverFromCCL = Thread.currentThread().getContextClassLoader().loadClass(driverClassName);
				}
                
            } catch (Throwable t) {
                String message = "Cannot load JDBC driver class '" +
                    driverClassName + "'";
                logWriter.println(message);
                t.printStackTrace(logWriter);
                throw new SQLNestedException(message, t);
            }
Comment 3 Miles Parker CLA 2012-01-17 22:55:40 EST
Here's a guess.. H2's -- let's say "pragmatic" to keep it polite, and hey we've all done stuff like this -- technique for class loading does an end run around some expectations about what might be going on. Wondering if the Virgo class loading mechanisms are relying on aspects of the class loading mechanism to determine loading order?
Comment 4 Miles Parker CLA 2012-01-18 13:55:18 EST
Chris Frost just sent me a new version of greenpages build.

It didn't make any difference, but I think that might be because of Maven's oh-so-sucky caching mechanism. :-P
Comment 5 Miles Parker CLA 2012-01-18 15:20:03 EST
OK, it appears to be a regression in 3.1.0. I can confirm that I can run it against 3.0.2. In fact, it appears that the older greenpages builds work as well.

So it appears to be an interaction between 3.1.0.M01 and the current Virgo IDE. It's possible that it is simply a 3.1.0 issue and the tooling doesn't have anything to do with it. I'll try to verify that now.

Chris, are you able to get this build working with Virgo Standalone 3.1.0?
Comment 6 Chris Frost CLA 2012-01-19 05:36:32 EST
Hi,

So 3.1.0.M01 has some massive changes in it and some bugs, one of the bugs is that the release got the wrong version, should of been called 3.5.0.M01. I'm not even going to try it on that until it's more stable and is related in part to bug 363730. I suspect the tooling, as is, can't anything as the file structure has changed etc... There should be some bugzillas somewhere to cover getting the tooling working on the new file structure.
Comment 7 Glyn Normington CLA 2012-01-19 05:57:00 EST
Hi Miles

Please use Virgo 3.0.2 for developing the Virgo IDE tooling against until bug 364573 is implemented in Virgo IDE.

Regards,
Glyn
Comment 8 Miles Parker CLA 2012-01-19 12:58:46 EST
Yeah, I'm definitely aware of those :), but the 3.1.0.CI appeared to be using the old file structure. So that's what I was going on, thinking that the 3.1.0 and 3.5.0 streams were different and that 3.5.0 was where the new file structure was coming in. I'm not convinced that this is a file location issue purely, but let's wait and see what happens when we convert the file structure.
Comment 9 Miles Parker CLA 2012-02-13 21:00:57 EST
This is still failing under 3.5.0 even with changes in bug 364573. This means that we still don't have working green pages on 3.5.
Comment 10 Chris Frost CLA 2012-02-14 09:58:51 EST
Hi,

Is it failing in the same way again? If so does it work from the command line, with no tooling involved?

Chris.
Comment 11 Miles Parker CLA 2012-02-14 12:06:11 EST
(In reply to comment #10)
> Hi,
> 
> Is it failing in the same way again? If so does it work from the command line,
> with no tooling involved?
> 
> Chris.

Hi Chris,

Yes. WRT to console launch, there are varying reports. :) I was just discussing this with another team member. We obviously don't want to waste cycles on this if the real issue is with 3.5.0 server runtime itself. I thought that I had it working at one point stand-alone, but that may have been with 3.0.2. I can't go through the build right now but as soon as I can I'm going to try it stand alone with the latest build. If anyone has a more recent expereince, please pipe up.

Miles
Comment 12 Leo Dos Santos CLA 2012-02-14 12:25:50 EST
It failed from the command line for me when I tried last week. Same error about failing to load the h2 driver.
Comment 13 Miles Parker CLA 2012-02-14 12:28:10 EST
OK, I'm going to re-assign this one to runtime. Feel free to bounce it back if we've missed something that implicates tooling.
Comment 14 Chris Frost CLA 2012-02-15 13:10:58 EST
I can confirm that a fresh download of Greenpages 2.4.0 will run just fine on 3.0.2.RELEASE but when run on 3.5.0.M02 it fails with the "java.lang.ClassNotFoundException: org.h2.Driver" exception.

This happens when Spring is trying to create the 'datasource' bean in one of Greenpages bundles.

So confirmed, this is a regression in functionality from 3.0.2.RELEASE in the runtime.
Comment 15 Borislav Kapukaranov CLA 2012-02-17 04:21:35 EST
Where the provider of the h2 driver is supposed to live? The user region?
Comment 16 Chris Frost CLA 2012-02-20 05:23:03 EST
I would expect so. I can't imagine it's getting it from the kernel or somehow subverting the OSGi class loading system.
Comment 17 Leo Dos Santos CLA 2012-02-20 13:28:59 EST
If I'm remembering the tutorial correctly, I believe the H2 driver was one of the project provided jars that had to be dropped into the repository/usr/ directory.
Comment 18 Glyn Normington CLA 2012-02-28 11:14:01 EST
Bug 360965 corrected the behaviour of PARs and scoped plans, but broke Greenpages.

The reason is that Apache commons DBCP bundle loads the h2 db driver using the thread context class loader (TCCL). DBCP is called by greenpages.db (which resides in the greenpages PAR).

Prior to the fix to bug 360965, the TCCL seen by DBCP was that of greenpages.db which was then able to load the h2 db driver because greenpages.db imports the org.h2 package.

But once bug 360965 was fixed (in 3.5.0.M02), the TCCL seen by DBCP was then the PARs synthetic context bundle's class loader which is no longer able to load the h2 db driver (it can only load classes of packages exported by bundles in the PAR).

The fix was to move the h2 bundle inside the PAR so that its classes can be loaded by the synthetic context bundle's class loader. The h2 bundles is also no longer needed in the provided bundles which are placed in repository/usr. See Greenpages commit 31d27b2dd00441d6373b82560e4d86ab2a829d7c for the fix.

I will request a review of this fix by someone with enterprise Java skills to make sure that a similar fix is likely to work for other similar applications.

(The alternative of dynamically chaining together the class loader of a bundle making a call via Spring DM, in this case greenpages.db, and of the synthetic context bundle for the duration of a call is a little inefficient in straight pathlength and prone to generating unnecessary garbage, proportional to the number of calls handled by Spring DM for which an existing TCCL is in place - see KernelOsgiContextClassLoaderProvider.getContextClassLoader for the relevant code).
Comment 19 Glyn Normington CLA 2012-02-28 11:19:22 EST
The fix will appear in Greenpages 2.5.0.
Comment 20 Glyn Normington CLA 2012-02-28 11:22:19 EST
Created attachment 211743 [details]
Patch for Greenpages commit 31d27b2dd00441d6373b82560e4d86ab2a829d7c
Comment 21 Miles Parker CLA 2012-02-28 12:12:34 EST
(In reply to comment #18)
> (The alternative of dynamically chaining together the class loader of a bundle
> making a call via Spring DM, in this case greenpages.db, and of the synthetic
> context bundle for the duration of a call is a little inefficient in straight
> pathlength and prone to generating unnecessary garbage, proportional to the
> number of calls handled by Spring DM for which an existing TCCL is in place -
> see KernelOsgiContextClassLoaderProvider.getContextClassLoader for the relevant
> code).

In any case, I think it's a reasonable constraint that to use bundles that are expecting a unique class loading logic that one must provide those bundles in a way that their lifecycle/existence is in a more managed context. That seems to be basically what we're doing here.
Comment 22 Glyn Normington CLA 2012-02-29 04:44:36 EST
(In reply to comment #21)

Thanks for the vote of confidence.
Comment 23 Borislav Kapukaranov CLA 2012-02-29 11:17:39 EST
Looks good.
Comment 24 Glyn Normington CLA 2012-03-01 11:26:09 EST
Thanks Borislav.

Added a migration note ([1]) in case other applications hit the same issue.

[1] http://wiki.eclipse.org/Virgo/Community/Migrating_from_3.0.x_to_3.5.0#Thread_Context_Class_Loading_with_PARs_and_Scoped_Plans
Comment 25 Miles Parker CLA 2012-05-08 15:07:53 EDT
OK folks, this did not fix the issue. Both Leo and I can confirm the same CNFE. I've also confirmed that I am using the latest greenpages from git and have the following in location	GREENPAGES_HOME/greenpages/pom.xml:

		<!-- Needs to be included in the PAR so that its classes are loadable via the PAR's synthetic context class loader -->
		<dependency>
			<groupId>com.h2database</groupId>
			<artifactId>com.springsource.org.h2</artifactId>
		</dependency>
Comment 26 Mastah Naleh CLA 2012-05-08 18:23:23 EDT
I did correct the same problem with virgo(osgi), mysql and spring

I was using org.springframework.jdbc.datasource.DriverManagerDataSource but this class is not working with OSGI environment. You need to use org.springframework.jdbc.datasource.SimpleDriverDataSource.


No clue if your problem is related but that might be the case.
Comment 28 Miles Parker CLA 2012-05-08 18:40:30 EDT
(In reply to comment #26)
> I was using org.springframework.jdbc.datasource.DriverManagerDataSource but
> this class is not working with OSGI environment. You need to use
> org.springframework.jdbc.datasource.SimpleDriverDataSource.

Interesting. Where were you specifying/referencing this class?
Comment 29 Mastah Naleh CLA 2012-05-08 19:55:56 EDT
It's a spring bean declaring the datasource.

<bean id="dataSource" class="org.springframework.jdbc.datasource.SimpleDriverDataSource">
	<property name="driverClass" value="com.mysql.jdbc.Driver" />
	<property name="url" value="jdbc:mysql://url:port/db_name" />
	<property name="username" value="username" />
	<property name="password" value="password" />
</bean>
Comment 30 Mastah Naleh CLA 2012-05-08 20:06:57 EDT
Could you try this code in the module greenpage.db in the file module-context.xml

<bean id="dataSource" class="org.springframework.jdbc.datasource.SimpleDriverDataSource" 
	 	  p:driverClass="org.h2.Driver"
		  p:url="jdbc:h2:~/greenpages-db/greenpages"
	 	  p:username="greenpages"
		  p:password="pass"/>
Comment 31 Glyn Normington CLA 2012-05-09 11:27:36 EDT
Please note that as part of bug 378529, I tweaked Greenpages and got it working under Virgo Tomcat Server 3.5.0.M04. However, I didn't hit the CNFE for org.h2.Driver - it was a missing import for javax.persistence in the greenpages.jpa bundle in my case.

Anyway, it's working now (at least for me ;-) ). See the above bug for a download if you want to give it a spin to confirm this bug is fixed too.
Comment 32 Miles Parker CLA 2012-05-09 13:51:15 EDT
Unfortunately, neither solution works from IDE. I was able to get them working from cmd-line, but that worked before. I'm pretty sure that this *did* work at some point for tooling, but I'm not even positive of that now. 

One thing I tried was removing the h2 from repository/usr, as it seems that the change to the (non-functional, given m2e fail) pom.xml is not supposed to be providing that. In that case, I get:

        An Import-Package could not be resolved. Resolver error data <Import-Package: org.h2; version="[1.0.71,1.0.71]">. Caused by missing constraint in bundle <greenpages-2.5.0.RELEASE-greenpages.db_2.5.0>
             constraint: <Import-Package: org.h2; version="[1.0.71,1.0.71]">


For Mastah's suggestion, I get:

Cannot find class [org.springframework.jdbc.datasource.SimpleDriverDataSource] for bean with name 'dataSource' defined in URL
Comment 33 Mastah Naleh CLA 2012-05-09 20:29:19 EDT
You need to import org.springframework.jdbc.datasource.* as the class is in spring-jdbc jar.

You can do that by adding org.springframework.jdbc.datasource;version="[3.0.5,4)" into the manifest.mf file.
Comment 34 Glyn Normington CLA 2012-05-10 03:16:31 EDT
I don't understand why this application works from the command line and fails from the tooling. The Virgo setup should be identical so that there is consistent behaviour between the two environments. Doesn't the tooling launch a JVM containing Virgo and then deploy artefacts using the deployer mbean? If not, please enlighten me how this is supposed to work. :-)
Comment 35 Leo Dos Santos CLA 2012-05-10 15:00:09 EDT
(In reply to comment #34)
> I don't understand why this application works from the command line and fails
> from the tooling. The Virgo setup should be identical so that there is
> consistent behaviour between the two environments. Doesn't the tooling launch a
> JVM containing Virgo and then deploy artefacts using the deployer mbean? If
> not, please enlighten me how this is supposed to work. :-)

Glyn this is a fair description of how the tools deploy the artefacts. I believe this issue can arise due to the difference between building from the command line vs. building from the workspace - in other words, I've never been able to get m2e to build greenpages properly, for reasons that probably have very little to with greenpages ;-) 

I'll try to get m2e working properly then report back.
Comment 36 Miles Parker CLA 2012-05-10 15:23:32 EDT
+1 I think at one point we actually did a diff between the Eclipse built and the command line built Greenpages, but I can't rememebr what the outcome of that was.
Comment 37 Glyn Normington CLA 2012-05-11 05:28:02 EDT
Would it make sense, therefore, to assign this bug to the tooling component?
Comment 38 Miles Parker CLA 2012-05-11 12:23:34 EDT
(In reply to comment #37)
> Would it make sense, therefore, to assign this bug to the tooling component?

I'm not sure yet.. I think it's been back and forth a couple of times now. For one thing, I can get greengages to deploy onto 3.0.2, OTOH it doesn't actually work. :) I'll play around with this a bit more today, including looking at Mastah's idea, but I don't think there is anything the runtime crew can do at the moment unless there are more ideas about what might be going wrong.
Comment 39 Miles Parker CLA 2012-05-11 14:49:39 EDT
An update on this. After Mastah's suggestion, I was able to get it to startup w/o reporting an exception. However...

Just as with 3.0.2 it doesn't work. One thing that is happening is that greenpages is actually getting deployed *before* apps repository, etc.. Not sure why that would be..

[2012-05-11 11:46:42.616] startup-tracker              <KE0001I> Kernel starting. 
[2012-05-11 11:46:45.212] startup-tracker              <KE0002I> Kernel started. 
[2012-05-11 11:46:45.379] system-artifacts             <DE0000I> Installing plan 'org.eclipse.virgo.kernel.userregion.springdm' version '3.0.0'. 
[2012-05-11 11:46:45.541] system-artifacts             <DE0000I> Installing bundle 'org.eclipse.gemini.blueprint.core' version '1.0.0.RELEASE'. 
[2012-05-11 11:46:45.588] system-artifacts             <DE0000I> Installing bundle 'org.eclipse.gemini.blueprint.extender' version '1.0.0.RELEASE'. 
[2012-05-11 11:46:45.602] system-artifacts             <DE0000I> Installing bundle 'org.eclipse.gemini.blueprint.io' version '1.0.0.RELEASE'. 
[2012-05-11 11:46:45.614] system-artifacts             <DE0000I> Installing bundle 'org.eclipse.virgo.kernel.agent.dm' version '3.5.0.M04'. 
[2012-05-11 11:46:45.623] system-artifacts             <DE0000I> Installing bundle 'org.eclipse.virgo.kernel.deployer.dm' version '3.5.0.M04'. 
[2012-05-11 11:46:45.652] system-artifacts             <DE0000I> Installing bundle 'org.eclipse.equinox.ds' version '1.3.0.v20110124-0830'. 
[2012-05-11 11:46:45.674] system-artifacts             <DE0000I> Installing bundle 'org.eclipse.equinox.util' version '1.0.200.v20100503'. 
[2012-05-11 11:46:45.681] system-artifacts             <DE0000I> Installing configuration 'osgi.console' version '0.0.0'. 
[2012-05-11 11:46:47.758] system-artifacts             <DE0001I> Installed bundle 'org.eclipse.gemini.blueprint.core' version '1.0.0.RELEASE'. 
[2012-05-11 11:46:47.760] system-artifacts             <DE0001I> Installed bundle 'org.eclipse.gemini.blueprint.extender' version '1.0.0.RELEASE'. 
[2012-05-11 11:46:47.762] system-artifacts             <DE0001I> Installed bundle 'org.eclipse.gemini.blueprint.io' version '1.0.0.RELEASE'. 
[2012-05-11 11:46:47.764] system-artifacts             <DE0001I> Installed bundle 'org.eclipse.virgo.kernel.agent.dm' version '3.5.0.M04'. 
[2012-05-11 11:46:47.766] system-artifacts             <DE0001I> Installed bundle 'org.eclipse.virgo.kernel.deployer.dm' version '3.5.0.M04'. 
[2012-05-11 11:46:47.768] system-artifacts             <DE0001I> Installed bundle 'org.eclipse.equinox.ds' version '1.3.0.v20110124-0830'. 
[2012-05-11 11:46:47.770] system-artifacts             <DE0001I> Installed bundle 'org.eclipse.equinox.util' version '1.0.200.v20100503'. 
[2012-05-11 11:46:47.772] system-artifacts             <DE0001I> Installed configuration 'osgi.console' version '0.0.0'. 
[2012-05-11 11:46:47.773] system-artifacts             <DE0001I> Installed plan 'org.eclipse.virgo.kernel.userregion.springdm' version '3.0.0'. 
[2012-05-11 11:46:47.800] system-artifacts             <DE0004I> Starting plan 'org.eclipse.virgo.kernel.userregion.springdm' version '3.0.0'. 
[2012-05-11 11:46:47.806] system-artifacts             <DE0004I> Starting bundle 'org.eclipse.gemini.blueprint.core' version '1.0.0.RELEASE'. 
[2012-05-11 11:46:47.811] start-signalling-1           <DE0005I> Started bundle 'org.eclipse.gemini.blueprint.core' version '1.0.0.RELEASE'. 
[2012-05-11 11:46:47.811] system-artifacts             <DE0004I> Starting bundle 'org.eclipse.gemini.blueprint.extender' version '1.0.0.RELEASE'. 
[2012-05-11 11:46:48.397] start-signalling-1           <DE0005I> Started bundle 'org.eclipse.gemini.blueprint.extender' version '1.0.0.RELEASE'. 
[2012-05-11 11:46:48.400] system-artifacts             <DE0004I> Starting bundle 'org.eclipse.gemini.blueprint.io' version '1.0.0.RELEASE'. 
[2012-05-11 11:46:48.402] start-signalling-1           <DE0005I> Started bundle 'org.eclipse.gemini.blueprint.io' version '1.0.0.RELEASE'. 
[2012-05-11 11:46:48.408] system-artifacts             <DE0004I> Starting bundle 'org.eclipse.virgo.kernel.agent.dm' version '3.5.0.M04'. 
[2012-05-11 11:46:48.411] start-signalling-1           <DE0005I> Started bundle 'org.eclipse.virgo.kernel.agent.dm' version '3.5.0.M04'. 
[2012-05-11 11:46:48.413] system-artifacts             <DE0004I> Starting bundle 'org.eclipse.virgo.kernel.deployer.dm' version '3.5.0.M04'. 
[2012-05-11 11:46:48.467] system-artifacts             <DE0004I> Starting bundle 'org.eclipse.equinox.ds' version '1.3.0.v20110124-0830'. 
[2012-05-11 11:46:48.595] start-signalling-1           <DE0005I> Started bundle 'org.eclipse.equinox.ds' version '1.3.0.v20110124-0830'. 
[2012-05-11 11:46:48.597] system-artifacts             <DE0004I> Starting bundle 'org.eclipse.equinox.util' version '1.0.200.v20100503'. 
[2012-05-11 11:46:48.615] start-signalling-1           <DE0005I> Started bundle 'org.eclipse.equinox.util' version '1.0.200.v20100503'. 
[2012-05-11 11:46:48.616] system-artifacts             <DE0004I> Starting configuration 'osgi.console' version '0.0.0'. 
[2012-05-11 11:46:48.625] system-artifacts             <DE0005I> Started configuration 'osgi.console' version '0.0.0'. 
[2012-05-11 11:46:48.678] start-signalling-1           <DE0005I> Started bundle 'org.eclipse.virgo.kernel.deployer.dm' version '3.5.0.M04'. 
[2012-05-11 11:46:48.680] start-signalling-1           <DE0005I> Started plan 'org.eclipse.virgo.kernel.userregion.springdm' version '3.0.0'. 
[2012-05-11 11:46:48.821] system-artifacts             <DE0000I> Installing plan 'org.eclipse.virgo.web.tomcat' version '3.0.0'. 
[2012-05-11 11:46:48.825] system-artifacts             <DE0000I> Installing configuration 'org.eclipse.virgo.web' version '0.0.0'. 
[2012-05-11 11:46:48.847] system-artifacts             <DE0000I> Installing bundle 'org.eclipse.gemini.web.core' version '2.1.0.M03'. 
[2012-05-11 11:46:48.875] system-artifacts             <DE0000I> Installing bundle 'org.eclipse.gemini.web.tomcat' version '2.1.0.M03'. 
[2012-05-11 11:46:48.886] system-artifacts             <DE0000I> Installing bundle 'org.eclipse.virgo.web.core' version '3.5.0.M04'. 
[2012-05-11 11:46:48.893] system-artifacts             <DE0000I> Installing bundle 'org.eclipse.virgo.web.dm' version '3.5.0.M04'. 
[2012-05-11 11:46:48.903] system-artifacts             <DE0000I> Installing bundle 'org.eclipse.virgo.web.tomcat.support' version '3.5.0.M04'. 
[2012-05-11 11:46:49.443] system-artifacts             <DE0001I> Installed configuration 'org.eclipse.virgo.web' version '0.0.0'. 
[2012-05-11 11:46:49.444] system-artifacts             <DE0001I> Installed bundle 'org.eclipse.gemini.web.core' version '2.1.0.M03'. 
[2012-05-11 11:46:49.445] system-artifacts             <DE0001I> Installed bundle 'org.eclipse.gemini.web.tomcat' version '2.1.0.M03'. 
[2012-05-11 11:46:49.446] system-artifacts             <DE0001I> Installed bundle 'org.eclipse.virgo.web.core' version '3.5.0.M04'. 
[2012-05-11 11:46:49.447] system-artifacts             <DE0001I> Installed bundle 'org.eclipse.virgo.web.dm' version '3.5.0.M04'. 
[2012-05-11 11:46:49.448] system-artifacts             <DE0001I> Installed bundle 'org.eclipse.virgo.web.tomcat.support' version '3.5.0.M04'. 
[2012-05-11 11:46:49.449] system-artifacts             <DE0001I> Installed plan 'org.eclipse.virgo.web.tomcat' version '3.0.0'. 
[2012-05-11 11:46:49.462] system-artifacts             <DE0004I> Starting plan 'org.eclipse.virgo.web.tomcat' version '3.0.0'. 
[2012-05-11 11:46:49.463] system-artifacts             <DE0004I> Starting configuration 'org.eclipse.virgo.web' version '0.0.0'. 
[2012-05-11 11:46:49.466] system-artifacts             <DE0005I> Started configuration 'org.eclipse.virgo.web' version '0.0.0'. 
[2012-05-11 11:46:49.469] system-artifacts             <DE0004I> Starting bundle 'org.eclipse.gemini.web.core' version '2.1.0.M03'. 
[2012-05-11 11:46:49.489] start-signalling-1           <DE0005I> Started bundle 'org.eclipse.gemini.web.core' version '2.1.0.M03'. 
[2012-05-11 11:46:49.491] system-artifacts             <DE0004I> Starting bundle 'org.eclipse.gemini.web.tomcat' version '2.1.0.M03'. 
[2012-05-11 11:46:50.102] system-artifacts             <TC0000I> Starting Tomcat. 
[2012-05-11 11:46:50.126] system-artifacts             <TC0010I> Creating HTTP/1.1 connector with scheme http on port 8080. 
[2012-05-11 11:46:50.132] system-artifacts             <TC0010I> Creating HTTP/1.1 connector with scheme https on port 8443. 
[2012-05-11 11:46:50.136] system-artifacts             <TC0010I> Creating AJP/1.3 connector with scheme http on port 8009. 
[2012-05-11 11:46:50.139] system-artifacts             <TC0001I> Started Tomcat. 
[2012-05-11 11:46:50.155] system-artifacts             <DE0004I> Starting bundle 'org.eclipse.virgo.web.core' version '3.5.0.M04'. 
[2012-05-11 11:46:50.228] system-artifacts             <DE0004I> Starting bundle 'org.eclipse.virgo.web.dm' version '3.5.0.M04'. 
[2012-05-11 11:46:50.233] system-artifacts             <DE0005I> Started bundle 'org.eclipse.virgo.web.tomcat.support' version '3.5.0.M04'. 
[2012-05-11 11:46:50.234] start-signalling-1           <DE0005I> Started bundle 'org.eclipse.virgo.web.dm' version '3.5.0.M04'. 
[2012-05-11 11:46:50.317] start-signalling-1           <DE0005I> Started bundle 'org.eclipse.gemini.web.tomcat' version '2.1.0.M03'. 
[2012-05-11 11:46:50.329] start-signalling-1           <DE0005I> Started bundle 'org.eclipse.virgo.web.core' version '3.5.0.M04'. 
[2012-05-11 11:46:50.330] start-signalling-1           <DE0005I> Started plan 'org.eclipse.virgo.web.tomcat' version '3.0.0'. 
[2012-05-11 11:46:50.332] sync Event Dispatcher Thread <UR0001I> User region ready. 
[2012-05-11 11:46:50.834]  TCP Connection(2)-127.0.0.1 <DE0000I> Installing par 'greenpages' version '2.5.0.RELEASE'. 
[2012-05-11 11:46:50.836]  TCP Connection(2)-127.0.0.1 <DE0000I> Installing bundle 'greenpages-2.5.0.RELEASE-greenpages.core' version '2.5.0'. 
[2012-05-11 11:46:50.837]  TCP Connection(2)-127.0.0.1 <DE0000I> Installing bundle 'greenpages-2.5.0.RELEASE-greenpages.db' version '2.5.0'. 
[2012-05-11 11:46:50.839]  TCP Connection(2)-127.0.0.1 <DE0000I> Installing bundle 'greenpages-2.5.0.RELEASE-greenpages.jpa' version '2.5.0'. 
[2012-05-11 11:46:51.123]  TCP Connection(2)-127.0.0.1 <DE0001I> Installed bundle 'greenpages-2.5.0.RELEASE-greenpages.core' version '2.5.0'. 
[2012-05-11 11:46:51.124]  TCP Connection(2)-127.0.0.1 <DE0001I> Installed bundle 'greenpages-2.5.0.RELEASE-greenpages.db' version '2.5.0'. 
[2012-05-11 11:46:51.125]  TCP Connection(2)-127.0.0.1 <DE0001I> Installed bundle 'greenpages-2.5.0.RELEASE-greenpages.jpa' version '2.5.0'. 
[2012-05-11 11:46:51.126]  TCP Connection(2)-127.0.0.1 <DE0001I> Installed bundle 'greenpages-2.5.0.RELEASE-synthetic.context' version '2.5.0.RELEASE'. 
[2012-05-11 11:46:51.127]  TCP Connection(2)-127.0.0.1 <DE0001I> Installed par 'greenpages' version '2.5.0.RELEASE'. 
[2012-05-11 11:46:51.138]  TCP Connection(2)-127.0.0.1 <DE0004I> Starting par 'greenpages' version '2.5.0.RELEASE'. 
[2012-05-11 11:46:51.140]  TCP Connection(2)-127.0.0.1 <DE0004I> Starting bundle 'greenpages-2.5.0.RELEASE-greenpages.core' version '2.5.0'. 
[2012-05-11 11:46:51.253]  TCP Connection(2)-127.0.0.1 <DE0004I> Starting bundle 'greenpages-2.5.0.RELEASE-greenpages.db' version '2.5.0'. 
[2012-05-11 11:46:51.258]  TCP Connection(2)-127.0.0.1 <DE0004I> Starting bundle 'greenpages-2.5.0.RELEASE-greenpages.jpa' version '2.5.0'. 
[2012-05-11 11:46:51.263]  TCP Connection(2)-127.0.0.1 <DE0004I> Starting bundle 'greenpages-2.5.0.RELEASE-synthetic.context' version '2.5.0.RELEASE'. 
[2012-05-11 11:46:51.266] start-signalling-1           <DE0005I> Started bundle 'greenpages-2.5.0.RELEASE-synthetic.context' version '2.5.0.RELEASE'. 
[2012-05-11 11:46:51.311] start-signalling-1           <DE0005I> Started bundle 'greenpages-2.5.0.RELEASE-greenpages.db' version '2.5.0'. 
[2012-05-11 11:46:51.339] fs-watcher                   <HD0001I> Hot deployer processing 'INITIAL' event for file 'org.eclipse.virgo.apps.admin_3.5.0.M04.plan'. 
[2012-05-11 11:46:51.419] fs-watcher                   <DE0000I> Installing plan 'org.eclipse.virgo.apps.admin.plan' version '3.0.0'. 
[2012-05-11 11:46:51.453] fs-watcher                   <DE0000I> Installing bundle 'org.eclipse.virgo.apps.admin.core' version '3.5.0.M04'. 
[2012-05-11 11:46:51.466] start-signalling-1           <DE0005I> Started bundle 'greenpages-2.5.0.RELEASE-greenpages.core' version '2.5.0'. 
[2012-05-11 11:46:51.866] fs-watcher                   <DE0000I> Installing bundle 'org.eclipse.virgo.apps.admin.web' version '3.5.0.M04'. 
[2012-05-11 11:46:52.155] start-signalling-1           <DE0005I> Started bundle 'greenpages-2.5.0.RELEASE-greenpages.jpa' version '2.5.0'. 
[2012-05-11 11:46:52.157] start-signalling-1           <DE0005I> Started par 'greenpages' version '2.5.0.RELEASE'. 
[2012-05-11 11:46:52.241] fs-watcher                   <DE0001I> Installed bundle 'org.eclipse.virgo.apps.admin.core' version '3.5.0.M04'. 
[2012-05-11 11:46:52.242] fs-watcher                   <DE0001I> Installed bundle 'org.eclipse.virgo.apps.admin.web' version '3.5.0.M04'. 
[2012-05-11 11:46:52.243] fs-watcher                   <DE0001I> Installed plan 'org.eclipse.virgo.apps.admin.plan' version '3.0.0'. 
[2012-05-11 11:46:52.253] fs-watcher                   <DE0004I> Starting plan 'org.eclipse.virgo.apps.admin.plan' version '3.0.0'. 
[2012-05-11 11:46:52.256] fs-watcher                   <DE0004I> Starting bundle 'org.eclipse.virgo.apps.admin.core' version '3.5.0.M04'. 
[2012-05-11 11:46:52.409] fs-watcher                   <DE0004I> Starting bundle 'org.eclipse.virgo.apps.admin.web' version '3.5.0.M04'. 
[2012-05-11 11:46:52.413] fs-watcher                   <HD0001I> Hot deployer processing 'INITIAL' event for file 'org.eclipse.virgo.apps.repository_3.5.0.M04.par'. 
[2012-05-11 11:46:52.415] start-signalling-1           <WE0000I> Starting web bundle 'org.eclipse.virgo.apps.admin.web' version '3.5.0.M04' with context path '/admin'. 
[2012-05-11 11:46:52.505] start-signalling-2           <DE0005I> Started bundle 'org.eclipse.virgo.apps.admin.core' version '3.5.0.M04'. 
[2012-05-11 11:46:52.579] fs-watcher                   <DE0000I> Installing par 'org.eclipse.virgo.apps.repository' version '3.5.0.M04'. 
[2012-05-11 11:46:52.583] fs-watcher                   <DE0000I> Installing bundle 'org.eclipse.virgo.apps.repository-3.5.0.M04-org.eclipse.virgo.apps.repository.core' version '3.5.0.M04'. 
[2012-05-11 11:46:52.585] fs-watcher                   <DE0000I> Installing bundle 'org.eclipse.virgo.apps.repository-3.5.0.M04-org.eclipse.virgo.apps.repository.web' version '3.5.0.M04'. 
[2012-05-11 11:46:52.668] fs-watcher                   <DE0001I> Installed bundle 'org.eclipse.virgo.apps.repository-3.5.0.M04-org.eclipse.virgo.apps.repository.core' version '3.5.0.M04'. 
[2012-05-11 11:46:52.669] fs-watcher                   <DE0001I> Installed bundle 'org.eclipse.virgo.apps.repository-3.5.0.M04-org.eclipse.virgo.apps.repository.web' version '3.5.0.M04'. 
[2012-05-11 11:46:52.670] fs-watcher                   <DE0001I> Installed bundle 'org.eclipse.virgo.apps.repository-3.5.0.M04-synthetic.context' version '3.5.0.M04'. 
[2012-05-11 11:46:52.671] fs-watcher                   <DE0001I> Installed par 'org.eclipse.virgo.apps.repository' version '3.5.0.M04'. 
[2012-05-11 11:46:52.685] fs-watcher                   <DE0004I> Starting par 'org.eclipse.virgo.apps.repository' version '3.5.0.M04'. 
[2012-05-11 11:46:52.690] fs-watcher                   <DE0004I> Starting bundle 'org.eclipse.virgo.apps.repository-3.5.0.M04-org.eclipse.virgo.apps.repository.core' version '3.5.0.M04'. 
[2012-05-11 11:46:52.821] fs-watcher                   <DE0004I> Starting bundle 'org.eclipse.virgo.apps.repository-3.5.0.M04-org.eclipse.virgo.apps.repository.web' version '3.5.0.M04'. 
[2012-05-11 11:46:52.825] fs-watcher                   <DE0004I> Starting bundle 'org.eclipse.virgo.apps.repository-3.5.0.M04-synthetic.context' version '3.5.0.M04'. 
[2012-05-11 11:46:52.830] start-signalling-2           <WE0000I> Starting web bundle 'org.eclipse.virgo.apps.repository-3.5.0.M04-org.eclipse.virgo.apps.repository.web' version '3.5.0.M04' with context path '/org.eclipse.virgo.apps.repository'. 
[2012-05-11 11:46:52.836] start-signalling-3           <DE0005I> Started bundle 'org.eclipse.virgo.apps.repository-3.5.0.M04-synthetic.context' version '3.5.0.M04'. 
[2012-05-11 11:46:52.839] fs-watcher                   <HD0001I> Hot deployer processing 'INITIAL' event for file 'org.eclipse.virgo.apps.splash_3.5.0.M04.jar'. 
[2012-05-11 11:46:52.977] fs-watcher                   <DE0000I> Installing bundle 'org.eclipse.virgo.apps.splash' version '3.5.0.M04'. 
[2012-05-11 11:46:53.028] fs-watcher                   <DE0001I> Installed bundle 'org.eclipse.virgo.apps.splash' version '3.5.0.M04'. 
[2012-05-11 11:46:53.045] fs-watcher                   <DE0004I> Starting bundle 'org.eclipse.virgo.apps.splash' version '3.5.0.M04'. 
[2012-05-11 11:46:53.048] start-signalling-3           <WE0000I> Starting web bundle 'org.eclipse.virgo.apps.splash' version '3.5.0.M04' with context path '/'. 
[2012-05-11 11:46:53.661] start-signalling-3           <WE0001I> Started web bundle 'org.eclipse.virgo.apps.splash' version '3.5.0.M04' with context path '/'. 
[2012-05-11 11:46:53.663] start-signalling-3           <DE0005I> Started bundle 'org.eclipse.virgo.apps.splash' version '3.5.0.M04'. 
[2012-05-11 11:46:53.700] start-signalling-3           <DE0005I> Started bundle 'org.eclipse.virgo.apps.repository-3.5.0.M04-org.eclipse.virgo.apps.repository.core' version '3.5.0.M04'. 
[2012-05-11 11:46:55.610] start-signalling-1           <WE0001I> Started web bundle 'org.eclipse.virgo.apps.admin.web' version '3.5.0.M04' with context path '/admin'. 
[2012-05-11 11:46:55.611] start-signalling-1           <DE0005I> Started bundle 'org.eclipse.virgo.apps.admin.web' version '3.5.0.M04'. 
[2012-05-11 11:46:55.612] start-signalling-1           <DE0005I> Started plan 'org.eclipse.virgo.apps.admin.plan' version '3.0.0'. 
[2012-05-11 11:46:55.772] start-signalling-2           <WE0001I> Started web bundle 'org.eclipse.virgo.apps.repository-3.5.0.M04-org.eclipse.virgo.apps.repository.web' version '3.5.0.M04' with context path '/org.eclipse.virgo.apps.repository'. 
[2012-05-11 11:46:55.772] start-signalling-2           <DE0005I> Started bundle 'org.eclipse.virgo.apps.repository-3.5.0.M04-org.eclipse.virgo.apps.repository.web' version '3.5.0.M04'. 
[2012-05-11 11:46:55.774] start-signalling-2           <DE0005I> Started par 'org.eclipse.virgo.apps.repository' version '3.5.0.M04'.
Comment 40 Miles Parker CLA 2012-05-11 14:50:33 EDT
Glyn is right, this shouldn't be assigned to him.
Comment 41 Thorsten Schlathölter CLA 2012-05-14 15:46:54 EDT
(In reply to comment #39)

I have noticed that in contrast to the plain virgo installation, the deployment via eclipse lacks the existence of the greenpages.web bundle. That bundle is not deployed at all (Although it exists in the workspace and it is defined as a nested bundle in the respective PAR editor). This can also be seen from the respective log above:

> [2012-05-11 11:46:50.332] sync Event Dispatcher Thread <UR0001I> User region
> ready. 
> [2012-05-11 11:46:50.834]  TCP Connection(2)-127.0.0.1 <DE0000I> Installing par
> 'greenpages' version '2.5.0.RELEASE'. 
> [2012-05-11 11:46:50.836]  TCP Connection(2)-127.0.0.1 <DE0000I> Installing
> bundle 'greenpages-2.5.0.RELEASE-greenpages.core' version '2.5.0'. 
> [2012-05-11 11:46:50.837]  TCP Connection(2)-127.0.0.1 <DE0000I> Installing
> bundle 'greenpages-2.5.0.RELEASE-greenpages.db' version '2.5.0'. 
> [2012-05-11 11:46:50.839]  TCP Connection(2)-127.0.0.1 <DE0000I> Installing
> bundle 'greenpages-2.5.0.RELEASE-greenpages.jpa' version '2.5.0'. 

And here is the output generated by the plain virgo installation:

[2012-05-14 17:10:47.078] fs-watcher                   <DE0000I> Installing bundle 'greenpages-2.5.0.RELEASE-com.springsource.org.h2' version '1.0.71'.
[2012-05-14 17:10:47.078] fs-watcher                   <DE0000I> Installing bundle 'greenpages-2.5.0.RELEASE-greenpages.core' version '2.5.0'.
[2012-05-14 17:10:47.078] fs-watcher                   <DE0000I> Installing bundle 'greenpages-2.5.0.RELEASE-greenpages.db' version '2.5.0'.
[2012-05-14 17:10:47.093] fs-watcher                   <DE0000I> Installing bundle 'greenpages-2.5.0.RELEASE-greenpages.jpa' version '2.5.0'.
[2012-05-14 17:10:47.093] fs-watcher                   <DE0000I> Installing bundle 'greenpages-2.5.0.RELEASE-greenpages.web' version '2.5.0'.
Comment 42 Miles Parker CLA 2012-05-14 15:52:18 EDT
Good eyes, Thorsten! I hadn't noticed this either. Should really help in getting to the bottom of this.
Comment 43 Federico Ardila Biela CLA 2012-05-15 09:30:00 EDT
I also tried Mastah's suggestion about using SimpleDriverDataSource and got pretty much the same result as Miles. Just wanted to point out, that  if I go to the servers view, right click on the greenpages.web bundle (under greenpages in the tree) and try a redeploy I get this:

[2012-05-15 14:58:39.379]  TCP Connection(6)-127.0.0.1 <DE0505E> Refresh of artifact 'greenpages.web' of par 'greenpages' version '2.5.0.RELEASE' failed. 
[2012-05-15 14:58:39.384]  TCP Connection(6)-127.0.0.1 <DE0505E> Refresh of artifact 'greenpages.web' of par 'greenpages' version '2.5.0.RELEASE' failed. org.eclipse.virgo.kernel.deployer.core.DeploymentException: Refresh failed: child 'greenpages.web' not found in par(greenpages, 2.5.0.RELEASE)
	at org.eclipse.virgo.kernel.install.artifact.internal.ParPlanInstallArtifact.refresh(ParPlanInstallArtifact.java:219)
	at org.eclipse.virgo.kernel.deployer.core.internal.PipelinedApplicationDeployer.refreshInternal(PipelinedApplicationDeployer.java:489)
	at org.eclipse.virgo.kernel.deployer.core.internal.PipelinedApplicationDeployer.refresh(PipelinedApplicationDeployer.java:462)
	at org.eclipse.virgo.kernel.deployer.management.StandardDeployer.refresh(StandardDeployer.java:67)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at com.sun.jmx.mbeanserver.ConvertingMethod.invokeWithOpenReturn(ConvertingMethod.java:192)
	at com.sun.jmx.mbeanserver.ConvertingMethod.invokeWithOpenReturn(ConvertingMethod.java:174)
	at com.sun.jmx.mbeanserver.MXBeanIntrospector.invokeM2(MXBeanIntrospector.java:117)
	at com.sun.jmx.mbeanserver.MXBeanIntrospector.invokeM2(MXBeanIntrospector.java:54)
	at com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntrospector.java:235)
	at com.sun.jmx.mbeanserver.PerInterface.invoke(PerInterface.java:138)
	at com.sun.jmx.mbeanserver.MBeanSupport.invoke(MBeanSupport.java:250)
	at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
	at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:791)
	at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1447)
	at javax.management.remote.rmi.RMIConnectionImpl.access$200(RMIConnectionImpl.java:89)
	at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1292)
	at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1380)
	at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:812)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:322)
	at sun.rmi.transport.Transport$1.run(Transport.java:177)
	at sun.rmi.transport.Transport$1.run(Transport.java:174)
	at java.security.AccessController.doPrivileged(Native Method)
	at sun.rmi.transport.Transport.serviceCall(Transport.java:173)
	at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:553)
	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:808)
	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:667)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
	at java.lang.Thread.run(Thread.java:722)

I don't know if that is of any help (I have no experience whatsoever with Virgo or any Java application server. I'm new to this, I'm just playing around). I guess is kind of expected (now that it has been notices that the greenpages.web bundle is not being loaded at all) and the stack-trace doesn't seam to say much. 
 
Sorry about the formating I couldn't find anything to help me with the markup (if any is supported at all).
Comment 44 Miles Parker CLA 2012-09-01 16:15:40 EDT
Reassigning to inbox. We weren't able to get greenpages to work that well for release. :(
Comment 45 Leo Dos Santos CLA 2012-10-18 17:13:07 EDT
I've addressed the issue of the web bundle not staging (bug 391934) but the H2 driver error still persists. I see that with the latest version of the Greenpages sample, putting the .par archive in the pickup directory will deploy the com.springsource.org.h2 bundle alongside the rest of the par contents. Glyn explains this change in comment 18. However, when deploying from Eclipse no h2 bundle is sent to the deployer. If you open the par editor in Eclipse and go to the dependencies tab, there is no entry for com.springsource.org.h2 and in fact there is no way to add it. So the workaround for the thread context issue doesn't work from the tooling perspective. It seems what we're looking for in Greenpages is a way to point to a .jar or .war from the dependencies page and have the resource deployed alongside the rest of the .par's content.

Mastah's workaround in comment 30 will work (if the web bundle is properly deployed), presumably because it gets around using H2 and its thread context issues.
Comment 46 Leo Dos Santos CLA 2012-10-18 18:28:29 EDT
Digging further, the tools will look for any .jar that is bundled on the first level of the .par project and add those for deployment. So if you copy the *.h2 jar that's under /target/par-provided into the top level of the project, then Greenpages will work.
Comment 47 Chris Frost CLA 2013-01-18 13:06:38 EST
I am looking at this again but other problems are stopping me from building/deploying the app for now.
Comment 48 Chris Frost CLA 2013-01-23 12:58:26 EST
This is still a problem. I have upgraded Greenpages to use Eclipse Link 2.0.0 and fixed some other problems and Greenpages will now build and deploy on Virgo 3.6.0 using the admin console with no problem and the app works.

When using the Tooling, I get an error message, see attachment, and the deployment fails with this stack trace.

Caused by: org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC driver class 'org.h2.Driver'
	at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1146)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1581)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1522)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1452)
	... 17 common frames omitted
Caused by: org.eclipse.virgo.kernel.osgi.framework.ExtendedClassNotFoundException: org.h2.Driver in KernelBundleClassLoader: [bundle=greenpages-3.0.0.RELEASE-synthetic.context_3.0.0.RELEASE]
	at org.eclipse.virgo.kernel.userregion.internal.equinox.KernelBundleClassLoader.loadClass(KernelBundleClassLoader.java:139)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
	at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1138)
	... 24 common frames omitted
Caused by: java.lang.ClassNotFoundException: org.h2.Driver
	at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:501)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:412)
	at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
	at org.eclipse.virgo.kernel.userregion.internal.equinox.KernelBundleClassLoader.loadClass(KernelBundleClassLoader.java:135)
	... 26 common frames omitted

I am running on Virgo IDE 1.0.0.201207122033-MILESTONE
Comment 49 Chris Frost CLA 2013-01-23 12:59:05 EST
Created attachment 225997 [details]
Error popup when deploying Greenpages PAR
Comment 50 Leo Dos Santos CLA 2013-01-23 13:36:55 EST
Chris can you try running a snapshot version available from http://download.eclipse.org/virgo/snapshot/tooling. Also, is the *h2.jar placed at the top level of the par now? The tools don't traverse the par's directory structure when looking for bundled jars to deploy. Should they? I can make that change, but doing so means that the tools would deploy all the jars under /target/par-provided as belonging to the par.
Comment 51 Chris Frost CLA 2013-01-24 16:46:32 EST
I have tried it with version - Version: 1.0.1.201301182305-SNAPSHOT

I can also confirm that the top level of the par contains the h2 plugin. See attachemnt
Comment 52 Chris Frost CLA 2013-01-24 16:47:21 EST
Created attachment 226068 [details]
Contents of the greenpages par
Comment 53 Leo Dos Santos CLA 2013-01-24 17:27:45 EST
Thanks Chris. I'll pull the latest greenpages and see what's up.
Comment 54 Chris Frost CLA 2013-01-24 17:39:30 EST
FYI, we have moved all the sample apps to a combined samples repo. Just go in to the greenpages folder and build with 'mvn package' as normal. 'git.eclipse.org/gitroot/virgo/org.eclipse.virgo.samples.git'
Comment 55 Leo Dos Santos CLA 2013-01-24 19:42:00 EST
Created attachment 226073 [details]
Modified greenpages project

Ok I see. What I meant above is that the tools will deploy the com.springsource.h2.jar with the par only if it is placed at the top level of the Greenpages Eclipse project (see enclosed screenshot). In this case if you move the .jar from /target/par-provided up a couple of levels, the tools will stage the h2.jar along with the rest of greenpages projects.

It may not be worth making changes to how the project dependencies are packaged, maybe it could just be noted in the Greenpages documentation that the h2.jar needs to be moved if you want to deploy from Eclipse?
Comment 56 Chris Frost CLA 2013-01-25 07:58:45 EST
I can confirm that works. Will check with Glyn and then close this issue off I suspect. Thanks Leo.
Comment 57 Glyn Normington CLA 2013-01-25 10:48:36 EST
Comment on attachment 211743 [details]
Patch for Greenpages commit 31d27b2dd00441d6373b82560e4d86ab2a829d7c

Seems reasonable.
Comment 58 Miles Parker CLA 2013-01-26 15:17:16 EST
Way to go Leo! This one has been a real epic, nice to see it resolved. :)