Problem is I can update only two of my custom atrribute in single operation through OSLC
Hi all,
I created custom test case templates in RQM for my project requirement. But when I tried to update custom attributes through OSLC, it can only two custom attributes in single operation. Cant update third attribute or more than two in single operation. Below is my OSLC code:
QName testRecordIdQname = new QName("https://d-9376:9443/qm/oslc_qm/contexts/_KrqUoMkQEeeeX6RO5KtLzA/shape/resource/com.ibm.rqm.planning.VersionedTestCase#", "TA_id");
QName testCaseSymptom = new QName("https://d-9376:9443/qm/oslc_qm/contexts/_KrqUoMkQEeeeX6RO5KtLzA/shape/resource/com.ibm.rqm.planning.VersionedTestCase#","TA_code");
//QName vstRQMSymptom = new QName("https://d-9376:9443/qm/oslc_qm/contexts/_KrqUoMkQEeeeX6RO5KtLzA/shape/resource/com.ibm.rqm.planning.VersionedTestCase#","symptom", "symptom");
Map<QName, Object> customAttribute = new HashMap<QName, Object>();
customAttribute.put(testRecordIdQname, "Sample1");
customAttribute.put(testCaseSymptom, "Sample2");
customAttribute.put(testCaseCode, "Sample3");
//customAttribute.put(vstRQMSymptom, "Sample4");
testCase.setExtendedProperties(customAttribute);
ClientResponse updateResourceResponse = null;
ClientResponse response = null;
response = client.getResource(testCase.getAbout().toString(), OslcMediaType.APPLICATION_RDF_XML);
String etag = response.getHeaders().getFirst(OSLCConstants.ETAG);
System.out.println("Etag :"+etag);
updateResourceResponse = client.updateResource(testCase.getAbout().toString(), testCase,OslcMediaType.APPLICATION_RDF_XML, OslcMediaType.APPLICATION_RDF_XML, etag);
2 answers
Anurag,
As Donald requested, please share the error code you are receiving. I suggest you to check server log if it contains any related error. Please refer Troubleshooting and supported functional logging at Wiki to enable detailed logging on RQM server.
Regards,
Mehul
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
at java.util.Arrays.copyOf(Arrays.java:3332)
at java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:137)
at java.lang.AbstractStringBuilder.ensureCapacityInternal(AbstractStringBuilder.java:121)
at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:421)
at java.lang.StringBuilder.append(StringBuilder.java:136)
at java.lang.StringBuilder.append(StringBuilder.java:76)
at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:457)
at java.lang.StringBuilder.append(StringBuilder.java:166)
at java.lang.StringBuilder.append(StringBuilder.java:76)
at java.util.Formatter$FormatSpecifier.print(Formatter.java:2769)
at java.util.Formatter.format(Formatter.java:2508)
at java.util.Formatter.format(Formatter.java:2455)
at java.lang.String.format(String.java:2940)
at java.util.logging.SimpleFormatter.format(SimpleFormatter.java:161)
at java.util.logging.StreamHandler.publish(StreamHandler.java:211)
at java.util.logging.ConsoleHandler.publish(ConsoleHandler.java:116)
at java.util.logging.Logger.log(Logger.java:738)
at java.util.logging.Logger.doLog(Logger.java:765)
at java.util.logging.Logger.log(Logger.java:875)
at org.main.RQMIntegration.main(RQMIntegration.java:181)
Now I can update custom attribute on my local environment, but while same code applies for production environment it gives above error
Comments
Anurag Patel
Jan 12 '18, 8:58 a.m.when I add third qName in map and update resource . It cant updated.
Donald Nong
Jan 16 '18, 7:44 p.m.What error did you get?