Error "Unable to Create Jaxbcontext" Occurs When Calling "JobService.getJobPort" (Doc ID 2297410.1)

Last updated on SEPTEMBER 15, 2017

Applies to:

Primavera P6 Enterprise Project Portfolio Management Cloud Service - Version 16.2.2.0 and later
Information in this document applies to any platform.

Symptoms

On Unifier : Version 16.2.2.0

When attempting to schedule a project via P6 web services,
the following error occurs.

ERROR
-----------------------
2017-03-26 20:25:10 [main] ERROR c.n.p.p.w.s.CreateProjectWebService -
javax.xml.ws.WebServiceException: Unable to create JAXBContext
javax.xml.ws.WebServiceException: Unable to create JAXBContext
at com.sun.xml.internal.ws.model.AbstractSEIModelImpl.createJAXBContext(AbstractSEIModelImpl.java:156)
at com.sun.xml.internal.ws.model.AbstractSEIModelImpl.postProcess(AbstractSEIModelImpl.java:84)
at com.sun.xml.internal.ws.model.RuntimeModeler.buildRuntimeModel(RuntimeModeler.java:234)
at com.sun.xml.internal.ws.client.WSServiceDelegate.createSEIPortInfo(WSServiceDelegate.java:673)
at com.sun.xml.internal.ws.client.WSServiceDelegate.addSEI(WSServiceDelegate.java:661)
at com.sun.xml.internal.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:330)
at com.sun.xml.internal.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:313)
at com.sun.xml.internal.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:295)
at javax.xml.ws.Service.getPort(Service.java:119)
at com.primavera.ws.p6.job.JobService.getJobPort(JobService.java:62)
at com.nyumc.primavera.p6.ws.service.JobServices.createJobServicePort(JobServices.java:39)
at com.nyumc.primavera.p6.ws.service.JobServices.scheduleProject(JobServices.java:49)
at com.nyumc.primavera.p6.ws.service.CreateProjectWebService.createProject(CreateProjectWebService.java:266)
at com.nyumc.primavera.p6.ws.service.WebService.createProject(WebService.java:91)
at com.nyumc.primavera.p6.ws.task.CreateProjectTask.execute(CreateProjectTask.java:228)
at org.springframework.batch.core.step.tasklet.TaskletStep$ChunkTransactionCallback.doInTransaction(TaskletStep.java:406)
at org.springframework.batch.core.step.tasklet.TaskletStep$ChunkTransactionCallback.doInTransaction(TaskletStep.java:330)
at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:133)
at org.springframework.batch.core.step.tasklet.TaskletStep$2.doInChunkContext(TaskletStep.java:271)
at org.springframework.batch.core.scope.context.StepContextRepeatCallback.doInIteration(StepContextRepeatCallback.java:81)
at org.springframework.batch.repeat.support.RepeatTemplate.getNextResult(RepeatTemplate.java:374)
at org.springframework.batch.repeat.support.RepeatTemplate.executeInternal(RepeatTemplate.java:215)
at org.springframework.batch.repeat.support.RepeatTemplate.iterate(RepeatTemplate.java:144)
at org.springframework.batch.core.step.tasklet.TaskletStep.doExecute(TaskletStep.java:257)
at org.springframework.batch.core.step.AbstractStep.execute(AbstractStep.java:200)
at org.springframework.batch.core.job.SimpleStepHandler.handleStep(SimpleStepHandler.java:148)
at org.springframework.batch.core.job.flow.JobFlowExecutor.executeStep(JobFlowExecutor.java:64)
at org.springframework.batch.core.job.flow.support.state.StepState.handle(StepState.java:67)
at org.springframework.batch.core.job.flow.support.SimpleFlow.resume(SimpleFlow.java:169)
at org.springframework.batch.core.job.flow.support.SimpleFlow.start(SimpleFlow.java:144)
at org.springframework.batch.core.job.flow.FlowJob.doExecute(FlowJob.java:134)
at org.springframework.batch.core.job.AbstractJob.execute(AbstractJob.java:306)
at org.springframework.batch.core.launch.support.SimpleJobLauncher$1.run(SimpleJobLauncher.java:135)
at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:50)
at org.springframework.batch.core.launch.support.SimpleJobLauncher.run(SimpleJobLauncher.java:128)
at com.nyumc.primavera.p6.ws.entrypoint.EntryPoint.main(EntryPoint.java:60)
Caused by: java.security.PrivilegedActionException: com.sun.xml.internal.bind.v2.runtime.IllegalAnnotationsException: 2 counts of IllegalAnnotationExceptions
javax.xml.ws.Response is an interface, and JAXB can't handle interfaces.
this problem is related to the following location:
at javax.xml.ws.Response
at public javax.xml.ws.Response com.primavera.ws.p6.job.jaxws.GetCurrentJobsAsyncResponse._return
at com.primavera.ws.p6.job.jaxws.GetCurrentJobsAsyncResponse
Two classes have the same XML type name "{http://xmlns.oracle.com/Primavera/P6/WS/Job/V2}GetCurrentJobsResponse". Use @XmlType.name and @XmlType.namespace to assign different names to them.
this problem is related to the following location:
at com.primavera.ws.p6.job.GetCurrentJobsResponse
at public javax.xml.bind.JAXBElement com.primavera.ws.p6.job.ObjectFactory.createGetCurrentJobsResponse(com.primavera.ws.p6.job.GetCurrentJobsResponse)
at com.primavera.ws.p6.job.ObjectFactory
this problem is related to the following location:
at com.primavera.ws.p6.job.jaxws.GetCurrentJobsAsyncResponse

at java.security.AccessController.doPrivileged(Native Method)
at com.sun.xml.internal.ws.model.AbstractSEIModelImpl.createJAXBContext(AbstractSEIModelImpl.java:143)
... 35 more
Caused by: com.sun.xml.internal.bind.v2.runtime.IllegalAnnotationsException: 2 counts of IllegalAnnotationExceptions
javax.xml.ws.Response is an interface, and JAXB can't handle interfaces.
this problem is related to the following location:
at javax.xml.ws.Response
at public javax.xml.ws.Response com.primavera.ws.p6.job.jaxws.GetCurrentJobsAsyncResponse._return
at com.primavera.ws.p6.job.jaxws.GetCurrentJobsAsyncResponse
Two classes have the same XML type name "{http://xmlns.oracle.com/Primavera/P6/WS/Job/V2}GetCurrentJobsResponse". Use @XmlType.name and @XmlType.namespace to assign different names to them.
this problem is related to the following location:
at com.primavera.ws.p6.job.GetCurrentJobsResponse
at public javax.xml.bind.JAXBElement com.primavera.ws.p6.job.ObjectFactory.createGetCurrentJobsResponse(com.primavera.ws.p6.job.GetCurrentJobsResponse)
at com.primavera.ws.p6.job.ObjectFactory
this problem is related to the following location:
at com.primavera.ws.p6.job.jaxws.GetCurrentJobsAsyncResponse

at com.sun.xml.internal.bind.v2.runtime.IllegalAnnotationsException$Builder.check(IllegalAnnotationsException.java:91)
at com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.java:442)
at com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl.(JAXBContextImpl.java:274)
at com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl.(JAXBContextImpl.java:125)
at com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl$JAXBContextBuilder.build(JAXBContextImpl.java:1127)
at com.sun.xml.internal.bind.v2.ContextFactory.createContext(ContextFactory.java:173)
at com.sun.xml.internal.bind.api.JAXBRIContext.newInstance(JAXBRIContext.java:95)
at com.sun.xml.internal.ws.developer.JAXBContextFactory$1.createJAXBContext(JAXBContextFactory.java:98)
at com.sun.xml.internal.ws.model.AbstractSEIModelImpl$1.run(AbstractSEIModelImpl.java:151)
at com.sun.xml.internal.ws.model.AbstractSEIModelImpl$1.run(AbstractSEIModelImpl.java:143)
... 37 more


STEPS
-----------------------
The issue can be reproduced at will with the following steps:
1. Run the P6 project schedule web services API to schedule a project.

BUSINESS IMPACT
-----------------------
The issue has the following business impact:
Due to this issue, users cannot schedule a project via P6 web services.

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms