Bug 1122089 - Special character "®" in manifest.yml --> Description leads to errors when accessing OSE from JBDS
Summary: Special character "®" in manifest.yml --> Description leads to errors when ac...
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Master
Version: 2.2.0
Hardware: All
OS: Linux
unspecified
high
Target Milestone: ---
: ---
Assignee: Luke Meyer
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-07-22 14:10 UTC by Sebastian Faulhaber
Modified: 2014-09-04 06:46 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-08-28 15:56:52 UTC


Attachments (Terms of Use)
manifest.yml with ® character that can be used to reproduce the issue. (2.13 KB, text/plain)
2014-08-28 07:40 UTC, Sebastian Faulhaber
no flags Details


Links
System ID Priority Status Summary Last Updated
JBoss Issue Tracker JBIDE-18093 Major Closed Explorer: Special character "®" in manifest.yml --> Description leads to errors when accessing OSE from JBDS/Explorer 2014-09-04 06:46:08 UTC

Description Sebastian Faulhaber 2014-07-22 14:10:03 UTC
Description of problem:
I have developed a custom cartridge for OSE and placed the special character "®" (registered trademark) in the description field within my "manifest.yml". The cartridge could be installed correctly via WebUI and was also working fine from a technical point of view.

However, when trying to access the OSE instance from JBDS via the Openshift Explorer plugin, I always got the following error:

Invalid value for input string: "00ae"

The string "00ae" is the unicode representation of my special character. After removing everything worked fine again. The OpenShift Explorer was completely unusable in this scenario! So only one installed cartridge with this special character can poison a whole installation and affect ALL users!!!

Version-Release number of selected component (if applicable):
OSE 2.2 (Developer Image)

How reproducible:
Yes.

Steps to Reproduce:
1. Create a custom cartridge and add a "®" to the description field of your manifest.yml.
2. Install the cartridge according to doc.
3. Start JBDS and try to work with your OSE instance via the OpenShift Explorer plugin (e.g. try to add an application)

Actual results:


Expected results:


Additional info:

Comment 1 Brenton Leanhardt 2014-07-22 14:18:14 UTC
I think the correct place to file this is https://issues.jboss.org/browse/JBIDE.  I've CC'd someone who will likely know.

Comment 3 Brenton Leanhardt 2014-08-19 12:33:14 UTC
This has been moved to Jira.

Comment 4 Andre Dietisheim 2014-08-27 19:16:22 UTC
@Sepastian Faulhaber: I tried to replicate the bug but failed to do so. I can create an application which is using a special character '\u00ae' in the manifest (cartridge name or description for instance). Could your issue be caused by something different than the tooling itself or do I miss something?

Comment 5 Andre Dietisheim 2014-08-27 19:19:04 UTC
It would be especially helpful if you could provide your Eclipse log if there's anything relevant in it.

Comment 6 Sebastian Faulhaber 2014-08-28 07:12:14 UTC
Hi Andre,

ok...please try the following steps to reproduce:

1. Modify the official EAP Cartridge by adding a '®' to the description: (I've attached my manifest.yml)

vi /usr/libexec/openshift/cartridges/jbosseap/metadata/manifest.yml

2. Reinstall cartridge with the following commands:

cd /usr/libexec/openshift/cartridges
oo-admin-cartridge --action install --recursive --source /usr/libexec/openshift/cartridges
oo-admin-ctl-cartridge --activate -c import-node --obsolete
oo-admin-broker-cache --clear && oo-admin-console-cache --clear

3. Create a new gear based on EAP cartridge.
4. Start JBDS and connect to OSE instance via OpenShiftExplorer Plugin. The first rest call against OSE should lead to the error.

My .log shows the following error:
!ENTRY org.eclipse.core.jobs 4 2 2014-08-28 03:02:54.101
!MESSAGE An internal error occurred during: "Loading OpenShift information...".
!STACK 0
java.lang.NumberFormatException: For input string: "00ae"
	at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
	at java.lang.Integer.parseInt(Integer.java:492)
	at java.lang.Integer.parseInt(Integer.java:527)
	at org.jboss.dmr.JSONParserImpl.parseStringValue(JSONParserImpl.java:109)
	at org.jboss.dmr.JSONParser.yyLex(JSONParser.java:574)
	at org.jboss.dmr.JSONParser.yyParse(JSONParser.java:650)
	at org.jboss.dmr.ModelNode.fromJSONString(ModelNode.java:1184)
	at com.openshift.internal.client.response.OpenShiftJsonDTOFactory.getModelNode(OpenShiftJsonDTOFactory.java:207)
	at com.openshift.internal.client.response.OpenShiftJsonDTOFactory.get(OpenShiftJsonDTOFactory.java:94)
	at com.openshift.internal.client.RestService.request(RestService.java:124)
	at com.openshift.internal.client.RestService.request(RestService.java:103)
	at com.openshift.internal.client.AbstractOpenShiftResource$ServiceRequest.execute(AbstractOpenShiftResource.java:155)
	at com.openshift.internal.client.DomainResource$ListApplicationsRequest.execute(DomainResource.java:446)
	at com.openshift.internal.client.DomainResource.updateApplications(DomainResource.java:297)
	at com.openshift.internal.client.DomainResource.refresh(DomainResource.java:381)
	at org.jboss.tools.openshift.express.internal.ui.command.RefreshResourceHandler$1.doRun(RefreshResourceHandler.java:69)
	at org.jboss.tools.openshift.express.internal.ui.job.AbstractDelegatingMonitorJob.run(AbstractDelegatingMonitorJob.java:36)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)

Software Versions (I use the official VMDK OSE image from our customer portal):
cat /etc/openshift-enterprise-release 
OpenShift Enterprise 2.1.0

JBoss Developer Studio
Version: 7.1.1.GA
Build id: GA-v20140314-2145-B688
Build date: 20140314-2145

Regards,
Sebastian

Comment 7 Sebastian Faulhaber 2014-08-28 07:40:42 UTC
Created attachment 931751 [details]
manifest.yml with ® character that can be used to reproduce the issue.

Comment 8 Andre Dietisheim 2014-08-28 13:31:19 UTC
@Sepastian Faulhaber: thanks, that helps a lot! Nevertheless after Brenton changed the manifests in our dev instance I still cannot reproduce the issue. I can create the app (with the invalid character in manfiest aka "description") and have it listed in OpenShift Explorer. See the screenshot here: https://issues.jboss.org/browse/JBIDE-18093?focusedCommentId=12996495&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-12996495

Comment 9 Andre Dietisheim 2014-08-28 13:40:04 UTC
looking more closely at your stacktrace I have the impression that you have an illegal character in some domain name:

com.openshift.internal.client.response.OpenShiftJsonDTOFactory.get(OpenShiftJsonDTOFactory.java:94) 

is in java code

return createDomains(dataNode);

Is that the case?

Comment 10 Sebastian Faulhaber 2014-08-28 14:02:38 UTC
Hi André,

I did not use a special character in the domain name; just alphanumeric characters.

Are you also trying to reproduce it on the OSE VMDK 2.1.0 ? Can I provide you any more logs or shall I share my screen for you?

Regards,
Sebastian

Comment 11 Brenton Leanhardt 2014-08-28 14:05:31 UTC
The VM we're using is very slightly newer than OSE VMDK 2.1.0.

Comment 13 Andre Dietisheim 2014-08-28 14:54:10 UTC
@Sepastian: could I also ask you to test our latest Milestone in order to verify that the latest (JBDS 8.0.0.Beta3) would have this fixed?

http://tools.jboss.org/downloads/devstudio/luna/8.0.0.Beta3.html

Comment 14 Sebastian Faulhaber 2014-08-28 15:09:12 UTC
Hi André,

it works smoothly with JBDS 8.0.0.Beta3. So maybe the issue is JBDS related?!

Regards,
Sebastian

Comment 15 JBoss JIRA Server 2014-08-28 15:18:47 UTC
Andre Dietisheim <adietish@redhat.com> updated the status of jira JBIDE-18093 to Resolved

Comment 16 Andre Dietisheim 2014-08-28 15:21:29 UTC
I could finally reproduce this in JBDS 7.1.1 while I cant in JBDS 8 so the issue is fixed in upcoming JBDS 8 which will become GA in October.

Comment 17 Andre Dietisheim 2014-08-28 16:29:49 UTC
@Sebastian Faulhaber: the root cause of this error is in the json parser that we us in openshift-java-client which JBDS relies on. I vaguely remember that we upgraded the parser at some point in the JBDS 8 dev cycle. I bet this fixed this for JBDS 8.

Comment 18 JBoss JIRA Server 2014-09-04 06:46:08 UTC
Marián Labuda <mlabuda@redhat.com> updated the status of jira JBIDE-18093 to Closed


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