Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8441711
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T08:38:08+00:00 2026-06-10T08:38:08+00:00

I created a simple webservice with JAX-WS, but I expecting a anoying issue. My

  • 0

I created a simple webservice with JAX-WS, but I expecting a anoying issue.

My webservice code is something like this:

@WebService
public class UpdateList implements IUpdateList {

    public UpdateList() {
    }

    @Override
    public Collection<Long> getFrom(Long version) {
        System.out.println("test");
        return new ArrayList<Long>();
    }

}

I generated the client code with wsimport and created a simple main for it:

public class App {

    public static void main(String[] args) {
        System.out.println(new UpdateListService().getUpdateListPort().getFrom(183L));
    }
}

But, when I run it, I got a unexplainable class cast exception:

Exception in thread "main" java.lang.ExceptionInInitializerError
    at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(Unknown Source)
    at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(Unknown Source)
    at com.sun.xml.internal.ws.client.sei.SEIStub.invoke(Unknown Source)
    at $Proxy29.getFrom(Unknown Source)
    at com.test.App.main(App.java:8)
Caused by: java.lang.ClassCastException: com.sun.xml.bind.v2.runtime.JAXBContextImpl cannot be cast to com.sun.xml.internal.bind.api.JAXBRIContext
    at com.sun.xml.internal.ws.fault.SOAPFaultBuilder.<clinit>(Unknown Source)
    ... 5 more

Then I just realized that it could be some dependency conflict, so I run mvn dependency:tree, and it’s clean, my only deps are hibernate, guava, guice and jaxws-rt. (you can see that in my webservice example, it is not using any of cited dependencies, but I’ll do it soon, when I fix this issue).

Well, the complete list, for client:

+- com.google.guava:guava:jar:13.0:compile
+- com.google.inject:guice:jar:3.0:compile
|  +- javax.inject:javax.inject:jar:1:compile
|  \- aopalliance:aopalliance:jar:1.0:compile
+- log4j:log4j:jar:1.2.17:compile
+- junit:junit:jar:4.10:test
|  \- org.hamcrest:hamcrest-core:jar:1.1:test
+- com.sun.xml.bind:jaxb-impl:jar:2.2.6:compile
+- org.hsqldb:hsqldb:jar:2.2.8:test
+- com.google.inject.extensions:guice-persist:jar:3.0:compile
+- org.hibernate:hibernate-entitymanager:jar:4.1.6.Final:compile
|  +- org.jboss.logging:jboss-logging:jar:3.1.0.GA:compile
|  +- org.hibernate:hibernate-core:jar:4.1.6.Final:compile
|  |  \- antlr:antlr:jar:2.7.7:compile
|  +- org.jboss.spec.javax.transaction:jboss-transaction-api_1.1_spec:jar:1.0.0.Final:compile
|  +- dom4j:dom4j:jar:1.6.1:compile
|  +- org.javassist:javassist:jar:3.15.0-GA:compile
|  \- org.hibernate.common:hibernate-commons-annotations:jar:4.0.1.Final:compile
+- org.hibernate.javax.persistence:hibernate-jpa-2.0-api:jar:1.0.1.Final:compile
+- mysql:mysql-connector-java:jar:5.1.21:compile
\- commons-lang:commons-lang:jar:2.6:compile

and for service:

 +- com.sun.xml.ws:jaxws-rt:jar:2.2.6-2:compile
 |  +- javax.xml.ws:jaxws-api:jar:2.2.8:compile
 |  |  +- javax.xml.bind:jaxb-api:jar:2.2.4:compile
 |  |  +- javax.xml.soap:saaj-api:jar:1.3.4:compile
 |  |  +- org.glassfish:javax.annotation:jar:3.1.1:runtime
 |  |  \- javax.jws:jsr181-api:jar:1.0-MR1:runtime
 |  +- com.sun.xml.messaging.saaj:saaj-impl:jar:1.3.18:compile
 |  +- com.sun.xml.stream.buffer:streambuffer:jar:1.4:compile
 |  |  +- javax.xml.stream:stax-api:jar:1.0-2:compile
 |  |  \- javax.activation:activation:jar:1.1:compile
 |  +- org.codehaus.woodstox:woodstox-core-asl:jar:4.1.2:compile
 |  +- org.codehaus.woodstox:stax2-api:jar:3.1.1:compile
 |  +- org.jvnet.mimepull:mimepull:jar:1.8:compile
 |  +- com.sun.xml.ws:policy:jar:2.3.1:compile
 |  |  +- com.sun.xml.txw2:txw2:jar:20110809:compile
 |  |  |  \- relaxngDatatype:relaxngDatatype:jar:20020414:compile
 |  |  \- com.sun.istack:istack-commons-runtime:jar:2.4:compile
 |  +- org.jvnet.staxex:stax-ex:jar:1.7:compile
 |  +- org.glassfish.gmbal:gmbal-api-only:jar:3.1.0-b001:compile
 |  |  \- org.glassfish.external:management-api:jar:3.0.0-b012:compile
 |  \- org.glassfish.ha:ha-api:jar:3.1.8:compile
 +- com.google.guava:guava:jar:13.0:compile
 +- com.google.inject:guice:jar:3.0:compile
 |  +- javax.inject:javax.inject:jar:1:compile
 |  \- aopalliance:aopalliance:jar:1.0:compile
 +- log4j:log4j:jar:1.2.17:compile
 +- junit:junit:jar:4.10:test
 |  \- org.hamcrest:hamcrest-core:jar:1.1:test
 +- com.sun.xml.bind:jaxb-impl:jar:2.2.6:compile
 +- org.hsqldb:hsqldb:jar:2.2.8:test
 +- com.google.inject.extensions:guice-persist:jar:3.0:compile
 +- org.hibernate:hibernate-entitymanager:jar:4.1.6.Final:compile
 |  +- org.jboss.logging:jboss-logging:jar:3.1.0.GA:compile
 |  +- org.hibernate:hibernate-core:jar:4.1.6.Final:compile
 |  |  \- antlr:antlr:jar:2.7.7:compile
 |  +- org.jboss.spec.javax.transaction:jboss-transaction-api_1.1_spec:jar:1.0.0.Final:compile
 |  +- dom4j:dom4j:jar:1.6.1:compile
 |  +- org.javassist:javassist:jar:3.15.0-GA:compile
 |  \- org.hibernate.common:hibernate-commons-annotations:jar:4.0.1.Final:compile
 +- org.hibernate.javax.persistence:hibernate-jpa-2.0-api:jar:1.0.1.Final:compile
 +- mysql:mysql-connector-java:jar:5.1.21:compile
 \- commons-lang:commons-lang:jar:2.6:compile

I end this thinking that’s some config or jar file missing in my jboss.. I do some research, but not found anything relevant.

Someone already passed througt this? Any suggestion? Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T08:38:10+00:00Added an answer on June 10, 2026 at 8:38 am

    It looks like you’re bundling a JAXP implementation, com.sun.xml.bind:jaxb-impl:jar:2.2.6:compile. Try changing the scope to <scope>provided</scope>. Same for the com.sun.xml.ws:jaxws-rt:jar:2.2.6-2:compile.

    In fact, most of those should be provided.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created the simple web service. Code: [ServiceContract] public interface ITsdxService { [OperationContract]
I have this simple code, that makes a get to a webservice. For some
This may sound like a simple question but as am newbie in Webservies and
Hello I`ve created simple WFC DataService and connected entit model with my database. This
Could someone help me on this, I have created simple web services using axis2
I've created the default WCF Service in VS2008. It's called Service1 public class Service1
I am working on a simple .Net 4.0 webservice. I created one method, which
I have a simple question about passing custom objects via a webservice. I created
I'd like to create a simple webservice in scala similar to: http://www.artima.com/lejava/articles/threeminutes.html Is there
I've created a simple SOAP web service using soaplib and run into an issue

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.