geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aaron Mulder" <ammul...@alumni.princeton.edu>
Subject Re: Error deploying EAR because of DataSource
Date Fri, 27 Oct 2006 14:03:45 GMT
Just in case you haven't already, you might try stopping and
restarting the database pool from the "Installed J2EE connectors"
screen, or restarting Geronimo.  I don't expect this to help but...

Also, I think it's possible you might get this message if there are
*two* matching connectors (both named AuchanPromoDS) -- that's not the
case, right?

Also, are you sure the error is coming from the web module and not the
EJB module?  Is there a chance the ejb-jar.xml has a resource
reference problem, or the EJB JAR has a problem locating the data
source for CMP entity beans or something like that?  The EJB JAR may
also need the same data source dependency depending on how it's
configured (or you could just add the dependency to
geronimo-application.xml at the EAR level to cover both modules).  If
nothing else, you can deploy with the command line deploy tool like
"java -jar deployer.jar --verbose deploy ..." and it should give you a
stack trace which you could post and we could make sure we understand
where in the deploy process this problem is coming up.

Thanks,
      Aaron

On 10/27/06, Guillaume Bilodeau <gbilodeau@yahoo.com> wrote:
>
> Ok let's try this again, without altering any names :)  I'm using
> Geronimo+Tomcat 1.1.1 on Java 5.
>
> Error:
>
> Deployment failed:
> Unable to resolve resource reference 'jdbc/AuchanPromoDS' (Could not find
> resource 'AuchanPromoDS'. Perhaps it has not yet been configured, or your
> application does not have a dependency declared for that resource module?)
>
> "Installed J2EE connectors" screen:
> console.dbpool/AuchanPromoDS/1.0/rar     running          Stop            Restart
> Uninstall
>
> web.xml:
>
> <?xml version="1.0" encoding="UTF-8" ?>
>
> <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">
> ...
>     <resource-ref>
>         <res-ref-name>jdbc/AuchanPromoDS</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>
>
> geronimo-web.xml:
>
> <?xml version="1.0" encoding="UTF-8"?>
>
> <web-app xmlns="http://geronimo.apache.org/xml/ns/web">
>         <environment>
>                 <moduleId>
>                         <artifactId>promo-war</artifactId>
>                 </moduleId>
>                 <dependencies>
>                         <dependency>
>                                 <groupId>console.dbpool</groupId>
>                                 <artifactId>AuchanPromoDS</artifactId>
>                         </dependency>
>                 </dependencies>
>         </environment>
>
>         <context-root>/auchan-promo</context-root>
>
>         <resource-ref>
>                 <ref-name>jdbc/AuchanPromoDS</ref-name>
>                 <resource-link>AuchanPromoDS</resource-link>
>         </resource-ref>
> </web-app>
>
> applicationContext.xml:
>
>         <jee:jndi-lookup id="mainDataSource"
>                 jndi-name="java:comp/env/jdbc/AuchanPromoDS"
>                 proxy-interface="javax.sql.DataSource"
>                 lookup-on-startup="false" />
>
> application.xml:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE application PUBLIC
>         "-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN"
>         "http://java.sun.com/dtd/application_1_3.dtd">
> <application>
>   <display-name>promo-ear</display-name>
>   <description>Promo Action Management System EAR</description>
>   <module>
>     <web>
>       <web-uri>promo-web-2.0.0-SNAPSHOT.war</web-uri>
>       <context-root>/auchan-promo</context-root>
>     </web>
>   </module>
>   <module>
>     <ejb>promo-server-2.0.0-SNAPSHOT.jar</ejb>
>   </module>
> </application>
>
> It seems to me that I followed what the usage screen suggests.  Is this a
> problem with dealing with EARs?
>
> Thanks,
> GB
>
>
> On 10/26/06, Guillaume Bilodeau <gbilodeau@yahoo.com> wrote:
> > Yes actually that was a mistake in my post, I forgot to remove all
> > references
> > to my current client :)  All names are correct in my code, all of them
> > being
> > jdbc/<insertClientNameHere>PromoDS.
> >
> > Any other idea?
>
> Can you look in the database pool screen in the console, and select
> the usage link next to your database pool, and make sure that all the
> names in the example there match the ones in your geronimo-web.xml
> file?  It's hard to troubleshoot from the config files if you're
> changing the important entries as you post them.  :)
>
> Also, are you using Geronimo 1.0 or Geronimo 1.1?  The XML namespaces
> in the geronimo-web.xml file aren't really correct for Geronimo 1.1,
> though it may auto-convert them.  I'd try putting in the proper values
> (which you can get from here http://geronimo.apache.org/schemas.html).
>
> Thanks,
>       Aaron
>
> --
> View this message in context: http://www.nabble.com/Error-deploying-EAR-because-of-DataSource-tf2513035.html#a7024975
> Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.
>
>

Mime
View raw message