You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@geronimo.apache.org by Guillaume Bilodeau <gb...@yahoo.com> on 2006/10/26 12:04:26 UTC

Error deploying EAR because of DataSource

Hi guys,

This is a different problem than the one I posted back in July, hopefully
this one will be easier to solve :)

I'm back with my EAR, containing an EJB module (JAR), a web application
(WAR) and their relevant dependencies in its root.  The EAR contains the
following application.xml file:

<?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>
  <module>
    <web>
      <web-uri>promo-web-2.0.0-SNAPSHOT.war</web-uri>
      <context-root>/promo</context-root>
    </web>
  </module>
  <module>
    <ejb>promo-server-2.0.0-SNAPSHOT.jar</ejb>
  </module>
</application>

The WAR contains a web.xml with a reference to a data source and the
following geronimo-web.xml file:

<?xml version="1.0" encoding="UTF-8"?>

<web-app xmlns="http://geronimo.apache.org/xml/ns/web"
	xmlns:naming="http://geronimo.apache.org/xml/ns/naming">
	<environment>
		<moduleId>
			<artifactId>promo-war</artifactId>
		</moduleId>
		<dependencies>
			<dependency>
				<groupId>console.dbpool</groupId>
				<artifactId>PromoDS</artifactId>
			</dependency>
		</dependencies>
	</environment>

	<context-root>/promo</context-root>

	<naming:resource-ref>
		<naming:ref-name>jdbc/PromoDS</naming:ref-name>
		<naming:resource-link>PromoDS</naming:resource-link>
	</naming:resource-ref>
</web-app>

I have already configured my database pool with the same name, it's up and
running and correctly listed in the J2EE connectors.

When I try to deploy this EAR, I get the following error:

Unable to resolve resource reference 'jdbc/PromoDS' (Could not find resource
'PromoDS'.  Perhaps it has not yet been configured, or your application does
not have a dependency declared for that resource module?)
org.apache.geronimo.common.DeploymentException: Unable to resolve resource
reference 'jdbc/PromoDS' (Could not find resource 'PromoDS'.  Perhaps it has
not yet been configured, or your application does not have a dependency
declared for that resource module?)

Any idea what the problem here?

Thanks a lot!
GB

-- 
View this message in context: http://www.nabble.com/Error-deploying-EAR-because-of-DataSource-tf2513035.html#a7008354
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.


Re: Is this a new test framework candidate? was: Re: Error deploying EAR because of DataSource

Posted by Prasad Kashyap <go...@gmail.com>.
Without going too deep into the history of this long mail, I believe
the test framework does make it easy to setup tests like this where
you need a running server and need to deploy multiple apps. If there
is a need for more common tooling, we can definitely provide them.

I am wondering if those test apps that you have to demonstrate common
problems should end up in the testsupport tree. That would be a place
to put it if can be used and reused by many suites. If not, the
deployment-suite is another place to put it too.

Cheers
Prasad

On 11/29/06, David Jencks <da...@yahoo.com> wrote:
> Here's a problem that requires 2 apps (datasource and ear) to
> demonstrate, and manifests as a deployment failure.
>
> Does the new test framework make it easy to set up tests like this?
> Is there a sample?  Any volunteers for this one?
>
> I have a few test apps kind of like this sitting around from fixing
> various bugs, some fail with deployment failures, others need to be
> used to demonstrate problems.  It would be great to get them
> integrated somehow.
>
> thanks
> david jencks
>
>
> On Nov 29, 2006, at 11:00 AM, niteryder wrote:
>
> >
> > Hi,
> >
> > I used geronimo 1.1.1 which i downloaded with this link
> >
> > http://www.apache.org/dyn/closer.cgi/geronimo/1.1.1/geronimo-tomcat-
> > j2ee-1.1.1.zip
> >
> > I got a deployment error on console 'Deploy New' feauture
> > In ear file there is only one module which is the web app
> > It has web.xml and geronimo-web.xml under WEB-INF
> > As you see jdbc/TEST1 is linked with dependency to the console db
> > pool TEST1
> > And i am sure the names are correct because it is running when you
> > deploy
> > only that war.
> > then i put it in an ear and add as the only module in
> > geronimo-application.xml
> > but it gave error about jdbc/TEST1
> > then i put a copy of geronimo-web.xml under deployment folder at
> > top level
> > of ear
> > and add alt-dd node to the module but again it couldn't reach
> > then i added dependency nodes to geronimo-application.xml when I
> > saw on
> > Guillaume's message and it is deployed.
> > i also checked ear and war file in it. all xml files are in their
> > places but
> > it cannot or doesn't check geronimo-web.xml for datasource
> > dependencies.
> >
> > thanks,
> >
> > seckin
> >
> >
> > djencks wrote:
> >>
> >> This sounds like a bug to me.  Which version of geronimo are you
> >> using?  Are you only accessing the datasources from the web app with
> >> the dependendencies in the geronimo-web.xml and not from any other
> >> module in the ear?  Just to be clear, you get a deployment error not
> >> a runtime error?
> >>
> >> many thanks
> >> david jencks
> >>
> >> On Nov 29, 2006, at 5:29 AM, niteryder wrote:
> >>
> >>>
> >>> Hi Lasantha,
> >>>
> >>> I've already answered Guillaume's answer, it is deployed now. But i
> >>> want to
> >>> ask a question about the structure.
> >>>
> >>> First i created database pools from the console
> >>> then I deployed a war project with geronimo-web.xml in it
> >>>
> >>> geronimo-web.xml
> >>> ------------------------------
> >>>
> >>> <web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-1.1">
> >>>     <environment>
> >>>             <moduleId>
> >>>                     <artifactId>test-war</artifactId>
> >>>             </moduleId>
> >>>             <dependencies>
> >>>                     <dependency>
> >>>                             <groupId>console.dbpool</groupId>
> >>>                             <artifactId>TEST1</artifactId>
> >>>                     </dependency>
> >>>                     <dependency>
> >>>                             <groupId>console.dbpool</groupId>
> >>>                             <artifactId>TEST2</artifactId>
> >>>                     </dependency>
> >>>             </dependencies>
> >>>     </environment>
> >>>     <context-root>/test-war</context-root>
> >>>     <!-- define a reference name to the db pool-->
> >>>     <resource-ref>
> >>>             <ref-name>jdbc/TEST1</ref-name>
> >>>             <resource-link>TEST1</resource-link>
> >>>     </resource-ref>
> >>>     <resource-ref>
> >>>             <ref-name>jdbc/TEST2</ref-name>
> >>>             <resource-link>TEST2</resource-link>
> >>>     </resource-ref>
> >>> </web-app>
> >>>
> >>> Later I want to put this war project into an ear and deploy to
> >>> geronimo.
> >>> This time i had to prepare geronimo-application.xml
> >>> but I didn't realize that i have to put dependencies again to
> >>> geronimo-application.xml
> >>> I was expecting it to find from geronimo-web.xml (I put it also
> >>> under a
> >>> folder named 'deployment' in ear and referenced it with alt-dd
> >>> under module)
> >>>
> >>> <application xmlns="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"
> >>> application-name="test-ear">
> >>>   <sys:environment>
> >>>     <sys:moduleId>
> >>>       <sys:groupId>default</sys:groupId>
> >>>       <sys:artifactId>test-ear</sys:artifactId>
> >>>       <sys:version>1.0</sys:version>
> >>>       <sys:type>car</sys:type>
> >>>     </sys:moduleId>
> >>>     <sys:dependencies/>
> >>>   </sys:environment>
> >>>   <module>
> >>>     <web>test-war.war</web>
> >>>     <alt-dd>deployment/geronimo-web.xml</alt-dd>
> >>>   </module>
> >>> </application>
> >>>
> >>> this was giving unable to resolve resource reference jdbc/TEST1
> >>>
> >>> then i changed geronimo-application.xml like below and it is
> >>> deployed
> >>>
> >>> <application xmlns="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"
> >>> application-name="test-ear">
> >>>   <sys:environment>
> >>>     <sys:moduleId>
> >>>       <sys:groupId>default</sys:groupId>
> >>>       <sys:artifactId>test-ear</sys:artifactId>
> >>>       <sys:version>1.0</sys:version>
> >>>       <sys:type>car</sys:type>
> >>>     </sys:moduleId>
> >>>     <sys:dependencies>
> >>>       <sys:dependency>
> >>>         <sys:groupId>console.dbpool</sys:groupId>
> >>>         <sys:artifactId>TEST1</sys:artifactId>
> >>>         <sys:version>1.0</sys:version>
> >>>         <sys:type>rar</sys:type>
> >>>       </sys:dependency>
> >>>       <sys:dependency>
> >>>         <sys:groupId>console.dbpool</sys:groupId>
> >>>         <sys:artifactId>TEST2</sys:artifactId>
> >>>         <sys:version>1.0</sys:version>
> >>>         <sys:type>rar</sys:type>
> >>>       </sys:dependency>
> >>>     </sys:dependencies>
> >>>   </sys:environment>
> >>>   <module>
> >>>     <web>test-war.war</web>
> >>>     <alt-dd>deployment/geronimo-web.xml</alt-dd>
> >>>   </module>
> >>> </application>
> >>>
> >>>
> >>> But my question is how can i make these dependencies for only a
> >>> project in
> >>> ear. I mean only the web project have dependency to these
> >>> datasources in ear
> >>> and i've already put these dependency in geronimo-web.xml
> >>> and if it gives this error that means it checks web.xml of war
> >>> project so it
> >>> might also check geronimo-web.xml
> >>> because if i want only deploy war project (not in ear), it exactly
> >>> does this
> >>> right? it finds the dependencies from geronimo-web.xml so it
> >>> successfully
> >>> deploys war project.
> >>>
> >>> if this is the only way for ear should i remove the dependencies in
> >>> geronimo-web.xml ?
> >>>
> >>> Thanks
> >>>
> >>>
> >>> Lasantha Ranaweera wrote:
> >>>>
> >>>> Hi,
> >>>>
> >>>> Could you be bit more specific on your situation? I might be
> >>>> able to
> >>>> help you as the author of this sample application. :)
> >>>>
> >>>> Thanks,
> >>>> Lasantha Ranaweera
> >>>> niteryder wrote:
> >>>>> Hi Guillaume,
> >>>>>
> >>>>> Have you succeeded on this issue? I have similar problem, I can
> >>>>> deploy
> >>>>> war
> >>>>> individually and I can use the database pools that I created with
> >>>>> Geronimo's
> >>>>> with this deployed war. But when i want to add this war to an ear
> >>>>> and
> >>>>> deploy
> >>>>> it. I also take similar messages for my datasources.
> >>>>>
> >>>>> Thanks
> >>>>>
> >>>>>
> >>>>> Guillaume Bilodeau wrote:
> >>>>>
> >>>>>> I agree it's a good sign that the data source is actually usable
> >>>>>> from
> >>>>>> the
> >>>>>> sample application.  However from what I understand this
> >>>>>> application
> >>>>>> does
> >>>>>> not have a strict dependency to a specific data source like our
> >>>>>> application - it instead discovers them programmatically.
> >>>>>>
> >>>>>> The problem I'm describing is actually happening during the
> >>>>>> deployment
> >>>>>> phase: I open the "Deploy new" screen, select the application
> >>>>>> EAR, I
> >>>>>> even
> >>>>>> uncheck the "Start after install" option and finally click on
> >>>>>> Deploy.  A
> >>>>>> few instants later, Geronimo gives the following message:
> >>>>>>
> >>>>>> 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?)
> >>>>>>
> >>>>>> AFAICT, the application wasn't started yet, so I presume it's
> >>>>>> more a
> >>>>>> configuration issue than an application issue.  The problem is,
> >>>>>> everything
> >>>>>> seems to be configured according to the Geronimo usage page :)
> >>>>>>
> >>>>>> The applicationContext.xml file is a configuration file for the
> >>>>>> Spring
> >>>>>> framework.  In our application, this file isn't loaded right on
> >>>>>> startup
> >>>>>> so
> >>>>>> I doubt it's interfering with anything.
> >>>>>>
> >>>>>> I didn't mention yet but the application runs fine on
> >>>>>> Glassfish and
> >>>>>> Tomcat, so I suppose I'm not configuring Geronimo or access to it
> >>>>>> correctly.
> >>>>>>
> >>>>>> I'll have a look at the simple-database-access-sample-
> >>>>>> application and
> >>>>>> let
> >>>>>> you know if it's not too late - it's Friday after all :)
> >>>>>>
> >>>>>> Thanks!
> >>>>>> GB
> >>>>>>
> >>>>>>
> >>>>>> Lasantha Ranaweera wrote:
> >>>>>>
> >>>>>>> Ok.. Then we can suspect problem is in your application.  :-)
> >>>>>>>
> >>>>>>> I saw file called in "applicationConext.xml" one of your
> >>>>>>> previous
> >>>>>>> mails.
> >>>>>>> What exactly that means?
> >>>>>>>
> >>>>>>> To link a DBPool with your web application you need to add
> >>>>>>> reference in
> >>>>>>> your geronimo-web.xml file too. Then it should be linked with
> >>>>>>> web.xml.
> >>>>>>> Have a look at
> >>>>>>>
> >>>>>>> http://cwiki.apache.org/GMOxDOC11/simple-database-access-sample-
> >>>>>>> application.html
> >>>>>>>
> >>>>>>> Let us know your status too.
> >>>>>>>
> >>>>>>> Thanks,
> >>>>>>> Lasantha Ranaweera
> >>>>>>>
> >>>>>>>
> >>>>>>> Guillaume Bilodeau wrote:
> >>>>>>>
> >>>>>>>> I've tested the pool before deploying it and it worked fine.
> >>>>>>>> I have
> >>>>>>>> now
> >>>>>>>> downloaded, built and deployed the dbtester sample application
> >>>>>>>> with
> >>>>>>>> correct
> >>>>>>>> results: my AuchanPromoDS pool is there, and I can list its
> >>>>>>>> tables and
> >>>>>>>> their
> >>>>>>>> content with no error whatsoever.
> >>>>>>>>
> >>>>>>>> Everything looks fine, how come my application will not even
> >>>>>>>> deploy?
> >>>>>>>> I'm at
> >>>>>>>> a loss here :S
> >>>>>>>>
> >>>>>>>> Thanks again,
> >>>>>>>> GB
> >>>>>>>>
> >>>>>>>>
> >>>>>>>> Lasantha Ranaweera wrote:
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>> Since you have deployed DB pool using G console, have you
> >>>>>>>>> tested it
> >>>>>>>>> before deploying?
> >>>>>>>>>
> >>>>>>>>> Otherwise have a look at this sample application which help
> >>>>>>>>> to find
> >>>>>>>>> out
> >>>>>>>>> your DB connection pools is working or not.
> >>>>>>>>>
> >>>>>>>>> http://cwiki.apache.org/GMOxDOC11/db-pool-testing-sample-
> >>>>>>>>> application.html
> >>>>>>>>>
> >>>>>>>>> Thanks,
> >>>>>>>>> Lasantha Ranaweera
> >>>>>>>>>
> >>>>>>>>> Guillaume Bilodeau wrote:
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>> No it's a remote Oracle database.
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>> Lasantha Ranaweera wrote:
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>> What is the DB you are using? Is it Derby Embedded?
> >>>>>>>>>>>
> >>>>>>>>>>> Thanks,
> >>>>>>>>>>> Lasantha Ranaweera
> >>>>>>>>>>>
> >>>>>>>>>>> Guillaume Bilodeau wrote:
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>> Hi David,
> >>>>>>>>>>>>
> >>>>>>>>>>>> Not sure if that's what you mean, but I deployed the
> >>>>>>>>>>>> datasource
> >>>>>>>>>>>> myself
> >>>>>>>>>>>> using
> >>>>>>>>>>>> the "Geronimo database pool wizard", not through a separate
> >>>>>>>>>>>> deployment
> >>>>>>>>>>>> plan.
> >>>>>>>>>>>> Is that it?
> >>>>>>>>>>>>
> >>>>>>>>>>>> Thanks,
> >>>>>>>>>>>> GB
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>> David Jencks wrote:
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>>> Everything you show looks ok to me, which makes me wonder
> >>>>>>>>>>>>> if the
> >>>>>>>>>>>>> console-generated rar plan really has the connection
> >>>>>>>>>>>>> factory
> >>>>>>>>>>>>> named
> >>>>>>>>>>>>> AuchanPromoDS.  Could you show the plan for deploying the
> >>>>>>>>>>>>> datasource?
> >>>>>>>>>>>>>
> >>>>>>>>>>>>> thanks
> >>>>>>>>>>>>> david jencks
> >>>>>>>>>>>>>
> >>>>>>>>>>>>> On Oct 26, 2006, at 11:03 PM, Guillaume Bilodeau 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 <gb...@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.
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>>
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>
> >>>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>
> >>>>>
> >>>>>
> >>>>
> >>>>
> >>>>
> >>>
> >>> --
> >>> View this message in context: http://www.nabble.com/Error-deploying-
> >>> EAR-because-of-DataSource-tf2513035.html#a7599290
> >>> Sent from the Apache Geronimo - Users mailing list archive at
> >>> Nabble.com.
> >>>
> >>
> >>
> >>
> >
> > --
> > View this message in context: http://www.nabble.com/Error-deploying-
> > EAR-because-of-DataSource-tf2513035.html#a7605650
> > Sent from the Apache Geronimo - Users mailing list archive at
> > Nabble.com.
> >
>
>

Is this a new test framework candidate? was: Re: Error deploying EAR because of DataSource

Posted by David Jencks <da...@yahoo.com>.
Here's a problem that requires 2 apps (datasource and ear) to  
demonstrate, and manifests as a deployment failure.

Does the new test framework make it easy to set up tests like this?   
Is there a sample?  Any volunteers for this one?

I have a few test apps kind of like this sitting around from fixing  
various bugs, some fail with deployment failures, others need to be  
used to demonstrate problems.  It would be great to get them  
integrated somehow.

thanks
david jencks


On Nov 29, 2006, at 11:00 AM, niteryder wrote:

>
> Hi,
>
> I used geronimo 1.1.1 which i downloaded with this link
>
> http://www.apache.org/dyn/closer.cgi/geronimo/1.1.1/geronimo-tomcat- 
> j2ee-1.1.1.zip
>
> I got a deployment error on console 'Deploy New' feauture
> In ear file there is only one module which is the web app
> It has web.xml and geronimo-web.xml under WEB-INF
> As you see jdbc/TEST1 is linked with dependency to the console db  
> pool TEST1
> And i am sure the names are correct because it is running when you  
> deploy
> only that war.
> then i put it in an ear and add as the only module in
> geronimo-application.xml
> but it gave error about jdbc/TEST1
> then i put a copy of geronimo-web.xml under deployment folder at  
> top level
> of ear
> and add alt-dd node to the module but again it couldn't reach
> then i added dependency nodes to geronimo-application.xml when I  
> saw on
> Guillaume's message and it is deployed.
> i also checked ear and war file in it. all xml files are in their  
> places but
> it cannot or doesn't check geronimo-web.xml for datasource  
> dependencies.
>
> thanks,
>
> seckin
>
>
> djencks wrote:
>>
>> This sounds like a bug to me.  Which version of geronimo are you
>> using?  Are you only accessing the datasources from the web app with
>> the dependendencies in the geronimo-web.xml and not from any other
>> module in the ear?  Just to be clear, you get a deployment error not
>> a runtime error?
>>
>> many thanks
>> david jencks
>>
>> On Nov 29, 2006, at 5:29 AM, niteryder wrote:
>>
>>>
>>> Hi Lasantha,
>>>
>>> I've already answered Guillaume's answer, it is deployed now. But i
>>> want to
>>> ask a question about the structure.
>>>
>>> First i created database pools from the console
>>> then I deployed a war project with geronimo-web.xml in it
>>>
>>> geronimo-web.xml
>>> ------------------------------
>>>
>>> <web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-1.1">
>>> 	<environment>
>>> 		<moduleId>
>>> 			<artifactId>test-war</artifactId>
>>> 		</moduleId>
>>> 		<dependencies>
>>> 			<dependency>
>>> 				<groupId>console.dbpool</groupId>
>>> 				<artifactId>TEST1</artifactId>
>>> 			</dependency>
>>> 			<dependency>
>>> 				<groupId>console.dbpool</groupId>
>>> 				<artifactId>TEST2</artifactId>
>>> 			</dependency>
>>> 		</dependencies>
>>> 	</environment>
>>> 	<context-root>/test-war</context-root>
>>> 	<!-- define a reference name to the db pool-->
>>> 	<resource-ref>
>>> 		<ref-name>jdbc/TEST1</ref-name>
>>> 		<resource-link>TEST1</resource-link>
>>> 	</resource-ref>
>>> 	<resource-ref>
>>> 		<ref-name>jdbc/TEST2</ref-name>
>>> 		<resource-link>TEST2</resource-link>
>>> 	</resource-ref>
>>> </web-app>
>>>
>>> Later I want to put this war project into an ear and deploy to
>>> geronimo.
>>> This time i had to prepare geronimo-application.xml
>>> but I didn't realize that i have to put dependencies again to
>>> geronimo-application.xml
>>> I was expecting it to find from geronimo-web.xml (I put it also
>>> under a
>>> folder named 'deployment' in ear and referenced it with alt-dd
>>> under module)
>>>
>>> <application xmlns="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"
>>> application-name="test-ear">
>>>   <sys:environment>
>>>     <sys:moduleId>
>>>       <sys:groupId>default</sys:groupId>
>>>       <sys:artifactId>test-ear</sys:artifactId>
>>>       <sys:version>1.0</sys:version>
>>>       <sys:type>car</sys:type>
>>>     </sys:moduleId>
>>>     <sys:dependencies/>
>>>   </sys:environment>
>>>   <module>
>>>     <web>test-war.war</web>
>>>     <alt-dd>deployment/geronimo-web.xml</alt-dd>
>>>   </module>
>>> </application>
>>>
>>> this was giving unable to resolve resource reference jdbc/TEST1
>>>
>>> then i changed geronimo-application.xml like below and it is  
>>> deployed
>>>
>>> <application xmlns="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"
>>> application-name="test-ear">
>>>   <sys:environment>
>>>     <sys:moduleId>
>>>       <sys:groupId>default</sys:groupId>
>>>       <sys:artifactId>test-ear</sys:artifactId>
>>>       <sys:version>1.0</sys:version>
>>>       <sys:type>car</sys:type>
>>>     </sys:moduleId>
>>>     <sys:dependencies>
>>>       <sys:dependency>
>>>         <sys:groupId>console.dbpool</sys:groupId>
>>>         <sys:artifactId>TEST1</sys:artifactId>
>>>         <sys:version>1.0</sys:version>
>>>         <sys:type>rar</sys:type>
>>>       </sys:dependency>
>>>       <sys:dependency>
>>>         <sys:groupId>console.dbpool</sys:groupId>
>>>         <sys:artifactId>TEST2</sys:artifactId>
>>>         <sys:version>1.0</sys:version>
>>>         <sys:type>rar</sys:type>
>>>       </sys:dependency>
>>>     </sys:dependencies>
>>>   </sys:environment>
>>>   <module>
>>>     <web>test-war.war</web>
>>>     <alt-dd>deployment/geronimo-web.xml</alt-dd>
>>>   </module>
>>> </application>
>>>
>>>
>>> But my question is how can i make these dependencies for only a
>>> project in
>>> ear. I mean only the web project have dependency to these
>>> datasources in ear
>>> and i've already put these dependency in geronimo-web.xml
>>> and if it gives this error that means it checks web.xml of war
>>> project so it
>>> might also check geronimo-web.xml
>>> because if i want only deploy war project (not in ear), it exactly
>>> does this
>>> right? it finds the dependencies from geronimo-web.xml so it
>>> successfully
>>> deploys war project.
>>>
>>> if this is the only way for ear should i remove the dependencies in
>>> geronimo-web.xml ?
>>>
>>> Thanks
>>>
>>>
>>> Lasantha Ranaweera wrote:
>>>>
>>>> Hi,
>>>>
>>>> Could you be bit more specific on your situation? I might be  
>>>> able to
>>>> help you as the author of this sample application. :)
>>>>
>>>> Thanks,
>>>> Lasantha Ranaweera
>>>> niteryder wrote:
>>>>> Hi Guillaume,
>>>>>
>>>>> Have you succeeded on this issue? I have similar problem, I can
>>>>> deploy
>>>>> war
>>>>> individually and I can use the database pools that I created with
>>>>> Geronimo's
>>>>> with this deployed war. But when i want to add this war to an ear
>>>>> and
>>>>> deploy
>>>>> it. I also take similar messages for my datasources.
>>>>>
>>>>> Thanks
>>>>>
>>>>>
>>>>> Guillaume Bilodeau wrote:
>>>>>
>>>>>> I agree it's a good sign that the data source is actually usable
>>>>>> from
>>>>>> the
>>>>>> sample application.  However from what I understand this
>>>>>> application
>>>>>> does
>>>>>> not have a strict dependency to a specific data source like our
>>>>>> application - it instead discovers them programmatically.
>>>>>>
>>>>>> The problem I'm describing is actually happening during the
>>>>>> deployment
>>>>>> phase: I open the "Deploy new" screen, select the application
>>>>>> EAR, I
>>>>>> even
>>>>>> uncheck the "Start after install" option and finally click on
>>>>>> Deploy.  A
>>>>>> few instants later, Geronimo gives the following message:
>>>>>>
>>>>>> 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?)
>>>>>>
>>>>>> AFAICT, the application wasn't started yet, so I presume it's
>>>>>> more a
>>>>>> configuration issue than an application issue.  The problem is,
>>>>>> everything
>>>>>> seems to be configured according to the Geronimo usage page :)
>>>>>>
>>>>>> The applicationContext.xml file is a configuration file for the
>>>>>> Spring
>>>>>> framework.  In our application, this file isn't loaded right on
>>>>>> startup
>>>>>> so
>>>>>> I doubt it's interfering with anything.
>>>>>>
>>>>>> I didn't mention yet but the application runs fine on  
>>>>>> Glassfish and
>>>>>> Tomcat, so I suppose I'm not configuring Geronimo or access to it
>>>>>> correctly.
>>>>>>
>>>>>> I'll have a look at the simple-database-access-sample-
>>>>>> application and
>>>>>> let
>>>>>> you know if it's not too late - it's Friday after all :)
>>>>>>
>>>>>> Thanks!
>>>>>> GB
>>>>>>
>>>>>>
>>>>>> Lasantha Ranaweera wrote:
>>>>>>
>>>>>>> Ok.. Then we can suspect problem is in your application.  :-)
>>>>>>>
>>>>>>> I saw file called in "applicationConext.xml" one of your  
>>>>>>> previous
>>>>>>> mails.
>>>>>>> What exactly that means?
>>>>>>>
>>>>>>> To link a DBPool with your web application you need to add
>>>>>>> reference in
>>>>>>> your geronimo-web.xml file too. Then it should be linked with
>>>>>>> web.xml.
>>>>>>> Have a look at
>>>>>>>
>>>>>>> http://cwiki.apache.org/GMOxDOC11/simple-database-access-sample-
>>>>>>> application.html
>>>>>>>
>>>>>>> Let us know your status too.
>>>>>>>
>>>>>>> Thanks,
>>>>>>> Lasantha Ranaweera
>>>>>>>
>>>>>>>
>>>>>>> Guillaume Bilodeau wrote:
>>>>>>>
>>>>>>>> I've tested the pool before deploying it and it worked fine.
>>>>>>>> I have
>>>>>>>> now
>>>>>>>> downloaded, built and deployed the dbtester sample application
>>>>>>>> with
>>>>>>>> correct
>>>>>>>> results: my AuchanPromoDS pool is there, and I can list its
>>>>>>>> tables and
>>>>>>>> their
>>>>>>>> content with no error whatsoever.
>>>>>>>>
>>>>>>>> Everything looks fine, how come my application will not even
>>>>>>>> deploy?
>>>>>>>> I'm at
>>>>>>>> a loss here :S
>>>>>>>>
>>>>>>>> Thanks again,
>>>>>>>> GB
>>>>>>>>
>>>>>>>>
>>>>>>>> Lasantha Ranaweera wrote:
>>>>>>>>
>>>>>>>>
>>>>>>>>> Since you have deployed DB pool using G console, have you
>>>>>>>>> tested it
>>>>>>>>> before deploying?
>>>>>>>>>
>>>>>>>>> Otherwise have a look at this sample application which help
>>>>>>>>> to find
>>>>>>>>> out
>>>>>>>>> your DB connection pools is working or not.
>>>>>>>>>
>>>>>>>>> http://cwiki.apache.org/GMOxDOC11/db-pool-testing-sample-
>>>>>>>>> application.html
>>>>>>>>>
>>>>>>>>> Thanks,
>>>>>>>>> Lasantha Ranaweera
>>>>>>>>>
>>>>>>>>> Guillaume Bilodeau wrote:
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>> No it's a remote Oracle database.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Lasantha Ranaweera wrote:
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>> What is the DB you are using? Is it Derby Embedded?
>>>>>>>>>>>
>>>>>>>>>>> Thanks,
>>>>>>>>>>> Lasantha Ranaweera
>>>>>>>>>>>
>>>>>>>>>>> Guillaume Bilodeau wrote:
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>> Hi David,
>>>>>>>>>>>>
>>>>>>>>>>>> Not sure if that's what you mean, but I deployed the
>>>>>>>>>>>> datasource
>>>>>>>>>>>> myself
>>>>>>>>>>>> using
>>>>>>>>>>>> the "Geronimo database pool wizard", not through a separate
>>>>>>>>>>>> deployment
>>>>>>>>>>>> plan.
>>>>>>>>>>>> Is that it?
>>>>>>>>>>>>
>>>>>>>>>>>> Thanks,
>>>>>>>>>>>> GB
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> David Jencks wrote:
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>> Everything you show looks ok to me, which makes me wonder
>>>>>>>>>>>>> if the
>>>>>>>>>>>>> console-generated rar plan really has the connection  
>>>>>>>>>>>>> factory
>>>>>>>>>>>>> named
>>>>>>>>>>>>> AuchanPromoDS.  Could you show the plan for deploying the
>>>>>>>>>>>>> datasource?
>>>>>>>>>>>>>
>>>>>>>>>>>>> thanks
>>>>>>>>>>>>> david jencks
>>>>>>>>>>>>>
>>>>>>>>>>>>> On Oct 26, 2006, at 11:03 PM, Guillaume Bilodeau 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 <gb...@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.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>
>>> -- 
>>> View this message in context: http://www.nabble.com/Error-deploying-
>>> EAR-because-of-DataSource-tf2513035.html#a7599290
>>> Sent from the Apache Geronimo - Users mailing list archive at
>>> Nabble.com.
>>>
>>
>>
>>
>
> -- 
> View this message in context: http://www.nabble.com/Error-deploying- 
> EAR-because-of-DataSource-tf2513035.html#a7605650
> Sent from the Apache Geronimo - Users mailing list archive at  
> Nabble.com.
>


Re: Error deploying EAR because of DataSource

Posted by niteryder <ni...@hotmail.com>.
Hi,

I used geronimo 1.1.1 which i downloaded with this link

http://www.apache.org/dyn/closer.cgi/geronimo/1.1.1/geronimo-tomcat-j2ee-1.1.1.zip

I got a deployment error on console 'Deploy New' feauture 
In ear file there is only one module which is the web app
It has web.xml and geronimo-web.xml under WEB-INF
As you see jdbc/TEST1 is linked with dependency to the console db pool TEST1
And i am sure the names are correct because it is running when you deploy
only that war.
then i put it in an ear and add as the only module in
geronimo-application.xml
but it gave error about jdbc/TEST1
then i put a copy of geronimo-web.xml under deployment folder at top level
of ear
and add alt-dd node to the module but again it couldn't reach
then i added dependency nodes to geronimo-application.xml when I saw on
Guillaume's message and it is deployed.
i also checked ear and war file in it. all xml files are in their places but
it cannot or doesn't check geronimo-web.xml for datasource dependencies.

thanks,

seckin


djencks wrote:
> 
> This sounds like a bug to me.  Which version of geronimo are you  
> using?  Are you only accessing the datasources from the web app with  
> the dependendencies in the geronimo-web.xml and not from any other  
> module in the ear?  Just to be clear, you get a deployment error not  
> a runtime error?
> 
> many thanks
> david jencks
> 
> On Nov 29, 2006, at 5:29 AM, niteryder wrote:
> 
>>
>> Hi Lasantha,
>>
>> I've already answered Guillaume's answer, it is deployed now. But i  
>> want to
>> ask a question about the structure.
>>
>> First i created database pools from the console
>> then I deployed a war project with geronimo-web.xml in it
>>
>> geronimo-web.xml
>> ------------------------------
>>
>> <web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-1.1">
>> 	<environment>
>> 		<moduleId>
>> 			<artifactId>test-war</artifactId>
>> 		</moduleId>
>> 		<dependencies>
>> 			<dependency>
>> 				<groupId>console.dbpool</groupId>
>> 				<artifactId>TEST1</artifactId>
>> 			</dependency>
>> 			<dependency>
>> 				<groupId>console.dbpool</groupId>
>> 				<artifactId>TEST2</artifactId>
>> 			</dependency>
>> 		</dependencies>
>> 	</environment>
>> 	<context-root>/test-war</context-root>
>> 	<!-- define a reference name to the db pool-->
>> 	<resource-ref>
>> 		<ref-name>jdbc/TEST1</ref-name>
>> 		<resource-link>TEST1</resource-link>
>> 	</resource-ref>
>> 	<resource-ref>
>> 		<ref-name>jdbc/TEST2</ref-name>
>> 		<resource-link>TEST2</resource-link>
>> 	</resource-ref>
>> </web-app>
>>
>> Later I want to put this war project into an ear and deploy to  
>> geronimo.
>> This time i had to prepare geronimo-application.xml
>> but I didn't realize that i have to put dependencies again to
>> geronimo-application.xml
>> I was expecting it to find from geronimo-web.xml (I put it also  
>> under a
>> folder named 'deployment' in ear and referenced it with alt-dd  
>> under module)
>>
>> <application xmlns="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"
>> application-name="test-ear">
>>   <sys:environment>
>>     <sys:moduleId>
>>       <sys:groupId>default</sys:groupId>
>>       <sys:artifactId>test-ear</sys:artifactId>
>>       <sys:version>1.0</sys:version>
>>       <sys:type>car</sys:type>
>>     </sys:moduleId>
>>     <sys:dependencies/>
>>   </sys:environment>
>>   <module>
>>     <web>test-war.war</web>
>>     <alt-dd>deployment/geronimo-web.xml</alt-dd>
>>   </module>
>> </application>
>>
>> this was giving unable to resolve resource reference jdbc/TEST1
>>
>> then i changed geronimo-application.xml like below and it is deployed
>>
>> <application xmlns="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"
>> application-name="test-ear">
>>   <sys:environment>
>>     <sys:moduleId>
>>       <sys:groupId>default</sys:groupId>
>>       <sys:artifactId>test-ear</sys:artifactId>
>>       <sys:version>1.0</sys:version>
>>       <sys:type>car</sys:type>
>>     </sys:moduleId>
>>     <sys:dependencies>
>>       <sys:dependency>
>>         <sys:groupId>console.dbpool</sys:groupId>
>>         <sys:artifactId>TEST1</sys:artifactId>
>>         <sys:version>1.0</sys:version>
>>         <sys:type>rar</sys:type>
>>       </sys:dependency>
>>       <sys:dependency>
>>         <sys:groupId>console.dbpool</sys:groupId>
>>         <sys:artifactId>TEST2</sys:artifactId>
>>         <sys:version>1.0</sys:version>
>>         <sys:type>rar</sys:type>
>>       </sys:dependency>
>>     </sys:dependencies>
>>   </sys:environment>
>>   <module>
>>     <web>test-war.war</web>
>>     <alt-dd>deployment/geronimo-web.xml</alt-dd>
>>   </module>
>> </application>
>>
>>
>> But my question is how can i make these dependencies for only a  
>> project in
>> ear. I mean only the web project have dependency to these  
>> datasources in ear
>> and i've already put these dependency in geronimo-web.xml
>> and if it gives this error that means it checks web.xml of war  
>> project so it
>> might also check geronimo-web.xml
>> because if i want only deploy war project (not in ear), it exactly  
>> does this
>> right? it finds the dependencies from geronimo-web.xml so it  
>> successfully
>> deploys war project.
>>
>> if this is the only way for ear should i remove the dependencies in
>> geronimo-web.xml ?
>>
>> Thanks
>>
>>
>> Lasantha Ranaweera wrote:
>>>
>>> Hi,
>>>
>>> Could you be bit more specific on your situation? I might be able to
>>> help you as the author of this sample application. :)
>>>
>>> Thanks,
>>> Lasantha Ranaweera
>>> niteryder wrote:
>>>> Hi Guillaume,
>>>>
>>>> Have you succeeded on this issue? I have similar problem, I can  
>>>> deploy
>>>> war
>>>> individually and I can use the database pools that I created with
>>>> Geronimo's
>>>> with this deployed war. But when i want to add this war to an ear  
>>>> and
>>>> deploy
>>>> it. I also take similar messages for my datasources.
>>>>
>>>> Thanks
>>>>
>>>>
>>>> Guillaume Bilodeau wrote:
>>>>
>>>>> I agree it's a good sign that the data source is actually usable  
>>>>> from
>>>>> the
>>>>> sample application.  However from what I understand this  
>>>>> application
>>>>> does
>>>>> not have a strict dependency to a specific data source like our
>>>>> application - it instead discovers them programmatically.
>>>>>
>>>>> The problem I'm describing is actually happening during the  
>>>>> deployment
>>>>> phase: I open the "Deploy new" screen, select the application  
>>>>> EAR, I
>>>>> even
>>>>> uncheck the "Start after install" option and finally click on  
>>>>> Deploy.  A
>>>>> few instants later, Geronimo gives the following message:
>>>>>
>>>>> 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?)
>>>>>
>>>>> AFAICT, the application wasn't started yet, so I presume it's  
>>>>> more a
>>>>> configuration issue than an application issue.  The problem is,
>>>>> everything
>>>>> seems to be configured according to the Geronimo usage page :)
>>>>>
>>>>> The applicationContext.xml file is a configuration file for the  
>>>>> Spring
>>>>> framework.  In our application, this file isn't loaded right on  
>>>>> startup
>>>>> so
>>>>> I doubt it's interfering with anything.
>>>>>
>>>>> I didn't mention yet but the application runs fine on Glassfish and
>>>>> Tomcat, so I suppose I'm not configuring Geronimo or access to it
>>>>> correctly.
>>>>>
>>>>> I'll have a look at the simple-database-access-sample- 
>>>>> application and
>>>>> let
>>>>> you know if it's not too late - it's Friday after all :)
>>>>>
>>>>> Thanks!
>>>>> GB
>>>>>
>>>>>
>>>>> Lasantha Ranaweera wrote:
>>>>>
>>>>>> Ok.. Then we can suspect problem is in your application.  :-)
>>>>>>
>>>>>> I saw file called in "applicationConext.xml" one of your previous
>>>>>> mails.
>>>>>> What exactly that means?
>>>>>>
>>>>>> To link a DBPool with your web application you need to add  
>>>>>> reference in
>>>>>> your geronimo-web.xml file too. Then it should be linked with  
>>>>>> web.xml.
>>>>>> Have a look at
>>>>>>
>>>>>> http://cwiki.apache.org/GMOxDOC11/simple-database-access-sample- 
>>>>>> application.html
>>>>>>
>>>>>> Let us know your status too.
>>>>>>
>>>>>> Thanks,
>>>>>> Lasantha Ranaweera
>>>>>>
>>>>>>
>>>>>> Guillaume Bilodeau wrote:
>>>>>>
>>>>>>> I've tested the pool before deploying it and it worked fine.   
>>>>>>> I have
>>>>>>> now
>>>>>>> downloaded, built and deployed the dbtester sample application  
>>>>>>> with
>>>>>>> correct
>>>>>>> results: my AuchanPromoDS pool is there, and I can list its  
>>>>>>> tables and
>>>>>>> their
>>>>>>> content with no error whatsoever.
>>>>>>>
>>>>>>> Everything looks fine, how come my application will not even  
>>>>>>> deploy?
>>>>>>> I'm at
>>>>>>> a loss here :S
>>>>>>>
>>>>>>> Thanks again,
>>>>>>> GB
>>>>>>>
>>>>>>>
>>>>>>> Lasantha Ranaweera wrote:
>>>>>>>
>>>>>>>
>>>>>>>> Since you have deployed DB pool using G console, have you  
>>>>>>>> tested it
>>>>>>>> before deploying?
>>>>>>>>
>>>>>>>> Otherwise have a look at this sample application which help  
>>>>>>>> to find
>>>>>>>> out
>>>>>>>> your DB connection pools is working or not.
>>>>>>>>
>>>>>>>> http://cwiki.apache.org/GMOxDOC11/db-pool-testing-sample- 
>>>>>>>> application.html
>>>>>>>>
>>>>>>>> Thanks,
>>>>>>>> Lasantha Ranaweera
>>>>>>>>
>>>>>>>> Guillaume Bilodeau wrote:
>>>>>>>>
>>>>>>>>
>>>>>>>>> No it's a remote Oracle database.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Lasantha Ranaweera wrote:
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>> What is the DB you are using? Is it Derby Embedded?
>>>>>>>>>>
>>>>>>>>>> Thanks,
>>>>>>>>>> Lasantha Ranaweera
>>>>>>>>>>
>>>>>>>>>> Guillaume Bilodeau wrote:
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>> Hi David,
>>>>>>>>>>>
>>>>>>>>>>> Not sure if that's what you mean, but I deployed the  
>>>>>>>>>>> datasource
>>>>>>>>>>> myself
>>>>>>>>>>> using
>>>>>>>>>>> the "Geronimo database pool wizard", not through a separate
>>>>>>>>>>> deployment
>>>>>>>>>>> plan.
>>>>>>>>>>> Is that it?
>>>>>>>>>>>
>>>>>>>>>>> Thanks,
>>>>>>>>>>> GB
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> David Jencks wrote:
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>> Everything you show looks ok to me, which makes me wonder  
>>>>>>>>>>>> if the
>>>>>>>>>>>> console-generated rar plan really has the connection factory
>>>>>>>>>>>> named
>>>>>>>>>>>> AuchanPromoDS.  Could you show the plan for deploying the
>>>>>>>>>>>> datasource?
>>>>>>>>>>>>
>>>>>>>>>>>> thanks
>>>>>>>>>>>> david jencks
>>>>>>>>>>>>
>>>>>>>>>>>> On Oct 26, 2006, at 11:03 PM, Guillaume Bilodeau 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 <gb...@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.
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>>
>>
>> -- 
>> View this message in context: http://www.nabble.com/Error-deploying- 
>> EAR-because-of-DataSource-tf2513035.html#a7599290
>> Sent from the Apache Geronimo - Users mailing list archive at  
>> Nabble.com.
>>
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Error-deploying-EAR-because-of-DataSource-tf2513035.html#a7605650
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.


Re: Error deploying EAR because of DataSource

Posted by David Jencks <da...@yahoo.com>.
This sounds like a bug to me.  Which version of geronimo are you  
using?  Are you only accessing the datasources from the web app with  
the dependendencies in the geronimo-web.xml and not from any other  
module in the ear?  Just to be clear, you get a deployment error not  
a runtime error?

many thanks
david jencks

On Nov 29, 2006, at 5:29 AM, niteryder wrote:

>
> Hi Lasantha,
>
> I've already answered Guillaume's answer, it is deployed now. But i  
> want to
> ask a question about the structure.
>
> First i created database pools from the console
> then I deployed a war project with geronimo-web.xml in it
>
> geronimo-web.xml
> ------------------------------
>
> <web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-1.1">
> 	<environment>
> 		<moduleId>
> 			<artifactId>test-war</artifactId>
> 		</moduleId>
> 		<dependencies>
> 			<dependency>
> 				<groupId>console.dbpool</groupId>
> 				<artifactId>TEST1</artifactId>
> 			</dependency>
> 			<dependency>
> 				<groupId>console.dbpool</groupId>
> 				<artifactId>TEST2</artifactId>
> 			</dependency>
> 		</dependencies>
> 	</environment>
> 	<context-root>/test-war</context-root>
> 	<!-- define a reference name to the db pool-->
> 	<resource-ref>
> 		<ref-name>jdbc/TEST1</ref-name>
> 		<resource-link>TEST1</resource-link>
> 	</resource-ref>
> 	<resource-ref>
> 		<ref-name>jdbc/TEST2</ref-name>
> 		<resource-link>TEST2</resource-link>
> 	</resource-ref>
> </web-app>
>
> Later I want to put this war project into an ear and deploy to  
> geronimo.
> This time i had to prepare geronimo-application.xml
> but I didn't realize that i have to put dependencies again to
> geronimo-application.xml
> I was expecting it to find from geronimo-web.xml (I put it also  
> under a
> folder named 'deployment' in ear and referenced it with alt-dd  
> under module)
>
> <application xmlns="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"
> application-name="test-ear">
>   <sys:environment>
>     <sys:moduleId>
>       <sys:groupId>default</sys:groupId>
>       <sys:artifactId>test-ear</sys:artifactId>
>       <sys:version>1.0</sys:version>
>       <sys:type>car</sys:type>
>     </sys:moduleId>
>     <sys:dependencies/>
>   </sys:environment>
>   <module>
>     <web>test-war.war</web>
>     <alt-dd>deployment/geronimo-web.xml</alt-dd>
>   </module>
> </application>
>
> this was giving unable to resolve resource reference jdbc/TEST1
>
> then i changed geronimo-application.xml like below and it is deployed
>
> <application xmlns="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"
> application-name="test-ear">
>   <sys:environment>
>     <sys:moduleId>
>       <sys:groupId>default</sys:groupId>
>       <sys:artifactId>test-ear</sys:artifactId>
>       <sys:version>1.0</sys:version>
>       <sys:type>car</sys:type>
>     </sys:moduleId>
>     <sys:dependencies>
>       <sys:dependency>
>         <sys:groupId>console.dbpool</sys:groupId>
>         <sys:artifactId>TEST1</sys:artifactId>
>         <sys:version>1.0</sys:version>
>         <sys:type>rar</sys:type>
>       </sys:dependency>
>       <sys:dependency>
>         <sys:groupId>console.dbpool</sys:groupId>
>         <sys:artifactId>TEST2</sys:artifactId>
>         <sys:version>1.0</sys:version>
>         <sys:type>rar</sys:type>
>       </sys:dependency>
>     </sys:dependencies>
>   </sys:environment>
>   <module>
>     <web>test-war.war</web>
>     <alt-dd>deployment/geronimo-web.xml</alt-dd>
>   </module>
> </application>
>
>
> But my question is how can i make these dependencies for only a  
> project in
> ear. I mean only the web project have dependency to these  
> datasources in ear
> and i've already put these dependency in geronimo-web.xml
> and if it gives this error that means it checks web.xml of war  
> project so it
> might also check geronimo-web.xml
> because if i want only deploy war project (not in ear), it exactly  
> does this
> right? it finds the dependencies from geronimo-web.xml so it  
> successfully
> deploys war project.
>
> if this is the only way for ear should i remove the dependencies in
> geronimo-web.xml ?
>
> Thanks
>
>
> Lasantha Ranaweera wrote:
>>
>> Hi,
>>
>> Could you be bit more specific on your situation? I might be able to
>> help you as the author of this sample application. :)
>>
>> Thanks,
>> Lasantha Ranaweera
>> niteryder wrote:
>>> Hi Guillaume,
>>>
>>> Have you succeeded on this issue? I have similar problem, I can  
>>> deploy
>>> war
>>> individually and I can use the database pools that I created with
>>> Geronimo's
>>> with this deployed war. But when i want to add this war to an ear  
>>> and
>>> deploy
>>> it. I also take similar messages for my datasources.
>>>
>>> Thanks
>>>
>>>
>>> Guillaume Bilodeau wrote:
>>>
>>>> I agree it's a good sign that the data source is actually usable  
>>>> from
>>>> the
>>>> sample application.  However from what I understand this  
>>>> application
>>>> does
>>>> not have a strict dependency to a specific data source like our
>>>> application - it instead discovers them programmatically.
>>>>
>>>> The problem I'm describing is actually happening during the  
>>>> deployment
>>>> phase: I open the "Deploy new" screen, select the application  
>>>> EAR, I
>>>> even
>>>> uncheck the "Start after install" option and finally click on  
>>>> Deploy.  A
>>>> few instants later, Geronimo gives the following message:
>>>>
>>>> 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?)
>>>>
>>>> AFAICT, the application wasn't started yet, so I presume it's  
>>>> more a
>>>> configuration issue than an application issue.  The problem is,
>>>> everything
>>>> seems to be configured according to the Geronimo usage page :)
>>>>
>>>> The applicationContext.xml file is a configuration file for the  
>>>> Spring
>>>> framework.  In our application, this file isn't loaded right on  
>>>> startup
>>>> so
>>>> I doubt it's interfering with anything.
>>>>
>>>> I didn't mention yet but the application runs fine on Glassfish and
>>>> Tomcat, so I suppose I'm not configuring Geronimo or access to it
>>>> correctly.
>>>>
>>>> I'll have a look at the simple-database-access-sample- 
>>>> application and
>>>> let
>>>> you know if it's not too late - it's Friday after all :)
>>>>
>>>> Thanks!
>>>> GB
>>>>
>>>>
>>>> Lasantha Ranaweera wrote:
>>>>
>>>>> Ok.. Then we can suspect problem is in your application.  :-)
>>>>>
>>>>> I saw file called in "applicationConext.xml" one of your previous
>>>>> mails.
>>>>> What exactly that means?
>>>>>
>>>>> To link a DBPool with your web application you need to add  
>>>>> reference in
>>>>> your geronimo-web.xml file too. Then it should be linked with  
>>>>> web.xml.
>>>>> Have a look at
>>>>>
>>>>> http://cwiki.apache.org/GMOxDOC11/simple-database-access-sample- 
>>>>> application.html
>>>>>
>>>>> Let us know your status too.
>>>>>
>>>>> Thanks,
>>>>> Lasantha Ranaweera
>>>>>
>>>>>
>>>>> Guillaume Bilodeau wrote:
>>>>>
>>>>>> I've tested the pool before deploying it and it worked fine.   
>>>>>> I have
>>>>>> now
>>>>>> downloaded, built and deployed the dbtester sample application  
>>>>>> with
>>>>>> correct
>>>>>> results: my AuchanPromoDS pool is there, and I can list its  
>>>>>> tables and
>>>>>> their
>>>>>> content with no error whatsoever.
>>>>>>
>>>>>> Everything looks fine, how come my application will not even  
>>>>>> deploy?
>>>>>> I'm at
>>>>>> a loss here :S
>>>>>>
>>>>>> Thanks again,
>>>>>> GB
>>>>>>
>>>>>>
>>>>>> Lasantha Ranaweera wrote:
>>>>>>
>>>>>>
>>>>>>> Since you have deployed DB pool using G console, have you  
>>>>>>> tested it
>>>>>>> before deploying?
>>>>>>>
>>>>>>> Otherwise have a look at this sample application which help  
>>>>>>> to find
>>>>>>> out
>>>>>>> your DB connection pools is working or not.
>>>>>>>
>>>>>>> http://cwiki.apache.org/GMOxDOC11/db-pool-testing-sample- 
>>>>>>> application.html
>>>>>>>
>>>>>>> Thanks,
>>>>>>> Lasantha Ranaweera
>>>>>>>
>>>>>>> Guillaume Bilodeau wrote:
>>>>>>>
>>>>>>>
>>>>>>>> No it's a remote Oracle database.
>>>>>>>>
>>>>>>>>
>>>>>>>> Lasantha Ranaweera wrote:
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>> What is the DB you are using? Is it Derby Embedded?
>>>>>>>>>
>>>>>>>>> Thanks,
>>>>>>>>> Lasantha Ranaweera
>>>>>>>>>
>>>>>>>>> Guillaume Bilodeau wrote:
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>> Hi David,
>>>>>>>>>>
>>>>>>>>>> Not sure if that's what you mean, but I deployed the  
>>>>>>>>>> datasource
>>>>>>>>>> myself
>>>>>>>>>> using
>>>>>>>>>> the "Geronimo database pool wizard", not through a separate
>>>>>>>>>> deployment
>>>>>>>>>> plan.
>>>>>>>>>> Is that it?
>>>>>>>>>>
>>>>>>>>>> Thanks,
>>>>>>>>>> GB
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> David Jencks wrote:
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>> Everything you show looks ok to me, which makes me wonder  
>>>>>>>>>>> if the
>>>>>>>>>>> console-generated rar plan really has the connection factory
>>>>>>>>>>> named
>>>>>>>>>>> AuchanPromoDS.  Could you show the plan for deploying the
>>>>>>>>>>> datasource?
>>>>>>>>>>>
>>>>>>>>>>> thanks
>>>>>>>>>>> david jencks
>>>>>>>>>>>
>>>>>>>>>>> On Oct 26, 2006, at 11:03 PM, Guillaume Bilodeau 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 <gb...@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.
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>
>>>
>>
>>
>>
>
> -- 
> View this message in context: http://www.nabble.com/Error-deploying- 
> EAR-because-of-DataSource-tf2513035.html#a7599290
> Sent from the Apache Geronimo - Users mailing list archive at  
> Nabble.com.
>


