On Apr 28, 2008, at 9:50 AM, Alexey Kakunin wrote:
Hello! I'm currently working with migrating quite big war-only
application (http://www.emforge.org) to the Geronimo.
We are using Tomcat 5.5/6.0 for development, but already prepared
"special" versions for JBossAS and GlassFis to provide better
integration (http://www.emforge.org/wiki/EmForgeJ2EEIntegration has
a little bit more details).
So, now the turn on Geronimo.
This application is used many dependencies, some of which make sense
are:
* JSF-RI 1.2 & Facelets & RichFaces 3.2.0
* Spring 2.5.2
* CXF 2.0.5-incubator.
During trying to run application on GlassFish I met some problems,
seems related to the facts, that Geronimo is used a little bit
another versions:
* MyFaces 1.2 (as JSF Implementation)
* Spring 2.0.5
* CXF 2.0.2
But before one general question: how to use some default (I suppose
jdbc/ActiveDS) DataSource in my application?
We need it because by default, we are using build-in file-based
HSQL, but in these "special" pacjkages for J2EE servers we provide
some better integration - for example we are using some default DS
as DataSource. It allows user to start application by simple
deploying (without any external configuration) and avoid from using
HSQL (it has some problems).
I read documentation (http://cwiki.apache.org/GMOxDOC21/deployment-plans.html
) and trying to do like it is described there - added resource into
web.xml:
<resource-ref>
<res-ref-name>jdbc/ActiveDS</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
<res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>
And added dependency into geronimo-web.xml (may be it is not correct
- but I tried different ways):
<web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1"
xmlns:nam="http://geronimo.apache.org/xml/ns/naming-1.2"
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>org.emforge</sys:groupId>
<sys:artifactId>EmForge</sys:artifactId>
<sys:version>0.23</sys:version>
<sys:type>war</sys:type>
</sys:moduleId>
<sys:hidden-classes>
<sys:filter>org.jaxen,org.springframework,org.apache.cxf</sys:filter>
</sys:hidden-classes>
<sys:dependencies>
<sys:dependency>
<sys:groupId>console.dbpool</sys:groupId>
<sys:artifactId>jdbc%2FActiveDS</sys:artifactId>
</sys:dependency>
</sys:dependencies>
</sys:environment>
<context-root>/EmForge</context-root>
<nam:resource-ref>
<nam:ref-name>jdbc/ActiveDS</nam:ref-name>
<nam:resource-link>jdbc/ActiveDS</nam:resource-link>
<nam:pattern>
<nam:groupId>console.dbpool</nam:groupId>
<nam:artifactId>jdbc%2FActiveDS</nam:artifactId>
<nam:name>jdbc/ActiveDS</nam:name>
</nam:pattern>
</nam:resource-ref>
But in this case I'm getting error during deployment:
error: cvc-complex-type.2.4a: Expected elements 'non-overridable-
[EMAIL PROTECTED]://geronimo.apache.org/xml/ns/deployment-1.2 inverse-
[EMAIL PROTECTED]://geronimo.apache.org/xml/ns/deployment-1.2
[EMAIL PROTECTED]://geronimo.apache.org/xml/ns/deployment-1.2'
instead of '[EMAIL PROTECTED]://geronimo.apache.org/xml/ns/deployment-1.2'
here in element [EMAIL PROTECTED]://geronimo.apache.org/xml/ns/deployment-1.2
error: cvc-complex-type.2.4b: Element not allowed: [EMAIL PROTECTED]://geronimo.apache.org/xml/ns/naming-1.2
in element [EMAIL PROTECTED]://geronimo.apache.org/xml/ns/naming-1.2
What I'm doing wrong here?
You've got the ordering wrong. Move your <sys:hidden-classes> element
below your <sys:dependencies>.
Will take a look at your other questions later...
--kevan