You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shindig.apache.org by Ben Laurie <be...@google.com> on 2008/07/23 19:32:20 UTC

Using Caja?

Using the Caja sample,
http://localhost:8080/gadgets/files/samplecontainer/samplecontainer.html,
gives me this error:

HTTP ERROR: 500

org/json/simple/JSONValue

RequestURI=/gadgets/ifr
Caused by:

java.lang.NoClassDefFoundError: org/json/simple/JSONValue
	at com.google.caja.config.ConfigUtil.loadWhiteListFromJson(ConfigUtil.java:134)
	at com.google.caja.lang.css.CssSchema.getDefaultCss21Schema(CssSchema.java:61)
	at com.google.caja.plugin.PluginCompiler.(PluginCompiler.java:64)
	at com.google.caja.opensocial.DefaultGadgetRewriter.compileGadget(DefaultGadgetRewriter.java:179)
	at com.google.caja.opensocial.DefaultGadgetRewriter.rewriteContent(DefaultGadgetRewriter.java:111)
	at com.google.caja.opensocial.DefaultGadgetRewriter.rewriteContent(DefaultGadgetRewriter.java:96)
	at org.apache.shindig.gadgets.servlet.CajaContentFilter.filter(CajaContentFilter.java:73)
	at org.apache.shindig.gadgets.servlet.GadgetRenderingTask.outputHtmlGadget(GadgetRenderingTask.java:306)
	at org.apache.shindig.gadgets.servlet.GadgetRenderingTask.outputGadget(GadgetRenderingTask.java:156)
	at org.apache.shindig.gadgets.servlet.GadgetRenderingTask.process(GadgetRenderingTask.java:130)
	at org.apache.shindig.gadgets.servlet.GadgetRenderingServlet.doGet(GadgetRenderingServlet.java:53)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
	at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362)
	at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
	at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
	at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:726)
	at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
	at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:206)
	at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
	at org.mortbay.jetty.Server.handle(Server.java:324)
	at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
	at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:828)
	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514)
	at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
	at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
	at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
	at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450)

Powered by Jetty://

where the gadget should be. Any pointers on how I might debug this?
Maven is a mystery to me...

Re: Using Caja?

Posted by Ben Laurie <be...@google.com>.
On Fri, Jul 25, 2008 at 4:56 PM, Cassie <do...@google.com> wrote:
> On Fri, Jul 25, 2008 at 8:48 AM, Ben Laurie <be...@google.com> wrote:
>
>> On Fri, Jul 25, 2008 at 4:40 PM, Cassie <do...@apache.org> wrote:
>> > Sorry I didn't see this before.
>> > Caja is not broken - it just isn't turned on by default because it
>> happens
>> > to break a lot of gadgets even when included but disabled.
>>
>> It does? How can that be?
>
>
> can't remember exactly why - maybe someone else on the list knows...
> it had to do something with gadgets including libraries like prototype or
> jquery or something... when those libraries and the caja js were both loaded
> something conflicted. so, it was easier to just not include caja by default
> as no production systems are integrating with it yet.

Ah yes - well, we should fix that.

>> > Simply uncomment features/opensocial-current/feature.xml line 23 and the
>> > gadget will display nice and cajoled.
>> >
>> > - Cassie
>> >
>> > (Note: I just noticed that if you use the "reset all" button while caja
>> mode
>> > is turned on the gadget will fail with a js error. If you just reload the
>> > page it will work again.
>>
>> If I reload the page won't I lose the "use caja" tick?
>
>
> no. mike samuel fixed that with a patch a while back.
>
>
>>
>>
>> > This is because the setevil bit isn't implemented
>> > on the java server and thus returns a 501. I don't know why this is
>> crashing
>> > the caja stuff.. but it is. It doesn't fail on initial load because
>> > apparently the initial load does not respect the evil bit (lol - another
>> > bug))
>>
>> What is the evil bit?
>
>
> it tries to return evil data - ie data containing unescaped javascript and
> what not. used for trying to break gadgets with bad blindly unescaping
> habits.
> it isn't implemented atm because we did some refactoring and so it is
> properly returning a 501 error. for some reason this causes the caja code to
> crash (although it shouldn't - the non caja code is fine - i haven't looked
> into it much though)
>
>
>>
>>
>> >
>> >
>> >
>> > On Thu, Jul 24, 2008 at 2:22 AM, Ben Laurie <be...@google.com> wrote:
>> >
>> >> On Thu, Jul 24, 2008 at 8:28 AM, Ian Boston <ie...@tfd.co.uk> wrote:
>> >> > I get the same, I guess we have something broken in caja at the
>> moment.
>> >> :(
>> >>
>> >> A shame, since we just fixed it :-)
>> >>
>> >> > Ian
>> >> >
>> >> > On 23 Jul 2008, at 22:43, Ben Laurie wrote:
>> >> >
>> >> >> On Wed, Jul 23, 2008 at 10:32 PM, Ian Boston <ie...@tfd.co.uk> wrote:
>> >> >>>
>> >> >>> mvn  on its own is configured to mvn install which might leave some
>> >> stale
>> >> >>> state about in some of the projects. but normally
>> >> >>>
>> >> >>> mvn
>> >> >>> mvn -Prun
>> >> >>>
>> >> >>>
>> >> >>> *is* the right thing to do.
>> >> >>>
>> >> >>> what's the next failure ?
>> >> >>
>> >> >> The next failure is that with Caja enabled, the gadget is blank (with
>> >> >> it disable it is fine).
>> >> >>
>> >> >>>
>> >> >>> Ian
>> >> >>>
>> >> >>>
>> >> >>> On 23 Jul 2008, at 22:17, Ben Laurie wrote:
>> >> >>>
>> >> >>>> On Wed, Jul 23, 2008 at 7:22 PM, Ian Boston <ie...@tfd.co.uk> wrote:
>> >> >>>>>
>> >> >>>>> Ok,
>> >> >>>>>
>> >> >>>>> can you do a
>> >> >>>>>
>> >> >>>>> mvn clean install
>> >> >>>>
>> >> >>>> I thought I'd experiment.
>> >> >>>>
>> >> >>>> mvn clean
>> >> >>>> mvn
>> >> >>>> mvn -Prun
>> >> >>>>
>> >> >>>> got me to the next failure - but what did I do wrong? Essentially
>> my
>> >> >>>> first try was this:
>> >> >>>>
>> >> >>>> svn update
>> >> >>>> mvn
>> >> >>>> mvn -Prun
>> >> >>>>
>> >> >>>> what should I have done?
>> >> >>>>
>> >> >>>>
>> >> >>>>>
>> >> >>>>> from the base directory (ie the one with features/ javascript/ and
>> >> >>>>> java/
>> >> >>>>> in
>> >> >>>>> it )
>> >> >>>>>
>> >> >>>>> and then
>> >> >>>>> cd java/server
>> >> >>>>> mvn -X clean install -Dmaven.test.skip=true
>> >> >>>>>
>> >> >>>>>
>> >> >>>>> which will produce a lot of output.
>> >> >>>>>
>> >> >>>>> In that output there will be a section like below... the important
>> >> line
>> >> >>>>> is
>> >> >>>>> ^^^^ marked, if not, open a JIRA and attach the output
>> >> >>>>>
>> >> >>>>>
>> >> >>>>> [DEBUG] adding entry
>> >> >>>>>
>> >> WEB-INF/classes/gadgets/files/samplecontainer/state-basicfriendlist.xml
>> >> >>>>> [DEBUG] adding entry
>> >> >>>>>
>> >> WEB-INF/classes/gadgets/files/samplecontainer/state-smallfriendlist.xml
>> >> >>>>> [DEBUG] adding entry
>> >> >>>>> WEB-INF/classes/gadgets/files/samplecontainer/state.dtd
>> >> >>>>> [DEBUG] adding entry
>> >> >>>>> WEB-INF/classes/gadgets/files/sampledata/canonicaldb.json
>> >> >>>>> [DEBUG] adding entry WEB-INF/lib/caja-r1899.jar
>> >> >>>>> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  One more line
>> below
>> >> >>>>> [DEBUG] adding entry WEB-INF/lib/commons-beanutils-1.7.0.jar
>> >> >>>>> [DEBUG] adding entry WEB-INF/lib/commons-beanutils-core-1.7.0.jar
>> >> >>>>> [DEBUG] adding entry WEB-INF/lib/commons-betwixt-0.8.jar
>> >> >>>>> [DEBUG] adding entry WEB-INF/lib/commons-codec-1.3.jar
>> >> >>>>> [DEBUG] adding entry WEB-INF/lib/commons-collections-3.2.1.jar
>> >> >>>>> [DEBUG] adding entry WEB-INF/lib/commons-digester-1.7.jar
>> >> >>>>> [DEBUG] adding entry WEB-INF/lib/commons-httpclient-3.1.jar
>> >> >>>>> [DEBUG] adding entry WEB-INF/lib/commons-io-1.4.jar
>> >> >>>>> [DEBUG] adding entry WEB-INF/lib/commons-lang-2.3.jar
>> >> >>>>> [DEBUG] adding entry WEB-INF/lib/commons-logging-1.1.jar
>> >> >>>>> [DEBUG] adding entry WEB-INF/lib/core-20080621.jar
>> >> >>>>> [DEBUG] adding entry WEB-INF/lib/ezmorph-1.0.4.jar
>> >> >>>>> [DEBUG] adding entry
>> WEB-INF/lib/geronimo-stax-api_1.0_spec-1.0.1.jar
>> >> >>>>> [DEBUG] adding entry
>> WEB-INF/lib/google-collect-snapshot-20080321.jar
>> >> >>>>> [DEBUG] adding entry WEB-INF/lib/guice-1.0.jar
>> >> >>>>> [DEBUG] adding entry WEB-INF/lib/hamcrest-all-1.1.jar
>> >> >>>>> [DEBUG] adding entry WEB-INF/lib/htmlparser-1.0.7.jar
>> >> >>>>> [DEBUG] adding entry WEB-INF/lib/icu4j-3.8.jar
>> >> >>>>> [DEBUG] adding entry WEB-INF/lib/jdom-1.0.jar
>> >> >>>>> [DEBUG] adding entry WEB-INF/lib/joda-time-1.5.2.jar
>> >> >>>>> [DEBUG] adding entry WEB-INF/lib/json-20070829.jar
>> >> >>>>> [DEBUG] adding entry WEB-INF/lib/json-lib-2.2-jdk15.jar
>> >> >>>>> [DEBUG] adding entry WEB-INF/lib/json_simple-r1.jar
>> >> >>>>> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>> >> >>>>> [DEBUG] adding entry WEB-INF/lib/rome-0.9.jar
>> >> >>>>> [DEBUG] adding entry WEB-INF/lib/shindig-common-1-SNAPSHOT.jar
>> >> >>>>> [DEBUG] adding entry WEB-INF/lib/shindig-features-1-SNAPSHOT.jar
>> >> >>>>> [DEBUG] adding entry WEB-INF/lib/shindig-gadgets-1-SNAPSHOT.jar
>> >> >>>>> [DEBUG] adding entry WEB-INF/lib/shindig-social-api-1-SNAPSHOT.jar
>> >> >>>>> [DEBUG] adding entry WEB-INF/lib/xml-apis-1.0.b2.jar
>> >> >>>>> [DEBUG] adding entry WEB-INF/web.full.xml
>> >> >>>>> [DEBUG] adding entry WEB-INF/web.gadgets.xml
>> >> >>>>> [DEBUG] adding entry WEB-INF/web.social.xml
>> >> >>>>> [DEBUG] adding entry WEB-INF/web.xml
>> >> >>>>>
>> >> >>>>> On 23 Jul 2008, at 19:04, Ben Laurie wrote:
>> >> >>>>>
>> >> >>>>>> On Wed, Jul 23, 2008 at 7:00 PM, Ian Boston <ie...@tfd.co.uk>
>> wrote:
>> >> >>>>>>>
>> >> >>>>>>> I assume that you are using mvn -Prun ?
>> >> >>>>>>
>> >> >>>>>> Yup.
>> >> >>>>>>
>> >> >>>>>>> If so can you check that you have
>> >> >>>>>>>
>> >> >>>>>>>
>> >> >>>>>>>
>> >> >>>>>>>
>> >> >>>>>>>
>> >>
>> java/server/target/shindig-server-1-SNAPSHOT/WEB-INF/lib/json_simple-r1.jar
>> >> >>>>>>
>> >> >>>>>> No.
>> >> >>>>>>
>> >> >>>>>>> target/work/webapp/WEB-INF/lib/json_simple-r1.jar
>> >> >>>>>>
>> >> >>>>>> No.
>> >> >>>>>>
>> >> >>>>>>>
>> >> >>>>>>> after mvn -Prun
>> >> >>>>>>>
>> >> >>>>>>> and that when you untar it you see
>> >> >>>>>>>
>> >> >>>>>>> x43543:~/Apache/shindig/trunk ieb$ jar tvf
>> >> >>>>>>>
>> >> >>>>>>>
>> >> >>>>>>>
>> >> >>>>>>>
>> >>
>> java/server/target/shindig-server-1-SNAPSHOT/WEB-INF/lib/json_simple-r1.jar
>> >> >>>>>>>  0 Sun Apr 16 13:56:50 BST 2006 META-INF/
>> >> >>>>>>>  71 Sun Apr 16 13:56:50 BST 2006 META-INF/MANIFEST.MF
>> >> >>>>>>>  0 Sun Apr 16 04:05:08 BST 2006 org/
>> >> >>>>>>>  0 Sun Apr 16 04:05:08 BST 2006 org/json/
>> >> >>>>>>>  0 Sun Apr 16 04:05:08 BST 2006 org/json/simple/
>> >> >>>>>>>  0 Sun Apr 16 04:05:08 BST 2006 org/json/simple/parser/
>> >> >>>>>>>  1219 Sun Apr 16 04:05:10 BST 2006
>> >> >>>>>>> org/json/simple/parser/Yytoken.class
>> >> >>>>>>>  8513 Sun Apr 16 04:05:10 BST 2006
>> >> org/json/simple/parser/Yylex.class
>> >> >>>>>>>  3378 Sun Apr 16 04:05:10 BST 2006
>> >> >>>>>>> org/json/simple/parser/JSONParser.class
>> >> >>>>>>>  2100 Sun Apr 16 13:56:20 BST 2006 org/json/simple/Test.class
>> >> >>>>>>>  862 Sun Apr 16 04:05:12 BST 2006
>> org/json/simple/JSONValue.class
>> >> >>>>>>>  2441 Sun Apr 16 11:26:40 BST 2006
>> org/json/simple/JSONObject.class
>> >> >>>>>>>  1166 Sun Apr 16 04:05:12 BST 2006
>> org/json/simple/JSONArray.class
>> >> >>>>>>>  3936 Sun Apr 16 04:05:12 BST 2006
>> org/json/simple/ItemList.class
>> >> >>>>>>> x43543:~/Apache/shindig/trunk ieb$
>> >> >>>>>>>
>> >> >>>>>>>
>> >> >>>>>>> Also,
>> >> >>>>>>>
>> >> >>>>>>> Do you work behind a proxy or any on any network where to have
>> to
>> >> >>>>>>> authenticate on the network using a web browser. (sometimes the
>> >> jars
>> >> >>>>>>> are
>> >> >>>>>>> corrupt and contain HTML if you do)
>> >> >>>>>>
>> >> >>>>>> No.
>> >> >>>>>>
>> >> >>>>>>>
>> >> >>>>>>> Ian
>> >> >>>>>>>
>> >> >>>>>>> On 23 Jul 2008, at 18:32, Ben Laurie wrote:
>> >> >>>>>>>
>> >> >>>>>>>> Using the Caja sample,
>> >> >>>>>>>>
>> >> >>>>>>>>
>> >> >>>>>>>>
>> >> >>>>>>>>
>> >>
>> http://localhost:8080/gadgets/files/samplecontainer/samplecontainer.html,
>> >> >>>>>>>> gives me this error:
>> >> >>>>>>>>
>> >> >>>>>>>> HTTP ERROR: 500
>> >> >>>>>>>>
>> >> >>>>>>>> org/json/simple/JSONValue
>> >> >>>>>>>>
>> >> >>>>>>>> RequestURI=/gadgets/ifr
>> >> >>>>>>>> Caused by:
>> >> >>>>>>>>
>> >> >>>>>>>> java.lang.NoClassDefFoundError: org/json/simple/JSONValue
>> >> >>>>>>>>     at
>> >> >>>>>>>>
>> >> >>>>>>>>
>> >> >>>>>>>>
>> >> >>>>>>>>
>> >>
>> com.google.caja.config.ConfigUtil.loadWhiteListFromJson(ConfigUtil.java:134)
>> >> >>>>>>>>     at
>> >> >>>>>>>>
>> >> >>>>>>>>
>> >> >>>>>>>>
>> >> >>>>>>>>
>> >>
>> com.google.caja.lang.css.CssSchema.getDefaultCss21Schema(CssSchema.java:61)
>> >> >>>>>>>>     at
>> >> >>>>>>>> com.google.caja.plugin.PluginCompiler.(PluginCompiler.java:64)
>> >> >>>>>>>>     at
>> >> >>>>>>>>
>> >> >>>>>>>>
>> >> >>>>>>>>
>> >> >>>>>>>>
>> >>
>> com.google.caja.opensocial.DefaultGadgetRewriter.compileGadget(DefaultGadgetRewriter.java:179)
>> >> >>>>>>>
>> >> >>>>>>>
>> >> >>>>>
>> >> >>>>>
>> >> >>>
>> >> >>>
>> >> >
>> >> >
>> >>
>> >
>>
>

Re: Using Caja?

Posted by Cassie <do...@google.com>.
On Fri, Jul 25, 2008 at 8:48 AM, Ben Laurie <be...@google.com> wrote:

> On Fri, Jul 25, 2008 at 4:40 PM, Cassie <do...@apache.org> wrote:
> > Sorry I didn't see this before.
> > Caja is not broken - it just isn't turned on by default because it
> happens
> > to break a lot of gadgets even when included but disabled.
>
> It does? How can that be?


can't remember exactly why - maybe someone else on the list knows...
it had to do something with gadgets including libraries like prototype or
jquery or something... when those libraries and the caja js were both loaded
something conflicted. so, it was easier to just not include caja by default
as no production systems are integrating with it yet.


>
>
> > Simply uncomment features/opensocial-current/feature.xml line 23 and the
> > gadget will display nice and cajoled.
> >
> > - Cassie
> >
> > (Note: I just noticed that if you use the "reset all" button while caja
> mode
> > is turned on the gadget will fail with a js error. If you just reload the
> > page it will work again.
>
> If I reload the page won't I lose the "use caja" tick?


no. mike samuel fixed that with a patch a while back.


>
>
> > This is because the setevil bit isn't implemented
> > on the java server and thus returns a 501. I don't know why this is
> crashing
> > the caja stuff.. but it is. It doesn't fail on initial load because
> > apparently the initial load does not respect the evil bit (lol - another
> > bug))
>
> What is the evil bit?


it tries to return evil data - ie data containing unescaped javascript and
what not. used for trying to break gadgets with bad blindly unescaping
habits.
it isn't implemented atm because we did some refactoring and so it is
properly returning a 501 error. for some reason this causes the caja code to
crash (although it shouldn't - the non caja code is fine - i haven't looked
into it much though)


>
>
> >
> >
> >
> > On Thu, Jul 24, 2008 at 2:22 AM, Ben Laurie <be...@google.com> wrote:
> >
> >> On Thu, Jul 24, 2008 at 8:28 AM, Ian Boston <ie...@tfd.co.uk> wrote:
> >> > I get the same, I guess we have something broken in caja at the
> moment.
> >> :(
> >>
> >> A shame, since we just fixed it :-)
> >>
> >> > Ian
> >> >
> >> > On 23 Jul 2008, at 22:43, Ben Laurie wrote:
> >> >
> >> >> On Wed, Jul 23, 2008 at 10:32 PM, Ian Boston <ie...@tfd.co.uk> wrote:
> >> >>>
> >> >>> mvn  on its own is configured to mvn install which might leave some
> >> stale
> >> >>> state about in some of the projects. but normally
> >> >>>
> >> >>> mvn
> >> >>> mvn -Prun
> >> >>>
> >> >>>
> >> >>> *is* the right thing to do.
> >> >>>
> >> >>> what's the next failure ?
> >> >>
> >> >> The next failure is that with Caja enabled, the gadget is blank (with
> >> >> it disable it is fine).
> >> >>
> >> >>>
> >> >>> Ian
> >> >>>
> >> >>>
> >> >>> On 23 Jul 2008, at 22:17, Ben Laurie wrote:
> >> >>>
> >> >>>> On Wed, Jul 23, 2008 at 7:22 PM, Ian Boston <ie...@tfd.co.uk> wrote:
> >> >>>>>
> >> >>>>> Ok,
> >> >>>>>
> >> >>>>> can you do a
> >> >>>>>
> >> >>>>> mvn clean install
> >> >>>>
> >> >>>> I thought I'd experiment.
> >> >>>>
> >> >>>> mvn clean
> >> >>>> mvn
> >> >>>> mvn -Prun
> >> >>>>
> >> >>>> got me to the next failure - but what did I do wrong? Essentially
> my
> >> >>>> first try was this:
> >> >>>>
> >> >>>> svn update
> >> >>>> mvn
> >> >>>> mvn -Prun
> >> >>>>
> >> >>>> what should I have done?
> >> >>>>
> >> >>>>
> >> >>>>>
> >> >>>>> from the base directory (ie the one with features/ javascript/ and
> >> >>>>> java/
> >> >>>>> in
> >> >>>>> it )
> >> >>>>>
> >> >>>>> and then
> >> >>>>> cd java/server
> >> >>>>> mvn -X clean install -Dmaven.test.skip=true
> >> >>>>>
> >> >>>>>
> >> >>>>> which will produce a lot of output.
> >> >>>>>
> >> >>>>> In that output there will be a section like below... the important
> >> line
> >> >>>>> is
> >> >>>>> ^^^^ marked, if not, open a JIRA and attach the output
> >> >>>>>
> >> >>>>>
> >> >>>>> [DEBUG] adding entry
> >> >>>>>
> >> WEB-INF/classes/gadgets/files/samplecontainer/state-basicfriendlist.xml
> >> >>>>> [DEBUG] adding entry
> >> >>>>>
> >> WEB-INF/classes/gadgets/files/samplecontainer/state-smallfriendlist.xml
> >> >>>>> [DEBUG] adding entry
> >> >>>>> WEB-INF/classes/gadgets/files/samplecontainer/state.dtd
> >> >>>>> [DEBUG] adding entry
> >> >>>>> WEB-INF/classes/gadgets/files/sampledata/canonicaldb.json
> >> >>>>> [DEBUG] adding entry WEB-INF/lib/caja-r1899.jar
> >> >>>>> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  One more line
> below
> >> >>>>> [DEBUG] adding entry WEB-INF/lib/commons-beanutils-1.7.0.jar
> >> >>>>> [DEBUG] adding entry WEB-INF/lib/commons-beanutils-core-1.7.0.jar
> >> >>>>> [DEBUG] adding entry WEB-INF/lib/commons-betwixt-0.8.jar
> >> >>>>> [DEBUG] adding entry WEB-INF/lib/commons-codec-1.3.jar
> >> >>>>> [DEBUG] adding entry WEB-INF/lib/commons-collections-3.2.1.jar
> >> >>>>> [DEBUG] adding entry WEB-INF/lib/commons-digester-1.7.jar
> >> >>>>> [DEBUG] adding entry WEB-INF/lib/commons-httpclient-3.1.jar
> >> >>>>> [DEBUG] adding entry WEB-INF/lib/commons-io-1.4.jar
> >> >>>>> [DEBUG] adding entry WEB-INF/lib/commons-lang-2.3.jar
> >> >>>>> [DEBUG] adding entry WEB-INF/lib/commons-logging-1.1.jar
> >> >>>>> [DEBUG] adding entry WEB-INF/lib/core-20080621.jar
> >> >>>>> [DEBUG] adding entry WEB-INF/lib/ezmorph-1.0.4.jar
> >> >>>>> [DEBUG] adding entry
> WEB-INF/lib/geronimo-stax-api_1.0_spec-1.0.1.jar
> >> >>>>> [DEBUG] adding entry
> WEB-INF/lib/google-collect-snapshot-20080321.jar
> >> >>>>> [DEBUG] adding entry WEB-INF/lib/guice-1.0.jar
> >> >>>>> [DEBUG] adding entry WEB-INF/lib/hamcrest-all-1.1.jar
> >> >>>>> [DEBUG] adding entry WEB-INF/lib/htmlparser-1.0.7.jar
> >> >>>>> [DEBUG] adding entry WEB-INF/lib/icu4j-3.8.jar
> >> >>>>> [DEBUG] adding entry WEB-INF/lib/jdom-1.0.jar
> >> >>>>> [DEBUG] adding entry WEB-INF/lib/joda-time-1.5.2.jar
> >> >>>>> [DEBUG] adding entry WEB-INF/lib/json-20070829.jar
> >> >>>>> [DEBUG] adding entry WEB-INF/lib/json-lib-2.2-jdk15.jar
> >> >>>>> [DEBUG] adding entry WEB-INF/lib/json_simple-r1.jar
> >> >>>>> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> >> >>>>> [DEBUG] adding entry WEB-INF/lib/rome-0.9.jar
> >> >>>>> [DEBUG] adding entry WEB-INF/lib/shindig-common-1-SNAPSHOT.jar
> >> >>>>> [DEBUG] adding entry WEB-INF/lib/shindig-features-1-SNAPSHOT.jar
> >> >>>>> [DEBUG] adding entry WEB-INF/lib/shindig-gadgets-1-SNAPSHOT.jar
> >> >>>>> [DEBUG] adding entry WEB-INF/lib/shindig-social-api-1-SNAPSHOT.jar
> >> >>>>> [DEBUG] adding entry WEB-INF/lib/xml-apis-1.0.b2.jar
> >> >>>>> [DEBUG] adding entry WEB-INF/web.full.xml
> >> >>>>> [DEBUG] adding entry WEB-INF/web.gadgets.xml
> >> >>>>> [DEBUG] adding entry WEB-INF/web.social.xml
> >> >>>>> [DEBUG] adding entry WEB-INF/web.xml
> >> >>>>>
> >> >>>>> On 23 Jul 2008, at 19:04, Ben Laurie wrote:
> >> >>>>>
> >> >>>>>> On Wed, Jul 23, 2008 at 7:00 PM, Ian Boston <ie...@tfd.co.uk>
> wrote:
> >> >>>>>>>
> >> >>>>>>> I assume that you are using mvn -Prun ?
> >> >>>>>>
> >> >>>>>> Yup.
> >> >>>>>>
> >> >>>>>>> If so can you check that you have
> >> >>>>>>>
> >> >>>>>>>
> >> >>>>>>>
> >> >>>>>>>
> >> >>>>>>>
> >>
> java/server/target/shindig-server-1-SNAPSHOT/WEB-INF/lib/json_simple-r1.jar
> >> >>>>>>
> >> >>>>>> No.
> >> >>>>>>
> >> >>>>>>> target/work/webapp/WEB-INF/lib/json_simple-r1.jar
> >> >>>>>>
> >> >>>>>> No.
> >> >>>>>>
> >> >>>>>>>
> >> >>>>>>> after mvn -Prun
> >> >>>>>>>
> >> >>>>>>> and that when you untar it you see
> >> >>>>>>>
> >> >>>>>>> x43543:~/Apache/shindig/trunk ieb$ jar tvf
> >> >>>>>>>
> >> >>>>>>>
> >> >>>>>>>
> >> >>>>>>>
> >>
> java/server/target/shindig-server-1-SNAPSHOT/WEB-INF/lib/json_simple-r1.jar
> >> >>>>>>>  0 Sun Apr 16 13:56:50 BST 2006 META-INF/
> >> >>>>>>>  71 Sun Apr 16 13:56:50 BST 2006 META-INF/MANIFEST.MF
> >> >>>>>>>  0 Sun Apr 16 04:05:08 BST 2006 org/
> >> >>>>>>>  0 Sun Apr 16 04:05:08 BST 2006 org/json/
> >> >>>>>>>  0 Sun Apr 16 04:05:08 BST 2006 org/json/simple/
> >> >>>>>>>  0 Sun Apr 16 04:05:08 BST 2006 org/json/simple/parser/
> >> >>>>>>>  1219 Sun Apr 16 04:05:10 BST 2006
> >> >>>>>>> org/json/simple/parser/Yytoken.class
> >> >>>>>>>  8513 Sun Apr 16 04:05:10 BST 2006
> >> org/json/simple/parser/Yylex.class
> >> >>>>>>>  3378 Sun Apr 16 04:05:10 BST 2006
> >> >>>>>>> org/json/simple/parser/JSONParser.class
> >> >>>>>>>  2100 Sun Apr 16 13:56:20 BST 2006 org/json/simple/Test.class
> >> >>>>>>>  862 Sun Apr 16 04:05:12 BST 2006
> org/json/simple/JSONValue.class
> >> >>>>>>>  2441 Sun Apr 16 11:26:40 BST 2006
> org/json/simple/JSONObject.class
> >> >>>>>>>  1166 Sun Apr 16 04:05:12 BST 2006
> org/json/simple/JSONArray.class
> >> >>>>>>>  3936 Sun Apr 16 04:05:12 BST 2006
> org/json/simple/ItemList.class
> >> >>>>>>> x43543:~/Apache/shindig/trunk ieb$
> >> >>>>>>>
> >> >>>>>>>
> >> >>>>>>> Also,
> >> >>>>>>>
> >> >>>>>>> Do you work behind a proxy or any on any network where to have
> to
> >> >>>>>>> authenticate on the network using a web browser. (sometimes the
> >> jars
> >> >>>>>>> are
> >> >>>>>>> corrupt and contain HTML if you do)
> >> >>>>>>
> >> >>>>>> No.
> >> >>>>>>
> >> >>>>>>>
> >> >>>>>>> Ian
> >> >>>>>>>
> >> >>>>>>> On 23 Jul 2008, at 18:32, Ben Laurie wrote:
> >> >>>>>>>
> >> >>>>>>>> Using the Caja sample,
> >> >>>>>>>>
> >> >>>>>>>>
> >> >>>>>>>>
> >> >>>>>>>>
> >>
> http://localhost:8080/gadgets/files/samplecontainer/samplecontainer.html,
> >> >>>>>>>> gives me this error:
> >> >>>>>>>>
> >> >>>>>>>> HTTP ERROR: 500
> >> >>>>>>>>
> >> >>>>>>>> org/json/simple/JSONValue
> >> >>>>>>>>
> >> >>>>>>>> RequestURI=/gadgets/ifr
> >> >>>>>>>> Caused by:
> >> >>>>>>>>
> >> >>>>>>>> java.lang.NoClassDefFoundError: org/json/simple/JSONValue
> >> >>>>>>>>     at
> >> >>>>>>>>
> >> >>>>>>>>
> >> >>>>>>>>
> >> >>>>>>>>
> >>
> com.google.caja.config.ConfigUtil.loadWhiteListFromJson(ConfigUtil.java:134)
> >> >>>>>>>>     at
> >> >>>>>>>>
> >> >>>>>>>>
> >> >>>>>>>>
> >> >>>>>>>>
> >>
> com.google.caja.lang.css.CssSchema.getDefaultCss21Schema(CssSchema.java:61)
> >> >>>>>>>>     at
> >> >>>>>>>> com.google.caja.plugin.PluginCompiler.(PluginCompiler.java:64)
> >> >>>>>>>>     at
> >> >>>>>>>>
> >> >>>>>>>>
> >> >>>>>>>>
> >> >>>>>>>>
> >>
> com.google.caja.opensocial.DefaultGadgetRewriter.compileGadget(DefaultGadgetRewriter.java:179)
> >> >>>>>>>
> >> >>>>>>>
> >> >>>>>
> >> >>>>>
> >> >>>
> >> >>>
> >> >
> >> >
> >>
> >
>

Re: Using Caja?

Posted by Ben Laurie <be...@google.com>.
On Fri, Jul 25, 2008 at 5:57 PM, Kevin Brown <et...@google.com> wrote:
> On Fri, Jul 25, 2008 at 8:48 AM, Ben Laurie <be...@google.com> wrote:
>
>> On Fri, Jul 25, 2008 at 4:40 PM, Cassie <do...@apache.org> wrote:
>> > Sorry I didn't see this before.
>> > Caja is not broken - it just isn't turned on by default because it
>> happens
>> > to break a lot of gadgets even when included but disabled.
>>
>> It does? How can that be?
>
>
> Previously, most gadgets broke because of the lack of DOM taming. Has that
> been addressed? The most critical thing was being able to use innerHTML.

Yes.

>
>
>>
>>
>> > Simply uncomment features/opensocial-current/feature.xml line 23 and the
>> > gadget will display nice and cajoled.
>> >
>> > - Cassie
>> >
>> > (Note: I just noticed that if you use the "reset all" button while caja
>> mode
>> > is turned on the gadget will fail with a js error. If you just reload the
>> > page it will work again.
>>
>> If I reload the page won't I lose the "use caja" tick?
>>
>> > This is because the setevil bit isn't implemented
>> > on the java server and thus returns a 501. I don't know why this is
>> crashing
>> > the caja stuff.. but it is. It doesn't fail on initial load because
>> > apparently the initial load does not respect the evil bit (lol - another
>> > bug))
>>
>> What is the evil bit?
>>
>> >
>> >
>> >
>> > On Thu, Jul 24, 2008 at 2:22 AM, Ben Laurie <be...@google.com> wrote:
>> >
>> >> On Thu, Jul 24, 2008 at 8:28 AM, Ian Boston <ie...@tfd.co.uk> wrote:
>> >> > I get the same, I guess we have something broken in caja at the
>> moment.
>> >> :(
>> >>
>> >> A shame, since we just fixed it :-)
>> >>
>> >> > Ian
>> >> >
>> >> > On 23 Jul 2008, at 22:43, Ben Laurie wrote:
>> >> >
>> >> >> On Wed, Jul 23, 2008 at 10:32 PM, Ian Boston <ie...@tfd.co.uk> wrote:
>> >> >>>
>> >> >>> mvn  on its own is configured to mvn install which might leave some
>> >> stale
>> >> >>> state about in some of the projects. but normally
>> >> >>>
>> >> >>> mvn
>> >> >>> mvn -Prun
>> >> >>>
>> >> >>>
>> >> >>> *is* the right thing to do.
>> >> >>>
>> >> >>> what's the next failure ?
>> >> >>
>> >> >> The next failure is that with Caja enabled, the gadget is blank (with
>> >> >> it disable it is fine).
>> >> >>
>> >> >>>
>> >> >>> Ian
>> >> >>>
>> >> >>>
>> >> >>> On 23 Jul 2008, at 22:17, Ben Laurie wrote:
>> >> >>>
>> >> >>>> On Wed, Jul 23, 2008 at 7:22 PM, Ian Boston <ie...@tfd.co.uk> wrote:
>> >> >>>>>
>> >> >>>>> Ok,
>> >> >>>>>
>> >> >>>>> can you do a
>> >> >>>>>
>> >> >>>>> mvn clean install
>> >> >>>>
>> >> >>>> I thought I'd experiment.
>> >> >>>>
>> >> >>>> mvn clean
>> >> >>>> mvn
>> >> >>>> mvn -Prun
>> >> >>>>
>> >> >>>> got me to the next failure - but what did I do wrong? Essentially
>> my
>> >> >>>> first try was this:
>> >> >>>>
>> >> >>>> svn update
>> >> >>>> mvn
>> >> >>>> mvn -Prun
>> >> >>>>
>> >> >>>> what should I have done?
>> >> >>>>
>> >> >>>>
>> >> >>>>>
>> >> >>>>> from the base directory (ie the one with features/ javascript/ and
>> >> >>>>> java/
>> >> >>>>> in
>> >> >>>>> it )
>> >> >>>>>
>> >> >>>>> and then
>> >> >>>>> cd java/server
>> >> >>>>> mvn -X clean install -Dmaven.test.skip=true
>> >> >>>>>
>> >> >>>>>
>> >> >>>>> which will produce a lot of output.
>> >> >>>>>
>> >> >>>>> In that output there will be a section like below... the important
>> >> line
>> >> >>>>> is
>> >> >>>>> ^^^^ marked, if not, open a JIRA and attach the output
>> >> >>>>>
>> >> >>>>>
>> >> >>>>> [DEBUG] adding entry
>> >> >>>>>
>> >> WEB-INF/classes/gadgets/files/samplecontainer/state-basicfriendlist.xml
>> >> >>>>> [DEBUG] adding entry
>> >> >>>>>
>> >> WEB-INF/classes/gadgets/files/samplecontainer/state-smallfriendlist.xml
>> >> >>>>> [DEBUG] adding entry
>> >> >>>>> WEB-INF/classes/gadgets/files/samplecontainer/state.dtd
>> >> >>>>> [DEBUG] adding entry
>> >> >>>>> WEB-INF/classes/gadgets/files/sampledata/canonicaldb.json
>> >> >>>>> [DEBUG] adding entry WEB-INF/lib/caja-r1899.jar
>> >> >>>>> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  One more line
>> below
>> >> >>>>> [DEBUG] adding entry WEB-INF/lib/commons-beanutils-1.7.0.jar
>> >> >>>>> [DEBUG] adding entry WEB-INF/lib/commons-beanutils-core-1.7.0.jar
>> >> >>>>> [DEBUG] adding entry WEB-INF/lib/commons-betwixt-0.8.jar
>> >> >>>>> [DEBUG] adding entry WEB-INF/lib/commons-codec-1.3.jar
>> >> >>>>> [DEBUG] adding entry WEB-INF/lib/commons-collections-3.2.1.jar
>> >> >>>>> [DEBUG] adding entry WEB-INF/lib/commons-digester-1.7.jar
>> >> >>>>> [DEBUG] adding entry WEB-INF/lib/commons-httpclient-3.1.jar
>> >> >>>>> [DEBUG] adding entry WEB-INF/lib/commons-io-1.4.jar
>> >> >>>>> [DEBUG] adding entry WEB-INF/lib/commons-lang-2.3.jar
>> >> >>>>> [DEBUG] adding entry WEB-INF/lib/commons-logging-1.1.jar
>> >> >>>>> [DEBUG] adding entry WEB-INF/lib/core-20080621.jar
>> >> >>>>> [DEBUG] adding entry WEB-INF/lib/ezmorph-1.0.4.jar
>> >> >>>>> [DEBUG] adding entry
>> WEB-INF/lib/geronimo-stax-api_1.0_spec-1.0.1.jar
>> >> >>>>> [DEBUG] adding entry
>> WEB-INF/lib/google-collect-snapshot-20080321.jar
>> >> >>>>> [DEBUG] adding entry WEB-INF/lib/guice-1.0.jar
>> >> >>>>> [DEBUG] adding entry WEB-INF/lib/hamcrest-all-1.1.jar
>> >> >>>>> [DEBUG] adding entry WEB-INF/lib/htmlparser-1.0.7.jar
>> >> >>>>> [DEBUG] adding entry WEB-INF/lib/icu4j-3.8.jar
>> >> >>>>> [DEBUG] adding entry WEB-INF/lib/jdom-1.0.jar
>> >> >>>>> [DEBUG] adding entry WEB-INF/lib/joda-time-1.5.2.jar
>> >> >>>>> [DEBUG] adding entry WEB-INF/lib/json-20070829.jar
>> >> >>>>> [DEBUG] adding entry WEB-INF/lib/json-lib-2.2-jdk15.jar
>> >> >>>>> [DEBUG] adding entry WEB-INF/lib/json_simple-r1.jar
>> >> >>>>> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>> >> >>>>> [DEBUG] adding entry WEB-INF/lib/rome-0.9.jar
>> >> >>>>> [DEBUG] adding entry WEB-INF/lib/shindig-common-1-SNAPSHOT.jar
>> >> >>>>> [DEBUG] adding entry WEB-INF/lib/shindig-features-1-SNAPSHOT.jar
>> >> >>>>> [DEBUG] adding entry WEB-INF/lib/shindig-gadgets-1-SNAPSHOT.jar
>> >> >>>>> [DEBUG] adding entry WEB-INF/lib/shindig-social-api-1-SNAPSHOT.jar
>> >> >>>>> [DEBUG] adding entry WEB-INF/lib/xml-apis-1.0.b2.jar
>> >> >>>>> [DEBUG] adding entry WEB-INF/web.full.xml
>> >> >>>>> [DEBUG] adding entry WEB-INF/web.gadgets.xml
>> >> >>>>> [DEBUG] adding entry WEB-INF/web.social.xml
>> >> >>>>> [DEBUG] adding entry WEB-INF/web.xml
>> >> >>>>>
>> >> >>>>> On 23 Jul 2008, at 19:04, Ben Laurie wrote:
>> >> >>>>>
>> >> >>>>>> On Wed, Jul 23, 2008 at 7:00 PM, Ian Boston <ie...@tfd.co.uk>
>> wrote:
>> >> >>>>>>>
>> >> >>>>>>> I assume that you are using mvn -Prun ?
>> >> >>>>>>
>> >> >>>>>> Yup.
>> >> >>>>>>
>> >> >>>>>>> If so can you check that you have
>> >> >>>>>>>
>> >> >>>>>>>
>> >> >>>>>>>
>> >> >>>>>>>
>> >> >>>>>>>
>> >>
>> java/server/target/shindig-server-1-SNAPSHOT/WEB-INF/lib/json_simple-r1.jar
>> >> >>>>>>
>> >> >>>>>> No.
>> >> >>>>>>
>> >> >>>>>>> target/work/webapp/WEB-INF/lib/json_simple-r1.jar
>> >> >>>>>>
>> >> >>>>>> No.
>> >> >>>>>>
>> >> >>>>>>>
>> >> >>>>>>> after mvn -Prun
>> >> >>>>>>>
>> >> >>>>>>> and that when you untar it you see
>> >> >>>>>>>
>> >> >>>>>>> x43543:~/Apache/shindig/trunk ieb$ jar tvf
>> >> >>>>>>>
>> >> >>>>>>>
>> >> >>>>>>>
>> >> >>>>>>>
>> >>
>> java/server/target/shindig-server-1-SNAPSHOT/WEB-INF/lib/json_simple-r1.jar
>> >> >>>>>>>  0 Sun Apr 16 13:56:50 BST 2006 META-INF/
>> >> >>>>>>>  71 Sun Apr 16 13:56:50 BST 2006 META-INF/MANIFEST.MF
>> >> >>>>>>>  0 Sun Apr 16 04:05:08 BST 2006 org/
>> >> >>>>>>>  0 Sun Apr 16 04:05:08 BST 2006 org/json/
>> >> >>>>>>>  0 Sun Apr 16 04:05:08 BST 2006 org/json/simple/
>> >> >>>>>>>  0 Sun Apr 16 04:05:08 BST 2006 org/json/simple/parser/
>> >> >>>>>>>  1219 Sun Apr 16 04:05:10 BST 2006
>> >> >>>>>>> org/json/simple/parser/Yytoken.class
>> >> >>>>>>>  8513 Sun Apr 16 04:05:10 BST 2006
>> >> org/json/simple/parser/Yylex.class
>> >> >>>>>>>  3378 Sun Apr 16 04:05:10 BST 2006
>> >> >>>>>>> org/json/simple/parser/JSONParser.class
>> >> >>>>>>>  2100 Sun Apr 16 13:56:20 BST 2006 org/json/simple/Test.class
>> >> >>>>>>>  862 Sun Apr 16 04:05:12 BST 2006
>> org/json/simple/JSONValue.class
>> >> >>>>>>>  2441 Sun Apr 16 11:26:40 BST 2006
>> org/json/simple/JSONObject.class
>> >> >>>>>>>  1166 Sun Apr 16 04:05:12 BST 2006
>> org/json/simple/JSONArray.class
>> >> >>>>>>>  3936 Sun Apr 16 04:05:12 BST 2006
>> org/json/simple/ItemList.class
>> >> >>>>>>> x43543:~/Apache/shindig/trunk ieb$
>> >> >>>>>>>
>> >> >>>>>>>
>> >> >>>>>>> Also,
>> >> >>>>>>>
>> >> >>>>>>> Do you work behind a proxy or any on any network where to have
>> to
>> >> >>>>>>> authenticate on the network using a web browser. (sometimes the
>> >> jars
>> >> >>>>>>> are
>> >> >>>>>>> corrupt and contain HTML if you do)
>> >> >>>>>>
>> >> >>>>>> No.
>> >> >>>>>>
>> >> >>>>>>>
>> >> >>>>>>> Ian
>> >> >>>>>>>
>> >> >>>>>>> On 23 Jul 2008, at 18:32, Ben Laurie wrote:
>> >> >>>>>>>
>> >> >>>>>>>> Using the Caja sample,
>> >> >>>>>>>>
>> >> >>>>>>>>
>> >> >>>>>>>>
>> >> >>>>>>>>
>> >>
>> http://localhost:8080/gadgets/files/samplecontainer/samplecontainer.html,
>> >> >>>>>>>> gives me this error:
>> >> >>>>>>>>
>> >> >>>>>>>> HTTP ERROR: 500
>> >> >>>>>>>>
>> >> >>>>>>>> org/json/simple/JSONValue
>> >> >>>>>>>>
>> >> >>>>>>>> RequestURI=/gadgets/ifr
>> >> >>>>>>>> Caused by:
>> >> >>>>>>>>
>> >> >>>>>>>> java.lang.NoClassDefFoundError: org/json/simple/JSONValue
>> >> >>>>>>>>     at
>> >> >>>>>>>>
>> >> >>>>>>>>
>> >> >>>>>>>>
>> >> >>>>>>>>
>> >>
>> com.google.caja.config.ConfigUtil.loadWhiteListFromJson(ConfigUtil.java:134)
>> >> >>>>>>>>     at
>> >> >>>>>>>>
>> >> >>>>>>>>
>> >> >>>>>>>>
>> >> >>>>>>>>
>> >>
>> com.google.caja.lang.css.CssSchema.getDefaultCss21Schema(CssSchema.java:61)
>> >> >>>>>>>>     at
>> >> >>>>>>>> com.google.caja.plugin.PluginCompiler.(PluginCompiler.java:64)
>> >> >>>>>>>>     at
>> >> >>>>>>>>
>> >> >>>>>>>>
>> >> >>>>>>>>
>> >> >>>>>>>>
>> >>
>> com.google.caja.opensocial.DefaultGadgetRewriter.compileGadget(DefaultGadgetRewriter.java:179)
>> >> >>>>>>>
>> >> >>>>>>>
>> >> >>>>>
>> >> >>>>>
>> >> >>>
>> >> >>>
>> >> >
>> >> >
>> >>
>> >
>>
>

Re: Using Caja?

Posted by Kevin Brown <et...@google.com>.
On Fri, Jul 25, 2008 at 8:48 AM, Ben Laurie <be...@google.com> wrote:

> On Fri, Jul 25, 2008 at 4:40 PM, Cassie <do...@apache.org> wrote:
> > Sorry I didn't see this before.
> > Caja is not broken - it just isn't turned on by default because it
> happens
> > to break a lot of gadgets even when included but disabled.
>
> It does? How can that be?


Previously, most gadgets broke because of the lack of DOM taming. Has that
been addressed? The most critical thing was being able to use innerHTML.


>
>
> > Simply uncomment features/opensocial-current/feature.xml line 23 and the
> > gadget will display nice and cajoled.
> >
> > - Cassie
> >
> > (Note: I just noticed that if you use the "reset all" button while caja
> mode
> > is turned on the gadget will fail with a js error. If you just reload the
> > page it will work again.
>
> If I reload the page won't I lose the "use caja" tick?
>
> > This is because the setevil bit isn't implemented
> > on the java server and thus returns a 501. I don't know why this is
> crashing
> > the caja stuff.. but it is. It doesn't fail on initial load because
> > apparently the initial load does not respect the evil bit (lol - another
> > bug))
>
> What is the evil bit?
>
> >
> >
> >
> > On Thu, Jul 24, 2008 at 2:22 AM, Ben Laurie <be...@google.com> wrote:
> >
> >> On Thu, Jul 24, 2008 at 8:28 AM, Ian Boston <ie...@tfd.co.uk> wrote:
> >> > I get the same, I guess we have something broken in caja at the
> moment.
> >> :(
> >>
> >> A shame, since we just fixed it :-)
> >>
> >> > Ian
> >> >
> >> > On 23 Jul 2008, at 22:43, Ben Laurie wrote:
> >> >
> >> >> On Wed, Jul 23, 2008 at 10:32 PM, Ian Boston <ie...@tfd.co.uk> wrote:
> >> >>>
> >> >>> mvn  on its own is configured to mvn install which might leave some
> >> stale
> >> >>> state about in some of the projects. but normally
> >> >>>
> >> >>> mvn
> >> >>> mvn -Prun
> >> >>>
> >> >>>
> >> >>> *is* the right thing to do.
> >> >>>
> >> >>> what's the next failure ?
> >> >>
> >> >> The next failure is that with Caja enabled, the gadget is blank (with
> >> >> it disable it is fine).
> >> >>
> >> >>>
> >> >>> Ian
> >> >>>
> >> >>>
> >> >>> On 23 Jul 2008, at 22:17, Ben Laurie wrote:
> >> >>>
> >> >>>> On Wed, Jul 23, 2008 at 7:22 PM, Ian Boston <ie...@tfd.co.uk> wrote:
> >> >>>>>
> >> >>>>> Ok,
> >> >>>>>
> >> >>>>> can you do a
> >> >>>>>
> >> >>>>> mvn clean install
> >> >>>>
> >> >>>> I thought I'd experiment.
> >> >>>>
> >> >>>> mvn clean
> >> >>>> mvn
> >> >>>> mvn -Prun
> >> >>>>
> >> >>>> got me to the next failure - but what did I do wrong? Essentially
> my
> >> >>>> first try was this:
> >> >>>>
> >> >>>> svn update
> >> >>>> mvn
> >> >>>> mvn -Prun
> >> >>>>
> >> >>>> what should I have done?
> >> >>>>
> >> >>>>
> >> >>>>>
> >> >>>>> from the base directory (ie the one with features/ javascript/ and
> >> >>>>> java/
> >> >>>>> in
> >> >>>>> it )
> >> >>>>>
> >> >>>>> and then
> >> >>>>> cd java/server
> >> >>>>> mvn -X clean install -Dmaven.test.skip=true
> >> >>>>>
> >> >>>>>
> >> >>>>> which will produce a lot of output.
> >> >>>>>
> >> >>>>> In that output there will be a section like below... the important
> >> line
> >> >>>>> is
> >> >>>>> ^^^^ marked, if not, open a JIRA and attach the output
> >> >>>>>
> >> >>>>>
> >> >>>>> [DEBUG] adding entry
> >> >>>>>
> >> WEB-INF/classes/gadgets/files/samplecontainer/state-basicfriendlist.xml
> >> >>>>> [DEBUG] adding entry
> >> >>>>>
> >> WEB-INF/classes/gadgets/files/samplecontainer/state-smallfriendlist.xml
> >> >>>>> [DEBUG] adding entry
> >> >>>>> WEB-INF/classes/gadgets/files/samplecontainer/state.dtd
> >> >>>>> [DEBUG] adding entry
> >> >>>>> WEB-INF/classes/gadgets/files/sampledata/canonicaldb.json
> >> >>>>> [DEBUG] adding entry WEB-INF/lib/caja-r1899.jar
> >> >>>>> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  One more line
> below
> >> >>>>> [DEBUG] adding entry WEB-INF/lib/commons-beanutils-1.7.0.jar
> >> >>>>> [DEBUG] adding entry WEB-INF/lib/commons-beanutils-core-1.7.0.jar
> >> >>>>> [DEBUG] adding entry WEB-INF/lib/commons-betwixt-0.8.jar
> >> >>>>> [DEBUG] adding entry WEB-INF/lib/commons-codec-1.3.jar
> >> >>>>> [DEBUG] adding entry WEB-INF/lib/commons-collections-3.2.1.jar
> >> >>>>> [DEBUG] adding entry WEB-INF/lib/commons-digester-1.7.jar
> >> >>>>> [DEBUG] adding entry WEB-INF/lib/commons-httpclient-3.1.jar
> >> >>>>> [DEBUG] adding entry WEB-INF/lib/commons-io-1.4.jar
> >> >>>>> [DEBUG] adding entry WEB-INF/lib/commons-lang-2.3.jar
> >> >>>>> [DEBUG] adding entry WEB-INF/lib/commons-logging-1.1.jar
> >> >>>>> [DEBUG] adding entry WEB-INF/lib/core-20080621.jar
> >> >>>>> [DEBUG] adding entry WEB-INF/lib/ezmorph-1.0.4.jar
> >> >>>>> [DEBUG] adding entry
> WEB-INF/lib/geronimo-stax-api_1.0_spec-1.0.1.jar
> >> >>>>> [DEBUG] adding entry
> WEB-INF/lib/google-collect-snapshot-20080321.jar
> >> >>>>> [DEBUG] adding entry WEB-INF/lib/guice-1.0.jar
> >> >>>>> [DEBUG] adding entry WEB-INF/lib/hamcrest-all-1.1.jar
> >> >>>>> [DEBUG] adding entry WEB-INF/lib/htmlparser-1.0.7.jar
> >> >>>>> [DEBUG] adding entry WEB-INF/lib/icu4j-3.8.jar
> >> >>>>> [DEBUG] adding entry WEB-INF/lib/jdom-1.0.jar
> >> >>>>> [DEBUG] adding entry WEB-INF/lib/joda-time-1.5.2.jar
> >> >>>>> [DEBUG] adding entry WEB-INF/lib/json-20070829.jar
> >> >>>>> [DEBUG] adding entry WEB-INF/lib/json-lib-2.2-jdk15.jar
> >> >>>>> [DEBUG] adding entry WEB-INF/lib/json_simple-r1.jar
> >> >>>>> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> >> >>>>> [DEBUG] adding entry WEB-INF/lib/rome-0.9.jar
> >> >>>>> [DEBUG] adding entry WEB-INF/lib/shindig-common-1-SNAPSHOT.jar
> >> >>>>> [DEBUG] adding entry WEB-INF/lib/shindig-features-1-SNAPSHOT.jar
> >> >>>>> [DEBUG] adding entry WEB-INF/lib/shindig-gadgets-1-SNAPSHOT.jar
> >> >>>>> [DEBUG] adding entry WEB-INF/lib/shindig-social-api-1-SNAPSHOT.jar
> >> >>>>> [DEBUG] adding entry WEB-INF/lib/xml-apis-1.0.b2.jar
> >> >>>>> [DEBUG] adding entry WEB-INF/web.full.xml
> >> >>>>> [DEBUG] adding entry WEB-INF/web.gadgets.xml
> >> >>>>> [DEBUG] adding entry WEB-INF/web.social.xml
> >> >>>>> [DEBUG] adding entry WEB-INF/web.xml
> >> >>>>>
> >> >>>>> On 23 Jul 2008, at 19:04, Ben Laurie wrote:
> >> >>>>>
> >> >>>>>> On Wed, Jul 23, 2008 at 7:00 PM, Ian Boston <ie...@tfd.co.uk>
> wrote:
> >> >>>>>>>
> >> >>>>>>> I assume that you are using mvn -Prun ?
> >> >>>>>>
> >> >>>>>> Yup.
> >> >>>>>>
> >> >>>>>>> If so can you check that you have
> >> >>>>>>>
> >> >>>>>>>
> >> >>>>>>>
> >> >>>>>>>
> >> >>>>>>>
> >>
> java/server/target/shindig-server-1-SNAPSHOT/WEB-INF/lib/json_simple-r1.jar
> >> >>>>>>
> >> >>>>>> No.
> >> >>>>>>
> >> >>>>>>> target/work/webapp/WEB-INF/lib/json_simple-r1.jar
> >> >>>>>>
> >> >>>>>> No.
> >> >>>>>>
> >> >>>>>>>
> >> >>>>>>> after mvn -Prun
> >> >>>>>>>
> >> >>>>>>> and that when you untar it you see
> >> >>>>>>>
> >> >>>>>>> x43543:~/Apache/shindig/trunk ieb$ jar tvf
> >> >>>>>>>
> >> >>>>>>>
> >> >>>>>>>
> >> >>>>>>>
> >>
> java/server/target/shindig-server-1-SNAPSHOT/WEB-INF/lib/json_simple-r1.jar
> >> >>>>>>>  0 Sun Apr 16 13:56:50 BST 2006 META-INF/
> >> >>>>>>>  71 Sun Apr 16 13:56:50 BST 2006 META-INF/MANIFEST.MF
> >> >>>>>>>  0 Sun Apr 16 04:05:08 BST 2006 org/
> >> >>>>>>>  0 Sun Apr 16 04:05:08 BST 2006 org/json/
> >> >>>>>>>  0 Sun Apr 16 04:05:08 BST 2006 org/json/simple/
> >> >>>>>>>  0 Sun Apr 16 04:05:08 BST 2006 org/json/simple/parser/
> >> >>>>>>>  1219 Sun Apr 16 04:05:10 BST 2006
> >> >>>>>>> org/json/simple/parser/Yytoken.class
> >> >>>>>>>  8513 Sun Apr 16 04:05:10 BST 2006
> >> org/json/simple/parser/Yylex.class
> >> >>>>>>>  3378 Sun Apr 16 04:05:10 BST 2006
> >> >>>>>>> org/json/simple/parser/JSONParser.class
> >> >>>>>>>  2100 Sun Apr 16 13:56:20 BST 2006 org/json/simple/Test.class
> >> >>>>>>>  862 Sun Apr 16 04:05:12 BST 2006
> org/json/simple/JSONValue.class
> >> >>>>>>>  2441 Sun Apr 16 11:26:40 BST 2006
> org/json/simple/JSONObject.class
> >> >>>>>>>  1166 Sun Apr 16 04:05:12 BST 2006
> org/json/simple/JSONArray.class
> >> >>>>>>>  3936 Sun Apr 16 04:05:12 BST 2006
> org/json/simple/ItemList.class
> >> >>>>>>> x43543:~/Apache/shindig/trunk ieb$
> >> >>>>>>>
> >> >>>>>>>
> >> >>>>>>> Also,
> >> >>>>>>>
> >> >>>>>>> Do you work behind a proxy or any on any network where to have
> to
> >> >>>>>>> authenticate on the network using a web browser. (sometimes the
> >> jars
> >> >>>>>>> are
> >> >>>>>>> corrupt and contain HTML if you do)
> >> >>>>>>
> >> >>>>>> No.
> >> >>>>>>
> >> >>>>>>>
> >> >>>>>>> Ian
> >> >>>>>>>
> >> >>>>>>> On 23 Jul 2008, at 18:32, Ben Laurie wrote:
> >> >>>>>>>
> >> >>>>>>>> Using the Caja sample,
> >> >>>>>>>>
> >> >>>>>>>>
> >> >>>>>>>>
> >> >>>>>>>>
> >>
> http://localhost:8080/gadgets/files/samplecontainer/samplecontainer.html,
> >> >>>>>>>> gives me this error:
> >> >>>>>>>>
> >> >>>>>>>> HTTP ERROR: 500
> >> >>>>>>>>
> >> >>>>>>>> org/json/simple/JSONValue
> >> >>>>>>>>
> >> >>>>>>>> RequestURI=/gadgets/ifr
> >> >>>>>>>> Caused by:
> >> >>>>>>>>
> >> >>>>>>>> java.lang.NoClassDefFoundError: org/json/simple/JSONValue
> >> >>>>>>>>     at
> >> >>>>>>>>
> >> >>>>>>>>
> >> >>>>>>>>
> >> >>>>>>>>
> >>
> com.google.caja.config.ConfigUtil.loadWhiteListFromJson(ConfigUtil.java:134)
> >> >>>>>>>>     at
> >> >>>>>>>>
> >> >>>>>>>>
> >> >>>>>>>>
> >> >>>>>>>>
> >>
> com.google.caja.lang.css.CssSchema.getDefaultCss21Schema(CssSchema.java:61)
> >> >>>>>>>>     at
> >> >>>>>>>> com.google.caja.plugin.PluginCompiler.(PluginCompiler.java:64)
> >> >>>>>>>>     at
> >> >>>>>>>>
> >> >>>>>>>>
> >> >>>>>>>>
> >> >>>>>>>>
> >>
> com.google.caja.opensocial.DefaultGadgetRewriter.compileGadget(DefaultGadgetRewriter.java:179)
> >> >>>>>>>
> >> >>>>>>>
> >> >>>>>
> >> >>>>>
> >> >>>
> >> >>>
> >> >
> >> >
> >>
> >
>

