geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Jencks <david_jen...@yahoo.com>
Subject Re: Geronimo v2.1 Plan Creator => Deploy Liferay 4.1.1
Date Thu, 13 Mar 2008 17:18:25 GMT
I ran into this too.  liferay is using activemq configured with xbean- 
spring and our copy of activemq does not include xbean or spring in  
its classloader.  So, you have to make sure liferay uses activemq  
from its classloader instead of geronimo's classloader.

In my sample I did this by including this in the liferay-jetty plan:

     <environment>
         <inverse-classloading/>
     </environment>

which makes that module try to load stuff (such as activemq) from the  
module before trying parent classloaders such as activemq-broker

and

<!-- replaces activemq jar in lib dir -->
         <dependency>
             <groupId>org.apache.activemq</groupId>
             <artifactId>activemq-core</artifactId>
             <type>jar</type>
             <version>4.1.1</version>
         </dependency>


in liferay-jetty/pom.xml

and

                                 <!-- use geronimo dependencies  
rather than inclusion for published artifacts -->
                                 <exclude>WEB-INF/lib/activemq.jar</ 
exclude>

in liferay-portal-lesslibs to remove the activemq jar from the  
liferay war itself.

It looks to me as if all these steps are in the wiki page, but that  
doesn't mean the process is easy to follow, and maybe I missed  
something else that is required.... suggestions welcome.

thanks
david jencks

On Mar 13, 2008, at 9:12 AM, Jim Foster wrote:

