I also just updated car-maven-plugin to set -Dorg.ops4j.pax.logging.DefaultServiceLog.level=DEBUG property automatically when running mvn with -X option.
Jarek On Fri, Oct 30, 2009 at 11:35 AM, Rick McGuire <[email protected]> wrote: > Ok, I finally solved the ClassNotFoundException problem with an assist from > Jarek. He suggested adding the following option to my build: > > -Dorg.ops4j.pax.logging.DefaultServiceLog.level=DEBUG option > > To get more information about what bundles have been loaded and in what > order. With that option specified, a BundleException was revealed on the > geronimo-connector-builder-1_6 bundle caused by a misspelled package name on > the import. For some reason, this exception was not showing up at the > default error levels. > Rick > > Rick McGuire wrote: >> >> I'm still having class loading issues trying to get this working. I'm >> getting an error attempting to load >> org.apache.geronimo.connector.deployment.ConnectionModuleBuilder when trying >> to build connector-deployer-1_6. This class is in the >> geronimo-connector-builder-1_6 bundle, and the bundles has this package >> listed on the Export-Package. The requesting bundle is configured with >> DynamicImport-Package: *, so this should be locatable IF the >> geronimo-connector-builder-1_6 bundle is getting loaded into the framework. >> I'm not convinced it is, even though the deployer project lists >> geronimo-connector-builder as a dependency. Is there any method I can use >> to verify that this has been loaded first? I tried running the build with >> -X, but I didn't see anything obvious that would confirm the situation one >> way or another. >> >> Rick >> >> Rick McGuire wrote: >>> >>> I'm still trying to track down the ClassNotFoundException once all of the >>> imports/exports are added. I added some information to the exceptions for >>> this error, and the bundle involved with this error is: >>> >>> org.apache.geronimo.gbean.InvalidConfigurationException: Could not load >>> class or >>> g.apache.geronimo.connector.deployment.ConnectorModuleBuilder from bundle >>> org.apache.geronimo.configs.connector-deployer-1_6-DEPLOYMENT [49] at >>> location >>> reference:file:C:\g-3.0\plugins\connector-1_6\connector-deployer-1_6\target\repository\org\apache\geronimo\configs\connector-deployer-1_6\3.0-SNAPSHOT\connector-deployer-1_6-3.0-SNAPSHOT.car >>> >>> Unfortunately, once the error occurs, this bundle is erased from the >>> repository, so I'm not able to see if the manifest is getting generated >>> correctly. This class should be getting imported from the >>> geronimo-connector-builder-1.6 dependency, but for some reason, it seems >>> like it's not finding the package. >>> >>> Is there any way to get that car file left intact after an error? I >>> couldn't find where this is being made to go away. >>> >>> Rick >>> >>> Rick McGuire wrote: >>>> >>>> This is driving me nuts. The only differences in the MANIFEST.MF file >>>> between the two bundles is the single extra package on the import. I can't >>>> see any reason for why the ConnectorModuleBuilder would fail to load if >>>> that >>>> import is there. Without that import, the xbean classes are not usable. >>>> >>>> Rick >>>> >>>> >>>> Rick McGuire wrote: >>>>> >>>>> I've spent most of the morning trying to chase down a problem that >>>>> showed up trying to build the system-database plugin. The problem started >>>>> with this error on building that plugin: >>>>> >>>>> atabase\target\work\plan.xml >>>>> [INFO] Started deployer: >>>>> org.apache.geronimo.framework/geronimo-gbean-deployer/3 >>>>> .0-SNAPSHOT/car >>>>> [INFO] Started deployer: >>>>> org.apache.geronimo.configs/j2ee-deployer/3.0-SNAPSHOT/ >>>>> car >>>>> [INFO] Started deployer: >>>>> org.apache.geronimo.configs/connector-deployer-1_6/3.0- >>>>> SNAPSHOT/car >>>>> [org.apache.geronimo.deployment.Deployer] : Deployment failed due to >>>>> java.lang.NullPointerException >>>>> at >>>>> org.apache.xmlbeans.impl.schema.SchemaPropertyImpl.getType(SchemaProp >>>>> ertyImpl.java:92) >>>>> at >>>>> org.apache.xmlbeans.impl.schema.SchemaTypeImpl.createElementType(Sche >>>>> maTypeImpl.java:965) >>>>> at >>>>> org.apache.xmlbeans.impl.values.XmlObjectBase.create_element_user(Xml >>>>> ObjectBase.java:924) >>>>> at org.apache.xmlbeans.impl.store.Xobj.getUser(Xobj.java:1669) >>>>> at >>>>> org.apache.xmlbeans.impl.store.Xobj.find_element_user(Xobj.java:2074) >>>>> >>>>> at >>>>> org.apache.geronimo.xbeans.geronimo.impl.GerConnectorTypeImpl.getEnvi >>>>> ronment(Unknown Source) >>>>> at >>>>> org.apache.geronimo.connector.deployment.ConnectorModuleBuilder.creat >>>>> eModule(ConnectorModuleBuilder.java:290) >>>>> at >>>>> org.apache.geronimo.connector.deployment.ConnectorModuleBuilder.creat >>>>> eModule(ConnectorModuleBuilder.java:209) >>>>> at >>>>> org.apache.geronimo.j2ee.deployment.EARConfigBuilder.getDeploymentPla >>>>> n(EARConfigBuilder.java:357) >>>>> at >>>>> org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:229) >>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >>>>> at >>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. >>>>> java:39) >>>>> at >>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces >>>>> sorImpl.java:25) >>>>> at java.lang.reflect.Method.invoke(Method.java:597) >>>>> at >>>>> org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(Refl >>>>> ectionMethodInvoker.java:34) >>>>> at >>>>> org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperatio >>>>> n.java:131) >>>>> at >>>>> org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance. >>>>> java:854) >>>>> at >>>>> org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java: >>>>> 245) >>>>> at >>>>> org.apache.geronimo.mavenplugins.car.PackageMojo.invokeDeployer(Packa >>>>> geMojo.java:519) >>>>> at >>>>> org.apache.geronimo.mavenplugins.car.PackageMojo.buildPackage(Package >>>>> Mojo.java:337) >>>>> at >>>>> org.apache.geronimo.mavenplugins.car.PackageMojo.execute(PackageMojo. >>>>> java:234) >>>>> at >>>>> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi >>>>> nManager.java:490) >>>>> at >>>>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa >>>>> ultLifecycleExecutor.java:694) >>>>> at >>>>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLi >>>>> fecycle(DefaultLifecycleExecutor.java:556) >>>>> at >>>>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau >>>>> ltLifecycleExecutor.java:535) >>>>> at >>>>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan >>>>> dleFailures(DefaultLifecycleExecutor.java:387) >>>>> at >>>>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen >>>>> ts(DefaultLifecycleExecutor.java:348) >>>>> at >>>>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi >>>>> fecycleExecutor.java:180) >>>>> at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328) >>>>> at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138) >>>>> at org.apache.maven.cli.MavenCli.main(MavenCli.java:362) >>>>> at >>>>> org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:6 >>>>> 0) >>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >>>>> at >>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. >>>>> java:39) >>>>> at >>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces >>>>> sorImpl.java:25) >>>>> at java.lang.reflect.Method.invoke(Method.java:597) >>>>> at >>>>> org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) >>>>> at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) >>>>> at >>>>> org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) >>>>> >>>>> at org.codehaus.classworlds.Launcher.main(Launcher.java:375) >>>>> [INFO] >>>>> ------------------------------------------------------------------------ >>>>> [ERROR] BUILD ERROR >>>>> [INFO] >>>>> ------------------------------------------------------------------------ >>>>> [INFO] could not package plugin >>>>> >>>>> Embedded error: java.lang.NullPointerException >>>>> [INFO] >>>>> ------------------------------------------------------------------------ >>>>> >>>>> >>>>> The error is occurring trying to retrieve the ENVIRONMENT element from >>>>> the document. In these classes, the ENVIRONMENT type is one pulled in >>>>> from >>>>> the org.apache.geronimo.deployment.xbeans package. Unfortunately, the >>>>> connector-builder xbeans is not importing the impl package, so the type is >>>>> not getting found. I'm pretty sure this is causing the error, but the >>>>> obvious fix of adding the import to the geronimo-connector-builder-1_6 >>>>> package results in a different error that makes no sense to me: >>>>> >>>>> [org.apache.geronimo.deployment.Deployer] : Deployment failed due to >>>>> org.apache.geronimo.gbean.InvalidConfigurationException: Could not load >>>>> class or >>>>> g.apache.geronimo.connector.deployment.ConnectorModuleBuilder >>>>> at >>>>> org.apache.geronimo.gbean.annotation.AnnotationGBeanInfoFactory.getGB >>>>> eanInfo(AnnotationGBeanInfoFactory.java:40) >>>>> at >>>>> org.apache.geronimo.gbean.MultiGBeanInfoFactory.getGBeanInfo(MultiGBe >>>>> anInfoFactory.java:66) >>>>> at >>>>> org.apache.geronimo.deployment.service.GBeanBuilder.addGBeanData(GBea >>>>> nBuilder.java:113) >>>>> at >>>>> org.apache.geronimo.deployment.service.GBeanBuilder.build(GBeanBuilde >>>>> r.java:108) >>>>> at >>>>> org.apache.geronimo.deployment.NamespaceDrivenBuilderCollection.build >>>>> (NamespaceDrivenBuilderCollection.java:46) >>>>> at >>>>> org.apache.geronimo.deployment.service.ServiceConfigBuilder.buildConf >>>>> iguration(ServiceConfigBuilder.java:250) >>>>> at >>>>> org.apache.geronimo.deployment.service.ServiceConfigBuilder.buildConf >>>>> iguration(ServiceConfigBuilder.java:209) >>>>> at >>>>> org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:257) >>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >>>>> at >>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. >>>>> java:39) >>>>> at >>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces >>>>> sorImpl.java:25) >>>>> at java.lang.reflect.Method.invoke(Method.java:597) >>>>> at >>>>> org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(Refl >>>>> ectionMethodInvoker.java:34) >>>>> at >>>>> org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperatio >>>>> n.java:131) >>>>> at >>>>> org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance. >>>>> java:854) >>>>> at >>>>> org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java: >>>>> 245) >>>>> at >>>>> org.apache.geronimo.mavenplugins.car.PackageMojo.invokeDeployer(Packa >>>>> geMojo.java:519) >>>>> at >>>>> org.apache.geronimo.mavenplugins.car.PackageMojo.buildPackage(Package >>>>> Mojo.java:337) >>>>> at >>>>> org.apache.geronimo.mavenplugins.car.PackageMojo.execute(PackageMojo. >>>>> java:234) >>>>> at >>>>> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi >>>>> nManager.java:490) >>>>> at >>>>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa >>>>> ultLifecycleExecutor.java:694) >>>>> at >>>>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLi >>>>> fecycle(DefaultLifecycleExecutor.java:556) >>>>> at >>>>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau >>>>> ltLifecycleExecutor.java:535) >>>>> at >>>>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan >>>>> dleFailures(DefaultLifecycleExecutor.java:387) >>>>> at >>>>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen >>>>> ts(DefaultLifecycleExecutor.java:348) >>>>> at >>>>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi >>>>> fecycleExecutor.java:180) >>>>> at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328) >>>>> at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138) >>>>> at org.apache.maven.cli.MavenCli.main(MavenCli.java:362) >>>>> at >>>>> org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:6 >>>>> 0) >>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >>>>> at >>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. >>>>> java:39) >>>>> at >>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces >>>>> sorImpl.java:25) >>>>> at java.lang.reflect.Method.invoke(Method.java:597) >>>>> at >>>>> org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) >>>>> at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) >>>>> at >>>>> org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) >>>>> >>>>> at org.codehaus.classworlds.Launcher.main(Launcher.java:375) >>>>> Caused by: java.lang.ClassNotFoundException: >>>>> org.apache.geronimo.connector.deplo >>>>> yment.ConnectorModuleBuilder >>>>> at >>>>> org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation >>>>> (ModuleImpl.java:720) >>>>> at >>>>> org.apache.felix.framework.ModuleImpl.access$100(ModuleImpl.java:60) >>>>> at >>>>> org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(Mod >>>>> uleImpl.java:1627) >>>>> at java.lang.ClassLoader.loadClass(ClassLoader.java:252) >>>>> at >>>>> org.apache.felix.framework.ModuleImpl.getClassByDelegation(ModuleImpl >>>>> .java:580) >>>>> at >>>>> org.apache.felix.framework.Felix.loadBundleClass(Felix.java:1487) >>>>> at >>>>> org.apache.felix.framework.BundleImpl.loadClass(BundleImpl.java:897) >>>>> at >>>>> org.apache.geronimo.gbean.annotation.AnnotationGBeanInfoFactory.getGB >>>>> eanInfo(AnnotationGBeanInfoFactory.java:38) >>>>> ... 37 more >>>>> [INFO] >>>>> ------------------------------------------------------------------------ >>>>> [ERROR] BUILD ERROR >>>>> [INFO] >>>>> ------------------------------------------------------------------------ >>>>> [INFO] could not package plugin >>>>> >>>>> Embedded error: >>>>> org.apache.geronimo.gbean.InvalidConfigurationException: Could n >>>>> ot load class >>>>> org.apache.geronimo.connector.deployment.ConnectorModuleBuilder >>>>> >>>>> >>>>> >>>>> I can't figure out why this class can't be loaded. It is in the bundle >>>>> and exported by the manifest. The manifest appears correct, with only the >>>>> additional package listed on the imports. But it is definitely tied to >>>>> that >>>>> additional import. If I remove it, the connector plugin builds fine. If >>>>> I >>>>> put it back, I get the error above. >>>>> >>>>> Rick >>>>> >>>> >>>> >>> >>> >> >> > >