Re: Error deploying EAR because of DataSource

Posted by niteryder <ni...@hotmail.com>.
Hi Lasantha,

I've already answered Guillaume's answer, it is deployed now. But i want to
ask a question about the structure.

First i created database pools from the console
then I deployed a war project with geronimo-web.xml in it

geronimo-web.xml
------------------------------

<web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-1.1">
	<environment>
		<moduleId>
			<artifactId>test-war</artifactId>
		</moduleId>
		<dependencies>
			<dependency>
				<groupId>console.dbpool</groupId>
				<artifactId>TEST1</artifactId>
			</dependency>
			<dependency>
				<groupId>console.dbpool</groupId>
				<artifactId>TEST2</artifactId>
			</dependency>
		</dependencies>
	</environment>
	<context-root>/test-war</context-root>
	<!-- define a reference name to the db pool-->
	<resource-ref>
		<ref-name>jdbc/TEST1</ref-name>
		<resource-link>TEST1</resource-link>
	</resource-ref>    
	<resource-ref>
		<ref-name>jdbc/TEST2</ref-name>
		<resource-link>TEST2</resource-link>
	</resource-ref>    
</web-app>

Later I want to put this war project into an ear and deploy to geronimo.
This time i had to prepare geronimo-application.xml 
but I didn't realize that i have to put dependencies again to
geronimo-application.xml
I was expecting it to find from geronimo-web.xml (I put it also under a
folder named 'deployment' in ear and referenced it with alt-dd under module)

<application xmlns="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"
application-name="test-ear">
  <sys:environment>
    <sys:moduleId>
      <sys:groupId>default</sys:groupId>
      <sys:artifactId>test-ear</sys:artifactId>
      <sys:version>1.0</sys:version>
      <sys:type>car</sys:type>
    </sys:moduleId>
    <sys:dependencies/>
  </sys:environment>
  <module>
    <web>test-war.war</web>
    <alt-dd>deployment/geronimo-web.xml</alt-dd>
  </module>
</application>

this was giving unable to resolve resource reference jdbc/TEST1

then i changed geronimo-application.xml like below and it is deployed

<application xmlns="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"
application-name="test-ear">
  <sys:environment>
    <sys:moduleId>
      <sys:groupId>default</sys:groupId>
      <sys:artifactId>test-ear</sys:artifactId>
      <sys:version>1.0</sys:version>
      <sys:type>car</sys:type>
    </sys:moduleId>
    <sys:dependencies>
      <sys:dependency>
        <sys:groupId>console.dbpool</sys:groupId>
        <sys:artifactId>TEST1</sys:artifactId>
        <sys:version>1.0</sys:version>
        <sys:type>rar</sys:type>
      </sys:dependency>
      <sys:dependency>
        <sys:groupId>console.dbpool</sys:groupId>
        <sys:artifactId>TEST2</sys:artifactId>
        <sys:version>1.0</sys:version>
        <sys:type>rar</sys:type>
      </sys:dependency>
    </sys:dependencies>
  </sys:environment>
  <module>
    <web>test-war.war</web>
    <alt-dd>deployment/geronimo-web.xml</alt-dd>
  </module>
</application>


But my question is how can i make these dependencies for only a project in
ear. I mean only the web project have dependency to these datasources in ear
and i've already put these dependency in geronimo-web.xml 
and if it gives this error that means it checks web.xml of war project so it
might also check geronimo-web.xml
because if i want only deploy war project (not in ear), it exactly does this
right? it finds the dependencies from geronimo-web.xml so it successfully
deploys war project.

if this is the only way for ear should i remove the dependencies in
geronimo-web.xml ?

Thanks


Lasantha Ranaweera wrote:
> 
> Hi,
> 
> Could you be bit more specific on your situation? I might be able to 
> help you as the author of this sample application. :)
> 
> Thanks,
> Lasantha Ranaweera
> niteryder wrote:
>> Hi Guillaume,
>>
>> Have you succeeded on this issue? I have similar problem, I can deploy
>> war
>> individually and I can use the database pools that I created with
>> Geronimo's
>> with this deployed war. But when i want to add this war to an ear and
>> deploy
>> it. I also take similar messages for my datasources.
>>
>> Thanks
>>
>>
>> Guillaume Bilodeau wrote:
>>   
>>> I agree it's a good sign that the data source is actually usable from
>>> the
>>> sample application.  However from what I understand this application
>>> does
>>> not have a strict dependency to a specific data source like our
>>> application - it instead discovers them programmatically.
>>>
>>> The problem I'm describing is actually happening during the deployment
>>> phase: I open the "Deploy new" screen, select the application EAR, I
>>> even
>>> uncheck the "Start after install" option and finally click on Deploy.  A
>>> few instants later, Geronimo gives the following message:
>>>
>>> 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?)
>>>
>>> AFAICT, the application wasn't started yet, so I presume it's more a
>>> configuration issue than an application issue.  The problem is,
>>> everything
>>> seems to be configured according to the Geronimo usage page :)
>>>
>>> The applicationContext.xml file is a configuration file for the Spring
>>> framework.  In our application, this file isn't loaded right on startup
>>> so
>>> I doubt it's interfering with anything.
>>>
>>> I didn't mention yet but the application runs fine on Glassfish and
>>> Tomcat, so I suppose I'm not configuring Geronimo or access to it
>>> correctly.
>>>
>>> I'll have a look at the simple-database-access-sample-application and
>>> let
>>> you know if it's not too late - it's Friday after all :)
>>>
>>> Thanks!
>>> GB
>>>
>>>
>>> Lasantha Ranaweera wrote:
>>>     
>>>> Ok.. Then we can suspect problem is in your application.  :-)
>>>>
>>>> I saw file called in "applicationConext.xml" one of your previous
>>>> mails. 
>>>> What exactly that means?
>>>>
>>>> To link a DBPool with your web application you need to add reference in 
>>>> your geronimo-web.xml file too. Then it should be linked with web.xml. 
>>>> Have a look at
>>>>
>>>> http://cwiki.apache.org/GMOxDOC11/simple-database-access-sample-application.html
>>>>
>>>> Let us know your status too.
>>>>
>>>> Thanks,
>>>> Lasantha Ranaweera
>>>>
>>>>
>>>> Guillaume Bilodeau wrote:
>>>>       
>>>>> I've tested the pool before deploying it and it worked fine.  I have
>>>>> now
>>>>> downloaded, built and deployed the dbtester sample application with
>>>>> correct
>>>>> results: my AuchanPromoDS pool is there, and I can list its tables and
>>>>> their
>>>>> content with no error whatsoever.
>>>>>
>>>>> Everything looks fine, how come my application will not even deploy? 
>>>>> I'm at
>>>>> a loss here :S
>>>>>
>>>>> Thanks again,
>>>>> GB
>>>>>
>>>>>
>>>>> Lasantha Ranaweera wrote:
>>>>>   
>>>>>         
>>>>>> Since you have deployed DB pool using G console, have you tested it 
>>>>>> before deploying?
>>>>>>
>>>>>> Otherwise have a look at this sample application which help to find
>>>>>> out 
>>>>>> your DB connection pools is working or not.
>>>>>>
>>>>>> http://cwiki.apache.org/GMOxDOC11/db-pool-testing-sample-application.html
>>>>>>
>>>>>> Thanks,
>>>>>> Lasantha Ranaweera
>>>>>>
>>>>>> Guillaume Bilodeau wrote:
>>>>>>     
>>>>>>           
>>>>>>> No it's a remote Oracle database.
>>>>>>>
>>>>>>>
>>>>>>> Lasantha Ranaweera wrote:
>>>>>>>   
>>>>>>>       
>>>>>>>             
>>>>>>>> What is the DB you are using? Is it Derby Embedded?
>>>>>>>>
>>>>>>>> Thanks,
>>>>>>>> Lasantha Ranaweera
>>>>>>>>
>>>>>>>> Guillaume Bilodeau wrote:
>>>>>>>>     
>>>>>>>>         
>>>>>>>>               
>>>>>>>>> Hi David,
>>>>>>>>>
>>>>>>>>> Not sure if that's what you mean, but I deployed the datasource
>>>>>>>>> myself
>>>>>>>>> using
>>>>>>>>> the "Geronimo database pool wizard", not through a separate
>>>>>>>>> deployment
>>>>>>>>> plan. 
>>>>>>>>> Is that it?
>>>>>>>>>
>>>>>>>>> Thanks,
>>>>>>>>> GB
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> David Jencks wrote:
>>>>>>>>>   
>>>>>>>>>       
>>>>>>>>>           
>>>>>>>>>                 
>>>>>>>>>> Everything you show looks ok to me, which makes me wonder if the  
>>>>>>>>>> console-generated rar plan really has the connection factory
>>>>>>>>>> named  
>>>>>>>>>> AuchanPromoDS.  Could you show the plan for deploying the
>>>>>>>>>> datasource?
>>>>>>>>>>
>>>>>>>>>> thanks
>>>>>>>>>> david jencks
>>>>>>>>>>
>>>>>>>>>> On Oct 26, 2006, at 11:03 PM, Guillaume Bilodeau 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 <gb...@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.
>>>>>>>>>>>
>>>>>>>>>>>       
>>>>>>>>>>>           
>>>>>>>>>>>               
>>>>>>>>>>>                     
>>>>>>>>>>     
>>>>>>>>>>         
>>>>>>>>>>             
>>>>>>>>>>                   
>>>>>>>>>   
>>>>>>>>>       
>>>>>>>>>           
>>>>>>>>>                 
>>>>>>>>     
>>>>>>>>         
>>>>>>>>               
>>>>>>>   
>>>>>>>       
>>>>>>>             
>>>>>>     
>>>>>>           
>>>>>   
>>>>>         
>>>>
>>>>       
>>>     
>>
>>   
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Error-deploying-EAR-because-of-DataSource-tf2513035.html#a7599290
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.


Re: Error deploying EAR because of DataSource

Posted by Lasantha Ranaweera <la...@opensource.lk>.
Hi,

Could you be bit more specific on your situation? I might be able to 
help you as the author of this sample application. :)

Thanks,
Lasantha Ranaweera
niteryder wrote:
> Hi Guillaume,
>
> Have you succeeded on this issue? I have similar problem, I can deploy war
> individually and I can use the database pools that I created with Geronimo's
> with this deployed war. But when i want to add this war to an ear and deploy
> it. I also take similar messages for my datasources.
>
> Thanks
>
>
> Guillaume Bilodeau wrote:
>   
>> I agree it's a good sign that the data source is actually usable from the
>> sample application.  However from what I understand this application does
>> not have a strict dependency to a specific data source like our
>> application - it instead discovers them programmatically.
>>
>> The problem I'm describing is actually happening during the deployment
>> phase: I open the "Deploy new" screen, select the application EAR, I even
>> uncheck the "Start after install" option and finally click on Deploy.  A
>> few instants later, Geronimo gives the following message:
>>
>> 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?)
>>
>> AFAICT, the application wasn't started yet, so I presume it's more a
>> configuration issue than an application issue.  The problem is, everything
>> seems to be configured according to the Geronimo usage page :)
>>
>> The applicationContext.xml file is a configuration file for the Spring
>> framework.  In our application, this file isn't loaded right on startup so
>> I doubt it's interfering with anything.
>>
>> I didn't mention yet but the application runs fine on Glassfish and
>> Tomcat, so I suppose I'm not configuring Geronimo or access to it
>> correctly.
>>
>> I'll have a look at the simple-database-access-sample-application and let
>> you know if it's not too late - it's Friday after all :)
>>
>> Thanks!
>> GB
>>
>>
>> Lasantha Ranaweera wrote:
>>     
>>> Ok.. Then we can suspect problem is in your application.  :-)
>>>
>>> I saw file called in "applicationConext.xml" one of your previous mails. 
>>> What exactly that means?
>>>
>>> To link a DBPool with your web application you need to add reference in 
>>> your geronimo-web.xml file too. Then it should be linked with web.xml. 
>>> Have a look at
>>>
>>> http://cwiki.apache.org/GMOxDOC11/simple-database-access-sample-application.html
>>>
>>> Let us know your status too.
>>>
>>> Thanks,
>>> Lasantha Ranaweera
>>>
>>>
>>> Guillaume Bilodeau wrote:
>>>       
>>>> I've tested the pool before deploying it and it worked fine.  I have now
>>>> downloaded, built and deployed the dbtester sample application with
>>>> correct
>>>> results: my AuchanPromoDS pool is there, and I can list its tables and
>>>> their
>>>> content with no error whatsoever.
>>>>
>>>> Everything looks fine, how come my application will not even deploy? 
>>>> I'm at
>>>> a loss here :S
>>>>
>>>> Thanks again,
>>>> GB
>>>>
>>>>
>>>> Lasantha Ranaweera wrote:
>>>>   
>>>>         
>>>>> Since you have deployed DB pool using G console, have you tested it 
>>>>> before deploying?
>>>>>
>>>>> Otherwise have a look at this sample application which help to find out 
>>>>> your DB connection pools is working or not.
>>>>>
>>>>> http://cwiki.apache.org/GMOxDOC11/db-pool-testing-sample-application.html
>>>>>
>>>>> Thanks,
>>>>> Lasantha Ranaweera
>>>>>
>>>>> Guillaume Bilodeau wrote:
>>>>>     
>>>>>           
>>>>>> No it's a remote Oracle database.
>>>>>>
>>>>>>
>>>>>> Lasantha Ranaweera wrote:
>>>>>>   
>>>>>>       
>>>>>>             
>>>>>>> What is the DB you are using? Is it Derby Embedded?
>>>>>>>
>>>>>>> Thanks,
>>>>>>> Lasantha Ranaweera
>>>>>>>
>>>>>>> Guillaume Bilodeau wrote:
>>>>>>>     
>>>>>>>         
>>>>>>>               
>>>>>>>> Hi David,
>>>>>>>>
>>>>>>>> Not sure if that's what you mean, but I deployed the datasource
>>>>>>>> myself
>>>>>>>> using
>>>>>>>> the "Geronimo database pool wizard", not through a separate
>>>>>>>> deployment
>>>>>>>> plan. 
>>>>>>>> Is that it?
>>>>>>>>
>>>>>>>> Thanks,
>>>>>>>> GB
>>>>>>>>
>>>>>>>>
>>>>>>>> David Jencks wrote:
>>>>>>>>   
>>>>>>>>       
>>>>>>>>           
>>>>>>>>                 
>>>>>>>>> Everything you show looks ok to me, which makes me wonder if the  
>>>>>>>>> console-generated rar plan really has the connection factory named  
>>>>>>>>> AuchanPromoDS.  Could you show the plan for deploying the
>>>>>>>>> datasource?
>>>>>>>>>
>>>>>>>>> thanks
>>>>>>>>> david jencks
>>>>>>>>>
>>>>>>>>> On Oct 26, 2006, at 11:03 PM, Guillaume Bilodeau 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 <gb...@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.
>>>>>>>>>>
>>>>>>>>>>       
>>>>>>>>>>           
>>>>>>>>>>               
>>>>>>>>>>                     
>>>>>>>>>     
>>>>>>>>>         
>>>>>>>>>             
>>>>>>>>>                   
>>>>>>>>   
>>>>>>>>       
>>>>>>>>           
>>>>>>>>                 
>>>>>>>     
>>>>>>>         
>>>>>>>               
>>>>>>   
>>>>>>       
>>>>>>             
>>>>>     
>>>>>           
>>>>   
>>>>         
>>>
>>>       
>>     
>
>   


Re: Error deploying EAR because of DataSource

Posted by niteryder <ni...@hotmail.com>.
Thanks Guillaume,

when i put 

               <sys:dependencies> 
                        <sys:dependency> 
                                <sys:groupId>console.dbpool</sys:groupId> 
                                <sys:artifactId>myDSname</sys:artifactId> 
                        </sys:dependency> 
                </sys:dependencies>

to geronimo-application.xml. It is succesfully deployed. 

As I mentioned before I tried to deploy only war with these dependency in
geronimo-web.xml and it was deployed then i put the war in an ear and expect
it to find these dependency on war project. I was wrong. I should have put
dependencies also in geronimo-application.xml now it is working

Thanks again


Hi there,

Have a look at this message:
http://www.nabble.com/forum/ViewPost.jtp?post=7093845&framed=y

If you still get errors after that, let me know and I'll try to help you
out.

Cheers,
GB



niteryder wrote:
> 
> Hi Guillaume,
> 
> Have you succeeded on this issue? I have similar problem, I can deploy war
> individually and I can use the database pools that I created with
> Geronimo's with this deployed war. But when i want to add this war to an
> ear and deploy it. I also take similar messages for my datasources.
> 
> Thanks
> 
> 

-- 
View this message in context: http://www.nabble.com/Error-deploying-EAR-because-of-DataSource-tf2513035.html#a7598780
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.


Re: Error deploying EAR because of DataSource

Posted by Guillaume Bilodeau <gb...@yahoo.com>.
Hi there,

Have a look at this message:
http://www.nabble.com/forum/ViewPost.jtp?post=7093845&framed=y

If you still get errors after that, let me know and I'll try to help you
out.

Cheers,
GB



Hi Guillaume,

Have you succeeded on this issue? I have similar problem, I can deploy war
individually and I can use the database pools that I created with Geronimo's
with this deployed war. But when i want to add this war to an ear and deploy
it. I also take similar messages for my datasources.

Thanks

-- 
View this message in context: http://www.nabble.com/Error-deploying-EAR-because-of-DataSource-tf2513035.html#a7597667
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.


Re: Error deploying EAR because of DataSource

Posted by niteryder <ni...@hotmail.com>.
Hi Guillaume,

Have you succeeded on this issue? I have similar problem, I can deploy war
individually and I can use the database pools that I created with Geronimo's
with this deployed war. But when i want to add this war to an ear and deploy
it. I also take similar messages for my datasources.

Thanks


Guillaume Bilodeau wrote:
> 
> I agree it's a good sign that the data source is actually usable from the
> sample application.  However from what I understand this application does
> not have a strict dependency to a specific data source like our
> application - it instead discovers them programmatically.
> 
> The problem I'm describing is actually happening during the deployment
> phase: I open the "Deploy new" screen, select the application EAR, I even
> uncheck the "Start after install" option and finally click on Deploy.  A
> few instants later, Geronimo gives the following message:
> 
> 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?)
> 
> AFAICT, the application wasn't started yet, so I presume it's more a
> configuration issue than an application issue.  The problem is, everything
> seems to be configured according to the Geronimo usage page :)
> 
> The applicationContext.xml file is a configuration file for the Spring
> framework.  In our application, this file isn't loaded right on startup so
> I doubt it's interfering with anything.
> 
> I didn't mention yet but the application runs fine on Glassfish and
> Tomcat, so I suppose I'm not configuring Geronimo or access to it
> correctly.
> 
> I'll have a look at the simple-database-access-sample-application and let
> you know if it's not too late - it's Friday after all :)
> 
> Thanks!
> GB
> 
> 
> Lasantha Ranaweera wrote:
>> 
>> Ok.. Then we can suspect problem is in your application.  :-)
>> 
>> I saw file called in "applicationConext.xml" one of your previous mails. 
>> What exactly that means?
>> 
>> To link a DBPool with your web application you need to add reference in 
>> your geronimo-web.xml file too. Then it should be linked with web.xml. 
>> Have a look at
>> 
>> http://cwiki.apache.org/GMOxDOC11/simple-database-access-sample-application.html
>> 
>> Let us know your status too.
>> 
>> Thanks,
>> Lasantha Ranaweera
>> 
>> 
>> Guillaume Bilodeau wrote:
>>> I've tested the pool before deploying it and it worked fine.  I have now
>>> downloaded, built and deployed the dbtester sample application with
>>> correct
>>> results: my AuchanPromoDS pool is there, and I can list its tables and
>>> their
>>> content with no error whatsoever.
>>>
>>> Everything looks fine, how come my application will not even deploy? 
>>> I'm at
>>> a loss here :S
>>>
>>> Thanks again,
>>> GB
>>>
>>>
>>> Lasantha Ranaweera wrote:
>>>   
>>>> Since you have deployed DB pool using G console, have you tested it 
>>>> before deploying?
>>>>
>>>> Otherwise have a look at this sample application which help to find out 
>>>> your DB connection pools is working or not.
>>>>
>>>> http://cwiki.apache.org/GMOxDOC11/db-pool-testing-sample-application.html
>>>>
>>>> Thanks,
>>>> Lasantha Ranaweera
>>>>
>>>> Guillaume Bilodeau wrote:
>>>>     
>>>>> No it's a remote Oracle database.
>>>>>
>>>>>
>>>>> Lasantha Ranaweera wrote:
>>>>>   
>>>>>       
>>>>>> What is the DB you are using? Is it Derby Embedded?
>>>>>>
>>>>>> Thanks,
>>>>>> Lasantha Ranaweera
>>>>>>
>>>>>> Guillaume Bilodeau wrote:
>>>>>>     
>>>>>>         
>>>>>>> Hi David,
>>>>>>>
>>>>>>> Not sure if that's what you mean, but I deployed the datasource
>>>>>>> myself
>>>>>>> using
>>>>>>> the "Geronimo database pool wizard", not through a separate
>>>>>>> deployment
>>>>>>> plan. 
>>>>>>> Is that it?
>>>>>>>
>>>>>>> Thanks,
>>>>>>> GB
>>>>>>>
>>>>>>>
>>>>>>> David Jencks wrote:
>>>>>>>   
>>>>>>>       
>>>>>>>           
>>>>>>>> Everything you show looks ok to me, which makes me wonder if the  
>>>>>>>> console-generated rar plan really has the connection factory named  
>>>>>>>> AuchanPromoDS.  Could you show the plan for deploying the
>>>>>>>> datasource?
>>>>>>>>
>>>>>>>> thanks
>>>>>>>> david jencks
>>>>>>>>
>>>>>>>> On Oct 26, 2006, at 11:03 PM, Guillaume Bilodeau 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 <gb...@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.
>>>>>>>>>
>>>>>>>>>       
>>>>>>>>>           
>>>>>>>>>               
>>>>>>>>     
>>>>>>>>         
>>>>>>>>             
>>>>>>>   
>>>>>>>       
>>>>>>>           
>>>>>>     
>>>>>>         
>>>>>   
>>>>>       
>>>>
>>>>     
>>>
>>>   
>> 
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Error-deploying-EAR-because-of-DataSource-tf2513035.html#a7596179
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.


Re: Error deploying EAR because of DataSource

Posted by Guillaume Bilodeau <gb...@yahoo.com>.
I agree it's a good sign that the data source is actually usable from the
sample application.  However from what I understand this application does
not have a strict dependency to a specific data source like our application
- it instead discovers them programmatically.

The problem I'm describing is actually happening during the deployment
phase: I open the "Deploy new" screen, select the application EAR, I even
uncheck the "Start after install" option and finally click on Deploy.  A few
instants later, Geronimo gives the following message:

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?)

AFAICT, the application wasn't started yet, so I presume it's more a
configuration issue than an application issue.  The problem is, everything
seems to be configured according to the Geronimo usage page :)

The applicationContext.xml file is a configuration file for the Spring
framework.  In our application, this file isn't loaded right on startup so I
doubt it's interfering with anything.

I didn't mention yet but the application runs fine on Glassfish and Tomcat,
so I suppose I'm not configuring Geronimo or access to it correctly.

I'll have a look at the simple-database-access-sample-application and let
you know if it's not too late - it's Friday after all :)

Thanks!
GB


Lasantha Ranaweera wrote:
> 
> Ok.. Then we can suspect problem is in your application.  :-)
> 
> I saw file called in "applicationConext.xml" one of your previous mails. 
> What exactly that means?
> 
> To link a DBPool with your web application you need to add reference in 
> your geronimo-web.xml file too. Then it should be linked with web.xml. 
> Have a look at
> 
> http://cwiki.apache.org/GMOxDOC11/simple-database-access-sample-application.html
> 
> Let us know your status too.
> 
> Thanks,
> Lasantha Ranaweera
> 
> 
> Guillaume Bilodeau wrote:
>> I've tested the pool before deploying it and it worked fine.  I have now
>> downloaded, built and deployed the dbtester sample application with
>> correct
>> results: my AuchanPromoDS pool is there, and I can list its tables and
>> their
>> content with no error whatsoever.
>>
>> Everything looks fine, how come my application will not even deploy?  I'm
>> at
>> a loss here :S
>>
>> Thanks again,
>> GB
>>
>>
>> Lasantha Ranaweera wrote:
>>   
>>> Since you have deployed DB pool using G console, have you tested it 
>>> before deploying?
>>>
>>> Otherwise have a look at this sample application which help to find out 
>>> your DB connection pools is working or not.
>>>
>>> http://cwiki.apache.org/GMOxDOC11/db-pool-testing-sample-application.html
>>>
>>> Thanks,
>>> Lasantha Ranaweera
>>>
>>> Guillaume Bilodeau wrote:
>>>     
>>>> No it's a remote Oracle database.
>>>>
>>>>
>>>> Lasantha Ranaweera wrote:
>>>>   
>>>>       
>>>>> What is the DB you are using? Is it Derby Embedded?
>>>>>
>>>>> Thanks,
>>>>> Lasantha Ranaweera
>>>>>
>>>>> Guillaume Bilodeau wrote:
>>>>>     
>>>>>         
>>>>>> Hi David,
>>>>>>
>>>>>> Not sure if that's what you mean, but I deployed the datasource
>>>>>> myself
>>>>>> using
>>>>>> the "Geronimo database pool wizard", not through a separate
>>>>>> deployment
>>>>>> plan. 
>>>>>> Is that it?
>>>>>>
>>>>>> Thanks,
>>>>>> GB
>>>>>>
>>>>>>
>>>>>> David Jencks wrote:
>>>>>>   
>>>>>>       
>>>>>>           
>>>>>>> Everything you show looks ok to me, which makes me wonder if the  
>>>>>>> console-generated rar plan really has the connection factory named  
>>>>>>> AuchanPromoDS.  Could you show the plan for deploying the
>>>>>>> datasource?
>>>>>>>
>>>>>>> thanks
>>>>>>> david jencks
>>>>>>>
>>>>>>> On Oct 26, 2006, at 11:03 PM, Guillaume Bilodeau 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 <gb...@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.
>>>>>>>>
>>>>>>>>       
>>>>>>>>           
>>>>>>>>               
>>>>>>>     
>>>>>>>         
>>>>>>>             
>>>>>>   
>>>>>>       
>>>>>>           
>>>>>     
>>>>>         
>>>>   
>>>>       
>>>
>>>     
>>
>>   
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Error-deploying-EAR-because-of-DataSource-tf2513035.html#a7029656
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.


Re: Error deploying EAR because of DataSource

Posted by Lasantha Ranaweera <la...@opensource.lk>.
Ok.. Then we can suspect problem is in your application.  :-)

I saw file called in "applicationConext.xml" one of your previous mails. 
What exactly that means?

To link a DBPool with your web application you need to add reference in 
your geronimo-web.xml file too. Then it should be linked with web.xml. 
Have a look at

http://cwiki.apache.org/GMOxDOC11/simple-database-access-sample-application.html

Let us know your status too.

Thanks,
Lasantha Ranaweera


Guillaume Bilodeau wrote:
> I've tested the pool before deploying it and it worked fine.  I have now
> downloaded, built and deployed the dbtester sample application with correct
> results: my AuchanPromoDS pool is there, and I can list its tables and their
> content with no error whatsoever.
>
> Everything looks fine, how come my application will not even deploy?  I'm at
> a loss here :S
>
> Thanks again,
> GB
>
>
> Lasantha Ranaweera wrote:
>   
>> Since you have deployed DB pool using G console, have you tested it 
>> before deploying?
>>
>> Otherwise have a look at this sample application which help to find out 
>> your DB connection pools is working or not.
>>
>> http://cwiki.apache.org/GMOxDOC11/db-pool-testing-sample-application.html
>>
>> Thanks,
>> Lasantha Ranaweera
>>
>> Guillaume Bilodeau wrote:
>>     
>>> No it's a remote Oracle database.
>>>
>>>
>>> Lasantha Ranaweera wrote:
>>>   
>>>       
>>>> What is the DB you are using? Is it Derby Embedded?
>>>>
>>>> Thanks,
>>>> Lasantha Ranaweera
>>>>
>>>> Guillaume Bilodeau wrote:
>>>>     
>>>>         
>>>>> Hi David,
>>>>>
>>>>> Not sure if that's what you mean, but I deployed the datasource myself
>>>>> using
>>>>> the "Geronimo database pool wizard", not through a separate deployment
>>>>> plan. 
>>>>> Is that it?
>>>>>
>>>>> Thanks,
>>>>> GB
>>>>>
>>>>>
>>>>> David Jencks wrote:
>>>>>   
>>>>>       
>>>>>           
>>>>>> Everything you show looks ok to me, which makes me wonder if the  
>>>>>> console-generated rar plan really has the connection factory named  
>>>>>> AuchanPromoDS.  Could you show the plan for deploying the datasource?
>>>>>>
>>>>>> thanks
>>>>>> david jencks
>>>>>>
>>>>>> On Oct 26, 2006, at 11:03 PM, Guillaume Bilodeau 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 <gb...@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.
>>>>>>>
>>>>>>>       
>>>>>>>           
>>>>>>>               
>>>>>>     
>>>>>>         
>>>>>>             
>>>>>   
>>>>>       
>>>>>           
>>>>     
>>>>         
>>>   
>>>       
>>
>>     
>
>   


Re: Error deploying EAR because of DataSource

Posted by Guillaume Bilodeau <gb...@yahoo.com>.
I've tested the pool before deploying it and it worked fine.  I have now
downloaded, built and deployed the dbtester sample application with correct
results: my AuchanPromoDS pool is there, and I can list its tables and their
content with no error whatsoever.

