geronimo-user mailing list archives

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


Mime
View raw message