Can you try this patch?

Your symptom is probably a bug in JDK 1.7...

Craig

Index: src/java/javax/jdo/spi/JDOImplHelper.java
===================================================================
--- src/java/javax/jdo/spi/JDOImplHelper.java   (revision 1307510)
+++ src/java/javax/jdo/spi/JDOImplHelper.java   (working copy)
@@ -839,7 +839,7 @@
public static Object construct(String className, String keyString) {
         StringConstructor stringConstructor;
         try {
-            Class keyClass = Class.forName(className);
+            Class<?> keyClass = Class.forName(className);
             synchronized(stringConstructorMap) {
                 stringConstructor =
(StringConstructor) stringConstructorMap.get(keyClass);
@@ -847,8 +847,8 @@
             if (stringConstructor != null) {
                 return stringConstructor.construct(keyString);
             } else {
-                Constructor keyConstructor =
-                    keyClass.getConstructor(new Class[]{String.class});
+                Constructor<?> keyConstructor =
+ keyClass.getConstructor(new Class<?>[] {String.class}); return keyConstructor.newInstance(new Object[] {keyString});
             }
         } catch (JDOException ex) {

On Apr 2, 2012, at 12:56 AM, Michael Bouschen wrote:

Hi Michelle,

do you have a JDK1.6 installed and can rebuild the api with JDK1.6? I'm wondering whether this makes a difference.

Regards Michael

With a clean check-out of JDO trunk, using jdk1.7.0_03, I get a build error:
[INFO] Compilation failure
could not parse error message: warning: [options] bootstrap class path not set in conjunction with -source 1.5 C:\jdoClean\api\src\java\javax\jdo\spi\JDOImplHelper.java:851: warning: [unchecked] unchecked call to getConstructor(Class<?>...) as a member of the raw type Class keyClass.getConstructor(new Class[] {String.class});
                                          ^

-- Michelle

michelle@michelle-PC /cygdrive/c/jdoClean
$ mvn clean install
[INFO] Scanning for projects...
[INFO] Reactor build order:
[INFO]   Java Data Objects (JDO)
[INFO]   JDO API
[INFO]   jdo-exectck Maven Mojo
[INFO]   JDO 3 Technology Compatibility Kit
[INFO] ------------------------------------------------------------------------
[INFO] Building Java Data Objects (JDO)
[INFO]    task-segment: [clean, install]
[INFO] ------------------------------------------------------------------------
[INFO] [clean:clean {execution: default-clean}]
[INFO] Setting property: classpath.resource.loader.class => 'org.codehaus.plexus
.velocity.ContextClassLoaderResourceLoader'.
[INFO] Setting property: velocimacro.messages.on => 'false'.
[INFO] Setting property: resource.loader => 'classpath'.
[INFO] Setting property: resource.manager.logwhenfound => 'false'.
[INFO] [remote-resources:process {execution: default}]
[INFO] [site:attach-descriptor {execution: default-attach- descriptor}]
[INFO] [install:install {execution: default-install}]
[INFO] Installing C:\jdoClean\pom.xml to C:\Users\michelle \.m2\repository\javax\
jdo\root\3.1-SNAPSHOT\root-3.1-SNAPSHOT.pom
[INFO] ------------------------------------------------------------------------
[INFO] Building JDO API
[INFO]    task-segment: [clean, install]
[INFO] ------------------------------------------------------------------------
[INFO] [clean:clean {execution: default-clean}]
[INFO] [remote-resources:process {execution: default}]
[INFO] [resources:resources {execution: default-resources}]
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource to META-INF
[INFO] Copying 1 resource
[INFO] Copying 31 resources
[INFO] Copying 3 resources
[INFO] [compiler:compile {execution: default-compile}]
[INFO] Compiling 146 source files to C:\jdoClean\api\target\classes
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Compilation failure
could not parse error message: warning: [options] bootstrap class path not set i
n conjunction with -source 1.5
C:\jdoClean\api\src\java\javax\jdo\spi\JDOImplHelper.java:851: warning: [uncheck ed] unchecked call to getConstructor(Class<?>...) as a member of the raw type Cl
ass
keyClass.getConstructor(new Class[] {String.class});
                                          ^


[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4 seconds
[INFO] Finished at: Sun Apr 01 13:59:15 MST 2012
[INFO] Final Memory: 41M/530M
[INFO] ------------------------------------------------------------------------

michelle@michelle-PC /cygdrive/c/jdoClean
$ echo $JAVA_HOME
C:\Program Files\Java\jdk1.7.0_03


--
*Michael Bouschen*
*Prokurist*

akquinet tech@spree GmbH
Bülowstr. 66, D-10783 Berlin

Fon:   +49 30 235 520-33
Fax:   +49 30 217 520-12
Email: michael.bousc...@akquinet.de
Web: www.akquinet.de <http://www.akquinet.de>

akquinet tech@spree GmbH, Berlin
Geschäftsführung: Martin Weber, Dr. Torsten Fink
Amtsgericht Berlin-Charlottenburg HRB 86780 B
USt.-Id. Nr.: DE 225 964 680

Craig L Russell
Architect, Oracle
http://db.apache.org/jdo
408 276-5638 mailto:craig.russ...@oracle.com
P.S. A good JDO? O, Gasp!

Reply via email to