Bug 1280231 - lack of information to deploy kjar on WLS by REST API
lack of information to deploy kjar on WLS by REST API
Status: NEW
Product: JBoss BPMS Platform 6
Classification: JBoss
Component: Documentation (Show other bugs)
6.1.0
All Linux
medium Severity medium
: ---
: 6.2.0
Assigned To: brms-docs@redhat.com
Lukáš Petrovický
https://access.redhat.com/documentati...
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-11-11 04:50 EST by Hiroko Miura
Modified: 2016-01-08 16:58 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Build Name: 22824, Development Guide-6.1 Build Date: 30-07-2015 16:46:35 Topic ID: 26707-753596 [Latest]
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Hiroko Miura 2015-11-11 04:50:26 EST
Title: Deployment calls

Describe the issue:

When deploying kjar to business central on WLS by the following REST request fails with error 415(Unsupported Media Type) even though this is works against business central on EAP.

curl -v -H 'Accept: application/json' -u bpmsAdmin -X POST 'ldapj:7001/business-central/rest/deployment/com.sample:bpmstest:1.1:process:ksession-process/deploy'


Beacuse: 

 - header must be Content-Type as it the defines what type of data is coming in with the request, Accept is for what client can accept as response
 - WLS seems to be more strict to the content which in general is options 


The following REST request works for WLS then.

curl -v -H 'Content-Type: application/xml' -u bpmsAdmin --data "<deployment-descriptor/>"  -X POST 'ldapj:7001/business-central/rest/deployment/com.sample:bpmstest:1.1:process:ksession-process/deploy'

i.e.

-H 'Content-Type: application/xml'  is specified instead of Accept header

--data "<deployment-descriptor/>"  is specified as empty deployment structure which does not affect deployment structure in kjar (if any).
  


Suggestions for improvement:

Please clearly document about this requirement for REST API command  of 'deploy' against WLS.


Additional information:
Comment 1 Hiroko Miura 2015-11-12 03:46:17 EST
Previous problem description is not good. Let me recap here.

Describe the issue:

Deploying kjar to business central on WLS by the following REST request fails with error 415 (Unsupported Media Type) even though same command works against business central on EAP.

curl -v -H 'Accept: application/json' 
        -u bpmsAdmin 
        -X POST 'ldapj:7001/business-central/rest/deployment/com.sample:bpmstest:1.1:process:ksession-process/deploy'


Error in WLS server log.

####<Nov 4, 2015 6:28:11 PM JST> <Error> <com.sun.jersey.spi.container.ContainerRequest> <xxx.redhat.com> <AdminServer> <[ACTIVE] ExecuteThread: '6' for queue: 'weblogic.kernel.Default (self-tuning)'> <bpmsAdmin> <> <> <1446629291589> <BEA-000000> <A message body reader for Java class org.kie.services.client.serialization.jaxb.impl.deploy.JaxbDeploymentDescriptor, and Java type class org.kie.services.client.serialization.jaxb.impl.deploy.JaxbDeploymentDescriptor, and MIME media type application/octet-stream was not found. The registered message body readers compatible with the MIME media type are: application/octet-stream -> com.sun.jersey.core.impl.provider.entity.ByteArrayProvider com.sun.jersey.core.impl.provider.entity.FileProvider com.sun.jersey.core.impl.provider.entity.InputStreamProvider com.sun.jersey.core.impl.provider.entity.DataSourceProvider com.sun.jersey.core.impl.provider.entity.RenderedImageProvider */* -> com.sun.jersey.core.impl.provider.entity.FormProvider com.sun.jersey.core.impl.provider.entity.MimeMultipartProvider com.sun.jersey.core.impl.provider.entity.StringProvider com.sun.jersey.core.impl.provider.entity.ByteArrayProvider com.sun.jersey.core.impl.provider.entity.FileProvider com.sun.jersey.core.impl.provider.entity.InputStreamProvider com.sun.jersey.core.impl.provider.entity.DataSourceProvider com.sun.jersey.core.impl.provider.entity.XMLJAXBElementProvider$General com.sun.jersey.core.impl.provider.entity.ReaderProvider com.sun.jersey.core.impl.provider.entity.DocumentProvider com.sun.jersey.core.impl.provider.entity.SourceProvider$StreamSourceReader com.sun.jersey.core.impl.provider.entity.SourceProvider$SAXSourceReader com.sun.jersey.core.impl.provider.entity.SourceProvider$DOMSourceReader com.sun.jersey.json.impl.provider.entity.JSONJAXBElementProvider$General com.sun.jersey.json.impl.provider.entity.JSONArrayProvider$General com.sun.jersey.json.impl.provider.entity.JSONObjectProvider$General com.sun.jersey.core.impl.provider.entity.XMLRootElementProvider$General com.sun.jersey.core.impl.provider.entity.XMLListElementProvider$General com.sun.jersey.core.impl.provider.entity.XMLRootObjectProvider$General com.sun.jersey.core.impl.provider.entity.EntityHolderReader com.sun.jersey.json.impl.provider.entity.JSONRootElementProvider$General com.sun.jersey.json.impl.provider.entity.JSONListElementProvider$General com.sun.jersey.json.impl.provider.entity.JacksonProviderProxy >

This is because: 

 - header must be Content-Type as it the defines what type of data is coming in with the request, Accept is for what client can accept as response.

 - WLS seems to be more strict to the content which in general is options 

Therefore, the following REST request works for both WLS and EAP.

curl -v 
 -H 'Content-Type: application/xml' 
 -u bpmsAdmin 
 --data "<deployment-descriptor/>"  
 -X POST 'ldapj:7001/business-central/rest/deployment/com.sample:bpmstest:1.1:process:ksession-process/deploy'

i.e.

-H 'Content-Type: application/xml'  
==================================
  =>This specified instead of Accept header(-H "Accept:...).
    Specifying both should not be an problem

--data "<deployment-descriptor/>"  
=================================
  =>This specified as empty deployment structure which does not affect deployment descriptor in kjar (if any).


Suggestions for improvement:

Please clearly document about this mandatory requirement of REST API command  to 'deploy' kjar against WLS.

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