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 Wed, 27 Feb 2008 22:51:48 GMT
Hi Jim,

I think I have failed to communicate what I'm trying to tell you what  
to do :-)  I've tried to explain in more detail here:

http://cwiki.apache.org/confluence/display/GMOxDOC21/Constructing+a 
+special-purpose+server+using+maven

Two things I'm not trying to do:
1. show you how to deploy liferay on geronimo
2. give you a maven project that builds a liferay plugin and assembly

What I am trying to explain is how you can set up a maven project to  
build liferay plugins and assemblies, with the help of the geronimo  
archetypes for these kind of projects.

It looks to me from what you are describing below that you are trying  
to deploy liferay on geronimo.  Although this might seem easier at  
first it's not automated and is a hard way to get a plugin let alone  
a server.  Automating it using maven records what you do in  
executable form and should provide a simple way to track progress  
towards a working plugin and something to update for new versions of  
liferay and geronimo.

thanks!
david jencks

On Feb 26, 2008, at 11:38 AM, Jim Foster wrote:

>
> Hi David,
>
> My responses are in-line.
>
>
> djencks wrote:
>>
>> I got the archetypes sort of working and made some progress on  
>> liferay.
>>
>> See https://issues.apache.org/jira/browse/GERONIMO-3871 and the  
>> attached
>> jar which contains the projects I came up with and some notes on  
>> what I
>> did.
>>
>> It would be great if you could imitate what I did to see if my
>> instructions make sense. I'm planning to write up something like  
>> this in
>> the docs.
>>
>
>
> Yes, your instructions make sense...up to the archetype part,  
> particularly
> what you mean by "Edit the poms and plans.".
>
> It may just be my lack of familiarity with Geronimo deployment  
> plans, but in
> the command line for the war file, you specify
>
>   groupId=com.liferay
>   artifactId=liferay-portal
>   version=4.4.1
>   packaging=war
>
> ...but looking at your editiion of geronimo-web.xml I see this:
>
>   <moduleId>
>     <groupId>liferay</groupId>
>     <artifactId>liferay-portal-tomcat</artifactId>
>     <version>4.4.1</version>
>     <type>car</type>
>   </moduleId>
>
> Shouldn't these by in sync? (meaning the artifactId)
>
>
> The only thing I don't see covered was the required derby-pool, but  
> I think
> we might agree that Shiva has that well covered.
>
> Eventually, what is really needed is an example of how to use a  
> database
> like MySQL or Oracle so one may use the Liferay database scripts to  
> populate
> it.
>
>
> Here is the writeup of my experience as feedback. Hopefully, this  
> may also
> help your documentation effort.
>
> I would greatly appreciate your comments/corrections.
>
>
> Summary:
> ------------
> I did the same as you outlined in the file
>
>   LIFERAY-README.txt
>
> found in your liferay-sample-project.jar of
>
>   https://issues.apache.org/jira/browse/GERONIMO-3871
>
> except that I used
>
>   Console > Repository => deploy the dependencies (jars)
>   Console > Deploy New => deploy the war
>
> Deployment of the liferay-portal-geronimo-derby-pool-4.4.1.car was  
> via the
> deploy tool.
>
> See Details, below.
>
>
> Result:
> --------
> Security-related issues were resolved if your geronimo-web.xml file is
> modified to point to where j2ee-security lives (see [4] below).
> However, a new problem emerges (see bottom of [4] below).
>
> See Details, below.
>
>
> Details:
> ---------
> The rest of this post details what is summarized above.
> I'm going to be verbose in outlining my steps-taken so as to be  
> sure we are
> staying in sync as to full context/assumptions.
>
> Sections below:
>
>   [1] versions
>   [2] liferay-portal-dependencies-4.4.1.zip
>   [3] liferay-portal-geronimo-derby-pool-4.4.1.car
>   [4] liferay-portal-4.4.1.war
>
> Bottom of post:
>
>   [geronimo-plugin.xml]
>   [geronimo-web.xml]
>
>
> [1] versions
>
>     • Geronimo version: The offical 2.1 release found at
> http://geronimo.apache.org/downloads.html
>     • OS: Windows XP, SP2, current with all hotfixes
>     • Apache version: 2.2.4
>     • Java version: 1.5.0_14
>
>
> [2] liferay-portal-dependencies-4.4.1.zip
>
>     • Used Console > Repository to deploy
>
>         - portal-kernel.jar
>         - portal-service.jar
>
>     • Group/Artifact/Version/Type was specified the same as you  
> stated in
> your LIFERAY-README.txt,
>       so added to the repository were:
>
>         com/liferay/
>                     portal-kernel/4.4.1/portal-kernel-4.4.1.jar
>                     portal-service/4.4.1/portal-service-4.4.1.jar
>
>
> [3] liferay-portal-geronimo-derby-pool-4.4.1.car
>
>     • Downloaded from
> http://sourceforge.net/project/showfiles.php?group_id=49260
>
>     • Extracted contents of the car file
>
>     • Modified the META-INF/geronimo-plugin.xml file as discussed  
> in Shiva's
> post of Feb 22, 2008; 05:14am
>
> (http://www.nabble.com/Geronimo-v2.1-Plan-Creator-%3D%3E-Deploy- 
> Liferay-4.1.1-tt15437773s134.html)
>       File contents is at bottom of this post. See [geronimo- 
> plugin.xml].
>
>     • Regenerated the car file:
>
>         jar -cf liferay-portal-geronimo-derby-pool-4.4.1.car *
>
>     • Deployed that car file via the command line:
>
>         deploy --user system --password manager install-plugin
> liferay-portal-geronimo-derby-pool-4.4.1.car
>
>       Console output was:
>
>
> ---------------------------------------------------------------------- 
> -------------
>         Using GERONIMO_BASE:   D:\Geronimo\geronimo-tomcat6- 
> javaee5-2.1
>         Using GERONIMO_HOME:   D:\Geronimo\geronimo-tomcat6- 
> javaee5-2.1
>         Using GERONIMO_TMPDIR: var  emp
>         Using JRE_HOME:        D:\Java\jdk1.5.0_14\jre
>         Checking for status every 1000ms:
>         Downloading liferay/liferay-pool/4.4.1/car (65%)
>         Starting liferay/liferay-pool/4.4.1/car
>
>         **** Installation Complete!
>         Used existing: org.apache.derby/derby/10.2.2.0/jar
>         Used existing: org.apache.geronimo.configs/system-database// 
> car
>         Used existing: org.apache.geronimo.configs/transaction//car
>         Used existing: org.apache.geronimo.configs/j2ee-server//car
>
>         Downloaded 5687 kB in 5s (1137 kB/s)
>             Now starting liferay/liferay-pool/4.4.1/car...
>             Module liferay/liferay-pool/4.4.1/car is already running
>
> ---------------------------------------------------------------------- 
> -------------
>
>     • Database confirmation
>
>         The above is confirmed via Console> DB Manager.
>
>         The "Database List" contains the db "lportal", and "View  
> Tables"
> shows 109 tables in that database.
>
>
>
> [4] liferay-portal-4.4.1.war
>
>     • Downloaded from
> http://sourceforge.net/project/showfiles.php?group_id=49260
>
>     • Extracted contents of the war file
>
>     • Modified the META-INF/geronimo-web.xml file as discussed in  
> your post
> of Feb 21, 2008; 06:16pm
>
> (http://www.nabble.com/Re%3A-Geronimo-v2.1-Plan-Creator-%3D%3E- 
> Deploy-Liferay-4.4.1-tt15623755s134.html)
>       File contents is at bottom of this post. See [geronimo-web.xml].
>
>     • Observations:
>
>         1)  I note that the namespace specified for
>
>               gbean name="CredentialStore"
> (http://geronimo.apache.org/xml/ns/credentialstore-1.0)
>
>             does not exist.
>
>         2)  I note that you have this in the geronimo-web.xml:
>
>                 <dependency>
>                   <groupId>org.apache.geronimo.configs</groupId>
>                   <artifactId>j2ee-security</artifactId>
>                   <type>car</type>
>                 </dependency>
>
>             ...but I see that j2ee-security does not exist in the  
> configs
> directory.
>
>             It does exist in the framework directory, so shouldn't  
> the above
> be the following?
>
>                 <dependency>
>                   <groupId>org.apache.geronimo.framework</groupId>
>                   <artifactId>j2ee-security</artifactId>
>                   <type>car</type>
>                 </dependency>
>
>             My tests seem to confirm this.
>
>             If using
>
>               <groupId>org.apache.geronimo.configs</groupId>
>
>             one sees this:
>
>               ...
>               Caused by:
> org.apache.geronimo.kernel.repository.MissingDependencyException:  
> Missing
> dependency: org.apache.geronimo.configs/j2ee-security//car
>               at
> org.apache.geronimo.kernel.repository.DefaultArtifactResolver.resolveI 
> nClassLoader(DefaultArtifactResolver.java:111)
>               at
> org.apache.geronimo.kernel.repository.DefaultArtifactResolver.resolveI 
> nClassLoader(DefaultArtifactResolver.java:104)
>               at
> org.apache.geronimo.kernel.config.SimpleConfigurationManager.resolvePa 
> rentIds(SimpleConfigurationManager.java:473)
>               at
> org.apache.geronimo.kernel.config.SimpleConfigurationManager.loadDepth 
> First(SimpleConfigurationManager.java:431)
>               at
> org.apache.geronimo.kernel.config.SimpleConfigurationManager.loadConfi 
> guration(SimpleConfigurationManager.java:296)
>               ... 21 more
>               ...
>
>             Whereas the above error goes away using
>
>               <groupId>org.apache.geronimo.framework</groupId>
>
>
>     • Regenerated the war file:
>
>         jar -cf liferay-portal-4.4.1.war *
>
>     • Deployed that war file via the Console > Deploy New
>
>       Console output was:
>
>
> ---------------------------------------------------------------------- 
> -------------------------------------------
>       Install New Applications
>       Deployment failed:
>       Failed to load servlet class
> com.liferay.portal.kernel.servlet.PortalDelegatorServlet
>       Show full details
>
>       Failed to load servlet class
> com.liferay.portal.kernel.servlet.PortalDelegatorServlet
>       org.apache.geronimo.common.DeploymentException: Failed to  
> load servlet
> class com.liferay.portal.kernel.servlet.PortalDelegatorServlet
>         at
> org.apache.geronimo.jaxws.builder.WARWebServiceFinder.discoverPOJOWebS 
> ervices(WARWebServiceFinder.java:116)
>         at
> org.apache.geronimo.jaxws.builder.WARWebServiceFinder.discoverWebServi 
> ces(WARWebServiceFinder.java:58)
>         at
> org.apache.geronimo.jaxws.builder.JAXWSServiceBuilder.discoverWebServi 
> ces(JAXWSServiceBuilder.java:97)
>         at
> org.apache.geronimo.jaxws.builder.JAXWSServiceBuilder.findWebServices( 
> JAXWSServiceBuilder.java:80)
>         at
> org.apache.geronimo.web25.deployment.AbstractWebModuleBuilder.basicIni 
> tContext(AbstractWebModuleBuilder.java:364)
>         at
> org.apache.geronimo.tomcat.deployment.TomcatModuleBuilder.initContext( 
> TomcatModuleBuilder.java:326)
>         at
> org.apache.geronimo.j2ee.deployment.SwitchingModuleBuilder.initContext 
> (SwitchingModuleBuilder.java:159)
>         at
> org.apache.geronimo.j2ee.deployment.EARConfigBuilder.buildConfiguratio 
> n(EARConfigBuilder.java:595)
>         at org.apache.geronimo.deployment.Deployer.deploy 
> (Deployer.java:254)
>         at org.apache.geronimo.deployment.Deployer.deploy 
> (Deployer.java:133)
>         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:867)
>         at
> org.apache.geronimo.kernel.basic.BasicKernel.invoke 
> (BasicKernel.java:239)
>         at
> org.apache.geronimo.deployment.plugin.local.AbstractDeployCommand.doDe 
> ploy(AbstractDeployCommand.java:116)
>         at
> org.apache.geronimo.deployment.plugin.local.DistributeCommand.run 
> (DistributeCommand.java:61)
>         at java.lang.Thread.run(Thread.java:595)
>       Caused by: java.lang.ClassNotFoundException:
> com.liferay.portal.kernel.servlet.PortalDelegatorServlet in  
> classloader
> liferay/liferay-portal-tomcat/4.4.1/car
>         at
> org.apache.geronimo.kernel.config.MultiParentClassLoader.loadOptimized 
> Class(MultiParentClassLoader.java:428)
>         at
> org.apache.geronimo.kernel.config.MultiParentClassLoader.loadClass 
> (MultiParentClassLoader.java:278)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
>         at
> org.apache.geronimo.jaxws.builder.WARWebServiceFinder.discoverPOJOWebS 
> ervices(WARWebServiceFinder.java:109)
>         ... 20 more
>
> ---------------------------------------------------------------------- 
> -------------------------------------------
>
>
>       I'm stumped on this one.
>
>       If one opens up the portal-kernel-4.4.1.jar that was deployed  
> in step
> [2] above, one sees the PortalDelegatorServlet class right where it's
> supposed to be.
>
>       A classloader problem of some kind, perhaps?
>
>
>
>
> djencks wrote:
>>
>> As noted with the attachment the server won't actually start, it  
>> gets OOM
>> permgen errors even with 512m.
>>
>
> I don't get this far.
>
>
>
> djencks wrote:
>>
>> Where did the geronimo-web.xml come from?  Is it under an asl- 
>> compatible
>> license?  If so I'd like to use this as an example for the docs,
>> especially if we can get it to work.
>>
>> thanks
>> david jencks
>>
>
>
> I see that Peter has already answered these, so I will just add to his
> answers the following:
>
> geronimo-web.xml is but one of several application server  
> configurations in
> the WEB-INF directory of the liferay-portal-4.4.1.war.
> This includes
>
>     geronimo-web.xml
>     jboss-web.xml
>     jonas-web.xml
>     jrun-web.xml
>     resin-web.xml
>     rexip-web.xml
>     sun-web.xml
>     web-borland.xml
>     web-jetty.xml
>     weblogic.xml
>
>
>
> You may view a synopsis of Liferay's business philosophy at
>
>   http://www.liferay.com/web/guest/products/licensing
>
> This includes an explicit statement on the MIT license.
>
>
> Jim
>
>
>
> ******************************
> Attachments referenced above.
>
>   • [geronimo-plugin.xml]
>   • [geronimo-web.xml]
>
>
> ===============
> [geronimo-plugin.xml]
> ===============
> <?xml version="1.0" encoding="UTF-8"?>
> <geronimo-plugin xmlns="http://geronimo.apache.org/xml/ns/ 
> plugins-1.3">
> <name>liferay/liferay-pool/4.4.1/car</name>
> <module-id>liferay/liferay-pool/4.4.1/car</module-id>
> <category>Portal</category>
> <description>Liferay Pool is the JDBC connection pool used by Liferay
> Portal. The pool is backed by an embedded Derby database.</ 
> description>
> <url>http://www.liferay.com</url>
> <author>Liferay, Inc.</author>
> <license osi-approved="true">MIT</license>
>     <plugin-artifact>
>         <module-id>
>             <groupId>liferay</groupId>
>             <artifactId>liferay-pool</artifactId>
>             <version>4.4.1</version>
>             <type>car</type>
>         </module-id>
>         <geronimo-version>2.1</geronimo-version>
>         <jvm-version>1.5</jvm-version>
>         <dependency>
>             <groupId>org.apache.derby</groupId>
>             <artifactId>derby</artifactId>
>             <version>10.2.2.0</version>
>             <type>jar</type>
>         </dependency>
>         <dependency>
>             <groupId>org.apache.geronimo.configs</groupId>
>             <artifactId>system-database</artifactId>
>             <type>car</type>
>         </dependency>
>         <dependency>
>             <groupId>org.apache.geronimo.configs</groupId>
>             <artifactId>transaction</artifactId>
>             <type>car</type>
>         </dependency>
>         <dependency>
>             <groupId>org.apache.geronimo.configs</groupId>
>             <artifactId>j2ee-server</artifactId>
>             <type>car</type>
>         </dependency>
>         <obsoletes>
>             <groupId>liferay</groupId>
>             <artifactId>liferay-pool</artifactId>
>             <type>car</type>
>         </obsoletes>
>     </plugin-artifact>
> </geronimo-plugin>
>
>
>
> ==============
> [geronimo-web.xml]
> ==============
> <?xml version="1.0"?>
> <web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1">
>     <environment>
>         <moduleId>
>             <groupId>liferay</groupId>
>             <artifactId>liferay-portal-tomcat</artifactId>
>             <version>4.4.1</version>
>             <type>car</type>
>         </moduleId>
>         <dependencies>
>             <dependency>
>                 <groupId>org.apache.geronimo.configs</groupId>
>                 <artifactId>j2ee-security</artifactId>
>                 <type>car</type>
>             </dependency>
>             <dependency>
>                 <groupId>org.apache.geronimo.configs</groupId>
>                 <artifactId>j2ee-server</artifactId>
>                 <type>car</type>
>             </dependency>
>             <dependency>
>                 <groupId>org.apache.geronimo.configs</groupId>
>                 <artifactId>javamail</artifactId>
>                 <type>car</type>
>             </dependency>
>             <dependency>
>                 <groupId>org.apache.geronimo.configs</groupId>
>                 <artifactId>sharedlib</artifactId>
>                 <type>car</type>
>             </dependency>
>             <dependency>
>                 <groupId>org.apache.geronimo.modules</groupId>
>                 <artifactId>geronimo-mail</artifactId>
>                 <type>jar</type>
>                 <import>classes</import>
>             </dependency>
>             <dependency>
>                 <groupId>liferay</groupId>
>                 <artifactId>liferay-pool</artifactId>
>                 <type>car</type>
>             </dependency>
> <!--
>             <dependency>
>                 <groupId>liferay</groupId>
>                 <artifactId>portal-kernel</artifactId>
>                 <type>jar</type>
>                 <import>classes</import>
>             </dependency>
>             <dependency>
>                 <groupId>liferay</groupId>
>                 <artifactId>portal-service</artifactId>
>                 <type>jar</type>
>                 <import>classes</import>
>             </dependency>
>             <dependency>
>                 <groupId>portlet-api</groupId>
>                 <artifactId>portlet-api</artifactId>
>                 <type>jar</type>
>                 <import>classes</import>
>             </dependency>
> -->
>         </dependencies>
>         <inverse-classloading />
>     </environment>
>
>     <context-root>/</context-root>
>
>     <security-realm-name>PortalRealm</security-realm-name>
>
>     <security use-context-handler="false"
> xmlns="http://geronimo.apache.org/xml/ns/security-2.0">
>       <default-subject>
>       <realm>PortalRealm</realm>
>       <id>default</id>
>       </default-subject>
>       <role-mappings>
>       <role role-name="users">
>         <principal class="com.liferay.portal.security.jaas.PortalRole"
> name="users" />
>       </role>
>       </role-mappings>
>     </security>
>
>     <!-- if you name the pool jdbc/LiferayPool you can omit this  
> mapping -->
>     <resource-ref>
>         <ref-name>jdbc/LiferayPool</ref-name>
>         <resource-link>LiferayPool</resource-link>
>     </resource-ref>
>
>     <!-- unless you have specific mail configuration I'd suggest  
> you use the
> built in mail/MailSession in the javamail plugin so you can omit this
> mapping -->
>     <resource-ref>
>         <ref-name>mail/MailSession</ref-name>
>         <resource-link>LiferayMailSession</resource-link>
>     </resource-ref>
>
>     <gbean name="CredentialStore"
> class="org.apache.geronimo.security.credentialstore.SimpleCredentialSt 
> oreImpl">
>       <xml-attribute name="credentialStore">
>         <credential-store
> xmlns="http://geronimo.apache.org/xml/ns/credentialstore-1.0">
>           <realm name="PortalRealm">
>             <subject>
>               <id>default</id>
>               <!-- you will have so set up the backing store  
> appropriately
> -->
>               <credential>
>
> <type>org.apache.geronimo.security.credentialstore.NameCallbackHandler 
> </type>
>                 <value>anonymous</value>
>               </credential>
>               <credential>
>
> <type>org.apache.geronimo.security.credentialstore.PasswordCallbackHan 
> dler</type>
>                 <value>anonymous</value>
>               </credential>
>             </subject>
>           </realm>
>         </credential-store>
>       </xml-attribute>
>     </gbean>
>
>     <gbean name="LiferayMailSession"
> class="org.apache.geronimo.mail.MailGBean">
>         <attribute name="transportProtocol">smtp</attribute>
>         <attribute name="host">localhost</attribute>
>     </gbean>
>
>     <gbean name="PortalRealm"
> class="org.apache.geronimo.security.realm.GenericSecurityRealm">
>         <attribute name="realmName">PortalRealm</attribute>
>         <reference name="ServerInfo">
>             <name>ServerInfo</name>
>         </reference>
> <!--
>         <reference name="LoginService">
>             <name>JaasLoginService</name>
>         </reference>
> -->
>         <xml-reference name="LoginModuleConfiguration">
>             <log:login-config
> xmlns:log="http://geronimo.apache.org/xml/ns/loginconfig-2.0">
>                 <log:login-module control-flag="REQUIRED"
> wrap-principals="false">
>
> <log:login-domain-name>PortalRealm</log:login-domain-name>
>
> <log:login-module- 
> class>com.liferay.portal.security.jaas.ext.tomcat.PortalLoginModule</l 
> og:login-module-class>
>                 </log:login-module>
>             </log:login-config>
>         </xml-reference>
>     </gbean>
> </web-app>
>
> -- 
> View this message in context: http://www.nabble.com/Geronimo-v2.1- 
> Plan-Creator-%3D%3E-Deploy-Liferay-4.1.1-tp15437773s134p15673907.html
> Sent from the Apache Geronimo - Users mailing list archive at  
> Nabble.com.
>


Mime
View raw message