Stephen,

Thanks for the pointer to the URL..  You where right about it not being a
Torque problem..  To the extent that I didn't realize all about the
jdbc2pool stuff...  Based on the docs, and looking at Scarab's properties
file, and RTFM, I edited my Torque.properties:

torque.database.default=default
torque.database.default.adapter=mssql

## Using Jdbc2Pool
torque.dsfactory.default.factory=\
  org.apache.torque.dsfactory.Jdbc2PoolDataSourceFactory
torque.dsfactory.default.pool.defaultMaxActive=30
torque.dsfactory.default.pool.testOnBorrow=true
torque.dsfactory.default.pool.validationQuery=SELECT 1
torque.dsfactory.default.connection.driver =
com.microsoft.jdbc.sqlserver.SQLServerDriver
torque.dsfactory.default.connection.url =
jdbc:microsoft:sqlserver:[EMAIL PROTECTED]@:1433;DatabaseName=kinaseprofiler;Sel
ectMethod=cursor
torque.dsfactory.default.connection.user = @sql.user@
torque.dsfactory.default.connection.password = WW#citcf

However, with both the jdbc2pool data source and the torque classic data
source, I am still getting these long JNDI looking errors.  I don't think I
am required to use JNDI, right?  Is there something in my properties that
makes Torque think it needs to go into JNDI?

Eric




do-run-singletest:
     [echo]       Running a single JUnit test
     [echo]
    [junit] Running com.upstate.services.TorqueTest
    [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 7.961 sec
    [junit] Testsuite: com.upstate.services.TorqueTest
    [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 7.961 sec
    [junit] ------------- Standard Output ---------------
    [junit] audits:[]
    [junit] ------------- ---------------- ---------------
    [junit] ------------- Standard Error -----------------
    [junit] java.io.FileNotFoundException:
C:\kinaseprofiler\config\security.pro
perties (The system cannot find the path specified)
    [junit]     at java.io.FileInputStream.open(Native Method)
    [junit]     at java.io.FileInputStream.<init>(FileInputStream.java:64)
    [junit]     at java.io.FileInputStream.<init>(FileInputStream.java:95)
    [junit]     at
com.sun.enterprise.util.Utility.getPropertiesFromFile(Utility
.java:42)
    [junit]     at
com.sun.enterprise.iiop.POAEJBORB.<clinit>(POAEJBORB.java:78)

    [junit]     at java.lang.Class.forName0(Native Method)
    [junit]     at java.lang.Class.forName(Class.java:195)
    [junit]     at org.omg.CORBA.ORB.create_impl(ORB.java:284)
    [junit]     at org.omg.CORBA.ORB.init(ORB.java:328)
    [junit]     at
com.sun.enterprise.util.ORBManager.createORB(ORBManager.java:
138)
    [junit]     at
com.sun.enterprise.util.ORBManager.init(ORBManager.java:65)
    [junit]     at
com.sun.enterprise.naming.SerialInitContextFactory.<init>(Ser
ialInitContextFactory.java:31)
    [junit]     at java.lang.Class.newInstance0(Native Method)
    [junit]     at java.lang.Class.newInstance(Class.java:237)
    [junit]     at
javax.naming.spi.NamingManager.getInitialContext(NamingManage
r.java:652)
    [junit]     at
javax.naming.InitialContext.getDefaultInitCtx(InitialContext.
java:246)
    [junit]     at javax.naming.InitialContext.init(InitialContext.java:222)
    [junit]     at
javax.naming.InitialContext.<init>(InitialContext.java:178)
    [junit]     at
org.apache.torque.util.BasePeer.getInitialContext(BasePeer.ja
va:142)
    [junit]     at
org.apache.torque.util.BasePeer.<clinit>(BasePeer.java:135)
    [junit]     at
com.upstate.services.TorqueTest.testIt(TorqueTest.java:49)
    [junit]     at java.lang.reflect.Method.invoke(Native Method)
    [junit]     at junit.framework.TestCase.runTest(TestCase.java:166)
    [junit]     at junit.framework.TestCase.runBare(TestCase.java:140)
    [junit]     at junit.framework.TestResult$1.protect(TestResult.java:106)
    [junit]     at
junit.framework.TestResult.runProtected(TestResult.java:124)
    [junit]     at junit.framework.TestResult.run(TestResult.java:109)
    [junit]     at junit.framework.TestCase.run(TestCase.java:131)
    [junit]     at junit.framework.TestSuite.runTest(TestSuite.java:173)
    [junit]     at junit.framework.TestSuite.run(TestSuite.java:168)
    [junit]     at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.
run(JUnitTestRunner.java)
    [junit]     at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.execut
eInVM(JUnitTask.java)
    [junit]     at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.execut
e(JUnitTask.java)
    [junit]     at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.execut
e(JUnitTask.java)
    [junit]     at org.apache.tools.ant.Task.perform(Task.java)
    [junit]     at org.apache.tools.ant.Target.execute(Target.java)
    [junit]     at org.apache.tools.ant.Target.performTasks(Target.java)
    [junit]     at org.apache.tools.ant.Project.executeTarget(Project.java)
    [junit]     at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java)
    [junit]     at org.apache.tools.ant.Task.perform(Task.java)
    [junit]     at org.apache.tools.ant.Target.execute(Target.java)
    [junit]     at org.apache.tools.ant.Target.performTasks(Target.java)
    [junit]     at org.apache.tools.ant.Project.executeTarget(Project.java)
    [junit]     at org.apache.tools.ant.Project.executeTargets(Project.java)
    [junit]     at org.apache.tools.ant.Main.runBuild(Main.java)
    [junit]     at org.apache.tools.ant.Main.start(Main.java)
    [junit]     at org.apache.tools.ant.Main.main(Main.java)
    [junit] java.io.FileNotFoundException:
C:\kinaseprofiler\config\ejb.properti
es (The system cannot find the path specified)
    [junit]     at java.io.FileInputStream.open(Native Method)
    [junit]     at java.io.FileInputStream.<init>(FileInputStream.java:64)
    [junit]     at java.io.FileInputStream.<init>(FileInputStream.java:95)
    [junit]     at
com.sun.enterprise.util.Utility.getPropertiesFromFile(Utility
.java:42)
    [junit]     at
com.sun.enterprise.iiop.J2EEInitializer.<init>(J2EEInitialize
r.java:54)
    [junit]     at java.lang.Class.newInstance0(Native Method)
    [junit]     at java.lang.Class.newInstance(Class.java:237)
    [junit]     at
com.sun.corba.ee.internal.Interceptors.PIORB.registerORBIniti
alizers(PIORB.java:377)
    [junit]     at
com.sun.corba.ee.internal.Interceptors.PIORB.parseProperties(
PIORB.java:347)
    [junit]     at
com.sun.corba.ee.internal.TxPOA.TxPIORB.parseProperties(TxPIO
RB.java:116)
    [junit]     at
com.sun.corba.ee.internal.corba.ORB.set_parameters(ORB.java:4
61)
    [junit]     at
com.sun.corba.ee.internal.POA.POAORB.set_parameters(POAORB.ja
va:156)
    [junit]     at
com.sun.corba.ee.internal.Interceptors.PIORB.set_parameters(P
IORB.java:336)
    [junit]     at org.omg.CORBA.ORB.init(ORB.java:329)
    [junit]     at
com.sun.enterprise.util.ORBManager.createORB(ORBManager.java:
138)
    [junit]     at
com.sun.enterprise.util.ORBManager.init(ORBManager.java:65)
    [junit]     at
com.sun.enterprise.naming.SerialInitContextFactory.<init>(Ser
ialInitContextFactory.java:31)
    [junit]     at java.lang.Class.newInstance0(Native Method)
    [junit]     at java.lang.Class.newInstance(Class.java:237)
    [junit]     at
javax.naming.spi.NamingManager.getInitialContext(NamingManage
r.java:652)
    [junit]     at
javax.naming.InitialContext.getDefaultInitCtx(InitialContext.
java:246)
    [junit]     at javax.naming.InitialContext.init(InitialContext.java:222)
    [junit]     at
javax.naming.InitialContext.<init>(InitialContext.java:178)
    [junit]     at
org.apache.torque.util.BasePeer.getInitialContext(BasePeer.ja
va:142)
    [junit]     at
org.apache.torque.util.BasePeer.<clinit>(BasePeer.java:135)
    [junit]     at
com.upstate.services.TorqueTest.testIt(TorqueTest.java:49)
    [junit]     at java.lang.reflect.Method.invoke(Native Method)
    [junit]     at junit.framework.TestCase.runTest(TestCase.java:166)
    [junit]     at junit.framework.TestCase.runBare(TestCase.java:140)
    [junit]     at junit.framework.TestResult$1.protect(TestResult.java:106)
    [junit]     at
junit.framework.TestResult.runProtected(TestResult.java:124)
    [junit]     at junit.framework.TestResult.run(TestResult.java:109)
    [junit]     at junit.framework.TestCase.run(TestCase.java:131)
    [junit]     at junit.framework.TestSuite.runTest(TestSuite.java:173)
    [junit]     at junit.framework.TestSuite.run(TestSuite.java:168)
    [junit]     at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.
run(JUnitTestRunner.java)
    [junit]     at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.execut
eInVM(JUnitTask.java)
    [junit]     at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.execut
e(JUnitTask.java)
    [junit]     at
org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.execut
e(JUnitTask.java)
    [junit]     at org.apache.tools.ant.Task.perform(Task.java)
    [junit]     at org.apache.tools.ant.Target.execute(Target.java)
    [junit]     at org.apache.tools.ant.Target.performTasks(Target.java)

-----Original Message-----
From: Stephen Haberman [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 20, 2002 8:00 PM
To: 'Turbine Torque Users List'
Subject: RE: Trying to create OM with new torque jar, and creating bad
method..


This doesn't look like a Torque problem. I assume you've configured the
JndiDataSourceFactory to get your connection from? The stack trace goes
through the BasePeer then into what to me looks like JNDI (I'm
guessing), and then this com.sun.enterprise.iiop stuff is trying to
init/find JNDI and fails on that FileNotFoundException.

So I'm going to assume this generated code would work if you had it
inside your EJB container because it could find the JNDI (I'm guessing
again), but for test cases, try using one of the different DataSource
factories, e.g. Jdbc2PoolDataSourceFactory as detailed in:

http://jakarta.apache.org/turbine/torque/jdbc2pool-howto.html

It should run just fine from the command-line/JUnit classes.

- Stephen

>     [junit] ------------- Standard Error -----------------
>     [junit] java.io.FileNotFoundException:
> C:\kinaseprofiler\config\security.pro
> perties (The system cannot find the path specified)




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


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

Reply via email to