>
>
> Kevan Miller wrote:
>>
>>
>> On Mar 7, 2008, at 12:12 PM, Jim Foster wrote:
>>
>>>>
>>>> Hi Jim,
>>>> There are a lot of knobs and switches.
>>
>> ...
>>
>> [snip]
>>
>>
>
>
> Hi Kevan,
>
> I took yours, David's and Peter's suggestions and have been working  
> on this
> a fair bit this week, but I seem to be at a point where I am  
> chasing my
> tail, so I need to ask to bend the dev team's ear a bit more.
>
> The common denominator that I run into appears to be either
> lifecycle-related, or associated with creation of gbeans,  
> themselves. I
> don't have enough insight yet into Geronimo's core architecture to  
> say for
> sure.
>
> For example, the first error in the log file looks like this:
>
> java.lang.ExceptionInInitializerError
> 	at
> com.liferay.portal.velocity.LiferayResourceCache.get 
> (LiferayResourceCache.java:43)
>
>
> I have included the latest (and lengthy) log file at the end of  
> this post.
>
> Any advice would be most appreciated!
>
>
> Jim
>
>
> START ATTACHMENT - geronimo-jetty-liferay-1.0-SNAPSHOT/var/log/ 
> geronimo.txt
> ---------------------------------------------------------------------- 
> --------------------
> 07:09:14,468 INFO  [Log4jService]
> ----------------------------------------------
> 07:09:14,468 INFO  [Log4jService] Started Logging Service
> 07:09:14,468 INFO  [Log4jService] Runtime Information:
> 07:09:14,468 INFO  [Log4jService]   Install Directory =
> D:\Geronimo\geronimo-jetty-liferay-1.0-SNAPSHOT
> 07:09:14,468 INFO  [Log4jService]   JVM in use = Sun Microsystems  
> Inc. Java
> 1.5.0_15
> 07:09:14,468 INFO  [Log4jService] Java Information:
> 07:09:14,468 INFO  [Log4jService]   System property  
> [java.runtime.name]  =
> Java(TM) 2 Runtime Environment, Standard Edition
> 07:09:14,468 INFO  [Log4jService]   System property  
> [java.runtime.version]
> = 1.5.0_15-b04
> 07:09:14,468 INFO  [Log4jService]   System property  
> [os.name]             =
> Windows XP
> 07:09:14,468 INFO  [Log4jService]   System property  
> [os.version]          =
> 5.1
> 07:09:14,468 INFO  [Log4jService]   System property  
> [sun.os.patch.level]  =
> Service Pack 2
> 07:09:14,468 INFO  [Log4jService]   System property  
> [os.arch]             =
> x86
> 07:09:14,468 INFO  [Log4jService]   System property  
> [java.class.version]  =
> 49.0
> 07:09:14,468 INFO  [Log4jService]   System property  
> [locale]              =
> en_US
> 07:09:14,468 INFO  [Log4jService]   System property  
> [unicode.encoding]    =
> UnicodeLittle
> 07:09:14,468 INFO  [Log4jService]   System property  
> [file.encoding]       =
> Cp1252
> 07:09:14,468 INFO  [Log4jService]   System property  
> [java.vm.name]        =
> Java HotSpot(TM) Client VM
> 07:09:14,468 INFO  [Log4jService]   System property  
> [java.vm.vendor]      =
> Sun Microsystems Inc.
> 07:09:14,468 INFO  [Log4jService]   System property  
> [java.vm.version]     =
> 1.5.0_15-b04
> 07:09:14,484 INFO  [Log4jService]   System property  
> [java.vm.info]        =
> mixed mode
> 07:09:14,484 INFO  [Log4jService]   System property  
> [java.home]           =
> D:\Languages\Java\JDK5\jre
> 07:09:14,484 INFO  [Log4jService]   System property  
> [java.classpath]      =
> null
> 07:09:14,484 INFO  [Log4jService]   System property  
> [java.library.path]   =
> D:\Languages\Java\JDK5\jre\bin;.;C:\WINDOWS\system32;C:\WINDOWS;C: 
> \WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;D:\Apache 
> \Maven2\maven-2.0.7\bin;D:\Apache\Ant\ant-1.7.0\bin;D:\Languages 
> \Java\bin;I:\Database
> Tools\MySQL\MySQL Server\bin
> 07:09:14,484 INFO  [Log4jService]   System property  
> [java.endorsed.dirs]  =
> D:\Geronimo\geronimo-jetty-liferay-1.0-SNAPSHOT\lib\endorsed;D: 
> \Languages\Java\JDK5\jre\lib\endorsed
> 07:09:14,484 INFO  [Log4jService]   System property  
> [java.ext.dirs]       =
> D:\Languages\Java\JDK5\jre\lib\ext
> 07:09:14,484 INFO  [Log4jService]   System property  
> [sun.boot.class.path] =
> D:\Geronimo\geronimo-jetty-liferay-1.0-SNAPSHOT\lib\endorsed\yoko- 
> rmi-spec-1.0-r615303.jar;D:\Geronimo\geronimo-jetty-liferay-1.0- 
> SNAPSHOT\lib\endorsed\yoko-spec-corba-1.0-r615303.jar;D:\Languages 
> \Java\JDK5\jre\lib\rt.jar;D:\Languages\Java\JDK5\jre\lib\i18n.jar;D: 
> \Languages\Java\JDK5\jre\lib\sunrsasign.jar;D:\Languages\Java\JDK5 
> \jre\lib\jsse.jar;D:\Languages\Java\JDK5\jre\lib\jce.jar;D: 
> \Languages\Java\JDK5\jre\lib\charsets.jar;D:\Languages\Java\JDK5\jre 
> \classes
> 07:09:14,484 INFO  [Log4jService]
> ----------------------------------------------
> 07:09:24,734 INFO  [KernelContextGBean] bound gbean
> org.apache.geronimo.framework/rmi-naming/2.1/car? 
> ServiceModule=org.apache.geronimo.framework/rmi-naming/2.1/ 
> car,j2eeType=Context,name=JavaCompContext
> at name java:comp
> 07:09:24,734 INFO  [KernelContextGBean] bound gbean
> org.apache.geronimo.framework/rmi-naming/2.1/car? 
> ServiceModule=org.apache.geronimo.framework/rmi-naming/2.1/ 
> car,j2eeType=Context,name=JavaContext
> at name java:
> 07:09:24,734 INFO  [KernelContextGBean] bound gbean
> org.apache.geronimo.framework/rmi-naming/2.1/car? 
> ServiceModule=org.apache.geronimo.framework/rmi-naming/2.1/ 
> car,j2eeType=Context,name=GeronimoContext
> at name ger:
> 07:09:25,015 INFO  [MailGBean] JavaMail session bound to ger:/ 
> MailSession
> 07:09:26,406 INFO  [KernelContextGBean] bound gbean
> org.apache.geronimo.configs/javamail/2.1/car? 
> ServiceModule=org.apache.geronimo.configs/javamail/2.1/ 
> car,j2eeType=JavaMailResource,name=mail/MailSession
> at name
> org.apache.geronimo.configs/javamail/JavaMailResource/mail/MailSession
> 07:09:26,406 INFO  [KernelContextGBean] bound gbean
> org.apache.geronimo.configs/transaction/2.1/car? 
> ServiceModule=org.apache.geronimo.configs/transaction/2.1/ 
> car,j2eeType=Context,name=ResourceBindings
> at name jca:
> 07:09:28,781 INFO  [KernelContextGBean] bound gbean
> org.apache.geronimo.configs/system-database/2.1/car? 
> J2EEApplication=null,JCAConnectionFactory=SystemDatasource,JCAResource 
> =org.apache.geronimo.configs/system-database/2.1/ 
> car,ResourceAdapter=org.apache.geronimo.configs/system-database/2.1/ 
> car,ResourceAdapterModule=org.apache.geronimo.configs/system- 
> database/2.1/ 
> car,j2eeType=JCAManagedConnectionFactory,name=SystemDatasource
> at name
> org.apache.geronimo.configs/system-database/ 
> JCAManagedConnectionFactory/SystemDatasource
> 07:09:29,703 INFO  [KernelContextGBean] bound gbean
> org.apache.geronimo.configs/system-database/2.1/car? 
> J2EEApplication=null,JCAConnectionFactory=NoTxDatasource,JCAResource=o 
> rg.apache.geronimo.configs/system-database/2.1/ 
> car,ResourceAdapter=org.apache.geronimo.configs/system-database/2.1/ 
> car,ResourceAdapterModule=org.apache.geronimo.configs/system- 
> database/2.1/ 
> car,j2eeType=JCAManagedConnectionFactory,name=NoTxDatasource
> at name
> org.apache.geronimo.configs/system-database/ 
> JCAManagedConnectionFactory/NoTxDatasource
> 07:09:30,171 INFO  [KernelContextGBean] bound gbean
> org.apache.geronimo.plugins/liferay-derby/1.0-SNAPSHOT/car? 
> J2EEApplication=null,JCAConnectionFactory=jdbc/ 
> LiferayPool,JCAResource=org.apache.geronimo.plugins/liferay-derby/ 
> 1.0-SNAPSHOT/car,ResourceAdapter=org.apache.geronimo.plugins/ 
> liferay-derby/1.0-SNAPSHOT/ 
> car,ResourceAdapterModule=org.apache.geronimo.plugins/liferay-derby/ 
> 1.0-SNAPSHOT/car,j2eeType=JCAManagedConnectionFactory,name=jdbc/ 
> LiferayPool
> at name
> org.apache.geronimo.plugins/liferay-derby/ 
> JCAManagedConnectionFactory/jdbc/LiferayPool
> 07:09:33,562 INFO  [KernelContextGBean] bound gbean
> org.apache.geronimo.configs/activemq-ra/2.1/car? 
> J2EEApplication=null,JCAConnectionFactory=DefaultActiveMQConnectionFac 
> tory,JCAResource=org.apache.geronimo.configs/activemq-ra/2.1/ 
> car,ResourceAdapter=org.apache.geronimo.configs/activemq-ra/2.1/ 
> car,ResourceAdapterModule=org.apache.geronimo.configs/activemq-ra/ 
> 2.1/ 
> car,j2eeType=JCAManagedConnectionFactory,name=DefaultActiveMQConnectio 
> nFactory
> at name
> org.apache.geronimo.configs/activemq-ra/JCAManagedConnectionFactory/ 
> DefaultActiveMQConnectionFactory
> 07:09:33,578 INFO  [KernelContextGBean] bound gbean
> org.apache.geronimo.configs/activemq-ra/2.1/car? 
> J2EEApplication=null,JCAResource=org.apache.geronimo.configs/ 
> activemq-ra/2.1/car,ResourceAdapter=org.apache.geronimo.configs/ 
> activemq-ra/2.1/ 
> car,ResourceAdapterModule=org.apache.geronimo.configs/activemq-ra/ 
> 2.1/car,j2eeType=JCAAdminObject,name=MDBTransferBeanOutQueue
> at name
> org.apache.geronimo.configs/activemq-ra/JCAAdminObject/ 
> MDBTransferBeanOutQueue
> 07:09:33,578 INFO  [KernelContextGBean] bound gbean
> org.apache.geronimo.configs/activemq-ra/2.1/car? 
> J2EEApplication=null,JCAResource=org.apache.geronimo.configs/ 
> activemq-ra/2.1/car,ResourceAdapter=org.apache.geronimo.configs/ 
> activemq-ra/2.1/ 
> car,ResourceAdapterModule=org.apache.geronimo.configs/activemq-ra/ 
> 2.1/car,j2eeType=JCAAdminObject,name=SendReceiveQueue
> at name
> org.apache.geronimo.configs/activemq-ra/JCAAdminObject/ 
> SendReceiveQueue
> 07:09:33,937 INFO  [log] Logging to
> org.slf4j.impl.JCLLoggerAdapter(org.mortbay.log) via
> org.mortbay.log.Slf4jLog
> 07:09:33,937 INFO  [log] jetty-6.1.7
> 07:09:34,000 INFO  [log] Opened
> D:\Geronimo\geronimo-jetty-liferay-1.0-SNAPSHOT\var\log 
> \jetty_2008_03_13.log
> 07:09:34,312 INFO  [log] Started SelectChannelConnector@0.0.0.0:8080
> 07:09:34,328 INFO  [log] AJP13 is not a secure protocol. Please  
> protect port
> 8009
> 07:09:34,328 INFO  [log] Started Ajp13SocketConnector@0.0.0.0:8009
> 07:09:34,812 INFO  [log] Started
> GeronimoSelectChannelSSLListener@0.0.0.0:8443
> 07:09:42,000 ERROR [log] failed Secure MainServlet Filter
> java.lang.ExceptionInInitializerError
> 	at
> com.liferay.portal.velocity.LiferayResourceCache.get 
> (LiferayResourceCache.java:43)
> 	at
> org.apache.velocity.runtime.resource.ResourceManagerImpl.getResource 
> (ResourceManagerImpl.java:288)
> 	at
> org.apache.velocity.runtime.RuntimeInstance.getTemplate 
> (RuntimeInstance.java:1102)
> 	at
> org.apache.velocity.runtime.RuntimeInstance.getTemplate 
> (RuntimeInstance.java:1077)
> 	at
> org.apache.velocity.runtime.VelocimacroFactory.initVelocimacro 
> (VelocimacroFactory.java:196)
> 	at
> org.apache.velocity.runtime.RuntimeInstance.init 
> (RuntimeInstance.java:251)
> 	at
> org.apache.velocity.runtime.RuntimeSingleton.init 
> (RuntimeSingleton.java:113)
> 	at org.apache.velocity.app.Velocity.init(Velocity.java:83)
> 	at com.liferay.portal.events.InitAction.run(InitAction.java:210)
> 	at com.liferay.portal.util.InitUtil.init(InitUtil.java:40)
> 	at com.liferay.portal.util.PropsUtil.<clinit>(PropsUtil.java:41)
> 	at com.liferay.filters.secure.SecureFilter.init(SecureFilter.java:73)
> 	at org.mortbay.jetty.servlet.FilterHolder.doStart 
> (FilterHolder.java:97)
> 	at
> org.apache.geronimo.jetty6.JettyFilterHolder 
> $InternalFilterHolder.internalDoStart(JettyFilterHolder.java:114)
> 	at
> org.apache.geronimo.jetty6.JettyFilterHolder 
> $InternalFilterHolder.access$100(JettyFilterHolder.java:70)
> 	at
> org.apache.geronimo.jetty6.JettyFilterHolder$InternalFilterHolder 
> $2.lifecycleMethod(JettyFilterHolder.java:107)
> 	at
> org.apache.geronimo.jetty6.handler.AbstractImmutableHandler.lifecycleC 
> ommand(AbstractImmutableHandler.java:62)
> 	at
> org.apache.geronimo.jetty6.handler.ThreadClassloaderHandler.lifecycleC 
> ommand(ThreadClassloaderHandler.java:57)
> 	at
> org.apache.geronimo.jetty6.handler.AbstractImmutableHandler.lifecycleC 
> ommand(AbstractImmutableHandler.java:60)
> 	at
> org.apache.geronimo.jetty6.handler.InstanceContextHandler.lifecycleCom 
> mand(InstanceContextHandler.java:81)
> 	at
> org.apache.geronimo.jetty6.handler.AbstractImmutableHandler.lifecycleC 
> ommand(AbstractImmutableHandler.java:60)
> 	at
> org.apache.geronimo.jetty6.handler.UserTransactionHandler.lifecycleCom 
> mand(UserTransactionHandler.java:63)
> 	at
> org.apache.geronimo.jetty6.handler.AbstractImmutableHandler.lifecycleC 
> ommand(AbstractImmutableHandler.java:60)
> 	at
> org.apache.geronimo.jetty6.handler.ComponentContextHandler.lifecycleCo 
> mmand(ComponentContextHandler.java:57)
> 	at
> org.apache.geronimo.jetty6.JettyFilterHolder 
> $InternalFilterHolder.doStart(JettyFilterHolder.java:110)
> 	at org.mortbay.component.AbstractLifeCycle.start 
> (AbstractLifeCycle.java:40)
> 	at
> org.apache.geronimo.jetty6.JettyFilterHolder.doStart 
> (JettyFilterHolder.java:55)
> 	at
> org.apache.geronimo.gbean.runtime.GBeanInstance.createInstance 
> (GBeanInstance.java:998)
> 	at
> org.apache.geronimo.gbean.runtime.GBeanInstanceState.attemptFullStart( 
> GBeanInstanceState.java:268)
> 	at
> org.apache.geronimo.gbean.runtime.GBeanInstanceState.start 
> (GBeanInstanceState.java:102)
> 	at
> org.apache.geronimo.gbean.runtime.GBeanInstance.start 
> (GBeanInstance.java:541)
> 	at
> org.apache.geronimo.gbean.runtime.GBeanDependency.attemptFullStart 
> (GBeanDependency.java:111)
> 	at
> org.apache.geronimo.gbean.runtime.GBeanDependency.addTarget 
> (GBeanDependency.java:146)
> 	at
> org.apache.geronimo.gbean.runtime.GBeanDependency$1.running 
> (GBeanDependency.java:120)
> 	at
> org.apache.geronimo.kernel.basic.BasicLifecycleMonitor.fireRunningEven 
> t(BasicLifecycleMonitor.java:176)
> 	at
> org.apache.geronimo.kernel.basic.BasicLifecycleMonitor.access$300 
> (BasicLifecycleMonitor.java:44)
> 	at
> org.apache.geronimo.kernel.basic.BasicLifecycleMonitor 
> $RawLifecycleBroadcaster.fireRunningEvent 
> (BasicLifecycleMonitor.java:254)
> 	at
> org.apache.geronimo.gbean.runtime.GBeanInstanceState.attemptFullStart( 
> GBeanInstanceState.java:294)
> 	at
> org.apache.geronimo.gbean.runtime.GBeanInstanceState.start 
> (GBeanInstanceState.java:102)
> 	at
> org.apache.geronimo.gbean.runtime.GBeanInstance.start 
> (GBeanInstance.java:541)
> 	at
> org.apache.geronimo.gbean.runtime.GBeanDependency.attemptFullStart 
> (GBeanDependency.java:111)
> 	at
> org.apache.geronimo.gbean.runtime.GBeanDependency.addTarget 
> (GBeanDependency.java:146)
> 	at
> org.apache.geronimo.gbean.runtime.GBeanDependency$1.running 
> (GBeanDependency.java:120)
> 	at
> org.apache.geronimo.kernel.basic.BasicLifecycleMonitor.fireRunningEven 
> t(BasicLifecycleMonitor.java:176)
> 	at
> org.apache.geronimo.kernel.basic.BasicLifecycleMonitor.access$300 
> (BasicLifecycleMonitor.java:44)
> 	at
> org.apache.geronimo.kernel.basic.BasicLifecycleMonitor 
> $RawLifecycleBroadcaster.fireRunningEvent 
> (BasicLifecycleMonitor.java:254)
> 	at
> org.apache.geronimo.gbean.runtime.GBeanInstanceState.attemptFullStart( 
> GBeanInstanceState.java:294)
> 	at
> org.apache.geronimo.gbean.runtime.GBeanInstanceState.start 
> (GBeanInstanceState.java:102)
> 	at
> org.apache.geronimo.gbean.runtime.GBeanInstanceState.startRecursive 
> (GBeanInstanceState.java:124)
> 	at
> org.apache.geronimo.gbean.runtime.GBeanInstance.startRecursive 
> (GBeanInstance.java:555)
> 	at
> org.apache.geronimo.kernel.basic.BasicKernel.startRecursiveGBean 
> (BasicKernel.java:379)
> 	at
> org.apache.geronimo.kernel.config.ConfigurationUtil.startConfiguration 
> GBeans(ConfigurationUtil.java:456)
> 	at
> org.apache.geronimo.kernel.config.KernelConfigurationManager.start 
> (KernelConfigurationManager.java:187)
> 	at
> org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConf 
> iguration(SimpleConfigurationManager.java:534)
> 	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:585)
> 	at
> org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke 
> (ReflectionMethodInvoker.java:34)
> 	at
> org.apache.geronimo.gbean.runtime.GBeanOperation.invoke 
> (GBeanOperation.java:124)
> 	at
> org.apache.geronimo.gbean.runtime.GBeanInstance.invoke 
> (GBeanInstance.java:832)
> 	at org.apache.geronimo.gbean.runtime.RawInvoker.invoke 
> (RawInvoker.java:57)
> 	at
> org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke 
> (RawOperationInvoker.java:35)
> 	at
> org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept 
> (ProxyMethodInterceptor.java:96)
> 	at
> org.apache.geronimo.kernel.config.EditableConfigurationManager$ 
> $EnhancerByCGLIB$$70b71ad8.startConfiguration(<generated>)
> 	at
> org.apache.geronimo.system.main.EmbeddedDaemon.doStartup 
> (EmbeddedDaemon.java:156)
> 	at
> org.apache.geronimo.system.main.EmbeddedDaemon.execute 
> (EmbeddedDaemon.java:78)
> 	at
> org.apache.geronimo.kernel.util.MainConfigurationBootstrapper.main 
> (MainConfigurationBootstrapper.java:45)
> 	at org.apache.geronimo.cli.AbstractCLI.executeMain 
> (AbstractCLI.java:67)
> 	at org.apache.geronimo.cli.daemon.DaemonCLI.main(DaemonCLI.java:30)
> Caused by:  
> org.springframework.beans.factory.CannotLoadBeanClassException:
> Error loading class [org.apache.activemq.xbean.BrokerFactoryBean]  
> for bean
> with name 'org.apache.activemq.Broker' defined in class path resource
> [META-INF/activemq-spring-jms.xml]: problem with class file or  
> dependent
> class; nested exception is java.lang.NoClassDefFoundError:
> org/springframework/beans/factory/FactoryBean
> 	at
> org.springframework.beans.factory.support.AbstractBeanFactory.resolveB 
> eanClass(AbstractBeanFactory.java:1163)
> 	at
> <snip>

Mime
View raw message