Thanks Eric, I'll update the customer.xml and steps on the readme for better/simpler support of MySQL
On 9/4/07, Eborn, Eric D <[EMAIL PROTECTED]> wrote: > I never explained how I got over the other errors... sorry. Basically I > just had to peck at the Customers.xml config file. It seems rather > outdated, perhaps someone could permanently modify the example download > for future users, I made the following changes: > > <ConnectionInfo> > <ConnectionProperties > driverClass="com.mysql.jdbc.Driver" > password="foobar" > userName="root" > > databaseURL="jdbc:mysql://localhost:3306/dastest" > loginTimeout="600000"> > </ConnectionProperties> > </ConnectionInfo> > > Note the difference: > https://svn.apache.org/repos/asf/incubator/tuscany/java/das/samples/cust > omer/src/main/resources/Customers.xml > > Make sure that you've downloaded an installed the proper Connector/J, > and that you have the path in your CLASSPATH env variable or copy the > jar to your JAVA_HOME/lib/ext dir. > > Also you'll likely have to manually create the dastest database in mysql > (leave it empty (without any tables), just create the db). > > > -----Original Message----- > > From: Eborn, Eric D > > Sent: Tuesday, September 04, 2007 12:31 PM > > To: tuscany-user@ws.apache.org > > Subject: RE: Help with Tuscany Customer's Demo using MySQL > > > > Update: > > > > I bypassed these errors as I will explain below. > > > > NOW I have new errors :) It seems to start running correctly, I've > > confirmed that it creates the dastest table CUSTOMER. And fills it > with > > 4 records. However, it fails in CustomerClient.java at the line: '171 > > newCustomer.setInt("ID", 5);' > > > > I had read in another message: > > > http://mail-archives.apache.org/mod_mbox/ws-tuscany-dev/200706.mbox/%3C1 > > [EMAIL PROTECTED] > > Exception in thread "main" java.lang.IllegalArgumentException: Class > > 'DataGraphRoot' > > does not have a feature named 'MYCUSTOMER'... which is similar, but > > seemed to stem from his use of oracle or SQLServer (not mysql). Any > > additional help is welcome... In the meantime, I'll continue to work > at > > it. > > > > (error messages as follows) > > > > > D:\data\eeborn\Desktop\tuscany-das-1.0-incubating-beta1\samples\customer > > >ant > > Buildfile: build.xml > > > > build: > > [javac] Compiling 1 source file to > > > D:\data\eeborn\Desktop\tuscany-das-1.0-incubating-beta1\samples\customer > > > > run: > > [java] ********************** connection info from config file > > ************************ > > [java] databaseURL:jdbc:mysql://localhost:3306/dastest > > userName:root password:foobar > > [java] > > > ************************************************************************ > > ******** > > [java] [Messages.java 3params: > > getBundle(com.mysql.jdbc.LocalizedErrorMessages) > > [java] Setting up for mysql run! > > [java] Dropping tables > > [java] Dropping procedures > > [java] Creating tables > > [java] Creating procedures > > [java] Inserting data in tables > > [java] Database setup complete! > > [java] log4j:WARN No appenders could be found for logger > > (org.apache.tuscany.das.rdb.impl.Parameters). > > [java] log4j:WARN Please initialize the log4j system properly. > > [java] Result:select all customers > > [java] Result:insert new customer > > [java] Exception in thread "main" > > java.lang.IllegalArgumentException: Class 'CUSTOMER' does not have a > > feature named 'ID' > > [java] at > > > org.apache.tuscany.sdo.util.DataObjectUtil$Accessor.setFeatureName(DataO > > bjectUtil.java:2104) > > [java] at > > > org.apache.tuscany.sdo.util.DataObjectUtil$Accessor.process(DataObjectUt > > il.java:2247) > > [java] at > > > org.apache.tuscany.sdo.util.DataObjectUtil$Accessor.init(DataObjectUtil. > > java:1968) > > [java] at > > > org.apache.tuscany.sdo.util.DataObjectUtil$Accessor.create(DataObjectUti > > l.java:1883) > > [java] at > > > org.apache.tuscany.sdo.util.DataObjectUtil$Accessor.create(DataObjectUti > > l.java:1877) > > [java] at > > > org.apache.tuscany.sdo.util.DataObjectUtil.setInt(DataObjectUtil.java:52 > > 7) > > [java] at > > > org.apache.tuscany.sdo.impl.DataObjectImpl.setInt(DataObjectImpl.java:52 > > 5) > > [java] at > > > org.apache.tuscany.samples.das.customer.CustomerClient.addCustomer(Custo > > merClient.java:172) > > [java] at > > > org.apache.tuscany.samples.das.customer.CustomerClient.main(CustomerClie > > nt.java:126) > > [java] Java Result: 1 > > > > BUILD SUCCESSFUL > > Total time: 2 seconds > > > > > -----Original Message----- > > > From: Eborn, Eric D > > > Sent: Tuesday, September 04, 2007 11:36 AM > > > To: tuscany-user@ws.apache.org > > > Subject: Help with Tuscany Customer's Demo using MySQL > > > > > > I've run the demo using Derby, however, I've been unsuccessful in > > doing > > > so with MySQL. > > > > > > > > > > > > I'm running the latest mysql and connector/J, downloaded them this > > week. > > > > > > Please advise. > > > > > > > > > > > > When I comment out the Derby config and uncomment the MySql config, > I > > > get the following error: > > > > > > > > > > > > > > > > > > BUILD SUCCESSFUL > > > > > > Total time: 0 seconds > > > > > > D:\data\eeborn\Desktop\TUSCAN~1.0-I\samples\customer>ant > > > > > > Buildfile: build.xml > > > > > > > > > > > > run: > > > > > > [java] Exception in thread "main" java.lang.RuntimeException: > > > > > > org.eclipse.emf.ecore.resource.Resource$IOWrappedException: Feature > > > 'user' not foun > > > > > > d. (http:///temp.xml <http://temp.xml> , 50, 33) > > > > > > > > > > > > [java] at > > > > > > > > > org.apache.tuscany.das.rdb.util.ConfigUtil.loadConfig(ConfigUtil.java:54 > > > ) > > > > > > > > > > > > [java] at > > > > > > > > > org.apache.tuscany.samples.das.customer.CustomerClient.main(CustomerClie > > > nt.java:86) > > > > > > > > > > > > [java] Caused by: > > > > > > org.eclipse.emf.ecore.resource.Resource$IOWrappedException: Feature > > > 'user' not found. (http:///temp.xml <http://temp.xml> , 50, 33) > > > > > > ....90 more > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > I have this config Customers.xml > > > > > > > > > > > > <!--Uncomment below for MySQL test--> > > > > > > <ConnectionInfo> > > > > > > <ConnectionProperties > > > > > > > > driverClass="com.mysql.jdbc.Driver" > > > > > > > > > > > > databaseURL="jdbc:mysql://localhost:3306/test" > > > > > > user="root" > > > > > > password="foobar" > > > > > > loginTimeout="600000"> > > > > > > </ConnectionProperties> > > > > > > </ConnectionInfo> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > <!-- ConnectionInfo > > > > > > dataSource="java:comp/env/jdbc/dastest" THIS SECTION IS COMMENTED > > OUT > > > > > > > > > contextAvailable="false"> > > > > > > > > > > > > <ConnectionProperties > > > > > > dataSourceClass="com.mysql.jdbc.jdbc2.optional.MysqlDataSource" > > > > > > user="root" > > > > > > password="foobar" > > > > > > > > key="193-155-248-97-234-56-100-241" > > > > > > databaseName="test" > > > > > > loginTimeout="600000"> > > > > > > </ConnectionProperties> > > > > > > </ConnectionInfo --> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > The section of the config that is commented out also fails with: > > > > > > > > > > > > run: > > > > > > > > > > > > [java] Exception in thread "main" java.lang.RuntimeException: > > > > > > org.eclipse.emf.ecore.resource.Resource$IOWrappedException: Feature > > > 'contextAvailab > > > > > > > > > > > > le' not found. (http:///temp.xml <http://temp.xml> , 55, 30) > > > > > > > > > > > > [java] at > > > > > > > > > org.apache.tuscany.das.rdb.util.ConfigUtil.loadConfig(ConfigUtil.java:54 > > > > > > ) > > > > > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Luciano Resende Apache Tuscany Committer http://people.apache.org/~lresende http://lresende.blogspot.com/ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]