8 Replies Latest reply on Oct 31, 2007 2:39 AM by nickarls

    nor any of its super class is known...

    nickarls

      Hi,

      I'm running JB 4.2.1GA and have an annotated WebService that takes a List as parameters. However, I get an

      [javax.xml.bind.JAXBException: foo.Bar nor any of its super class is known to this context]
      


      How should I introduce this class to JAXB? Tried @XmlType and @XmlRootElement annotations but no go. Even more strange, It was working at some point without any extra configuration :-/

        • 1. Re: nor any of its super class is known...
          nickarls

          Bump. Anyone?

          • 2. Re: nor any of its super class is known...
            nickarls

            OK, what would be a better place to ask? The Sun forums?

            • 3. Re: nor any of its super class is known...
              asoldano

              Could you please post the source code of your jaxb annotated classes? How did you create them?

              • 4. Re: nor any of its super class is known...
                nickarls

                I have an interface

                @Remote
                @WebService
                public interface ServerInterface {
                ...


                and an implementation

                @Stateless
                @WebService
                @WebContext(contextRoot="/services)
                @EndpointConfig(configName="Standard WSSecurity Endpoint")
                @Name("serverWebService")
                public class ServerWebService implements ServerInterface {
                ...


                (deployed in a Seam 2.0.0CR2 app to JBoss 4.2.1GA)

                and I call it like

                Service service = Service.create(new URL(...), new QName(...));
                ((ServiceExt)service).setSecurityConfig(new File("META-INF/jboss-wsse-client.xml").toURI().toURL().toExternalForm());
                port = service.getPort(ServerInterface.class);
                ((StubExt)port).setConfigName("Standard WSSecurity Client");
                ...
                


                Thanks for your time,
                -Nik

                • 5. Re: nor any of its super class is known...
                  asoldano

                  I suspect this is somehow related to your jaxb annotated classes... I mean, how are foo.Bar and other classes of its hierarchy annotated and used?

                  • 6. Re: nor any of its super class is known...
                    nickarls

                    The strange thing is that I see the called WS being called and it looks like the problem would emerge on the reponse:

                    11:30:01,672 WARN [arjLoggerI18N] [com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator_4] TwoPhaseCoordinator.afterCompletion - returned failure for com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple@2f2075
                    11:30:01,722 ERROR [HandlerChainExecutor] Exception during handler processing
                    javax.xml.ws.WebServiceException: javax.xml.bind.MarshalException
                     - with linked exception:
                    [javax.xml.bind.JAXBException: foo.Bar nor any of its super class is known to this context.
                    


                    foo.Bar has a
                    @XmlType
                    


                    • 7. Re: nor any of its super class is known...
                      rukus

                      Can you provide full sources of classes in hierarchy with foo.Bar?

                      • 8. Re: nor any of its super class is known...
                        nickarls

                        Well, got around it. The issue went like this:

                        I wanted to return a Map<Query, Result> from the WS. Interfaces weren't allowed so I returned a HashMap<Query, Result> which worked perfectly if you disregard the fact that the map was always empty. So I returned a MapWrapper object, which complained that the Query class couldn't be found when it was constructing the result.

                        The strange thing is that returning a List was fine, so I got around it by adding a place for the return value inside the Query class...