I have some code I use for testing my peers routines standalone. It
ran on an old version of the TDK. I have upgraded the TDK and now it
fails.
I replaced:
TurbineResourceService.setPropertiesFileName("e:/ChrisTR.properties");
with:
TurbineConfig config = new TurbineConfig("e:/", "test.properties");
config.init();
I also tried:
TurbineConfig config = new TurbineConfig("e:/", "test.properties");
Turbine turbine = new Turbine();
turbine.init(config);
The getServiceInstance method in BaseServiceBroker throws an
InstantiationException (stack trace below) saying:
ServiceBroker: unknown service PoolBrokerService requested
In the test.properties file, I have the following line:
services.TurbinePoolBrokerService.classname=org.apache.turbine.service
s.db.PoolBrokerService
If I insert
System.out.println(TurbineResources.getString("services.TurbinePoolBro
kerService.classname"));
in my code, it spits out:
org.apache.turbine.services.db.PoolBrokerService
I see the PoolBrokerService.class in the turbine.jar in my classpath.
In the stack trace below, the init invocation was commented out
because I was getting a message about double initiatilization, but I
get the same InstantiationException either way.
What am I missing?
Thanks,
Chris
D:\tdk\webapps\DSS\WEB-INF\classes>java TPeers
org.apache.turbine.Turbine: init
org.apache.turbine.Turbine: init
org.apache.turbine.Turbine: Turbine: init() Ready to Rumble!
java.lang.reflect.InvocationTargetException:
org.apache.turbine.services.Instant
iationException: ServiceBroker: unknown service PoolBrokerService
requested
at
org.apache.turbine.services.BaseServiceBroker.getServiceInstance(Base
ServiceBroker.java, Compiled Code)
at
org.apache.turbine.services.BaseServiceBroker.getService(BaseServiceB
roker.java, Compiled Code)
at
org.apache.turbine.services.db.TurbineDB.getPoolBroker(TurbineDB.java
:312)
at
org.apache.turbine.services.db.TurbineDB.getDB(TurbineDB.java:288)
at
org.apache.turbine.om.peer.BasePeer.doSelect(BasePeer.java:1009)
at com.dupen.dss.PersonPeer.init(PersonPeer.java:190)
at java.lang.reflect.Method.invoke(Native Method)
at com.dupen.dss.DataObject.<init>(DataObject.java:95)
at com.dupen.dss.DataObject.<init>(DataObject.java:81)
at com.dupen.dss.Person.<init>(Person.java:32)
at TPeers.main(TPeers.java:25)
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?: [EMAIL PROTECTED]