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 -


<project name="quickstart" default="run" basedir="."><property name="build" 
value="bin"/>
   <property name="src" value="."/>
  
   <path id="base.classpath">
      <pathelement path="."/>
      <pathelement path="${build}/classes"/>
      <fileset dir="${src}/lib/">
         <include name="*.jar"/>
      </fileset> 
   </path>
    
   <target name="run">
         <java classname="de.stephanwiesner.Bookstore"
         taskname="starter" failonerror="false" fork="true">  
         <classpath refid="base.classpath" />   
       </java>
   </target>  
  
</project>


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


C:\tomcat\webapps\medicare_torque_new>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.<ini
t>(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: <clinit> signature: ()V) Incompatible argument to function
  [starter]     at org.apache.log4j.Logger.getLogger(Logger.java:85)
  [starter]     at org.apache.commons.logging.impl.Log4JLogger.<init>(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 !

Reply via email to