Return-Path: Delivered-To: apmail-db-torque-user-archive@www.apache.org Received: (qmail 77940 invoked from network); 22 Jan 2007 09:07:49 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 22 Jan 2007 09:07:49 -0000 Received: (qmail 95950 invoked by uid 500); 22 Jan 2007 09:07:55 -0000 Delivered-To: apmail-db-torque-user-archive@db.apache.org Received: (qmail 95926 invoked by uid 500); 22 Jan 2007 09:07:55 -0000 Mailing-List: contact torque-user-help@db.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Apache Torque Users List" Reply-To: "Apache Torque Users List" Delivered-To: mailing list torque-user@db.apache.org Received: (qmail 95911 invoked by uid 99); 22 Jan 2007 09:07:54 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 22 Jan 2007 01:07:54 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: local policy) Received: from [217.24.207.26] (HELO mail.seitenbau.net) (217.24.207.26) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 22 Jan 2007 01:07:46 -0800 Received: from [192.168.15.18] (helo=www.seitenbau.net) by router.seitenbau.net with esmtp (Exim 4.43) id 1H8v9A-0001uG-86 for torque-user@db.apache.org; Mon, 22 Jan 2007 10:07:24 +0100 In-Reply-To: <33094.132.248.34.251.1169255051.squirrel@uxmal.cifn.unam.mx> Subject: Re: no DataSourceFactory configured To: "Apache Torque Users List" X-Mailer: Lotus Notes Release 7.0.1 January 17, 2006 Message-ID: From: Thomas Fischer Date: Mon, 22 Jan 2007 10:07:23 +0100 X-MIMETrack: Serialize by Router on www/seitenbau(Release 7.0.1|January 17, 2006) at 22.01.2007 10:07:23 AM MIME-Version: 1.0 Content-type: text/plain; charset=ISO-8859-1 Content-transfer-encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org This usually means that connecting to the database failed. Possible rea= sons are - the database is not started - the connection url, password or username are wrong in the configurati= on file Loking at your configuration, I am sure whethet mysql accepts connectio= ns without specifying a database user (as you did) Thomas "Pierre-Alain Branger" schrieb am 20.01.2007 02:04:11: > Hi everybody, > > I follow the tutorial and could generate my mysql database and the > corresponding java access classes. I made a jar and add it to a java > project that compiled well. But when I launch my application I obtain= the > following message: > > java.lang.NullPointerException: There was no DataSourceFactory config= ured > for the connection BddPortalCCG > at > org.apache.torque.TorqueInstance.getConnection(TorqueInstance.java:71= 1) > at org.apache.torque.Torque.getConnection(Torque.java:268) > at > org.apache.torque.util.Transaction.beginOptional(Transaction.java:80)= > at org.apache.torque.util.Transaction.begin(Transaction.java:= 62) > at > mx.unam.ccg.BddPortal.BaseApplication.save(BaseApplication.java:361) > at > mx.unam.ccg.BddPortal.BaseApplication.save(BaseApplication.java:343) > at testbddportalccg.Main.main(Main.java:36) > > I hope so=F1eone could help, me. Here are the different configuring f= iles I > use: > > ------------- torque.properties ---------------- > > torque.database.default =3D BddPortalCCG > torque.database.BddPortalCCG.adapter =3D mysql > > # Using commons-dbcp > torque.dsfactory.BddPortalCCG.factory =3D > org.apache.torque.dsfactory.SharedPoolDataSourceFactory > torque.dsfactory.BddPortalCCG.connection.driver =3D org.gjt.mm.mysql.= Driver > torque.dsfactory.BddPortalCCG.connection.url =3D > jdbc:mysql://localhost:3306/BddPortalCCG > torque.dsfactory.BddPortalCCG.connection.user =3D > torque.dsfactory.BddPortalCCG.connection.password =3D > > > ------------- project.properties ---------------- > # The name of the project Torque will generate code for. > torque.project=3DBddPortalCCG > > # The target database platform. > torque.database=3Dmysql > > # The target package to put the generated classes in. > torque.targetPackage=3Dmx.unam.ccg.BddPortal > > # The JDBC URL that Torque can use to create and > # drop databases if instructed to do so. > torque.database.createUrl=3Djdbc:mysql://localhost/mysql > > # The JDBC URL that will be used to create tables in your database. > torque.database.buildUrl=3Djdbc:mysql://localhost/BddPortalCCG > > # The JDBC URL that will be used to access your database. > torque.database.url=3Djdbc:mysql://localhost/BddPortalCCG > > # The JDBC database driver to use when connecting to your database. > torque.database.driver=3Dorg.gjt.mm.mysql.Driver > > # The administrative username that has sufficient privileges to creat= e > # and drop databases and tables that Torque executes at generation ti= me. > torque.database.user=3D > > # The administrative password for the supplied username. > torque.database.password=3D > > # The hostname or IP address of your database server. > torque.database.host=3Dlocalhost > > # The location of the your *-schema.xml files (see below). > torque.schema.dir=3D./schema > > > ------------- schema.xml ---------------- > > "http://db.apache.org/torque/dtd/database_3_1.dtd"> > > name=3D"BddPortalCCG"> > > > name=3D"idApp" > required=3D"true" > primaryKey=3D"true" > type=3D"INTEGER" > description=3D"Application Id"/> > name=3D"nameApp" > required=3D"true" > type=3D"VARCHAR" > size=3D"255" > description=3D"Application Name"/> > name=3D"pathApp" > required=3D"true" > type=3D"VARCHAR" > size=3D"255" > description=3D"Application Path"/> >
>
> > Thanks for your help, > > Pierre-Alain Branger > Program of Computational Genomics > Campus Morelos > Tel. +52 777 13 100 24 > pbranger@ccg.unam.mx > > ---------------------------------------------------------------------= > To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org > For additional commands, e-mail: torque-user-help@db.apache.org >= --------------------------------------------------------------------- To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org For additional commands, e-mail: torque-user-help@db.apache.org