Everything looks fine, how come my application will not even deploy?  I'm at
a loss here :S

Thanks again,
GB


Lasantha Ranaweera wrote:
> 
> Since you have deployed DB pool using G console, have you tested it 
> before deploying?
> 
> Otherwise have a look at this sample application which help to find out 
> your DB connection pools is working or not.
> 
> http://cwiki.apache.org/GMOxDOC11/db-pool-testing-sample-application.html
> 
> Thanks,
> Lasantha Ranaweera
> 
> Guillaume Bilodeau wrote:
>> No it's a remote Oracle database.
>>
>>
>> Lasantha Ranaweera wrote:
>>   
>>> What is the DB you are using? Is it Derby Embedded?
>>>
>>> Thanks,
>>> Lasantha Ranaweera
>>>
>>> Guillaume Bilodeau wrote:
>>>     
>>>> Hi David,
>>>>
>>>> Not sure if that's what you mean, but I deployed the datasource myself
>>>> using
>>>> the "Geronimo database pool wizard", not through a separate deployment
>>>> plan. 
>>>> Is that it?
>>>>
>>>> Thanks,
>>>> GB
>>>>
>>>>
>>>> David Jencks wrote:
>>>>   
>>>>       
>>>>> Everything you show looks ok to me, which makes me wonder if the  
>>>>> console-generated rar plan really has the connection factory named  
>>>>> AuchanPromoDS.  Could you show the plan for deploying the datasource?
>>>>>
>>>>> thanks
>>>>> david jencks
>>>>>
>>>>> On Oct 26, 2006, at 11:03 PM, Guillaume Bilodeau 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 <gb...@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.
>>>>>>
>>>>>>       
>>>>>>           
>>>>>     
>>>>>         
>>>>   
>>>>       
>>>
>>>     
>>
>>   
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Error-deploying-EAR-because-of-DataSource-tf2513035.html#a7028133
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.


Re: Error deploying EAR because of DataSource

Posted by Lasantha Ranaweera <la...@opensource.lk>.
Since you have deployed DB pool using G console, have you tested it 
before deploying?

Otherwise have a look at this sample application which help to find out 
your DB connection pools is working or not.

http://cwiki.apache.org/GMOxDOC11/db-pool-testing-sample-application.html

Thanks,
Lasantha Ranaweera

Guillaume Bilodeau wrote:
> No it's a remote Oracle database.
>
>
> Lasantha Ranaweera wrote:
>   
>> What is the DB you are using? Is it Derby Embedded?
>>
>> Thanks,
>> Lasantha Ranaweera
>>
>> Guillaume Bilodeau wrote:
>>     
>>> Hi David,
>>>
>>> Not sure if that's what you mean, but I deployed the datasource myself
>>> using
>>> the "Geronimo database pool wizard", not through a separate deployment
>>> plan. 
>>> Is that it?
>>>
>>> Thanks,
>>> GB
>>>
>>>
>>> David Jencks wrote:
>>>   
>>>       
>>>> Everything you show looks ok to me, which makes me wonder if the  
>>>> console-generated rar plan really has the connection factory named  
>>>> AuchanPromoDS.  Could you show the plan for deploying the datasource?
>>>>
>>>> thanks
>>>> david jencks
>>>>
>>>> On Oct 26, 2006, at 11:03 PM, Guillaume Bilodeau 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 <gb...@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.
>>>>>
>>>>>       
>>>>>           
>>>>     
>>>>         
>>>   
>>>       
>>
>>     
>
>   


Re: Error deploying EAR because of DataSource

Posted by Guillaume Bilodeau <gb...@yahoo.com>.
No it's a remote Oracle database.


Lasantha Ranaweera wrote:
> 
> What is the DB you are using? Is it Derby Embedded?
> 
> Thanks,
> Lasantha Ranaweera
> 
> Guillaume Bilodeau wrote:
>> Hi David,
>>
>> Not sure if that's what you mean, but I deployed the datasource myself
>> using
>> the "Geronimo database pool wizard", not through a separate deployment
>> plan. 
>> Is that it?
>>
>> Thanks,
>> GB
>>
>>
>> David Jencks wrote:
>>   
>>> Everything you show looks ok to me, which makes me wonder if the  
>>> console-generated rar plan really has the connection factory named  
>>> AuchanPromoDS.  Could you show the plan for deploying the datasource?
>>>
>>> thanks
>>> david jencks
>>>
>>> On Oct 26, 2006, at 11:03 PM, Guillaume Bilodeau 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 <gb...@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.
>>>>
>>>>       
>>>
>>>     
>>
>>   
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Error-deploying-EAR-because-of-DataSource-tf2513035.html#a7026612
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.


Re: Error deploying EAR because of DataSource

Posted by Lasantha Ranaweera <la...@opensource.lk>.
What is the DB you are using? Is it Derby Embedded?

Thanks,
Lasantha Ranaweera

Guillaume Bilodeau wrote:
> Hi David,
>
> Not sure if that's what you mean, but I deployed the datasource myself using
> the "Geronimo database pool wizard", not through a separate deployment plan. 
> Is that it?
>
> Thanks,
> GB
>
>
> David Jencks wrote:
>   
>> Everything you show looks ok to me, which makes me wonder if the  
>> console-generated rar plan really has the connection factory named  
>> AuchanPromoDS.  Could you show the plan for deploying the datasource?
>>
>> thanks
>> david jencks
>>
>> On Oct 26, 2006, at 11:03 PM, Guillaume Bilodeau 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 <gb...@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.
>>>
>>>       
>>
>>     
>
>   


Re: Error deploying EAR because of DataSource

Posted by Guillaume Bilodeau <gb...@yahoo.com>.
Hi David,

Not sure if that's what you mean, but I deployed the datasource myself using
the "Geronimo database pool wizard", not through a separate deployment plan. 
Is that it?

Thanks,
GB


David Jencks wrote:
> 
> Everything you show looks ok to me, which makes me wonder if the  
> console-generated rar plan really has the connection factory named  
> AuchanPromoDS.  Could you show the plan for deploying the datasource?
> 
> thanks
> david jencks
> 
> On Oct 26, 2006, at 11:03 PM, Guillaume Bilodeau 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 <gb...@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.
>>
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Error-deploying-EAR-because-of-DataSource-tf2513035.html#a7026375
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.


Re: Error deploying EAR because of DataSource

Posted by David Jencks <da...@yahoo.com>.
Everything you show looks ok to me, which makes me wonder if the  
console-generated rar plan really has the connection factory named  
AuchanPromoDS.  Could you show the plan for deploying the datasource?

thanks
david jencks

On Oct 26, 2006, at 11:03 PM, Guillaume Bilodeau 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 <gb...@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.
>


Solved (partly!)

Posted by Guillaume Bilodeau <gb...@yahoo.com>.
Hi guys,

Here's an openejb-jar.xml that allows me to deploy my application:

<?xml version="1.0"?>
<openejb-jar
	xmlns="http://www.openejb.org/xml/ns/openejb-jar-2.1"
	xmlns:naming="http://geronimo.apache.org/xml/ns/naming-1.1"
	xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.1">

	<sys:environment>
		<sys:moduleId>
			<sys:groupId>com.auchan</sys:groupId>
			<sys:artifactId>promo-server</sys:artifactId>
			<sys:version>2.0.0-SNAPSHOT</sys:version>
			<sys:type>car</sys:type>
		</sys:moduleId>
		<sys:dependencies>
			<sys:dependency>
				<sys:groupId>console.dbpool</sys:groupId>
				<sys:artifactId>AuchanPromoDS</sys:artifactId>
			</sys:dependency>
		</sys:dependencies>
		<sys:hidden-classes />
		<sys:non-overridable-classes />
	</sys:environment>

	<enterprise-beans xmlns="http://www.openejb.org/xml/ns/openejb-jar-2.1">
		<session>
			<ejb-name>RemoteTask</ejb-name>
			<jndi-name>RemoteTask</jndi-name>
			<naming:resource-ref>
				<naming:ref-name>jdbc/AuchanPromoDS</naming:ref-name>
				<naming:resource-link>AuchanPromoDS</naming:resource-link>
			</naming:resource-ref>
		</session>
		<session>
			<ejb-name>CloseStagesTask</ejb-name>
			<jndi-name>CloseStagesTask</jndi-name>
			<naming:resource-ref>
				<naming:ref-name>jdbc/AuchanPromoDS</naming:ref-name>
				<naming:resource-link>AuchanPromoDS</naming:resource-link>
			</naming:resource-ref>
		</session>
		<session>
			<ejb-name>CreatePitpTask</ejb-name>
			<jndi-name>CreatePitpTask</jndi-name>
			<naming:resource-ref>
				<naming:ref-name>jdbc/AuchanPromoDS</naming:ref-name>
				<naming:resource-link>AuchanPromoDS</naming:resource-link>
			</naming:resource-ref>
		</session>
		<session>
			<ejb-name>CreateNotificationsTask</ejb-name>
			<jndi-name>CreateNotificationsTask</jndi-name>
			<naming:resource-ref>
				<naming:ref-name>jdbc/AuchanPromoDS</naming:ref-name>
				<naming:resource-link>AuchanPromoDS</naming:resource-link>
			</naming:resource-ref>
		</session>
	</enterprise-beans>
</openejb-jar>

The application can be deployed and accessed at the configured context root. 
Finally!

I'm now running into a different problem
(javax.persistence.PersistenceException: Unable to resolve persistence unit
root URL) but hopefully this one will be easier to solve.

Thanks again for your time guys, I couldn't have done it without your
pointers.

Cheers,
GB

-- 
View this message in context: http://www.nabble.com/Error-deploying-EAR-because-of-DataSource-tf2513035.html#a7093845
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.


Re: Error deploying EAR because of DataSource

Posted by Guillaume Bilodeau <gb...@yahoo.com>.
That's probably because I've taken the header from Aaron's book (section
12.2) and the body from this page
(http://cwiki.apache.org/confluence/display/OPENEJB/Details+on+openejb-jar)
since I couldn't find anything related in the book.

Following your suggestion, I've also tried the following openejb-jar.xml:

<?xml version="1.0" encoding="UTF-8"?>
<openejb-jar xmlns="http://www.openejb.org/xml/ns/openejb-jar-2.0"
	xmlns:naming="http://geronimo.apache.org/xml/ns/naming-1.0"
	xmlns:security="http://geronimo.apache.org/xml/ns/security-1.1"
	xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.0"
	xmlns:pkgen="http://www.openejb.org/xml/ns/pkgen-2.0"
	inverseClassloading="false" configId="promo-server">

	<environment xmlns="http://geronimo.apache.org/xml/ns/deployment-1.1">
		<moduleId>
			<artifactId>promo-server</artifactId>
		</moduleId>
		<dependencies>
			<dependency>
				<groupId>console.dbpool</groupId>
				<artifactId>AuchanPromoDS</artifactId>
			</dependency>
		</dependencies>
	</environment>

	<entreprise-beans>
		<session>
			<ejb-name>RemoteTask</ejb-name>
			<jndi-name>RemoteTask</jndi-name>
			<resource-ref>
				<ref-name>jdbc/AuchanPromoDS</ref-name>
				<resource-link>AuchanPromoDS</resource-link>
			</resource-ref>
		</session>
		<session>
			<ejb-name>CloseStagesTask</ejb-name>
			<jndi-name>CloseStagesTask</jndi-name>
			<resource-ref>
				<ref-name>jdbc/AuchanPromoDS</ref-name>
				<resource-link>AuchanPromoDS</resource-link>
			</resource-ref>
		</session>
		<session>
			<ejb-name>CreatePitpTask</ejb-name>
			<jndi-name>CreatePitpTask</jndi-name>
			<resource-ref>
				<ref-name>jdbc/AuchanPromoDS</ref-name>
				<resource-link>AuchanPromoDS</resource-link>
			</resource-ref>
		</session>
		<session>
			<ejb-name>CreateNotificationsTask</ejb-name>
			<jndi-name>CreateNotificationsTask</jndi-name>
			<resource-ref>
				<ref-name>jdbc/AuchanPromoDS</ref-name>
				<resource-link>AuchanPromoDS</resource-link>
			</resource-ref>
		</session>
	</entreprise-beans>

</openejb-jar>

But still no success.

I'm sorry to take up your time like this guys, but it looks like the
material I'm finding in the sample apps and the book aren't working.  Any
pointer would be greatly appreciated!

Thanks a lot once more,
GB


David Jencks wrote:
> 
> that doesn't look like any openejb-jar.xml I've ever seen.  The  
> schema for it ought to be in "schema" in your geronimo server and the  
> version should be 2.1 but I think it may have got left out of the  
> geronimo-1.1.1 distributions.  You can see a copy here:
> http://fisheye.codehaus.org/browse/~raw,r=2675/openejb/branches/v2_1/ 
> openejb2/modules/openejb-builder/src/schema/openejb-jar-2.1.xsd
> 
> I think Aaron's book has some examples of openejb-jar.xml.
> 
> You'll need a dependency element inside an environment element like  
> you have in the war plan.  When you get the dependency in the openejb- 
> jar.xml you can remove it from the war.
> 
> hope this helps
> david jencks
> 
> 
> 
> On Oct 29, 2006, at 11:47 PM, Guillaume Bilodeau wrote:
> 
>>
>> Back from a Java-free weekend :)
>>
>> You might be on to something with the EJB module dependency to the  
>> data
>> source.  I did forget to mention that my EJBs have a dependency on  
>> the data
>> source of the same name, declared in my ejb-jar.xml.  From reading  
>> some
>> documentation it seems that I need to declare this in an openejb- 
>> jar.xml
>> file.  I've tried various combinations but still to no avail.   
>> Here's the
>> latest version:
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <openejb-jar xmlns="http://www.openejb.org/xml/ns/openejb-jar-2.0"
>> 	xmlns:naming="http://geronimo.apache.org/xml/ns/naming-1.0"
>> 	xmlns:security="http://geronimo.apache.org/xml/ns/security-1.1"
>> 	xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.0"
>> 	xmlns:pkgen="http://www.openejb.org/xml/ns/pkgen-2.0"
>> 	inverseClassloading="false" configId="promo-server">
>>
>> 	<ejb-deployment ejb-name="RemoteTask" deployment-id="RemoteTask"
>> 		container-id="Default Stateless Container">
>> 		<resource-link res-ref-name="jdbc/AuchanPromoDS"
>> 			res-id="AuchanPromoDS" />
>> 	</ejb-deployment>
>> 	<ejb-deployment ejb-name="CloseStagesTask"
>> 		deployment-id="CloseStagesTask"
>> 		container-id="Default Stateless Container">
>> 		<resource-link res-ref-name="jdbc/AuchanPromoDS"
>> 			res-id="AuchanPromoDS" />
>> 	</ejb-deployment>
>> 	<ejb-deployment ejb-name="CreatePitpTask"
>> 		deployment-id="CreatePitpTask"
>> 		container-id="Default Stateless Container">
>> 		<resource-link res-ref-name="jdbc/AuchanPromoDS"
>> 			res-id="AuchanPromoDS" />
>> 	</ejb-deployment>
>> 	<ejb-deployment ejb-name="CreateNotificationsTask"
>> 		deployment-id="CreateNotificationsTask"
>> 		container-id="Default Stateless Container">
>> 		<resource-link res-ref-name="jdbc/AuchanPromoDS"
>> 			res-id="AuchanPromoDS" />
>> 	</ejb-deployment>
>>
>> </openejb-jar>
>>
>> I now get the following message:
>>  	
>> Deployment failed:
>> Currently a Geronimo deployment plan is required for an EJB module.  
>> Please
>> provide a plan as a deployer argument or packaged in the EJB JAR at
>> META-INF/openejb-jar.xml
>>
>> I did package this file in my EAR, more precisely in the META-INF  
>> directory
>> of the EJB JAR itself located at the root of the EAR.  What's wrong  
>> with
>> this packaging?
>>
>> Thanks again,
>> GB
>>
>>
>> Aaron Mulder wrote:
>>>
>>> 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 <gb...@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 <gb...@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.
>>>>
>>>>
>>>
>>>
>>
>> -- 
>> View this message in context: http://www.nabble.com/Error-deploying- 
>> EAR-because-of-DataSource-tf2513035.html#a7070273
>> Sent from the Apache Geronimo - Users mailing list archive at  
>> Nabble.com.
>>
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Error-deploying-EAR-because-of-DataSource-tf2513035.html#a7071620
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.


Re: Error deploying EAR because of DataSource

Posted by David Jencks <da...@yahoo.com>.
that doesn't look like any openejb-jar.xml I've ever seen.  The  
schema for it ought to be in "schema" in your geronimo server and the  
version should be 2.1 but I think it may have got left out of the  
geronimo-1.1.1 distributions.  You can see a copy here:
http://fisheye.codehaus.org/browse/~raw,r=2675/openejb/branches/v2_1/ 
openejb2/modules/openejb-builder/src/schema/openejb-jar-2.1.xsd

I think Aaron's book has some examples of openejb-jar.xml.

You'll need a dependency element inside an environment element like  
you have in the war plan.  When you get the dependency in the openejb- 
jar.xml you can remove it from the war.

hope this helps
david jencks



On Oct 29, 2006, at 11:47 PM, Guillaume Bilodeau wrote:

>
> Back from a Java-free weekend :)
>
> You might be on to something with the EJB module dependency to the  
> data
> source.  I did forget to mention that my EJBs have a dependency on  
> the data
> source of the same name, declared in my ejb-jar.xml.  From reading  
> some
> documentation it seems that I need to declare this in an openejb- 
> jar.xml
> file.  I've tried various combinations but still to no avail.   
> Here's the
> latest version:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <openejb-jar xmlns="http://www.openejb.org/xml/ns/openejb-jar-2.0"
> 	xmlns:naming="http://geronimo.apache.org/xml/ns/naming-1.0"
> 	xmlns:security="http://geronimo.apache.org/xml/ns/security-1.1"
> 	xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.0"
> 	xmlns:pkgen="http://www.openejb.org/xml/ns/pkgen-2.0"
> 	inverseClassloading="false" configId="promo-server">
>
> 	<ejb-deployment ejb-name="RemoteTask" deployment-id="RemoteTask"
> 		container-id="Default Stateless Container">
> 		<resource-link res-ref-name="jdbc/AuchanPromoDS"
> 			res-id="AuchanPromoDS" />
> 	</ejb-deployment>
> 	<ejb-deployment ejb-name="CloseStagesTask"
> 		deployment-id="CloseStagesTask"
> 		container-id="Default Stateless Container">
> 		<resource-link res-ref-name="jdbc/AuchanPromoDS"
> 			res-id="AuchanPromoDS" />
> 	</ejb-deployment>
> 	<ejb-deployment ejb-name="CreatePitpTask"
> 		deployment-id="CreatePitpTask"
> 		container-id="Default Stateless Container">
> 		<resource-link res-ref-name="jdbc/AuchanPromoDS"
> 			res-id="AuchanPromoDS" />
> 	</ejb-deployment>
> 	<ejb-deployment ejb-name="CreateNotificationsTask"
> 		deployment-id="CreateNotificationsTask"
> 		container-id="Default Stateless Container">
> 		<resource-link res-ref-name="jdbc/AuchanPromoDS"
> 			res-id="AuchanPromoDS" />
> 	</ejb-deployment>
>
> </openejb-jar>
>
> I now get the following message:
>  	
> Deployment failed:
> Currently a Geronimo deployment plan is required for an EJB module.  
> Please
> provide a plan as a deployer argument or packaged in the EJB JAR at
> META-INF/openejb-jar.xml
>
> I did package this file in my EAR, more precisely in the META-INF  
> directory
> of the EJB JAR itself located at the root of the EAR.  What's wrong  
> with
> this packaging?
>
> Thanks again,
> GB
>
>
> Aaron Mulder wrote:
>>
>> 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 <gb...@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 <gb...@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.
>>>
>>>
>>
>>
>
> -- 
> View this message in context: http://www.nabble.com/Error-deploying- 
> EAR-because-of-DataSource-tf2513035.html#a7070273
> Sent from the Apache Geronimo - Users mailing list archive at  
> Nabble.com.
>


Re: Error deploying EAR because of DataSource

Posted by Guillaume Bilodeau <gb...@yahoo.com>.
Back from a Java-free weekend :)

You might be on to something with the EJB module dependency to the data
source.  I did forget to mention that my EJBs have a dependency on the data
source of the same name, declared in my ejb-jar.xml.  From reading some
documentation it seems that I need to declare this in an openejb-jar.xml
file.  I've tried various combinations but still to no avail.  Here's the
latest version:

<?xml version="1.0" encoding="UTF-8"?>
<openejb-jar xmlns="http://www.openejb.org/xml/ns/openejb-jar-2.0"
	xmlns:naming="http://geronimo.apache.org/xml/ns/naming-1.0"
	xmlns:security="http://geronimo.apache.org/xml/ns/security-1.1"
	xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.0"
	xmlns:pkgen="http://www.openejb.org/xml/ns/pkgen-2.0"
	inverseClassloading="false" configId="promo-server">

	<ejb-deployment ejb-name="RemoteTask" deployment-id="RemoteTask"
		container-id="Default Stateless Container">
		<resource-link res-ref-name="jdbc/AuchanPromoDS"
			res-id="AuchanPromoDS" />
	</ejb-deployment>
	<ejb-deployment ejb-name="CloseStagesTask"
		deployment-id="CloseStagesTask"
		container-id="Default Stateless Container">
		<resource-link res-ref-name="jdbc/AuchanPromoDS"
			res-id="AuchanPromoDS" />
	</ejb-deployment>
	<ejb-deployment ejb-name="CreatePitpTask"
		deployment-id="CreatePitpTask"
		container-id="Default Stateless Container">
		<resource-link res-ref-name="jdbc/AuchanPromoDS"
			res-id="AuchanPromoDS" />
	</ejb-deployment>
	<ejb-deployment ejb-name="CreateNotificationsTask"
		deployment-id="CreateNotificationsTask"
		container-id="Default Stateless Container">
		<resource-link res-ref-name="jdbc/AuchanPromoDS"
			res-id="AuchanPromoDS" />
	</ejb-deployment>

</openejb-jar>

I now get the following message:
 	
Deployment failed:
Currently a Geronimo deployment plan is required for an EJB module. Please
provide a plan as a deployer argument or packaged in the EJB JAR at
META-INF/openejb-jar.xml 

I did package this file in my EAR, more precisely in the META-INF directory
of the EJB JAR itself located at the root of the EAR.  What's wrong with
this packaging?

Thanks again,
GB


Aaron Mulder wrote:
> 
> 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 <gb...@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 <gb...@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.
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/Error-deploying-EAR-because-of-DataSource-tf2513035.html#a7070273
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.


Re: Error deploying EAR because of DataSource

Posted by Aaron Mulder <am...@alumni.princeton.edu>.
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 <gb...@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 <gb...@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.
>
>

Re: Error deploying EAR because of DataSource

Posted by Guillaume Bilodeau <gb...@yahoo.com>.
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 <gb...@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.


Re: migrating from 1.0.x to 1.1 - Eclipse plugin

Posted by Er...@kryos.com.



Thanks Sachin,

I just ended up creating a new 1.1 project.

This may also help people using WAS CE...  http://publib.boulder.ibm.com/wasce/V1.1.0/en/Tasks/Migrating/FromV1.0.0.0.html




                                                                                                                                                                                                                                                          
             Sachin Patel <sp...@gmail.com>                                                                                                                                                                                                            
                                                                                                                                                                                                                                                          
             30/11/2006 10:45 AM                                                                                                                                                                                                                       To 
                                                                                                             user@geronimo.apache.org                                                                                                                     
                                                                                                                                                                                                                                                       cc 
                                                Please respond to                                                                                                                                                                                         
                                            user@geronimo.apache.org                                                                                                                                                                              Subject 
                                                                                                             Re: migrating from 1.0.x to 1.1 - Eclipse plugin                                                                                             
                                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                                          




You should be able to retarget your runtime from 1.0 to 1.1, as well as the Geronimo Facet from 1.0 to 1.1, however, there is no migration capability to migrate your plan from 1.0 to 1.1 and you would have to upgrade your plan by hand or use the
command line upgrader tool.

Alternatively you can create a 1.1 project and copy your resources into it.

On Nov 30, 2006, at 12:13 PM, EricCho@kryos.com wrote:





      Hi all,

      I'm working with Websphere community edition but since its based on Geronimo, I assume the steps would be similar.

      I'm attempting to migrate one of my projects from version 1.0 to 1.1.

      In Eclipse, it won't let me add this project to a 1.1 server.

      I've removed the 1.0 library from the build path and added the 1.1 library.

      but when I try to remove the 1.0 project facet it says "Community Edition Deployment 1.0 cannot be uninstalled.

      How do I get past this and are there any steps afterwards?  (Other than modifying my geronimo-web.xml).

      Thanks,
      Eric



-sachin




Re: migrating from 1.0.x to 1.1 - Eclipse plugin

Posted by Sachin Patel <sp...@gmail.com>.
You should be able to retarget your runtime from 1.0 to 1.1, as well  
as the Geronimo Facet from 1.0 to 1.1, however, there is no migration  
capability to migrate your plan from 1.0 to 1.1 and you would have to  
upgrade your plan by hand or use the command line upgrader tool.

Alternatively you can create a 1.1 project and copy your resources  
into it.

On Nov 30, 2006, at 12:13 PM, EricCho@kryos.com wrote:

>
>
>
>
> Hi all,
>
> I'm working with Websphere community edition but since its based on  
> Geronimo, I assume the steps would be similar.
>
> I'm attempting to migrate one of my projects from version 1.0 to 1.1.
>
> In Eclipse, it won't let me add this project to a 1.1 server.
>
> I've removed the 1.0 library from the build path and added the 1.1  
> library.
>
> but when I try to remove the 1.0 project facet it says "Community  
> Edition Deployment 1.0 cannot be uninstalled.
>
> How do I get past this and are there any steps afterwards?  (Other  
> than modifying my geronimo-web.xml).
>
> Thanks,
> Eric
>


-sachin



migrating from 1.0.x to 1.1 - Eclipse plugin

Posted by Er...@kryos.com.



Hi all,

I'm working with Websphere community edition but since its based on Geronimo, I assume the steps would be similar.

I'm attempting to migrate one of my projects from version 1.0 to 1.1.

In Eclipse, it won't let me add this project to a 1.1 server.

I've removed the 1.0 library from the build path and added the 1.1 library.

but when I try to remove the 1.0 project facet it says "Community Edition Deployment 1.0 cannot be uninstalled.

How do I get past this and are there any steps afterwards?  (Other than modifying my geronimo-web.xml).

Thanks,
Eric


Re: Error deploying EAR because of DataSource

Posted by Aaron Mulder <am...@alumni.princeton.edu>.
On 10/26/06, Guillaume Bilodeau <gb...@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

> Vamsavardhana Reddy-2 wrote:
> >
> > One problem I can see straight away is that your lookup code is not using
> > the res-ref-name from web.xml and geronimo-web.xml is not linking the
> > res-ref-name in web.xml with the actual resource.  To overcome this,
> > change
> > "jdbc/AuchanPromoDS" in web.xml to "jdbc/PromoDS" .  Regarding the
> > resource-link, if you have used "jdbc/PromoDS" as the pool name, change
> > the
> > resource-link to "jdbc/PromoDS".
> >
> > Vamsi
> > On 10/26/06, Guillaume Bilodeau <gb...@yahoo.com> wrote:
> >>
> >>
> >> Here's the relevant web.xml part:
> >>
> >> <?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>
> >>
> >> The lookup code is done by the Spring framework through the following
> >> tag:
> >>
> >>         <jee:jndi-lookup id="mainDataSource"
> >>                 jndi-name="java:comp/env/jdbc/PromoDS"
> >>                 proxy-interface="javax.sql.DataSource"
> >>                 lookup-on-startup="false" />
> >>
> >> But it doesn't even get to the lookup part :)
> >>
> >> Thanks!
> >> GB
> >>
> >>
> >>
> >> Vamsavardhana Reddy-2 wrote:
> >> >
> >> > Please post your web.xml and also the lookup code.
> >> >
> >> > Vamsi
> >> >
> >> > On 10/26/06, Guillaume Bilodeau <gb...@yahoo.com> wrote:
> >> >>
> >> >>
> >> >> Hi guys,
> >> >>
> >> >> This is a different problem than the one I posted back in July,
> >> hopefully
> >> >> this one will be easier to solve :)
> >> >>
> >> >> I'm back with my EAR, containing an EJB module (JAR), a web
> >> application
> >> >> (WAR) and their relevant dependencies in its root.  The EAR contains
> >> the
> >> >> following application.xml file:
> >> >>
> >> >> <?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>
> >> >>   <module>
> >> >>     <web>
> >> >>       <web-uri>promo-web-2.0.0-SNAPSHOT.war</web-uri>
> >> >>       <context-root>/promo</context-root>
> >> >>     </web>
> >> >>   </module>
> >> >>   <module>
> >> >>     <ejb>promo-server-2.0.0-SNAPSHOT.jar</ejb>
> >> >>   </module>
> >> >> </application>
> >> >>
> >> >> The WAR contains a web.xml with a reference to a data source and the
> >> >> following geronimo-web.xml file:
> >> >>
> >> >> <?xml version="1.0" encoding="UTF-8"?>
> >> >>
> >> >> <web-app xmlns="http://geronimo.apache.org/xml/ns/web"
> >> >>         xmlns:naming="http://geronimo.apache.org/xml/ns/naming">
> >> >>         <environment>
> >> >>                 <moduleId>
> >> >>                         <artifactId>promo-war</artifactId>
> >> >>                 </moduleId>
> >> >>                 <dependencies>
> >> >>                         <dependency>
> >> >>                                 <groupId>console.dbpool</groupId>
> >> >>                                 <artifactId>PromoDS</artifactId>
> >> >>                         </dependency>
> >> >>                 </dependencies>
> >> >>         </environment>
> >> >>
> >> >>         <context-root>/promo</context-root>
> >> >>
> >> >>         <naming:resource-ref>
> >> >>                 <naming:ref-name>jdbc/PromoDS</naming:ref-name>
> >> >>                 <naming:resource-link>PromoDS</naming:resource-link>
> >> >>         </naming:resource-ref>
> >> >> </web-app>
> >> >>
> >> >> I have already configured my database pool with the same name, it's up
> >> >> and
> >> >> running and correctly listed in the J2EE connectors.
> >> >>
> >> >> When I try to deploy this EAR, I get the following error:
> >> >>
> >> >> Unable to resolve resource reference 'jdbc/PromoDS' (Could not find
> >> >> resource
> >> >> 'PromoDS'.  Perhaps it has not yet been configured, or your
> >> application
> >> >> does
> >> >> not have a dependency declared for that resource module?)
> >> >> org.apache.geronimo.common.DeploymentException: Unable to resolve
> >> >> resource
> >> >> reference 'jdbc/PromoDS' (Could not find resource 'PromoDS'.  Perhaps
> >> it
> >> >> has
> >> >> not yet been configured, or your application does not have a
> >> dependency
> >> >> declared for that resource module?)
> >> >>
> >> >> Any idea what the problem here?
> >> >>
> >> >> Thanks a lot!
> >> >> GB
> >> >>
> >> >> --
> >> >> View this message in context:
> >> >>
> >> http://www.nabble.com/Error-deploying-EAR-because-of-DataSource-tf2513035.html#a7008354
> >> >> Sent from the Apache Geronimo - Users mailing list archive at
> >> Nabble.com.
> >> >>
> >> >>
> >> >
> >> >
> >>
> >> --
> >> View this message in context:
> >> http://www.nabble.com/Error-deploying-EAR-because-of-DataSource-tf2513035.html#a7008735
> >> Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.
> >>
> >>
> >
> >
>
> --
> View this message in context: http://www.nabble.com/Error-deploying-EAR-because-of-DataSource-tf2513035.html#a7009322
> Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.
>
>

Re: Error deploying EAR because of DataSource

Posted by Guillaume Bilodeau <gb...@yahoo.com>.
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?


