WSO2 DSS 3.5.0 - DataService Task Class error - wso2

I'm currently working on WSO2 DSS 3.5.0, trying to follow this example:
https://itsmeisuru.wordpress.com/2013/11/29/wso2-dss-scheduled-task-example/
I've created the JAR file of a simple java class that implement "DataTask".
It put this JAR in the repository DSS_HOME/repository/components/lib like it's said in step 2 of the example.
Then, when I create the schedule task like in the step 6.
I have the following error in my server console:
INFO {org.quartz.core.JobRunShell} - Job
TENANT_-1234_TYPE_DATA_SERVICE_TASK.ScheduleTest threw a
JobExecutionException: org.quartz.JobExecutionException: Error in
executing task: Error in initializing Data Task: sample.Test cannot be
found by org.wso2.carbon.dataservices.task_4.3.4 [See nested
exception: java.lang.RuntimeException: Error in initializing Data
Task: sample.Test cannot be found by
org.wso2.carbon.dataservices.task_4.3.4] at
org.wso2.carbon.ntask.core.impl.TaskQuartzJobAdapter.execute(TaskQuartzJobAdapter.java:74)
at org.quartz.core.JobRunShell.run(JobRunShell.java:213) at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266) at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745) Caused by:
java.lang.RuntimeException: Error in initializing Data Task:
sample.Test cannot be found by org.wso2.carbon.dataservices.task_4.3.4
at
org.wso2.carbon.dataservices.task.DSTaskExt.init(DSTaskExt.java:42)
at
org.wso2.carbon.ntask.core.impl.TaskQuartzJobAdapter.execute(TaskQuartzJobAdapter.java:66)
... 6 more Caused by: java.lang.ClassNotFoundException: sample.Test
cannot be found by org.wso2.carbon.dataservices.task_4.3.4 at
org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:501)
at
org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421)
at
org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:412)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357) at
java.lang.Class.forName0(Native Method) at
java.lang.Class.forName(Class.java:264) at
org.wso2.carbon.dataservices.task.DSTaskExt.init(DSTaskExt.java:36)
... 7 more
Note that my package name is "sample" and the name of my java class is "Test".
It looks like the scheduled task doesn't retrieve the class I indicate in the field "DataService Task Class".
Has anybody already had the same problem?
I also tried to used the JAR generated in the example as it's provided in the step 2. Then I follow the very same other steps. Finally I have the same problem:
[classpath] cannot be found by org.wso2.carbon.dataservices.task_4.3.4

This is a known issue in DSS 3.5.0. The related JIRA can be found from here. This is fixed and the fix will be available in the upcoming release 3.5.1. The planned date for the 3.5.1 release is mid of July 2016. Please note that this can be changed due to certain circumstances.

Related

upgrade to WSO2 EI-6.5.0 from 6.4.0 causing org_apache_tomcat_websocket] error

I tried to upgrade WSO2 EI to 6.5.0 from 6.4.0 and tried to Start server. The following error occurs and server is not up. How can I find reference to org_apache_tomcat_websocket ?Everything works fine when I revert back to 6.4.0
[2021-01-21 06:59:26,908] [] ERROR - ContainerBase A child container failed during start
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/]]
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:192)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1243)
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:819)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1707)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1697)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:162)
... 6 more
Caused by: java.lang.IllegalArgumentException: More than one fragment with the name [org_apache_tomcat_websocket] was found. This is not legal with relative ordering. See section 8.2.2 2c of the Servlet specification for details. Consider using absolute ordering.
at org.apache.catalina.deploy.WebXml.orderWebFragments(WebXml.java:2338)
at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1268)
at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:881)
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:388)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5590)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
... 6 more
[2021-01-21 06:59:26,939] [] ERROR - ContainerBase A child container failed during start
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost]]
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:192)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1243)
at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:300)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
at org.wso2.carbon.tomcat.ext.service.ExtendedStandardService.startInternal(ExtendedStandardService.java:49)
Thanks for the help.

