You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jdo-commits@db.apache.org by mc...@apache.org on 2012/05/13 23:13:55 UTC

svn commit: r1337984 - in /db/jdo/trunk: ./ exectck/ exectck/src/main/java/org/apache/jdo/exectck/ lib/jdori/ tck/src/conf/ tck/src/java/org/apache/jdo/tck/api/persistencemanagerfactory/

Author: mcaisse
Date: Sun May 13 21:13:54 2012
New Revision: 1337984

URL: http://svn.apache.org/viewvc?rev=1337984&view=rev
Log:
JDO-706 - Completed

Added:
    db/jdo/trunk/lib/jdori/
Modified:
    db/jdo/trunk/exectck/pom.xml
    db/jdo/trunk/exectck/src/main/java/org/apache/jdo/exectck/Enhance.java
    db/jdo/trunk/exectck/src/main/java/org/apache/jdo/exectck/InstallSchema.java
    db/jdo/trunk/exectck/src/main/java/org/apache/jdo/exectck/PropertyUtils.java
    db/jdo/trunk/exectck/src/main/java/org/apache/jdo/exectck/RunTCK.java
    db/jdo/trunk/exectck/src/main/java/org/apache/jdo/exectck/Utilities.java
    db/jdo/trunk/pom.xml
    db/jdo/trunk/tck/src/conf/log4j.properties
    db/jdo/trunk/tck/src/java/org/apache/jdo/tck/api/persistencemanagerfactory/AbstractGetPMF.java

Modified: db/jdo/trunk/exectck/pom.xml
URL: http://svn.apache.org/viewvc/db/jdo/trunk/exectck/pom.xml?rev=1337984&r1=1337983&r2=1337984&view=diff
==============================================================================
--- db/jdo/trunk/exectck/pom.xml (original)
+++ db/jdo/trunk/exectck/pom.xml Sun May 13 21:13:54 2012
@@ -43,28 +43,6 @@
             <activation>
                 <activeByDefault>true</activeByDefault>
             </activation>
-            <dependencies>
-                <dependency>
-                    <groupId>org.datanucleus</groupId>
-                    <artifactId>datanucleus-core</artifactId>
-                </dependency>
-                <dependency>
-                    <groupId>org.datanucleus</groupId>
-                    <artifactId>datanucleus-rdbms</artifactId>
-                </dependency>
-                <dependency>
-                    <groupId>org.datanucleus</groupId>
-                    <artifactId>datanucleus-enhancer</artifactId>
-                </dependency>
-                <dependency>
-                    <groupId>org.datanucleus</groupId>
-                    <artifactId>datanucleus-api-jdo</artifactId>
-                </dependency>
-                <dependency>
-                    <groupId>org.datanucleus</groupId>
-                    <artifactId>datanucleus-api-jpa</artifactId>
-                </dependency>
-            </dependencies>
         </profile>
     </profiles>
     <dependencies>

Modified: db/jdo/trunk/exectck/src/main/java/org/apache/jdo/exectck/Enhance.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/exectck/src/main/java/org/apache/jdo/exectck/Enhance.java?rev=1337984&r1=1337983&r2=1337984&view=diff
==============================================================================
--- db/jdo/trunk/exectck/src/main/java/org/apache/jdo/exectck/Enhance.java (original)
+++ db/jdo/trunk/exectck/src/main/java/org/apache/jdo/exectck/Enhance.java Sun May 13 21:13:54 2012
@@ -1,4 +1,3 @@
-
 package org.apache.jdo.exectck;
 
 import java.net.MalformedURLException;
@@ -34,7 +33,6 @@ public class Enhance extends AbstractMoj
         "org" + File.separator + "apache" + File.separator + "jdo" + File.separator + "tck" + File.separator + "pc" + File.separator,
         "org" + File.separator + "apache" + File.separator + "jdo" + File.separator + "tck" + File.separator + "models" + File.separator + "inheritance" + File.separator
     };
-
     /**
      * Location of TCK generated output.
      * @parameter expression="${jdo.tck.doEnhance}"
@@ -71,6 +69,13 @@ public class Enhance extends AbstractMoj
      * @required
      */
     private String impl;
+        /**
+     * Location of implementation log file.
+     * @parameter expression="${jdo.tck.impl.logfile}"
+     *      default-value="${user.dir}/datanucleus.txt"
+     * @required
+     */
+    private String implLogFile;
     /**
      * Location of jar files for implementation under test.
      * @parameter expression="${project.lib.iut.directory}"
@@ -78,7 +83,13 @@ public class Enhance extends AbstractMoj
      * @required
      */
     private String iutLibsDirectory;
-
+    /**
+     * Location of jar files for implementation under test.
+     * @parameter expression="${project.lib.iut.directory}"
+     *      default-value="${basedir}/../lib/jdori"
+     * @required
+     */
+    private String jdoriLibsDirectory;
     /**
      * List of identity types to be tested.
      * @parameter expression="${jdo.tck.identitytypes}"
@@ -100,7 +111,7 @@ public class Enhance extends AbstractMoj
         PropertyUtils.string2Set(identitytypes, idtypes);
 
         // Create directory for enhancer logs
-        String enhanceLogsDirName = logsDirectory + File.separator + "enhancer";
+        String enhanceLogsDirName = logsDirectory + File.separator + "enhanced";
         File enhancerLogsDir = new File(enhanceLogsDirName);
         if (!(enhancerLogsDir.exists()) && !(enhancerLogsDir.mkdirs())) {
             throw new MojoExecutionException("Failed to create directory "
@@ -116,26 +127,27 @@ public class Enhance extends AbstractMoj
                     + enhancedDir);
         }
 
-        String[] metadataExtensions = {"jdo", "jdoquery", "orm", "xml", "properties"};  // we really want "jdo.properties", but this is easier
+        String[] metadataExtensions = {"jdo", "jdoquery", "orm", "xml", "properties"};
         String[] srcDirs = {"jdo", "orm", "testdata"};
         File toFile = null;
         File fromFile = null;
         String fromFileName = null;
-        String fromDirName = null;
         String pkgName = null;
         int startIdx = -1;
         Iterator<File> fi = null;
         String[] classArray = new String[10];
         String enhancedIdDirName = null;
+        String classesDirName = buildDirectory + File.separator
+                        + "classes" + File.separator;
         ArrayList<String> classes = null;
 
         // Copy metadata from src to enhanced
         for (String idtype : idtypes) {
             for (String srcDir : srcDirs) {
-                fromDirName = srcDirectory + File.separator + srcDir;
+                String srcDirName = srcDirectory + File.separator + srcDir;
                 // iterator over list of abs name of metadata files in src
                 fi = FileUtils.iterateFiles(
-                        new File(fromDirName), metadataExtensions, true);
+                        new File(srcDirName), metadataExtensions, true);
 
                 while (fi.hasNext()) {
                     try {
@@ -165,14 +177,12 @@ public class Enhance extends AbstractMoj
 
                 // Copy pc and pa classes from target/classes to enhanced
                 String[] extensions = {"class"};
-                fromDirName = buildDirectory + File.separator
-                        + "classes" + File.separator;
                 enhancedIdDirName = enhancedDirName + idtype + File.separator;
                 classes = new ArrayList<String>();
                 for (String pcPkgName : PC_PKG_DIRS) {
                     // iterator over list of abs name of class files in target/classes
                     fi = FileUtils.iterateFiles(
-                            new File(fromDirName + pcPkgName), extensions, true);
+                            new File(classesDirName + pcPkgName), extensions, true);
                     while (fi.hasNext()) {
                         try {
                             fromFile = fi.next();
@@ -181,8 +191,8 @@ public class Enhance extends AbstractMoj
                             int index = fromFileName.indexOf(pcPkgName);
                             if (index == -1) {
                                 throw new MojoExecutionException(
-                                    "Cannot get index of package path " + pcPkgName + 
-                                    " in file name" + fromFileName);
+                                        "Cannot get index of package path " + pcPkgName
+                                        + " in file name" + fromFileName);
                             }
                             toFile = new File(enhancedIdDirName + fromFileName.substring(index));
                             FileUtils.copyFile(fromFile, toFile);
@@ -197,32 +207,87 @@ public class Enhance extends AbstractMoj
             }
 
             // Enhance classes
-            URL[] classPathURLs = new URL[2];
-            ArrayList<URL> cpList = new ArrayList<URL>();
-            ClassLoader loader = null;
+
+            // Build ClassLoader for finding enhancer
+            URL[] classPathURLs1 = new URL[2];
+            ArrayList<URL> cpList1 = new ArrayList<URL>();
+            ClassLoader enhancerLoader = null;
             try {
-                cpList.add((new File(enhancedIdDirName)).toURI().toURL());
-                cpList.add((new File(fromDirName)).toURI().toURL());
+                // Must add enhancedIdDirName first!!
+                cpList1.add((new File(enhancedIdDirName)).toURI().toURL());
                 String[] jars = {"jar"};
-                if (impl.equals("iut")) {
+                if (impl.equals("jdori")) {
+                    cpList1.add((new File(jdoriLibsDirectory)).toURI().toURL());
+                    fi = FileUtils.iterateFiles(new File(jdoriLibsDirectory), jars, true);
+                    while (fi.hasNext()) {
+                        cpList1.add(fi.next().toURI().toURL());
+                    }
+                } else {
+                    cpList1.add((new File(iutLibsDirectory)).toURI().toURL());
                     fi = FileUtils.iterateFiles(new File(iutLibsDirectory), jars, true);
                     while (fi.hasNext()) {
-                        cpList.add(fi.next().toURI().toURL());
+                        cpList1.add(fi.next().toURI().toURL());
                     }
                 }
-                loader = new URLClassLoader(cpList.toArray(classPathURLs),
+                enhancerLoader = new URLClassLoader(cpList1.toArray(classPathURLs1),
                         getClass().getClassLoader());
-                // Utilities.printClasspath(loader);
+                System.out.println("ClassLoader enhancerLoader:");
+                Utilities.printClasspath(enhancerLoader);
             } catch (MalformedURLException ex) {
                 Logger.getLogger(Enhance.class.getName()).log(Level.SEVERE, null, ex);
             }
-            JDOEnhancer enhancer = JDOHelper.getEnhancer(loader);
+            
+            // Context classloader for finding log4j.properties
+            ClassLoader prevCl = Thread.currentThread().getContextClassLoader();
+            try {
+                URL implUrl;
+                if (impl.equals("jdori")) {
+                    implUrl = (new File(jdoriLibsDirectory)).toURI().toURL();
+                } else {
+                     implUrl = (new File(iutLibsDirectory)).toURI().toURL();
+                }
+                URL enhancedClassesUrl = (new File(enhancedIdDirName)).toURI().toURL();
+                // Classes dir needed for org.apache.jdo.tck.util.TCKFileAppender
+                URL classesUrl = (new File(classesDirName)).toURI().toURL();
+                ClassLoader loggingPropsCl =
+                        URLClassLoader.newInstance(new URL[]{implUrl,
+                        enhancedClassesUrl, classesUrl}, prevCl);
+                Thread.currentThread().setContextClassLoader(loggingPropsCl);
+            } catch (Exception e) {
+                e.printStackTrace();
+            }
+            System.out.println("ClassLoader ContextClassLoader:");
+            Utilities.printClasspath(Thread.currentThread().getContextClassLoader());
+            System.out.println("Get enhancer");
+            JDOEnhancer enhancer = JDOHelper.getEnhancer(enhancerLoader);
+            System.out.println("enhancer.setVerbose()");
             enhancer.setVerbose(true);
-            enhancer.setClassLoader(loader);
+            System.out.println("enhancer.setClassLoader()");
+            enhancer.setClassLoader(enhancerLoader);
             String[] classArr = classes.toArray(classArray);
             enhancer.addClasses(classArr);
             System.out.println("Enhancing classes for identity type " + idtype);
+            // enhancer needs  org/apache/jdo/tck/util/DeepEquality
             enhancer.enhance();
+            Thread.currentThread().setContextClassLoader(prevCl);
+
+            // Move log to per-test location
+            String idname = "dsid";
+            if (idtype.trim().equals("applicationidentity")) {
+                idname = "app";
+            }
+            String testLogFilename = logsDirectory + File.separator +
+                    "enhanced" + File.separator + idname +
+                    "-" + impl + ".txt";
+            System.out.println("testLogFilename is " + testLogFilename);
+            try {
+                File logFile = new File(implLogFile);
+                File testLogFile = new File(testLogFilename);
+                FileUtils.copyFile(logFile, testLogFile);
+            } catch (Exception e) {
+                System.out.println(">> Error copying implementation log file: " +
+                    e.getMessage());
+            }
         }
         System.out.println("");
     }

Modified: db/jdo/trunk/exectck/src/main/java/org/apache/jdo/exectck/InstallSchema.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/exectck/src/main/java/org/apache/jdo/exectck/InstallSchema.java?rev=1337984&r1=1337983&r2=1337984&view=diff
==============================================================================
--- db/jdo/trunk/exectck/src/main/java/org/apache/jdo/exectck/InstallSchema.java (original)
+++ db/jdo/trunk/exectck/src/main/java/org/apache/jdo/exectck/InstallSchema.java Sun May 13 21:13:54 2012
@@ -55,13 +55,13 @@ public class InstallSchema extends Abstr
 
         if (cfgs == null) {
         	if (cfgList != null) {
-        		System.out.println("cfgList is " + cfgList);
-        		cfgs = new HashSet<String>();
-        		PropertyUtils.string2Set(cfgList, cfgs);
+                    System.out.println("cfgList is " + cfgList);
+                    cfgs = new HashSet<String>();
+                    PropertyUtils.string2Set(cfgList, cfgs);
         	}
         	else {
-        		// Fallback to "src/conf/configurations.list"
-        		setCfgListFromFile();
+                    // Fallback to "src/conf/configurations.list"
+                    setCfgListFromFile();
                 if (cfgList != null) {
                     cfgs = new HashSet<String>();
                     PropertyUtils.string2Set(cfgList, cfgs);
@@ -82,7 +82,6 @@ public class InstallSchema extends Abstr
                 + cfgs.toString() + "\n  databases: " + dbs.toString()
                 + "\n  identity types: " + identitytypes.toString());
 
-//        System.setProperty("jdo.tck.basedir", baseDirectory);
         System.setProperty("java.security.manager", "default");
         System.setProperty("java.security.policy", confDirectory
                 + File.separator + "security.policy");

Modified: db/jdo/trunk/exectck/src/main/java/org/apache/jdo/exectck/PropertyUtils.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/exectck/src/main/java/org/apache/jdo/exectck/PropertyUtils.java?rev=1337984&r1=1337983&r2=1337984&view=diff
==============================================================================
--- db/jdo/trunk/exectck/src/main/java/org/apache/jdo/exectck/PropertyUtils.java (original)
+++ db/jdo/trunk/exectck/src/main/java/org/apache/jdo/exectck/PropertyUtils.java Sun May 13 21:13:54 2012
@@ -72,7 +72,7 @@ public class PropertyUtils {
 
         for (String cfg : cfglist) {
             String mapping = "";
-            String confName = confDir + "/" + cfg;
+            String confName = confDir + File.separator + cfg;
 
             Properties props = new Properties();
             FileInputStream fis = null;

Modified: db/jdo/trunk/exectck/src/main/java/org/apache/jdo/exectck/RunTCK.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/exectck/src/main/java/org/apache/jdo/exectck/RunTCK.java?rev=1337984&r1=1337983&r2=1337984&view=diff
==============================================================================
--- db/jdo/trunk/exectck/src/main/java/org/apache/jdo/exectck/RunTCK.java (original)
+++ db/jdo/trunk/exectck/src/main/java/org/apache/jdo/exectck/RunTCK.java Sun May 13 21:13:54 2012
@@ -100,7 +100,13 @@ public class RunTCK extends AbstractTCKM
      * @required
      */
     private String iutLibsDirectory;
-
+    /**
+     * Location of jar files for implementation under test.
+     * @parameter expression="${project.lib.iut.directory}"
+     *      default-value="${basedir}/../lib/jdori"
+     * @required
+     */
+    private String jdoriLibsDirectory;
     /**
      * Name of file in src/conf containing pmf properties.
      * @parameter expression="${jdo.tck.pmfproperties}"
@@ -268,12 +274,10 @@ public class RunTCK extends AbstractTCKM
             fromFile = new File(confDirectory + File.separator + impl + "-jdoconfig.xml");
             toFile = new File(buildDirectory + File.separator + "classes" + 
                     File.separator + "META-INF" + File.separator + "jdoconfig.xml");
-//            System.out.println("Copying from " + fromFile + " to " + toFile);
             FileUtils.copyFile(fromFile, toFile);
             fromFile = new File(confDirectory + File.separator + impl + "-persistence.xml");
             toFile = new File(buildDirectory + File.separator + "classes" +
                     File.separator + "META-INF" + File.separator + "persistence.xml");
-//            System.out.println("Copying from " + fromFile + " to " + toFile);
             FileUtils.copyFile(fromFile, toFile);
         } catch (IOException ex) {
             Logger.getLogger(RunTCK.class.getName()).log(Level.SEVERE, null, ex);
@@ -297,7 +301,9 @@ public class RunTCK extends AbstractTCKM
             alreadyran = false;
 
             for (String idtype : idtypes) {
-                propsString.add("-Djdo.tck.identitytype=" + idtype);
+                List<String> idPropsString = new ArrayList<String>();
+                idPropsString.addAll(propsString);
+                idPropsString.add("-Djdo.tck.identitytype=" + idtype);
                 String enhancedDirName = buildDirectory + File.separator + "enhanced"
                         + File.separator + impl + File.separator + idtype + File.separator;
                 File enhancedDir = new File(enhancedDirName);
@@ -313,6 +319,7 @@ public class RunTCK extends AbstractTCKM
                     URL url1 = enhancedDir.toURI().toURL();
                     URL url2 = new File(buildDirectory + File.separator
                             + "classes" + File.separator).toURI().toURL();
+                    System.out.println("url2 is " + url2.toString());
                     cpList.add(url1);
                     cpList.add(url2);
                     String[] jars = {"jar"};
@@ -327,6 +334,12 @@ public class RunTCK extends AbstractTCKM
                         while (fi.hasNext()) {
                             cpList.add(fi.next().toURI().toURL());
                         }
+                    } else {
+                        fi = FileUtils.iterateFiles(
+                            new File(jdoriLibsDirectory), jars, true);
+                        while (fi.hasNext()) {
+                            cpList.add(fi.next().toURI().toURL());
+                        }
                     }
                 } catch (MalformedURLException ex) {
                     ex.printStackTrace();
@@ -338,21 +351,22 @@ public class RunTCK extends AbstractTCKM
                 }
 
                 for (String cfg : cfgs) {
-
+                    List<String> cfgPropsString = new ArrayList<String>();
+                    cfgPropsString.addAll(idPropsString);
                     // Parse conf file and set properties String
                     props = PropertyUtils.getProperties(confDirectory
                             + File.separator + cfg);
-                    propsString.add("-Djdo.tck.testdata="
+                    cfgPropsString.add("-Djdo.tck.testdata="
                             + getTrimmedPropertyValue(props, "jdo.tck.testdata"));
-                    propsString.add("-Djdo.tck.standarddata="
+                    cfgPropsString.add("-Djdo.tck.standarddata="
                             + getTrimmedPropertyValue(props, "jdo.tck.standarddata"));
-                    propsString.add("-Djdo.tck.mapping.companyfactory="
+                    cfgPropsString.add("-Djdo.tck.mapping.companyfactory="
                             + getTrimmedPropertyValue(props, "jdo.tck.mapping.companyfactory"));
-//                    propsString.append("-Djdo.tck.description=\"" +
+//                    innerPropsString.append("-Djdo.tck.description=\"" +
 //                            props.getProperty("jdo.tck.description") + "\"");
-                    propsString.add("-Djdo.tck.requiredOptions="
+                    cfgPropsString.add("-Djdo.tck.requiredOptions="
                             + getTrimmedPropertyValue(props, "jdo.tck.requiredOptions"));
-                    propsString.add("-Djdo.tck.signaturefile="
+                    cfgPropsString.add("-Djdo.tck.signaturefile="
                             + signaturefile);
                     String mapping = getTrimmedPropertyValue(props, "jdo.tck.mapping");
                     if (mapping == null) {
@@ -374,8 +388,8 @@ public class RunTCK extends AbstractTCKM
                     }
                     List<String> classesList = Arrays.asList(classes.split(" "));
 
-                    propsString.add("-Djdo.tck.schemaname=" + idtype + mapping);
-                    propsString.add("-Djdo.tck.cfg=" + cfg);
+                    cfgPropsString.add("-Djdo.tck.schemaname=" + idtype + mapping);
+                    cfgPropsString.add("-Djdo.tck.cfg=" + cfg);
 
                     runonce = getTrimmedPropertyValue(props, "runOnce");
                     runonce = (runonce == null) ? "false" : runonce;
@@ -402,9 +416,8 @@ public class RunTCK extends AbstractTCKM
                     command.add("java");
                     command.add("-cp");
                     command.add(cpString);
-                    command.addAll(propsString);
+                    command.addAll(cfgPropsString);
                     command.add(dbproperties);
-                    // TODO!!! split jvmproperties into a List!!
                     command.add(jvmproperties);
                     if (debugTCK) {
                         command.add(debugDirectives);
@@ -426,40 +439,40 @@ public class RunTCK extends AbstractTCKM
                     		" with " + idtype +
                     		" on '" + db + "'" +
                             " mapping=" + mapping + " ... ");
-                    result = (new Utilities()).invokeTest(command);
-                    if (result.getExitValue() == 0) {
-                    	System.out.println("success");
-                    } else {
-                    	System.out.println("FAIL");
+                    try {
+                        result = (new Utilities()).invokeTest(command);
+                        if (result.getExitValue() == 0) {
+                            System.out.println("success");
+                        } else {
+                            System.out.println("FAIL");
+                        }
+                        if (runtckVerbose) {
+                            System.out.println("\nCommand line is: \n" + command.toString());
+                            System.out.println("Test exit value is " + result.getExitValue());
+                            System.out.println("Test result output:\n" + result.getOutputString());
+                            System.out.println("Test result error:\n" + result.getErrorString());
+                        }
+                    } catch (java.lang.RuntimeException re) {
+                        System.out.println("Exception on command " + command);
                     }
 
-                    // TODO This is only for the RI right now, but could be made to work for UIT
-                    if ("jdori".equals(impl)) {
-                    	// Move log to per-test location
-                    	String idname = "dsid";
-                        if (idtype.trim().equals("applicationidentity")) {
-                            idname = "app";
-                        }
-                    	String configName = cfg;
-                    	if (cfg.indexOf('.') > 0) {
-                    		configName = configName.substring(0, cfg.indexOf('.'));
-                    	}
-                    	String testLogFilename = thisLogDir +
-                    	    idname + "-" + configName + "-datanucleus.txt";
-                    	try {
-                        	File logFile = new File(implLogFile);
-							FileUtils.moveFile(logFile, new File(testLogFilename));
-						} catch (Exception e) {
-							System.out.println(">> Error moving implementation log file " +
-									e.getMessage());
-						}
-                    }
-
-                    if (runtckVerbose) {
-                        System.out.println("\nCommand line is: \n" + command.toString());
-                        System.out.println("Test exit value is " + result.getExitValue());
-                        System.out.println("Test result output:\n" + result.getOutputString());
-                        System.out.println("Test result error:\n" + result.getErrorString());
+                    // Move log to per-test location
+                    String idname = "dsid";
+                    if (idtype.trim().equals("applicationidentity")) {
+                        idname = "app";
+                    }
+                    String configName = cfg;
+                    if (cfg.indexOf('.') > 0) {
+                        configName = configName.substring(0, cfg.indexOf('.'));
+                    }
+                    String testLogFilename = thisLogDir
+                            + idname + "-" + configName + "-" + impl + ".txt";
+                    try {
+                        File logFile = new File(implLogFile);
+                        FileUtils.copyFile(logFile, new File(testLogFilename));
+                    } catch (Exception e) {
+                        System.out.println(">> Error copying implementation log file: "
+                                + e.getMessage());
                     }
 
                     if (runonce.equals("true")) {
@@ -469,6 +482,13 @@ public class RunTCK extends AbstractTCKM
                 }
             }
         }
+        // Remove log file
+        try {
+            FileUtils.forceDelete(new File(implLogFile));
+        } catch (Exception e) {
+            System.out.println(">> Error deleting log file: "
+                    + e.getMessage());
+        }
 
         // Output results
         command = new ArrayList<String>();

Modified: db/jdo/trunk/exectck/src/main/java/org/apache/jdo/exectck/Utilities.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/exectck/src/main/java/org/apache/jdo/exectck/Utilities.java?rev=1337984&r1=1337983&r2=1337984&view=diff
==============================================================================
--- db/jdo/trunk/exectck/src/main/java/org/apache/jdo/exectck/Utilities.java (original)
+++ db/jdo/trunk/exectck/src/main/java/org/apache/jdo/exectck/Utilities.java Sun May 13 21:13:54 2012
@@ -63,7 +63,9 @@ public class Utilities {
 
         System.out.println(urls.length + " URL(s) for loader: ");
         for (int i = 0; i < urls.length; i++) {
-            System.out.println("    " + urls[i].getFile());
+            if (urls[i] != null) {
+                System.out.println("    " + urls[i].getFile());
+            }
         }
     }
 

Modified: db/jdo/trunk/pom.xml
URL: http://svn.apache.org/viewvc/db/jdo/trunk/pom.xml?rev=1337984&r1=1337983&r2=1337984&view=diff
==============================================================================
--- db/jdo/trunk/pom.xml (original)
+++ db/jdo/trunk/pom.xml Sun May 13 21:13:54 2012
@@ -89,6 +89,7 @@ Requests (JSR 12 and 243) under the ausp
         <artifactId>commons-io</artifactId>
         <version>1.4</version>
       </dependency>
+      <!--
       <dependency>
         <groupId>org.datanucleus</groupId>
         <artifactId>datanucleus-core</artifactId>
@@ -114,6 +115,7 @@ Requests (JSR 12 and 243) under the ausp
         <artifactId>datanucleus-api-jpa</artifactId>
         <version>3.0.8</version>
       </dependency>
+      -->
       <dependency>
         <groupId>org.springframework</groupId>
         <artifactId>spring-core</artifactId>
@@ -154,11 +156,13 @@ Requests (JSR 12 and 243) under the ausp
         <artifactId>commons-logging</artifactId>
         <version>1.1</version>
       </dependency>
+      <!--
       <dependency>
         <groupId>asm</groupId>
         <artifactId>asm</artifactId>
         <version>3.0</version>
       </dependency>
+      -->
     </dependencies>
   </dependencyManagement>
 
@@ -209,7 +213,7 @@ Requests (JSR 12 and 243) under the ausp
       <id>mcaisse</id>
       <name>Michelle Caisse</name>
       <email>Michelle.Caisse@Sun.COM</email>
-      <organization>Sun Microsystems, Inc.</organization>
+      <organization>Apache.org</organization>
       <timezone>-8</timezone>
     </developer>
     <developer>

Modified: db/jdo/trunk/tck/src/conf/log4j.properties
URL: http://svn.apache.org/viewvc/db/jdo/trunk/tck/src/conf/log4j.properties?rev=1337984&r1=1337983&r2=1337984&view=diff
==============================================================================
--- db/jdo/trunk/tck/src/conf/log4j.properties (original)
+++ db/jdo/trunk/tck/src/conf/log4j.properties Sun May 13 21:13:54 2012
@@ -85,8 +85,8 @@ log4j.logger.com.mchange.v2 = INFO, Data
 log4j.additivity.com.mchange.v2 = false 
 
 # DataNucleus appenders
-#log4j.appender.DataNucleus = org.apache.jdo.tck.util.TCKFileAppender
-log4j.appender.DataNucleus = org.apache.log4j.FileAppender
+log4j.appender.DataNucleus = org.apache.jdo.tck.util.TCKFileAppender
+#log4j.appender.DataNucleus = org.apache.log4j.FileAppender
 log4j.appender.DataNucleus.Enhancer.File = datanucleus.txt
 log4j.appender.DataNucleus.File = datanucleus.txt
 log4j.appender.DataNucleus.layout = org.apache.log4j.PatternLayout

Modified: db/jdo/trunk/tck/src/java/org/apache/jdo/tck/api/persistencemanagerfactory/AbstractGetPMF.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/tck/src/java/org/apache/jdo/tck/api/persistencemanagerfactory/AbstractGetPMF.java?rev=1337984&r1=1337983&r2=1337984&view=diff
==============================================================================
--- db/jdo/trunk/tck/src/java/org/apache/jdo/tck/api/persistencemanagerfactory/AbstractGetPMF.java (original)
+++ db/jdo/trunk/tck/src/java/org/apache/jdo/tck/api/persistencemanagerfactory/AbstractGetPMF.java Sun May 13 21:13:54 2012
@@ -19,8 +19,8 @@ package org.apache.jdo.tck.api.persisten
 
 import java.lang.reflect.Method;
 
+import java.io.File;
 import java.util.Iterator;
-import java.util.Map;
 import java.util.Map.Entry;
 import java.util.Properties;
 import java.util.Set;
@@ -52,9 +52,7 @@ abstract class AbstractGetPMF extends JD
      * This file does not contain valid JDO properties.
      */
 /*    protected static final String invalidPropertiesFile =
-        //we use '/' instead of File.separatorChar because
-        //this character is passed by maven
-        validPropertiesFile.substring(0, validPropertiesFile.lastIndexOf('/')+1) +
+        validPropertiesFile.substring(0, validPropertiesFile.lastIndexOf(File.separatorChar)+1) +
         "logging.properties";
 */
     protected static String invalidPropertiesFile;