Re: Using Caja?

Posted by Ben Laurie <be...@google.com>.
On Fri, Jul 25, 2008 at 4:40 PM, Cassie <do...@apache.org> wrote:
> Sorry I didn't see this before.
> Caja is not broken - it just isn't turned on by default because it happens
> to break a lot of gadgets even when included but disabled.

It does? How can that be?

> Simply uncomment features/opensocial-current/feature.xml line 23 and the
> gadget will display nice and cajoled.
>
> - Cassie
>
> (Note: I just noticed that if you use the "reset all" button while caja mode
> is turned on the gadget will fail with a js error. If you just reload the
> page it will work again.

If I reload the page won't I lose the "use caja" tick?

> This is because the setevil bit isn't implemented
> on the java server and thus returns a 501. I don't know why this is crashing
> the caja stuff.. but it is. It doesn't fail on initial load because
> apparently the initial load does not respect the evil bit (lol - another
> bug))

What is the evil bit?

>
>
>
> On Thu, Jul 24, 2008 at 2:22 AM, Ben Laurie <be...@google.com> wrote:
>
>> On Thu, Jul 24, 2008 at 8:28 AM, Ian Boston <ie...@tfd.co.uk> wrote:
>> > I get the same, I guess we have something broken in caja at the moment.
>> :(
>>
>> A shame, since we just fixed it :-)
>>
>> > Ian
>> >
>> > On 23 Jul 2008, at 22:43, Ben Laurie wrote:
>> >
>> >> On Wed, Jul 23, 2008 at 10:32 PM, Ian Boston <ie...@tfd.co.uk> wrote:
>> >>>
>> >>> mvn  on its own is configured to mvn install which might leave some
>> stale
>> >>> state about in some of the projects. but normally
>> >>>
>> >>> mvn
>> >>> mvn -Prun
>> >>>
>> >>>
>> >>> *is* the right thing to do.
>> >>>
>> >>> what's the next failure ?
>> >>
>> >> The next failure is that with Caja enabled, the gadget is blank (with
>> >> it disable it is fine).
>> >>
>> >>>
>> >>> Ian
>> >>>
>> >>>
>> >>> On 23 Jul 2008, at 22:17, Ben Laurie wrote:
>> >>>
>> >>>> On Wed, Jul 23, 2008 at 7:22 PM, Ian Boston <ie...@tfd.co.uk> wrote:
>> >>>>>
>> >>>>> Ok,
>> >>>>>
>> >>>>> can you do a
>> >>>>>
>> >>>>> mvn clean install
>> >>>>
>> >>>> I thought I'd experiment.
>> >>>>
>> >>>> mvn clean
>> >>>> mvn
>> >>>> mvn -Prun
>> >>>>
>> >>>> got me to the next failure - but what did I do wrong? Essentially my
>> >>>> first try was this:
>> >>>>
>> >>>> svn update
>> >>>> mvn
>> >>>> mvn -Prun
>> >>>>
>> >>>> what should I have done?
>> >>>>
>> >>>>
>> >>>>>
>> >>>>> from the base directory (ie the one with features/ javascript/ and
>> >>>>> java/
>> >>>>> in
>> >>>>> it )
>> >>>>>
>> >>>>> and then
>> >>>>> cd java/server
>> >>>>> mvn -X clean install -Dmaven.test.skip=true
>> >>>>>
>> >>>>>
>> >>>>> which will produce a lot of output.
>> >>>>>
>> >>>>> In that output there will be a section like below... the important
>> line
>> >>>>> is
>> >>>>> ^^^^ marked, if not, open a JIRA and attach the output
>> >>>>>
>> >>>>>
>> >>>>> [DEBUG] adding entry
>> >>>>>
>> WEB-INF/classes/gadgets/files/samplecontainer/state-basicfriendlist.xml
>> >>>>> [DEBUG] adding entry
>> >>>>>
>> WEB-INF/classes/gadgets/files/samplecontainer/state-smallfriendlist.xml
>> >>>>> [DEBUG] adding entry
>> >>>>> WEB-INF/classes/gadgets/files/samplecontainer/state.dtd
>> >>>>> [DEBUG] adding entry
>> >>>>> WEB-INF/classes/gadgets/files/sampledata/canonicaldb.json
>> >>>>> [DEBUG] adding entry WEB-INF/lib/caja-r1899.jar
>> >>>>> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  One more line below
>> >>>>> [DEBUG] adding entry WEB-INF/lib/commons-beanutils-1.7.0.jar
>> >>>>> [DEBUG] adding entry WEB-INF/lib/commons-beanutils-core-1.7.0.jar
>> >>>>> [DEBUG] adding entry WEB-INF/lib/commons-betwixt-0.8.jar
>> >>>>> [DEBUG] adding entry WEB-INF/lib/commons-codec-1.3.jar
>> >>>>> [DEBUG] adding entry WEB-INF/lib/commons-collections-3.2.1.jar
>> >>>>> [DEBUG] adding entry WEB-INF/lib/commons-digester-1.7.jar
>> >>>>> [DEBUG] adding entry WEB-INF/lib/commons-httpclient-3.1.jar
>> >>>>> [DEBUG] adding entry WEB-INF/lib/commons-io-1.4.jar
>> >>>>> [DEBUG] adding entry WEB-INF/lib/commons-lang-2.3.jar
>> >>>>> [DEBUG] adding entry WEB-INF/lib/commons-logging-1.1.jar
>> >>>>> [DEBUG] adding entry WEB-INF/lib/core-20080621.jar
>> >>>>> [DEBUG] adding entry WEB-INF/lib/ezmorph-1.0.4.jar
>> >>>>> [DEBUG] adding entry WEB-INF/lib/geronimo-stax-api_1.0_spec-1.0.1.jar
>> >>>>> [DEBUG] adding entry WEB-INF/lib/google-collect-snapshot-20080321.jar
>> >>>>> [DEBUG] adding entry WEB-INF/lib/guice-1.0.jar
>> >>>>> [DEBUG] adding entry WEB-INF/lib/hamcrest-all-1.1.jar
>> >>>>> [DEBUG] adding entry WEB-INF/lib/htmlparser-1.0.7.jar
>> >>>>> [DEBUG] adding entry WEB-INF/lib/icu4j-3.8.jar
>> >>>>> [DEBUG] adding entry WEB-INF/lib/jdom-1.0.jar
>> >>>>> [DEBUG] adding entry WEB-INF/lib/joda-time-1.5.2.jar
>> >>>>> [DEBUG] adding entry WEB-INF/lib/json-20070829.jar
>> >>>>> [DEBUG] adding entry WEB-INF/lib/json-lib-2.2-jdk15.jar
>> >>>>> [DEBUG] adding entry WEB-INF/lib/json_simple-r1.jar
>> >>>>> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>> >>>>> [DEBUG] adding entry WEB-INF/lib/rome-0.9.jar
>> >>>>> [DEBUG] adding entry WEB-INF/lib/shindig-common-1-SNAPSHOT.jar
>> >>>>> [DEBUG] adding entry WEB-INF/lib/shindig-features-1-SNAPSHOT.jar
>> >>>>> [DEBUG] adding entry WEB-INF/lib/shindig-gadgets-1-SNAPSHOT.jar
>> >>>>> [DEBUG] adding entry WEB-INF/lib/shindig-social-api-1-SNAPSHOT.jar
>> >>>>> [DEBUG] adding entry WEB-INF/lib/xml-apis-1.0.b2.jar
>> >>>>> [DEBUG] adding entry WEB-INF/web.full.xml
>> >>>>> [DEBUG] adding entry WEB-INF/web.gadgets.xml
>> >>>>> [DEBUG] adding entry WEB-INF/web.social.xml
>> >>>>> [DEBUG] adding entry WEB-INF/web.xml
>> >>>>>
>> >>>>> On 23 Jul 2008, at 19:04, Ben Laurie wrote:
>> >>>>>
>> >>>>>> On Wed, Jul 23, 2008 at 7:00 PM, Ian Boston <ie...@tfd.co.uk> wrote:
>> >>>>>>>
>> >>>>>>> I assume that you are using mvn -Prun ?
>> >>>>>>
>> >>>>>> Yup.
>> >>>>>>
>> >>>>>>> If so can you check that you have
>> >>>>>>>
>> >>>>>>>
>> >>>>>>>
>> >>>>>>>
>> >>>>>>>
>> java/server/target/shindig-server-1-SNAPSHOT/WEB-INF/lib/json_simple-r1.jar
>> >>>>>>
>> >>>>>> No.
>> >>>>>>
>> >>>>>>> target/work/webapp/WEB-INF/lib/json_simple-r1.jar
>> >>>>>>
>> >>>>>> No.
>> >>>>>>
>> >>>>>>>
>> >>>>>>> after mvn -Prun
>> >>>>>>>
>> >>>>>>> and that when you untar it you see
>> >>>>>>>
>> >>>>>>> x43543:~/Apache/shindig/trunk ieb$ jar tvf
>> >>>>>>>
>> >>>>>>>
>> >>>>>>>
>> >>>>>>>
>> java/server/target/shindig-server-1-SNAPSHOT/WEB-INF/lib/json_simple-r1.jar
>> >>>>>>>  0 Sun Apr 16 13:56:50 BST 2006 META-INF/
>> >>>>>>>  71 Sun Apr 16 13:56:50 BST 2006 META-INF/MANIFEST.MF
>> >>>>>>>  0 Sun Apr 16 04:05:08 BST 2006 org/
>> >>>>>>>  0 Sun Apr 16 04:05:08 BST 2006 org/json/
>> >>>>>>>  0 Sun Apr 16 04:05:08 BST 2006 org/json/simple/
>> >>>>>>>  0 Sun Apr 16 04:05:08 BST 2006 org/json/simple/parser/
>> >>>>>>>  1219 Sun Apr 16 04:05:10 BST 2006
>> >>>>>>> org/json/simple/parser/Yytoken.class
>> >>>>>>>  8513 Sun Apr 16 04:05:10 BST 2006
>> org/json/simple/parser/Yylex.class
>> >>>>>>>  3378 Sun Apr 16 04:05:10 BST 2006
>> >>>>>>> org/json/simple/parser/JSONParser.class
>> >>>>>>>  2100 Sun Apr 16 13:56:20 BST 2006 org/json/simple/Test.class
>> >>>>>>>  862 Sun Apr 16 04:05:12 BST 2006 org/json/simple/JSONValue.class
>> >>>>>>>  2441 Sun Apr 16 11:26:40 BST 2006 org/json/simple/JSONObject.class
>> >>>>>>>  1166 Sun Apr 16 04:05:12 BST 2006 org/json/simple/JSONArray.class
>> >>>>>>>  3936 Sun Apr 16 04:05:12 BST 2006 org/json/simple/ItemList.class
>> >>>>>>> x43543:~/Apache/shindig/trunk ieb$
>> >>>>>>>
>> >>>>>>>
>> >>>>>>> Also,
>> >>>>>>>
>> >>>>>>> Do you work behind a proxy or any on any network where to have to
>> >>>>>>> authenticate on the network using a web browser. (sometimes the
>> jars
>> >>>>>>> are
>> >>>>>>> corrupt and contain HTML if you do)
>> >>>>>>
>> >>>>>> No.
>> >>>>>>
>> >>>>>>>
>> >>>>>>> Ian
>> >>>>>>>
>> >>>>>>> On 23 Jul 2008, at 18:32, Ben Laurie wrote:
>> >>>>>>>
>> >>>>>>>> Using the Caja sample,
>> >>>>>>>>
>> >>>>>>>>
>> >>>>>>>>
>> >>>>>>>>
>> http://localhost:8080/gadgets/files/samplecontainer/samplecontainer.html,
>> >>>>>>>> gives me this error:
>> >>>>>>>>
>> >>>>>>>> HTTP ERROR: 500
>> >>>>>>>>
>> >>>>>>>> org/json/simple/JSONValue
>> >>>>>>>>
>> >>>>>>>> RequestURI=/gadgets/ifr
>> >>>>>>>> Caused by:
>> >>>>>>>>
>> >>>>>>>> java.lang.NoClassDefFoundError: org/json/simple/JSONValue
>> >>>>>>>>     at
>> >>>>>>>>
>> >>>>>>>>
>> >>>>>>>>
>> >>>>>>>>
>> com.google.caja.config.ConfigUtil.loadWhiteListFromJson(ConfigUtil.java:134)
>> >>>>>>>>     at
>> >>>>>>>>
>> >>>>>>>>
>> >>>>>>>>
>> >>>>>>>>
>> com.google.caja.lang.css.CssSchema.getDefaultCss21Schema(CssSchema.java:61)
>> >>>>>>>>     at
>> >>>>>>>> com.google.caja.plugin.PluginCompiler.(PluginCompiler.java:64)
>> >>>>>>>>     at
>> >>>>>>>>
>> >>>>>>>>
>> >>>>>>>>
>> >>>>>>>>
>> com.google.caja.opensocial.DefaultGadgetRewriter.compileGadget(DefaultGadgetRewriter.java:179)
>> >>>>>>>
>> >>>>>>>
>> >>>>>
>> >>>>>
>> >>>
>> >>>
>> >
>> >
>>
>

