Skip to content

Doesn't work within OSGi application? #17

@paulklinkenberg

Description

@paulklinkenberg

Hi there,
I am trying to implement eWay using the steps laid out here: https://go.eway.io/s/article/Java-SDK
The error I am getting can be seen in the ST underneath.
Upon investigation, I am reading mainly about "The Jersey 1.x client not working correctly in OSGi applications", and "migrate from Jersey 1.x to JAX-RS 2.0".

Is this indeed a known limitation for using this SDK? Or is there a workaround?

Kind regards, Paul

com.sun.jersey.api.client.ClientHandlerException: com.sun.jersey.api.client.ClientHandlerException: A message body writer for Java type, class com.eway.payment.rapid.sdk.entities.CreateAccessCodeSharedRequest, and MIME media type, application/json, was not found at com.sun.jersey.client.urlconnection.URLConnectionClientHandler.handle(URLConnectionClientHandler.java:155) at com.sun.jersey.api.client.filter.HTTPBasicAuthFilter.handle(HTTPBasicAuthFilter.java:105) at com.eway.payment.rapid.sdk.util.RapidClientFilter.handle(RapidClientFilter.java:45) at com.sun.jersey.api.client.Client.handle(Client.java:652) at com.sun.jersey.api.client.WebResource.handle(WebResource.java:682) at com.sun.jersey.api.client.WebResource.access$200(WebResource.java:74) at com.sun.jersey.api.client.WebResource$Builder.post(WebResource.java:570) at com.eway.payment.rapid.sdk.message.process.AbstractMessageProcess.doPost(AbstractMessageProcess.java:92) at com.eway.payment.rapid.sdk.message.process.transaction.TransResponsiveSharedMsgProcess.sendRequest(TransResponsiveSharedMsgProcess.java:45) at com.eway.payment.rapid.sdk.message.process.AbstractMakeRequestMessageProcess.processPostMsg(AbstractMakeRequestMessageProcess.java:30) at com.eway.payment.rapid.sdk.message.process.AbstractMessageProcess.doWork(AbstractMessageProcess.java:57) at com.eway.payment.rapid.sdk.RapidClientImpl.create(RapidClientImpl.java:228) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:567) at lucee.runtime.reflection.pairs.MethodInstance.invoke(MethodInstance.java:56) at lucee.runtime.reflection.Reflector.callMethod(Reflector.java:877) at lucee.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:829) at lucee.runtime.PageContextImpl.getFunction(PageContextImpl.java:1710) at testeway_cfm$cf.call(/testeway.cfm:68) at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:945) at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:837) at lucee.runtime.PageContextImpl.doInclude(PageContextImpl.java:818) at baseapplication_cfc$cf.udfCall1(/BaseApplication.cfc:113) at baseapplication_cfc$cf.udfCall(/BaseApplication.cfc) at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:106) at lucee.runtime.type.UDFImpl._call(UDFImpl.java:344) at lucee.runtime.type.UDFImpl.call(UDFImpl.java:217) at lucee.runtime.ComponentImpl._call(ComponentImpl.java:680) at lucee.runtime.ComponentImpl._call(ComponentImpl.java:568) at lucee.runtime.ComponentImpl.call(ComponentImpl.java:1898) at lucee.runtime.listener.ModernAppListener.call(ModernAppListener.java:436) at lucee.runtime.listener.ModernAppListener._onRequest(ModernAppListener.java:215) at lucee.runtime.listener.MixedAppListener.onRequest(MixedAppListener.java:42) at lucee.runtime.PageContextImpl.execute(PageContextImpl.java:2416) at lucee.runtime.PageContextImpl._execute(PageContextImpl.java:2406) at lucee.runtime.PageContextImpl.executeCFML(PageContextImpl.java:2381) at lucee.runtime.engine.Request.exe(Request.java:43) at lucee.runtime.engine.CFMLEngineImpl._service(CFMLEngineImpl.java:1170) at lucee.runtime.engine.CFMLEngineImpl.serviceCFML(CFMLEngineImpl.java:1116) at lucee.loader.engine.CFMLEngineWrapper.serviceCFML(CFMLEngineWrapper.java:97) at lucee.loader.servlet.CFMLServlet.service(CFMLServlet.java:51) at javax.servlet.http.HttpServlet.service(HttpServlet.java:741) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:770) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1415) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.base/java.lang.Thread.run(Thread.java:831) Caused by: com.sun.jersey.api.client.ClientHandlerException: A message body writer for Java type, class com.eway.payment.rapid.sdk.entities.CreateAccessCodeSharedRequest, and MIME media type, application/json, was not found at com.sun.jersey.api.client.RequestWriter.writeRequestEntity(RequestWriter.java:288) at com.sun.jersey.client.urlconnection.URLConnectionClientHandler._invoke(URLConnectionClientHandler.java:217) at com.sun.jersey.client.urlconnection.URLConnectionClientHandler.handle(URLConnectionClientHandler.java:153) ... 64 more

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions