Return-Path: X-Original-To: apmail-geronimo-user-archive@www.apache.org Delivered-To: apmail-geronimo-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 975C19F1D for ; Tue, 10 Apr 2012 17:10:27 +0000 (UTC) Received: (qmail 45232 invoked by uid 500); 10 Apr 2012 17:10:27 -0000 Delivered-To: apmail-geronimo-user-archive@geronimo.apache.org Received: (qmail 45170 invoked by uid 500); 10 Apr 2012 17:10:26 -0000 Mailing-List: contact user-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: user@geronimo.apache.org List-Id: Delivered-To: mailing list user@geronimo.apache.org Received: (qmail 45148 invoked by uid 99); 10 Apr 2012 17:10:26 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Apr 2012 17:10:26 +0000 X-ASF-Spam-Status: No, hits=1.6 required=5.0 tests=FREEMAIL_REPLY,RCVD_IN_DNSWL_LOW,SPF_PASS,URI_HEX X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of kshiraly.lists@gmail.com designates 209.85.160.68 as permitted sender) Received: from [209.85.160.68] (HELO mail-pb0-f68.google.com) (209.85.160.68) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Apr 2012 17:10:19 +0000 Received: by pbbrq13 with SMTP id rq13so55382pbb.7 for ; Tue, 10 Apr 2012 10:09:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=Tumboc3ImKvxtJ31qT3ReqSRaP2gWGQOT6H4C5+9plg=; b=SdvOCFKomLpLnEvfcRG/PCMTpuG2DIuusH3Tu711j7C9nZKue7zURBXOoXx2xh08hH mW5GCpBlCOxUVTN2OW7NdTd8K58Yr2IYvuY6fy51nrFGSIqui9XrU1qa1+vWB9NBBRO+ xjB7wWlkpX0SEX5num2tlsXUDXTBueCe3Recz557aELsWo4DKTlbaEiyoUqo9qvfcDDC 45lbO3Lbb90OEq4OtoDQRy+9XoCp8l49x3pNvhPBC/FbQt5vZ/mXwXLE6WGx/Shr9W0N jUsp59uRQ5EzPLm2WfHJTPPYwFfyj8VLJ+X7kWSVH/8X1CWrOFBQur++FYweycUD2+uJ L/Lg== Received: by 10.68.134.4 with SMTP id pg4mr30342531pbb.37.1334077799347; Tue, 10 Apr 2012 10:09:59 -0700 (PDT) Received: from [192.168.1.2] ([59.164.107.244]) by mx.google.com with ESMTPS id q8sm368895pbi.1.2012.04.10.10.09.55 (version=SSLv3 cipher=OTHER); Tue, 10 Apr 2012 10:09:58 -0700 (PDT) Message-ID: <4F846960.7080002@gmail.com> Date: Tue, 10 Apr 2012 22:39:52 +0530 From: kshiraly User-Agent: Thunderbird 2.0.0.24 (Windows/20100228) MIME-Version: 1.0 To: user@geronimo.apache.org Subject: Re: Geronimo v3 - ClassNotFoundException for class available in sharedlib References: <1333936935267-3895754.post@n3.nabble.com> <4F82A506.6010204@gmail.com> In-Reply-To: <4F82A506.6010204@gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Hi Ivan, I built geronimo/server/branches/3.0-beta branch, and retried the same configuration in "geronimo-tomcat7-javaee6-3.0-beta-2" and "geronimo-tomcat7-javaee6-web-3.0-beta-2" assemblies. As before, the shared jars are in var/shared/lib, and the WAR is in /deploy I still get the ClassNotFoundException, but this time with a different stack trace. I started server with "-verbose:class" and I can see that now /com.liferay.portal.kernel.security.jaas.PortalRole is/ getting loaded from /var/shared/lib/portal-service.jar. Any ideas what could be wrong? /2012-04-10 22:32:36,298 ERROR [GBeanInstanceState] Error while starting; GBean is now in the FAILED state: abstractName="liferay/liferay-portal/6.1.0/car?configurationName=liferay/liferay-portal/6.1.0/car" org.apache.geronimo.kernel.config.InvalidConfigException: Class not loadable in classloader: liferay.liferay-portal_6.1.0 [378] at org.apache.geronimo.kernel.config.SerializedGBeanState.loadGBeans(SerializedGBeanState.java:134) at org.apache.geronimo.kernel.config.SerializedGBeanState.getGBeans(SerializedGBeanState.java:65) at org.apache.geronimo.kernel.config.ConfigurationData.getGBeans(ConfigurationData.java:186) at org.apache.geronimo.kernel.config.Configuration.(Configuration.java:216) at sun.reflect.GeneratedConstructorAccessor51.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at org.apache.xbean.recipe.ReflectionUtil$ConstructorFactory.create(ReflectionUtil.java:958) at org.apache.xbean.recipe.ObjectRecipe.internalCreate(ObjectRecipe.java:276) at org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:96) at org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:61) at org.apache.geronimo.gbean.runtime.GBeanInstance.createInstance(GBeanInstance.java:958) at org.apache.geronimo.gbean.runtime.GBeanInstanceState.attemptFullStart(GBeanInstanceState.java:271) at org.apache.geronimo.gbean.runtime.GBeanInstanceState.start(GBeanInstanceState.java:105) at org.apache.geronimo.gbean.runtime.GBeanInstance.start(GBeanInstance.java:555) at org.apache.geronimo.kernel.basic.BasicKernel.startGBean(BasicKernel.java:368) at org.apache.geronimo.kernel.config.KernelConfigurationManager.load(KernelConfigurationManager.java:191) at org.apache.geronimo.kernel.config.SimpleConfigurationManager.loadConfiguration(SimpleConfigurationManager.java:359) at org.apache.geronimo.kernel.config.SimpleConfigurationManager.loadConfiguration(SimpleConfigurationManager.java:332) at org.apache.geronimo.kernel.osgi.ConfigurationActivator.start(ConfigurationActivator.java:62) 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) 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:299) at org.apache.geronimo.kernel.config.SimpleConfigurationManager.loadConfiguration(SimpleConfigurationManager.java:312) at org.apache.geronimo.kernel.config.SimpleConfigurationManager.loadConfiguration(SimpleConfigurationManager.java:291) at org.apache.geronimo.kernel.config.KernelConfigurationManager.loadConfiguration(KernelConfigurationManager.java:125) at org.apache.geronimo.deployment.plugin.local.StartCommand.run(StartCommand.java:63) at java.lang.Thread.run(Thread.java:662) Caused by: java.lang.ClassNotFoundException: Unable to find class used in GBeanData liferay/liferay-portal/6.1.0/car?J2EEApplication=null,WebModule=liferay/liferay-portal/6.1.0/car,j2eeType=RoleMapper,name=RoleMapper at org.apache.geronimo.gbean.GBeanData$V0Externalizable.readExternal(GBeanData.java:404) at org.apache.geronimo.gbean.GBeanData.readExternal(GBeanData.java:320) at org.apache.geronimo.kernel.config.SerializedGBeanState.loadGBeans(SerializedGBeanState.java:125) ... 30 more Caused by: java.lang.ClassNotFoundException: Unable to find class used in GBeanData liferay/liferay-portal/6.1.0/car?J2EEApplication=null,WebModule=liferay/liferay-portal/6.1.0/car,j2eeType=RoleMapper,name=RoleMapper, attribute: principalRoleMap at org.apache.geronimo.gbean.GBeanData$V0Externalizable.readExternal(GBeanData.java:370) ... 32 more Caused by: java.lang.ClassNotFoundException: Could not load class com.liferay.portal.kernel.security.jaas.PortalRole from unknown classloader; liferay.liferay-portal_6.1.0 [378] at org.apache.geronimo.kernel.ClassLoading.loadClass(ClassLoading.java:320) at org.apache.geronimo.kernel.ObjectInputStreamExt.resolveClass(ObjectInputStreamExt.java:40) at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1574) at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1495) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1731) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350) at java.util.HashMap.readObject(HashMap.java:1029) at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:974) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1848) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1752) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350) at org.apache.geronimo.gbean.GBeanData$V0Externalizable.readExternal(GBeanData.java:368) ... 32 more 2012-04-10 22:32:36,357 WARN [ModuleHandler] Unable to start some modules for D:\developer\geronimo\geronimo-tomcat7-javaee6-3.0-beta-2-SNAPSHOT\deploy\liferay-portal.war / geronimo.out with -verbose:class: ----------------------------------------- [Loaded com.liferay.portal.kernel.servlet.ProtectedPrincipal from file:/D:/developer/geronimo/geronimo-tomcat7-javaee6-3.0-beta-2-SNAPSHOT/var/shared/lib/portal-service.jar] [Loaded com.liferay.portal.kernel.security.jaas.PortalPrincipal from file:/D:/developer/geronimo/geronimo-tomcat7-javaee6-3.0-beta-2-SNAPSHOT/var/shared/lib/portal-service.jar] [Loaded com.liferay.portal.kernel.security.jaas.PortalRole from file:/D:/developer/geronimo/geronimo-tomcat7-javaee6-3.0-beta-2-SNAPSHOT/var/shared/lib/portal-service.jar] config.xml: ------------ var/shared/META-INF/MANIFEST.MF: ----------------------------------------------- Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-SymbolicName: org.apache.geronimo.configs.sharedlib.SharedLib Bundle-Version: 3.0.0.beta-2-SNAPSHOT Bundle-ClassPath: classes,lib/hsql.jar,lib/jtds.jar,lib/mysql.jar,lib/ portal-service.jar,lib/portlet.jar,lib/postgresql.jar Import-Package: org.apache.geronimo.kernel.osgi,org.apache.geronimo.sy stem.sharedlib,org.apache.geronimo.gbean,org.osgi.framework,org.apach e.geronimo.system.serverinfo DynamicImport-Package: * Thanks kshiraly kshiraly wrote: > Hi Ivan, > > Thanks for reply. I'll give it a try and get back to you. > > kshiraly > > Ivan wrote: >> Hmm, think I have fixed that in >> https://issues.apache.org/jira/browse/GERONIMO-6254 Is it OK for you >> to build that components by yourself, or I could provide the patched >> jar files somewhere. >> >> >> 2012/4/9 Karthik Mailing > > >> >> Hi Ivan, >> >> Thanks for your reply. >> I had already placed the jars in GERONIMO_HOME/var/shared/lib >> prior to starting Geronimo. >> >> >> Content of var/shared/META-INF: >> --------------------------------------- >> Manifest-Version: 1.0 >> Bundle-ManifestVersion: 2 >> Bundle-SymbolicName: org.apache.geronimo.configs.sharedlib.SharedLib >> Bundle-Version: 3.0.0.beta-1 >> Bundle-ClassPath: >> classes,lib/hsql.jar,lib/jtds.jar,lib/mysql.jar,lib/ >> portal-service.jar,lib/portlet.jar,lib/postgresql.jar >> Import-Package: >> org.apache.geronimo.kernel.osgi,org.apache.geronimo.sy >> >> stem.sharedlib,org.osgi.framework,org.apache.geronimo.gbean,org.apach >> e.geronimo.system.serverinfo >> >> The jar names are all correct and no jars have been missed in the >> above list. The class that could not be found is actually in >> portal-service.jar. >> >> Karthik >> >> >> On Mon, Apr 9, 2012 at 9:38 AM, Ivan > > wrote: >> >> The configurations look fine to me, after copying those jar >> files in the var/shared library, do you restart the server ? >> Could you show me the content of the >> file var\shared\META-INF/MANIFEST.MF file ? >> >> >> 2012/4/9 kshiraly > > >> >> Hi, >> >> I'm trying to deploy a WAR file in Geronimo v3 JavaEE6 >> web profile release >> (geronimo-tomcat7-javaee6-3.0-beta-1). >> The WAR file's descriptors contain references to JAAS >> related classes >> (roles, principals, login modules) which are available in >> a JAR file in >> GERONIMO_HOME/var/shared/lib. >> >> This same configuration works in a Geronimo 2.2.1 >> installation, but shows >> the following exception and stack trace in v3 when I copy >> the WAR file into >> Geronimo's hot deployment directory (GERONIMO_HOME/deploy): >> >> ============================================================================= >> [Loaded >> org.apache.geronimo.xbeans.geronimo.security.impl.GerRoleTypeImpl >> from >> file:/D:/developer/geronimo/geronimo-tomcat7-javaee6-3.0-beta-1/var/cache/org.eclipse.osgi/bundles/124/1/bundlefile] >> [Loaded >> org.apache.geronimo.xbeans.geronimo.security.GerPrincipalType >> from >> file:/D:/developer/geronimo/geronimo-tomcat7-javaee6-3.0-beta-1/var/cache/org.eclipse.osgi/bundles/124/1/bundlefile] >> [Loaded >> org.apache.geronimo.xbeans.geronimo.security.impl.GerPrincipalTypeImpl >> from >> file:/D:/developer/geronimo/geronimo-tomcat7-javaee6-3.0-beta-1/var/cache/org.eclipse.osgi/bundles/124/1/bundlefile] >> [Loaded >> org.apache.geronimo.security.util.ConfigurationUtil$1 from >> file:/D:/developer/geronimo/geronimo-tomcat7-javaee6-3.0-beta-1/var/cache/org.eclipse.osgi/bundles/87/1/bundlefile] >> java.security.PrivilegedActionException: >> java.lang.ClassNotFoundException: >> com.liferay.portal.kernel.security.jaas.PortalRole >> at >> java.security.AccessController.doPrivileged(Native Method) >> at >> org.apache.geronimo.security.util.ConfigurationUtil.generatePrincipal(ConfigurationUtil.java:77) >> at >> org.apache.geronimo.security.deployment.GeronimoSecurityBuilderImpl.buildPrincipal(GeronimoSecurityBuilderImpl.java:280) >> at >> org.apache.geronimo.security.deployment.GeronimoSecurityBuilderImpl.configureRoleMapper(GeronimoSecurityBuilderImpl.java:314) >> at >> org.apache.geronimo.security.deployment.GeronimoSecurityBuilderImpl.build(GeronimoSecurityBuilderImpl.java:184) >> at >> org.apache.geronimo.deployment.NamespaceDrivenBuilderCollection.build(NamespaceDrivenBuilderCollection.java:43) >> at >> org.apache.geronimo.web25.deployment.AbstractWebModuleBuilder.basicInitContext(AbstractWebModuleBuilder.java:496) >> at >> org.apache.geronimo.web25.deployment.AbstractWebModuleBuilder.initContext(AbstractWebModuleBuilder.java:436) >> at >> org.apache.geronimo.j2ee.deployment.SwitchingModuleBuilder.initContext(SwitchingModuleBuilder.java:168) >> at >> org.apache.geronimo.j2ee.deployment.EARConfigBuilder.buildConfiguration(EARConfigBuilder.java:685) >> at >> org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:255) >> at >> org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:140) >> 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.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:34) >> at >> org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:131) >> at >> org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:883) >> at >> org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:245) >> at >> org.apache.geronimo.deployment.plugin.local.AbstractDeployCommand.doDeploy(AbstractDeployCommand.java:116) >> at >> org.apache.geronimo.deployment.plugin.local.DistributeCommand.run(DistributeCommand.java:61) >> at java.lang.Thread.run(Thread.java:662) >> Caused by: java.lang.ClassNotFoundException: >> com.liferay.portal.kernel.security.jaas.PortalRole >> 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.apache.geronimo.hook.equinox.GeronimoClassLoader.loadClass(GeronimoClassLoader.java:85) >> at >> java.lang.ClassLoader.loadClass(ClassLoader.java:248) >> at >> org.eclipse.osgi.internal.loader.BundleLoader.loadClass(BundleLoader.java:345) >> at >> org.eclipse.osgi.framework.internal.core.BundleHost.loadClass(BundleHost.java:229) >> at >> org.eclipse.osgi.framework.internal.core.AbstractBundle.loadClass(AbstractBundle.java:1207) >> at >> org.apache.geronimo.security.util.ConfigurationUtil$1.run(ConfigurationUtil.java:79) >> at >> org.apache.geronimo.security.util.ConfigurationUtil$1.run(ConfigurationUtil.java:77) >> ... 23 more >> >> ============================================================================= >> >> >> >> *var/config/config.xml has entries for sharedlib:* >> >> > name="org.apache.geronimo.configs/sharedlib-extender/3.0-beta-1/car"/> >> > name="org.apache.geronimo.configs/sharedlib/3.0-beta-1/car"/> >> >> >> *WAR file's geronimo-web.xml:* >> >> >> >> > xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-1.1"> >> >> >> liferay >> >> liferay-portal >> 6.1.0 >> car >> >> >> >> >> org.apache.geronimo.configs >> >> j2ee-server >> car >> >> >> >> org.apache.geronimo.configs >> >> sharedlib >> car >> >> >> >> org.apache.geronimo.framework >> >> j2ee-security >> car >> >> >> >> org.apache.geronimo.framework >> >> rmi-naming >> car >> >> >> >> >> / >> PortalRealm >> >> >> > class="com.liferay.portal.kernel.security.jaas.PortalPrincipal" >> /> >> >> >> >> > class="com.liferay.portal.kernel.security.jaas.PortalRole" >> name="users" /> >> >> >> >> > class="org.apache.geronimo.security.realm.GenericSecurityRealm"> >> > name="realmName">PortalRealm >> >> ServerInfo >> >> >> > name="LoginModuleConfiguration"> >> > xmlns:log="http://geronimo.apache.org/xml/ns/loginconfig-2.0"> >> > control-flag="REQUIRED" wrap-principals="false"> >> >> PortalRealm >> >> com.liferay.portal.security.jaas.ext.tomcat.PortalLoginModule >> >> >> >> >> >> >> *Other information: * >> For the record, the WAR file I'm trying to deploy is >> liferay-portal.war. >> Liferay comes with a Geronimo bundle for Geronimo v2.2.1. >> I wanted to try out a similar deployment on Geronimo v3. >> A diff utility run on liferay+geronimo2.2.1 bundle and a >> normal >> geronimo2.2.1 download showed that Liferay has made only >> 2 additions - 1) >> Added all liferay WARs in /deploy 2) Added all shared JARs in >> /var/shared/lib. All other changes are disabling and >> removal of services >> like openejb which liferay does not use. >> The same deployment in Geronimo v3 throws >> ClassNotFoundException. Does the >> OSGI support in v3 require some additional configuration >> for sharedlib? >> >> Thanks >> kshiraly >> >> -- >> View this message in context: >> http://apache-geronimo.328035.n3.nabble.com/Geronimo-v3-ClassNotFoundException-for-class-available-in-sharedlib-tp3895754p3895754.html >> Sent from the Users mailing list archive at Nabble.com. >> >> >> >> >> -- >> Ivan >> >> >> >> >> >> -- >> Ivan >