cancel
Showing results for 
Search instead for 
Did you mean: 

AngularJS Modeler not working in Firefox 34 and Chrome 39

b_schnarr
Champ in-the-making
Champ in-the-making
When I try to create a new process model with the new AngularJS designer in Activiti 5.17, I get the following error in firefox:

Error: model.stencilset is undefined ORYX.Editor.construct@http://10.120.40.24:8080/activiti-explorer1/editor-app/editor/oryx.debug.js:10923:8 Clazz.extend/classDef@http://10.120.40.24:8080/activiti-explorer1/editor-app/editor/oryx.debug.js:1757:39 fetchModel/<@http://10.120.40.24:8080/activiti-explorer1/editor-app/app.js:102:45 q/g.success/<@http://10.120.40.24:8080/activiti-explorer1/editor-app/libs/angular_1.2.13/angular.min.js:67:279 Bd/e/l.promise.then/B@http://10.120.40.24:8080/activiti-explorer1/editor-app/libs/angular_1.2.13/angular.... Bd/e/l.promise.then/B@http://10.120.40.24:8080/activiti-explorer1/editor-app/libs/angular_1.2.13/angular.... Bd/f/<.then/<@http://10.120.40.24:8080/activiti-explorer1/editor-app/libs/angular_1.2.13/angular.min.js:95:173 Cd/this.$get</h.prototype.$eval@http://10.120.40.24:8080/activiti-explorer1/editor-app/libs/angular_1.2.13/angular.min.js:103:452 Cd/this.$get</h.prototype.$digest@http://10.120.40.24:8080/activiti-explorer1/editor-app/libs/angular_1.2.13/angular.min.js:101:210 Cd/this.$get</h.prototype.$apply@http://10.120.40.24:8080/activiti-explorer1/editor-app/libs/angular_1.2.13/angular.min.js:104:262 g@http://10.120.40.24:8080/activiti-explorer1/editor-app/libs/angular_1.2.13/angular.min.js:68:21 I@http://10.120.40.24:8080/activiti-explorer1/editor-app/libs/angular_1.2.13/angular.min.js:72:109 qd/</y.onreadystatechange@http://10.120.40.24:8080/activiti-explorer1/editor-app/libs/angular_1.2.13/angular.min.js:73:154
   

…&(a=a.message+"\n"+a.sourceURL+":"+a.line));return a}function e(a){var b=c.conso…


Chrome says:

 GET http://10.120.40.24:8080/activiti-explorer1/editor-app/libs/angular_1.2.13/angular.min.js.map 404 (Not Found)
:8080/activiti-explorer1/editor-app/libs/angular_1.2.13/angular-animate.min.js.map:1 GET http://10.120.40.24:8080/activiti-explorer1/editor-app/libs/angular_1.2.13/angular-animate.min.js.ma... 404 (Not Found)
angular.min.js:85 TypeError: Cannot read property 'namespace' of undefined
    at ORYX.Editor.construct (http://10.120.40.24:8080/activiti-explorer1/editor-app/editor/oryx.debug.js:10923:33)
    at classDef (http://10.120.40.24:8080/activiti-explorer1/editor-app/editor/oryx.debug.js:1757:54)
    at http://10.120.40.24:8080/activiti-explorer1/editor-app/app.js:102:45
    at http://10.120.40.24:8080/activiti-explorer1/editor-app/libs/angular_1.2.13/angular.min.js:67:279
    at B (http://10.120.40.24:8080/activiti-explorer1/editor-app/libs/angular_1.2.13/angular.min.js:94:5)
    at B (http://10.120.40.24:8080/activiti-explorer1/editor-app/libs/angular_1.2.13/angular.min.js:94:5)
    at http://10.120.40.24:8080/activiti-explorer1/editor-app/libs/angular_1.2.13/angular.min.js:95:173
    at h.$eval (http://10.120.40.24:8080/activiti-explorer1/editor-app/libs/angular_1.2.13/angular.min.js:103:456)
    at h.$digest (http://10.120.40.24:8080/activiti-explorer1/editor-app/libs/angular_1.2.13/angular.min.js:101:218)
    at h.$apply (http://10.120.40.24:8080/activiti-explorer1/editor-app/libs/angular_1.2.13/angular.min.js:104:264)angular.min.js:85 (anonymous function)angular.min.js:63 (anonymous function)angular.min.js:94 Bangular.min.js:94 Bangular.min.js:95 (anonymous function)angular.min.js:103 h.$evalangular.min.js:101 h.$digestangular.min.js:104 h.$applyangular.min.js:68 gangular.min.js:72 Iangular.min.js:73 y.onreadystatechange


I only installed the explorer standalone, no LDAP, only example users and example processes.

Do you have any ideas?
Best regards
Ben
14 REPLIES 14

abdou2387
Champ in-the-making
Champ in-the-making
I fixed the problem by change the file conf of the context root
file : /activiti-webapp-explorer2/src/main/webapp/editor-app/app-cfg.js
solution : 'contextRoot' : 'service/',

Best regards

wade_zeng
Champ in-the-making
Champ in-the-making
Hi ,i got different problem when integrate activiti-modeler to my web application:
i have change the app-cfg.js to my web context :
ACTIVITI.CONFIG = {
'contextRoot' : '/agm/service',
};

"NetworkError: 404 Not Found - http://localhost:8089/agm/service/model/77501/json"
json
Error loading model with id 77501 <html><head><title>Apache Tomcat/7.0.61 - Error report</title><style><!–H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}–></style> </head><body><h1>HTTP Status 404 - /agm/service/model/77501/json</h1><HR size="1" noshade="noshade"><p><b>type</b> Status report</p><p><b>message</b> <u>/agm/service/model/77501/json</u></p><p><b>description</b> <u>The requested resource is not available.</u></p><HR size="1" noshade="noshade"><h3>Apache Tomcat/7.0.61</h3></body></html>
app.js (line 107 )

anytips i missed ?

Regds

jbarrez
Star Contributor
Star Contributor
well, it depends. Did you change the name of the war to agm.war or configured you web container to map onto that?
I would try to first see what url actually responds to a request.

wade_zeng
Champ in-the-making
Champ in-the-making
Dear jbarrez,

         thx for reply!  Yes, the web name is agm and i  copy the editor-app, modeler.html to webcontent,  stencilset.json in WEB-INF/classes

so the web looks like:
<code>
agm
    + editor-app
    + WEB-INF
       - classes
          -stencilset.json
       - lib
       - web.xml
    + modeler.html
</code>
and in web.xml, add jsonpfilter as below.
<code>
     <filter>
        <filter-name>JSONPFilter</filter-name>
        <filter-class>org.activiti.explorer.servlet.JsonpCallbackFilter</filter-class>
    </filter>

<filter-mapping>
        <filter-name>JSONPFilter</filter-name>
        <url-pattern>/service/*</url-pattern>
    </filter-mapping>
</code>

and also add bean configuration in spring content xml
<code>
   <!– for modeler –>
    <bean id="objectMapper" class="com.fasterxml.jackson.databind.ObjectMapper"></bean>
   
    <bean id="restResponseFactory" class="org.activiti.rest.service.api.RestResponseFactory"></bean>
   
    <bean id="contentTypeResolver" class="org.activiti.rest.common.application.DefaultContentTypeResolver"></bean>
    <!– Activiti end –>
</code>

then when call like http://localhost:8089/agm/modeler.html?modelId=77501

firebug console shown as below:
<code>
1433822439630 INFO Plugin configuration file loaded.
1433822439632 ERROR A plugin is not providing a name. Ingnoring this plugin.
1433822439633 INFO Plugin 'Signavio.Plugins.Loading' successfully loaded.
1433822439634 INFO Plugin 'ORYX.Plugins.Loading' successfully loaded.
1433822439635 INFO Plugin 'ORYX.Plugins.CanvasResize' successfully loaded.
1433822439636 INFO Plugin 'ORYX.Plugins.RenameShapes' successfully loaded.
1433822439637 INFO Plugin 'ORYX.Plugins.ProcessLink' successfully loaded.
1433822439638 INFO Plugin 'ORYX.Plugins.Arrangement' successfully loaded.
1433822439639 INFO Plugin 'ORYX.Plugins.Save' successfully loaded.
1433822439640 INFO Plugin 'ORYX.Plugins.View' successfully loaded.
1433822439641 INFO Plugin 'ORYX.Plugins.DragDropResize' successfully loaded.
1433822439642 INFO Plugin 'ORYX.Plugins.HighlightingSelectedShapes' successfully loaded.
1433822439642 INFO Plugin 'ORYX.Plugins.DragDocker' successfully loaded.
1433822439643 INFO Plugin 'ORYX.Plugins.AddDocker' successfully loaded.
1433822439644 INFO Plugin 'ORYX.Plugins.SelectionFrame' successfully loaded.
1433822439644 INFO Plugin 'ORYX.Plugins.ShapeHighlighting' successfully loaded.
1433822439645 INFO Plugin 'ORYX.Plugins.Overlay' successfully loaded.
1433822439646 INFO Plugin 'ORYX.Plugins.KeysMove' successfully loaded.
1433822439646 INFO Plugin 'ORYX.Plugins.Layouter.EdgeLayouter' successfully loaded.
1433822439647 INFO Plugin 'ORYX.Plugins.BPMN2_0' successfully loaded.

"NetworkError: 404 Not Found - http://localhost:8089/agm/service/model/77501/json"
json
Error loading model with id 77501 Apache Tomcat/7.0.61 - Error report HTTP Status 404 - /agm/service/model/77501/jsontype Status reportmessage /agm/service/model/77501/jsondescription The requested resource is not available.Apache Tomcat/7.0.61
app.js (line 107 )
</code>

miguelcaldas19
Champ in-the-making
Champ in-the-making
Any new with this problem?