Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-18093

Explorer: Special character "®" in manifest.yml --> Description leads to errors when accessing OSE from JBDS/Explorer

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 4.2.0.CR1
    • 4.1.1.Final
    • openshift

    Description

      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)

      Result:

      The Eclipse log shows the following snippet:

      !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)
      

      To create the cartridge with the illegal character do the following as stated in the bugzilla:

      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.

      Attachments

        Issue Links

          Activity

            People

              adietish@redhat.com André Dietisheim
              manderse@redhat.com Max Andersen
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: