Bug 983347 - Error : no viable alternative at character '\'
Error : no viable alternative at character '\'
Status: CLOSED CURRENTRELEASE
Product: JBoss BPMS Platform 6
Classification: JBoss
Component: jBPM Core (Show other bugs)
6.0.0
Unspecified Unspecified
unspecified Severity low
: ER4
: 6.0.0
Assigned To: Kris Verlaenen
Sona Mala
:
Depends On:
Blocks: 1227375
  Show dependency treegraph
 
Reported: 2013-07-10 23:25 EDT by Ryan Zhang
Modified: 2015-06-02 10:04 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1227375 (view as bug list)
Environment:
Last Closed: 2014-08-06 16:12:05 EDT
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 Ryan Zhang 2013-07-10 23:25:35 EDT
Description of problem:
First time open a Form in designer, you can see error "no viable alternative at character '\'" appears in server.log.

Parts of the error log is pasted.

11:17:59,097 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015874: JBoss Red Hat JBoss BPMS 6.0.0.Beta-redhat-1 (AS 7.2.0.Final-redhat-8) started in 49813ms - Started 612 of 675 services (62 services are passive or on-demand)
11:18:33,495 INFO  [org.guvnor.common.services.backend.config.ApplicationPreferencesLoader] (http-/127.0.0.1:8080-1) Setting preference 'type' to 'kjar'.
11:18:33,495 INFO  [org.guvnor.common.services.backend.config.ApplicationPreferencesLoader] (http-/127.0.0.1:8080-1) Setting preference 'drools.dateformat' to 'dd-MMM-yyyy'.
11:18:33,495 INFO  [org.guvnor.common.services.backend.config.ApplicationPreferencesLoader] (http-/127.0.0.1:8080-1) Setting preference 'drools.defaultlanguage' to 'en'.
11:18:33,495 INFO  [org.guvnor.common.services.backend.config.ApplicationPreferencesLoader] (http-/127.0.0.1:8080-1) Setting preference 'rule-modeller-onlyShowDSLStatements' to 'false'.
11:18:33,495 INFO  [org.guvnor.common.services.backend.config.ApplicationPreferencesLoader] (http-/127.0.0.1:8080-1) Setting preference 'designer.context' to 'designer'.
11:18:33,496 INFO  [org.guvnor.common.services.backend.config.ApplicationPreferencesLoader] (http-/127.0.0.1:8080-1) Setting preference 'drools.defaultcountry' to 'US'.
11:18:33,496 INFO  [org.guvnor.common.services.backend.config.ApplicationPreferencesLoader] (http-/127.0.0.1:8080-1) Setting preference 'designer.url' to 'http://localhost:8080'.
11:18:33,496 INFO  [org.guvnor.common.services.backend.config.ApplicationPreferencesLoader] (http-/127.0.0.1:8080-1) Setting preference 'drools.datetimeformat' to 'dd-MMM-yyyy hh:mm:ss'.
11:18:33,496 INFO  [org.guvnor.common.services.backend.config.ApplicationPreferencesLoader] (http-/127.0.0.1:8080-1) Setting preference 'build.enable-incremental' to 'true'.
11:18:33,496 INFO  [org.guvnor.common.services.backend.config.ApplicationPreferencesLoader] (http-/127.0.0.1:8080-1) Setting preference 'designer.profile' to 'jbpm'.
11:19:02,825 INFO  [org.jbpm.formModeler.service.bb.mvc.controller.ControllerServlet] (http-/127.0.0.1:8080-4) Application Directory: /tmp/July10/jboss-eap-6.1/standalone/deployments/business-central.war/.
11:19:02,825 INFO  [org.jbpm.formModeler.service.bb.mvc.controller.ControllerServlet] (http-/127.0.0.1:8080-4) Application Config Directory: /tmp/July10/jboss-eap-6.1/standalone/deployments/business-central.war/./WEB-INF/etc
11:19:04,946 ERROR [stderr] (http-/127.0.0.1:8080-4) line 1:50 no viable alternative at character '\'
11:19:04,946 ERROR [stderr] (http-/127.0.0.1:8080-4) line 1:111 no viable alternative at character '\'
11:19:04,976 INFO  [org.drools.compiler.kie.builder.impl.KieRepositoryImpl] (http-/127.0.0.1:8080-4) KieModule was added:MemoryKieModule[ ReleaseId=org.jbpm:HR:1.0]



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


How reproducible:
Start BPMS DR6

Steps to Reproduce:
1. Add a user by ./add-user.sh and login
2. Click the "Process Authoring"
3. Click "Form Definition" in left bar and Click one form . You can see the error appears in server.log
Actual results:


Expected results:


Additional info:
Comment 2 Pere Fernàndez 2013-09-03 09:56:15 EDT
This error message isn't related with Form-Modeler, it appears when the project is being build and the ProcessBuilder parses the processes xml contents.
Comment 3 Kris Verlaenen 2013-09-12 19:26:35 EDT
I believe this is an antlr error, so it seems antlr is having issues when parsing a '\' somewhere?

Edson, any idea?
Comment 4 Edson Tirelli 2013-09-12 21:08:37 EDT
It is a parser error message, yes, but which parser? I can't see in the stack trace which file is it trying to parse?
Comment 5 Kris Verlaenen 2013-09-23 20:06:44 EDT
Edson, it seems to be the Java parser, I figured out that our Java dialect is showing this error when trying to compile some java code that contains a '\n'.  It executes fine afterwards, but it just generates this error when compiling.  For example, try:

rule "new rule"
	when
	then
		System.out.println("Hello");\n
end
Comment 6 Edson Tirelli 2013-09-24 09:51:00 EDT
Kris, in this case the problem is in the template (or whatever) that is generating the code, as \n was not supposed to be there at parsing time. It should have been replaced by the NL character by the time the parsing happens.
Comment 8 Tihomir Surdilovic 2013-09-25 08:25:03 EDT
fixed also for conditional expression on sequence flows. currently onEntry/Exit actions do not allow multi-lines. This will be fixed in near future.
Comment 9 Sona Mala 2013-10-31 09:12:27 EDT
Verified for ER4.

It seems that new processes, which contain Script (Script Task) or Condition Expression (Sequence Flow) properties with multi-lines, do not cause this error.

But still there are problems with processes which was created in older versions (like process in jbpm-playground -> hiring, TestClient, etc.)

This issues can be fixed by rewriting '/n' (EOL) in new version of Designer.

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