Vamsavardhana Reddy-2 wrote:
> 
> One problem I can see straight away is that your lookup code is not using
> the res-ref-name from web.xml and geronimo-web.xml is not linking the
> res-ref-name in web.xml with the actual resource.  To overcome this,
> change
> "jdbc/AuchanPromoDS" in web.xml to "jdbc/PromoDS" .  Regarding the
> resource-link, if you have used "jdbc/PromoDS" as the pool name, change
> the
> resource-link to "jdbc/PromoDS".
> 
> Vamsi
> On 10/26/06, Guillaume Bilodeau <gb...@yahoo.com> wrote:
>>
>>
>> Here's the relevant web.xml part:
>>
>> <?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>
>>
>> The lookup code is done by the Spring framework through the following
>> tag:
>>
>>         <jee:jndi-lookup id="mainDataSource"
>>                 jndi-name="java:comp/env/jdbc/PromoDS"
>>                 proxy-interface="javax.sql.DataSource"
>>                 lookup-on-startup="false" />
>>
>> But it doesn't even get to the lookup part :)
>>
>> Thanks!
>> GB
>>
>>
>>
>> Vamsavardhana Reddy-2 wrote:
>> >
>> > Please post your web.xml and also the lookup code.
>> >
>> > Vamsi
>> >
>> > On 10/26/06, Guillaume Bilodeau <gb...@yahoo.com> wrote:
>> >>
>> >>
>> >> Hi guys,
>> >>
>> >> This is a different problem than the one I posted back in July,
>> hopefully
>> >> this one will be easier to solve :)
>> >>
>> >> I'm back with my EAR, containing an EJB module (JAR), a web
>> application
>> >> (WAR) and their relevant dependencies in its root.  The EAR contains
>> the
>> >> following application.xml file:
>> >>
>> >> <?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>
>> >>   <module>
>> >>     <web>
>> >>       <web-uri>promo-web-2.0.0-SNAPSHOT.war</web-uri>
>> >>       <context-root>/promo</context-root>
>> >>     </web>
>> >>   </module>
>> >>   <module>
>> >>     <ejb>promo-server-2.0.0-SNAPSHOT.jar</ejb>
>> >>   </module>
>> >> </application>
>> >>
>> >> The WAR contains a web.xml with a reference to a data source and the
>> >> following geronimo-web.xml file:
>> >>
>> >> <?xml version="1.0" encoding="UTF-8"?>
>> >>
>> >> <web-app xmlns="http://geronimo.apache.org/xml/ns/web"
>> >>         xmlns:naming="http://geronimo.apache.org/xml/ns/naming">
>> >>         <environment>
>> >>                 <moduleId>
>> >>                         <artifactId>promo-war</artifactId>
>> >>                 </moduleId>
>> >>                 <dependencies>
>> >>                         <dependency>
>> >>                                 <groupId>console.dbpool</groupId>
>> >>                                 <artifactId>PromoDS</artifactId>
>> >>                         </dependency>
>> >>                 </dependencies>
>> >>         </environment>
>> >>
>> >>         <context-root>/promo</context-root>
>> >>
>> >>         <naming:resource-ref>
>> >>                 <naming:ref-name>jdbc/PromoDS</naming:ref-name>
>> >>                 <naming:resource-link>PromoDS</naming:resource-link>
>> >>         </naming:resource-ref>
>> >> </web-app>
>> >>
>> >> I have already configured my database pool with the same name, it's up
>> >> and
>> >> running and correctly listed in the J2EE connectors.
>> >>
>> >> When I try to deploy this EAR, I get the following error:
>> >>
>> >> Unable to resolve resource reference 'jdbc/PromoDS' (Could not find
>> >> resource
>> >> 'PromoDS'.  Perhaps it has not yet been configured, or your
>> application
>> >> does
>> >> not have a dependency declared for that resource module?)
>> >> org.apache.geronimo.common.DeploymentException: Unable to resolve
>> >> resource
>> >> reference 'jdbc/PromoDS' (Could not find resource 'PromoDS'.  Perhaps
>> it
>> >> has
>> >> not yet been configured, or your application does not have a
>> dependency
>> >> declared for that resource module?)
>> >>
>> >> Any idea what the problem here?
>> >>
>> >> Thanks a lot!
>> >> GB
>> >>
>> >> --
>> >> View this message in context:
>> >>
>> http://www.nabble.com/Error-deploying-EAR-because-of-DataSource-tf2513035.html#a7008354
>> >> Sent from the Apache Geronimo - Users mailing list archive at
>> Nabble.com.
>> >>
>> >>
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Error-deploying-EAR-because-of-DataSource-tf2513035.html#a7008735
>> Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/Error-deploying-EAR-because-of-DataSource-tf2513035.html#a7009322
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.


Re: Error deploying EAR because of DataSource

Posted by Vamsavardhana Reddy <c1...@gmail.com>.
One problem I can see straight away is that your lookup code is not using
the res-ref-name from web.xml and geronimo-web.xml is not linking the
res-ref-name in web.xml with the actual resource.  To overcome this, change
"jdbc/AuchanPromoDS" in web.xml to "jdbc/PromoDS" .  Regarding the
resource-link, if you have used "jdbc/PromoDS" as the pool name, change the
resource-link to "jdbc/PromoDS".

Vamsi
On 10/26/06, Guillaume Bilodeau <gb...@yahoo.com> wrote:
>
>
> Here's the relevant web.xml part:
>
> <?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>
>
> The lookup code is done by the Spring framework through the following tag:
>
>         <jee:jndi-lookup id="mainDataSource"
>                 jndi-name="java:comp/env/jdbc/PromoDS"
>                 proxy-interface="javax.sql.DataSource"
>                 lookup-on-startup="false" />
>
> But it doesn't even get to the lookup part :)
>
> Thanks!
> GB
>
>
>
> Vamsavardhana Reddy-2 wrote:
> >
> > Please post your web.xml and also the lookup code.
> >
> > Vamsi
> >
> > On 10/26/06, Guillaume Bilodeau <gb...@yahoo.com> wrote:
> >>
> >>
> >> Hi guys,
> >>
> >> This is a different problem than the one I posted back in July,
> hopefully
> >> this one will be easier to solve :)
> >>
> >> I'm back with my EAR, containing an EJB module (JAR), a web application
> >> (WAR) and their relevant dependencies in its root.  The EAR contains
> the
> >> following application.xml file:
> >>
> >> <?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>
> >>   <module>
> >>     <web>
> >>       <web-uri>promo-web-2.0.0-SNAPSHOT.war</web-uri>
> >>       <context-root>/promo</context-root>
> >>     </web>
> >>   </module>
> >>   <module>
> >>     <ejb>promo-server-2.0.0-SNAPSHOT.jar</ejb>
> >>   </module>
> >> </application>
> >>
> >> The WAR contains a web.xml with a reference to a data source and the
> >> following geronimo-web.xml file:
> >>
> >> <?xml version="1.0" encoding="UTF-8"?>
> >>
> >> <web-app xmlns="http://geronimo.apache.org/xml/ns/web"
> >>         xmlns:naming="http://geronimo.apache.org/xml/ns/naming">
> >>         <environment>
> >>                 <moduleId>
> >>                         <artifactId>promo-war</artifactId>
> >>                 </moduleId>
> >>                 <dependencies>
> >>                         <dependency>
> >>                                 <groupId>console.dbpool</groupId>
> >>                                 <artifactId>PromoDS</artifactId>
> >>                         </dependency>
> >>                 </dependencies>
> >>         </environment>
> >>
> >>         <context-root>/promo</context-root>
> >>
> >>         <naming:resource-ref>
> >>                 <naming:ref-name>jdbc/PromoDS</naming:ref-name>
> >>                 <naming:resource-link>PromoDS</naming:resource-link>
> >>         </naming:resource-ref>
> >> </web-app>
> >>
> >> I have already configured my database pool with the same name, it's up
> >> and
> >> running and correctly listed in the J2EE connectors.
> >>
> >> When I try to deploy this EAR, I get the following error:
> >>
> >> Unable to resolve resource reference 'jdbc/PromoDS' (Could not find
> >> resource
> >> 'PromoDS'.  Perhaps it has not yet been configured, or your application
> >> does
> >> not have a dependency declared for that resource module?)
> >> org.apache.geronimo.common.DeploymentException: Unable to resolve
> >> resource
> >> reference 'jdbc/PromoDS' (Could not find resource 'PromoDS'.  Perhaps
> it
> >> has
> >> not yet been configured, or your application does not have a dependency
> >> declared for that resource module?)
> >>
> >> Any idea what the problem here?
> >>
> >> Thanks a lot!
> >> GB
> >>
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/Error-deploying-EAR-because-of-DataSource-tf2513035.html#a7008354
> >> Sent from the Apache Geronimo - Users mailing list archive at
> Nabble.com.
> >>
> >>
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Error-deploying-EAR-because-of-DataSource-tf2513035.html#a7008735
> Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.
>
>

Re: Error deploying EAR because of DataSource

Posted by Guillaume Bilodeau <gb...@yahoo.com>.
Here's the relevant web.xml part:

<?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>

The lookup code is done by the Spring framework through the following tag:

	<jee:jndi-lookup id="mainDataSource"
		jndi-name="java:comp/env/jdbc/PromoDS"
		proxy-interface="javax.sql.DataSource"
		lookup-on-startup="false" />

But it doesn't even get to the lookup part :)

Thanks!
GB



Vamsavardhana Reddy-2 wrote:
> 
> Please post your web.xml and also the lookup code.
> 
> Vamsi
> 
> On 10/26/06, Guillaume Bilodeau <gb...@yahoo.com> wrote:
>>
>>
>> Hi guys,
>>
>> This is a different problem than the one I posted back in July, hopefully
>> this one will be easier to solve :)
>>
>> I'm back with my EAR, containing an EJB module (JAR), a web application
>> (WAR) and their relevant dependencies in its root.  The EAR contains the
>> following application.xml file:
>>
>> <?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>
>>   <module>
>>     <web>
>>       <web-uri>promo-web-2.0.0-SNAPSHOT.war</web-uri>
>>       <context-root>/promo</context-root>
>>     </web>
>>   </module>
>>   <module>
>>     <ejb>promo-server-2.0.0-SNAPSHOT.jar</ejb>
>>   </module>
>> </application>
>>
>> The WAR contains a web.xml with a reference to a data source and the
>> following geronimo-web.xml file:
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>>
>> <web-app xmlns="http://geronimo.apache.org/xml/ns/web"
>>         xmlns:naming="http://geronimo.apache.org/xml/ns/naming">
>>         <environment>
>>                 <moduleId>
>>                         <artifactId>promo-war</artifactId>
>>                 </moduleId>
>>                 <dependencies>
>>                         <dependency>
>>                                 <groupId>console.dbpool</groupId>
>>                                 <artifactId>PromoDS</artifactId>
>>                         </dependency>
>>                 </dependencies>
>>         </environment>
>>
>>         <context-root>/promo</context-root>
>>
>>         <naming:resource-ref>
>>                 <naming:ref-name>jdbc/PromoDS</naming:ref-name>
>>                 <naming:resource-link>PromoDS</naming:resource-link>
>>         </naming:resource-ref>
>> </web-app>
>>
>> I have already configured my database pool with the same name, it's up
>> and
>> running and correctly listed in the J2EE connectors.
>>
>> When I try to deploy this EAR, I get the following error:
>>
>> Unable to resolve resource reference 'jdbc/PromoDS' (Could not find
>> resource
>> 'PromoDS'.  Perhaps it has not yet been configured, or your application
>> does
>> not have a dependency declared for that resource module?)
>> org.apache.geronimo.common.DeploymentException: Unable to resolve
>> resource
>> reference 'jdbc/PromoDS' (Could not find resource 'PromoDS'.  Perhaps it
>> has
>> not yet been configured, or your application does not have a dependency
>> declared for that resource module?)
>>
>> Any idea what the problem here?
>>
>> Thanks a lot!
>> GB
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Error-deploying-EAR-because-of-DataSource-tf2513035.html#a7008354
>> Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/Error-deploying-EAR-because-of-DataSource-tf2513035.html#a7008735
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.


Re: Error deploying EAR because of DataSource

Posted by Guillaume Bilodeau <gb...@yahoo.com>.
Here's the relevant web.xml part:

<?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/PromoDS</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>

The lookup code is done by the Spring framework through the following tag:

	<jee:jndi-lookup id="mainDataSource"
		jndi-name="java:comp/env/jdbc/PromoDS"
		proxy-interface="javax.sql.DataSource"
		lookup-on-startup="false" />

But it doesn't even get to the lookup part :)

Thanks!
GB



Vamsavardhana Reddy-2 wrote:
> 
> Please post your web.xml and also the lookup code.
> 
> Vamsi
> 
> On 10/26/06, Guillaume Bilodeau <gb...@yahoo.com> wrote:
>>
>>
>> Hi guys,
>>
>> This is a different problem than the one I posted back in July, hopefully
>> this one will be easier to solve :)
>>
>> I'm back with my EAR, containing an EJB module (JAR), a web application
>> (WAR) and their relevant dependencies in its root.  The EAR contains the
>> following application.xml file:
>>
>> <?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>
>>   <module>
>>     <web>
>>       <web-uri>promo-web-2.0.0-SNAPSHOT.war</web-uri>
>>       <context-root>/promo</context-root>
>>     </web>
>>   </module>
>>   <module>
>>     <ejb>promo-server-2.0.0-SNAPSHOT.jar</ejb>
>>   </module>
>> </application>
>>
>> The WAR contains a web.xml with a reference to a data source and the
>> following geronimo-web.xml file:
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>>
>> <web-app xmlns="http://geronimo.apache.org/xml/ns/web"
>>         xmlns:naming="http://geronimo.apache.org/xml/ns/naming">
>>         <environment>
>>                 <moduleId>
>>                         <artifactId>promo-war</artifactId>
>>                 </moduleId>
>>                 <dependencies>
>>                         <dependency>
>>                                 <groupId>console.dbpool</groupId>
>>                                 <artifactId>PromoDS</artifactId>
>>                         </dependency>
>>                 </dependencies>
>>         </environment>
>>
>>         <context-root>/promo</context-root>
>>
>>         <naming:resource-ref>
>>                 <naming:ref-name>jdbc/PromoDS</naming:ref-name>
>>                 <naming:resource-link>PromoDS</naming:resource-link>
>>         </naming:resource-ref>
>> </web-app>
>>
>> I have already configured my database pool with the same name, it's up
>> and
>> running and correctly listed in the J2EE connectors.
>>
>> When I try to deploy this EAR, I get the following error:
>>
>> Unable to resolve resource reference 'jdbc/PromoDS' (Could not find
>> resource
>> 'PromoDS'.  Perhaps it has not yet been configured, or your application
>> does
>> not have a dependency declared for that resource module?)
>> org.apache.geronimo.common.DeploymentException: Unable to resolve
>> resource
>> reference 'jdbc/PromoDS' (Could not find resource 'PromoDS'.  Perhaps it
>> has
>> not yet been configured, or your application does not have a dependency
>> declared for that resource module?)
>>
>> Any idea what the problem here?
>>
>> Thanks a lot!
>> GB
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Error-deploying-EAR-because-of-DataSource-tf2513035.html#a7008354
>> Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/Error-deploying-EAR-because-of-DataSource-tf2513035.html#a7008735
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.


Re: Error deploying EAR because of DataSource

Posted by Vamsavardhana Reddy <c1...@gmail.com>.
Please post your web.xml and also the lookup code.

Vamsi

On 10/26/06, Guillaume Bilodeau <gb...@yahoo.com> wrote:
>
>
> Hi guys,
>
> This is a different problem than the one I posted back in July, hopefully
> this one will be easier to solve :)
>
> I'm back with my EAR, containing an EJB module (JAR), a web application
> (WAR) and their relevant dependencies in its root.  The EAR contains the
> following application.xml file:
>
> <?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>
>   <module>
>     <web>
>       <web-uri>promo-web-2.0.0-SNAPSHOT.war</web-uri>
>       <context-root>/promo</context-root>
>     </web>
>   </module>
>   <module>
>     <ejb>promo-server-2.0.0-SNAPSHOT.jar</ejb>
>   </module>
> </application>
>
> The WAR contains a web.xml with a reference to a data source and the
> following geronimo-web.xml file:
>
> <?xml version="1.0" encoding="UTF-8"?>
>
> <web-app xmlns="http://geronimo.apache.org/xml/ns/web"
>         xmlns:naming="http://geronimo.apache.org/xml/ns/naming">
>         <environment>
>                 <moduleId>
>                         <artifactId>promo-war</artifactId>
>                 </moduleId>
>                 <dependencies>
>                         <dependency>
>                                 <groupId>console.dbpool</groupId>
>                                 <artifactId>PromoDS</artifactId>
>                         </dependency>
>                 </dependencies>
>         </environment>
>
>         <context-root>/promo</context-root>
>
>         <naming:resource-ref>
>                 <naming:ref-name>jdbc/PromoDS</naming:ref-name>
>                 <naming:resource-link>PromoDS</naming:resource-link>
>         </naming:resource-ref>
> </web-app>
>
> I have already configured my database pool with the same name, it's up and
> running and correctly listed in the J2EE connectors.
>
> When I try to deploy this EAR, I get the following error:
>
> Unable to resolve resource reference 'jdbc/PromoDS' (Could not find
> resource
> 'PromoDS'.  Perhaps it has not yet been configured, or your application
> does
> not have a dependency declared for that resource module?)
> org.apache.geronimo.common.DeploymentException: Unable to resolve resource
> reference 'jdbc/PromoDS' (Could not find resource 'PromoDS'.  Perhaps it
> has
> not yet been configured, or your application does not have a dependency
> declared for that resource module?)
>
> Any idea what the problem here?
>
> Thanks a lot!
> GB
>
> --
> View this message in context:
> http://www.nabble.com/Error-deploying-EAR-because-of-DataSource-tf2513035.html#a7008354
> Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.
>
>