Re: Using Caja?

Posted by Cassie <do...@apache.org>.
Sorry I didn't see this before.
Caja is not broken - it just isn't turned on by default because it happens
to break a lot of gadgets even when included but disabled.

Simply uncomment features/opensocial-current/feature.xml line 23 and the
gadget will display nice and cajoled.

- Cassie

(Note: I just noticed that if you use the "reset all" button while caja mode
is turned on the gadget will fail with a js error. If you just reload the
page it will work again. This is because the setevil bit isn't implemented
on the java server and thus returns a 501. I don't know why this is crashing
the caja stuff.. but it is. It doesn't fail on initial load because
apparently the initial load does not respect the evil bit (lol - another
bug))



On Thu, Jul 24, 2008 at 2:22 AM, Ben Laurie <be...@google.com> wrote:

> On Thu, Jul 24, 2008 at 8:28 AM, Ian Boston <ie...@tfd.co.uk> wrote:
> > I get the same, I guess we have something broken in caja at the moment.
> :(
>
> A shame, since we just fixed it :-)
>
> > Ian
> >
> > On 23 Jul 2008, at 22:43, Ben Laurie wrote:
> >
> >> On Wed, Jul 23, 2008 at 10:32 PM, Ian Boston <ie...@tfd.co.uk> wrote:
> >>>
> >>> mvn  on its own is configured to mvn install which might leave some
> stale
> >>> state about in some of the projects. but normally
> >>>
> >>> mvn
> >>> mvn -Prun
> >>>
> >>>
> >>> *is* the right thing to do.
> >>>
> >>> what's the next failure ?
> >>
> >> The next failure is that with Caja enabled, the gadget is blank (with
> >> it disable it is fine).
> >>
> >>>
> >>> Ian
> >>>
> >>>
> >>> On 23 Jul 2008, at 22:17, Ben Laurie wrote:
> >>>
> >>>> On Wed, Jul 23, 2008 at 7:22 PM, Ian Boston <ie...@tfd.co.uk> wrote:
> >>>>>
> >>>>> Ok,
> >>>>>
> >>>>> can you do a
> >>>>>
> >>>>> mvn clean install
> >>>>
> >>>> I thought I'd experiment.
> >>>>
> >>>> mvn clean
> >>>> mvn
> >>>> mvn -Prun
> >>>>
> >>>> got me to the next failure - but what did I do wrong? Essentially my
> >>>> first try was this:
> >>>>
> >>>> svn update
> >>>> mvn
> >>>> mvn -Prun
> >>>>
> >>>> what should I have done?
> >>>>
> >>>>
> >>>>>
> >>>>> from the base directory (ie the one with features/ javascript/ and
> >>>>> java/
> >>>>> in
> >>>>> it )
> >>>>>
> >>>>> and then
> >>>>> cd java/server
> >>>>> mvn -X clean install -Dmaven.test.skip=true
> >>>>>
> >>>>>
> >>>>> which will produce a lot of output.
> >>>>>
> >>>>> In that output there will be a section like below... the important
> line
> >>>>> is
> >>>>> ^^^^ marked, if not, open a JIRA and attach the output
> >>>>>
> >>>>>
> >>>>> [DEBUG] adding entry
> >>>>>
> WEB-INF/classes/gadgets/files/samplecontainer/state-basicfriendlist.xml
> >>>>> [DEBUG] adding entry
> >>>>>
> WEB-INF/classes/gadgets/files/samplecontainer/state-smallfriendlist.xml
> >>>>> [DEBUG] adding entry
> >>>>> WEB-INF/classes/gadgets/files/samplecontainer/state.dtd
> >>>>> [DEBUG] adding entry
> >>>>> WEB-INF/classes/gadgets/files/sampledata/canonicaldb.json
> >>>>> [DEBUG] adding entry WEB-INF/lib/caja-r1899.jar
> >>>>> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  One more line below
> >>>>> [DEBUG] adding entry WEB-INF/lib/commons-beanutils-1.7.0.jar
> >>>>> [DEBUG] adding entry WEB-INF/lib/commons-beanutils-core-1.7.0.jar
> >>>>> [DEBUG] adding entry WEB-INF/lib/commons-betwixt-0.8.jar
> >>>>> [DEBUG] adding entry WEB-INF/lib/commons-codec-1.3.jar
> >>>>> [DEBUG] adding entry WEB-INF/lib/commons-collections-3.2.1.jar
> >>>>> [DEBUG] adding entry WEB-INF/lib/commons-digester-1.7.jar
> >>>>> [DEBUG] adding entry WEB-INF/lib/commons-httpclient-3.1.jar
> >>>>> [DEBUG] adding entry WEB-INF/lib/commons-io-1.4.jar
> >>>>> [DEBUG] adding entry WEB-INF/lib/commons-lang-2.3.jar
> >>>>> [DEBUG] adding entry WEB-INF/lib/commons-logging-1.1.jar
> >>>>> [DEBUG] adding entry WEB-INF/lib/core-20080621.jar
> >>>>> [DEBUG] adding entry WEB-INF/lib/ezmorph-1.0.4.jar
> >>>>> [DEBUG] adding entry WEB-INF/lib/geronimo-stax-api_1.0_spec-1.0.1.jar
> >>>>> [DEBUG] adding entry WEB-INF/lib/google-collect-snapshot-20080321.jar
> >>>>> [DEBUG] adding entry WEB-INF/lib/guice-1.0.jar
> >>>>> [DEBUG] adding entry WEB-INF/lib/hamcrest-all-1.1.jar
> >>>>> [DEBUG] adding entry WEB-INF/lib/htmlparser-1.0.7.jar
> >>>>> [DEBUG] adding entry WEB-INF/lib/icu4j-3.8.jar
> >>>>> [DEBUG] adding entry WEB-INF/lib/jdom-1.0.jar
> >>>>> [DEBUG] adding entry WEB-INF/lib/joda-time-1.5.2.jar
> >>>>> [DEBUG] adding entry WEB-INF/lib/json-20070829.jar
> >>>>> [DEBUG] adding entry WEB-INF/lib/json-lib-2.2-jdk15.jar
> >>>>> [DEBUG] adding entry WEB-INF/lib/json_simple-r1.jar
> >>>>> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> >>>>> [DEBUG] adding entry WEB-INF/lib/rome-0.9.jar
> >>>>> [DEBUG] adding entry WEB-INF/lib/shindig-common-1-SNAPSHOT.jar
> >>>>> [DEBUG] adding entry WEB-INF/lib/shindig-features-1-SNAPSHOT.jar
> >>>>> [DEBUG] adding entry WEB-INF/lib/shindig-gadgets-1-SNAPSHOT.jar
> >>>>> [DEBUG] adding entry WEB-INF/lib/shindig-social-api-1-SNAPSHOT.jar
> >>>>> [DEBUG] adding entry WEB-INF/lib/xml-apis-1.0.b2.jar
> >>>>> [DEBUG] adding entry WEB-INF/web.full.xml
> >>>>> [DEBUG] adding entry WEB-INF/web.gadgets.xml
> >>>>> [DEBUG] adding entry WEB-INF/web.social.xml
> >>>>> [DEBUG] adding entry WEB-INF/web.xml
> >>>>>
> >>>>> On 23 Jul 2008, at 19:04, Ben Laurie wrote:
> >>>>>
> >>>>>> On Wed, Jul 23, 2008 at 7:00 PM, Ian Boston <ie...@tfd.co.uk> wrote:
> >>>>>>>
> >>>>>>> I assume that you are using mvn -Prun ?
> >>>>>>
> >>>>>> Yup.
> >>>>>>
> >>>>>>> If so can you check that you have
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>
> java/server/target/shindig-server-1-SNAPSHOT/WEB-INF/lib/json_simple-r1.jar
> >>>>>>
> >>>>>> No.
> >>>>>>
> >>>>>>> target/work/webapp/WEB-INF/lib/json_simple-r1.jar
> >>>>>>
> >>>>>> No.
> >>>>>>
> >>>>>>>
> >>>>>>> after mvn -Prun
> >>>>>>>
> >>>>>>> and that when you untar it you see
> >>>>>>>
> >>>>>>> x43543:~/Apache/shindig/trunk ieb$ jar tvf
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>
> java/server/target/shindig-server-1-SNAPSHOT/WEB-INF/lib/json_simple-r1.jar
> >>>>>>>  0 Sun Apr 16 13:56:50 BST 2006 META-INF/
> >>>>>>>  71 Sun Apr 16 13:56:50 BST 2006 META-INF/MANIFEST.MF
> >>>>>>>  0 Sun Apr 16 04:05:08 BST 2006 org/
> >>>>>>>  0 Sun Apr 16 04:05:08 BST 2006 org/json/
> >>>>>>>  0 Sun Apr 16 04:05:08 BST 2006 org/json/simple/
> >>>>>>>  0 Sun Apr 16 04:05:08 BST 2006 org/json/simple/parser/
> >>>>>>>  1219 Sun Apr 16 04:05:10 BST 2006
> >>>>>>> org/json/simple/parser/Yytoken.class
> >>>>>>>  8513 Sun Apr 16 04:05:10 BST 2006
> org/json/simple/parser/Yylex.class
> >>>>>>>  3378 Sun Apr 16 04:05:10 BST 2006
> >>>>>>> org/json/simple/parser/JSONParser.class
> >>>>>>>  2100 Sun Apr 16 13:56:20 BST 2006 org/json/simple/Test.class
> >>>>>>>  862 Sun Apr 16 04:05:12 BST 2006 org/json/simple/JSONValue.class
> >>>>>>>  2441 Sun Apr 16 11:26:40 BST 2006 org/json/simple/JSONObject.class
> >>>>>>>  1166 Sun Apr 16 04:05:12 BST 2006 org/json/simple/JSONArray.class
> >>>>>>>  3936 Sun Apr 16 04:05:12 BST 2006 org/json/simple/ItemList.class
> >>>>>>> x43543:~/Apache/shindig/trunk ieb$
> >>>>>>>
> >>>>>>>
> >>>>>>> Also,
> >>>>>>>
> >>>>>>> Do you work behind a proxy or any on any network where to have to
> >>>>>>> authenticate on the network using a web browser. (sometimes the
> jars
> >>>>>>> are
> >>>>>>> corrupt and contain HTML if you do)
> >>>>>>
> >>>>>> No.
> >>>>>>
> >>>>>>>
> >>>>>>> Ian
> >>>>>>>
> >>>>>>> On 23 Jul 2008, at 18:32, Ben Laurie wrote:
> >>>>>>>
> >>>>>>>> Using the Caja sample,
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> http://localhost:8080/gadgets/files/samplecontainer/samplecontainer.html,
> >>>>>>>> gives me this error:
> >>>>>>>>
> >>>>>>>> HTTP ERROR: 500
> >>>>>>>>
> >>>>>>>> org/json/simple/JSONValue
> >>>>>>>>
> >>>>>>>> RequestURI=/gadgets/ifr
> >>>>>>>> Caused by:
> >>>>>>>>
> >>>>>>>> java.lang.NoClassDefFoundError: org/json/simple/JSONValue
> >>>>>>>>     at
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> com.google.caja.config.ConfigUtil.loadWhiteListFromJson(ConfigUtil.java:134)
> >>>>>>>>     at
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> com.google.caja.lang.css.CssSchema.getDefaultCss21Schema(CssSchema.java:61)
> >>>>>>>>     at
> >>>>>>>> com.google.caja.plugin.PluginCompiler.(PluginCompiler.java:64)
> >>>>>>>>     at
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> com.google.caja.opensocial.DefaultGadgetRewriter.compileGadget(DefaultGadgetRewriter.java:179)
> >>>>>>>
> >>>>>>>
> >>>>>
> >>>>>
> >>>
> >>>
> >
> >
>

Re: Using Caja?

Posted by Ben Laurie <be...@google.com>.
On Thu, Jul 24, 2008 at 8:28 AM, Ian Boston <ie...@tfd.co.uk> wrote:
> I get the same, I guess we have something broken in caja at the moment. :(

A shame, since we just fixed it :-)

> Ian
>
> On 23 Jul 2008, at 22:43, Ben Laurie wrote:
>
>> On Wed, Jul 23, 2008 at 10:32 PM, Ian Boston <ie...@tfd.co.uk> wrote:
>>>
>>> mvn  on its own is configured to mvn install which might leave some stale
>>> state about in some of the projects. but normally
>>>
>>> mvn
>>> mvn -Prun
>>>
>>>
>>> *is* the right thing to do.
>>>
>>> what's the next failure ?
>>
>> The next failure is that with Caja enabled, the gadget is blank (with
>> it disable it is fine).
>>
>>>
>>> Ian
>>>
>>>
>>> On 23 Jul 2008, at 22:17, Ben Laurie wrote:
>>>
>>>> On Wed, Jul 23, 2008 at 7:22 PM, Ian Boston <ie...@tfd.co.uk> wrote:
>>>>>
>>>>> Ok,
>>>>>
>>>>> can you do a
>>>>>
>>>>> mvn clean install
>>>>
>>>> I thought I'd experiment.
>>>>
>>>> mvn clean
>>>> mvn
>>>> mvn -Prun
>>>>
>>>> got me to the next failure - but what did I do wrong? Essentially my
>>>> first try was this:
>>>>
>>>> svn update
>>>> mvn
>>>> mvn -Prun
>>>>
>>>> what should I have done?
>>>>
>>>>
>>>>>
>>>>> from the base directory (ie the one with features/ javascript/ and
>>>>> java/
>>>>> in
>>>>> it )
>>>>>
>>>>> and then
>>>>> cd java/server
>>>>> mvn -X clean install -Dmaven.test.skip=true
>>>>>
>>>>>
>>>>> which will produce a lot of output.
>>>>>
>>>>> In that output there will be a section like below... the important line
>>>>> is
>>>>> ^^^^ marked, if not, open a JIRA and attach the output
>>>>>
>>>>>
>>>>> [DEBUG] adding entry
>>>>> WEB-INF/classes/gadgets/files/samplecontainer/state-basicfriendlist.xml
>>>>> [DEBUG] adding entry
>>>>> WEB-INF/classes/gadgets/files/samplecontainer/state-smallfriendlist.xml
>>>>> [DEBUG] adding entry
>>>>> WEB-INF/classes/gadgets/files/samplecontainer/state.dtd
>>>>> [DEBUG] adding entry
>>>>> WEB-INF/classes/gadgets/files/sampledata/canonicaldb.json
>>>>> [DEBUG] adding entry WEB-INF/lib/caja-r1899.jar
>>>>> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  One more line below
>>>>> [DEBUG] adding entry WEB-INF/lib/commons-beanutils-1.7.0.jar
>>>>> [DEBUG] adding entry WEB-INF/lib/commons-beanutils-core-1.7.0.jar
>>>>> [DEBUG] adding entry WEB-INF/lib/commons-betwixt-0.8.jar
>>>>> [DEBUG] adding entry WEB-INF/lib/commons-codec-1.3.jar
>>>>> [DEBUG] adding entry WEB-INF/lib/commons-collections-3.2.1.jar
>>>>> [DEBUG] adding entry WEB-INF/lib/commons-digester-1.7.jar
>>>>> [DEBUG] adding entry WEB-INF/lib/commons-httpclient-3.1.jar
>>>>> [DEBUG] adding entry WEB-INF/lib/commons-io-1.4.jar
>>>>> [DEBUG] adding entry WEB-INF/lib/commons-lang-2.3.jar
>>>>> [DEBUG] adding entry WEB-INF/lib/commons-logging-1.1.jar
>>>>> [DEBUG] adding entry WEB-INF/lib/core-20080621.jar
>>>>> [DEBUG] adding entry WEB-INF/lib/ezmorph-1.0.4.jar
>>>>> [DEBUG] adding entry WEB-INF/lib/geronimo-stax-api_1.0_spec-1.0.1.jar
>>>>> [DEBUG] adding entry WEB-INF/lib/google-collect-snapshot-20080321.jar
>>>>> [DEBUG] adding entry WEB-INF/lib/guice-1.0.jar
>>>>> [DEBUG] adding entry WEB-INF/lib/hamcrest-all-1.1.jar
>>>>> [DEBUG] adding entry WEB-INF/lib/htmlparser-1.0.7.jar
>>>>> [DEBUG] adding entry WEB-INF/lib/icu4j-3.8.jar
>>>>> [DEBUG] adding entry WEB-INF/lib/jdom-1.0.jar
>>>>> [DEBUG] adding entry WEB-INF/lib/joda-time-1.5.2.jar
>>>>> [DEBUG] adding entry WEB-INF/lib/json-20070829.jar
>>>>> [DEBUG] adding entry WEB-INF/lib/json-lib-2.2-jdk15.jar
>>>>> [DEBUG] adding entry WEB-INF/lib/json_simple-r1.jar
>>>>> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>>>>> [DEBUG] adding entry WEB-INF/lib/rome-0.9.jar
>>>>> [DEBUG] adding entry WEB-INF/lib/shindig-common-1-SNAPSHOT.jar
>>>>> [DEBUG] adding entry WEB-INF/lib/shindig-features-1-SNAPSHOT.jar
>>>>> [DEBUG] adding entry WEB-INF/lib/shindig-gadgets-1-SNAPSHOT.jar
>>>>> [DEBUG] adding entry WEB-INF/lib/shindig-social-api-1-SNAPSHOT.jar
>>>>> [DEBUG] adding entry WEB-INF/lib/xml-apis-1.0.b2.jar
>>>>> [DEBUG] adding entry WEB-INF/web.full.xml
>>>>> [DEBUG] adding entry WEB-INF/web.gadgets.xml
>>>>> [DEBUG] adding entry WEB-INF/web.social.xml
>>>>> [DEBUG] adding entry WEB-INF/web.xml
>>>>>
>>>>> On 23 Jul 2008, at 19:04, Ben Laurie wrote:
>>>>>
>>>>>> On Wed, Jul 23, 2008 at 7:00 PM, Ian Boston <ie...@tfd.co.uk> wrote:
>>>>>>>
>>>>>>> I assume that you are using mvn -Prun ?
>>>>>>
>>>>>> Yup.
>>>>>>
>>>>>>> If so can you check that you have
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> java/server/target/shindig-server-1-SNAPSHOT/WEB-INF/lib/json_simple-r1.jar
>>>>>>
>>>>>> No.
>>>>>>
>>>>>>> target/work/webapp/WEB-INF/lib/json_simple-r1.jar
>>>>>>
>>>>>> No.
>>>>>>
>>>>>>>
>>>>>>> after mvn -Prun
>>>>>>>
>>>>>>> and that when you untar it you see
>>>>>>>
>>>>>>> x43543:~/Apache/shindig/trunk ieb$ jar tvf
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> java/server/target/shindig-server-1-SNAPSHOT/WEB-INF/lib/json_simple-r1.jar
>>>>>>>  0 Sun Apr 16 13:56:50 BST 2006 META-INF/
>>>>>>>  71 Sun Apr 16 13:56:50 BST 2006 META-INF/MANIFEST.MF
>>>>>>>  0 Sun Apr 16 04:05:08 BST 2006 org/
>>>>>>>  0 Sun Apr 16 04:05:08 BST 2006 org/json/
>>>>>>>  0 Sun Apr 16 04:05:08 BST 2006 org/json/simple/
>>>>>>>  0 Sun Apr 16 04:05:08 BST 2006 org/json/simple/parser/
>>>>>>>  1219 Sun Apr 16 04:05:10 BST 2006
>>>>>>> org/json/simple/parser/Yytoken.class
>>>>>>>  8513 Sun Apr 16 04:05:10 BST 2006 org/json/simple/parser/Yylex.class
>>>>>>>  3378 Sun Apr 16 04:05:10 BST 2006
>>>>>>> org/json/simple/parser/JSONParser.class
>>>>>>>  2100 Sun Apr 16 13:56:20 BST 2006 org/json/simple/Test.class
>>>>>>>  862 Sun Apr 16 04:05:12 BST 2006 org/json/simple/JSONValue.class
>>>>>>>  2441 Sun Apr 16 11:26:40 BST 2006 org/json/simple/JSONObject.class
>>>>>>>  1166 Sun Apr 16 04:05:12 BST 2006 org/json/simple/JSONArray.class
>>>>>>>  3936 Sun Apr 16 04:05:12 BST 2006 org/json/simple/ItemList.class
>>>>>>> x43543:~/Apache/shindig/trunk ieb$
>>>>>>>
>>>>>>>
>>>>>>> Also,
>>>>>>>
>>>>>>> Do you work behind a proxy or any on any network where to have to
>>>>>>> authenticate on the network using a web browser. (sometimes the jars
>>>>>>> are
>>>>>>> corrupt and contain HTML if you do)
>>>>>>
>>>>>> No.
>>>>>>
>>>>>>>
>>>>>>> Ian
>>>>>>>
>>>>>>> On 23 Jul 2008, at 18:32, Ben Laurie wrote:
>>>>>>>
>>>>>>>> Using the Caja sample,
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> http://localhost:8080/gadgets/files/samplecontainer/samplecontainer.html,
>>>>>>>> gives me this error:
>>>>>>>>
>>>>>>>> HTTP ERROR: 500
>>>>>>>>
>>>>>>>> org/json/simple/JSONValue
>>>>>>>>
>>>>>>>> RequestURI=/gadgets/ifr
>>>>>>>> Caused by:
>>>>>>>>
>>>>>>>> java.lang.NoClassDefFoundError: org/json/simple/JSONValue
>>>>>>>>     at
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> com.google.caja.config.ConfigUtil.loadWhiteListFromJson(ConfigUtil.java:134)
>>>>>>>>     at
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> com.google.caja.lang.css.CssSchema.getDefaultCss21Schema(CssSchema.java:61)
>>>>>>>>     at
>>>>>>>> com.google.caja.plugin.PluginCompiler.(PluginCompiler.java:64)
>>>>>>>>     at
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> com.google.caja.opensocial.DefaultGadgetRewriter.compileGadget(DefaultGadgetRewriter.java:179)
>>>>>>>
>>>>>>>
>>>>>
>>>>>
>>>
>>>
>
>

