2 Replies Latest reply on Apr 3, 2011 3:59 AM by Sam W

    JAXB can't handle interfaces

    Sam W Expert

      Hello,

       

      Here there is anohter problem I never seen before:

       

      DEPLOYMENTS IN ERROR:

        Deployment "vfs:///usr/local/users/jboss/jboss6/server/default/deploy/HousewareEnterpriseApplication-v7.ear" is in error due to the following reason(s): com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 4 counts of IllegalAnnotationExceptions

      javax.persistence.criteria.CriteriaQuery is an interface, and JAXB can't handle interfaces.

              this problem is related to the following location:

                      at javax.persistence.criteria.CriteriaQuery

                      at private javax.persistence.criteria.CriteriaQuery au.com.houseware.server.ejb.entity.facade.ws.jaxws_asm.FindCountByCriteria.criteria

                      at au.com.houseware.server.ejb.entity.facade.ws.jaxws_asm.FindCountByCriteria

      javax.persistence.criteria.CriteriaQuery does not have a no-arg default constructor.

              this problem is related to the following location:

                      at javax.persistence.criteria.CriteriaQuery

                      at private javax.persistence.criteria.CriteriaQuery au.com.houseware.server.ejb.entity.facade.ws.jaxws_asm.FindCountByCriteria.criteria

                      at au.com.houseware.server.ejb.entity.facade.ws.jaxws_asm.FindCountByCriteria

      javax.persistence.Tuple is an interface, and JAXB can't handle interfaces.

              this problem is related to the following location:

                      at javax.persistence.Tuple

                      at private java.util.Collection au.com.houseware.server.ejb.entity.facade.ws.jaxws_asm.FindSubcategories_By_CategoryNameResponse._return

                      at au.com.houseware.server.ejb.entity.facade.ws.jaxws_asm.FindSubcategories_By_CategoryNameResponse

      javax.persistence.Tuple does not have a no-arg default constructor.

              this problem is related to the following location:

                      at javax.persistence.Tuple

                      at private java.util.Collection au.com.houseware.server.ejb.entity.facade.ws.jaxws_asm.FindSubcategories_By_CategoryNameResponse._return

                      at au.com.houseware.server.ejb.entity.facade.ws.jaxws_asm.FindSubcategories_By_CategoryNameResponse

       

       

       

       

      I was deploying an ear file to jboss 6, but it thrown the above exception. The ear file consist of a ejb3 and war file.

      What should I do to fix this error?

       

      Very appreciate for any suggestion and help

      Sam

        • 1. JAXB can't handle interfaces
          Sam W Expert

          I converted Collection<Tuple> into Map<String, String> but I am still getting the same error:

           

          Caused by: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 2 counts of IllegalAnnotationExceptions

          java.util.Map is an interface, and JAXB can't handle interfaces.

                  this problem is related to the following location:

                          at java.util.Map

                          at private java.util.Map au.com.houseware.server.ejb.entity.facade.ws.jaxws_asm.FindSubcategories_By_CategoryNameResponse._return

                          at au.com.houseware.server.ejb.entity.facade.ws.jaxws_asm.FindSubcategories_By_CategoryNameResponse

          java.util.Map does not have a no-arg default constructor.

                  this problem is related to the following location:

                          at java.util.Map

                          at private java.util.Map au.com.houseware.server.ejb.entity.facade.ws.jaxws_asm.FindSubcategories_By_CategoryNameResponse._return

                          at au.com.houseware.server.ejb.entity.facade.ws.jaxws_asm.FindSubcategories_By_CategoryNameResponse

           

          Sam

           

          • 2. JAXB can't handle interfaces
            Sam W Expert

            OK, I convert Map<string, string> to Collection<String[]>, no more complains.

             

            Is there any other "more elegant" solution re solving this problem?

             

            Thanks

            Sam