Where does JsonPath.js come from ?

49 views
Skip to first unread message

Axel R

unread,
May 25, 2013, 12:10:16 PM5/25/13
to pir...@googlegroups.com
Hi Harald,

I am trying to compile a gwt-p project (the CarStore sample). They are newly using a REST feature, and there is some dependecies with Totoe, Piriti etc... I do not understand all the "dependencies" intereactions between resteasy, piriti, jackson... :( 
So I was thinking that you might help me to solve or understand some errors:

1 - I talk about JsonPath because I had this compilation error :

Linking modules
   Bootstrap link for command-line module 'com.MS.MS'
      Linking module 'MS'
         Invoking Linker Cross-Site-Iframe
            Ignoring the following script tags in the gwt.xml file
jsonpath.js

    Q 1.1 - I do not understand which librarie use JsonPath.js ?
    Q 1.2 - I do not understand where the file JsonPath.js should be located ? I do not find it..should it be in war/WEB-INF ? Or could it be inside an external lib (.jar) ?
    Q 1.3 - Do you know why is JsonPath usefull for ?

2 - Then, to solve the previous error, I have to add the following line<set-configuration-property     name='xsiframe.failIfScriptTag'    value='FALSE'/>.

   Q 2.1 - Could my app works (compile + execute) successfully even if adding the previous line ?
   Q 2.2 - Could be there a relation with the JsonPath.js (I mean that the script that could ot be load in a *.gwt.xml file could be JsonPath.js) ?
   Q 2.3 - I have not seen a *.gwt.ml file adding any script tag, so I do not understand why this error appear.
 Is it possible that a librarie (gwtp-dispatch-REST-1.4-SNAPSHOT.jar) could require that JsonPath.js ?


3 - I ask question 1 and 2, not only to understand what is happening, but also because I ignore if they could be responsible of the following error : 

May 24, 2013 4:28:49 PM com.google.apphosting.utils.jetty.JettyLogger warn
WARNING: failed guiceFilter: java.lang.RuntimeException: java.lang.RuntimeException: Unable to instantiateMessageBodyReader
May 24, 2013 4:28:49 PM com.google.apphosting.utils.jetty.JettyLogger warn
WARNING: Failed startup of context com.google.appengine.tools.development.DevAppEngineWebAppContext@72c3dda3{/,C:\JUNO-WS\0-MS\war}
java.lang.RuntimeException: java.lang.RuntimeException: Unable to instantiate MessageBodyReader
at org.jboss.resteasy.plugins.providers.RegisterBuiltin.register(RegisterBuiltin.java:35)
at org.jboss.resteasy.spi.ResteasyDeployment.start(ResteasyDeployment.java:212)


Thanks you,







Harald Pehl

unread,
May 30, 2013, 6:06:54 AM5/30/13
to pir...@googlegroups.com
Hi Axel,

sorry for the late response, but I was quite busy lately. 

Let me give you some background first. I hope this answers some of your questions. Piriti relies on Totoe (https://github.com/hpehl/totoe) which uses JSONPath (http://www.sitepen.com/blog/2008/03/17/jsonpath-support/) to support XPath-like expressions for JSON. JSONPath is a javascript library. As such it must be included into Totoe. Since Totoe supports app which are using SuperDevMode it cannot include the JavaScript file in its GWT module (*.gwt.xml). See https://groups.google.com/d/topic/google-web-toolkit/6KOQpOABVaA/discussion for more details. Instead JSONPath.js is included using ScriptInjector: https://github.com/hpehl/totoe/blob/develop/core/src/main/java/name/pehl/totoe/json/client/JsonPath.java

So in your app you should turn SuperDevMode on by adding 

<add-linker name="xsiframe"/>
<set-configuration-property name="devModeRedirectEnabled" value="true"/>
to your GWT module definition. This should suppress the warnings. If you're using own JavaScript libraries in your app you might want to include them also using ScriptInjector.

HTH

- Harald

2013/5/25 Axel R <regn...@gmail.com>







--
You received this message because you are subscribed to the Google Groups "Piriti" group.
To unsubscribe from this group and stop receiving emails from it, send an email to piriti+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
---
Harald Pehl
Reply all
Reply to author
Forward
0 new messages