geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jochen Zink <jochenl...@web.de>
Subject Re: Usign Databasepool inside of an EAR Application
Date Wed, 18 Apr 2007 07:15:34 GMT
Thanks for your answers, but I can't get it run.

I removed the resource-ref from geronimo-application.xml and put them to geronimo-web.xml.
But I get the same error:


I'm confused... with standalone Webapplication, it works pretty fine. Also using the same
name for the resource in web.xml and the datasourcePool is not running. "Can't automap ..."
is the message. I believe the problem is not the resource-ref. But I believe Geronimo does
not find the dependency I declared in environment part. 

I have another strange think. Maybe this is the reason, why geronimo can't resolve the datasource.

In geronimo-application.xml I defined a module ID:
<application
    xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-1.0"
    xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.1"
    xmlns:security="http://geronimo.apache.org/xml/ns/security-1.1">
        <sys:environment>
            <sys:moduleId>
                <sys:groupId>edocbox</sys:groupId>
                <sys:artifactId>comserver</sys:artifactId>
                <sys:version>1.0</sys:version>
                <sys:type>car</sys:type>
            </sys:moduleId>
            ...


But after deployment, the moduleid looks like "default/74155533/ ...". This is geronimo random
stuff, if no moduleID is configured. The geronimo-web.xml has also a moduleID inside. 

Maybe there comes the problem from?

Thanks
Jochen




> -----Urspr√ľngliche Nachricht-----
> Von: user@geronimo.apache.org
> Gesendet: 17.04.07 17:40:06
> An: user@geronimo.apache.org
> Betreff: Re: Usign Databasepool inside of an EAR Application


> 
> The resource-ref element you show should go in geronimo-web.xml, not  
> geronimo-application.xml.  I'm not sure why geronimo isn't  
> complaining about where you put it.
> 
> I'd recommend naming your datasource "documentDataSource" in which  
> case you should be able to leave out the resource-ref element from  
> the geronimo plan.
> 
> thanks
> david jencks
> 
> On Apr 17, 2007, at 2:05 AM, Jochen Zink wrote:
> 
> > Hello at all,
> >
> > I have (maybe a simple) problem.
> >
> > I want to deploy an EAR Archive to geronimo 1.1.1. Inside this ear  
> > is only one module and one global JAR Archive.
> >
> > ear:
> >  |--WebApplication.war
> >          |--META-INF
> >                |--MANIFEST.MF
> >          |--WEB-INF
> >                 |--web.xml
> >                 |--geronimo-web.xml
> > |--lib
> >     |--DatabaseAccess.jar
> > |--application.xml
> > |--geronimo-application.xml
> >
> >
> >
> > The WebApplication uses the DatabaseAccess.jar to connect to a  
> > ServiceWide ConnectionPool. This works, if I deploy the  
> > WebApplication.war as a standalone WAR. In this case, the  
> > DatabaseAccess.jar is placed inside the WebApplication.war.
> >
> > But if I excluded the jar and pack everything together in a EAR  
> > archive, it dosen't work.
> >
> > The Message is: "Unable to resolve resource reference  
> > 'documentDataSource' (Could not find resource 'MySQLComServerPool'.  
> > Perhaps it has not yet been configured, or your application does  
> > not have a dependency declared for that resource module?) "
> >
> >
> > I don't find a solution for this problem. In which deployment  
> > files, I have to declare the dependency to the ConnectionPool?
> >
> > The web.xml and geronimo-web.xml contains the correct declarations.  
> > This works standalone!
> >
> > I try to add the dependency to geronimo-application.xml (you can  
> > see it, on the end of my mail), but it does not work.
> >
> > So, I don't no where the miss configuration is.
> >
> > Thanks for help!
> >
> > geronimo-application.xml
> >
> > <application
> >     .. namespaceStuff...>
> > 	
> >     <sys:environment>
> >         <sys:moduleId>
> >             <sys:groupId>edocbox</sys:groupId>
> >             <sys:artifactId>comserver</sys:artifactId>
> >             <sys:version>1.0</sys:version>
> >         </sys:moduleId>		
> > 		
> >         <sys:dependencies>
> >             <sys:dependency>
> >                 <sys:groupId>console.dbpool</sys:groupId>
> >                 <sys:artifactId>MySQLComServerPool</sys:artifactId>
> >             </sys:dependency>
> >         </sys:dependencies>
> >     </sys:environment>
> >
> >
> >     <resource-ref>
> >          <ref-name>documentDataSource</ref-name>
> >         <pattern>
> >             <groupId>console.dbpool</groupId>
> >             <artifactId>MySQLComServerPool</artifactId>
> >             <name>MySQLComServerPool</name>
> >         </pattern>
> >     </resource-ref>
> >
> >     <module>
> > 	
> >         <web>DocumentTransferService.war</web>
> >     </module>
> > </application>
> >
> >
> >
> >
> > _______________________________________________________________
> > SMS schreiben mit WEB.DE FreeMail - einfach, schnell und
> > kostenguenstig. Jetzt gleich testen! http://f.web.de/?mc=021192
> >
> 
> 


_______________________________________________________________
SMS schreiben mit WEB.DE FreeMail - einfach, schnell und
kostenguenstig. Jetzt gleich testen! http://f.web.de/?mc=021192


Mime
View raw message