db-jdo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michelle Caisse <Michelle.Cai...@Sun.COM>
Subject Re: Notes on today's checkins
Date Mon, 18 Jul 2005 16:57:04 GMT
Hi, Michael,

This looks good  to me.

-- Michelle

Michael Bouschen wrote:

> Hi Craig,
>
>> Hi,
>>
>> A few notes on the checkins that Michelle and I did today.
>> 1. Only one person can check in, but everything we checked in today 
>> was a collaboration among Michelle, Michael W, and me.
>>
>> 2. The team had decided earlier that we did not want to require a 
>> dependency (Maven) on a JNDI implementation in order to run the TCK, 
>> since only two of the test classes even need JNDI. But Michelle and I 
>> didn't want to put the providerutil.jar and fscontext.jar directly 
>> into the tck20 directory. So we added tck20/lib/ext and put the jar 
>> files there. We intended to but forgot to update the README.txt to 
>> discuss this.
>
>
> There are three subprojects having a JNDI related test case: ri11, 
> fostore20 and tck20. All of them need an JNDI implementation (e.g. 
> providerutil.jar and fscontext.jar) and it would be best to store them 
> in a directory that is available for all subprojects. I propose 
> putting them under trunk/lib/ext instead of trunk/tck20/lib/ext.
>
> Attached you find a patch for review. I changed the project.properties 
> in ri11, fostore20 and tck20 to refer to ../lib/ext. I also updated 
> the JNDI section in README.txt. What do you think?
>
>>
>> 3. We found an issue with the property in jndi.properties 
>> java.naming.provider.url=file:. that produced a fatal exception in 
>> the Mac version of JNDI. It appeared to be a weird error complete 
>> with misspelling, and didn't encounter the error when we removed the 
>> property. If other platforms encounter errors (not failures) running 
>> the JNDI tests, we need to discuss and possibly file a Sun bug report. 
>
>
> I removed java.naming.provider.url=file:. from all the jndi.properties.
>
> Regards Michael
>
>>
>> 4. We added a method to verify that all of the javax.jdo.option 
>> properties set in the Properties instance were actually set in the 
>> PMF that was created. We deliberately omitted properties 
>> ConnectionUserName and ConnectionPassword because these properties 
>> cannot be read by JPOX. We verify that the PMF that we bind to JNDI 
>> is configured with the properties we want, and verify that the PMF 
>> that we look up has the same properties. JPOX doesn't handle the case 
>> correctly, most likely because they don't implement Referenceable (as 
>> required by EntityManagerFactory but not by 
>> PersistenceManagerFactory). It might be that we should add this 
>> requirement to the specification.
>>
>> 5. It's not standard Apache practice to implement the @author tag. In 
>> future, we should not include this tag.
>>
>> Craig and Michelle
>>
>> Here's the exception we got with the java.naming.provider.url=file:. 
>> property set. Note the strange message "...remaining name..."
>>
>> RUN GetPMFByJNDILocation.testValidGetPMF     [INFO] tck - Exception 
>> during setUp or runtest:  <javax.jdo.JDOFatalException: Caught 
>> NamingException trying to bindnull
>>     [java] NestedThrowables:
>>     [java] javax.naming.NoPermissionException; remaining name 
>> '"/Users/clr/apachejdo/jdo/trunk/tck20/target/./Users/clr/apachejdo/jdo/trunk/tck20/target/classes"'>javax.jdo.JDOFatalException:

>> Caught NamingException trying to bindnull
>>     [java]      at 
>> org.apache.jdo.tck.api.persistencemanagerfactory.GetPMFByJNDILocation.getPMF(GetPMFByJNDILocation.java:95)

>>
>>     [java]      at 
>> org.apache.jdo.tck.api.persistencemanagerfactory.AbstractGetPMF.checkGetPMFWithValidProperties(AbstractGetPMF.java:139)

>>
>>     [java]      at 
>> org.apache.jdo.tck.api.persistencemanagerfactory.GetPMFByJNDILocation.testValidGetPMF(GetPMFByJNDILocation.java:75)

>>
>>     [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 java.lang.reflect.Method.invoke(Method.java:324)
>>     [java]      at junit.framework.TestCase.runTest(TestCase.java:154)
>>     [java]      at 
>> org.apache.jdo.tck.JDO_Test.runBare(JDO_Test.java:197)
>>     [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] NestedThrowablesStackTrace:
>>     [java] javax.naming.NoPermissionException; remaining name 
>> '"/Users/clr/apachejdo/jdo/trunk/tck20/target/./Users/clr/apachejdo/jdo/trunk/tck20/target/classes"'

>>
>>     [java]      at 
>> com.sun.jndi.fscontext.FSContext.checkCanWrite(FSContext.java:939)
>>     [java]      at 
>> com.sun.jndi.fscontext.RefFSContext.setBindings(RefFSContext.java:594)
>>     [java]      at 
>> com.sun.jndi.fscontext.RefFSContext.bindObject(RefFSContext.java:338)
>>     [java]      at 
>> com.sun.jndi.fscontext.RefFSContext.bind(RefFSContext.java:169)
>>     [java]      at 
>> com.sun.jndi.fscontext.FSContext.bind(FSContext.java:167)
>>     [java]      at 
>> javax.naming.InitialContext.bind(InitialContext.java:355)
>>     [java]      at 
>> org.apache.jdo.tck.api.persistencemanagerfactory.GetPMFByJNDILocation.getPMF(GetPMFByJNDILocation.java:91)

>>
>>     [java]      at 
>> org.apache.jdo.tck.api.persistencemanagerfactory.AbstractGetPMF.checkGetPMFWithValidProperties(AbstractGetPMF.java:139)

>>
>>     [java]      at 
>> org.apache.jdo.tck.api.persistencemanagerfactory.GetPMFByJNDILocation.testValidGetPMF(GetPMFByJNDILocation.java:75)

>>
>>     [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 java.lang.reflect.Method.invoke(Method.java:324)
>>     [java]      at junit.framework.TestCase.runTest(TestCase.java:154)
>>     [java]      at 
>> org.apache.jdo.tck.JDO_Test.runBare(JDO_Test.java:197)
>>     [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)
>>
>> Craig Russell
>>
>> Architect, Sun Java Enterprise System http://java.sun.com/products/jdo
>>
>> 408 276-5638 mailto:Craig.Russell@sun.com
>>
>> P.S. A good JDO? O, Gasp!
>>
>>
>
>
>------------------------------------------------------------------------
>
>Index: tck20/test/conf/alltests.conf
>===================================================================
>--- tck20/test/conf/alltests.conf	(revision 219378)
>+++ tck20/test/conf/alltests.conf	(working copy)
>@@ -150,6 +150,14 @@
> org.apache.jdo.tck.api.persistencemanagerfactory.Close \
> org.apache.jdo.tck.api.persistencemanagerfactory.CloseFailsIfTransactionActive \
> org.apache.jdo.tck.api.persistencemanagerfactory.CloseWithoutPermissionThrowsSecurityException
\
>+org.apache.jdo.tck.api.persistencemanagerfactory.GetPMFByFile \
>+org.apache.jdo.tck.api.persistencemanagerfactory.GetPMFByFileAndClassLoader \
>+org.apache.jdo.tck.api.persistencemanagerfactory.GetPMFByResource \
>+org.apache.jdo.tck.api.persistencemanagerfactory.GetPMFByResourceAndClassLoader \
>+org.apache.jdo.tck.api.persistencemanagerfactory.GetPMFByStream \
>+org.apache.jdo.tck.api.persistencemanagerfactory.GetPMFByStreamAndClassLoader \
>+org.apache.jdo.tck.api.persistencemanagerfactory.GetPMFByJNDILocation \
>+org.apache.jdo.tck.api.persistencemanagerfactory.GetPMFByJNDILocationAndClassLoader \
> org.apache.jdo.tck.api.persistencemanagerfactory.GetPersistenceManager \
> org.apache.jdo.tck.api.persistencemanagerfactory.GetPersistenceManagerFactoryByPropertiesInstance
\
> org.apache.jdo.tck.api.persistencemanagerfactory.GetPersistenceManagerForUser \
>@@ -346,13 +354,5 @@
> org.apache.jdo.tck.transactions.SetRetainValuesCalledDuringTxCompletion \
> org.apache.jdo.tck.transactions.SetRetainValuesTrueWhenNotSupported \
> org.apache.jdo.tck.transactions.SetSynchronization \
>-org.apache.jdo.tck.transactions.SetSynchronizationToNull \
>-org.apache.jdo.tck.api.persistencemanagerfactory.GetPMFByFile \
>-org.apache.jdo.tck.api.persistencemanagerfactory.GetPMFByFileAndClassLoader \
>-org.apache.jdo.tck.api.persistencemanagerfactory.GetPMFByResource \
>-org.apache.jdo.tck.api.persistencemanagerfactory.GetPMFByResourceAndClassLoader \
>-org.apache.jdo.tck.api.persistencemanagerfactory.GetPMFByStream \
>-org.apache.jdo.tck.api.persistencemanagerfactory.GetPMFByStreamAndClassLoader \
>-org.apache.jdo.tck.api.persistencemanagerfactory.GetPMFByJNDILocation \
>-org.apache.jdo.tck.api.persistencemanagerfactory.GetPMFByJNDILocationAndClassLoader 
>+org.apache.jdo.tck.transactions.SetSynchronizationToNull
> 
>Index: tck20/project.properties
>===================================================================
>--- tck20/project.properties	(revision 219378)
>+++ tck20/project.properties	(working copy)
>@@ -82,7 +82,7 @@
> collections.jarfile = ${pom.getDependencyPath('commons-collections')}
> 
> # jndi dependencies
>-jndi = ${basedir}/lib/ext/fscontext.jar${path.separator}${basedir}/lib/ext/providerutil.jar
>+jndi = ${basedir}/../lib/ext/fscontext.jar${path.separator}${basedir}/../lib/ext/providerutil.jar
> 
> jdo.tck.pcclasses.sources = \
>     org/apache/jdo/tck/pc/lifecycle/StateTransitionObj.java \
>Index: fostore20/test/conf/jndi.properties
>===================================================================
>--- fostore20/test/conf/jndi.properties	(revision 219378)
>+++ fostore20/test/conf/jndi.properties	(working copy)
>@@ -14,4 +14,3 @@
> # limitations under the License.
> 
> java.naming.factory.initial=com.sun.jndi.fscontext.RefFSContextFactory
>-java.naming.provider.url=file:.
>Index: fostore20/project.properties
>===================================================================
>--- fostore20/project.properties	(revision 219378)
>+++ fostore20/project.properties	(working copy)
>@@ -31,10 +31,11 @@
> antlr.jarfile = ${pom.getDependencyPath('antlr:antlr')}
> jta.jarfile = ${pom.getDependencyPath('geronimo-spec:geronimo-spec-jta')}
> logging.jarfile = ${pom.getDependencyPath('commons-logging')}
>-# JNDI implementation
>-jndi = ${basedir}/fscontext.jar${path.separator}${basedir}/providerutil.jar
> xmlparser = 
> 
>+# jndi dependencies
>+jndi = ${basedir}/../lib/ext/fscontext.jar${path.separator}${basedir}/../lib/ext/providerutil.jar
>+
> jdo.testclasses.dir = ${maven.build.dir}/test-classes
> jdo.pcclasses.jarfile = ${maven.build.dir}/test-classes/pcclasses.jar
> jdo.testclasses.jarfile = ${maven.build.dir}/test-classes/jdo-ri-tests.jar
>Index: btree/project.properties
>===================================================================
>--- btree/project.properties	(revision 219378)
>+++ btree/project.properties	(working copy)
>@@ -20,9 +20,9 @@
> # http://www.netbeans.org/community/sources for more info. 
> # If you are inside SWAN you can use a proxy cvsnetbeansorg.sfbay.sun.com.
> 
>-netbeans.cvsroot=:pserver:anoncvs@cvs.netbeans.org:/cvs
>+#netbeans.cvsroot=:pserver:anoncvs@cvs.netbeans.org:/cvs
> # SWAN proxy
>-#netbeans.cvsroot=:pserver:anoncvs@cvsnetbeansorg.sfbay.sun.com:/cvs
>+netbeans.cvsroot=:pserver:anoncvs@cvsnetbeansorg.sfbay.sun.com:/cvs
> 
> # We need btree sources that compile with -target 1.3, 
> # so use a specific btree version
>Index: README.txt
>===================================================================
>--- README.txt	(revision 219378)
>+++ README.txt	(working copy)
>@@ -39,20 +39,19 @@
> it to your local maven repository:
>   cp antlr-2.7.3.jar $HOME/.maven/repository/antlr/jars/antlr-2.7.3.jar
> 
>-- JNDI implementation
>-- fscontext.jar and providerutil.jar
>-The JDORI JNDI test case in ri11 and fostore20 needs a JNDI implementation. 
>-To configure this please update the property jndi in ri11/project.properties 
>-and fostore20/project.properties to include all jars of your JNDI 
>-implementation. The properties file jndi.properties under ri11/test
>-should define all the necessary properties of your JNDI implemenation.
>-The defaults setting in project.properties and jndi.properties use Sun's File 
>-System Service Provider implementation (fscontext.jar and providerutil.jar) and 
>-assume to find both jars in the directory ri11. For donwload please go to 
>-http://java.sun.com/products/jndi/downloads/index.html, click the Download 
>-button at 'Download JNDI 1.2.1 & More', accept a license agreement, download 
>-'File System Service Provider, 1.2 Beta 3' and then unpack the downloaded zip.
>- It includes the jars fscontext.jar and providerutil.jar.
>+- JNDI implementation (fscontext.jar and providerutil.jar)
>+The JNDI test cases in ri11, fostore20 and tck20 need a JNDI implementation.
>+To configure this please check the property jndi in project.properties of ri11,
>+fostore20 and tck20. It lists all jars of your JNDI implementation in a 
>+path-like syntax. Furthermore, the three subprojects have a properties file 
>+test/conf/jndi.properties defining all the necessary properties of the JNDI 
>+implemenation. The default setting in project.properties and jndi.properties 
>+use Sun's File System Service Provider implementation (fscontext.jar and 
>+providerutil.jar) and assume to find both jars in the directory trunk/lib/ext. 
>+For donwload please go to http://java.sun.com/products/jndi/downloads/index.html,
>+click the Download button at 'Download JNDI 1.2.1 & More', accept a license 
>+agreement, download 'File System Service Provider, 1.2 Beta 3' and then unpack
>+the downloaded zip. It includes the jars fscontext.jar and providerutil.jar.
> 
> - JPOX
> The Reference Implementation for JDO 2.0 is JPOX. To run tck20 you must
>@@ -67,7 +66,8 @@
>   cp jpox-c3p0-<version>.jar $HOME/.maven/repository/jpox/jars/jpox-c3p0-SNAPSHOT.jar
>   cp jpox-dbcp-<version>.jar $HOME/.maven/repository/jpox/jars/jpox-dbcp-SNAPSHOT.jar
> 
>-Finally, you must download c3p0-0.9.0-pre6.bin.zip, unzip it and copy c3p0-0.9.0-pre6.jar
to $HOME/.maven/repository/c3p0/jars.
>+Finally, you must download c3p0-0.9.0-pre6.bin.zip, unzip it and copy 
>+c3p0-0.9.0-pre6.jar to $HOME/.maven/repository/c3p0/jars.
> 
> - derby
> To use Derby as the datastore for tck20, download version 10.0.2.1 from
>Index: ri11/test/conf/jndi.properties
>===================================================================
>--- ri11/test/conf/jndi.properties	(revision 219378)
>+++ ri11/test/conf/jndi.properties	(working copy)
>@@ -14,4 +14,3 @@
> # limitations under the License.
> 
> java.naming.factory.initial=com.sun.jndi.fscontext.RefFSContextFactory
>-java.naming.provider.url=file:.
>Index: ri11/project.properties
>===================================================================
>--- ri11/project.properties	(revision 219378)
>+++ ri11/project.properties	(working copy)
>@@ -33,10 +33,11 @@
> antlr.jarfile = ${pom.getDependencyPath('antlr:antlr')}
> jta.jarfile = ${pom.getDependencyPath('geronimo-spec:geronimo-spec-jta')}
> logging.jarfile = ${pom.getDependencyPath('commons-logging')}
>-# JNDI implementation
>-jndi = ${basedir}/fscontext.jar${path.separator}${basedir}/providerutil.jar
> xmlparser =
> 
>+# jndi dependencies
>+jndi = ${basedir}/../lib/ext/fscontext.jar${path.separator}${basedir}/../lib/ext/providerutil.jar
>+
> jdo.antlr.src.dir = ${basedir}/src/java/org/apache/jdo/impl/jdoql/jdoqlc
> jdo.testclasses.dir = ${maven.build.dir}/test-classes
> jdo.pcclasses.jarfile = ${maven.build.dir}/test-classes/pcclasses.jar
>
>  
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message