Re: Using Caja?

Posted by Ian Boston <ie...@tfd.co.uk>.
I get the same, I guess we have something broken in caja at the  
moment. :(
Ian

On 23 Jul 2008, at 22:43, Ben Laurie wrote:

> On Wed, Jul 23, 2008 at 10:32 PM, Ian Boston <ie...@tfd.co.uk> wrote:
>> mvn  on its own is configured to mvn install which might leave  
>> some stale
>> state about in some of the projects. but normally
>>
>> mvn
>> mvn -Prun
>>
>>
>> *is* the right thing to do.
>>
>> what's the next failure ?
>
> The next failure is that with Caja enabled, the gadget is blank (with
> it disable it is fine).
>
>>
>> Ian
>>
>>
>> On 23 Jul 2008, at 22:17, Ben Laurie wrote:
>>
>>> On Wed, Jul 23, 2008 at 7:22 PM, Ian Boston <ie...@tfd.co.uk> wrote:
>>>>
>>>> Ok,
>>>>
>>>> can you do a
>>>>
>>>> mvn clean install
>>>
>>> I thought I'd experiment.
>>>
>>> mvn clean
>>> mvn
>>> mvn -Prun
>>>
>>> got me to the next failure - but what did I do wrong? Essentially my
>>> first try was this:
>>>
>>> svn update
>>> mvn
>>> mvn -Prun
>>>
>>> what should I have done?
>>>
>>>
>>>>
>>>> from the base directory (ie the one with features/ javascript/  
>>>> and java/
>>>> in
>>>> it )
>>>>
>>>> and then
>>>> cd java/server
>>>> mvn -X clean install -Dmaven.test.skip=true
>>>>
>>>>
>>>> which will produce a lot of output.
>>>>
>>>> In that output there will be a section like below... the  
>>>> important line
>>>> is
>>>> ^^^^ marked, if not, open a JIRA and attach the output
>>>>
>>>>
>>>> [DEBUG] adding entry
>>>> WEB-INF/classes/gadgets/files/samplecontainer/state- 
>>>> basicfriendlist.xml
>>>> [DEBUG] adding entry
>>>> WEB-INF/classes/gadgets/files/samplecontainer/state- 
>>>> smallfriendlist.xml
>>>> [DEBUG] adding entry
>>>> WEB-INF/classes/gadgets/files/samplecontainer/state.dtd
>>>> [DEBUG] adding entry
>>>> WEB-INF/classes/gadgets/files/sampledata/canonicaldb.json
>>>> [DEBUG] adding entry WEB-INF/lib/caja-r1899.jar
>>>> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  One more line  
>>>> below
>>>> [DEBUG] adding entry WEB-INF/lib/commons-beanutils-1.7.0.jar
>>>> [DEBUG] adding entry WEB-INF/lib/commons-beanutils-core-1.7.0.jar
>>>> [DEBUG] adding entry WEB-INF/lib/commons-betwixt-0.8.jar
>>>> [DEBUG] adding entry WEB-INF/lib/commons-codec-1.3.jar
>>>> [DEBUG] adding entry WEB-INF/lib/commons-collections-3.2.1.jar
>>>> [DEBUG] adding entry WEB-INF/lib/commons-digester-1.7.jar
>>>> [DEBUG] adding entry WEB-INF/lib/commons-httpclient-3.1.jar
>>>> [DEBUG] adding entry WEB-INF/lib/commons-io-1.4.jar
>>>> [DEBUG] adding entry WEB-INF/lib/commons-lang-2.3.jar
>>>> [DEBUG] adding entry WEB-INF/lib/commons-logging-1.1.jar
>>>> [DEBUG] adding entry WEB-INF/lib/core-20080621.jar
>>>> [DEBUG] adding entry WEB-INF/lib/ezmorph-1.0.4.jar
>>>> [DEBUG] adding entry WEB-INF/lib/geronimo-stax- 
>>>> api_1.0_spec-1.0.1.jar
>>>> [DEBUG] adding entry WEB-INF/lib/google-collect- 
>>>> snapshot-20080321.jar
>>>> [DEBUG] adding entry WEB-INF/lib/guice-1.0.jar
>>>> [DEBUG] adding entry WEB-INF/lib/hamcrest-all-1.1.jar
>>>> [DEBUG] adding entry WEB-INF/lib/htmlparser-1.0.7.jar
>>>> [DEBUG] adding entry WEB-INF/lib/icu4j-3.8.jar
>>>> [DEBUG] adding entry WEB-INF/lib/jdom-1.0.jar
>>>> [DEBUG] adding entry WEB-INF/lib/joda-time-1.5.2.jar
>>>> [DEBUG] adding entry WEB-INF/lib/json-20070829.jar
>>>> [DEBUG] adding entry WEB-INF/lib/json-lib-2.2-jdk15.jar
>>>> [DEBUG] adding entry WEB-INF/lib/json_simple-r1.jar
>>>> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>>>> [DEBUG] adding entry WEB-INF/lib/rome-0.9.jar
>>>> [DEBUG] adding entry WEB-INF/lib/shindig-common-1-SNAPSHOT.jar
>>>> [DEBUG] adding entry WEB-INF/lib/shindig-features-1-SNAPSHOT.jar
>>>> [DEBUG] adding entry WEB-INF/lib/shindig-gadgets-1-SNAPSHOT.jar
>>>> [DEBUG] adding entry WEB-INF/lib/shindig-social-api-1-SNAPSHOT.jar
>>>> [DEBUG] adding entry WEB-INF/lib/xml-apis-1.0.b2.jar
>>>> [DEBUG] adding entry WEB-INF/web.full.xml
>>>> [DEBUG] adding entry WEB-INF/web.gadgets.xml
>>>> [DEBUG] adding entry WEB-INF/web.social.xml
>>>> [DEBUG] adding entry WEB-INF/web.xml
>>>>
>>>> On 23 Jul 2008, at 19:04, Ben Laurie wrote:
>>>>
>>>>> On Wed, Jul 23, 2008 at 7:00 PM, Ian Boston <ie...@tfd.co.uk> wrote:
>>>>>>
>>>>>> I assume that you are using mvn -Prun ?
>>>>>
>>>>> Yup.
>>>>>
>>>>>> If so can you check that you have
>>>>>>
>>>>>>
>>>>>>
>>>>>> java/server/target/shindig-server-1-SNAPSHOT/WEB-INF/lib/ 
>>>>>> json_simple-r1.jar
>>>>>
>>>>> No.
>>>>>
>>>>>> target/work/webapp/WEB-INF/lib/json_simple-r1.jar
>>>>>
>>>>> No.
>>>>>
>>>>>>
>>>>>> after mvn -Prun
>>>>>>
>>>>>> and that when you untar it you see
>>>>>>
>>>>>> x43543:~/Apache/shindig/trunk ieb$ jar tvf
>>>>>>
>>>>>>
>>>>>> java/server/target/shindig-server-1-SNAPSHOT/WEB-INF/lib/ 
>>>>>> json_simple-r1.jar
>>>>>>   0 Sun Apr 16 13:56:50 BST 2006 META-INF/
>>>>>>  71 Sun Apr 16 13:56:50 BST 2006 META-INF/MANIFEST.MF
>>>>>>   0 Sun Apr 16 04:05:08 BST 2006 org/
>>>>>>   0 Sun Apr 16 04:05:08 BST 2006 org/json/
>>>>>>   0 Sun Apr 16 04:05:08 BST 2006 org/json/simple/
>>>>>>   0 Sun Apr 16 04:05:08 BST 2006 org/json/simple/parser/
>>>>>>  1219 Sun Apr 16 04:05:10 BST 2006 org/json/simple/parser/ 
>>>>>> Yytoken.class
>>>>>>  8513 Sun Apr 16 04:05:10 BST 2006 org/json/simple/parser/ 
>>>>>> Yylex.class
>>>>>>  3378 Sun Apr 16 04:05:10 BST 2006
>>>>>> org/json/simple/parser/JSONParser.class
>>>>>>  2100 Sun Apr 16 13:56:20 BST 2006 org/json/simple/Test.class
>>>>>>  862 Sun Apr 16 04:05:12 BST 2006 org/json/simple/JSONValue.class
>>>>>>  2441 Sun Apr 16 11:26:40 BST 2006 org/json/simple/ 
>>>>>> JSONObject.class
>>>>>>  1166 Sun Apr 16 04:05:12 BST 2006 org/json/simple/ 
>>>>>> JSONArray.class
>>>>>>  3936 Sun Apr 16 04:05:12 BST 2006 org/json/simple/ItemList.class
>>>>>> x43543:~/Apache/shindig/trunk ieb$
>>>>>>
>>>>>>
>>>>>> Also,
>>>>>>
>>>>>> Do you work behind a proxy or any on any network where to have to
>>>>>> authenticate on the network using a web browser. (sometimes  
>>>>>> the jars
>>>>>> are
>>>>>> corrupt and contain HTML if you do)
>>>>>
>>>>> No.
>>>>>
>>>>>>
>>>>>> Ian
>>>>>>
>>>>>> On 23 Jul 2008, at 18:32, Ben Laurie wrote:
>>>>>>
>>>>>>> Using the Caja sample,
>>>>>>>
>>>>>>>
>>>>>>> http://localhost:8080/gadgets/files/samplecontainer/ 
>>>>>>> samplecontainer.html,
>>>>>>> gives me this error:
>>>>>>>
>>>>>>> HTTP ERROR: 500
>>>>>>>
>>>>>>> org/json/simple/JSONValue
>>>>>>>
>>>>>>> RequestURI=/gadgets/ifr
>>>>>>> Caused by:
>>>>>>>
>>>>>>> java.lang.NoClassDefFoundError: org/json/simple/JSONValue
>>>>>>>      at
>>>>>>>
>>>>>>>
>>>>>>> com.google.caja.config.ConfigUtil.loadWhiteListFromJson 
>>>>>>> (ConfigUtil.java:134)
>>>>>>>      at
>>>>>>>
>>>>>>>
>>>>>>> com.google.caja.lang.css.CssSchema.getDefaultCss21Schema 
>>>>>>> (CssSchema.java:61)
>>>>>>>      at com.google.caja.plugin.PluginCompiler. 
>>>>>>> (PluginCompiler.java:64)
>>>>>>>      at
>>>>>>>
>>>>>>>
>>>>>>> com.google.caja.opensocial.DefaultGadgetRewriter.compileGadget 
>>>>>>> (DefaultGadgetRewriter.java:179)
>>>>>>
>>>>>>
>>>>
>>>>
>>
>>


Re: Using Caja?

Posted by Ben Laurie <be...@google.com>.
On Wed, Jul 23, 2008 at 10:32 PM, Ian Boston <ie...@tfd.co.uk> wrote:
> mvn  on its own is configured to mvn install which might leave some stale
> state about in some of the projects. but normally
>
> mvn
> mvn -Prun
>
>
> *is* the right thing to do.
>
> what's the next failure ?

The next failure is that with Caja enabled, the gadget is blank (with
it disable it is fine).

>
> Ian
>
>
> On 23 Jul 2008, at 22:17, Ben Laurie wrote:
>
>> On Wed, Jul 23, 2008 at 7:22 PM, Ian Boston <ie...@tfd.co.uk> wrote:
>>>
>>> Ok,
>>>
>>> can you do a
>>>
>>> mvn clean install
>>
>> I thought I'd experiment.
>>
>> mvn clean
>> mvn
>> mvn -Prun
>>
>> got me to the next failure - but what did I do wrong? Essentially my
>> first try was this:
>>
>> svn update
>> mvn
>> mvn -Prun
>>
>> what should I have done?
>>
>>
>>>
>>> from the base directory (ie the one with features/ javascript/ and java/
>>> in
>>> it )
>>>
>>> and then
>>> cd java/server
>>> mvn -X clean install -Dmaven.test.skip=true
>>>
>>>
>>> which will produce a lot of output.
>>>
>>> In that output there will be a section like below... the important line
>>> is
>>> ^^^^ marked, if not, open a JIRA and attach the output
>>>
>>>
>>> [DEBUG] adding entry
>>> WEB-INF/classes/gadgets/files/samplecontainer/state-basicfriendlist.xml
>>> [DEBUG] adding entry
>>> WEB-INF/classes/gadgets/files/samplecontainer/state-smallfriendlist.xml
>>> [DEBUG] adding entry
>>> WEB-INF/classes/gadgets/files/samplecontainer/state.dtd
>>> [DEBUG] adding entry
>>> WEB-INF/classes/gadgets/files/sampledata/canonicaldb.json
>>> [DEBUG] adding entry WEB-INF/lib/caja-r1899.jar
>>> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  One more line below
>>> [DEBUG] adding entry WEB-INF/lib/commons-beanutils-1.7.0.jar
>>> [DEBUG] adding entry WEB-INF/lib/commons-beanutils-core-1.7.0.jar
>>> [DEBUG] adding entry WEB-INF/lib/commons-betwixt-0.8.jar
>>> [DEBUG] adding entry WEB-INF/lib/commons-codec-1.3.jar
>>> [DEBUG] adding entry WEB-INF/lib/commons-collections-3.2.1.jar
>>> [DEBUG] adding entry WEB-INF/lib/commons-digester-1.7.jar
>>> [DEBUG] adding entry WEB-INF/lib/commons-httpclient-3.1.jar
>>> [DEBUG] adding entry WEB-INF/lib/commons-io-1.4.jar
>>> [DEBUG] adding entry WEB-INF/lib/commons-lang-2.3.jar
>>> [DEBUG] adding entry WEB-INF/lib/commons-logging-1.1.jar
>>> [DEBUG] adding entry WEB-INF/lib/core-20080621.jar
>>> [DEBUG] adding entry WEB-INF/lib/ezmorph-1.0.4.jar
>>> [DEBUG] adding entry WEB-INF/lib/geronimo-stax-api_1.0_spec-1.0.1.jar
>>> [DEBUG] adding entry WEB-INF/lib/google-collect-snapshot-20080321.jar
>>> [DEBUG] adding entry WEB-INF/lib/guice-1.0.jar
>>> [DEBUG] adding entry WEB-INF/lib/hamcrest-all-1.1.jar
>>> [DEBUG] adding entry WEB-INF/lib/htmlparser-1.0.7.jar
>>> [DEBUG] adding entry WEB-INF/lib/icu4j-3.8.jar
>>> [DEBUG] adding entry WEB-INF/lib/jdom-1.0.jar
>>> [DEBUG] adding entry WEB-INF/lib/joda-time-1.5.2.jar
>>> [DEBUG] adding entry WEB-INF/lib/json-20070829.jar
>>> [DEBUG] adding entry WEB-INF/lib/json-lib-2.2-jdk15.jar
>>> [DEBUG] adding entry WEB-INF/lib/json_simple-r1.jar
>>> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>>> [DEBUG] adding entry WEB-INF/lib/rome-0.9.jar
>>> [DEBUG] adding entry WEB-INF/lib/shindig-common-1-SNAPSHOT.jar
>>> [DEBUG] adding entry WEB-INF/lib/shindig-features-1-SNAPSHOT.jar
>>> [DEBUG] adding entry WEB-INF/lib/shindig-gadgets-1-SNAPSHOT.jar
>>> [DEBUG] adding entry WEB-INF/lib/shindig-social-api-1-SNAPSHOT.jar
>>> [DEBUG] adding entry WEB-INF/lib/xml-apis-1.0.b2.jar
>>> [DEBUG] adding entry WEB-INF/web.full.xml
>>> [DEBUG] adding entry WEB-INF/web.gadgets.xml
>>> [DEBUG] adding entry WEB-INF/web.social.xml
>>> [DEBUG] adding entry WEB-INF/web.xml
>>>
>>> On 23 Jul 2008, at 19:04, Ben Laurie wrote:
>>>
>>>> On Wed, Jul 23, 2008 at 7:00 PM, Ian Boston <ie...@tfd.co.uk> wrote:
>>>>>
>>>>> I assume that you are using mvn -Prun ?
>>>>
>>>> Yup.
>>>>
>>>>> If so can you check that you have
>>>>>
>>>>>
>>>>>
>>>>> java/server/target/shindig-server-1-SNAPSHOT/WEB-INF/lib/json_simple-r1.jar
>>>>
>>>> No.
>>>>
>>>>> target/work/webapp/WEB-INF/lib/json_simple-r1.jar
>>>>
>>>> No.
>>>>
>>>>>
>>>>> after mvn -Prun
>>>>>
>>>>> and that when you untar it you see
>>>>>
>>>>> x43543:~/Apache/shindig/trunk ieb$ jar tvf
>>>>>
>>>>>
>>>>> java/server/target/shindig-server-1-SNAPSHOT/WEB-INF/lib/json_simple-r1.jar
>>>>>   0 Sun Apr 16 13:56:50 BST 2006 META-INF/
>>>>>  71 Sun Apr 16 13:56:50 BST 2006 META-INF/MANIFEST.MF
>>>>>   0 Sun Apr 16 04:05:08 BST 2006 org/
>>>>>   0 Sun Apr 16 04:05:08 BST 2006 org/json/
>>>>>   0 Sun Apr 16 04:05:08 BST 2006 org/json/simple/
>>>>>   0 Sun Apr 16 04:05:08 BST 2006 org/json/simple/parser/
>>>>>  1219 Sun Apr 16 04:05:10 BST 2006 org/json/simple/parser/Yytoken.class
>>>>>  8513 Sun Apr 16 04:05:10 BST 2006 org/json/simple/parser/Yylex.class
>>>>>  3378 Sun Apr 16 04:05:10 BST 2006
>>>>> org/json/simple/parser/JSONParser.class
>>>>>  2100 Sun Apr 16 13:56:20 BST 2006 org/json/simple/Test.class
>>>>>  862 Sun Apr 16 04:05:12 BST 2006 org/json/simple/JSONValue.class
>>>>>  2441 Sun Apr 16 11:26:40 BST 2006 org/json/simple/JSONObject.class
>>>>>  1166 Sun Apr 16 04:05:12 BST 2006 org/json/simple/JSONArray.class
>>>>>  3936 Sun Apr 16 04:05:12 BST 2006 org/json/simple/ItemList.class
>>>>> x43543:~/Apache/shindig/trunk ieb$
>>>>>
>>>>>
>>>>> Also,
>>>>>
>>>>> Do you work behind a proxy or any on any network where to have to
>>>>> authenticate on the network using a web browser. (sometimes the jars
>>>>> are
>>>>> corrupt and contain HTML if you do)
>>>>
>>>> No.
>>>>
>>>>>
>>>>> Ian
>>>>>
>>>>> On 23 Jul 2008, at 18:32, Ben Laurie wrote:
>>>>>
>>>>>> Using the Caja sample,
>>>>>>
>>>>>>
>>>>>> http://localhost:8080/gadgets/files/samplecontainer/samplecontainer.html,
>>>>>> gives me this error:
>>>>>>
>>>>>> HTTP ERROR: 500
>>>>>>
>>>>>> org/json/simple/JSONValue
>>>>>>
>>>>>> RequestURI=/gadgets/ifr
>>>>>> Caused by:
>>>>>>
>>>>>> java.lang.NoClassDefFoundError: org/json/simple/JSONValue
>>>>>>      at
>>>>>>
>>>>>>
>>>>>> com.google.caja.config.ConfigUtil.loadWhiteListFromJson(ConfigUtil.java:134)
>>>>>>      at
>>>>>>
>>>>>>
>>>>>> com.google.caja.lang.css.CssSchema.getDefaultCss21Schema(CssSchema.java:61)
>>>>>>      at com.google.caja.plugin.PluginCompiler.(PluginCompiler.java:64)
>>>>>>      at
>>>>>>
>>>>>>
>>>>>> com.google.caja.opensocial.DefaultGadgetRewriter.compileGadget(DefaultGadgetRewriter.java:179)
>>>>>
>>>>>
>>>
>>>
>
>

Re: Using Caja?

Posted by Ian Boston <ie...@tfd.co.uk>.
mvn  on its own is configured to mvn install which might leave some  
stale state about in some of the projects. but normally

mvn
mvn -Prun


*is* the right thing to do.

what's the next failure ?

Ian


On 23 Jul 2008, at 22:17, Ben Laurie wrote:

> On Wed, Jul 23, 2008 at 7:22 PM, Ian Boston <ie...@tfd.co.uk> wrote:
>> Ok,
>>
>> can you do a
>>
>> mvn clean install
>
> I thought I'd experiment.
>
> mvn clean
> mvn
> mvn -Prun
>
> got me to the next failure - but what did I do wrong? Essentially my
> first try was this:
>
> svn update
> mvn
> mvn -Prun
>
> what should I have done?
>
>
>>
>> from the base directory (ie the one with features/ javascript/ and  
>> java/ in
>> it )
>>
>> and then
>> cd java/server
>> mvn -X clean install -Dmaven.test.skip=true
>>
>>
>> which will produce a lot of output.
>>
>> In that output there will be a section like below... the important  
>> line is
>> ^^^^ marked, if not, open a JIRA and attach the output
>>
>>
>> [DEBUG] adding entry
>> WEB-INF/classes/gadgets/files/samplecontainer/state- 
>> basicfriendlist.xml
>> [DEBUG] adding entry
>> WEB-INF/classes/gadgets/files/samplecontainer/state- 
>> smallfriendlist.xml
>> [DEBUG] adding entry WEB-INF/classes/gadgets/files/samplecontainer/ 
>> state.dtd
>> [DEBUG] adding entry
>> WEB-INF/classes/gadgets/files/sampledata/canonicaldb.json
>> [DEBUG] adding entry WEB-INF/lib/caja-r1899.jar
>> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  One more line below
>> [DEBUG] adding entry WEB-INF/lib/commons-beanutils-1.7.0.jar
>> [DEBUG] adding entry WEB-INF/lib/commons-beanutils-core-1.7.0.jar
>> [DEBUG] adding entry WEB-INF/lib/commons-betwixt-0.8.jar
>> [DEBUG] adding entry WEB-INF/lib/commons-codec-1.3.jar
>> [DEBUG] adding entry WEB-INF/lib/commons-collections-3.2.1.jar
>> [DEBUG] adding entry WEB-INF/lib/commons-digester-1.7.jar
>> [DEBUG] adding entry WEB-INF/lib/commons-httpclient-3.1.jar
>> [DEBUG] adding entry WEB-INF/lib/commons-io-1.4.jar
>> [DEBUG] adding entry WEB-INF/lib/commons-lang-2.3.jar
>> [DEBUG] adding entry WEB-INF/lib/commons-logging-1.1.jar
>> [DEBUG] adding entry WEB-INF/lib/core-20080621.jar
>> [DEBUG] adding entry WEB-INF/lib/ezmorph-1.0.4.jar
>> [DEBUG] adding entry WEB-INF/lib/geronimo-stax-api_1.0_spec-1.0.1.jar
>> [DEBUG] adding entry WEB-INF/lib/google-collect-snapshot-20080321.jar
>> [DEBUG] adding entry WEB-INF/lib/guice-1.0.jar
>> [DEBUG] adding entry WEB-INF/lib/hamcrest-all-1.1.jar
>> [DEBUG] adding entry WEB-INF/lib/htmlparser-1.0.7.jar
>> [DEBUG] adding entry WEB-INF/lib/icu4j-3.8.jar
>> [DEBUG] adding entry WEB-INF/lib/jdom-1.0.jar
>> [DEBUG] adding entry WEB-INF/lib/joda-time-1.5.2.jar
>> [DEBUG] adding entry WEB-INF/lib/json-20070829.jar
>> [DEBUG] adding entry WEB-INF/lib/json-lib-2.2-jdk15.jar
>> [DEBUG] adding entry WEB-INF/lib/json_simple-r1.jar
>> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>> [DEBUG] adding entry WEB-INF/lib/rome-0.9.jar
>> [DEBUG] adding entry WEB-INF/lib/shindig-common-1-SNAPSHOT.jar
>> [DEBUG] adding entry WEB-INF/lib/shindig-features-1-SNAPSHOT.jar
>> [DEBUG] adding entry WEB-INF/lib/shindig-gadgets-1-SNAPSHOT.jar
>> [DEBUG] adding entry WEB-INF/lib/shindig-social-api-1-SNAPSHOT.jar
>> [DEBUG] adding entry WEB-INF/lib/xml-apis-1.0.b2.jar
>> [DEBUG] adding entry WEB-INF/web.full.xml
>> [DEBUG] adding entry WEB-INF/web.gadgets.xml
>> [DEBUG] adding entry WEB-INF/web.social.xml
>> [DEBUG] adding entry WEB-INF/web.xml
>>
>> On 23 Jul 2008, at 19:04, Ben Laurie wrote:
>>
>>> On Wed, Jul 23, 2008 at 7:00 PM, Ian Boston <ie...@tfd.co.uk> wrote:
>>>>
>>>> I assume that you are using mvn -Prun ?
>>>
>>> Yup.
>>>
>>>> If so can you check that you have
>>>>
>>>>
>>>> java/server/target/shindig-server-1-SNAPSHOT/WEB-INF/lib/ 
>>>> json_simple-r1.jar
>>>
>>> No.
>>>
>>>> target/work/webapp/WEB-INF/lib/json_simple-r1.jar
>>>
>>> No.
>>>
>>>>
>>>> after mvn -Prun
>>>>
>>>> and that when you untar it you see
>>>>
>>>> x43543:~/Apache/shindig/trunk ieb$ jar tvf
>>>>
>>>> java/server/target/shindig-server-1-SNAPSHOT/WEB-INF/lib/ 
>>>> json_simple-r1.jar
>>>>    0 Sun Apr 16 13:56:50 BST 2006 META-INF/
>>>>   71 Sun Apr 16 13:56:50 BST 2006 META-INF/MANIFEST.MF
>>>>    0 Sun Apr 16 04:05:08 BST 2006 org/
>>>>    0 Sun Apr 16 04:05:08 BST 2006 org/json/
>>>>    0 Sun Apr 16 04:05:08 BST 2006 org/json/simple/
>>>>    0 Sun Apr 16 04:05:08 BST 2006 org/json/simple/parser/
>>>>  1219 Sun Apr 16 04:05:10 BST 2006 org/json/simple/parser/ 
>>>> Yytoken.class
>>>>  8513 Sun Apr 16 04:05:10 BST 2006 org/json/simple/parser/ 
>>>> Yylex.class
>>>>  3378 Sun Apr 16 04:05:10 BST 2006
>>>> org/json/simple/parser/JSONParser.class
>>>>  2100 Sun Apr 16 13:56:20 BST 2006 org/json/simple/Test.class
>>>>  862 Sun Apr 16 04:05:12 BST 2006 org/json/simple/JSONValue.class
>>>>  2441 Sun Apr 16 11:26:40 BST 2006 org/json/simple/JSONObject.class
>>>>  1166 Sun Apr 16 04:05:12 BST 2006 org/json/simple/JSONArray.class
>>>>  3936 Sun Apr 16 04:05:12 BST 2006 org/json/simple/ItemList.class
>>>> x43543:~/Apache/shindig/trunk ieb$
>>>>
>>>>
>>>> Also,
>>>>
>>>> Do you work behind a proxy or any on any network where to have to
>>>> authenticate on the network using a web browser. (sometimes the  
>>>> jars are
>>>> corrupt and contain HTML if you do)
>>>
>>> No.
>>>
>>>>
>>>> Ian
>>>>
>>>> On 23 Jul 2008, at 18:32, Ben Laurie wrote:
>>>>
>>>>> Using the Caja sample,
>>>>>
>>>>> http://localhost:8080/gadgets/files/samplecontainer/ 
>>>>> samplecontainer.html,
>>>>> gives me this error:
>>>>>
>>>>> HTTP ERROR: 500
>>>>>
>>>>> org/json/simple/JSONValue
>>>>>
>>>>> RequestURI=/gadgets/ifr
>>>>> Caused by:
>>>>>
>>>>> java.lang.NoClassDefFoundError: org/json/simple/JSONValue
>>>>>       at
>>>>>
>>>>> com.google.caja.config.ConfigUtil.loadWhiteListFromJson 
>>>>> (ConfigUtil.java:134)
>>>>>       at
>>>>>
>>>>> com.google.caja.lang.css.CssSchema.getDefaultCss21Schema 
>>>>> (CssSchema.java:61)
>>>>>       at com.google.caja.plugin.PluginCompiler. 
>>>>> (PluginCompiler.java:64)
>>>>>       at
>>>>>
>>>>> com.google.caja.opensocial.DefaultGadgetRewriter.compileGadget 
>>>>> (DefaultGadgetRewriter.java:179)
>>>>
>>>>
>>
>>


Re: Using Caja?

Posted by Ben Laurie <be...@google.com>.
On Wed, Jul 23, 2008 at 7:22 PM, Ian Boston <ie...@tfd.co.uk> wrote:
> Ok,
>
> can you do a
>
> mvn clean install

I thought I'd experiment.

mvn clean
mvn
mvn -Prun

got me to the next failure - but what did I do wrong? Essentially my
first try was this:

svn update
mvn
mvn -Prun

what should I have done?


>
> from the base directory (ie the one with features/ javascript/ and java/ in
> it )
>
> and then
> cd java/server
> mvn -X clean install -Dmaven.test.skip=true
>
>
> which will produce a lot of output.
>
> In that output there will be a section like below... the important line is
> ^^^^ marked, if not, open a JIRA and attach the output
>
>
> [DEBUG] adding entry
> WEB-INF/classes/gadgets/files/samplecontainer/state-basicfriendlist.xml
> [DEBUG] adding entry
> WEB-INF/classes/gadgets/files/samplecontainer/state-smallfriendlist.xml
> [DEBUG] adding entry WEB-INF/classes/gadgets/files/samplecontainer/state.dtd
> [DEBUG] adding entry
> WEB-INF/classes/gadgets/files/sampledata/canonicaldb.json
> [DEBUG] adding entry WEB-INF/lib/caja-r1899.jar
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  One more line below
> [DEBUG] adding entry WEB-INF/lib/commons-beanutils-1.7.0.jar
> [DEBUG] adding entry WEB-INF/lib/commons-beanutils-core-1.7.0.jar
> [DEBUG] adding entry WEB-INF/lib/commons-betwixt-0.8.jar
> [DEBUG] adding entry WEB-INF/lib/commons-codec-1.3.jar
> [DEBUG] adding entry WEB-INF/lib/commons-collections-3.2.1.jar
> [DEBUG] adding entry WEB-INF/lib/commons-digester-1.7.jar
> [DEBUG] adding entry WEB-INF/lib/commons-httpclient-3.1.jar
> [DEBUG] adding entry WEB-INF/lib/commons-io-1.4.jar
> [DEBUG] adding entry WEB-INF/lib/commons-lang-2.3.jar
> [DEBUG] adding entry WEB-INF/lib/commons-logging-1.1.jar
> [DEBUG] adding entry WEB-INF/lib/core-20080621.jar
> [DEBUG] adding entry WEB-INF/lib/ezmorph-1.0.4.jar
> [DEBUG] adding entry WEB-INF/lib/geronimo-stax-api_1.0_spec-1.0.1.jar
> [DEBUG] adding entry WEB-INF/lib/google-collect-snapshot-20080321.jar
> [DEBUG] adding entry WEB-INF/lib/guice-1.0.jar
> [DEBUG] adding entry WEB-INF/lib/hamcrest-all-1.1.jar
> [DEBUG] adding entry WEB-INF/lib/htmlparser-1.0.7.jar
> [DEBUG] adding entry WEB-INF/lib/icu4j-3.8.jar
> [DEBUG] adding entry WEB-INF/lib/jdom-1.0.jar
> [DEBUG] adding entry WEB-INF/lib/joda-time-1.5.2.jar
> [DEBUG] adding entry WEB-INF/lib/json-20070829.jar
> [DEBUG] adding entry WEB-INF/lib/json-lib-2.2-jdk15.jar
> [DEBUG] adding entry WEB-INF/lib/json_simple-r1.jar
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> [DEBUG] adding entry WEB-INF/lib/rome-0.9.jar
> [DEBUG] adding entry WEB-INF/lib/shindig-common-1-SNAPSHOT.jar
> [DEBUG] adding entry WEB-INF/lib/shindig-features-1-SNAPSHOT.jar
> [DEBUG] adding entry WEB-INF/lib/shindig-gadgets-1-SNAPSHOT.jar
> [DEBUG] adding entry WEB-INF/lib/shindig-social-api-1-SNAPSHOT.jar
> [DEBUG] adding entry WEB-INF/lib/xml-apis-1.0.b2.jar
> [DEBUG] adding entry WEB-INF/web.full.xml
> [DEBUG] adding entry WEB-INF/web.gadgets.xml
> [DEBUG] adding entry WEB-INF/web.social.xml
> [DEBUG] adding entry WEB-INF/web.xml
>
> On 23 Jul 2008, at 19:04, Ben Laurie wrote:
>
>> On Wed, Jul 23, 2008 at 7:00 PM, Ian Boston <ie...@tfd.co.uk> wrote:
>>>
>>> I assume that you are using mvn -Prun ?
>>
>> Yup.
>>
>>> If so can you check that you have
>>>
>>>
>>> java/server/target/shindig-server-1-SNAPSHOT/WEB-INF/lib/json_simple-r1.jar
>>
>> No.
>>
>>> target/work/webapp/WEB-INF/lib/json_simple-r1.jar
>>
>> No.
>>
>>>
>>> after mvn -Prun
>>>
>>> and that when you untar it you see
>>>
>>> x43543:~/Apache/shindig/trunk ieb$ jar tvf
>>>
>>> java/server/target/shindig-server-1-SNAPSHOT/WEB-INF/lib/json_simple-r1.jar
>>>    0 Sun Apr 16 13:56:50 BST 2006 META-INF/
>>>   71 Sun Apr 16 13:56:50 BST 2006 META-INF/MANIFEST.MF
>>>    0 Sun Apr 16 04:05:08 BST 2006 org/
>>>    0 Sun Apr 16 04:05:08 BST 2006 org/json/
>>>    0 Sun Apr 16 04:05:08 BST 2006 org/json/simple/
>>>    0 Sun Apr 16 04:05:08 BST 2006 org/json/simple/parser/
>>>  1219 Sun Apr 16 04:05:10 BST 2006 org/json/simple/parser/Yytoken.class
>>>  8513 Sun Apr 16 04:05:10 BST 2006 org/json/simple/parser/Yylex.class
>>>  3378 Sun Apr 16 04:05:10 BST 2006
>>> org/json/simple/parser/JSONParser.class
>>>  2100 Sun Apr 16 13:56:20 BST 2006 org/json/simple/Test.class
>>>  862 Sun Apr 16 04:05:12 BST 2006 org/json/simple/JSONValue.class
>>>  2441 Sun Apr 16 11:26:40 BST 2006 org/json/simple/JSONObject.class
>>>  1166 Sun Apr 16 04:05:12 BST 2006 org/json/simple/JSONArray.class
>>>  3936 Sun Apr 16 04:05:12 BST 2006 org/json/simple/ItemList.class
>>> x43543:~/Apache/shindig/trunk ieb$
>>>
>>>
>>> Also,
>>>
>>> Do you work behind a proxy or any on any network where to have to
>>> authenticate on the network using a web browser. (sometimes the jars are
>>> corrupt and contain HTML if you do)
>>
>> No.
>>
>>>
>>> Ian
>>>
>>> On 23 Jul 2008, at 18:32, Ben Laurie wrote:
>>>
>>>> Using the Caja sample,
>>>>
>>>> http://localhost:8080/gadgets/files/samplecontainer/samplecontainer.html,
>>>> gives me this error:
>>>>
>>>> HTTP ERROR: 500
>>>>
>>>> org/json/simple/JSONValue
>>>>
>>>> RequestURI=/gadgets/ifr
>>>> Caused by:
>>>>
>>>> java.lang.NoClassDefFoundError: org/json/simple/JSONValue
>>>>       at
>>>>
>>>> com.google.caja.config.ConfigUtil.loadWhiteListFromJson(ConfigUtil.java:134)
>>>>       at
>>>>
>>>> com.google.caja.lang.css.CssSchema.getDefaultCss21Schema(CssSchema.java:61)
>>>>       at com.google.caja.plugin.PluginCompiler.(PluginCompiler.java:64)
>>>>       at
>>>>
>>>> com.google.caja.opensocial.DefaultGadgetRewriter.compileGadget(DefaultGadgetRewriter.java:179)
>>>
>>>
>
>

Re: Using Caja?

Posted by Ian Boston <ie...@tfd.co.uk>.
Ok,

can you do a

mvn clean install

from the base directory (ie the one with features/ javascript/ and  
java/ in it )

and then
cd java/server
mvn -X clean install -Dmaven.test.skip=true


which will produce a lot of output.

In that output there will be a section like below... the important  
line is ^^^^ marked, if not, open a JIRA and attach the output


[DEBUG] adding entry WEB-INF/classes/gadgets/files/samplecontainer/ 
state-basicfriendlist.xml
[DEBUG] adding entry WEB-INF/classes/gadgets/files/samplecontainer/ 
state-smallfriendlist.xml
[DEBUG] adding entry WEB-INF/classes/gadgets/files/samplecontainer/ 
state.dtd
[DEBUG] adding entry WEB-INF/classes/gadgets/files/sampledata/ 
canonicaldb.json
[DEBUG] adding entry WEB-INF/lib/caja-r1899.jar
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  One more line below
[DEBUG] adding entry WEB-INF/lib/commons-beanutils-1.7.0.jar
[DEBUG] adding entry WEB-INF/lib/commons-beanutils-core-1.7.0.jar
[DEBUG] adding entry WEB-INF/lib/commons-betwixt-0.8.jar
[DEBUG] adding entry WEB-INF/lib/commons-codec-1.3.jar
[DEBUG] adding entry WEB-INF/lib/commons-collections-3.2.1.jar
[DEBUG] adding entry WEB-INF/lib/commons-digester-1.7.jar
[DEBUG] adding entry WEB-INF/lib/commons-httpclient-3.1.jar
[DEBUG] adding entry WEB-INF/lib/commons-io-1.4.jar
[DEBUG] adding entry WEB-INF/lib/commons-lang-2.3.jar
[DEBUG] adding entry WEB-INF/lib/commons-logging-1.1.jar
[DEBUG] adding entry WEB-INF/lib/core-20080621.jar
[DEBUG] adding entry WEB-INF/lib/ezmorph-1.0.4.jar
[DEBUG] adding entry WEB-INF/lib/geronimo-stax-api_1.0_spec-1.0.1.jar
[DEBUG] adding entry WEB-INF/lib/google-collect-snapshot-20080321.jar
[DEBUG] adding entry WEB-INF/lib/guice-1.0.jar
[DEBUG] adding entry WEB-INF/lib/hamcrest-all-1.1.jar
[DEBUG] adding entry WEB-INF/lib/htmlparser-1.0.7.jar
[DEBUG] adding entry WEB-INF/lib/icu4j-3.8.jar
[DEBUG] adding entry WEB-INF/lib/jdom-1.0.jar
[DEBUG] adding entry WEB-INF/lib/joda-time-1.5.2.jar
[DEBUG] adding entry WEB-INF/lib/json-20070829.jar
[DEBUG] adding entry WEB-INF/lib/json-lib-2.2-jdk15.jar
[DEBUG] adding entry WEB-INF/lib/json_simple-r1.jar
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[DEBUG] adding entry WEB-INF/lib/rome-0.9.jar
[DEBUG] adding entry WEB-INF/lib/shindig-common-1-SNAPSHOT.jar
[DEBUG] adding entry WEB-INF/lib/shindig-features-1-SNAPSHOT.jar
[DEBUG] adding entry WEB-INF/lib/shindig-gadgets-1-SNAPSHOT.jar
[DEBUG] adding entry WEB-INF/lib/shindig-social-api-1-SNAPSHOT.jar
[DEBUG] adding entry WEB-INF/lib/xml-apis-1.0.b2.jar
[DEBUG] adding entry WEB-INF/web.full.xml
[DEBUG] adding entry WEB-INF/web.gadgets.xml
[DEBUG] adding entry WEB-INF/web.social.xml
[DEBUG] adding entry WEB-INF/web.xml

On 23 Jul 2008, at 19:04, Ben Laurie wrote:

> On Wed, Jul 23, 2008 at 7:00 PM, Ian Boston <ie...@tfd.co.uk> wrote:
>> I assume that you are using mvn -Prun ?
>
> Yup.
>
>> If so can you check that you have
>>
>> java/server/target/shindig-server-1-SNAPSHOT/WEB-INF/lib/ 
>> json_simple-r1.jar
>
> No.
>
>> target/work/webapp/WEB-INF/lib/json_simple-r1.jar
>
> No.
>
>>
>> after mvn -Prun
>>
>> and that when you untar it you see
>>
>> x43543:~/Apache/shindig/trunk ieb$ jar tvf
>> java/server/target/shindig-server-1-SNAPSHOT/WEB-INF/lib/ 
>> json_simple-r1.jar
>>     0 Sun Apr 16 13:56:50 BST 2006 META-INF/
>>    71 Sun Apr 16 13:56:50 BST 2006 META-INF/MANIFEST.MF
>>     0 Sun Apr 16 04:05:08 BST 2006 org/
>>     0 Sun Apr 16 04:05:08 BST 2006 org/json/
>>     0 Sun Apr 16 04:05:08 BST 2006 org/json/simple/
>>     0 Sun Apr 16 04:05:08 BST 2006 org/json/simple/parser/
>>  1219 Sun Apr 16 04:05:10 BST 2006 org/json/simple/parser/ 
>> Yytoken.class
>>  8513 Sun Apr 16 04:05:10 BST 2006 org/json/simple/parser/Yylex.class
>>  3378 Sun Apr 16 04:05:10 BST 2006 org/json/simple/parser/ 
>> JSONParser.class
>>  2100 Sun Apr 16 13:56:20 BST 2006 org/json/simple/Test.class
>>   862 Sun Apr 16 04:05:12 BST 2006 org/json/simple/JSONValue.class
>>  2441 Sun Apr 16 11:26:40 BST 2006 org/json/simple/JSONObject.class
>>  1166 Sun Apr 16 04:05:12 BST 2006 org/json/simple/JSONArray.class
>>  3936 Sun Apr 16 04:05:12 BST 2006 org/json/simple/ItemList.class
>> x43543:~/Apache/shindig/trunk ieb$
>>
>>
>> Also,
>>
>> Do you work behind a proxy or any on any network where to have to
>> authenticate on the network using a web browser. (sometimes the  
>> jars are
>> corrupt and contain HTML if you do)
>
> No.
>
>>
>> Ian
>>
>> On 23 Jul 2008, at 18:32, Ben Laurie wrote:
>>
>>> Using the Caja sample,
>>> http://localhost:8080/gadgets/files/samplecontainer/ 
>>> samplecontainer.html,
>>> gives me this error:
>>>
>>> HTTP ERROR: 500
>>>
>>> org/json/simple/JSONValue
>>>
>>> RequestURI=/gadgets/ifr
>>> Caused by:
>>>
>>> java.lang.NoClassDefFoundError: org/json/simple/JSONValue
>>>        at
>>> com.google.caja.config.ConfigUtil.loadWhiteListFromJson 
>>> (ConfigUtil.java:134)
>>>        at
>>> com.google.caja.lang.css.CssSchema.getDefaultCss21Schema 
>>> (CssSchema.java:61)
>>>        at com.google.caja.plugin.PluginCompiler. 
>>> (PluginCompiler.java:64)
>>>        at
>>> com.google.caja.opensocial.DefaultGadgetRewriter.compileGadget 
>>> (DefaultGadgetRewriter.java:179)
>>
>>


Re: Using Caja?

Posted by Ben Laurie <be...@google.com>.
On Wed, Jul 23, 2008 at 7:00 PM, Ian Boston <ie...@tfd.co.uk> wrote:
> I assume that you are using mvn -Prun ?

Yup.

> If so can you check that you have
>
> java/server/target/shindig-server-1-SNAPSHOT/WEB-INF/lib/json_simple-r1.jar

No.

> target/work/webapp/WEB-INF/lib/json_simple-r1.jar

No.

>
> after mvn -Prun
>
> and that when you untar it you see
>
> x43543:~/Apache/shindig/trunk ieb$ jar tvf
> java/server/target/shindig-server-1-SNAPSHOT/WEB-INF/lib/json_simple-r1.jar
>     0 Sun Apr 16 13:56:50 BST 2006 META-INF/
>    71 Sun Apr 16 13:56:50 BST 2006 META-INF/MANIFEST.MF
>     0 Sun Apr 16 04:05:08 BST 2006 org/
>     0 Sun Apr 16 04:05:08 BST 2006 org/json/
>     0 Sun Apr 16 04:05:08 BST 2006 org/json/simple/
>     0 Sun Apr 16 04:05:08 BST 2006 org/json/simple/parser/
>  1219 Sun Apr 16 04:05:10 BST 2006 org/json/simple/parser/Yytoken.class
>  8513 Sun Apr 16 04:05:10 BST 2006 org/json/simple/parser/Yylex.class
>  3378 Sun Apr 16 04:05:10 BST 2006 org/json/simple/parser/JSONParser.class
>  2100 Sun Apr 16 13:56:20 BST 2006 org/json/simple/Test.class
>   862 Sun Apr 16 04:05:12 BST 2006 org/json/simple/JSONValue.class
>  2441 Sun Apr 16 11:26:40 BST 2006 org/json/simple/JSONObject.class
>  1166 Sun Apr 16 04:05:12 BST 2006 org/json/simple/JSONArray.class
>  3936 Sun Apr 16 04:05:12 BST 2006 org/json/simple/ItemList.class
> x43543:~/Apache/shindig/trunk ieb$
>
>
> Also,
>
> Do you work behind a proxy or any on any network where to have to
> authenticate on the network using a web browser. (sometimes the jars are
> corrupt and contain HTML if you do)

No.

>
> Ian
>
> On 23 Jul 2008, at 18:32, Ben Laurie wrote:
>
>> Using the Caja sample,
>> http://localhost:8080/gadgets/files/samplecontainer/samplecontainer.html,
>> gives me this error:
>>
>> HTTP ERROR: 500
>>
>> org/json/simple/JSONValue
>>
>> RequestURI=/gadgets/ifr
>> Caused by:
>>
>> java.lang.NoClassDefFoundError: org/json/simple/JSONValue
>>        at
>> com.google.caja.config.ConfigUtil.loadWhiteListFromJson(ConfigUtil.java:134)
>>        at
>> com.google.caja.lang.css.CssSchema.getDefaultCss21Schema(CssSchema.java:61)
>>        at com.google.caja.plugin.PluginCompiler.(PluginCompiler.java:64)
>>        at
>> com.google.caja.opensocial.DefaultGadgetRewriter.compileGadget(DefaultGadgetRewriter.java:179)
>
>

Re: Using Caja?

Posted by Ian Boston <ie...@tfd.co.uk>.
I assume that you are using mvn -Prun ?

If so can you check that you have

java/server/target/shindig-server-1-SNAPSHOT/WEB-INF/lib/json_simple- 
r1.jar
target/work/webapp/WEB-INF/lib/json_simple-r1.jar

after mvn -Prun

and that when you untar it you see

x43543:~/Apache/shindig/trunk ieb$ jar tvf java/server/target/shindig- 
server-1-SNAPSHOT/WEB-INF/lib/json_simple-r1.jar
      0 Sun Apr 16 13:56:50 BST 2006 META-INF/
     71 Sun Apr 16 13:56:50 BST 2006 META-INF/MANIFEST.MF
      0 Sun Apr 16 04:05:08 BST 2006 org/
      0 Sun Apr 16 04:05:08 BST 2006 org/json/
      0 Sun Apr 16 04:05:08 BST 2006 org/json/simple/
      0 Sun Apr 16 04:05:08 BST 2006 org/json/simple/parser/
   1219 Sun Apr 16 04:05:10 BST 2006 org/json/simple/parser/ 
Yytoken.class
   8513 Sun Apr 16 04:05:10 BST 2006 org/json/simple/parser/Yylex.class
   3378 Sun Apr 16 04:05:10 BST 2006 org/json/simple/parser/ 
JSONParser.class
   2100 Sun Apr 16 13:56:20 BST 2006 org/json/simple/Test.class
    862 Sun Apr 16 04:05:12 BST 2006 org/json/simple/JSONValue.class
   2441 Sun Apr 16 11:26:40 BST 2006 org/json/simple/JSONObject.class
   1166 Sun Apr 16 04:05:12 BST 2006 org/json/simple/JSONArray.class
   3936 Sun Apr 16 04:05:12 BST 2006 org/json/simple/ItemList.class
x43543:~/Apache/shindig/trunk ieb$


Also,

Do you work behind a proxy or any on any network where to have to  
authenticate on the network using a web browser. (sometimes the jars  
are corrupt and contain HTML if you do)

Ian

On 23 Jul 2008, at 18:32, Ben Laurie wrote:

> Using the Caja sample,
> http://localhost:8080/gadgets/files/samplecontainer/ 
> samplecontainer.html,
> gives me this error:
>
> HTTP ERROR: 500
>
> org/json/simple/JSONValue
>
> RequestURI=/gadgets/ifr
> Caused by:
>
> java.lang.NoClassDefFoundError: org/json/simple/JSONValue
> 	at com.google.caja.config.ConfigUtil.loadWhiteListFromJson 
> (ConfigUtil.java:134)
> 	at com.google.caja.lang.css.CssSchema.getDefaultCss21Schema 
> (CssSchema.java:61)
> 	at com.google.caja.plugin.PluginCompiler.(PluginCompiler.java:64)
> 	at com.google.caja.opensocial.DefaultGadgetRewriter.compileGadget 
> (DefaultGadgetRewriter.java:179)


Re: Using Caja?

Posted by ih...@gmail.com.
On Wed, Jul 23, 2008 at 10:41 AM, <ih...@gmail.com> wrote:

> So my suspicion is that the Shindig build should be pointing to *both* of
> these Maven directories. Is it?
>

Apparently so. In java/gadgets/pom.xml, we have --

    <dependency>
      <groupId>caja</groupId>
      <artifactId>caja</artifactId>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>caja</groupId>
      <artifactId>json_simple</artifactId>
      <scope>compile</scope>
    </dependency>

I'm stumped. Maybe then I'll stop replying to myself. :)

