On Fri, Feb 22, 2008 at 5:44 PM, Shiva Kumar H R <[EMAIL PROTECTED]> wrote:

>
>
> On Fri, Feb 22, 2008 at 4:59 PM, Shiva Kumar H R <[EMAIL PROTECTED]>
> wrote:
>
> >
> >
> > On Fri, Feb 22, 2008 at 3:46 PM, Peter Petersson <[EMAIL PROTECTED]>
> > wrote:
> >
> > >  Hi Jim
> > >
> > > I assume you are trying to install liferay in geronimo and not just
> > > generate a new plan, with you do not need to, as Shiva have provided you
> > > with one (the geronimo-web.xml).
> > >
> > > Aside from the security dependency issue you have that I hope
> > > **someone else** that are more familiar with the security (dependency)
> > > changes done between G v2.0.2 and v2.1 will help you with, there are a
> > > couple of more things to do:
> > >
> > > As the liferay-portal-geronimo-tomcat car is dependent (if you haven't
> > > changed the geronimo-web.xml regarding the db pool) on the
> > > liferay-portal-geronimo-derby-pool car, so to successfully install the
> > > liferay-portal-geronimo-tomcat car you have to install the derby pool
> > > **before** the liferay-portal-geronimo-tomcat car.
> > >
> > > After a smal tweak of the META-INF/geronimo-plugin.xml included in the
> > > derby-pool car file you should be able to install the db pool by issuing
> > >
> > > deploy --user <user> --password <passoword> install-plugin <derby pool 
> > > car file>
> > >
> > > The geronimo-plugin.xml tweak consist of changing the version tag in
> > > the geronimo-plugin.xml to <version>2.1-SNAPSHOT</version> (omit
> > > -snapshot for released geronimo). The same command (as above) can then be
> > > used on the liferay-portal-geronimo-tomcat car (when the security 
> > > dependency
> > > issue is fixed)
> > >
> >
> > Looks like there is more to it than just that. I have been trying it
> > since yesterday and it is failing with below error:
> >
> > Installation FAILED: A plugin configuration must include one plugin
> > artifact, not 0
> >
>
> Alright this is now solved :) . Update the geronimo-plugin.xml inside
> liferay-portal-geronimo-derby-pool-4.4.1.car with the one attached here.
>
> (The schema for geronimo-plugin.xml has changed and I have updated it
> accordingly by looking at other examples.)
>
> Now let me deploy liferay-portal-4.4.1.war using the plan provided by
> DJencks.
>

I have further tweaked the plan provided by DJencks and attached here.
(Plan changes: updated groupId for j2ee-security and added dependency on
javax.portlet/portlet-api//jar - the latter one is required as deploy was
complaining about not finding javax.portlet.RenderResponse).

Deploy was also complaining about
com.liferay.portal.kernel.servlet.PortalDelegatorServlet class not being
there, so put portal-kernel.jar & portal-service.jar into your into
<GERONIMO_HOME>/var/shared/lib directory and restart G to pick up those
JARs.

Deploy of liferay-portal-4.4.1.war is successful! However it fails to start
with following exceptions:

18:58:26,170 WARN  [ConfigurationUtil] Could not load gbean
liferay/liferay-port
al-tomcat/4.4.1/car?J2EEApplication=null,j2eeType=WebModule,name=liferay/liferay
-portal-tomcat/4.4.1/car
org.apache.geronimo.gbean.InvalidConfigurationException: Getter return type
in w
rong classloader: type: interface javax.management.j2ee.statistics.Statswanted
in classloader: [org.apache.geronimo.kernel.classloader.JarFileClassLoaderid=li
feray/liferay-portal-tomcat/4.4.1/car] actual: [
org.apache.geronimo.kernel.class
loader.JarFileClassLoader id=org.apache.geronimo.framework
/jee-specs/2.1/car]
        at org.apache.geronimo.gbean.runtime.GBeanAttribute
.<init>(GBeanAttribut
e.java:241)

-- 
Thanks,
Shiva


