[prev in list] [next in list] [prev in thread] [next in thread] 

List:       turbine-torque-user
Subject:    Re: Antw: err when trying to access database after compiling om classes
From:       "ve6" <ve6 () indiatimes ! com>
Date:       2003-09-28 6:25:07
[Download RAW message or body]


hi,




  the following properties r set in torque.properties file-



log4j.category.org.apache.torque = ALL, org.apache.torque
log4j.appender.org.apache.torque = org.apache.log4j.FileAppender
log4j.appender.org.apache.torque.file = ${torque.applicationRoot}/logs/torque.log
log4j.appender.org.apache.torque.layout = org.apache.log4j.PatternLayout
log4j.appender.org.apache.torque.layout.conversionPattern = %d [%t] %-5p %c - %m%n
log4j.appender.org.apache.torque.append = false



## Using commons-dbcp 
torque.dsfactory.bookstore.factory=org.apache.torque.dsfactory.SharedPoolDataSourceFactory
 torque.dsfactory.bookstore.pool.defaultMaxActive=10
torque.dsfactory.bookstore.pool.testOnBorrow=true
torque.dsfactory.bookstore.pool.validationQuery=SELECT 1
torque.dsfactory.bookstore.connection.driver = org.gjt.mm.mysql.Driver
torque.dsfactory.bookstore.connection.url = jdbc:mysql:///bookstore
torque.dsfactory.bookstore.connection.user = 
torque.dsfactory.bookstore.connection.password = 


and build.properties has the following database settings


torque.database.createUrl = jdbc:mysql:///mysql
torque.database.buildUrl = jdbc:mysql:///bookstore
torque.database.url = jdbc:mysql:///bookstore
torque.database.driver = org.gjt.mm.mysql.Driver
torque.database.user = 
torque.database.password =
torque.database.host =


torque.targetPackage = de.stephanwiesner      
torque.database.default=bookstore
torque.database.bookstore.adapter=mysql
torque.project = bookstore
torque.sameJavaName = false


rgds,


vidya



 


 



Hi,
I had this error, in the very beginning, I couldn't remember
the exact reason, but it steps into a wrong/ missing property files
(Torque.property, schema.xml) , or an incompatible version of common
logging or related jars. may be I can help you if I see the property
files.

regards,
Alvin

Alvin K. Antony
Ludwig-Maximilians-Universität München
Referat Internet
Softwareentwicklung
Oettingenstraße 67
80538 München
Germany
-------------------------------------------
Phone: +49 (0)89 2102-5979
Fax: +49 (0)89 2102-5980

Mobile: +49 (0)160 97340713

E-Mail: aantony@lmu.de

Web: http://www.lmu.de/internet/


&gt;&gt;&gt; ve6@indiatimes.com 09/25 7:21 &gt;&gt;&gt;
hi,


i am using torque 3.0 with mysql and ant 1.5.4 .


I tried the example in tutorial and successfully created a
database,generated om classes.i am getting an error when i try to access
database ,using this default ant build file in tutorial -


&lt;project name="quickstart" default="run" basedir="."&gt;&lt;property
name="build" value="bin"/&gt;
&lt;property name="src" value="."/&gt;

&lt;path id="base.classpath"&gt;
&lt;pathelement path="."/&gt;
&lt;pathelement path="${build}/classes"/&gt;
&lt;fileset dir="${src}/lib/"&gt;
&lt;include name="*.jar"/&gt;
&lt;/fileset&gt; 
&lt;/path&gt;

&lt;target name="run"&gt;
&lt;java classname="de.stephanwiesner.Bookstore"
taskname="starter" failonerror="false" fork="true"&gt; 
&lt;classpath refid="base.classpath" /&gt; 
&lt;/java&gt;
&lt;/target&gt; 

&lt;/project&gt;


i am getting this error ,can u tell where i am going wrong


C:\tomcat\webapps\medicare_torque_new&gt;ant
Buildfile: build.xml


run:
[starter] Criteria initialised
[starter] expc tprop
[starter] org.apache.commons.logging.LogConfigurationException:
java.lang.refl
ect.InvocationTargetException
[starter] at
org.apache.commons.logging.impl.LogFactoryImpl.newInstance(Lo
gFactoryImpl.java:532)
[starter] at
org.apache.commons.logging.impl.LogFactoryImpl.getInstance(Lo
gFactoryImpl.java:272)
[starter] at
org.apache.commons.logging.impl.LogFactoryImpl.getInstance(Lo
gFactoryImpl.java:246)
[starter] at
org.apache.commons.logging.LogFactory.getLog(LogFactory.java:
395)
[starter] at
org.apache.commons.configuration.PropertiesConfiguration.&lt;ini
t&gt;(PropertiesConfiguration.java:101)
[starter] at org.apache.torque.Torque.init(Torque.java:384)
[starter] at de.stephanwiesner.Bookstore.main(Bookstore.java:14)
[starter] Caused by: java.lang.reflect.InvocationTargetException
[starter] at
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
[starter] at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeC
onstructorAccessorImpl.java:39)
[starter] at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Del
egatingConstructorAccessorImpl.java:27)
[starter] at
java.lang.reflect.Constructor.newInstance(Constructor.java:27
4)
[starter] at
org.apache.commons.logging.impl.LogFactoryImpl.newInstance(Lo
gFactoryImpl.java:525)
[starter] ... 6 more
[starter] Caused by: java.lang.VerifyError: (class:
org/apache/log4j/LogManage
r, method: &lt;clinit&gt; signature: ()V) Incompatible argument to
function
[starter] at org.apache.log4j.Logger.getLogger(Logger.java:85)
[starter] at
org.apache.commons.logging.impl.Log4JLogger.&lt;init&gt;(Log4JLogge
r.java:102)
[starter] ... 11 more
[starter] log4j:ERROR No appenders could be found for category
(org.apache.tor
que.util.BasePeer).
[starter] expc tprop 2
[starter] log4j:ERROR Please initialize the log4j system properly.
[starter] java.lang.NullPointerException
[starter] at org.apache.torque.BaseBook.save(BaseBook.java:353)
[starter] at de.stephanwiesner.Bookstore.main(Bookstore.java:24)


BUILD SUCCESSFUL
Get Your Private, Free E-mail from Indiatimes at 
http://email.indiatimes.com 
Buy The Best In BOOKS at http://www.bestsellers.indiatimes.com 
Bid for Air Tickets on Air Sahara Flights at Prices Lower Than Before.
Just log on to http://airsahara.indiatimes.com and Bid Now !


Get Your Private, Free E-mail from Indiatimes at  http://email.indiatimes.com
Buy The Best In BOOKS at http://www.bestsellers.indiatimes.com
Bid for Air Tickets on Air Sahara Flights at Prices Lower Than Before. Just log on to \
http://airsahara.indiatimes.com and Bid Now !



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic