[ 
https://issues.apache.org/jira/browse/CXF-7054?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15490105#comment-15490105
 ] 

Grzegorz Grzybek commented on CXF-7054:
---------------------------------------

With this diff:
{noformat}
12:38 $ git diff
diff --git a/core/src/main/java/org/apache/cxf/common/util/ASMHelper.java 
b/core/src/main/java/org/apache/cxf/common/util/ASMHelper.java
index 7e64216..67df68d 100644
--- a/core/src/main/java/org/apache/cxf/common/util/ASMHelper.java
+++ b/core/src/main/java/org/apache/cxf/common/util/ASMHelper.java
@@ -372,7 +372,15 @@ public class ASMHelper {
         public Class<?> lookupDefinedClass(String name) {
             return defined.get(name.replace('/', '.'));
         }
-        
+
+        @Override
+        protected Class<?> findClass(String name) throws 
ClassNotFoundException {
+            if (name.endsWith("package-info")) {
+                return getParent().loadClass(name);
+            }
+            return super.findClass(name);
+        }
+
         public Class<?> defineClass(String name, byte bytes[]) {
             Class<?> ret = defined.get(name.replace('/', '.'));
             if (ret != null) {
{noformat}

I was able to fix most of {{CORBADocLitClientTypeTest}} problems and the 
remaining were:
{noformat}
Results :

Failed tests: 
  
CORBADocLitClientTypeTest>AbstractTypeTestClient.testSimpleRestriction:1636->Assert.fail:88
 x parameter maxLength=10 restriction is violated.
  
CORBADocLitClientTypeTest>AbstractTypeTestClient.testSimpleRestriction4:1784->Assert.fail:88
 x parameter minLength=5 restriction is violated.

Tests in error: 
  CORBADocLitClientTypeTest>AbstractTypeTestClient.testAnyURIEnum:1589 » 
WebService
  CORBADocLitClientTypeTest>AbstractTypeTestClient.testDecimalEnum:1524 » 
WebService
  CORBADocLitClientTypeTest>AbstractTypeTestClient.testNumberEnum:1461 » 
WebService
  CORBADocLitClientTypeTest>AbstractTypeTestClient.testStringEnum:1492 » 
WebService
{noformat}

probably because now my test used {{--patch-module 
java.corba=target/java9-jacorb}}. Hmm, Jacorb shouldn't be used without 
explicit:
{code:java}
System.setProperty("org.omg.CORBA.ORBClass", "org.jacorb.orb.ORB");
System.setProperty("org.omg.CORBA.ORBSingletonClass", 
"org.jacorb.orb.ORBSingleton");
{code}

Here are all exceptions:
{noformat}
testSimpleRestriction4(org.apache.cxf.systest.type_test.corba.CORBADocLitClientTypeTest)
  Time elapsed: 0.071 sec  <<< FAILURE!
java.lang.AssertionError: x parameter minLength=5 restriction is violated.
        at org.junit.Assert.fail(Assert.java:88)
        at 
org.apache.cxf.systest.type_test.AbstractTypeTestClient.testSimpleRestriction4(AbstractTypeTestClient.java:1784)
...
{noformat}

{noformat}
testDecimalEnum(org.apache.cxf.systest.type_test.corba.CORBADocLitClientTypeTest)
  Time elapsed: 0.061 sec  <<< ERROR!
javax.xml.ws.WebServiceException: org.apache.cxf.interceptor.Fault: Marshalling 
Error: Illegal enum member name: -10.34
        at 
org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:169)
...
Caused by: org.omg.CORBA.BAD_PARAM: Illegal enum member name: -10.34
        at org.jacorb.orb.ORBSingleton.create_enum_tc(ORBSingleton.java:464)
        at org.jacorb.orb.ORBSingleton.create_enum_tc(ORBSingleton.java:421)
        at 
org.apache.cxf.binding.corba.utils.CorbaUtils.getComplexTypeCode(CorbaUtils.java:213)
{noformat}

{noformat}
testNumberEnum(org.apache.cxf.systest.type_test.corba.CORBADocLitClientTypeTest)
  Time elapsed: 0.022 sec  <<< ERROR!
javax.xml.ws.WebServiceException: org.apache.cxf.interceptor.Fault: Marshalling 
Error: Illegal enum member name: 1
        at 
org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:169)
...
Caused by: org.omg.CORBA.BAD_PARAM: Illegal enum member name: 1
        at org.jacorb.orb.ORBSingleton.create_enum_tc(ORBSingleton.java:464)
        at org.jacorb.orb.ORBSingleton.create_enum_tc(ORBSingleton.java:421)
        at 
org.apache.cxf.binding.corba.utils.CorbaUtils.getComplexTypeCode(CorbaUtils.java:213)
{noformat}

{noformat}
testSimpleRestriction(org.apache.cxf.systest.type_test.corba.CORBADocLitClientTypeTest)
  Time elapsed: 0.033 sec  <<< FAILURE!
java.lang.AssertionError: x parameter maxLength=10 restriction is violated.
        at org.junit.Assert.fail(Assert.java:88)
        at 
org.apache.cxf.systest.type_test.AbstractTypeTestClient.testSimpleRestriction(AbstractTypeTestClient.java:1636)
...
{noformat}

{noformat}
testAnyURIEnum(org.apache.cxf.systest.type_test.corba.CORBADocLitClientTypeTest)
  Time elapsed: 0.015 sec  <<< ERROR!
javax.xml.ws.WebServiceException: org.apache.cxf.interceptor.Fault: Marshalling 
Error: Illegal enum member name: http://www.iona.com
        at 
org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:169)
        at com.sun.proxy.$Proxy63.testAnyURIEnum(Unknown Source)
...
Caused by: org.omg.CORBA.BAD_PARAM: Illegal enum member name: 
http://www.iona.com
        at org.jacorb.orb.ORBSingleton.create_enum_tc(ORBSingleton.java:464)
        at org.jacorb.orb.ORBSingleton.create_enum_tc(ORBSingleton.java:421)
        at 
org.apache.cxf.binding.corba.utils.CorbaUtils.getComplexTypeCode(CorbaUtils.java:213)
{noformat}

{noformat}
testStringEnum(org.apache.cxf.systest.type_test.corba.CORBADocLitClientTypeTest)
  Time elapsed: 0.016 sec  <<< ERROR!
javax.xml.ws.WebServiceException: org.apache.cxf.interceptor.Fault: Marshalling 
Error: Illegal enum member name: a b c
        at 
org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:169)
        at com.sun.proxy.$Proxy63.testStringEnum(Unknown Source)
...
Caused by: org.omg.CORBA.BAD_PARAM: Illegal enum member name: a b c
        at org.jacorb.orb.ORBSingleton.create_enum_tc(ORBSingleton.java:464)
        at org.jacorb.orb.ORBSingleton.create_enum_tc(ORBSingleton.java:421)
        at 
org.apache.cxf.binding.corba.utils.CorbaUtils.getComplexTypeCode(CorbaUtils.java:213)
{noformat}


> CORBADocLitClientTypeTest failed with java9
> -------------------------------------------
>
>                 Key: CXF-7054
>                 URL: https://issues.apache.org/jira/browse/CXF-7054
>             Project: CXF
>          Issue Type: Sub-task
>            Reporter: Freeman Fang
>            Assignee: Freeman Fang
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to