Red Hat Bugzilla – Bug 1306309
REST endpoints do not work on WebLogic 12c R2
Last modified: 2016-09-20 01:06:23 EDT
Created attachment 1122815 [details]
WebLogic Server log
Description of problem:
It is not possible to access any REST endpoint when you deploy the application on WebLogic 12.2.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Deploy business-central.war on WebLogic 12c R2
2. Try to access any REST endpoint
Correct results according to the URL used.
This issue is not only reproducible on BPM Suite 6.3 but can also be found when using 6.2.0 GA. We noticed it when WebLogic was updated from 12.1 to 12.2. It is probably caused by Jersey version update:
just by quickly going through log attached this seems to be the root cause:
"HINT: A resource model has ambiguous (sub-)resource method for HTTP method POST and output mime-types as defined by @Produces annotation at Java methods public javax.ws.rs.core.Response org.kie.remote.services.rest.DeploymentResourceImpl.deploy() and public javax.ws.rs.core.Response org.kie.remote.services.rest.DeploymentResourceImpl.deploy(org.kie.services.client.serialization.jaxb.impl.deploy.JaxbDeploymentDescriptor) at matching path pattern /deploy."
although haven't tried it myself as I don't have latest WLS locally yet
https://java.net/jira/browse/JERSEY-1116 seems to imply that this *might* be a jersey(/weblogic) issue..
Tomas, could you verify that this does *NOT* happen on weblogic 12.1?
Created attachment 1132356 [details]
WebLogic 12.1 REST response
Marco, I have just tested BPM Suite 6.3.0 DR2 on WebLogic 12.1 and there seems to be an issue caused by Jersey. See the attached exception stack.
It looks like the latest issue (12.1 REST response) can be fixed by adding Jersey 1.8 to the war.
Created attachment 1132357 [details]
WebLogic 12.1 server log
Here you can see incomplete server log.
I've submitted a PR for this and BZ-1314445:
However, this PR means that there is a very slight loss of functionality:
When doing the following REST call, users may now need to set additional parameters depending on the application server used:
There was a change added in september 2015 that allowed users to use this operation without having to add a header specifying that the (POST) content was empty.
The fix for this issue is to remove that change.
*However*, there seem to be additional problems besides this that prevent kie-wb from working well on weblogic 12.2.
(In reply to Marco Rietveld from comment #7)
> *However*, there seem to be additional problems besides this that prevent
> kie-wb from working well on weblogic 12.2.
Could you please elaborate? Is this something we can still do something about?
The bug is still present in BPM Suite 6.3.0 ER1. However, I think I have found the root cause. You can see this in the very first server log attached to this BZ:
WARNING: The following warnings have been detected: WARNING: Parameter projectService of type org.guvnor.common.services.project.service.ProjectService<? extends org.guvnor.common.services.project.model.Project> from private org.guvnor.common.services.project.service.ProjectService<? extends org.guvnor.common.services.project.model.Project> org.guvnor.common.services.builder.IncrementalBuilderExecutorManagerFactoryImpl.projectService is not resolvable to a concrete type.
And you can find more similar warnings in the server log. It is a problem we discussed a few weeks ago during our e-mail conversation. Back then somebody suggested wildcard injection points may cause problems on WebSphere but the tests passed on this container and we were all happy. However, it seems that the problematic container is WebLogic instead. And only the latest version 12.2 since the tests passed on 12.1.
For the curious: A link to the Oracle documentation about Java EE 7 support in WLS 12.2.1: https://docs.oracle.com/middleware/1221/wls/NOTES/whatsnew.htm#NOTES379