I have a Webservice implemented with jwsc for Weblogic 12c. It's a WAR file. The classes for the various beans used for the parameters and returns are added with the standard maven plugin, and everything looks OK.
It compiles and packages OK. But any attempt to deploy it gets "Unable to invoke Annotation processoror" (yes, spelt wrong) from the Admin console.
The stacktrace is below, but really doesn't provide much of a hint. I've searched for other questions/answers but have come up blank.
The supporting classes were originally generated with xjc and so had many annotations. I removed those in case that was the issue, but no change. So the only annotations are in the WS implementation class:
@WebService(name = "MyServicePortType", serviceName = "MyService", targetNamespace = "http://test/wsdl/getInfo/v1")
@WLHttpTransport(contextPath = "my-nbi", serviceUri = "/MyService")
@SOAPBinding(style = SOAPBinding.Style.DOCUMENT, use = SOAPBinding.Use.LITERAL)
public class MyServiceImpl implements OPLService {
There's just a single dependency in the POM:
<dependency>
<groupId>com.oracle</groupId>
<artifactId>wls-api</artifactId>
<version>12.2.1</version>
<type>jar</type>
</dependency>
Possibly connected is that if I try to generate as a JAXWS web service (type="JAXWS"
rather than type="JAXRPC"
in the args to jwsc) that fails with:
error: Annotation processor 'com.sun.tools.ws.processor.modeler.annotation.WebServiceAp' not found
I've tried adding jars with that class (there are several supplied with weblogic) to the JWSC classpath but with no success (nothing seemed to change at all).
Any ideas on what to try next?
EDIT: One thing I missed was that WL seems to like its SOAP web services as an EAR (containing the WAR). I tried that but still got the error.
I then did what should have done earlier and started with the sample from the documentation (which uses ANT rather than maven, but builds an EAR). That worked, and I've slowly modified that towards the web service I actually need. When I've done, I'll try to work out what the differences are.
<Mar 20, 2022 11:55:57,636 AM UTC> <Error> <J2EE> <BEA-160228> <AppMerge failed to merge your application. If you are running AppMerge on the command-line, merge again with the -verbose option for more details. See the error message(s) below.>
weblogic.utils.compiler.ToolFailureException: Unable to invoke Annotation processoror
at weblogic.application.compiler.FlowDriver.handleStateChangeException(FlowDriver.java:55)
at weblogic.application.compiler.FlowDriver.nextState(FlowDriver.java:38)
at weblogic.application.compiler.AppMerge.runBody(AppMerge.java:168)
at weblogic.utils.compiler.Tool.run(Tool.java:159)
at weblogic.utils.compiler.Tool.run(Tool.java:116)
at weblogic.application.compiler.AppMerge.merge(AppMerge.java:198)
at weblogic.deploy.api.internal.utils.AppMerger.merge(AppMerger.java:94)
at weblogic.deploy.api.internal.utils.AppMerger.getMergedApp(AppMerger.java:58)
at weblogic.deploy.api.model.internal.WebLogicDeployableObjectFactoryImpl.createDeployableObject(WebLogicDeployableObjectFactoryImpl.java:186)
at weblogic.deploy.api.model.internal.WebLogicDeployableObjectFactoryImpl.createLazyDeployableObject(WebLogicDeployableObjectFactoryImpl.java:160)
at weblogic.deploy.api.tools.SessionHelper.inspect(SessionHelper.java:781)
at com.bea.console.actions.app.install.Flow$2.execute(Flow.java:541)
at com.bea.console.utils.DeploymentUtils.runDeploymentAction(DeploymentUtils.java:5787)
[Lots of console related entries removed]
Caused by: java.lang.AssertionError: Unable to invoke Annotation processoror
at weblogic.j2ee.wsee.compiler.WSEEModuleHelper.processAnnotations(WSEEModuleHelper.java:287)
at weblogic.j2ee.wsee.compiler.WSEEModuleHelper.processAnnotationsWithServiceLinks(WSEEModuleHelper.java:245)
at weblogic.j2ee.wsee.compiler.WSEEModuleHelper.processAnnotations(WSEEModuleHelper.java:178)
at weblogic.wsee.tools.WSEEWebAppToolsModuleExtension.processAnnotations(WSEEWebAppToolsModuleExtension.java:216)
at weblogic.wsee.tools.WSEEWebAppToolsModuleExtension.merge(WSEEWebAppToolsModuleExtension.java:109)
at weblogic.application.compiler.flow.SingleModuleMergeFlow.proecessModule(SingleModuleMergeFlow.java:33)
at weblogic.application.compiler.flow.SingleModuleFlow.compile(SingleModuleFlow.java:64)
at weblogic.application.compiler.FlowDriver$FlowStateChange.next(FlowDriver.java:70)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:45)
at weblogic.application.compiler.FlowDriver.nextState(FlowDriver.java:37)
at weblogic.application.compiler.BaseMerger.merge(BaseMerger.java:20)
at weblogic.application.compiler.flow.AppMergerFlow.mergeInput(AppMergerFlow.java:75)
at weblogic.application.compiler.flow.AppMergerFlow.compile(AppMergerFlow.java:40)
at weblogic.application.compiler.FlowDriver$FlowStateChange.next(FlowDriver.java:70)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:45)
at weblogic.application.compiler.FlowDriver.nextState(FlowDriver.java:37)
... 116 more