glassfish
  1. glassfish
  2. GLASSFISH-18813

JAXBRI of GET failure with Default JAXBContext

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.0_b49
    • Component/s: jax-rs
    • Labels:
      None
    • Environment:

      RHL5, JDK1.6.0_30

      Description

      JAXBRI of GET failure with Default JAXBContext

      glassfish-4.0-b42-06-18-2012.zip

      After modifying class in web.xml
      ! <servlet-class>org.glassfish.jersey.servlet.ServletContainer</servlet-class>

      to resolve deploy error in
      http://java.net/jira/browse/GLASSFISH-18811

      the next error is
      java.io.FileNotFoundException: http://localhost:8080/jaxrs3-jaxbri/rest/customers/1

      The same tests passed on glassfish-4.0-b41.zip

      1. web.xml
        0.8 kB
        Jakub Podlesak

        Issue Links

          Activity

          Hide
          Jakub Podlesak added a comment -

          Just for my record: a slightly updated create jdbc pool command, so that the db gets automatically created:

          ./bin/asadmin create-jdbc-connection-pool --datasourceclassname org.apache.derby.jdbc.ClientDataSource --restype javax.sql.DataSource --property User=dbuser:Password=dbpassword:dataBaseName=testdb:serverName=localhost:portNumber=1527:connectionAttributes=create
          =true:retrieveMessagesFromServerOnGetMessage=true pooljaxrs3

          I suggest to update the web.xml descriptor like follows, so that we get rid of Jersey specific stuff:

          <?xml version="1.0" encoding="UTF-8"?>
          <web-app xmlns="http://java.sun.com/xml/ns/javaee"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
          version="3.0">
          <servlet>
          <servlet-name>javax.ws.rs.core.Application</servlet-name>
          <load-on-startup>1</load-on-startup>
          </servlet>
          <servlet-mapping>
          <servlet-name>javax.ws.rs.core.Application</servlet-name>
          <url-pattern>/rest/*</url-pattern>
          </servlet-mapping>
          <persistence-context-ref>
          <persistence-context-ref-name>persistence/em</persistence-context-ref-name>
          <persistence-unit-name>CustomerService</persistence-unit-name>
          </persistence-context-ref>
          </web-app>

          After the above is changed, the application works for me just fine with the latest Jersey bits (going to attach corresponding zip archive).
          We need to cut another intermediary Jersey release and integrate to GF to fix this.

          Show
          Jakub Podlesak added a comment - Just for my record: a slightly updated create jdbc pool command, so that the db gets automatically created: ./bin/asadmin create-jdbc-connection-pool --datasourceclassname org.apache.derby.jdbc.ClientDataSource --restype javax.sql.DataSource --property User=dbuser:Password=dbpassword:dataBaseName=testdb:serverName=localhost:portNumber=1527:connectionAttributes=create =true:retrieveMessagesFromServerOnGetMessage=true pooljaxrs3 I suggest to update the web.xml descriptor like follows, so that we get rid of Jersey specific stuff: <?xml version="1.0" encoding="UTF-8"?> <web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd " version="3.0"> <servlet> <servlet-name>javax.ws.rs.core.Application</servlet-name> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>javax.ws.rs.core.Application</servlet-name> <url-pattern>/rest/*</url-pattern> </servlet-mapping> <persistence-context-ref> <persistence-context-ref-name>persistence/em</persistence-context-ref-name> <persistence-unit-name>CustomerService</persistence-unit-name> </persistence-context-ref> </web-app> After the above is changed, the application works for me just fine with the latest Jersey bits (going to attach corresponding zip archive). We need to cut another intermediary Jersey release and integrate to GF to fix this.
          Hide
          Jakub Podlesak added a comment -

          Updated web.xml and latest snapshot jersey modules

          Show
          Jakub Podlesak added a comment - Updated web.xml and latest snapshot jersey modules
          Hide
          Jakub Podlesak added a comment -

          updated web app (web.xml descriptor changed to become JAX-RS implementation agnostic)

          Show
          Jakub Podlesak added a comment - updated web app (web.xml descriptor changed to become JAX-RS implementation agnostic)
          Hide
          sherryshen added a comment - - edited

          Thank Jakub for the patch and suggested test change.
          With patch and test change on glassfish-4.0-b47.zip,
          GET is OK now, but PUT and POST still have issue in the jaxrs3 test suite.
          I filed GLASSFISH-18951 to track the remaining failure,

          Show
          sherryshen added a comment - - edited Thank Jakub for the patch and suggested test change. With patch and test change on glassfish-4.0-b47.zip, GET is OK now, but PUT and POST still have issue in the jaxrs3 test suite. I filed GLASSFISH-18951 to track the remaining failure,
          Hide
          sherryshen added a comment -

          sqe tests of jaxrs3 passed on glassfish-4.0-b49-08_04_2012.zip.

          Show
          sherryshen added a comment - sqe tests of jaxrs3 passed on glassfish-4.0-b49-08_04_2012.zip.

            People

            • Assignee:
              Jakub Podlesak
              Reporter:
              sherryshen
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: