You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@geronimo.apache.org by Doug Reeder <re...@gmail.com> on 2008/10/21 06:29:34 UTC
Could not auto-map to Database Pool resource
I have a simple web application that deploys and works fine in
Glassfish that I'm trying to deploy to Geronimo-Jetty 2.1.3. I'm
running Geronimo on a Intel Mac running OS X 10.5.5.
I have defined a database pool named softBizPool using the Geronimo
console. Following the Usage info produced by the server, my web.xml
file is:
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd
">
.
.
.
<resource-ref>
<description>jdbc:derby://localhost:1527/soft-biz</description>
<res-ref-name>jdbc/softBizDatasource</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>
and my geronimo-web.xml file is:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-1.1">
<environment>
<moduleId>
<artifactId>SoftBiz</artifactId>
</moduleId>
<dependencies>
<dependency>
<groupId>console.dbpool</groupId>
<artifactId>softBizPool</artifactId>
</dependency>
</dependencies>
</environment>
<context-root>/SoftBiz</context-root>
<!-- security settings, if any, go here -->
<security-realm-name>geronimo-admin</security-realm-name>
<!-- <sec:security> </sec:security> -->
<!-- named resources -->
<resource-ref>
<ref-name>jdbc/softBizDataSource</ref-name>
<resource-link>softBizPool</resource-link>
</resource-ref>
</web-app>
Yet, when i attempt to deploy, I get the error
Unable to resolve resource reference 'jdbc/softBizDatasource' (Could
not auto-map to resource. Try adding a resource-ref mapping to your
Geronimo deployment plan.
Search conducted in current module and dependencies:
[ALL: console.dbpool/softBizPool//]
[ALL: org.apache.geronimo.configs/jetty6/2.1.3/car]
[ALL: org.apache.geronimo.configs/openjpa//car]
[ALL: org.apache.geronimo.configs/j2ee-corba-yoko//car]
[CLASSES: org.apache.geronimo.configs/openejb//car]
[ALL: org.apache.geronimo.configs/axis//car]
[ALL: org.apache.geronimo.configs/cxf//car]
)
org.apache.geronimo.common.DeploymentException: Unable to resolve
resource reference 'jdbc/softBizDatasource' (Could not auto-map to
resource. Try adding a resource-ref mapping to your Geronimo
deployment plan.
Search conducted in current module and dependencies:
[ALL: console.dbpool/softBizPool//]
[ALL: org.apache.geronimo.configs/jetty6/2.1.3/car]
[ALL: org.apache.geronimo.configs/openjpa//car]
[ALL: org.apache.geronimo.configs/j2ee-corba-yoko//car]
[CLASSES: org.apache.geronimo.configs/openejb//car]
[ALL: org.apache.geronimo.configs/axis//car]
[ALL: org.apache.geronimo.configs/cxf//car]
)
at
org
.apache
.geronimo
.connector
.deployment.ResourceRefBuilder.buildNaming(ResourceRefBuilder.java:216)
at
org
.apache
.geronimo
.j2ee
.deployment
.NamingBuilderCollection.buildNaming(NamingBuilderCollection.java:53)
at
org
.apache
.geronimo
.web25
.deployment
.AbstractWebModuleBuilder
.configureBasicWebModuleAttributes(AbstractWebModuleBuilder.java:842)
at
org
.apache
.geronimo
.jetty6
.deployment.JettyModuleBuilder.addGBeans(JettyModuleBuilder.java:365)
at
org
.apache
.geronimo
.j2ee
.deployment
.SwitchingModuleBuilder.addGBeans(SwitchingModuleBuilder.java:165)
at
org
.apache
.geronimo
.j2ee
.deployment.EARConfigBuilder.buildConfiguration(EARConfigBuilder.java:
647)
at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:254)
at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:133)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun
.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
39)
at
sun
.reflect
.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org
.apache
.geronimo
.gbean
.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:34)
at
org
.apache
.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:124)
at
org
.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:
867)
at
org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:
239)
at
org
.apache
.geronimo
.deployment
.plugin
.local.AbstractDeployCommand.doDeploy(AbstractDeployCommand.java:116)
at
org
.apache
.geronimo
.deployment.plugin.local.DistributeCommand.run(DistributeCommand.java:
61)
at java.lang.Thread.run(Thread.java:613)
Is there something more I need to do besides adding the resource-ref
element to geronimo-web.xml?
Re: Could not auto-map to Database Pool resource
Posted by Lin Sun <li...@gmail.com>.
You might also want to check that
softBizPool (as specified in resource-link) is the name of the
outbound-connectionfactory-instance. There is a show plan button to
allow you to see the plan before you deploy the db pool via admin
console.
Lin
On Tue, Oct 21, 2008 at 2:42 AM, David Jencks <da...@yahoo.com> wrote:
> One problem is that the web.xml refers to Datasource whereas the
> geronimo-web.xml refers to DataSource.
> david jencks
> On Oct 20, 2008, at 9:29 PM, Doug Reeder wrote:
>
> I have a simple web application that deploys and works fine in Glassfish
> that I'm trying to deploy to Geronimo-Jetty 2.1.3. I'm running Geronimo on
> a Intel Mac running OS X 10.5.5.
> I have defined a database pool named softBizPool using the Geronimo console.
> Following the Usage info produced by the server, my web.xml file is:
> <?xml version="1.0" encoding="UTF-8"?>
> <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
> http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
> .
> .
> .
> <resource-ref>
> <description>jdbc:derby://localhost:1527/soft-biz</description>
> <res-ref-name>jdbc/softBizDatasource</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>
> and my geronimo-web.xml file is:
> <?xml version="1.0" encoding="UTF-8"?>
> <web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-1.1">
> <environment>
> <moduleId>
> <artifactId>SoftBiz</artifactId>
> </moduleId>
> <dependencies>
> <dependency>
> <groupId>console.dbpool</groupId>
> <artifactId>softBizPool</artifactId>
> </dependency>
> </dependencies>
> </environment>
> <context-root>/SoftBiz</context-root>
> <!-- security settings, if any, go here -->
> <security-realm-name>geronimo-admin</security-realm-name>
> <!-- <sec:security> </sec:security> -->
>
> <!-- named resources -->
> <resource-ref>
> <ref-name>jdbc/softBizDataSource</ref-name>
> <resource-link>softBizPool</resource-link>
> </resource-ref>
> </web-app>
>
> Yet, when i attempt to deploy, I get the error
>
> Unable to resolve resource reference 'jdbc/softBizDatasource' (Could not
> auto-map to resource. Try adding a resource-ref mapping to your Geronimo
> deployment plan.
> Search conducted in current module and dependencies:
> [ALL: console.dbpool/softBizPool//]
> [ALL: org.apache.geronimo.configs/jetty6/2.1.3/car]
> [ALL: org.apache.geronimo.configs/openjpa//car]
> [ALL: org.apache.geronimo.configs/j2ee-corba-yoko//car]
> [CLASSES: org.apache.geronimo.configs/openejb//car]
> [ALL: org.apache.geronimo.configs/axis//car]
> [ALL: org.apache.geronimo.configs/cxf//car]
> )
> org.apache.geronimo.common.DeploymentException: Unable to resolve resource
> reference 'jdbc/softBizDatasource' (Could not auto-map to resource. Try
> adding a resource-ref mapping to your Geronimo deployment plan.
> Search conducted in current module and dependencies:
> [ALL: console.dbpool/softBizPool//]
> [ALL: org.apache.geronimo.configs/jetty6/2.1.3/car]
> [ALL: org.apache.geronimo.configs/openjpa//car]
> [ALL: org.apache.geronimo.configs/j2ee-corba-yoko//car]
> [CLASSES: org.apache.geronimo.configs/openejb//car]
> [ALL: org.apache.geronimo.configs/axis//car]
> [ALL: org.apache.geronimo.configs/cxf//car]
> )
> at
> org.apache.geronimo.connector.deployment.ResourceRefBuilder.buildNaming(ResourceRefBuilder.java:216)
> at
> org.apache.geronimo.j2ee.deployment.NamingBuilderCollection.buildNaming(NamingBuilderCollection.java:53)
> at
> org.apache.geronimo.web25.deployment.AbstractWebModuleBuilder.configureBasicWebModuleAttributes(AbstractWebModuleBuilder.java:842)
> at
> org.apache.geronimo.jetty6.deployment.JettyModuleBuilder.addGBeans(JettyModuleBuilder.java:365)
> at
> org.apache.geronimo.j2ee.deployment.SwitchingModuleBuilder.addGBeans(SwitchingModuleBuilder.java:165)
> at
> org.apache.geronimo.j2ee.deployment.EARConfigBuilder.buildConfiguration(EARConfigBuilder.java:647)
> at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:254)
> at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:133)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> at
> org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:34)
> at
> org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:124)
> at
> org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:867)
> at
> org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:239)
> at
> org.apache.geronimo.deployment.plugin.local.AbstractDeployCommand.doDeploy(AbstractDeployCommand.java:116)
> at
> org.apache.geronimo.deployment.plugin.local.DistributeCommand.run(DistributeCommand.java:61)
> at java.lang.Thread.run(Thread.java:613)
>
> Is there something more I need to do besides adding the resource-ref element
> to geronimo-web.xml?
>
Re: Could not auto-map to Database Pool resource
Posted by Doug Reeder <re...@gmail.com>.
Thanks, that gets rid of that error message!
Now I get 'Deployment failed: Unable to resolve reference
"JtaDataSourceWrapper"', so I'll join the other thread.
On Oct 21, 2008, at 2:42 AM, David Jencks wrote:
> One problem is that the web.xml refers to Datasource whereas the
> geronimo-web.xml refers to DataSource.
>
> david jencks
>
>
Re: Could not auto-map to Database Pool resource
Posted by David Jencks <da...@yahoo.com>.
One problem is that the web.xml refers to Datasource whereas the
geronimo-web.xml refers to DataSource.
david jencks
On Oct 20, 2008, at 9:29 PM, Doug Reeder wrote:
> I have a simple web application that deploys and works fine in
> Glassfish that I'm trying to deploy to Geronimo-Jetty 2.1.3. I'm
> running Geronimo on a Intel Mac running OS X 10.5.5.
>
> I have defined a database pool named softBizPool using the Geronimo
> console. Following the Usage info produced by the server, my
> web.xml file is:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd
> ">
> .
> .
> .
> <resource-ref>
> <description>jdbc:derby://localhost:1527/soft-biz</
> description>
> <res-ref-name>jdbc/softBizDatasource</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>
>
> and my geronimo-web.xml file is:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-1.1">
> <environment>
> <moduleId>
> <artifactId>SoftBiz</artifactId>
> </moduleId>
> <dependencies>
> <dependency>
> <groupId>console.dbpool</groupId>
> <artifactId>softBizPool</artifactId>
> </dependency>
> </dependencies>
> </environment>
> <context-root>/SoftBiz</context-root>
>
> <!-- security settings, if any, go here -->
> <security-realm-name>geronimo-admin</security-realm-name>
> <!-- <sec:security> </sec:security> -->
>
> <!-- named resources -->
> <resource-ref>
> <ref-name>jdbc/softBizDataSource</ref-name>
> <resource-link>softBizPool</resource-link>
> </resource-ref>
> </web-app>
>
>
> Yet, when i attempt to deploy, I get the error
> Unable to resolve resource reference 'jdbc/softBizDatasource' (Could
> not auto-map to resource. Try adding a resource-ref mapping to your
> Geronimo deployment plan.
> Search conducted in current module and dependencies:
> [ALL: console.dbpool/softBizPool//]
> [ALL: org.apache.geronimo.configs/jetty6/2.1.3/car]
> [ALL: org.apache.geronimo.configs/openjpa//car]
> [ALL: org.apache.geronimo.configs/j2ee-corba-yoko//car]
> [CLASSES: org.apache.geronimo.configs/openejb//car]
> [ALL: org.apache.geronimo.configs/axis//car]
> [ALL: org.apache.geronimo.configs/cxf//car]
> )
> org.apache.geronimo.common.DeploymentException: Unable to resolve
> resource reference 'jdbc/softBizDatasource' (Could not auto-map to
> resource. Try adding a resource-ref mapping to your Geronimo
> deployment plan.
> Search conducted in current module and dependencies:
> [ALL: console.dbpool/softBizPool//]
> [ALL: org.apache.geronimo.configs/jetty6/2.1.3/car]
> [ALL: org.apache.geronimo.configs/openjpa//car]
> [ALL: org.apache.geronimo.configs/j2ee-corba-yoko//car]
> [CLASSES: org.apache.geronimo.configs/openejb//car]
> [ALL: org.apache.geronimo.configs/axis//car]
> [ALL: org.apache.geronimo.configs/cxf//car]
> )
> at
> org
> .apache
> .geronimo
> .connector
> .deployment.ResourceRefBuilder.buildNaming(ResourceRefBuilder.java:
> 216)
> at
> org
> .apache
> .geronimo
> .j2ee
> .deployment
> .NamingBuilderCollection.buildNaming(NamingBuilderCollection.java:53)
> at
> org
> .apache
> .geronimo
> .web25
> .deployment
> .AbstractWebModuleBuilder
> .configureBasicWebModuleAttributes(AbstractWebModuleBuilder.java:842)
> at
> org
> .apache
> .geronimo
> .jetty6
> .deployment.JettyModuleBuilder.addGBeans(JettyModuleBuilder.java:365)
> at
> org
> .apache
> .geronimo
> .j2ee
> .deployment
> .SwitchingModuleBuilder.addGBeans(SwitchingModuleBuilder.java:165)
> at
> org
> .apache
> .geronimo
> .j2ee
> .deployment
> .EARConfigBuilder.buildConfiguration(EARConfigBuilder.java:647)
> at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:254)
> at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:133)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun
> .reflect
> .NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at
> sun
> .reflect
> .DelegatingMethodAccessorImpl
> .invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> at
> org
> .apache
> .geronimo
> .gbean
> .runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:
> 34)
> at
> org
> .apache
> .geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:124)
> at
> org
> .apache
> .geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:867)
> at
> org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:
> 239)
> at
> org
> .apache
> .geronimo
> .deployment
> .plugin
> .local.AbstractDeployCommand.doDeploy(AbstractDeployCommand.java:116)
> at
> org
> .apache
> .geronimo
> .deployment
> .plugin.local.DistributeCommand.run(DistributeCommand.java:61)
> at java.lang.Thread.run(Thread.java:613)
>
>
> Is there something more I need to do besides adding the resource-ref
> element to geronimo-web.xml?