Hi,

I found couple issues when i port schema-validation system tests.

1. All the new Message("UNKNOWN_SOURCE", BUNDLE, getClass().getName()) in package *org.apache.cxf.jaxb* under module rt/databinding/jaxb will not work, because there is a same package under common/common module, which has the same package name *org.apache.cxf.jaxb*, and they both have the Message.properties file under the package directory. but the system will load the one in common module, purely because it's the in front of the jaxb module.

I'm trying to fix this problem by using the solution we used in api module, we just change the properties file's name to APIMessage.properties. But it seems not work in the common module. it finally give me the following exception under the tools/xjc module:

Caused by: com.sun.tools.xjc.BadCommandLineException: unrecognized parameter -Xdv
       at com.sun.tools.xjc.Options.parseArguments(Options.java:664)
       at com.sun.tools.xjc.XJC2Task._doXJC(XJC2Task.java:407)
       ... 21 more
--- Nested Exception ---
com.sun.tools.xjc.BadCommandLineException: unrecognized parameter -Xdv
       at com.sun.tools.xjc.Options.parseArguments(Options.java:664)
       at com.sun.tools.xjc.XJC2Task._doXJC(XJC2Task.java:407)
       at com.sun.tools.xjc.XJC2Task.doXJC(XJC2Task.java:397)
       at com.sun.tools.xjc.XJC2Task.execute(XJC2Task.java:332)
       at com.sun.tools.xjc.maven2.XJCMojo.execute(XJCMojo.java:316)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:412) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:475) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:454) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:306) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:140)
       at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
       at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
       at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
       at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
       at org.codehaus.classworlds.Launcher.main(Launcher.java:375)

I'm not sure how these two things are related? but i tried a whole day to find out it dose cause this exception, you can try this out by yourself, just simply change the private static final Logger LOG = LogUtils.getL7dLogger(DatatypeFactory.class);
to this:
private static final Logger LOG = LogUtils.getL7dLogger(DatatypeFactory.class, "CommonUtilityMessages");
in the class
trunk/common/common/src/main/java/org/apache/cxf/jaxb/DatatypeFactory.java
and put the file CommonUtilityMessages.properties under the directory.
now you will find the common module is fine, but failed in tools/xjc module with the preceding exceptions. :(

I'm wondering that if we need to move the DatatypeFactory.java from common to jaxb module? this is a option to solve the problem.

2. Server side schema is checked, but we didn't check the client side schema validation in the runtime, i have fixed that.

3. Client side fault handle still have some problem, when there's exception in unmarshalling the received message, the client will not detected this exception. the schema-validation system tests detected this problem, i have all fixed this. when i get the code in, people can review the code, maybe we should also review the fault handling later.

If anyone can help me the first issue, that will be great

Thanks in advance,
James.

Reply via email to