Bug 1309393 - Global as Java 1.8 native classes unmarshallable in kie-server
Global as Java 1.8 native classes unmarshallable in kie-server
Status: NEW
Product: JBoss BRMS Platform 6
Classification: JBoss
Component: Kie-Server (Show other bugs)
unspecified
Unspecified Unspecified
unspecified Severity medium
: ---
: ---
Assigned To: Edson Tirelli
Karel Suta
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-02-17 11:35 EST by Cade
Modified: 2016-02-17 11:43 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
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 Cade 2016-02-17 11:35:17 EST
Description of problem:
java.time.LocalDate is a native class in java 1.8 but causes marshaling errors on the kie-execution server using both jaxb and Xstream. Did not verify yet in json.


Version-Release number of selected component (if applicable):

Needs to be addressed in 7.0.0 and beyond as these are native java classes in Java 1.8


How reproducible:

Setting up a kie-server with a container that contains a rule that references a global of type java.time.LocalDate. 

Then using the following to build request to the kie-server:
KieServicesConfiguration config = KieServicesFactory.newRestConfiguration(REST_ENDPOINT, REST_USERNAME, REST_PASSWORD);
config.setMarshallingFormat(MarshallingFormat.XSTREAM);
KieServicesClient client  = KieServicesFactory.newKieServicesClient(config);
		RuleServicesClient ruleClient = client.getServicesClient(RuleServicesClient.class);

List<Command<?>> commands = new ArrayList<Command<?>>();
LocalDate localdate = LocalDate.now();
commands.add(CommandFactory.newSetGlobal("today", localdate));
commands.add(CommandFactory.newFireAllRules());
CommandFactory.newBatchExecution(commands, , SESSION_NAME);
ServiceResponse<String> results = ruleClient.executeCommands("validation",batchExecutionCommand);


Steps to Reproduce:
1. Set Up remote kie-server with rules with a global of type java.time.LocalDate and uses global
2. Send request to kie server pragmatically with code above. 
3.

Actual results:

Server registers the following error using XSTREAM marshalling:

[org.kie.server.services.impl.KieContainerCommandServiceImpl] (http-localhost.localdomain/127.0.0.1:8080-4) Error calling container 'validation': java.lang.RuntimeException: Illegal class for global. Expected [java.time.LocalDate], found [java.time.Ser].

Client registers the following error using JAXB marshalling:
javax.xml.bind.JAXBException: class java.time.LocalDate nor any of its super class is known to this context.

Expected results:

Rules are executes and response of Success is returned.


Additional info:

This was discussed on sme list and conclusion was to stick to java 6 classes for versions 6.x but needs to be addressed in 7.0

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