On Tue, Apr 10, 2012 at 5:34 AM, du du <dddu88(a)gmail.com> wrote:
Hi, all,
I got a strange problem, whenever I include the jquery script in my vm
file like this:
<script type="text/javascript"
src="/xwikim/bin/skin/resources/JScripts/jQuery/slickgrid/lib/jquery-1.7.min.js"></script>
Do you have Velocity code in jquery-1.7.min.js ? I doubt it, so don't
request this file through the skin action because it will be parsed
for Velocity code. Take it as a static resource. Best is to write:
$xwiki.jsfx.use('JScripts/jQuery/slickgrid/lib/jquery-1.7.min.js')
I got the following exception; I thought it caused by
jquery and
prototype conflict, but I included <script type="text/javascript">
jQuery.noConflict();
var $j = jQuery;
</script>
replaced $ for jquery with $j, but the same error,
I also tried to use $xwiki.jsfx.use(), still same, any
solution for this?
You either put the wrong path or you forced the skin action with:
$xwiki.jsfx.use('JScripts/jQuery/slickgrid/lib/jquery-1.7.min.js', true)
the second parameter, true, means 'force skin action'.
Hope this helps,
Marius
Thanks
Dave
missing ; before statement
...h id [xwiki:resources.JScripts]</a><div id="xwikierror1"
style="display: none;">...
jquery....min.js (line 2, col 89)
<a href=""
onclick="document.getElementById('xwikierror1').style.display='block';
return false;">Error number 4001 in 4: Error while parsing velocity
page xwiki:resources.JScripts
Wrapped Exception: Failed to evaluate content with id
[xwiki:resources.JScripts]</a><div id="xwikierror1"
style="display:
none;"><pre class="xwikierror">
Error number 4001 in 4: Error while parsing velocity page
xwiki:resources.JScripts
Wrapped Exception: Failed to evaluate content with id [xwiki:resources.JScripts]
com.xpn.xwiki.XWikiException: Error number 4001 in 4: Error while
parsing velocity page xwiki:resources.JScripts
Wrapped Exception: Failed to evaluate content with id [xwiki:resources.JScripts]
at
com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:122)
at
com.xpn.xwiki.render.XWikiVelocityRenderer.render(XWikiVelocityRenderer.java:94)
at
com.xpn.xwiki.render.XWikiVelocityRenderer.interpret(XWikiVelocityRenderer.java:55)
at
com.xpn.xwiki.render.DefaultXWikiRenderingEngine.renderText(DefaultXWikiRenderingEngine.java:288)
at
com.xpn.xwiki.render.DefaultXWikiRenderingEngine.interpretText(DefaultXWikiRenderingEngine.java:194)
at com.xpn.xwiki.XWiki.parseContent(XWiki.java:1711)
at com.xpn.xwiki.web.SkinAction.renderFileFromFilesystem(SkinAction.java:252)
at com.xpn.xwiki.web.SkinAction.render(SkinAction.java:137)
at com.xpn.xwiki.web.SkinAction.render(SkinAction.java:80)
at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:231)
at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:116)
at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at com.xpn.xwiki.web.ActionFilter.doFilter(ActionFilter.java:128)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at
org.xwiki.wysiwyg.server.filter.ConversionFilter.doFilter(ConversionFilter.java:144)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at com.xpn.xwiki.plugin.webdav.XWikiDavFilter.doFilter(XWikiDavFilter.java:68)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at
org.xwiki.container.servlet.filters.internal.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:217)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at
org.xwiki.container.servlet.filters.internal.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:109)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987)
at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:579)
at
org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1805)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
Caused by: org.xwiki.velocity.XWikiVelocityException: Failed to
evaluate content with id [xwiki:resources.JScripts]
at
org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:247)
at
org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:184)
at
com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:117)
... 47 more
Caused by: org.apache.velocity.runtime.parser.ParseException: Lexical
error: org.apache.velocity.runtime.parser.TokenMgrError: Lexical error
at line 210, column 200. Encountered: "?" (63), after :
""
at org.apache.velocity.runtime.parser.Parser.parse(Parser.java:136)
at org.apache.velocity.runtime.RuntimeInstance.parse(RuntimeInstance.java:1226)
at
org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:211)
... 49 more
Wrapped Exception:
org.apache.velocity.runtime.parser.ParseException: Lexical error:
org.apache.velocity.runtime.parser.TokenMgrError: Lexical error at
line 210, column 200. Encountered: "?" (63), after :
""
at org.apache.velocity.runtime.parser.Parser.parse(Parser.java:136)
at org.apache.velocity.runtime.RuntimeInstance.parse(RuntimeInstance.java:1226)
at
org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:211)
at
org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:184)
at
com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:117)
at
com.xpn.xwiki.render.XWikiVelocityRenderer.render(XWikiVelocityRenderer.java:94)
at
com.xpn.xwiki.render.XWikiVelocityRenderer.interpret(XWikiVelocityRenderer.java:55)
at
com.xpn.xwiki.render.DefaultXWikiRenderingEngine.renderText(DefaultXWikiRenderingEngine.java:288)
at
com.xpn.xwiki.render.DefaultXWikiRenderingEngine.interpretText(DefaultXWikiRenderingEngine.java:194)
at com.xpn.xwiki.XWiki.parseContent(XWiki.java:1711)
at com.xpn.xwiki.web.SkinAction.renderFileFromFilesystem(SkinAction.java:252)
at com.xpn.xwiki.web.SkinAction.render(SkinAction.java:137)
at com.xpn.xwiki.web.SkinAction.render(SkinAction.java:80)
at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:231)
at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:116)
at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at com.xpn.xwiki.web.ActionFilter.doFilter(ActionFilter.java:128)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at
org.xwiki.wysiwyg.server.filter.ConversionFilter.doFilter(ConversionFilter.java:144)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at com.xpn.xwiki.plugin.webdav.XWikiDavFilter.doFilter(XWikiDavFilter.java:68)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at
org.xwiki.container.servlet.filters.internal.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:217)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at
org.xwiki.container.servlet.filters.internal.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:109)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987)
at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:579)
at
org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1805)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
</pre></div>
_______________________________________________
devs mailing list
devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs