Bug 1306309 - REST endpoints do not work on WebLogic 12c R2
REST endpoints do not work on WebLogic 12c R2
Product: JBoss BPMS Platform 6
Classification: JBoss
Component: Business Central (Show other bugs)
Unspecified Unspecified
urgent Severity urgent
: ---
: ---
Assigned To: Marco Rietveld
Tomas Livora
: TestBlocker
Depends On:
  Show dependency treegraph
Reported: 2016-02-10 09:24 EST by Tomas Livora
Modified: 2016-09-20 01:06 EDT (History)
10 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2016-03-21 07:49:45 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
WebLogic Server log (151.83 KB, text/plain)
2016-02-10 09:24 EST, Tomas Livora
no flags Details
WebLogic 12.1 REST response (5.44 KB, text/plain)
2016-03-02 09:27 EST, Tomas Livora
no flags Details
WebLogic 12.1 server log (98.48 KB, text/plain)
2016-03-02 09:38 EST, Tomas Livora
no flags Details

  None (edit)
Description Tomas Livora 2016-02-10 09:24:54 EST
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):
6.3.0 DR1

Steps to Reproduce:
1. Deploy business-central.war on WebLogic 12c R2
2. Try to access any REST endpoint

Actual results:
Not Found

Expected results:
Correct results according to the URL used.

Additional info:
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:

Comment 1 Maciej Swiderski 2016-02-24 09:44:32 EST
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
Comment 2 Marco Rietveld 2016-03-02 06:53:08 EST
https://java.net/jira/browse/JERSEY-1116 seems to imply that this *might* be a jersey(/weblogic) issue..
Comment 3 Marco Rietveld 2016-03-02 07:32:01 EST
Tomas, could you verify that this does *NOT* happen on weblogic 12.1?
Comment 4 Tomas Livora 2016-03-02 09:27 EST
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.
Comment 5 Marco Rietveld 2016-03-02 09:31:44 EST
It looks like the latest issue (12.1 REST response) can be fixed by adding Jersey 1.8 to the war. 

Comment 6 Tomas Livora 2016-03-02 09:38 EST
Created attachment 1132357 [details]
WebLogic 12.1 server log

Here you can see incomplete server log.
Comment 7 Marco Rietveld 2016-03-07 09:04:04 EST
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.
Comment 8 Lukáš Petrovický 2016-03-07 09:16:29 EST
(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?
Comment 11 Tomas Livora 2016-03-17 09:19:46 EDT
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.
Comment 13 Marco Rietveld 2016-03-21 08:01:19 EDT
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

Note You need to log in before you can comment on or make changes to this bug.