You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Prasad Deshpande (JIRA)" <ji...@apache.org> on 2011/03/09 13:37:59 UTC

[jira] Created: (CXF-3386) java.util.Locale does not have a no-arg default constructor

java.util.Locale does not have a no-arg default constructor
-----------------------------------------------------------

                 Key: CXF-3386
                 URL: https://issues.apache.org/jira/browse/CXF-3386
             Project: CXF
          Issue Type: Bug
    Affects Versions: 2.3.3, 2.2.6
         Environment: jboss 6, cxf 2.2.6, cxf 2.3.3, jdk 1.6.0_22, windows xp
            Reporter: Prasad Deshpande


Hi,

I'm getting an issue when try to deploy on jboss 6. This works well with Jboss 5.1.0.GA version with no problem. Bus as soon as I try to port it to Jboss6, I'm getting this error, Not sure if it is related to CXF/JBoss.

Error is:
Caused by: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 1 counts of IllegalAnnotationExceptions
java.util.Locale does not have a no-arg default constructor.
	this problem is related to the following location:
		at java.util.Locale
		at private java.util.Locale com.client.api.wsapi.jaxws_asm.Translate.arg1
		at com.client.api.wsapi.jaxws_asm.Translate

	at com.sun.xml.bind.v2.runtime.IllegalAnnotationsException$Builder.check(IllegalAnnotationsException.java:102)
	at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.java:472)
	at com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:302)
	at com.sun.xml.bind.v2.runtime.JAXBContextImpl$JAXBContextBuilder.build(JAXBContextImpl.java:1136)
	at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:154)
	at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:121)
	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:597)
	at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:202)
	at javax.xml.bind.ContextFinder.find(ContextFinder.java:363)
	at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:574)
	at org.apache.cxf.jaxb.JAXBDataBinding.createContext(JAXBDataBinding.java:557)
	at org.apache.cxf.jaxb.JAXBDataBinding.createJAXBContextAndSchemas(JAXBDataBinding.java:497)
	at org.apache.cxf.jaxb.JAXBDataBinding.initialize(JAXBDataBinding.java:324)
	... 105 more


I read Dan's post at http://www.mail-archive.com/dev@cxf.apache.org/msg02648.html But here, I'm surely using CXF & Locale is a parameter to a method that I'm exposing as webmethod. So not sure what is the problem. This works fine with Jboss 5. and issue is same with cxf 2.3.3.


--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Resolved: (CXF-3386) java.util.Locale does not have a no-arg default constructor

Posted by "Daniel Kulp (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-3386?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel Kulp resolved CXF-3386.
------------------------------

    Resolution: Not A Problem


I'm going to mark this "Not a problem" as this is working per the JAX-WS and JAXB specifications.   Neither specification defines how to map a Locale to any sort of schema type.  Thus, you would need to specify an XmlJavaTypeAdapter to map the Locale object to something that is jaxb/schema compliant.

I'm not really sure what JBoss is doing in this case.   It's definitely some proprietary extension to JAXB or JAXWS though and would not be portable.


> java.util.Locale does not have a no-arg default constructor
> -----------------------------------------------------------
>
>                 Key: CXF-3386
>                 URL: https://issues.apache.org/jira/browse/CXF-3386
>             Project: CXF
>          Issue Type: Bug
>    Affects Versions: 2.2.6, 2.3.3
>         Environment: jboss 6, cxf 2.2.6, cxf 2.3.3, jdk 1.6.0_22, windows xp
>            Reporter: Prasad Deshpande
>
> Hi,
> I'm getting an issue when try to deploy on jboss 6. This works well with Jboss 5.1.0.GA version with no problem. Bus as soon as I try to port it to Jboss6, I'm getting this error, Not sure if it is related to CXF/JBoss.
> Error is:
> Caused by: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 1 counts of IllegalAnnotationExceptions
> java.util.Locale does not have a no-arg default constructor.
> 	this problem is related to the following location:
> 		at java.util.Locale
> 		at private java.util.Locale com.client.api.wsapi.jaxws_asm.Translate.arg1
> 		at com.client.api.wsapi.jaxws_asm.Translate
> 	at com.sun.xml.bind.v2.runtime.IllegalAnnotationsException$Builder.check(IllegalAnnotationsException.java:102)
> 	at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.java:472)
> 	at com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:302)
> 	at com.sun.xml.bind.v2.runtime.JAXBContextImpl$JAXBContextBuilder.build(JAXBContextImpl.java:1136)
> 	at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:154)
> 	at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:121)
> 	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:597)
> 	at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:202)
> 	at javax.xml.bind.ContextFinder.find(ContextFinder.java:363)
> 	at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:574)
> 	at org.apache.cxf.jaxb.JAXBDataBinding.createContext(JAXBDataBinding.java:557)
> 	at org.apache.cxf.jaxb.JAXBDataBinding.createJAXBContextAndSchemas(JAXBDataBinding.java:497)
> 	at org.apache.cxf.jaxb.JAXBDataBinding.initialize(JAXBDataBinding.java:324)
> 	... 105 more
> I read Dan's post at http://www.mail-archive.com/dev@cxf.apache.org/msg02648.html But here, I'm surely using CXF & Locale is a parameter to a method that I'm exposing as webmethod. So not sure what is the problem. This works fine with Jboss 5. and issue is same with cxf 2.3.3.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira