Sergio
Sergio

Reputation: 1

REST WS GeneXus 16 U8 Java Enviroment

I'm trying to create a REST WS in GeneXus 16 U8 on Java Enviroment, deploying the application on WebLogic 12c, but when I'm trying to consume the service it shows me the following error:

java.lang.ClassCastException: org.glassfish.jersey.server.ResourceConfig$WrappingResourceConfig cannot be cast to org.glassfish.jersey.server.ResourceConfig
    at org.glassfish.jersey.servlet.internal.Utils.retrieve(Utils.java:90)
    at org.glassfish.jersey.servlet.WebComponent.createResourceConfig(WebComponent.java:565)
    at org.glassfish.jersey.servlet.WebComponent.(WebComponent.java:356)
    at org.glassfish.jersey.servlet.ServletContainer.init(ServletContainer.java:177)
    at org.glassfish.jersey.servlet.ServletContainer.init(ServletContainer.java:369)
    at javax.servlet.GenericServlet.init(GenericServlet.java:244)
    at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:356)

I have configured the properties like the documentation said: https://wiki.genexus.com/commwiki/servlet/wiki?21467,Procedures+as+Rest+web+services+in+GeneXus, but the result is always the same.

Also, I have the following web.xml configuration:

    <servlet>
        <servlet-name>JerseyListener</servlet-name>
        <servlet-class>org.glassfish.jersey.servlet.ServletContainer</servlet-class>
        <init-param>
            <param-name>javax.ws.rs.Application</param-name>
            <param-value>com.main.GXApplication</param-value>
        </init-param>
        <init-param>
            <param-name>com.sun.jersey.spi.container.ContainerRequestFilters</param-name>
            <param-value>com.sun.jersey.api.container.filter.GZIPContentEncodingFilter</param-value>
        </init-param>
        <init-param>
            <param-name>com.sun.jersey.spi.container.ContainerResponseFilters</param-name>
            <param-value>com.sun.jersey.api.container.filter.GZIPContentEncodingFilter</param-value>
        </init-param>
    </servlet>
    <servlet>
    <servlet-mapping>
        <servlet-name>JerseyListener</servlet-name>
        <url-pattern>/rest/*</url-pattern>
    </servlet-mapping>

I appreciate the help.

Upvotes: 0

Views: 291

Answers (0)

Related Questions