Great Tomek Maybe we could simplify the process. From the readme.htm link you sent, did you go over the following step ?
Define a DataSource by adding a datasource definition to {Tomcat_Home}/conf/server.xml. Find the end-of-section marker and add the following lines just above it: <!-- Global Datasource for Derby dastest database --> <Resource name="jdbc/dastest" type="javax.sql.DataSource" auth="Container" description="Derby database for DAS Company sample" maxActive="100" maxIdle="30" maxWait="10000" username="" password="" driverClassName="org.apache.derby.jdbc.EmbeddedDriver" url="jdbc:derby:{absolute path}Databases/dastest;create=true"/> On Tue, May 20, 2008 at 4:43 AM, <[EMAIL PROTECTED]> wrote: > 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 > -- Luciano Resende Apache Tuscany Committer http://people.apache.org/~lresende http://lresende.blogspot.com/