> --
> Thanks,
> Shiva
>
>
> > Any idea where is the source for
> > liferay-portal-geronimo-derby-pool-4.4.1.car ?
> >
> >
> > > Maybe this link will be of some help to you even though it is a bit
> > > outdated http://wiki.liferay.com/index.php/Liferay_with_Geronimo
> > >
> > >  regards
> > >   peter petersson
> > >
> > >
> > >
> > > Jim Foster wrote:
> > >
> > > Shiva Kumar H R wrote:
> > >
> > >
> > >  There are two problems, both in Plan Creator feature:
> > > 1) Error message/Java Exceptions are suppressed by Plan Creator code and
> > > not
> > > shown to the user at all :-(
> > >
> > > With liferay-portal-4.4.1.war, when I ran Geronimo in debug mode and
> > > remote
> > > connected via Eclipse (with a break point put at the beginning 
> > > oforg.apache.geronimo.console.configcreator.JSR88_Util.parseWarReferences()
> > > function inside "plancreator-portlets" module), I found that we are
> > > getting
> > > following exception:
> > > org.apache.geronimo.common.DeploymentException: AbstractWebModuleBuilder:
> > > Could not load servlet class: com.liferay.portal.servlet.MainServlet
> > >
> > > Instead of showing this error on Console, plan creator is currently
> > > suppressing it in an empty catch() block.
> > > *GERONIMO-3850<https://issues.apache.org/jira/browse/GERONIMO-3850> 
> > > <https://issues.apache.org/jira/browse/GERONIMO-3850>
> > > *is opened for this.
> > >
> > > 2) Secondly, I see that the class it is complaining 
> > > "com.liferay.portal.servlet.MainServlet" *does* exist, but inside a
> > > compressed jar ("portal-impl.jar") in WEB-INF/lib directory of WAR. Plan
> > > Creator has a current limitation :-( in resolving such classes. *
> > > GERONIMO-3851 <https://issues.apache.org/jira/browse/GERONIMO-3851> 
> > > <https://issues.apache.org/jira/browse/GERONIMO-3851> *is
> > > opened for this.
> > >
> > > Due to these bugs/limitations, I am sorry to say that you will again have
> > > to
> > > create geronimo-web.xml by hand. I found one "geronimo-web.xml" 
> > > insideliferay-portal-4.4.1.war itself. I have removed non-existing 
> > > dependencies
> > > from it and attached it in this mail. Please see if it works. (I guess it
> > > requires some pre-requisite db-pools to be deployed before the WAR can be
> > > deployed). Hope it helps.
> > >
> > > ...
> > >
> > >
> > >
> > >
> > >  Hi Shiva,
> > >
> > > Is there any new word on the origins of the security configuration errors 
> > > we
> > > were seeing?
> > >
> > > I have spent a good deal of time this week reading everything I could get 
> > > my
> > > hands on, including a healthy chunk of the 120 Geronimo articles up at 
> > > IBM's
> > > developerworks.
> > > (http://www.ibm.com/developerworks/views/opensource/libraryview.jsp?end_no=120&lcl_sort_order=asc&type_by=All+Types&sort_order=asc&start_no=1&show_all=true&sort_by=Date&search_by=&topic_by=Geronimo&search_flag=&show_abstract=true).
> > >
> > > However, the most recent I could find that seemed relevant to this issue 
> > > was
> > > on the wiki:
> > > http://cwiki.apache.org/GMOxDOC21/installation-and-configuration.html
> > >
> > > However, this is an installation document, and provides little in the way 
> > > of
> > > debugging guidelines, and I  am only now just far enough along in wrapping
> > > my head around all the technologies that make up Geronimo to get myself in
> > > trouble.
> > >
> > > Suggestions?
> > >
> > >
> > > Once past this, I would like your advise on how to bring up to date the
> > > Liferay-provided .car file for the derby pool. I looked at its contents, 
> > > and
> > > I see that they are clearly wrong (my guess is that they were written 
> > > forv1.1), but I am not quite sure how to go about fixing it so as to be in
> > > alignment with v2.1
> > >
> > > ...one step at a time though...first the security issue.
> > >
> > >
> > > Thank you for your time, patience, and advise.
> > >
> > > Jim
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> >
> >
> > --
> > Thanks,
> > Shiva
>
>
>
>
<?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.framework</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>javax.portlet</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.SimpleCredentialStoreImpl">
        <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.PasswordCallbackHandler</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</log:login-module-class>
				</log:login-module>
			</log:login-config>
		</xml-reference>
	</gbean>
</web-app>

Reply via email to