Ihab

-- 
Ihab A.B. Awad, Palo Alto, CA

Re: Using Caja?

Posted by ih...@gmail.com.
Oh wait --

On Wed, Jul 23, 2008 at 10:38 AM, <ih...@gmail.com> wrote:

> Since this is failing on a 3rd party class, my suspicion is that we simply
> did not update our Maven builder thingey to point to all the needed jars.
>

Look at http://google-caja.googlecode.com/svn/maven/caja/. We have 2
directories, 'caja' and 'json_simple':

  - The 'caja' one contains only Caja classes; no JSON.
  - The 'json_simple' one contains the JSON library.

So my suspicion is that the Shindig build should be pointing to *both* of
these Maven directories.

Is it?

Ihab

-- 
Ihab A.B. Awad, Palo Alto, CA

Re: Using Caja?

Posted by ih...@gmail.com.
On Wed, Jul 23, 2008 at 10:36 AM, <ih...@gmail.com> wrote:

> java.lang.NoClassDefFoundError: org/json/simple/JSONValue
>

We recently changed our build so that we're no longer autoslurping all the
3rd party classes into one big jarfile. So now, to run Caja, you need
several jars on your classpath rather than just one.

Since this is failing on a 3rd party class, my suspicion is that we simply
did not update our Maven builder thingey to point to all the needed jars.

Ihab

-- 
Ihab A.B. Awad, Palo Alto, CA