Javascript Exceptions in seperate deployment

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Javascript Exceptions in seperate deployment

Vedha
Hi,

We are using seperate deployment for integrating Orbeon in our Spring project. When we divert the jsp through orbeon, we are facing client side javascript excetions. There could be some javascript conflicts between our project and Orbeon. Please help,

Below is the exception in client browsers,

TypeError: Cannot read property 'getForm' of undefined
    at Object.ORBEON.xforms.Init.document (eval at <anonymous> (http://code.jquery.com/jquery-1.11.0.js:339:22), <anonymous>:3873:39)
    at Object.YAHOO.util.CustomEvent.notify (http://localhost:8080/MISTWebApp/orbeon/ops/yui/event/event.js:324:28)
    at Object.YAHOO.util.CustomEvent.subscribe (http://localhost:8080/MISTWebApp/orbeon/ops/yui/event/event.js:196:18)
    at Object.onDOMReady (http://localhost:8080/MISTWebApp/orbeon/ops/yui/event/event.js:878:46)
    at eval (eval at <anonymous> (http://code.jquery.com/jquery-1.11.0.js:339:22), <anonymous>:4623:30)
    at eval (eval at <anonymous> (http://code.jquery.com/jquery-1.11.0.js:339:22), <anonymous>:4630:3)
    at eval (native)
    at http://code.jquery.com/jquery-1.11.0.js:339:22
    at Function.jQuery.extend.globalEval (http://code.jquery.com/jquery-1.11.0.js:340:7)
    at jQuery.ajaxSetup.converters.text script (http://code.jquery.com/jquery-1.11.0.js:9773:11) <div data-ng-view="data-ng-view" class="ng-scope">



Below are the javascripts loaded on client side,

                <script type="text/javascript" src="/MyProject/orbeon/ops/jquery/jquery-1.11.0.js" class="xforms-baseline"> </script><script type="text/javascript" src="/MyProject/orbeon/ops/jquery/jquery-migrate-1.2.1.js" class="xforms-baseline"> </script><script type="text/javascript" src="/MyProject/orbeon/apps/fr/style/bootstrap/js/bootstrap.js" class="xforms-baseline"> </script><script type="text/javascript" src="/MyProject/orbeon/ops/javascript/orbeon/util/jquery-orbeon.js" class="xforms-baseline"> </script><script type="text/javascript" src="/MyProject/orbeon/ops/yui/yahoo/yahoo.js" class="xforms-baseline"> </script><script type="text/javascript" src="/MyProject/orbeon/ops/yui/event/event.js" class="xforms-baseline"> </script><script type="text/javascript" src="/MyProject/orbeon/ops/yui/dom/dom.js" class="xforms-baseline"> </script><script type="text/javascript" src="/MyProject/orbeon/ops/yui/connection/connection.js" class="xforms-baseline"> </script><script type="text/javascript" src="/MyProject/orbeon/ops/yui/element/element.js" class="xforms-baseline"> </script><script type="text/javascript" src="/MyProject/orbeon/ops/yui/animation/animation.js" class="xforms-baseline"> </script><script type="text/javascript" src="/MyProject/orbeon/ops/yui/progressbar/progressbar.js" class="xforms-baseline"> </script><script type="text/javascript" src="/MyProject/orbeon/ops/yui/dragdrop/dragdrop.js" class="xforms-baseline"> </script><script type="text/javascript" src="/MyProject/orbeon/ops/yui/container/container.js" class="xforms-baseline"> </script><script type="text/javascript" src="/MyProject/orbeon/ops/yui/examples/container/assets/containerariaplugin.js" class="xforms-baseline"> </script><script type="text/javascript" src="/MyProject/orbeon/ops/yui/calendar/calendar.js" class="xforms-baseline"> </script><script type="text/javascript" src="/MyProject/orbeon/ops/javascript/underscore/underscore.js" class="xforms-baseline"> </script><script type="text/javascript" src="/MyProject/orbeon/ops/javascript/xforms.js" class="xforms-baseline"> </script><script type="text/javascript" src="/MyProject/orbeon/ops/javascript/orbeon/util/fQuery.js" class="xforms-baseline"> </script><script type="text/javascript" src="/MyProject/orbeon/ops/javascript/orbeon/util/String.js" class="xforms-baseline"> </script><script type="text/javascript" src="/MyProject/orbeon/ops/javascript/orbeon/util/ExecutionQueue.js" class="xforms-baseline"> </script><script type="text/javascript" src="/MyProject/orbeon/ops/javascript/orbeon/util/FiniteStateMachine.js" class="xforms-baseline"> </script><script type="text/javascript" src="/MyProject/orbeon/ops/javascript/orbeon/xforms/server/Server.js" class="xforms-baseline"> </script><script type="text/javascript" src="/MyProject/orbeon/ops/javascript/orbeon/xforms/server/AjaxServer.js" class="xforms-baseline"> </script><script type="text/javascript" src="/MyProject/orbeon/ops/javascript/orbeon/xforms/server/AjaxServer/AjaxServerEvent.js" class="xforms-baseline"> </script><script type="text/javascript" src="/MyProject/orbeon/ops/javascript/orbeon/xforms/server/AjaxServer/nextAjaxResponse.js" class="xforms-baseline"> </script><script type="text/javascript" src="/MyProject/orbeon/ops/javascript/orbeon/xforms/server/UploadServer.js" class="xforms-baseline"> </script><script type="text/javascript" src="/MyProject/orbeon/ops/javascript/orbeon/xforms/LoadingIndicator.js" class="xforms-baseline"> </script><script type="text/javascript" src="/MyProject/orbeon/ops/javascript/orbeon/xforms/Document.js" class="xforms-baseline"> </script><script type="text/javascript" src="/MyProject/orbeon/ops/javascript/orbeon/xforms/Form.js" class="xforms-baseline"> </script><script type="text/javascript" src="/MyProject/orbeon/ops/javascript/orbeon/xforms/Page.js" class="xforms-baseline"> </script><script type="text/javascript" src="/MyProject/orbeon/ops/javascript/orbeon/xforms/control/Control.js" class="xforms-baseline"> </script><script type="text/javascript" src="/MyProject/orbeon/ops/javascript/orbeon/xforms/control/CalendarResources.js" class="xforms-baseline"> </script><script type="text/javascript" src="/MyProject/orbeon/ops/javascript/orbeon/xforms/control/Calendar.js" class="xforms-baseline"> </script><script type="text/javascript" src="/MyProject/orbeon/ops/javascript/orbeon/xforms/control/Upload.js" class="xforms-baseline"> </script><script type="text/javascript" src="/MyProject/orbeon/ops/javascript/orbeon/xforms/control/RTEConfig.js" class="xforms-baseline"> </script><script type="text/javascript" src="/MyProject/orbeon/ops/javascript/orbeon/xforms/control/RTE.js" class="xforms-baseline"> </script><script type="text/javascript" src="/MyProject/orbeon/ops/javascript/orbeon/xforms/action/Message.js" class="xforms-baseline"> </script><script type="text/javascript" src="/MyProject/orbeon/ops/javascript/orbeon/xforms/control/Placeholder.js" class="xforms-baseline"> </script><script type="text/javascript" src="/MyProject/orbeon/ops/javascript/orbeon/xforms/controls/Placement.js" class="xforms-baseline"> </script><script type="text/javascript" src="/MyProject/orbeon/ops/javascript/orbeon/xforms/controls/Help.js" class="xforms-baseline"> </script><script type="text/javascript" src="/MyProject/orbeon/ops/javascript/orbeon/xforms/controls/Hint.js" class="xforms-baseline"> </script><script type="text/javascript" src="/MyProject/orbeon/xbl/orbeon/autocomplete/autocomplete.js" class="xforms-baseline"> </script><script type="text/javascript" src="/MyProject/orbeon/ops/yui/datasource/datasource.js" class="xforms-baseline"> </script><script type="text/javascript" src="/MyProject/orbeon/ops/yui/autocomplete/autocomplete.js" class="xforms-baseline"> </script><script type="text/javascript" src="/MyProject/orbeon/ops/yui/element/element-min.js" class="xforms-baseline"> </script><script type="text/javascript" src="/MyProject/orbeon/ops/yui/button/button-min.js" class="xforms-baseline"> </script><script type="text/javascript" src="/MyProject/orbeon/xbl/orbeon/button/button.js" class="xforms-baseline"> </script><script type="text/javascript" src="/MyProject/orbeon/xbl/orbeon/number/number.js" class="xforms-baseline"> </script><script type="text/javascript"> var opsXFormsProperties = {"format.input.time":"[h]:[m]:[s] [P,*-2]","internal-short-delay":"100","session-heartbeat-delay":2880000};</script><script type="text/javascript"> var orbeonInitData = orbeonInitData || {}; orbeonInitData["xforms-form"] = {"paths":{"xforms-server": "/MyProject/orbeon/xforms-server","xforms-server-upload": "/MyProject/orbeon/xforms-server/upload","calendar-image": "/MyProject/orbeon/ops/images/xforms/calendar.png"}};</script><script type="text/javascript"> </script>


       
       
        <script src="http://code.jquery.com/jquery-1.11.0.js"></script>        <script src="http://code.jquery.com/jquery-migrate-1.2.1.js"></script>        <script src="mist/resources/en/js/bootstrap.min.js"></script> 
 
  <script src="mist/resources/en/js/angular.js"></script>   
   
       
        <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.5/angular-route.js"></script>        <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.5/angular-resource.js"></script>
        <script src="mist/resources/en/js/angular-animate.min.js"></script>        <script src="mist/resources/en/js/loading-bar.js"></script>
Reply | Threaded
Open this post in threaded view
|

Re: Javascript Exceptions in seperate deployment

Alessandro  Vernet
Administrator
Hi Vedha,

Like you said, it might be due to some conflict with something else you have on the page. Or not. I don't remember having seen this specific error, so I wouldn't be tell you off the bat what needs to be done to fix the problem.

We would really need to be able to reproduce the problem here to be able to help you, but this might be hard if there are a lot of external dependencies. Do you have an idea of how we could get there?

Alex
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: Javascript Exceptions in seperate deployment

Vedha
This issue is fixed. The problem is because of the Jquery conflict between application and Orbeon.

I just removed Jquery code from application and used JQlite.
Reply | Threaded
Open this post in threaded view
|

Re: Javascript Exceptions in seperate deployment

Alessandro  Vernet
Administrator
Hi Vedha,

Excellent, I'm glad you found a solution to this one.

Alex
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet