You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Chris McClelland (JIRA)" <ji...@apache.org> on 2008/10/20 15:57:44 UTC
[jira] Created: (CXF-1880) org.apache.cxf.xjc.ts.ToStringPlugin
cannot be used with a 1.6 JVM
org.apache.cxf.xjc.ts.ToStringPlugin cannot be used with a 1.6 JVM
------------------------------------------------------------------
Key: CXF-1880
URL: https://issues.apache.org/jira/browse/CXF-1880
Project: CXF
Issue Type: Bug
Affects Versions: 2.1.2
Reporter: Chris McClelland
If CXF is on the classpath when you invoke the JXC code generator, it tries to load the org.apache.cxf.xjc.ts.ToStringPlugin as a JAXB plugin, but due to some problems with the 1.6 JVM, it fails:
bash-2.05b$ gunzip -c apache-cxf-2.1.2.tar.gz | tar xf -
bash-2.05b$ cd apache-cxf-2.1.2/lib
bash-2.05b$ java -classpath $(pwd)/cxf-manifest.jar com.sun.tools.xjc.XJCFacade
grammar is not specified
Usage: xjc [-options ...] <schema file/URL/dir/jar> ... [-b <bindinfo>] ...
If dir is specified, all schema files in it will be compiled.
If jar is specified, /META-INF/sun-jaxb.episode binding file will be compiled.
Options:
-nv : do not perform strict validation of the input schema(s)
-extension : allow vendor extensions - do not strictly follow the
Compatibility Rules and App E.2 from the JAXB Spec
-b <file/dir> : specify external bindings files (each <file> must have its own -b)
If a directory is given, **/*.xjb is searched
-d <dir> : generated files will go into this directory
-p <pkg> : specifies the target package
-httpproxy <proxy> : set HTTP/HTTPS proxy. Format is [user[:password]@]proxyHost:proxyPort
-httpproxyfile <f> : Works like -httpproxy but takes the argument in a file to protect password
-classpath <arg> : specify where to find user class files
-catalog <file> : specify catalog files to resolve external entity references
support TR9401, XCatalog, and OASIS XML Catalog format.
-readOnly : generated files will be in read-only mode
-npa : suppress generation of package level annotations (**/package-info.java)
-no-header : suppress generation of a file header with timestamp
-target 2.0 : behave like XJC 2.0 and generate code that doesnt use any 2.1 features.
-xmlschema : treat input as W3C XML Schema (default)
-relaxng : treat input as RELAX NG (experimental,unsupported)
-relaxng-compact : treat input as RELAX NG compact syntax (experimental,unsupported)
-dtd : treat input as XML DTD (experimental,unsupported)
-wsdl : treat input as WSDL and compile schemas inside it (experimental,unsupported)
-verbose : be extra verbose
-quiet : suppress compiler output
-help : display this help message
-version : display version information
Exception in thread "main" java.util.ServiceConfigurationError: com.sun.tools.xjc.Plugin: Provider org.apache.cxf.xjc.ts.ToStringPlugin could not be instantiated: java.lang.ClassCastException
at java.util.ServiceLoader.fail(ServiceLoader.java:207)
at java.util.ServiceLoader.access$100(ServiceLoader.java:164)
at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:353)
at java.util.ServiceLoader$1.next(ServiceLoader.java:421)
at com.sun.tools.xjc.Options.findServices(Options.java:884)
at com.sun.tools.xjc.Options.getAllPlugins(Options.java:336)
at com.sun.tools.xjc.Driver.usage(Driver.java:510)
at com.sun.tools.xjc.Driver._main(Driver.java:125)
at com.sun.tools.xjc.Driver.access$000(Driver.java:74)
at com.sun.tools.xjc.Driver$1.run(Driver.java:96)
Caused by: java.lang.ClassCastException
at java.lang.Class.cast(Class.java:2990)
at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:345)
... 7 more
bash-2.05b$ which java
/...<snip>.../sunjdk/1.6.0_06/bin/java
The only solution to this problem that I have been able to find is to put all XJC plugins in a subpackage of com.sun.tools.xjc.addon. No endorsed dirs hackery seems to work.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CXF-1880) org.apache.cxf.xjc.ts.ToStringPlugin
cannot be used with a 1.6 JVM
Posted by "Chris McClelland (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-1880?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12716345#action_12716345 ]
Chris McClelland commented on CXF-1880:
---------------------------------------
I raised the JIRA so I guess it should be me who writes the patch. It may take a day or two for me to get around to it.
> org.apache.cxf.xjc.ts.ToStringPlugin cannot be used with a 1.6 JVM
> ------------------------------------------------------------------
>
> Key: CXF-1880
> URL: https://issues.apache.org/jira/browse/CXF-1880
> Project: CXF
> Issue Type: Bug
> Affects Versions: 2.1.2
> Reporter: Chris McClelland
>
> If CXF is on the classpath when you invoke the JXC code generator, it tries to load the org.apache.cxf.xjc.ts.ToStringPlugin as a JAXB plugin, but due to some problems with the 1.6 JVM, it fails:
> bash-2.05b$ gunzip -c apache-cxf-2.1.2.tar.gz | tar xf -
> bash-2.05b$ cd apache-cxf-2.1.2/lib
> bash-2.05b$ java -classpath $(pwd)/cxf-manifest.jar com.sun.tools.xjc.XJCFacade
> grammar is not specified
> Usage: xjc [-options ...] <schema file/URL/dir/jar> ... [-b <bindinfo>] ...
> If dir is specified, all schema files in it will be compiled.
> If jar is specified, /META-INF/sun-jaxb.episode binding file will be compiled.
> Options:
> -nv : do not perform strict validation of the input schema(s)
> -extension : allow vendor extensions - do not strictly follow the
> Compatibility Rules and App E.2 from the JAXB Spec
> -b <file/dir> : specify external bindings files (each <file> must have its own -b)
> If a directory is given, **/*.xjb is searched
> -d <dir> : generated files will go into this directory
> -p <pkg> : specifies the target package
> -httpproxy <proxy> : set HTTP/HTTPS proxy. Format is [user[:password]@]proxyHost:proxyPort
> -httpproxyfile <f> : Works like -httpproxy but takes the argument in a file to protect password
> -classpath <arg> : specify where to find user class files
> -catalog <file> : specify catalog files to resolve external entity references
> support TR9401, XCatalog, and OASIS XML Catalog format.
> -readOnly : generated files will be in read-only mode
> -npa : suppress generation of package level annotations (**/package-info.java)
> -no-header : suppress generation of a file header with timestamp
> -target 2.0 : behave like XJC 2.0 and generate code that doesnt use any 2.1 features.
> -xmlschema : treat input as W3C XML Schema (default)
> -relaxng : treat input as RELAX NG (experimental,unsupported)
> -relaxng-compact : treat input as RELAX NG compact syntax (experimental,unsupported)
> -dtd : treat input as XML DTD (experimental,unsupported)
> -wsdl : treat input as WSDL and compile schemas inside it (experimental,unsupported)
> -verbose : be extra verbose
> -quiet : suppress compiler output
> -help : display this help message
> -version : display version information
> Exception in thread "main" java.util.ServiceConfigurationError: com.sun.tools.xjc.Plugin: Provider org.apache.cxf.xjc.ts.ToStringPlugin could not be instantiated: java.lang.ClassCastException
> at java.util.ServiceLoader.fail(ServiceLoader.java:207)
> at java.util.ServiceLoader.access$100(ServiceLoader.java:164)
> at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:353)
> at java.util.ServiceLoader$1.next(ServiceLoader.java:421)
> at com.sun.tools.xjc.Options.findServices(Options.java:884)
> at com.sun.tools.xjc.Options.getAllPlugins(Options.java:336)
> at com.sun.tools.xjc.Driver.usage(Driver.java:510)
> at com.sun.tools.xjc.Driver._main(Driver.java:125)
> at com.sun.tools.xjc.Driver.access$000(Driver.java:74)
> at com.sun.tools.xjc.Driver$1.run(Driver.java:96)
> Caused by: java.lang.ClassCastException
> at java.lang.Class.cast(Class.java:2990)
> at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:345)
> ... 7 more
> bash-2.05b$ which java
> /...<snip>.../sunjdk/1.6.0_06/bin/java
> The only solution to this problem that I have been able to find is to put all XJC plugins in a subpackage of com.sun.tools.xjc.addon. No endorsed dirs hackery seems to work.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (CXF-1880) org.apache.cxf.xjc.ts.ToStringPlugin
cannot be used with a 1.6 JVM
Posted by "Chris McClelland (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-1880?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Chris McClelland updated CXF-1880:
----------------------------------
Attachment: newPatch.sh.txt
Here's the patch, hope it's OK.
> org.apache.cxf.xjc.ts.ToStringPlugin cannot be used with a 1.6 JVM
> ------------------------------------------------------------------
>
> Key: CXF-1880
> URL: https://issues.apache.org/jira/browse/CXF-1880
> Project: CXF
> Issue Type: Bug
> Affects Versions: 2.1.2
> Reporter: Chris McClelland
> Attachments: newPatch.sh.txt
>
>
> If CXF is on the classpath when you invoke the JXC code generator, it tries to load the org.apache.cxf.xjc.ts.ToStringPlugin as a JAXB plugin, but due to some problems with the 1.6 JVM, it fails:
> bash-2.05b$ gunzip -c apache-cxf-2.1.2.tar.gz | tar xf -
> bash-2.05b$ cd apache-cxf-2.1.2/lib
> bash-2.05b$ java -classpath $(pwd)/cxf-manifest.jar com.sun.tools.xjc.XJCFacade
> grammar is not specified
> Usage: xjc [-options ...] <schema file/URL/dir/jar> ... [-b <bindinfo>] ...
> If dir is specified, all schema files in it will be compiled.
> If jar is specified, /META-INF/sun-jaxb.episode binding file will be compiled.
> Options:
> -nv : do not perform strict validation of the input schema(s)
> -extension : allow vendor extensions - do not strictly follow the
> Compatibility Rules and App E.2 from the JAXB Spec
> -b <file/dir> : specify external bindings files (each <file> must have its own -b)
> If a directory is given, **/*.xjb is searched
> -d <dir> : generated files will go into this directory
> -p <pkg> : specifies the target package
> -httpproxy <proxy> : set HTTP/HTTPS proxy. Format is [user[:password]@]proxyHost:proxyPort
> -httpproxyfile <f> : Works like -httpproxy but takes the argument in a file to protect password
> -classpath <arg> : specify where to find user class files
> -catalog <file> : specify catalog files to resolve external entity references
> support TR9401, XCatalog, and OASIS XML Catalog format.
> -readOnly : generated files will be in read-only mode
> -npa : suppress generation of package level annotations (**/package-info.java)
> -no-header : suppress generation of a file header with timestamp
> -target 2.0 : behave like XJC 2.0 and generate code that doesnt use any 2.1 features.
> -xmlschema : treat input as W3C XML Schema (default)
> -relaxng : treat input as RELAX NG (experimental,unsupported)
> -relaxng-compact : treat input as RELAX NG compact syntax (experimental,unsupported)
> -dtd : treat input as XML DTD (experimental,unsupported)
> -wsdl : treat input as WSDL and compile schemas inside it (experimental,unsupported)
> -verbose : be extra verbose
> -quiet : suppress compiler output
> -help : display this help message
> -version : display version information
> Exception in thread "main" java.util.ServiceConfigurationError: com.sun.tools.xjc.Plugin: Provider org.apache.cxf.xjc.ts.ToStringPlugin could not be instantiated: java.lang.ClassCastException
> at java.util.ServiceLoader.fail(ServiceLoader.java:207)
> at java.util.ServiceLoader.access$100(ServiceLoader.java:164)
> at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:353)
> at java.util.ServiceLoader$1.next(ServiceLoader.java:421)
> at com.sun.tools.xjc.Options.findServices(Options.java:884)
> at com.sun.tools.xjc.Options.getAllPlugins(Options.java:336)
> at com.sun.tools.xjc.Driver.usage(Driver.java:510)
> at com.sun.tools.xjc.Driver._main(Driver.java:125)
> at com.sun.tools.xjc.Driver.access$000(Driver.java:74)
> at com.sun.tools.xjc.Driver$1.run(Driver.java:96)
> Caused by: java.lang.ClassCastException
> at java.lang.Class.cast(Class.java:2990)
> at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:345)
> ... 7 more
> bash-2.05b$ which java
> /...<snip>.../sunjdk/1.6.0_06/bin/java
> The only solution to this problem that I have been able to find is to put all XJC plugins in a subpackage of com.sun.tools.xjc.addon. No endorsed dirs hackery seems to work.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CXF-1880) org.apache.cxf.xjc.ts.ToStringPlugin
cannot be used with a 1.6 JVM
Posted by "Tom (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-1880?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12713571#action_12713571 ]
Tom commented on CXF-1880:
--------------------------
I ran into the same problem using this ant task:
<taskdef name="xjc" classname="com.sun.tools.xjc.XJCTask">
<classpath>
<fileset dir="${JAXB_HOME}" includes="**/*.jar" />
<fileset dir="lib" includes="**/*.jar" />
</classpath>
</taskdef>
By removing my project-lib, the problem went away:
<taskdef name="xjc" classname="com.sun.tools.xjc.XJCTask">
<classpath>
<fileset dir="${JAXB_HOME}" includes="**/*.jar" />
</classpath>
</taskdef>
Appearantly there is some jar in my lib causing the problem...
> org.apache.cxf.xjc.ts.ToStringPlugin cannot be used with a 1.6 JVM
> ------------------------------------------------------------------
>
> Key: CXF-1880
> URL: https://issues.apache.org/jira/browse/CXF-1880
> Project: CXF
> Issue Type: Bug
> Affects Versions: 2.1.2
> Reporter: Chris McClelland
>
> If CXF is on the classpath when you invoke the JXC code generator, it tries to load the org.apache.cxf.xjc.ts.ToStringPlugin as a JAXB plugin, but due to some problems with the 1.6 JVM, it fails:
> bash-2.05b$ gunzip -c apache-cxf-2.1.2.tar.gz | tar xf -
> bash-2.05b$ cd apache-cxf-2.1.2/lib
> bash-2.05b$ java -classpath $(pwd)/cxf-manifest.jar com.sun.tools.xjc.XJCFacade
> grammar is not specified
> Usage: xjc [-options ...] <schema file/URL/dir/jar> ... [-b <bindinfo>] ...
> If dir is specified, all schema files in it will be compiled.
> If jar is specified, /META-INF/sun-jaxb.episode binding file will be compiled.
> Options:
> -nv : do not perform strict validation of the input schema(s)
> -extension : allow vendor extensions - do not strictly follow the
> Compatibility Rules and App E.2 from the JAXB Spec
> -b <file/dir> : specify external bindings files (each <file> must have its own -b)
> If a directory is given, **/*.xjb is searched
> -d <dir> : generated files will go into this directory
> -p <pkg> : specifies the target package
> -httpproxy <proxy> : set HTTP/HTTPS proxy. Format is [user[:password]@]proxyHost:proxyPort
> -httpproxyfile <f> : Works like -httpproxy but takes the argument in a file to protect password
> -classpath <arg> : specify where to find user class files
> -catalog <file> : specify catalog files to resolve external entity references
> support TR9401, XCatalog, and OASIS XML Catalog format.
> -readOnly : generated files will be in read-only mode
> -npa : suppress generation of package level annotations (**/package-info.java)
> -no-header : suppress generation of a file header with timestamp
> -target 2.0 : behave like XJC 2.0 and generate code that doesnt use any 2.1 features.
> -xmlschema : treat input as W3C XML Schema (default)
> -relaxng : treat input as RELAX NG (experimental,unsupported)
> -relaxng-compact : treat input as RELAX NG compact syntax (experimental,unsupported)
> -dtd : treat input as XML DTD (experimental,unsupported)
> -wsdl : treat input as WSDL and compile schemas inside it (experimental,unsupported)
> -verbose : be extra verbose
> -quiet : suppress compiler output
> -help : display this help message
> -version : display version information
> Exception in thread "main" java.util.ServiceConfigurationError: com.sun.tools.xjc.Plugin: Provider org.apache.cxf.xjc.ts.ToStringPlugin could not be instantiated: java.lang.ClassCastException
> at java.util.ServiceLoader.fail(ServiceLoader.java:207)
> at java.util.ServiceLoader.access$100(ServiceLoader.java:164)
> at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:353)
> at java.util.ServiceLoader$1.next(ServiceLoader.java:421)
> at com.sun.tools.xjc.Options.findServices(Options.java:884)
> at com.sun.tools.xjc.Options.getAllPlugins(Options.java:336)
> at com.sun.tools.xjc.Driver.usage(Driver.java:510)
> at com.sun.tools.xjc.Driver._main(Driver.java:125)
> at com.sun.tools.xjc.Driver.access$000(Driver.java:74)
> at com.sun.tools.xjc.Driver$1.run(Driver.java:96)
> Caused by: java.lang.ClassCastException
> at java.lang.Class.cast(Class.java:2990)
> at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:345)
> ... 7 more
> bash-2.05b$ which java
> /...<snip>.../sunjdk/1.6.0_06/bin/java
> The only solution to this problem that I have been able to find is to put all XJC plugins in a subpackage of com.sun.tools.xjc.addon. No endorsed dirs hackery seems to work.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Assigned: (CXF-1880) org.apache.cxf.xjc.ts.ToStringPlugin
cannot be used with a 1.6 JVM
Posted by "Daniel Kulp (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-1880?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Daniel Kulp reassigned CXF-1880:
--------------------------------
Assignee: Daniel Kulp
> org.apache.cxf.xjc.ts.ToStringPlugin cannot be used with a 1.6 JVM
> ------------------------------------------------------------------
>
> Key: CXF-1880
> URL: https://issues.apache.org/jira/browse/CXF-1880
> Project: CXF
> Issue Type: Bug
> Affects Versions: 2.1.2
> Reporter: Chris McClelland
> Assignee: Daniel Kulp
> Attachments: newPatch.sh.txt
>
>
> If CXF is on the classpath when you invoke the JXC code generator, it tries to load the org.apache.cxf.xjc.ts.ToStringPlugin as a JAXB plugin, but due to some problems with the 1.6 JVM, it fails:
> bash-2.05b$ gunzip -c apache-cxf-2.1.2.tar.gz | tar xf -
> bash-2.05b$ cd apache-cxf-2.1.2/lib
> bash-2.05b$ java -classpath $(pwd)/cxf-manifest.jar com.sun.tools.xjc.XJCFacade
> grammar is not specified
> Usage: xjc [-options ...] <schema file/URL/dir/jar> ... [-b <bindinfo>] ...
> If dir is specified, all schema files in it will be compiled.
> If jar is specified, /META-INF/sun-jaxb.episode binding file will be compiled.
> Options:
> -nv : do not perform strict validation of the input schema(s)
> -extension : allow vendor extensions - do not strictly follow the
> Compatibility Rules and App E.2 from the JAXB Spec
> -b <file/dir> : specify external bindings files (each <file> must have its own -b)
> If a directory is given, **/*.xjb is searched
> -d <dir> : generated files will go into this directory
> -p <pkg> : specifies the target package
> -httpproxy <proxy> : set HTTP/HTTPS proxy. Format is [user[:password]@]proxyHost:proxyPort
> -httpproxyfile <f> : Works like -httpproxy but takes the argument in a file to protect password
> -classpath <arg> : specify where to find user class files
> -catalog <file> : specify catalog files to resolve external entity references
> support TR9401, XCatalog, and OASIS XML Catalog format.
> -readOnly : generated files will be in read-only mode
> -npa : suppress generation of package level annotations (**/package-info.java)
> -no-header : suppress generation of a file header with timestamp
> -target 2.0 : behave like XJC 2.0 and generate code that doesnt use any 2.1 features.
> -xmlschema : treat input as W3C XML Schema (default)
> -relaxng : treat input as RELAX NG (experimental,unsupported)
> -relaxng-compact : treat input as RELAX NG compact syntax (experimental,unsupported)
> -dtd : treat input as XML DTD (experimental,unsupported)
> -wsdl : treat input as WSDL and compile schemas inside it (experimental,unsupported)
> -verbose : be extra verbose
> -quiet : suppress compiler output
> -help : display this help message
> -version : display version information
> Exception in thread "main" java.util.ServiceConfigurationError: com.sun.tools.xjc.Plugin: Provider org.apache.cxf.xjc.ts.ToStringPlugin could not be instantiated: java.lang.ClassCastException
> at java.util.ServiceLoader.fail(ServiceLoader.java:207)
> at java.util.ServiceLoader.access$100(ServiceLoader.java:164)
> at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:353)
> at java.util.ServiceLoader$1.next(ServiceLoader.java:421)
> at com.sun.tools.xjc.Options.findServices(Options.java:884)
> at com.sun.tools.xjc.Options.getAllPlugins(Options.java:336)
> at com.sun.tools.xjc.Driver.usage(Driver.java:510)
> at com.sun.tools.xjc.Driver._main(Driver.java:125)
> at com.sun.tools.xjc.Driver.access$000(Driver.java:74)
> at com.sun.tools.xjc.Driver$1.run(Driver.java:96)
> Caused by: java.lang.ClassCastException
> at java.lang.Class.cast(Class.java:2990)
> at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:345)
> ... 7 more
> bash-2.05b$ which java
> /...<snip>.../sunjdk/1.6.0_06/bin/java
> The only solution to this problem that I have been able to find is to put all XJC plugins in a subpackage of com.sun.tools.xjc.addon. No endorsed dirs hackery seems to work.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (CXF-1880) org.apache.cxf.xjc.ts.ToStringPlugin
cannot be used with a 1.6 JVM
Posted by "Chris McClelland (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-1880?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Chris McClelland updated CXF-1880:
----------------------------------
Right. But I only phrased the problem like this for simplicity's sake. The real problem is that wsdl2java invokes the JAXB plugin when generating client-side proxies. Removing the CXF classes from the classpath is not an option in that case.
> org.apache.cxf.xjc.ts.ToStringPlugin cannot be used with a 1.6 JVM
> ------------------------------------------------------------------
>
> Key: CXF-1880
> URL: https://issues.apache.org/jira/browse/CXF-1880
> Project: CXF
> Issue Type: Bug
> Affects Versions: 2.1.2
> Reporter: Chris McClelland
>
> If CXF is on the classpath when you invoke the JXC code generator, it tries to load the org.apache.cxf.xjc.ts.ToStringPlugin as a JAXB plugin, but due to some problems with the 1.6 JVM, it fails:
> bash-2.05b$ gunzip -c apache-cxf-2.1.2.tar.gz | tar xf -
> bash-2.05b$ cd apache-cxf-2.1.2/lib
> bash-2.05b$ java -classpath $(pwd)/cxf-manifest.jar com.sun.tools.xjc.XJCFacade
> grammar is not specified
> Usage: xjc [-options ...] <schema file/URL/dir/jar> ... [-b <bindinfo>] ...
> If dir is specified, all schema files in it will be compiled.
> If jar is specified, /META-INF/sun-jaxb.episode binding file will be compiled.
> Options:
> -nv : do not perform strict validation of the input schema(s)
> -extension : allow vendor extensions - do not strictly follow the
> Compatibility Rules and App E.2 from the JAXB Spec
> -b <file/dir> : specify external bindings files (each <file> must have its own -b)
> If a directory is given, **/*.xjb is searched
> -d <dir> : generated files will go into this directory
> -p <pkg> : specifies the target package
> -httpproxy <proxy> : set HTTP/HTTPS proxy. Format is [user[:password]@]proxyHost:proxyPort
> -httpproxyfile <f> : Works like -httpproxy but takes the argument in a file to protect password
> -classpath <arg> : specify where to find user class files
> -catalog <file> : specify catalog files to resolve external entity references
> support TR9401, XCatalog, and OASIS XML Catalog format.
> -readOnly : generated files will be in read-only mode
> -npa : suppress generation of package level annotations (**/package-info.java)
> -no-header : suppress generation of a file header with timestamp
> -target 2.0 : behave like XJC 2.0 and generate code that doesnt use any 2.1 features.
> -xmlschema : treat input as W3C XML Schema (default)
> -relaxng : treat input as RELAX NG (experimental,unsupported)
> -relaxng-compact : treat input as RELAX NG compact syntax (experimental,unsupported)
> -dtd : treat input as XML DTD (experimental,unsupported)
> -wsdl : treat input as WSDL and compile schemas inside it (experimental,unsupported)
> -verbose : be extra verbose
> -quiet : suppress compiler output
> -help : display this help message
> -version : display version information
> Exception in thread "main" java.util.ServiceConfigurationError: com.sun.tools.xjc.Plugin: Provider org.apache.cxf.xjc.ts.ToStringPlugin could not be instantiated: java.lang.ClassCastException
> at java.util.ServiceLoader.fail(ServiceLoader.java:207)
> at java.util.ServiceLoader.access$100(ServiceLoader.java:164)
> at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:353)
> at java.util.ServiceLoader$1.next(ServiceLoader.java:421)
> at com.sun.tools.xjc.Options.findServices(Options.java:884)
> at com.sun.tools.xjc.Options.getAllPlugins(Options.java:336)
> at com.sun.tools.xjc.Driver.usage(Driver.java:510)
> at com.sun.tools.xjc.Driver._main(Driver.java:125)
> at com.sun.tools.xjc.Driver.access$000(Driver.java:74)
> at com.sun.tools.xjc.Driver$1.run(Driver.java:96)
> Caused by: java.lang.ClassCastException
> at java.lang.Class.cast(Class.java:2990)
> at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:345)
> ... 7 more
> bash-2.05b$ which java
> /...<snip>.../sunjdk/1.6.0_06/bin/java
> The only solution to this problem that I have been able to find is to put all XJC plugins in a subpackage of com.sun.tools.xjc.addon. No endorsed dirs hackery seems to work.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (CXF-1880) org.apache.cxf.xjc.ts.ToStringPlugin
cannot be used with a 1.6 JVM
Posted by "Daniel Kulp (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-1880?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Daniel Kulp resolved CXF-1880.
------------------------------
Resolution: Fixed
Fix Version/s: 2.3
2.2.3
2.1.6
> org.apache.cxf.xjc.ts.ToStringPlugin cannot be used with a 1.6 JVM
> ------------------------------------------------------------------
>
> Key: CXF-1880
> URL: https://issues.apache.org/jira/browse/CXF-1880
> Project: CXF
> Issue Type: Bug
> Affects Versions: 2.1.2
> Reporter: Chris McClelland
> Assignee: Daniel Kulp
> Fix For: 2.1.6, 2.2.3, 2.3
>
> Attachments: newPatch.sh.txt
>
>
> If CXF is on the classpath when you invoke the JXC code generator, it tries to load the org.apache.cxf.xjc.ts.ToStringPlugin as a JAXB plugin, but due to some problems with the 1.6 JVM, it fails:
> bash-2.05b$ gunzip -c apache-cxf-2.1.2.tar.gz | tar xf -
> bash-2.05b$ cd apache-cxf-2.1.2/lib
> bash-2.05b$ java -classpath $(pwd)/cxf-manifest.jar com.sun.tools.xjc.XJCFacade
> grammar is not specified
> Usage: xjc [-options ...] <schema file/URL/dir/jar> ... [-b <bindinfo>] ...
> If dir is specified, all schema files in it will be compiled.
> If jar is specified, /META-INF/sun-jaxb.episode binding file will be compiled.
> Options:
> -nv : do not perform strict validation of the input schema(s)
> -extension : allow vendor extensions - do not strictly follow the
> Compatibility Rules and App E.2 from the JAXB Spec
> -b <file/dir> : specify external bindings files (each <file> must have its own -b)
> If a directory is given, **/*.xjb is searched
> -d <dir> : generated files will go into this directory
> -p <pkg> : specifies the target package
> -httpproxy <proxy> : set HTTP/HTTPS proxy. Format is [user[:password]@]proxyHost:proxyPort
> -httpproxyfile <f> : Works like -httpproxy but takes the argument in a file to protect password
> -classpath <arg> : specify where to find user class files
> -catalog <file> : specify catalog files to resolve external entity references
> support TR9401, XCatalog, and OASIS XML Catalog format.
> -readOnly : generated files will be in read-only mode
> -npa : suppress generation of package level annotations (**/package-info.java)
> -no-header : suppress generation of a file header with timestamp
> -target 2.0 : behave like XJC 2.0 and generate code that doesnt use any 2.1 features.
> -xmlschema : treat input as W3C XML Schema (default)
> -relaxng : treat input as RELAX NG (experimental,unsupported)
> -relaxng-compact : treat input as RELAX NG compact syntax (experimental,unsupported)
> -dtd : treat input as XML DTD (experimental,unsupported)
> -wsdl : treat input as WSDL and compile schemas inside it (experimental,unsupported)
> -verbose : be extra verbose
> -quiet : suppress compiler output
> -help : display this help message
> -version : display version information
> Exception in thread "main" java.util.ServiceConfigurationError: com.sun.tools.xjc.Plugin: Provider org.apache.cxf.xjc.ts.ToStringPlugin could not be instantiated: java.lang.ClassCastException
> at java.util.ServiceLoader.fail(ServiceLoader.java:207)
> at java.util.ServiceLoader.access$100(ServiceLoader.java:164)
> at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:353)
> at java.util.ServiceLoader$1.next(ServiceLoader.java:421)
> at com.sun.tools.xjc.Options.findServices(Options.java:884)
> at com.sun.tools.xjc.Options.getAllPlugins(Options.java:336)
> at com.sun.tools.xjc.Driver.usage(Driver.java:510)
> at com.sun.tools.xjc.Driver._main(Driver.java:125)
> at com.sun.tools.xjc.Driver.access$000(Driver.java:74)
> at com.sun.tools.xjc.Driver$1.run(Driver.java:96)
> Caused by: java.lang.ClassCastException
> at java.lang.Class.cast(Class.java:2990)
> at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:345)
> ... 7 more
> bash-2.05b$ which java
> /...<snip>.../sunjdk/1.6.0_06/bin/java
> The only solution to this problem that I have been able to find is to put all XJC plugins in a subpackage of com.sun.tools.xjc.addon. No endorsed dirs hackery seems to work.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CXF-1880) org.apache.cxf.xjc.ts.ToStringPlugin
cannot be used with a 1.6 JVM
Posted by "Daniel Kulp (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-1880?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12716340#action_12716340 ]
Daniel Kulp commented on CXF-1880:
----------------------------------
Apache legal actually said it's OK to put small wrapper things in com.sun.tools.xjc.addon.apache_cxf. Apparently the same thing needs to be done in Harmony to have some "com.sun" classes that various things expect. Thus, we can keep the "real" code in org.apache.cxf and put thin wrappers in com.sun.tools.xjc.addon.apache_cxf.
A patch would be nice. Any takers?
> org.apache.cxf.xjc.ts.ToStringPlugin cannot be used with a 1.6 JVM
> ------------------------------------------------------------------
>
> Key: CXF-1880
> URL: https://issues.apache.org/jira/browse/CXF-1880
> Project: CXF
> Issue Type: Bug
> Affects Versions: 2.1.2
> Reporter: Chris McClelland
>
> If CXF is on the classpath when you invoke the JXC code generator, it tries to load the org.apache.cxf.xjc.ts.ToStringPlugin as a JAXB plugin, but due to some problems with the 1.6 JVM, it fails:
> bash-2.05b$ gunzip -c apache-cxf-2.1.2.tar.gz | tar xf -
> bash-2.05b$ cd apache-cxf-2.1.2/lib
> bash-2.05b$ java -classpath $(pwd)/cxf-manifest.jar com.sun.tools.xjc.XJCFacade
> grammar is not specified
> Usage: xjc [-options ...] <schema file/URL/dir/jar> ... [-b <bindinfo>] ...
> If dir is specified, all schema files in it will be compiled.
> If jar is specified, /META-INF/sun-jaxb.episode binding file will be compiled.
> Options:
> -nv : do not perform strict validation of the input schema(s)
> -extension : allow vendor extensions - do not strictly follow the
> Compatibility Rules and App E.2 from the JAXB Spec
> -b <file/dir> : specify external bindings files (each <file> must have its own -b)
> If a directory is given, **/*.xjb is searched
> -d <dir> : generated files will go into this directory
> -p <pkg> : specifies the target package
> -httpproxy <proxy> : set HTTP/HTTPS proxy. Format is [user[:password]@]proxyHost:proxyPort
> -httpproxyfile <f> : Works like -httpproxy but takes the argument in a file to protect password
> -classpath <arg> : specify where to find user class files
> -catalog <file> : specify catalog files to resolve external entity references
> support TR9401, XCatalog, and OASIS XML Catalog format.
> -readOnly : generated files will be in read-only mode
> -npa : suppress generation of package level annotations (**/package-info.java)
> -no-header : suppress generation of a file header with timestamp
> -target 2.0 : behave like XJC 2.0 and generate code that doesnt use any 2.1 features.
> -xmlschema : treat input as W3C XML Schema (default)
> -relaxng : treat input as RELAX NG (experimental,unsupported)
> -relaxng-compact : treat input as RELAX NG compact syntax (experimental,unsupported)
> -dtd : treat input as XML DTD (experimental,unsupported)
> -wsdl : treat input as WSDL and compile schemas inside it (experimental,unsupported)
> -verbose : be extra verbose
> -quiet : suppress compiler output
> -help : display this help message
> -version : display version information
> Exception in thread "main" java.util.ServiceConfigurationError: com.sun.tools.xjc.Plugin: Provider org.apache.cxf.xjc.ts.ToStringPlugin could not be instantiated: java.lang.ClassCastException
> at java.util.ServiceLoader.fail(ServiceLoader.java:207)
> at java.util.ServiceLoader.access$100(ServiceLoader.java:164)
> at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:353)
> at java.util.ServiceLoader$1.next(ServiceLoader.java:421)
> at com.sun.tools.xjc.Options.findServices(Options.java:884)
> at com.sun.tools.xjc.Options.getAllPlugins(Options.java:336)
> at com.sun.tools.xjc.Driver.usage(Driver.java:510)
> at com.sun.tools.xjc.Driver._main(Driver.java:125)
> at com.sun.tools.xjc.Driver.access$000(Driver.java:74)
> at com.sun.tools.xjc.Driver$1.run(Driver.java:96)
> Caused by: java.lang.ClassCastException
> at java.lang.Class.cast(Class.java:2990)
> at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:345)
> ... 7 more
> bash-2.05b$ which java
> /...<snip>.../sunjdk/1.6.0_06/bin/java
> The only solution to this problem that I have been able to find is to put all XJC plugins in a subpackage of com.sun.tools.xjc.addon. No endorsed dirs hackery seems to work.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.