geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From IƱigo <...@nodo50.org>
Subject unknown or ambigous connectionFactory
Date Thu, 18 Aug 2005 20:58:23 GMT
Hello everybody:
    I have deployed a MySQL pool connection in Geronimo, and now I am 
trying to make some code to take some data from the database in an 
application, but when I deploy the application I get this message:

C:\geronimo-1.0-M4>java -jar bin\deployer.jar --user system --password 
manager deploy ..\EjemploBD\dist\EjemploBD.war
    Error: Unable to distribute EjemploBD.war: Unknown or ambiguous  
connection factory name query:
    
geronimo.server:J2EEServer=geronimo,J2EEApplication=null,j2eeType=JCAManaged
ConnectionFactory,name=MysqlDataSource,*
    match count: 0

I guess I have something wrong in some of the deployment descriptors. 
Well, in geronimo-web I have added this:
<naming:resource-ref>
    <naming:ref-name>jdbc/DataSource</naming:ref-name>
    <naming:resource-link>MysqlDataSource</naming:resource-link>
</naming:resource-ref>

and in web.xml there is this:
<resource-ref>
    <res-ref-name>jdbc/DataSource</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    <res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>

and last but not least, in the application the lookup is this:
DataSource ds = (DataSource)ctx.lookup("java:comp/env/MysqlDataSource");



Mime
View raw message