Open Elmosen opened 7 years ago
Hi @Elmosen,
It is probably a class loading problem, can you share a runnable project?
Hello Avurro,
thank you four your fast reply. I was sick since friday, so I was not able to answer sooner.
Yes, I'm sure it is a class loading problem. Did you hear about any Payara or Glassfish problems before?
I will now start with Dozer for my mapping (I used it already earlier), but I hope I will find the time to strip my project to give it to you for further investigation.
Regards, Marc
Hello,
I use a simple mapping from one type to another, and everything works fine in my JUnit test. I have two classes with three identical fields of type Integer, String, and Date.
When I try to use my mapping within an EJB for a Webservice, deployed on a Payara 4.1 server, I get an Exception - stack trace and other things see below in this message.
Is it a known problem or are there any hints for me regarding missing configuration?
Thank you in advance, regards Marc
Stacktrace:
Caused by: com.googlecode.jmapper.exceptions.JMapperException: com.googlecode.jmapper.exceptions.ConversionBodyIllegalCodeException: There is an error in the generated method. Additional information: [source error] no such class: com.bauermedia.bskh.csi.vux.entities.ReportCategory at com.googlecode.jmapper.config.JmapperLog.error(JmapperLog.java:46) at com.googlecode.jmapper.JMapper.<init>(JMapper.java:437) at com.googlecode.jmapper.JMapper.<init>(JMapper.java:373) at com.googlecode.jmapper.JMapper.<init>(JMapper.java:360) at com.bauermedia.bskh.csi.vux.services.ReportCategoriesManager.getAllReportCategories(ReportCategoriesManager.java:32) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.glassfish.ejb.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1081) at org.glassfish.ejb.security.application.EJBSecurityManager.invoke(EJBSecurityManager.java:1153) at com.sun.ejb.containers.BaseContainer.invokeBeanMethod(BaseContainer.java:4789) at com.sun.ejb.EjbInvocation.invokeBeanMethod(EjbInvocation.java:656) at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:822) at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:608) at org.jboss.weld.ejb.AbstractEJBRequestScopeActivationInterceptor.aroundInvoke(AbstractEJBRequestScopeActivationInterceptor.java:64) at org.jboss.weld.ejb.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:52) at sun.reflect.GeneratedMethodAccessor989.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:883) at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:822) at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:608) at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.doCall(SystemInterceptorProxy.java:163) at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.aroundInvoke(SystemInterceptorProxy.java:140) at sun.reflect.GeneratedMethodAccessor991.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:883) at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:822) at com.sun.ejb.containers.interceptors.InterceptorManager.intercept(InterceptorManager.java:369) at com.sun.ejb.containers.BaseContainer.__intercept(BaseContainer.java:4761) at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:4749) at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:212) ... 91 more Caused by: com.googlecode.jmapper.exceptions.ConversionBodyIllegalCodeException: There is an error in the generated method. Additional information: [source error] no such class: com.bauermedia.bskh.csi.vux.entities.ReportCategory at com.googlecode.jmapper.config.Error.bodyContainsIllegalCode(Error.java:186) at com.googlecode.jmapper.generation.JavassistGenerator.generate(JavassistGenerator.java:85) at com.googlecode.jmapper.generation.MapperGenerator.generateMapperClass(MapperGenerator.java:75) at com.googlecode.jmapper.generation.MapperBuilder.generate(MapperBuilder.java:90) at com.googlecode.jmapper.JMapper.createMapper(JMapper.java:450) at com.googlecode.jmapper.JMapper.<init>(JMapper.java:432) ... 123 more ]]
My maven dependencies look like these:And here the code snippet of the usage of the JMapper which already stops at the JMapper constructor: