You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by "Mario Ruebsam (JIRA)" <de...@geronimo.apache.org> on 2006/06/14 21:31:35 UTC
[jira] Created: (GERONIMO-2121) Unable to resolve resource
reference to db pool error when deploying web application as EAR
Unable to resolve resource reference to db pool error when deploying web application as EAR
-------------------------------------------------------------------------------------------
Key: GERONIMO-2121
URL: http://issues.apache.org/jira/browse/GERONIMO-2121
Project: Geronimo
Type: Bug
Security: public (Regular issues)
Components: deployment
Versions: 1.1
Environment: 1.1-rc1, jdk 1.4.2
Reporter: Mario Ruebsam
Deployment of an web application inside of an EAR shows the following error:
Error: Unable to distribute eiservice.ear: Unable to resolve
resource reference 'jdbc/default' (Could not find resource
'jdbc/default'. Perhaps it has not yet been configured, or your
application does not have a dependency declared for that resource
module?)
The dependency to the db connector and the resource reference is
set correct into the geronimo-web.xml file.
The deployment work when the WAR is deployed standalone.
The deployment work also when the dependency setting to the db connector:
<dep:dependency>
<dep:groupId>coderesearch-jdbc</dep:groupId>
<dep:artifactId>ei-service-default</dep:artifactId>
<dep:version>2.3</dep:version>
<dep:type>rar</dep:type>
</dep:dependency>
is declared in the geronimo-application.xml.
Used plans and descriptors
geronimo-web.xml:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-1.1"
xmlns:naming="http://geronimo.apache.org/xml/ns/naming">
<dep:environment xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.1">
<dep:moduleId>
<dep:groupId>coderesearch</dep:groupId>
<dep:artifactId>ei-service</dep:artifactId>
<dep:version>2.3</dep:version>
<dep:type>war</dep:type>
</dep:moduleId>
<dep:dependencies>
<dep:dependency>
<dep:groupId>coderesearch</dep:groupId>
<dep:artifactId>ei-service</dep:artifactId>
<dep:version>2.3</dep:version>
<dep:type>car</dep:type>
</dep:dependency>
<dep:dependency>
<dep:groupId>coderesearch-jdbc</dep:groupId>
<dep:artifactId>ei-service-default</dep:artifactId>
<dep:version>2.3</dep:version>
<dep:type>rar</dep:type>
</dep:dependency>
<dep:dependency>
<dep:groupId>commons-email</dep:groupId>
<dep:artifactId>commons-email</dep:artifactId>
<dep:version>1.0</dep:version>
<dep:type>jar</dep:type>
</dep:dependency>
<dep:dependency>
<dep:groupId>commons-codec</dep:groupId>
<dep:artifactId>commons-codec</dep:artifactId>
<dep:version>1.3</dep:version>
<dep:type>jar</dep:type>
</dep:dependency>
<dep:dependency>
<dep:groupId>commons-httpclient</dep:groupId>
<dep:artifactId>commons-httpclient</dep:artifactId>
<dep:version>3.0</dep:version>
<dep:type>jar</dep:type>
</dep:dependency>
<dep:dependency>
<dep:groupId>commons-fileupload</dep:groupId>
<dep:artifactId>commons-fileupload</dep:artifactId>
<dep:version>1.0</dep:version>
<dep:type>jar</dep:type>
</dep:dependency>
</dep:dependencies>
<dep:hidden-classes/>
<dep:non-overridable-classes/>
</dep:environment>
<context-root>/CODERESEARCH.client/ei-service</context-root>
<naming:resource-ref>
<naming:ref-name>jdbc/default</naming:ref-name>
<naming:resource-link>jdbc/default</naming:resource-link>
</naming:resource-ref>
</web-app>
web.xml:
<?xml version="1.0" encoding="ISO-8859-1"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
version="2.4">
<servlet>
<display-name>MainServlet</display-name>
<servlet-name>MainServlet</servlet-name>
<servlet-class>com.coderesearch.abp.found.srv.MainServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>MainServlet</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
<env-entry>
<env-entry-name>server/ServerType</env-entry-name>
<env-entry-type>java.lang.String</env-entry-type>
<env-entry-value>Geronimo/Jetty</env-entry-value>
</env-entry>
<resource-ref>
<res-ref-name>jdbc/default</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
<res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>
</web-app>
db deploy plan:
<?xml version="1.0" encoding="UTF-8"?>
<connector xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector-1.1">
<dep:environment xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.1">
<dep:moduleId>
<dep:groupId>coderesearch-jdbc</dep:groupId>
<dep:artifactId>ei-service-default</dep:artifactId>
<dep:version>2.3</dep:version>
<dep:type>rar</dep:type>
</dep:moduleId>
<dep:dependencies>
<dep:dependency>
<dep:groupId>postgresql</dep:groupId>
<dep:artifactId>postgresql</dep:artifactId>
<dep:version>8.1.jdbc3</dep:version>
<dep:type>jar</dep:type>
</dep:dependency>
</dep:dependencies>
</dep:environment>
<resourceadapter>
<outbound-resourceadapter>
<connection-definition>
<connectionfactory-interface>javax.sql.DataSource</connectionfactory-interface>
<connectiondefinition-instance>
<name>jdbc/default</name>
<config-property-setting name="UserName">admin</config-property-setting>
<config-property-setting name="Password">master</config-property-setting>
<config-property-setting name="Driver">org.postgresql.Driver</config-property-setting>
<config-property-setting name="ConnectionURL">jdbc:postgresql://localhost:5432/eiservice</config-property-setting>
<config-property-setting name="CommitBeforeAutocommit">true</config-property-setting>
<connectionmanager>
<local-transaction/>
<single-pool>
<max-size>10</max-size>
<min-size>5</min-size>
<blocking-timeout-milliseconds>60000</blocking-timeout-milliseconds>
<idle-timeout-minutes>60</idle-timeout-minutes>
<match-one/>
</single-pool>
</connectionmanager>
</connectiondefinition-instance>
</connection-definition>
</outbound-resourceadapter>
</resourceadapter>
</connector>
geronimo-application.xml:
<?xml version="1.0" encoding="UTF-8"?>
<application xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-1.0"
xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.0"
configId="coderesearch/ei-service/2.3/car"
parentId="geronimo/j2ee-server/1.0/car">
<module>
<web>client.war</web>
<alt-dd>META-INF/geronimo-web.xml</alt-dd>
</module>
</application>
application.xml:
<?xml version="1.0" encoding="ISO-8859-1"?>
<application xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/application_1_4.xsd"
version="1.4">
<display-name>ei-Service</display-name>
<module>
<web>
<web-uri>client.war</web-uri>
<context-root>/ei-service</context-root>
</web>
</module>
<module>
<web>
<web-uri>client.war</web-uri>
<context-root>/</context-root>
</web>
</module>
</application>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira