Bug 832910 - Designer doesn't load on Windows
Designer doesn't load on Windows
Product: JBoss Enterprise BRMS Platform 5
Classification: JBoss
Component: BRM (Guvnor) (Show other bugs)
BRMS 5.3.0.GA
Unspecified Windows
unspecified Severity urgent
: CR1
: BRMS 5.3.0.GA
Assigned To: Tihomir Surdilovic
Sona Mala
Depends On:
  Show dependency treegraph
Reported: 2012-06-18 03:51 EDT by Lukáš Petrovický
Modified: 2016-07-31 21:11 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Lukáš Petrovický 2012-06-18 03:51:38 EDT
From Toshiya:

Error: a is undefined
Source file: http://localhost:8080/designer/jsc/env_combined.js
line: 250

I switched to designer.dev=true and now the error is:

Error: namespace is undefined
Source file: http://localhost:8080/designer/js/Core/StencilSet/stencilsets.js
line: 83

I debugged around stencilsets.js/stencilset.js then I noticed that http://localhost:8080/designer/stencilset/bpmn2.0jbpm returns 0byte in Windows7
Comment 1 Sona Mala 2012-06-18 06:11:47 EDT
I tried this steps:
  - unzip standalone version (BRMS-5.3.0-ER9)
  - check size of designer/stencilset/bpmn2.0jbpm/bpmn2.0jbpm.json (156KB)
  - open Guvnor
  - create/open BPMN process
  - check size of designer/stencilset/bpmn2.0jbpm/bpmn2.0jbpm.json (0B)

I think that somewhere during loading of designer, a contain of this file is removed.
Comment 2 Toshiya Kobayashi 2012-06-18 06:34:25 EDT


is 0 byte.

Attaching a debugger, I observed

JbpmPreprocessingUnit.readFile() fails to read designer.war/stencilsets/bpmn2.0jbpm/stencildata/bpmn2.0jbpm.orig

    private String readFile(String pathname) throws IOException {
        StringBuilder fileContents = new StringBuilder();
        Scanner scanner = new Scanner(new File(pathname));
        String lineSeparator = System.getProperty("line.separator");
        try {
            while(scanner.hasNextLine()) {        
                fileContents.append(scanner.nextLine() + lineSeparator);
            return fileContents.toString();
        } finally {

Scanner.hasNextLine() immediately returns false.  Scanner should be instantiated with charsetName. Without it, Scanner uses platform encoding. (In my case, MS932)

         Scanner scanner = new Scanner(new File(pathname), "UTF-8");

A quick workaround is -Dfile.encoding=UTF-8 for JVM option.
Comment 3 Tihomir Surdilovic 2012-06-18 10:07:17 EDT
Thanks Toshiya! I guess this was introduced with the Japanese translations :)
charset was added to the Scanner init and fix was committed to Designer master and 2.2.x branch (https://github.com/tsurdilo/process-designer/commit/d35b56cecc854f80eb57a8e7930dce8f86cd0876). 

Let me know if there is anything else.
Comment 4 Toshiya Kobayashi 2012-06-18 22:51:00 EDT
Ah, it was not enough. Even if it can read bpmn2.0jbpm.orig, it writes bpmn2.0jbpm.json in the platform encoding (in my case, MS932). It will result in non-UTF-8 JSON which browsers fail to parse.

3.  Encoding

   JSON text SHALL be encoded in Unicode.  The default encoding is

Sent a pull request for it.

Comment 5 Toshiya Kobayashi 2012-06-18 23:18:02 EDT
Confirmed that the latest 2.2.x (with the pull request) build worked for my Win7.
Comment 6 Lukáš Petrovický 2012-06-19 02:31:17 EDT
(In reply to comment #5)
> Confirmed that the latest 2.2.x (with the pull request) build worked for my
> Win7.

Geoffrey, please, merge the pull request, would you? Tiho's not gonna be able to do that.
Comment 7 Tihomir Surdilovic 2012-06-19 03:04:23 EDT
Was able to merge the pull request to 2.2.x and its also in master too. Thanks again Toshiya.
Comment 8 Ryan Zhang 2012-06-20 22:46:58 EDT
This issue should contain the fixes.
Please verify it on CR1.
Comment 9 Zuzana Krejčová 2012-06-21 09:09:07 EDT
Screenshots from our tests show this was fixed in CR1

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