Bug 1306309 - REST endpoints do not work on WebLogic 12c R2
Summary: REST endpoints do not work on WebLogic 12c R2
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: JBoss BPMS Platform 6
Classification: Retired
Component: Business Central
Version: 6.3.0
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: ---
: ---
Assignee: Marco Rietveld
QA Contact: Tomas Livora
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-02-10 14:24 UTC by Tomas Livora
Modified: 2016-09-20 05:06 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-03-21 11:49:45 UTC
Type: Bug
Embargoed:


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


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1314445 0 urgent CLOSED REST endpoints do not work on WebLogic 12c R1 2021-02-22 00:41:40 UTC

Internal Links: 1314445

Description Tomas Livora 2016-02-10 14:24:54 UTC
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:

https://docs.oracle.com/middleware/1221/wls/NOTES/whatsnew.htm

Comment 1 Maciej Swiderski 2016-02-24 14:44:32 UTC
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 11:53:08 UTC
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 12:32:01 UTC
Tomas, could you verify that this does *NOT* happen on weblogic 12.1?

Comment 4 Tomas Livora 2016-03-02 14:27:14 UTC
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 14:31:44 UTC
It looks like the latest issue (12.1 REST response) can be fixed by adding Jersey 1.8 to the war. 

https://blogs.oracle.com/brunoborges/entry/issue_dev_ing_restful_json

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

Here you can see incomplete server log.

Comment 7 Marco Rietveld 2016-03-07 14:04:04 UTC
I've submitted a PR for this and BZ-1314445:

https://github.com/droolsjbpm/droolsjbpm-integration/pull/347

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: 

../rest/deployment/{deploymentId}/deploy 

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 14:16:29 UTC
(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 13:19:46 UTC
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 12:01:19 UTC
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.