Details
-
Test
-
Status: Closed
-
Blocker
-
Resolution: Invalid
-
2.20.1
-
None
-
None
-
mvn -version
maven=3.3.3
JAVA_HOME=JDK_1.8
Description
I need to load com.sun.xml.internal.ws.api.SOAPVersion which doesnt have null constructor
surefire-plugin reflection methods cannot resolve the class e.g.
//LOAD in com.sun.xml.internal.ws.api.SOAPVersion into maven-surefire-plugin @Test java.lang.Class<?> soapVersionClazz=null; ClassLoader soapVersionClassloader = com.sun.xml.internal.ws.api.SOAPVersion.class.getClassLoader(); //always the case if(soapVersionClassloader==null) { soapVersionClassloader=Thread.currentThread().getContextClassLoader(); } String soapVersionString="com.sun.xml.internal.ws.api.SOAPVersion"; System.out.println("RuntimeExceptionsAsyncMepTest::getPort LNE 566 soapVersionClassloader="+soapVersionClassloader); try { soapVersionClazz=soapVersionClassloader.loadClass(soapVersionString); } catch(ClassNotFoundException cnfe) { System.out.println("RuntimeExceptionsAsyncMepTest::getPort LINE 561 throws ClassNotFoundException message="+cnfe.getMessage()); } System.out.println("RuntimeExceptionsAsyncMepTest::getPort LINE 564 soapVersionClazz="+soapVersionClazz); com.sun.xml.internal.ws.api.SOAPVersion soapVersion =null; try { soapVersion=(com.sun.xml.internal.ws.api.SOAPVersion)soapVersionClazz.newInstance(); } catch(InstantiationException iae) { System.out.println("RuntimeExceptionsAsyncMepTest::getPort LINE 572 throws InstantiationException message="+iae.getMessage()); } catch(IllegalAccessException illegal) { System.out.println("RuntimeExceptionsAsyncMepTest::getPort LINE 573 throws IllegalAccessException message="+illegal.getMessage()); } System.out.println("RuntimeExceptionsAsyncMepTest::getPort LINE 574 soapVersion="+soapVersion);