pipeline-aws-plugin of cfnUpdate trows WaiterUnrecoverableException

When trying to run cfnUpdate of pipeline-aws-plugin I get WaiterUnrecoverableException, but when creating the stack by the Amazon console it is created without problem
Details:
Version Pipeline: AWS Steps 1.27
I'm trying to execute:
cfnUpdate(stack:"${stack}", url:"${urlTemplate}", params: 'roleName':"${roleName}",'bucket':"${bucket}",'pathS3':"${pathS3}",'handler':"${handler}"],timeoutInMinutes:10)
Where
${stack} is a number of the stack
${urlTemplate} is a link to a template saved at S3
And throws in the Jenkins log:
com.amazonaws.waiters.WaiterUnrecoverableException: Resource never entered the desired state as it failed.
at com.amazonaws.waiters.WaiterExecution.pollResource(WaiterExecution.java:78)
at com.amazonaws.waiters.WaiterImpl.run(WaiterImpl.java:88)
at com.amazonaws.waiters.WaiterImpl$1.call(WaiterImpl.java:110)
at com.amazonaws.waiters.WaiterImpl$1.call(WaiterImpl.java:106)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused: java.util.concurrent.ExecutionException
at org.apache.http.concurrent.BasicFuture.getResult(BasicFuture.java:71)
at org.apache.http.concurrent.BasicFuture.get(BasicFuture.java:84)
at de.taimos.pipeline.aws.cloudformation.EventPrinter.waitAndPrintEvents(EventPrinter.java:135)
at de.taimos.pipeline.aws.cloudformation.EventPrinter.waitAndPrintStackEvents(EventPrinter.java:92)
at de.taimos.pipeline.aws.cloudformation.CloudFormationStack.create(CloudFormationStack.java:119)
at de.taimos.pipeline.aws.cloudformation.CFNUpdateStep$Execution.whenStackMissing(CFNUpdateStep.java:125)
at de.taimos.pipeline.aws.cloudformation.AbstractCFNCreateStep$Execution$1.run(AbstractCFNCreateStep.java:137)
As a reference, my template is similar to:
Cloudformation Template
Maybe someone can help me with this or recommend me some adjustment?
regards
You are closing the "params" array, but you are not opening it. Try this:
cfnUpdate(stack:"${stack}", url:"${urlTemplate}", params: ['roleName':"${roleName}",'bucket':"${bucket}",'pathS3':"${pathS3}",'handler':"${handler}"],timeoutInMinutes:10)

SSOFilter java.lang.NullPointerException

I have created sample sso wso2 program with help of existing code which I have downloaded from wso2 website and follow the same steps. But when I am executing my programm I am getting error
SEVERE: Exception starting filter SSOFilter
java.lang.NullPointerException at
org.wso2.carbon.identity.sso.agent.util.SSOAgentConfigs.isSAMLSSOLoginEnabled(SSOAgentConfigs.java:345)
at
org.wso2.carbon.identity.sso.agent.util.SSOAgentConfigs.initCheck(SSOAgentConfigs.java:222)
at
org.wso2.carbon.identity.sso.agent.SSOAgentFilter.init(SSOAgentFilter.java:53)
at
org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:279)
at
org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:260)
at
org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:105)
at
org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4854)
at
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5546)
at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1575)
at
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1565)
at java.util.concurrent.FutureTask.run(FutureTask.java:262) at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Thre
As per the source I referred, there isn't way of throwing NPE from that line since it have following code,
public static boolean isSAMLSSOLoginEnabled() {
return samlSSOLoginEnabled;
}
And I found this matching lines in older v1.2.0 of org.wso2.carbon.identity.sso.agent component [1].
So in order to resolve the issue, you need to find the correct source of the relevant jar, debug the flow and need to check exactly which variable it use a null reference to access something.
If you find difficulty finding a source of a relevant component, raise a separate question mentioning the versions you are looking for.
[1] https://svn.wso2.org/repos/wso2/carbon/platform/branches/turing/components/identity/org.wso2.carbon.identity.sso.agent/1.2.0/src/main/java/org/wso2/carbon/identity/sso/agent/util/SSOAgentConfigs.java
HTH,
DarRay

Camunda Example clarification

Am new to Camunda when am developing the camunda process flow in usertask am assign the assignee through properties but it not assign to particular user.
and am worked on ubuntu 14.0.4 and camunda with BPMN 2.0 first example am trying.
Can any one help me? And one more clarification if we are create the Html forms and its also not reflect when we start the process with credentials demo/demo and when include the service task binding with class in .bpmn file
and am facing the following error in tomcat log file:
I am working on following environment:
OS:ubuntu14.0.4
Eclipse:Luna
jdk:1.8
tomcat:7
Camunda:Camunda BPM platform v7.3.0.
am trying to execute the following example
"https://docs.camunda.org/get-started/bpmn20/deploy/"
and this is my bpmn file:
SequenceFlow_1
SequenceFlow_7
SequenceFlow_1
SequenceFlow_7
SequenceFlow_8
SequenceFlow_8
SEVERE: Exception sending context initialized event to listener instance of class org.camunda.bpm.getstarted.loanapproval.LoanApprovalApplication
org.camunda.bpm.engine.ProcessEngineException: Exception while performing 'Deployment of Process Application Loan Approval App => Deployment of process archive 'loan-approval': One of the attributes 'class', 'delegateExpression', 'type', or 'expression' is mandatory on serviceTask. | loan-approval.bpmn | line 17 | column 150
at org.camunda.bpm.container.impl.spi.DeploymentOperation.execute(DeploymentOperation.java:134)
at org.camunda.bpm.container.impl.jmx.MBeanServiceContainer.executeDeploymentOperation(MBeanServiceContainer.java:148)
at org.camunda.bpm.container.impl.spi.DeploymentOperation$DeploymentOperationBuilder.execute(DeploymentOperation.java:209)
at org.camunda.bpm.container.impl.RuntimeContainerDelegateImpl.deployProcessApplication(RuntimeContainerDelegateImpl.java:87)
at org.camunda.bpm.application.AbstractProcessApplication.deploy(AbstractProcessApplication.java:51)
at org.camunda.bpm.application.impl.ServletProcessApplication.contextInitialized(ServletProcessApplication.java:131)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5014)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5528)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1095)
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1930)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.camunda.bpm.engine.ProcessEngineException: One of the attributes 'class', 'delegateExpression', 'type', or 'expression' is mandatory on serviceTask. | loan-approval.bpmn | line 17 | column 150
at org.camunda.bpm.engine.impl.util.xml.Parse.throwExceptionForErrors(Parse.java:188)
at org.camunda.bpm.engine.impl.bpmn.parser.BpmnParse.execute(BpmnParse.java:267)
at org.camunda.bpm.engine.impl.bpmn.deployer.BpmnDeployer.deploy(BpmnDeployer.java:105)
at org.camunda.bpm.engine.impl.persistence.deploy.DeploymentCache$1.call(DeploymentCache.java:62)
at org.camunda.bpm.engine.impl.persistence.deploy.DeploymentCache$1.call(DeploymentCache.java:59)
at org.camunda.bpm.engine.impl.interceptor.CommandContext.runWithoutAuthorization(CommandContext.java:485)
at org.camunda.bpm.engine.impl.persistence.deploy.DeploymentCache.deploy(DeploymentCache.java:59)
at org.camunda.bpm.engine.impl.persistence.entity.DeploymentManager.insertDeployment(DeploymentManager.java:47)
at org.camunda.bpm.engine.impl.cmd.DeployCmd.deploy(DeployCmd.java:177)
at org.camunda.bpm.engine.impl.cmd.DeployCmd$1.call(DeployCmd.java:93)
at org.camunda.bpm.engine.impl.cmd.DeployCmd$1.call(DeployCmd.java:82)
at org.camunda.bpm.engine.impl.interceptor.CommandContext.runWithoutAuthorization(CommandContext.java:485)
The new Camunda Modeler produces BPMN models that require Camunda version >= 7.4.0, 7.3.3, 7.2.6 to run (see https://docs.camunda.org/manual/latest/modeler/).
The reason is that the namespace for Camunda extension elements and attributes has changed from http://activiti.org/bpmn to http://camunda.org/schema/1.0/bpmn. The new modeler produces models that use the new namespace and that can therefore not be executed on Camunda platform versions that don't support it. Assuming that you use this modeler, you'll have to upgrade Camunda.
As an alternative, you can use the deprecated Eclipse plugin. Again, make sure to choose the correct version that works with 7.3.0.

How to invoke metro web services in weblogic 10.3.5?

I have two web applications (bot of them ear files) deployed on the weblogic server. One of them is a web service application and the other is a web service client.
METRO is used for the web services. The web service application is running properly.
When I try to deploy the web service client application, I am getting the following error.
<Dec 14, 2011 9:51:25 AM GMT+05:30> <Error> <WLSS.Setup> <BEA-331210> <Skip SIP related logic, because error occurs when parsing sip related annotatio
ns of "DIMeX2"
com.bea.wcp.sip.engine.server.setup.SipAnnotationParsingException:
at com.bea.wcp.sip.engine.server.setup.SipAnnotationData.<init>(SipAnnotationData.java:146)
at com.bea.wcp.sip.util.DeploymentUtil.getOrCreateAnnotationData(DeploymentUtil.java:70)
at com.bea.wcp.sip.util.DeploymentUtil.isSipModule(DeploymentUtil.java:96)
at com.bea.wcp.sip.engine.server.SipServerTailModule$1.visit(SipServerTailModule.java:127)
at com.bea.wcp.sip.engine.server.SipServerTailModule.visitAllContexts(SipServerTailModule.java:112)
Truncated. see log file for complete stacktrace
Caused By: java.lang.IncompatibleClassChangeError: class com.sun.codemodel.writer.FilterCodeWriter has interface com.sun.codemodel.CodeWriter as super
class
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(Unknown Source)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at weblogic.utils.classloaders.GenericClassLoader.defineClass(GenericClassLoader.java:343)
Truncated. see log file for complete stacktrace
>
log4j:WARN No appenders could be found for logger (org.springframework.web.context.ContextLoader).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
<Dec 14, 2011 9:51:26 AM GMT+05:30> <Error> <HTTP> <BEA-101216> <Servlet: "dimex" failed to preload on startup in Web application: "/DIMeX2".
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.web.servlet.mvc.annotation.DefaultAnnotati
onHandlerMapping#0': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean w
ith name 'auditLogController': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException
: Could not autowire field: com.dimex.services.UserService com.dimex.controllers.AuditLogController.userService; nested exception is org.springframewo
rk.beans.factory.BeanCreationException: Error creating bean with name 'userService': Injection of resource dependencies failed; nested exception is or
g.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.dimex.services.client.UserServiceWS_Service]: Constructor th
rew exception; nested exception is java.util.ServiceConfigurationError: javax.xml.ws.spi.Provider: Provider com.sun.xml.ws.spi.ProviderImpl could not
be instantiated: java.lang.ExceptionInInitializerError
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:527)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
Truncated. see log file for complete stacktrace
Caused By: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'auditLogController': Injection of autowired depende
ncies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: com.dimex.services.UserService co
m.dimex.controllers.AuditLogController.userService; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean w
ith name 'userService': Injection of resource dependencies failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not
instantiate bean class [com.dimex.services.client.UserServiceWS_Service]: Constructor threw exception; nested exception is java.util.ServiceConfigura
tionError: javax.xml.ws.spi.Provider: Provider com.sun.xml.ws.spi.ProviderImpl could not be instantiated: java.lang.ExceptionInInitializerError
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProc
essor.java:285)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1074)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
Truncated. see log file for complete stacktrace
Caused By: org.springframework.beans.factory.BeanCreationException: Could not autowire field: com.dimex.services.UserService com.dimex.controllers.Aud
itLogController.userService; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userService':
Injection of resource dependencies failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class
[com.dimex.services.client.UserServiceWS_Service]: Constructor threw exception; nested exception is java.util.ServiceConfigurationError: javax.xml.ws
.spi.Provider: Provider com.sun.xml.ws.spi.ProviderImpl could not be instantiated: java.lang.ExceptionInInitializerError
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostP
rocessor.java:502)
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:84)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProc
essor.java:282)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1074)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
Truncated. see log file for complete stacktrace
Caused By: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userService': Injection of resource dependencies fa
iled; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.dimex.services.client.UserServic
eWS_Service]: Constructor threw exception; nested exception is java.util.ServiceConfigurationError: javax.xml.ws.spi.Provider: Provider com.sun.xml.ws
.spi.ProviderImpl could not be instantiated: java.lang.ExceptionInInitializerError
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessPropertyValues(CommonAnnotationBeanPostProcessor.java:3
00)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1074)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
Truncated. see log file for complete stacktrace
Caused By: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.dimex.services.client.UserServiceWS_Service]: C
onstructor threw exception; nested exception is java.util.ServiceConfigurationError: javax.xml.ws.spi.Provider: Provider com.sun.xml.ws.spi.ProviderIm
pl could not be instantiated: java.lang.ExceptionInInitializerError
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:141)
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:104)
at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor$WebServiceRefElement.getResourceToInject(CommonAnnotationBeanPostP
rocessor.java:627)
at org.springframework.beans.factory.annotation.InjectionMetadata$InjectedElement.inject(InjectionMetadata.java:147)
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:84)
Truncated. see log file for complete stacktrace
Caused By: java.util.ServiceConfigurationError: javax.xml.ws.spi.Provider: Provider com.sun.xml.ws.spi.ProviderImpl could not be instantiated: java.la
ng.ExceptionInInitializerError
at java.util.ServiceLoader.fail(Unknown Source)
at java.util.ServiceLoader.access$100(Unknown Source)
at java.util.ServiceLoader$LazyIterator.next(Unknown Source)
at java.util.ServiceLoader$1.next(Unknown Source)
at javax.xml.ws.spi.Provider.getProviderUsingServiceLoader(Provider.java:146)
Truncated. see log file for complete stacktrace
Caused By: java.lang.ExceptionInInitializerError
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at java.util.ServiceLoader$LazyIterator.next(Unknown Source)
at java.util.ServiceLoader$1.next(Unknown Source)
at javax.xml.ws.spi.Provider.getProviderUsingServiceLoader(Provider.java:146)
Truncated. see log file for complete stacktrace
Caused By: javax.xml.ws.WebServiceException: Error creating JAXBContext for W3CEndpointReference.
at com.sun.xml.ws.spi.ProviderImpl$2.run(ProviderImpl.java:261)
at com.sun.xml.ws.spi.ProviderImpl$2.run(ProviderImpl.java:257)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.xml.ws.spi.ProviderImpl.getEPRJaxbContext(ProviderImpl.java:256)
at com.sun.xml.ws.spi.ProviderImpl.<clinit>(ProviderImpl.java:90)
Truncated. see log file for complete stacktrace
Caused By: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 2 counts of IllegalAnnotationExceptions
Two classes have the same XML type name "address". Use #XmlType.name and #XmlType.namespace to assign different names to them.
this problem is related to the following location:
at com.sun.xml.ws.developer.MemberSubmissionEndpointReference$Address
at public com.sun.xml.ws.developer.MemberSubmissionEndpointReference$Address com.sun.xml.ws.developer.MemberSubmissionEndpointReferenc
e.addr
at com.sun.xml.ws.developer.MemberSubmissionEndpointReference
this problem is related to the following location:
at javax.xml.ws.wsaddressing.W3CEndpointReference$Address
at private javax.xml.ws.wsaddressing.W3CEndpointReference$Address javax.xml.ws.wsaddressing.W3CEndpointReference.address
at javax.xml.ws.wsaddressing.W3CEndpointReference
Two classes have the same XML type name "elements". Use #XmlType.name and #XmlType.namespace to assign different names to them.
this problem is related to the following location:
at com.sun.xml.ws.developer.MemberSubmissionEndpointReference$Elements
at public com.sun.xml.ws.developer.MemberSubmissionEndpointReference$Elements com.sun.xml.ws.developer.MemberSubmissionEndpointReferen
ce.referenceProperties
at com.sun.xml.ws.developer.MemberSubmissionEndpointReference
this problem is related to the following location:
at javax.xml.ws.wsaddressing.W3CEndpointReference$Elements
at private javax.xml.ws.wsaddressing.W3CEndpointReference$Elements javax.xml.ws.wsaddressing.W3CEndpointReference.referenceParameters
at javax.xml.ws.wsaddressing.W3CEndpointReference
at com.sun.xml.bind.v2.runtime.IllegalAnnotationsException$Builder.check(IllegalAnnotationsException.java:102)
at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.java:472)
at com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:302)
at com.sun.xml.bind.v2.runtime.JAXBContextImpl$JAXBContextBuilder.build(JAXBContextImpl.java:1140)
at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:154)
Truncated. see log file for complete stacktrace
>
I cant figure out what I am doing wrong especially when I am able to run the web service application with METRO in it properly.
I have spent like days on it with no solution.
Please help.
First of all you have
Caused By: java.lang.IncompatibleClassChangeError: class
com.sun.codemodel.writer.FilterCodeWriter has interface
com.sun.codemodel.CodeWriter as super class
This looks like you have several versions of the same library on classpath.
com.sun.codemodel belongs to JAXB. Ensure that JAXB api and implementation jars' versions match. Remove obsolete doubles if any (including the JAXB bundled with WebLogic).
Also check that all jaxb, jax-ws and wsit jars match the versions of the latest metro release.
This can resolve the next exceptions too.
If not, continue further.
Secondly you have this relevant quote form stacktrace:
Caused By: javax.xml.ws.WebServiceException: Error creating
JAXBContext for W3CEndpointReference.
at com.sun.xml.ws.spi.ProviderImpl$2.run(ProviderImpl.java:261)
Caused By: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 2 counts of
IllegalAnnotationExceptions Two classes have the same XML type name
"address". Use #XmlType.name and #XmlType.namespace to assign different names to them.
this problem is related to the following location:
at com.sun.xml.ws.developer.MemberSubmissionEndpointReference$Address
at public com.sun.xml.ws.developer.MemberSubmissionEndpointReference$Address
com.sun.xml.ws.developer.MemberSubmissionEndpointReference.addr
at com.sun.xml.ws.developer.MemberSubmissionEndpointReference
this problem is related to the following location:
at javax.xml.ws.wsaddressing.W3CEndpointReference$Address
at private javax.xml.ws.wsaddressing.W3CEndpointReference$Address
javax.xml.ws.wsaddressing.W3CEndpointReference.address
at javax.xml.ws.wsaddressing.W3CEndpointReference
This means that somehow both classes W3CEndpointReference and MemberSubmissionEndpointReference participate in creation of the same JAXBContext under the same namespace.
Actually these classes have different NSes in code as can be seen at the end of the above links.
Examine client's wsdl if it has both xmlns:samens="http://schemas.xmlsoap.org/ws/2004/08/addressing" and xmlns:samens="http://www.w3.org/2005/08/addressing".
Experiment to remove notion of "http://schemas.xmlsoap.org/ws/2004/08/addressing" at all.
If nothing helps you can debug it with metro sources. It can be even a bug in jaxb or metro.
But more likely the cause is in an old namespace-unaware version of JAXB that sneaked in classpath.