I want to use the generated peer classes as a standalone database layer
without the whole html stuff. Generation and compiling for table Histrate
works well, but if I run my main method, I get an excpetion:

C:\Windows\Profiles\roland\Eigene Dateien\torque\src\build.xml:59:
java.lang.ExceptionInInitializerError
java.lang.ExceptionInInitializerError:
org.apache.turbine.services.Instantiation
Exception: ServiceBroker: unknown service LoggingService requested
        at
org.apache.turbine.services.BaseServiceBroker.getServiceInstance(BaseService
Broker.java:313)
        at
org.apache.turbine.services.BaseServiceBroker.getService(BaseServiceBroker.j
ava:258)
        at org.apache.turbine.util.Log.error(Log.java:450)
        at
org.apache.turbine.om.peer.BasePeer.getMapBuilder(BasePeer.java:1854)
        at
swissrisk.database.BaseHistratePeer.<clinit>(BaseHistratePeer.java:33)
        at swissrisk.database.TestDatabase.main(TestDatabase.java:15)
        at java.lang.reflect.Method.invoke(Native Method)
        at
org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:107)
        at org.apache.tools.ant.taskdefs.Java.run(Java.java:245)
        at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:122)
        at org.apache.tools.ant.taskdefs.Java.execute(Java.java:86)
        at org.apache.tools.ant.Target.execute(Target.java:142)
        at org.apache.tools.ant.Project.runTarget(Project.java:818)
        at org.apache.tools.ant.Project.executeTarget(Project.java:532)
        at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:213)
        at
org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:103)
        at org.apache.tools.ant.Target.execute(Target.java:142)
        at org.apache.tools.ant.Project.runTarget(Project.java:818)
        at org.apache.tools.ant.Project.executeTarget(Project.java:532)
        at org.apache.tools.ant.Project.executeTargets(Project.java:506)
        at org.apache.tools.ant.Main.runBuild(Main.java:420)
        at org.apache.tools.ant.Main.main(Main.java:149)

It seems, that the initialization of the Logging service fails. Is it
possible to use the database layer standalone? What have I to do for the
correct initialization? Where have I to put the database information (user,
password, driver, ...), if I want to use the internal database connections?

The class causing the Exception:

package swissrisk.database;

public class TestDatabase
{
    public static void main( String[] args )
        throws Exception
    {
        System.out.println("Testprogramm f�r Torque");
        Criteria crit = new Criteria();
        Vector v = HistratePeer.doSelect( crit );
        System.out.println("Records read: " + v.size() );
    } // void main( String[] );

} // class TestDatabase

Thanks for help

Roland R�der    tel:    +41 1 455 70 00
Swissrisk AG    fax:    +41 1 455 70 01
R�ffelstrasse 32        mobile: +49 174 3279432
8045 Z�rich     mail:   [EMAIL PROTECTED]
Switzerland     home:   www.swissrisk.com



Picture

Picture

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to