Dear Wiki user, You have subscribed to a wiki page or wiki category on "Geronimo Wiki" for change notification.
The following page has been changed by JohnSisson: http://wiki.apache.org/geronimo/Database_Configuration The comment on the change is: info on obtaining the derby tools.jar file ------------------------------------------------------------------------------ java -jar bin/deployer.jar deploy mydatabase-plan.xml \ repository/geronimo/rars/geronimo-derby-connector-1.0-SNAPSHOT.rar }}} + + Note: The `repository/geronimo/rars/geronimo-derby-connector-1.0-SNAPSHOT.rar` file did not exist in the M3 build. Sample database plan file: {{{ @@ -71, +73 @@ The following DB2 Universal Driver JARs need to be on your classpath: * db2jcc.jar * db2jcc_license_c.jar + + Currently Geronimo doesn't include the derbytools JAR file that contains the `ij` utility [http://issues.apache.org/jira/browse/GERONIMO-631]. So download the file [http://cvs.apache.org/repository/incubator-derby/jars/derbytools-10.0.2.1.jar] into the `geronimo/repository/incubator-derby/jars` directory. - To create a database using Derby's ij tool do something like the following (example for windows): + Assuming you are in the `geronimo` root directory, create a database using Derby's ij tool (UNIX example): {{{ - java -cp derby.jar;derbynet.jar;derbytools.jar;db2jcc.jar;db2jcc_license_c.jar -Dij.driver=com.ibm.db2.jcc.DB2Driver -Dij.user=MYAPP -Dij.password=myappPassword -Dij.protocol=jdbc:derby:net://localhost:1527/ org.apache.derby.tools.ij + java -cp db2jcc.jar:db2jcc_license_c.jar:\ + repository/incubator-derby/jars/derby-10.0.2.1.jar:\ + repository/incubator-derby/jars/derbynet-10.0.2.1.jar: + repository/incubator-derby/jars/derbytools-10.0.2.1.jar \ + -Dij.driver=com.ibm.db2.jcc.DB2Driver -Dij.user=MYAPP \ + -Dij.password=myappPassword -Dij.protocol=jdbc:derby:net://localhost:1527/ org.apache.derby.tools.ij ij version 10.0 (C) Copyright IBM Corp. 1997, 2004. ij> connect 'MYDB;create=true'; ij> CREATE TABLE products(name CHAR(30), price INTEGER);