[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-1831?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13616249#comment-13616249
 ] 

Hugo Trippaers commented on CLOUDSTACK-1831:
--------------------------------------------

This error message is generated when there is a version conflict versus the 
jaxb implementations in the jvm.

framework-rest and framework-engine-api both pull in the dependency 
cxf-bundle-jaxrs which in turn pulls jaxb-impl 2.1.13. This might be the cause 
of the problem.


Something interesting to read: (at 
https://jax-ws.dev.java.net/guide/Using_JAX_WS_2_1_with_JavaSE6.html) 

Quote:

2.8. Using JAX-WS 2.1 with JavaSE6 

JavaSE6 ships with JAX-WS 2.0 API in rt.jar, which causes some trouble when you 
try to run applications that use JAX-WS 2.1 API. This document collects 
information about how to solve this issue. 

2.8.1. Endorsed directory 

One way to fix this is to copy jaxws-api.jar and jaxb-api.jar into JRE endorsed 
directory, which is $JAVA_HOME/lib/endorsed (or $JDK_HOME/jre/lib/endorsed) 

Some application containers, such as Glassfish, modifies the location of the 
endorsed directory to a different place. From inside the JVM, you can check the 
current location by doing 
System.out.println(System.getProperty("java.endorsed.dirs")); 

Obviously you still need other JAX-WS jars in your classpath. 

Please do not put all the jars to the endorsed directory. This makes it 
impossible for JAX-WS RI to see other classes that it needs for its operation, 
such as servlet classes on the server-side, or Ant classes in the tool time. As 
those are not loaded by the bootstrap classloader, you'll get NoClassDefError 
on servlet/Ant classes.


                
> ModifyStoragePool failed, ClassCastException JAXBRIContext
> ----------------------------------------------------------
>
>                 Key: CLOUDSTACK-1831
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-1831
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the 
> default.) 
>          Components: VMware
>    Affects Versions: 4.2.0
>            Reporter: Hugo Trippaers
>            Assignee: Hugo Trippaers
>            Priority: Minor
>
> The following error was observed while adding a primary storage pool to a 
> vmware cluster
> 2013-03-28 14:13:02,238 INFO  [vmware.resource.VmwareResource] 
> (DirectAgent-68:10.200.23.49) Executing resource ModifyStoragePoolCommand: 
> {"add":true,"pool":{"id":2,"uuid":"6aed2486-201b-300b-bca9-f9b545826f8f","host":"10.200.23.31","path":"/volumes/mccd_volume/vmware/store1","port":2049,"type":"NetworkFilesystem"},"localPath":"/mnt/\\6aed2486-201b-300b-bca9-f9b545826f8f","wait":0}
> 2013-03-28 14:13:02,529 ERROR [vmware.resource.VmwareResource] 
> (DirectAgent-68:10.200.23.49) ModifyStoragePoolCommand failed due to 
> Exception: java.lang.ExceptionInInitializerError
> Message: null
> java.lang.ExceptionInInitializerError
>       at 
> com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:107)
>       at 
> com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:78)
>       at com.sun.xml.internal.ws.client.sei.SEIStub.invoke(SEIStub.java:107)
>       at $Proxy461.createNasDatastore(Unknown Source)
>       at 
> com.cloud.hypervisor.vmware.mo.HostDatastoreSystemMO.createNfsDatastore(HostDatastoreSystemMO.java:145)
>       at com.cloud.hypervisor.vmware.mo.HostMO.mountDatastore(HostMO.java:747)
>       at 
> com.cloud.hypervisor.vmware.resource.VmwareResource.execute(VmwareResource.java:3133)
>       at 
> com.cloud.hypervisor.vmware.resource.VmwareResource.executeRequest(VmwareResource.java:388)
>       at 
> com.cloud.agent.manager.DirectAgentAttache$Task.run(DirectAgentAttache.java:186)
>       at 
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
>       at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
>       at java.util.concurrent.FutureTask.run(FutureTask.java:138)
>       at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98)
>       at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:206)
>       at 
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>       at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>       at java.lang.Thread.run(Thread.java:662)
> 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>(SOAPFaultBuilder.java:533)
>       at 
> com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:107)
>       ... 16 more

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to