Hi Karan,
Before you run the tck, you need to set up the database. This is done
by the maven build goal but not done by the runtck.jdori goal.
The reason is that setting up the database takes some number of
minutes, and when running, you don't want to spend the time running
this goal. And there's no easy way to tell if you need to run the goal.
If running maven installSchema doesn't do the trick for you, please
run maven build and see if that fixes it.
Craig
On Aug 13, 2005, at 6:56 AM, Karan Malhi wrote:
Thanks Michael,
This definitely helped. I ran maven runtck.jdori and it gave me
errors. It
could not establish a connection to the database. Below is the partial
output:
[java] java.sql.SQLException: Connections could not be acquired
from the
underlying database!
[java] at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:
104)
[java] at
com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnec
tion(
C3P0PooledConnectionPool.java:236)
[java] at com.mchange.v2.c3p0.PoolBackedDataSource.getConnection(
PoolBackedDataSource.java:94)
[java] at com.mchange.v2.c3p0.ComboPooledDataSource.getConnection(
ComboPooledDataSource.java:521)
[java] at org.jpox.store.rdbms.RDBMSManager.<init>
(RDBMSManager.java:215)
[java] at org.jpox.store.rdbms.RDBMSManagerFactory.getStoreManager(
RDBMSManagerFactory.java:59)
[java] at org.jpox.AbstractPersistenceManager.<init>(
AbstractPersistenceManager.java:194)
[java] at org.jpox.PersistenceManagerImpl.<init>
(PersistenceManagerImpl.java
:34)
[java] at
org.jpox.PersistenceManagerFactoryImpl.getPersistenceManager(
PersistenceManagerFactoryImpl.java:811)
[java] at
org.jpox.PersistenceManagerFactoryImpl.getPersistenceManager(
PersistenceManagerFactoryImpl.java:786)
[java] at org.apache.jdo.tck.JDO_Test.getPM(JDO_Test.java:421)
[java] at org.apache.jdo.tck.JDO_Test.deleteTearDownClasses
(JDO_Test.java:367)
[java] at org.apache.jdo.tck.JDO_Test.localTearDown(JDO_Test.java:293)
[java] at org.apache.jdo.tck.JDO_Test.tearDown(JDO_Test.java:263)
[java] at org.apache.jdo.tck.JDO_Test.runBare(JDO_Test.java:211)
[java] at junit.framework.TestResult$1.protect(TestResult.java:106)
[java] at junit.framework.TestResult.runProtected(TestResult.java:124)
[java] at junit.framework.TestResult.run(TestResult.java:109)
[java] at junit.framework.TestCase.run(TestCase.java:118)
[java] at junit.framework.TestSuite.runTest(TestSuite.java:208)
[java] at junit.framework.TestSuite.run(TestSuite.java:203)
[java] at junit.framework.TestSuite.runTest(TestSuite.java:208)
[java] at junit.framework.TestSuite.run(TestSuite.java:203)
[java] at junit.textui.TestRunner.doRun(TestRunner.java:116)
[java] at junit.textui.TestRunner.doRun(TestRunner.java:109)
[java] at org.apache.jdo.tck.util.BatchTestRunner.start
(BatchTestRunner.java
:128)
[java] at org.apache.jdo.tck.util.BatchTestRunner.main
(BatchTestRunner.java
:106)
[java] Caused by:
com.mchange.v2.resourcepool.CannotAcquireResourceException:
A ResourcePool could not acquire a resource from its primary
factory or
source.
[java] at com.mchange.v2.resourcepool.BasicResourcePool.awaitAcquire(
BasicResourcePool.java:970)
[java] at
com.mchange.v2.resourcepool.BasicResourcePool.checkoutResource(
BasicResourcePool.java:208)
[java] at
com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnec
tion(
C3P0PooledConnectionPool.java:232)
[java] ... 25 more
On 8/13/05, Michael Bouschen <[EMAIL PROTECTED]> wrote:
Hi Karan,
Hi,
I guess this is a maven issue. I am getting a lot of errors when
i run
maven
-o runtck.iut. The errors say that it couldnt find plugin for
c3p0 in
classpath. Where do i set that? Below is the partial output:
please run maven without the -o option. Maven runs in offline mode in
case option -o is specified. This means maven does not check the
remote
repository for any dependencies to be downloaded. It sounds like
you do
not have the c3p0 jar in you local repository under
~/.maven/repository/c3p0/libs/c2p0-0.9.0.jar. Maven automatically
adds
this to the classpath, so there is no need to do this manually.
BTW, did you intend to run tck20 with the reference implementation,
meaning with JPOX? If yes, please use the goal runtck.jdori: maven
runtck.jdori. The goal runtck.iut is used if you want to run the tck
against an JDO implementation (called iut: implementation under test)
to check whether it is JDO compliant.
I hope this helps.
Regards Michael
doRuntck.iut:
[echo] Run JDO TCK on the IUT with configuration
Overriding previous definition of reference to
this.project.class.path
[java] RUN CompletenessTest.test ERROR
[java] Description: Completeness test with standard mapping, basic
testdata
with all relationships and embedded objects.
[java] Time: 0.552
[java] There was 1 error:
[java] 1) test(org.apache.jdo.tck.mapping
.CompletenessTest)javax.jdo.JDOFatalUserException:
The connection pool plugin of type "C3P0" was not found in the
CLASSPATH!
[java] at
org.jpox.AbstractPersistenceManagerFactory.freezeConfiguration(
AbstractPersistenceManagerFactory.java:232)
[java] at
org.jpox.PersistenceManagerFactoryImpl.getPersistenceManagerFactory(
PersistenceManagerFactoryImpl.java:119)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke(
NativeMethodAccessorImpl.java:39)
[java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(
DelegatingMethodAccessorImpl.java:25)
[java] at javax.jdo.JDOHelper.getPersistenceManagerFactory
(JDOHelper.java
:472)
[java] at javax.jdo.JDOHelper.getPersistenceManagerFactory
(JDOHelper.java
:423)
[java] at org.apache.jdo.tck.JDO_Test.getPMF(JDO_Test.java:410)
[java] at org.apache.jdo.tck.JDO_Test.setUp(JDO_Test.java:179)
[java] at org.apache.jdo.tck.JDO_Test.runBare(JDO_Test.java:196)
[java] at org.apache.jdo.tck.util.BatchTestRunner.start(
BatchTestRunner.java
:128)
[java] at org.apache.jdo.tck.util.BatchTestRunner.main(
BatchTestRunner.java
:106)
[java] FAILURES!!!
[java] Error summary:
[java] 001 error: javax.jdo.JDOFatalUserException: The connection
pool
plugin of type "C3P0" was not found in the CLASSPATH!
[java] Tests run: 1, Failures: 0, Errors: 1, Time: 0.552 seconds.
[java] Excluded tests: [
org.apache.jdo.tck.enhancement.FieldAccessModified,
org.apache.jdo.tck.enhancement.ImplementsPersistenceCapable]
[java] [ERROR] Java Result: 1
--
Michael Bouschen [EMAIL PROTECTED] Engineering GmbH
mailto:[EMAIL PROTECTED] http://www.tech.spree.de/
Tel.:++49/30/235 520-33 Buelowstr. 66
Fax.:++49/30/2175 2012 D-10783 Berlin
--
Karan Malhi
Craig Russell
Architect, Sun Java Enterprise System http://java.sun.com/products/jdo
408 276-5638 mailto:[EMAIL PROTECTED]
P.S. A good JDO? O, Gasp!