Thanks, I tried this and worked.
The only problem is Tomcat can not load the JDBC driver:

[INFO] [talledLocalContainer] datasource org.apache.tomcat.dbcp.dbcp.BasicDataSo
[EMAIL PROTECTED]
[INFO] [talledLocalContainer] org.apache.tomcat.dbcp.dbcp.SQLNestedException: Ca
nnot load JDBC driver class 'com.mysql.jdbc.Driver'
[INFO] [talledLocalContainer] at org.apache.tomcat.dbcp.dbcp.BasicDataSource.c
reateDataSource(BasicDataSource.java:766)
[INFO] [talledLocalContainer] at org.apache.tomcat.dbcp.dbcp.BasicDataSource.g
etConnection(BasicDataSource.java:540)
[INFO] [talledLocalContainer] at org.apache.jsp.login_jsp._jspService(login_js
p.java:53)

This comes from a JSP as you can see. The lookup is ok, but not getting the javax.sql.Connection. The driver is bundled in the lib directory of the web app, but that's not where Tomcat usually expects it. How do I put the jar into \target\tomcat5x\container\server\lib?

I appreciate your help a lot.  Any ideas?

Matt Raible wrote:
From http://blogs.atlassian.com/developer/2007/03/from_manual_to_automatic.html:

<configuration>
           <home>${project.build.directory}/tomcat5x/container</home>
                       <properties>
                           <cargo.servlet.port>8095</cargo.servlet.port>
                           <cargo.logging>high</cargo.logging>
                           <cargo.datasource.datasource>
cargo.datasource.url=jdbc:hsqldb:mem:crowd_cargo| cargo.datasource.driver=org.hsqldb.jdbcDriver|
                             cargo.datasource.username=sa|
                             cargo.datasource.password=|
                             cargo.datasource.type=javax.sql.DataSource|
                             cargo.datasource.jndi=jdbc/CrowdDS
                           </cargo.datasource.datasource>
                       </properties>
           <deployables>
               <deployable>
                   <groupId>com.atlassian.crowd</groupId>
                   <artifactId>crowd-web-app</artifactId>
                   <type>war</type>
                   <properties>
                       <context>crowd</context>
                   </properties>
                   <pingURL>http://localhost:8095/crowd</pingURL>
                   <pingTimeout>240000</pingTimeout>
               </deployable>
           </deployables>
       </configuration>

Matt

On 4/25/07, Janos Mucsi <[EMAIL PROTECTED]> wrote:
Hi

I am using Appfuse and see that for integration tests cargo puts the
context into Tomcat 5 like this:


<Context path="/saeuser-1.0-SNAPSHOT"
docBase="C:\projects\saeuser\target\saeuser-1.0-SNAPSHOT.war" debug="2">

</Context>

If I have a web application that has a datasource, how do I make Cargo
declare it? For example:

 <Context path="/sae" reloadable="true"
docBase="C:\projects\sae\webapp" workDir="C:\projects\sae\work">
        <Resource name="jdbc/sae" auth="Container"
type="javax.sql.DataSource"
                   maxActive="100" maxIdle="30" maxWait="10000"
                   username="saeuser" password="saeuser"
                   driverClassName="com.mysql.jdbc.Driver"

url="jdbc:mysql://localhost:3300/saeuser?autoReconnect=true"/>
    </Context>


Thanks.

Janos

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






--
Janos Mucsi

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to