geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jleonar <jleo...@gmail.com>
Subject Re: Geronimo with Liferay library conflict
Date Mon, 07 Jan 2008 16:01:44 GMT

I appreciate all the help.

That got it working.



Jarek Gawor-2 wrote:
> 
> The <hidden-classes/> element must be specified after the
> <dependencies/> element.
> 
> Jarek
> 
> On Jan 7, 2008 9:51 AM, jleonar <jleonar@gmail.com> wrote:
>>
>> Thanks for that little tidbit.  That solved my dependency problems.
>>
>> Now I am getting a stacktrace when trying to deploy the application using
>> the <hidden-classes> tag to hide xerces.  This is the stacktrace I get.
>>
>> 14:46:41,000 ERROR [Hot Deployer] Unable to deploy: xml problem for web
>> app
>> .
>> org.apache.geronimo.common.DeploymentException: xml problem for web app .
>>         at
>> org.apache.geronimo.tomcat.deployment.TomcatModuleBuilder.getTomcatWe
>> bApp(TomcatModuleBuilder.java:234)
>>         at
>> org.apache.geronimo.tomcat.deployment.TomcatModuleBuilder.createModul
>> e(TomcatModuleBuilder.java:158)
>>         at
>> org.apache.geronimo.web.deployment.AbstractWebModuleBuilder.createMod
>> ule(AbstractWebModuleBuilder.java:121)
>>
>>
>>
>> Caused by: org.apache.xmlbeans.XmlException: Invalid deployment
>> descriptor:
>> [err
>> or: cvc-complex-type.2.4a: Expected elements
>> 'non-overridable-classes@http://ger
>> onimo.apache.org/xml/ns/deployment-1.1
>> inverse-classloading@http://geronimo.apac
>> he.org/xml/ns/deployment-1.1
>> suppress-default-environment@http://geronimo.apache
>> .org/xml/ns/deployment-1.1' instead of
>> 'dependencies@http://geronimo.apache.org/
>> xml/ns/deployment-1.1' here in element
>> environment@http://geronimo.apache.org/xm
>> l/ns/deployment-1.1]
>> Descriptor: <xml-fragment
>> xmlns:dep="http://geronimo.apache.org/xml/ns/deploymen
>> t-1.1" xmlns:tom="http://geronimo.apache.org/xml/ns/j2ee/web/tomcat-1.1"
>> xmlns:n
>> am="http://geronimo.apache.org/xml/ns/naming-1.1"
>> xmlns:sec="http://geronimo.apa
>> che.org/xml/ns/security-1.1">
>>   <dep:environment>
>>     <dep:moduleId>
>>       <dep:groupId>liferay</dep:groupId>
>>       <dep:artifactId>liferay-portal-tomcat</dep:artifactId>
>>       <dep:version>4.3.5</dep:version>
>>       <dep:type>car</dep:type>
>>     </dep:moduleId>
>>     <dep:hidden-classes>
>>       <dep:filter>org.apache.xerces</dep:filter>
>>     </dep:hidden-classes>
>>     <dep:dependencies>
>>       <dep:dependency>
>>         <dep:groupId>geronimo</dep:groupId>
>>         <dep:artifactId>j2ee-server</dep:artifactId>
>>         <dep:type>car</dep:type>
>>       </dep:dependency>
>>       <dep:dependency>
>>         <dep:groupId>geronimo</dep:groupId>
>>         <dep:artifactId>j2ee-security</dep:artifactId>
>>         <dep:type>car</dep:type>
>>       </dep:dependency>
>>       <dep:dependency>
>>         <dep:groupId>geronimo</dep:groupId>
>>         <dep:artifactId>rmi-naming</dep:artifactId>
>>         <dep:type>car</dep:type>
>>       </dep:dependency>
>>       <dep:dependency>
>>         <dep:groupId>geronimo</dep:groupId>
>>         <dep:artifactId>geronimo-mail</dep:artifactId>
>>         <dep:type>jar</dep:type>
>>         <dep:import>classes</dep:import>
>>       </dep:dependency>
>>       <dep:dependency>
>>         <dep:groupId>org.apache.geronimo.specs</dep:groupId>
>>         <dep:artifactId>geronimo-javamail_1.3.1_spec</dep:artifactId>
>>         <dep:type>jar</dep:type>
>>         <dep:import>classes</dep:import>
>>       </dep:dependency>
>>       <dep:dependency>
>>         <dep:artifactId>sharedlib</dep:artifactId>
>>       </dep:dependency>
>>       <dep:dependency>
>>         <dep:groupId>liferay</dep:groupId>
>>         <dep:artifactId>liferay-pool</dep:artifactId>
>>         <dep:type>car</dep:type>
>>       </dep:dependency>
>>     </dep:dependencies>
>>   </dep:environment>
>>   <tom:context-root>/</tom:context-root>
>>   <nam:resource-ref>
>>     <nam:ref-name>jdbc/LiferayPool</nam:ref-name>
>>     <nam:resource-link>LiferayPool</nam:resource-link>
>>   </nam:resource-ref>
>>   <nam:resource-ref>
>>     <nam:ref-name>mail/MailSession</nam:ref-name>
>>     <nam:resource-link>LiferayMailSession</nam:resource-link>
>>   </nam:resource-ref>
>>   <tom:security-realm-name>PortalRealm</tom:security-realm-name>
>>   <sec:security>
>>     <sec:default-principal>
>>       <sec:principal name="anonymous"
>> class="com.liferay.portal.security.jaas.Po
>> rtalPrincipal"/>
>>     </sec:default-principal>
>>     <sec:role-mappings>
>>       <sec:role role-name="users">
>>         <sec:principal
>> class="com.liferay.portal.security.jaas.PortalRole"
>> name=
>> "users"/>
>>       </sec:role>
>>     </sec:role-mappings>
>>   </sec:security>
>>   <dep:gbean name="LiferayMailSession"
>> class="org.apache.geronimo.mail.MailGBean
>> ">
>>     <dep:attribute name="transportProtocol">smtp</dep:attribute>
>>     <dep:attribute name="host">localhost</dep:attribute>
>>   </dep:gbean>
>>   <dep:gbean name="PortalRealm"
>> class="org.apache.geronimo.security.realm.Generi
>> cSecurityRealm">
>>     <dep:attribute name="realmName">PortalRealm</dep:attribute>
>>     <dep:reference name="ServerInfo">
>>       <dep:name>ServerInfo</dep:name>
>>     </dep:reference>
>>     <dep:reference name="LoginService">
>>       <dep:name>JaasLoginService</dep:name>
>>     </dep:reference>
>>     <dep:xml-reference name="LoginModuleConfiguration">
>>       <log:login-config
>> xmlns:log="http://geronimo.apache.org/xml/ns/loginconfig
>> -1.1">
>>         <log:login-module control-flag="REQUIRED" server-side="true"
>> wrap-princi
>> pals="false">
>>          
>> <log:login-domain-name>PortalRealm-login</log:login-domain-name>
>>
>> <log:login-module-class>com.liferay.portal.security.jaas.ext.tomcat.Po
>> rtalLoginModule</log:login-module-class>
>>         </log:login-module>
>>       </log:login-config>
>>     </dep:xml-reference>
>>   </dep:gbean>
>> </xml-fragment>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> djencks wrote:
>> >
>> > When geronimo deploys a web app we find all the jars in WEB-INF/lib
>> > and include paths to them in the classloader for the web app.  Adding
>> > more jars later doesn't affect the already-constructed classloader.
>> >
>> > In other words, you would have to redeploy liferay with your jars
>> > included to get them into the web app classloader.
>> >
>> > Hope this helps
>> > david jencks
>> >
>> > On Jan 3, 2008, at 7:13 AM, jleonar wrote:
>> >
>> >>
>> >> Ok I think I will take a step back and fix my earlier issues that
>> >> lead me
>> >> down the path where I am today.
>> >>
>> >> Step one took the liferay geronimo bundle and installed.
>> >>
>> >> Let liferay deploy.  Stopped liferay.
>> >> Now I take my custom liferay code and I put it in the liferay
>> >> repository
>> >> inside the WEB-INF folder including required libraries in the WEB-
>> >> INF/lib
>> >> folder.
>> >>
>> >> Start liferay and I get:
>> >> java.lang.NoClassDefFoundError: org/opensaml/SAMLSOAPHTTPBinding
>> >> $HTTPHook
>> >>      at java.lang.Class.getDeclaredConstructors0(Native Method)
>> >>      at
>> java.lang.Class.privateGetDeclaredConstructors(Class.java:2357)
>> >>      at java.lang.Class.getConstructor0(Class.java:2671)
>> >>      at java.lang.Class.newInstance0(Class.java:321)
>> >>      at java.lang.Class.newInstance(Class.java:303)
>> >>      at
>> >> org.apache.catalina.core.ApplicationFilterConfig.getFilter
>> >> (ApplicationFilterConfig.java:210)
>> >>      at
>> >> org.apache.catalina.core.ApplicationFilterConfig.setFilterDef
>> >> (ApplicationFilterConfig.java:304)
>> >>      at
>> >> org.apache.catalina.core.ApplicationFilterConfig.<init>
>> >> (ApplicationFilterConfig.java:77)
>> >>      at
>> >> org.apache.catalina.core.StandardContext.filterStart
>> >> (StandardContext.java:3598)
>> >>      at
>> >> org.apache.catalina.core.StandardContext.start(StandardContext.java:
>> >> 4168)
>> >>
>> >> The opensaml jar is in the WEB-INF/lib folder.  The only way I got
>> >> this
>> >> error to go away was by moving all the dependencies for my custom
>> >> code to
>> >> the sharedlib folder.
>> >>
>> >> I think once I get geronimo to load the WEB-INF/lib dependencies
>> >> correctly,
>> >> I will be able to use the inverse-classloading to resolve my other
>> >> issue.
>> >>
>> >> So why isn't the classloader loading the jars in the WEB-INF/lib
>> >> folder
>> >> inside the liferay repository?
>> >>
>> >>
>> >>
>> >>
>> >> Jacek Laskowski wrote:
>> >>>
>> >>> On Dec 28, 2007 1:40 PM, jleonar <jleonar@gmail.com> wrote:
>> >>>
>> >>>> I have some custom code deployed within Liferay(4.3.x) running on
>> >>>> Geronimo
>> >>>> 1.1
>> >>>>
>> >>>> The custom code uses xercesImpl-2.8.0 or higher.  Geronimo 1.1 uses
>> >>>> xercesImpl-2.6.2.  So my code breaks because it is always using
the
>> >>>> xercesImpl-2.6.2 instead of the xercesImpl-2.8.0 jar that I have
>> >>>> in the
>> >>>> sharedlib folder.
>> >>>
>> >>>>     <hidden-classes>
>> >>>>         <filter>org.apache.xerces</filter>
>> >>>>     </hidden-classes>
>> >>>>                 <dependencies>
>> >>> ...
>> >>>>                         <dependency>
>> >>>>                                 <artifactId>sharedlib</artifactId>
>> >>>>                         </dependency>
>> >>>
>> >>> Can you try out <inverse-classloading /> instead? Is xerces in
>> >>> WEB-INF/lib directory of Liferay? What's the stack trace when
>> >>> Geronimo's Xerces hides the proper classes?
>> >>>
>> >>> Jacek
>> >>>
>> >>> --
>> >>> Jacek Laskowski
>> >>> http://www.JacekLaskowski.pl
>> >>>
>> >>>
>> >>
>> >> --
>> >> View this message in context: http://www.nabble.com/Geronimo-with-
>> >> Liferay-library-conflict-tp14525371s134p14598562.html
>> >> Sent from the Apache Geronimo - Users mailing list archive at
>> >> Nabble.com.
>> >>
>> >
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Geronimo-with-Liferay-library-conflict-tp14525371s134p14667577.html
>> Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/Geronimo-with-Liferay-library-conflict-tp14525371s134p14669083.html
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.


Mime
View raw message