You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@geronimo.apache.org by MarcoLaponder <ma...@kewill.com> on 2008/10/21 10:34:35 UTC
context-root in ear deployment plan
Hi All,
I am trying to accomplish the following: I have an ear file which containts
a web archive. I want to determine the context root at deployment time. I
was considering to specify this in the deployment plan but this doesn’t
work. The deployment plan I use is:
<?xml version="1.0" encoding="utf-8"?>
<application application-name="HelloWorldEar"
xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-1.1"
xmlns:app="http://geronimo.apache.org/xml/ns/j2ee/application-1.1"
xmlns:sec="http://geronimo.apache.org/xml/ns/security-1.1"
xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.1">
<!—
Deleted some dependencies and security info
-->
<module>
<web>
<web-uri>testit.war</web-uri>
<context-root>test</context-root>
</web>
</module>
</application>
But this plan gives an error when deploying. Is it not possible to do this
or am I doing something wrong ? The errors I get are:
C:\j5ee\geronimo-jetty6-javaee5-2.1.1\var\temp\geronimo-application.xml:36:4:
error: cvc-complex-type.2.4b: Element not allowed:
web-uri@http://geronimo.apache.org/xml/ns/j2ee/application-2.0 in element
web@http://geronimo.apache.org/xml/ns/j2ee/application-2.0
C:\j5ee\geronimo-jetty6-javaee5-2.1.1\var\temp\geronimo-application.xml:37:4:
error: cvc-complex-type.2.4b: Element not allowed:
context-root@http://geronimo.apache.org/xml/ns/j2ee/application-2.0 in
element web@http://geronimo.apache.org/xml/ns/j2ee/application-2.0
C:\j5ee\geronimo-jetty6-javaee5-2.1.1\var\temp\geronimo-application.xml:37:4:
error: cvc-complex-type.2.4c: Expected element
'alt-dd@http://geronimo.apache.org/xml/ns/j2ee/application-2.0' before the
end of the content in element
module@http://geronimo.apache.org/xml/ns/j2ee/application-2.0
Any help will be appreciated.
Kind regards,
Marco
--
View this message in context: http://www.nabble.com/context-root-in-ear--deployment-plan-tp20085767s134p20085767.html
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.
RE: web module and login gbean in deployment plan of ear
Posted by Marco Laponder <ma...@kewill.com>.
Feeling stupid and ashamed. Thanks.
Kind regards,
Marco
-----Oorspronkelijk bericht-----
Van: David Jencks [mailto:david_jencks@yahoo.com]
Verzonden: woensdag 29 oktober 2008 17:48
Aan: user@geronimo.apache.org
Onderwerp: Re: web module and login gbean in deployment plan of ear
Put the gbean after the modules
david jencks
On Oct 29, 2008, at 7:39 AM, Marco Laponder wrote:
> Hi All,
>
> I am busy with deploying an ear. I have bean able to add my login
> module
> configuration within the plan, and I have bean able to specify a web
> module with context root in the plan. But when I have a login module
> as
> well as a web module specified I get the following error when
> deploying:
>
> error: cvc-complex-type.2.4a: Expected element
> 'service@http://geronimo.apache.org/xml/ns/deployment-1.2' instead
> of 'module@http://geronimo.apache.org/xml/ns/j2ee/application-2.0'
> here in element
> application@http://geronimo.apache.org/xml/ns/j2ee/application-2.0
>
> and my plan is:
>
> <?xml version="1.0" encoding="utf-8"?>
> <application application-name="JavagatorEar"
> xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-2.0"
>
> xmlns:app="http://geronimo.apache.org/xml/ns/j2ee/application-2.0"
> xmlns:sec="http://geronimo.apache.org/xml/ns/security-2.0"
> xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.2">
> <sys:environment>
> <sys:moduleId>
> <sys:groupId>com.kewill.interchain</sys:groupId>
> <sys:artifactId>javagator</sys:artifactId>
> <sys:version>5.7-SNAPSHOT</sys:version>
> <sys:type>car</sys:type>
> </sys:moduleId>
> <sys:dependencies>
> <dependency>
> <groupId>org.apache.geronimo.framework</groupId>
> <artifactId>j2ee-security</artifactId>
> <type>car</type>
> </dependency>
> </sys:dependencies>
> <sys:hidden-classes />
> <sys:non-overridable-classes />
> </sys:environment>
>
> <sec:security>
> <sec:role-mappings>
> <sec:role role-name="manager">
> <sec:realm realm-name="NaviSecurity">
> <sec:principal name="manager"
>
> class
> ="org.apache.geronimo.security.realm.providers.GeronimoGroupPrincip
> al" />
> </sec:realm>
> </sec:role>
> </sec:role-mappings>
> </sec:security>
>
> <sys:gbean name="NaviSecurity"
> class="org.apache.geronimo.security.realm.GenericSecurityRealm"
> xsi:type="dep:gbeanType"
> xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> <attribute name="realmName">NaviSecurity</attribute>
> <reference name="ServerInfo">
> <name>ServerInfo</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>NaviSecurity</log:login-domain-name>
>
> <log:login-module-class>com.kewill.login.JdbcConnectLoginModule</
> log:log
> in-module-class>
> <log:option
> name="configuration">${naviconfig.props}</log:option>
> </log:login-module>
> </log:login-config>
> </xml-reference>
> </sys:gbean>
>
>
> <module>
> <web>javagator-war-5.7.0-SNAPSHOT.war
> </web>
> <web-app
> xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1">
> <context-root>/navi</context-root>
>
> <security-realm-name>NaviSecurity</security-realm-name>
> </web-app>
> </module>
>
>
> </application>
>
> Can anybody give me some indication what I am doing wrong ?
>
> Kind regards,
> Marco Laponder
>
Re: web module and login gbean in deployment plan of ear
Posted by David Jencks <da...@yahoo.com>.
Put the gbean after the modules
david jencks
On Oct 29, 2008, at 7:39 AM, Marco Laponder wrote:
> Hi All,
>
> I am busy with deploying an ear. I have bean able to add my login
> module
> configuration within the plan, and I have bean able to specify a web
> module with context root in the plan. But when I have a login module
> as
> well as a web module specified I get the following error when
> deploying:
>
> error: cvc-complex-type.2.4a: Expected element
> 'service@http://geronimo.apache.org/xml/ns/deployment-1.2' instead
> of 'module@http://geronimo.apache.org/xml/ns/j2ee/application-2.0'
> here in element
> application@http://geronimo.apache.org/xml/ns/j2ee/application-2.0
>
> and my plan is:
>
> <?xml version="1.0" encoding="utf-8"?>
> <application application-name="JavagatorEar"
> xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-2.0"
>
> xmlns:app="http://geronimo.apache.org/xml/ns/j2ee/application-2.0"
> xmlns:sec="http://geronimo.apache.org/xml/ns/security-2.0"
> xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.2">
> <sys:environment>
> <sys:moduleId>
> <sys:groupId>com.kewill.interchain</sys:groupId>
> <sys:artifactId>javagator</sys:artifactId>
> <sys:version>5.7-SNAPSHOT</sys:version>
> <sys:type>car</sys:type>
> </sys:moduleId>
> <sys:dependencies>
> <dependency>
> <groupId>org.apache.geronimo.framework</groupId>
> <artifactId>j2ee-security</artifactId>
> <type>car</type>
> </dependency>
> </sys:dependencies>
> <sys:hidden-classes />
> <sys:non-overridable-classes />
> </sys:environment>
>
> <sec:security>
> <sec:role-mappings>
> <sec:role role-name="manager">
> <sec:realm realm-name="NaviSecurity">
> <sec:principal name="manager"
>
> class
> ="org.apache.geronimo.security.realm.providers.GeronimoGroupPrincip
> al" />
> </sec:realm>
> </sec:role>
> </sec:role-mappings>
> </sec:security>
>
> <sys:gbean name="NaviSecurity"
> class="org.apache.geronimo.security.realm.GenericSecurityRealm"
> xsi:type="dep:gbeanType"
> xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> <attribute name="realmName">NaviSecurity</attribute>
> <reference name="ServerInfo">
> <name>ServerInfo</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>NaviSecurity</log:login-domain-name>
>
> <log:login-module-class>com.kewill.login.JdbcConnectLoginModule</
> log:log
> in-module-class>
> <log:option
> name="configuration">${naviconfig.props}</log:option>
> </log:login-module>
> </log:login-config>
> </xml-reference>
> </sys:gbean>
>
>
> <module>
> <web>javagator-war-5.7.0-SNAPSHOT.war
> </web>
> <web-app
> xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1">
> <context-root>/navi</context-root>
>
> <security-realm-name>NaviSecurity</security-realm-name>
> </web-app>
> </module>
>
>
> </application>
>
> Can anybody give me some indication what I am doing wrong ?
>
> Kind regards,
> Marco Laponder
>
web module and login gbean in deployment plan of ear
Posted by Marco Laponder <ma...@kewill.com>.
Hi All,
I am busy with deploying an ear. I have bean able to add my login module
configuration within the plan, and I have bean able to specify a web
module with context root in the plan. But when I have a login module as
well as a web module specified I get the following error when deploying:
error: cvc-complex-type.2.4a: Expected element
'service@http://geronimo.apache.org/xml/ns/deployment-1.2' instead
of 'module@http://geronimo.apache.org/xml/ns/j2ee/application-2.0'
here in element
application@http://geronimo.apache.org/xml/ns/j2ee/application-2.0
and my plan is:
<?xml version="1.0" encoding="utf-8"?>
<application application-name="JavagatorEar"
xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-2.0"
xmlns:app="http://geronimo.apache.org/xml/ns/j2ee/application-2.0"
xmlns:sec="http://geronimo.apache.org/xml/ns/security-2.0"
xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.2">
<sys:environment>
<sys:moduleId>
<sys:groupId>com.kewill.interchain</sys:groupId>
<sys:artifactId>javagator</sys:artifactId>
<sys:version>5.7-SNAPSHOT</sys:version>
<sys:type>car</sys:type>
</sys:moduleId>
<sys:dependencies>
<dependency>
<groupId>org.apache.geronimo.framework</groupId>
<artifactId>j2ee-security</artifactId>
<type>car</type>
</dependency>
</sys:dependencies>
<sys:hidden-classes />
<sys:non-overridable-classes />
</sys:environment>
<sec:security>
<sec:role-mappings>
<sec:role role-name="manager">
<sec:realm realm-name="NaviSecurity">
<sec:principal name="manager"
class="org.apache.geronimo.security.realm.providers.GeronimoGroupPrincip
al" />
</sec:realm>
</sec:role>
</sec:role-mappings>
</sec:security>
<sys:gbean name="NaviSecurity"
class="org.apache.geronimo.security.realm.GenericSecurityRealm"
xsi:type="dep:gbeanType"
xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<attribute name="realmName">NaviSecurity</attribute>
<reference name="ServerInfo">
<name>ServerInfo</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>NaviSecurity</log:login-domain-name>
<log:login-module-class>com.kewill.login.JdbcConnectLoginModule</log:log
in-module-class>
<log:option
name="configuration">${naviconfig.props}</log:option>
</log:login-module>
</log:login-config>
</xml-reference>
</sys:gbean>
<module>
<web>javagator-war-5.7.0-SNAPSHOT.war
</web>
<web-app
xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1">
<context-root>/navi</context-root>
<security-realm-name>NaviSecurity</security-realm-name>
</web-app>
</module>
</application>
Can anybody give me some indication what I am doing wrong ?
Kind regards,
Marco Laponder
Re: context-root in ear deployment plan
Posted by Joe Bohn <jo...@earthlink.net>.
Hi Marco,
What version of Geronimo are you using? If you are using any even a
remotely current version of G you should be using this namespace:
xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-2.0"
See http://cwiki.apache.org/GMOxDOC21/deployment-plans.html for a more
complete description of deployment plans. There are examples there that
demonstrate specifying context-root in a geronimo-application.xml.
Joe
MarcoLaponder wrote:
> Hi All,
>
>
>
> I am trying to accomplish the following: I have an ear file which containts
> a web archive. I want to determine the context root at deployment time. I
> was considering to specify this in the deployment plan but this doesn’t
> work. The deployment plan I use is:
>
>
>
> <?xml version="1.0" encoding="utf-8"?>
>
> <application application-name="HelloWorldEar"
>
> xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-1.1"
>
> xmlns:app="http://geronimo.apache.org/xml/ns/j2ee/application-1.1"
>
> xmlns:sec="http://geronimo.apache.org/xml/ns/security-1.1"
> xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.1">
>
>
>
> <!—
>
> Deleted some dependencies and security info
>
> -->
>
> <module>
>
> <web>
>
> <web-uri>testit.war</web-uri>
>
> <context-root>test</context-root>
>
> </web>
>
> </module>
>
> </application>
>
>
>
> But this plan gives an error when deploying. Is it not possible to do this
> or am I doing something wrong ? The errors I get are:
>
>
>
> C:\j5ee\geronimo-jetty6-javaee5-2.1.1\var\temp\geronimo-application.xml:36:4:
> error: cvc-complex-type.2.4b: Element not allowed:
> web-uri@http://geronimo.apache.org/xml/ns/j2ee/application-2.0 in element
> web@http://geronimo.apache.org/xml/ns/j2ee/application-2.0
>
> C:\j5ee\geronimo-jetty6-javaee5-2.1.1\var\temp\geronimo-application.xml:37:4:
> error: cvc-complex-type.2.4b: Element not allowed:
> context-root@http://geronimo.apache.org/xml/ns/j2ee/application-2.0 in
> element web@http://geronimo.apache.org/xml/ns/j2ee/application-2.0
>
> C:\j5ee\geronimo-jetty6-javaee5-2.1.1\var\temp\geronimo-application.xml:37:4:
> error: cvc-complex-type.2.4c: Expected element
> 'alt-dd@http://geronimo.apache.org/xml/ns/j2ee/application-2.0' before the
> end of the content in element
> module@http://geronimo.apache.org/xml/ns/j2ee/application-2.0
>
>
>
> Any help will be appreciated.
>
>
>
> Kind regards,
>
> Marco
Re: login module & jdbc driver in ear
Posted by David Jencks <da...@yahoo.com>.
On Oct 28, 2008, at 2:02 AM, Marco Laponder wrote:
> Hi All,
>
> I wonder if it is possible to accomplish the following. I have an EAR
> (with a WAR) which I can deploy (after your help). The WAR needs a
> custom login module and this module needs a jDBC driver. Is it
> possible
> to embed the login module JAR, the jDBC driver JAR and the loginmoudle
> configuration within the EAR ? Or should I install the jDBC driver and
> login module first into the Geronimo repository ?
Everything in the ear should work fine. I'd put everything in lib/
inside the ear so you don't have to try to figure out how to make
manifest classpath work inside an ear.
david jencks
>
>
> Kind regards,
> Marco Laponder
login module & jdbc driver in ear
Posted by Marco Laponder <ma...@kewill.com>.
Hi All,
I wonder if it is possible to accomplish the following. I have an EAR
(with a WAR) which I can deploy (after your help). The WAR needs a
custom login module and this module needs a jDBC driver. Is it possible
to embed the login module JAR, the jDBC driver JAR and the loginmoudle
configuration within the EAR ? Or should I install the jDBC driver and
login module first into the Geronimo repository ?
Kind regards,
Marco Laponder
Re: context-root in ear deployment plan
Posted by Lin Sun <li...@gmail.com>.
Hi, I think there are a few probs in your plan:
1. schema is outdated.
2. web-uri element is not allowed, should be web element.
3. there should be a / before test within the context-root element.
You can try change it to something like below -
<application xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-1.2">
<dep:environment xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2">
<dep:moduleId>
<dep:groupId>com.yourco</dep:groupId>
<dep:artifactId>moduleid</dep:artifactId>
<dep:version>1.0</dep:version>
<dep:type>car</dep:type>
</dep:moduleId>
<!---dependencies goes here -->
</dep:environment>
<module>
<web>testit.war</web>
<web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-1.2">
<context-root>/test</context-root>
</web-app>
</module>
...
</application>
HTH
Lin
On Tue, Oct 21, 2008 at 4:34 AM, MarcoLaponder
<ma...@kewill.com> wrote:
>
> Hi All,
>
>
>
> I am trying to accomplish the following: I have an ear file which containts
> a web archive. I want to determine the context root at deployment time. I
> was considering to specify this in the deployment plan but this doesn't
> work. The deployment plan I use is:
>
>
>
> <?xml version="1.0" encoding="utf-8"?>
>
> <application application-name="HelloWorldEar"
>
> xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-1.1"
>
> xmlns:app="http://geronimo.apache.org/xml/ns/j2ee/application-1.1"
>
> xmlns:sec="http://geronimo.apache.org/xml/ns/security-1.1"
> xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.1">
>
>
>
> <!—
>
> Deleted some dependencies and security info
>
> -->
>
> <module>
>
> <web>
>
> <web-uri>testit.war</web-uri>
>
> <context-root>test</context-root>
>
> </web>
>
> </module>
>
> </application>
>
>
>
> But this plan gives an error when deploying. Is it not possible to do this
> or am I doing something wrong ? The errors I get are:
>
>
>
> C:\j5ee\geronimo-jetty6-javaee5-2.1.1\var\temp\geronimo-application.xml:36:4:
> error: cvc-complex-type.2.4b: Element not allowed:
> web-uri@http://geronimo.apache.org/xml/ns/j2ee/application-2.0 in element
> web@http://geronimo.apache.org/xml/ns/j2ee/application-2.0
>
> C:\j5ee\geronimo-jetty6-javaee5-2.1.1\var\temp\geronimo-application.xml:37:4:
> error: cvc-complex-type.2.4b: Element not allowed:
> context-root@http://geronimo.apache.org/xml/ns/j2ee/application-2.0 in
> element web@http://geronimo.apache.org/xml/ns/j2ee/application-2.0
>
> C:\j5ee\geronimo-jetty6-javaee5-2.1.1\var\temp\geronimo-application.xml:37:4:
> error: cvc-complex-type.2.4c: Expected element
> 'alt-dd@http://geronimo.apache.org/xml/ns/j2ee/application-2.0' before the
> end of the content in element
> module@http://geronimo.apache.org/xml/ns/j2ee/application-2.0
>
>
>
> Any help will be appreciated.
>
>
>
> Kind regards,
>
> Marco
> --
> View this message in context: http://www.nabble.com/context-root-in-ear--deployment-plan-tp20085767s134p20085767.html
> Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.
>
>