Hi all,

here I described a (fixed) problem that I had with running a sample DAS 
application. Maybe someone will find it useful.
I'm new to Tuscany. I've tried to run the sample DAS application as 
described here: 
https://svn.apache.org/repos/asf/incubator/tuscany/java/das/samples/company-webapp/readme.htm.
 

I had problems with it - IMHO the build.xml doesn't copy the context.xml 
to the unzipped tomcat. The original context.xml hasn't got this line:
   <ResourceLink name="jdbc/dastest" global="jdbc/dastest" 
type="javax.sql.DataSource" />
so the the application won't start because it can't find jdbc resource and 
cannot connect to the database.

I had no time to investigate it further so I did like this:
- CompanYWebDBConfig.uncomment the ConnectionInfo with full derby config 
?<ConnectionInfo>
??<ConnectionProperties 
???driverClass="org.apache.derby.jdbc.EmbeddedDriver" 
???databaseURL="jdbc:derby:../Databases/dastest; 

create = true" 
???loginTimeout="600000"/>
?</ConnectionInfo>
    <!-- <ConnectionInfo dataSource="java:comp/env/jdbc/dastest"/> -->

- change the build.xml so that tomcat can find derby connector class:
<!-- Copy over the Derby database -->
<!-- lresende - we now use the dbConfig, and don't need to copy canned 
database here -->
<copy todir="${tuscany.acceptance.tc.dir}/lib" 
file="${tuscany.maven.repos.dir}\org\apache\derby\derby\10.2.2.0\derby-10.
2.2.0.jar" />
                
It worked for me. Probably I'd better fix the context.xml copying issue, 
but I found this quick solution and I stayed with this.

cheers
Tomek Kaczanowski
http://kaczanowscy.pl/tomek

Reply via email to