greenpages 2.5.0 on Virgo 3.1.0 org.h2.Driver ClassNotFoundException [message #756276] |
Fri, 11 November 2011 18:42 |
|
I wondered if anybody can help me get greenpages 2.5.0 sample app running in eclipse-rt virgo 3.1.0?
I built the greenpages sample, as I have in the past for an earlier version of SpringSourceDM Server 2.0; and when I deploy it to the $SERVER_HOME/pickup directory the virgo server 3.1.0 can not find the class: org.h2.Driver. Note org.h2.Driver class can not be loaded even after numerous attempts at making the template.mf, MANIFEST.MF and pom.xml adjustments as suggested on other blog posts ... I even updated the h2 to 1.3.161 to see if that may have been the cause of the inability for the KernelBundleClassLoader to find the class. What lookes wrong with my configuration or is ther an issue with the KernelBundleClassLoader that I'm missing?
-----------------------------------------------------------------------------
---- CONSOLE OUTPUT ----
-----------------------------------------------------------------------------
[2011-11-11 13:04:03.000] start-signalling-2 <DE0006E> Start failed for bundle 'greenpages-2.5.0.RELEASE-greenpages.db' version '2.5.0'. org.springframework.beans.factory.BeanCreationException: Error creating bean with n
ame 'org.springframework.osgi.service.exporter.support.OsgiServiceFactoryBean#0': Invocation of init method failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSo
urce' defined in URL [bundleentry://129.fwk239625678/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.Driv
er'
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:563)
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:662)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in URL [bundleentry://129.fwk239625678/META-INF/spring/module-context.xml]: Invocation of init method failed; n
ested 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.osgi.service.exporter.support.OsgiServiceFactoryBean.afterPropertiesSet(OsgiServiceFactoryBean.java:167)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1477)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1417)
... 17 common frames omitted
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)
... 26 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)
... 33 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)
... 35 common frames omitted
see attached file for :
- greenpages.db/template.mf
- greenpages.db/src/main/resources/META-INF/MANIFEST.MF
- greenpages.db/src/main/resources/META-INF/spring/module-context.xml
- greenpages.db/src/main/resources/META-INF/spring/osgi-context.xml
|
|
|
|
Re: greenpages 2.5.0 on Virgo 3.1.0 org.h2.Driver ClassNotFoundException [message #756604 is a reply to message #756571] |
Mon, 14 November 2011 13:52 |
|
Thanks for your response and help!
I rebuilt the sample application from the GIT hub and deployed (version 2.5.0) with h2 (version 1.3.161). I already am running with prior virgo 2.10 in a production environment on the amazon EC2 cloud under ubuntu natty linux. This has been running just fine for a long time already and on many machines. I and the rest of my development team have deployed many real time OSGI services under SpringSourceDM and now Virgo but wish to make sure we can build and deploy to the latest virgo 3.1.0 release. In summary, I previously built and deployed these prior versions of the sample greenpages app successfully, but I'm stummped on whatever is causing the kernel class loader to fail to find the org.h2.Driver class. I am familiar with the installation instructions link you provided in the prior message on this thread and feel all those steps were followed. I included what I think were the important configuration files in the top posting. Is there something I missed?
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04988 seconds