@@ -62,9 +60,7 @@ abstract class AbstractGetPMF extends JD
     {
         if (validPropertiesFile==null)
             System.out.println ("******************************");
-        //we use '/' instead of File.separatorChar because
-        //this character is passed by maven
-        invalidPropertiesFile = validPropertiesFile.substring(0, validPropertiesFile.lastIndexOf('/')+1) +
+        invalidPropertiesFile = validPropertiesFile.substring(0, validPropertiesFile.lastIndexOf(File.separatorChar)+1) +
         "logging.properties";
     }
 
@@ -74,9 +70,7 @@ abstract class AbstractGetPMF extends JD
      * This resource contains valid JDO properties.
      */
     protected static final String jndiName =
-        //we use '/' instead of File.separatorChar because
-        //this character is passed by maven
-        validPropertiesFile.substring(0, validPropertiesFile.lastIndexOf('/')+1) +
+        validPropertiesFile.substring(0, validPropertiesFile.lastIndexOf(File.separatorChar)+1) +
         "pmf.ser";
     
     /**
@@ -84,9 +78,7 @@ abstract class AbstractGetPMF extends JD
      * @return argument <code>name</code> removed by the path prefix.
      */
     protected String removePathPrefix(String name) {
-        //we use '/' instead of File.separatorChar because
-        //this character is passed by maven
-        int index = name.lastIndexOf('/');
+        int index = name.lastIndexOf(File.separatorChar);
         if (index!=-1) {
             name = name.substring(index+1);
         }