Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The extension is rendered unusable because the default constructor is protected #37

Open
julianomqs opened this issue Feb 6, 2020 · 2 comments
Assignees
Labels

Comments

@julianomqs
Copy link

Like the issue #9 because the protected access of the default constructor an error occurs when executing a web service endpoint method.

And I just discovered an error occurs in Apache CXF, version 3.3.5:

fev 06, 2020 7:49:24 PM org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean buildServiceFromWSDL
INFORMAÇÕES: Creating Service {http://www.fcdl-sc.org.br/sispc/consulta}ConsultaSpcscService from WSDL: file:/C:/java/projetos/spc/target/classes/fcdl_sc_spc_homologacao.wsdl
java.lang.IllegalAccessException: Class org.apache.cxf.jaxb.JAXBWrapperHelper can not access a member of class br.org.fcdl_sc.sispc.consulta.ChequeNacional12 with modifiers "protected"
	at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:102)
	at java.lang.Class.newInstance(Class.java:436)
	at org.apache.cxf.jaxb.JAXBWrapperHelper.createWrapperObject(JAXBWrapperHelper.java:46)
	at org.apache.cxf.databinding.AbstractWrapperHelper.createWrapperObject(AbstractWrapperHelper.java:88)
	at org.apache.cxf.jaxws.interceptors.WrapperClassOutInterceptor.handleMessage(WrapperClassOutInterceptor.java:91)
	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
	at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:530)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:441)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:356)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:314)
	at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96)
	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:140)
	at com.sun.proxy.$Proxy36.chequeNacional12(Unknown Source)
	at br.com.ibasi.spc.FcdlScSpc.lambda$42(FcdlScSpc.java:319)
	at br.com.ibasi.spc.Utils.wrapInTryCatch(Utils.java:14)
	at br.com.ibasi.spc.FcdlScSpc.chequeNacional12(FcdlScSpc.java:319)
	at br.com.ibasi.spc.Main.main(Main.java:15)

Both Glassfish (JDK) and Apache CXF JAX-WS implementations use the sun.reflect.Reflection.ensureMemberAccess method, and it is where the error occur.

So I kindly ask for you reconsider generating the default constructor protected.

@sabomichal
Copy link
Owner

Can you please be more specific how was your CXF framework configured? Parts of it can be seen from the provided stacktrace, however some working (better said non working 😊) example would be great.

@sabomichal sabomichal self-assigned this Aug 6, 2020
@sabomichal sabomichal added the bug label Aug 6, 2020
@rastislavpapp
Copy link

I've encountered the same problem. The setup is:

  • karaf 4.3.0
  • cxf 3.4.0
  • used via camel-cxf (camel 3.6.0)
    extracting the project into a working example would unfortunately be a very large endeavor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants