FAQ | This is a LIVE service | Changelog

Skip to content
Snippets Groups Projects
  1. Nov 27, 2017
  2. Nov 26, 2017
  3. Oct 23, 2017
    • Mark Williamson's avatar
      Towards fixing Java 9 powermock errors. · 003d9784
      Mark Williamson authored
      Errors seen with:
      
      [ERROR] Errors:
      [ERROR]   ChemicalStructureTest.initializationError » Objenesis java.lang.reflect.Invoca...
      [ERROR]   VF2Test.initializationError » Objenesis java.lang.reflect.InvocationTargetExce...
      [ERROR]   PDBReaderTest.initializationError » Objenesis java.lang.reflect.InvocationTarg...
      
      Caused by:
      
      Caused by: java.lang.IllegalAccessError: class jdk.internal.reflect.ConstructorAccessorImpl loaded by org/powermock/core/classloader/MockClassLoader cannot access jdk/internal/reflect superclass jdk.internal.reflect.MagicAccessorImpl
      
      Switching to mockito2, but not as of yet switching to powermock 2.0.0-beta.5
      which actually fixes these.
      
      Please see:
      https://github.com/powermock/powermock/issues/783
      003d9784
    • Mark Williamson's avatar
      Fix NPE resource issue seen with Java 9 #2. · b5a327ed
      Mark Williamson authored
          Use:
              YourClass.class.getResource()
      
          not:
              YourClass.getClass().getResource()
      
          Please see:
          https://javachannel.org/posts/how-to-access-static-resources/
      b5a327ed
    • Mark Williamson's avatar
      Fix NPE resource issue seen with Java 9. · 82444abb
      Mark Williamson authored
      Use:
      	YourClass.class.getResource()
      
      not:
      	YourClass.getClass().getResource()
      
      Please see:
      https://javachannel.org/posts/how-to-access-static-resources/
      82444abb
    • Mark Williamson's avatar
      JAVA 9 fix: Dependencies On Java EE Module · a8648938
      Mark Williamson authored
      Issue:
      
      -------------------------------------------------------------------------------
      Test set: uk.ac.cam.ch.hunter.ssip.cml.io.CMLReaderTest
      -------------------------------------------------------------------------------
      Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.213 s <<< FAILURE! - in uk.ac.cam.ch.hunter.ssip.cml.io.CMLReaderTest
      testDemarshal(uk.ac.cam.ch.hunter.ssip.cml.io.CMLReaderTest)  Time elapsed: 0.213 s  <<< ERROR!
      java.lang.NoClassDefFoundError: javax/activation/DataSource
              at uk.ac.cam.ch.hunter.ssip.cml.io.CMLReaderTest.testDemarshal(CMLReaderTest.java:58)
      Caused by: java.lang.ClassNotFoundException: javax.activation.DataSource
              at uk.ac.cam.ch.hunter.ssip.cml.io.CMLReaderTest.testDemarshal(CMLReaderTest.java:58)
      
      com.sun.activation
      
      Background:
      
      https://blog.codefx.org/java/java-9-migration-guide/#Dependencies-On-Java-EE-Modules
      a8648938
    • Mark Williamson's avatar
      Fix Java 9 -Xlint:deprecation warning. · 3a5b73e8
      Mark Williamson authored
      [INFO] Compiling 44 source files to /home/mw529/workspace/ssip/target/test-classes
      [WARNING] /home/mw529/workspace/ssip/src/test/java/uk/ac/cam/ch/hunter/ssip/footprint/io/ApproximateSurfaceAreaTest.java:[24,33] Double(double) in java.lang.Double has been deprecated
      [WARNING] /home/mw529/workspace/ssip/src/test/java/uk/ac/cam/ch/hunter/ssip/footprint/io/ApproximateSurfaceAreaTest.java:[25,33] Double(double) in java.lang.Double has been deprecated
      [WARNING] /home/mw529/workspace/ssip/src/test/java/uk/ac/cam/ch/hunter/ssip/footprint/io/ApproximateSurfaceAreaTest.java:[26,33] Double(double) in java.lang.Double has been deprecated
      3a5b73e8
    • Mark Williamson's avatar
      Java 9 JEP 261 JAXB fix · cfe4a70b
      Mark Williamson authored
      Fixes the following "mvn clean test" error with Java 9:
      
      [ERROR] There was an error in the forked process
      [ERROR] javax/xml/bind/JAXBException
      [ERROR] org.apache.maven.surefire.booter.SurefireBooterForkException: There was an error in the forked process
      [ERROR] javax/xml/bind/JAXBException
      
      which was being caused by:
      
      java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException
              at java.base/java.lang.Class.getDeclaredMethods0(Native Method)
              at java.base/java.lang.Class.privateGetDeclaredMethods(Class.java:3139)
      	...
      
      which is due to:
      
      https://stackoverflow.com/questions/43574426/how-to-resolve-java-lang-noclassdeffounderror-javax-xml-bind-jaxbexception-in-j
      
      which was due to:
      
      http://openjdk.java.net/jeps/261
      cfe4a70b
  4. Oct 20, 2017
  5. Oct 19, 2017
  6. Oct 18, 2017
  7. Oct 13, 2017
  8. Oct 10, 2017
  9. Sep 24, 2017
Loading