You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by am...@mhs.cs.ui.ac.id on 2003/07/22 00:38:52 UTC

Error running

Hello .. again, i'm just testing the torque .. using tdk2-2,mysql .. this is my 
code :

==SQLTes.java==
import org.apache.torque.*;
import org.apache.torque.util.*;
import java.util.Date;
import org.ncs.jts.om.Proyek;
import org.ncs.jts.om.ProyekPeer;

public class SQLTes
{	public static void main(String []args)
	{
		try
		{
		  /* Torque properties file */
		  Torque.init("Torque.properties");

		  Proyek pry = new Proyek();
		  pry.setNamaproyek("Pembuatan Website YPSS");
		  pry.setKetproyek("Proyek ini merupakan proyek tender yang 
belum tentu dapat");
		  Date tgl1 = new Date();
		  Date tgl2 = new Date();
		  tgl1.setDate(1);
		  tgl2.setDate(2);
		  tgl1.setMonth(1);
		  tgl2.setMonth(2);
		  tgl1.setYear(2002+1900);
		  tgl2.setYear(2003+1900);
		  pry.setTglmulaipry(tgl1);
		  pry.setTglselesaipry(tgl2);
		  pry.setStatuspry(1);
		  pry.save();
		  System.out.println("Stored:"  + pry);		}
		catch (Exception e) 
		{  
			e.printStackTrace();    
		}
	}
}
==SQLTes.java==

and then i try running using ant :

==run-tes.xml==
<?xml version="1.0"?>
<project name="quickstart" default="run" basedir=".">
<!-- Global Properties -->
   <property name="build" value="webapps/jts/WEB-INF"/>
   <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">
       <!-- 
       http://www.mail-archive.com/ant-user@jakarta.apache.org/msg22087.html
       set fork=true; the problem is that the classloader in Ant 1.5 doesnt 
       pass down all the addons that are in the runtime, 
       just java.* and javax.*
       -->
       <java classname="SQLTes"
         taskname="starter" failonerror="false" fork="true">  
         <classpath refid="base.classpath" />   
       </java>
   </target>  
</project>
==run-tes.xml==

and then i got this annoying message .. 
==message::
Buildfile: run-tes.xml

run:
 [starter] java.lang.NoClassDefFoundError: org/apache/torque/om/BaseObject
 [starter]      at .. blabla
 [starter]      at .. blabla
 [starter]      at .. blabla
==message==

can anybody help me .. please :)

---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org


Re: Error running

Posted by Nathan Bubna <na...@esha.com>.
amri100@mhs.cs.ui.ac.id said:
> Hello .. again, i'm just testing the torque .. using tdk2-2,mysql .. this is
my
...
> can anybody help me .. please :)

no, not here.  go to the torque user list.

http://db.apache.org/mail.html

and here's some other good reading:
http://jakarta.apache.org/site/mail.html
http://www.catb.org/~esr/faqs/smart-questions.html

Nathan Bubna
nathan@esha.com


---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org