Leon Wang wrote:
Hi Marius,
I asked a question no one answer me. Could you please give me some idea?
Someone did answer, asking for more information
http://lists.xwiki.org/pipermail/devs/2010-January/016890.html
When I use "mvn install" or "mvn
gwt:debug" it will report could not
Use where? In which maven project/module?
find velocity-tools:velocity-tools:pom:1.4 file:
[INFO] Downloading:
http://maven.xwiki.org/externals/velocity-tools/velocity-tools/1.4/velocity…
[INFO]
Unable to find resource 'velocity-tools:velocity-tools:pom:1.4' in
repository xwiki-externals
(
http://maven.xwiki.org/externals) Downloading:
http://maven.xwiki.org/releases/velocity-tools/velocity-tools/1.4/velocity-…
Does the build fail? There's nothing wrong with the report above.
When I try to load my GWT application at the edit panel, and at the edit
model firebug will give me velocity parsing error.What should I do? Here
is the error:
Firebug reports client side exceptions (mainly JavaScript) while
velocity exceptions happen on the server side. I don't see the relation
between firebug and the velocity exception you pasted below.
<a href=""
onclick="document.getElementById('xwikierror1').style.display='block';
return false;">Error number 4001 in 4: Error while parsing velocity page
xwiki:resources.js
As I said in the first reply, "xwiki:resources.js" is an odd name for a
page which makes me think that an URL is badly parsed somewhere. Again,
what version of XWiki Enterprise did you use?
Wrapped Exception: Failed to evaluate content with id
[xwiki:resources.js]</a><div id="xwikierror1" style="display:
none;"><pre class="xwikierror">
Error number 4001 in 4: Error while parsing velocity page xwiki:resources.js
Wrapped Exception: Failed to evaluate content with id [xwiki:resources.js]
com.xpn.xwiki.XWikiException: Error number 4001 in 4: Error while parsing velocity page
xwiki:resources.js
Wrapped Exception: Failed to evaluate content with id [xwiki:resources.js]
at com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:122)
at com.xpn.xwiki.render.XWikiVelocityRenderer.render(XWikiVelocityRenderer.java:93)
at com.xpn.xwiki.render.XWikiVelocityRenderer.interpret(XWikiVelocityRenderer.java:55)
at
com.xpn.xwiki.render.DefaultXWikiRenderingEngine.renderText(DefaultXWikiRenderingEngine.java:269)
at
com.xpn.xwiki.render.DefaultXWikiRenderingEngine.interpretText(DefaultXWikiRenderingEngine.java:175)
at com.xpn.xwiki.XWiki.parseContent(XWiki.java:1610)
at com.xpn.xwiki.web.SkinAction.renderFileFromFilesystem(SkinAction.java:239)
at com.xpn.xwiki.web.SkinAction.render(SkinAction.java:133)
at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:214)
at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:115)
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:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
com.xpn.xwiki.wysiwyg.server.filter.ConversionFilter.doFilter(ConversionFilter.java:152)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.xpn.xwiki.web.ActionFilter.doFilter(ActionFilter.java:117)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.xpn.xwiki.plugin.webdav.XWikiDavFilter.doFilter(XWikiDavFilter.java:68)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
com.xpn.xwiki.web.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:295)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
com.xpn.xwiki.web.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:112)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:859)
at
org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:574)
at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1527)
at java.lang.Thread.run(Unknown Source)
Wrapped Exception:
org.apache.velocity.runtime.parser.TemplateParseException: Encountered "+
markerId + " at xwiki:resources.js[line 47, column 27]
Was expecting one of:
"," ...
")" ...
at org.apache.velocity.runtime.parser.Parser.parse(Parser.java:119)
at org.apache.velocity.runtime.RuntimeInstance.parse(RuntimeInstance.java:1131)
at
org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:184)
at
org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:156)
at com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:116)
at com.xpn.xwiki.render.XWikiVelocityRenderer.render(XWikiVelocityRenderer.java:93)
at com.xpn.xwiki.render.XWikiVelocityRenderer.interpret(XWikiVelocityRenderer.java:55)
at
com.xpn.xwiki.render.DefaultXWikiRenderingEngine.renderText(DefaultXWikiRenderingEngine.java:269)
at
com.xpn.xwiki.render.DefaultXWikiRenderingEngine.interpretText(DefaultXWikiRenderingEngine.java:175)
at com.xpn.xwiki.XWiki.parseContent(XWiki.java:1610)
at com.xpn.xwiki.web.SkinAction.renderFileFromFilesystem(SkinAction.java:239)
at com.xpn.xwiki.web.SkinAction.render(SkinAction.java:133)
at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:214)
at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:115)
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:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
com.xpn.xwiki.wysiwyg.server.filter.ConversionFilter.doFilter(ConversionFilter.java:152)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.xpn.xwiki.web.ActionFilter.doFilter(ActionFilter.java:117)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.xpn.xwiki.plugin.webdav.XWikiDavFilter.doFilter(XWikiDavFilter.java:68)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
com.xpn.xwiki.web.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:295)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
com.xpn.xwiki.web.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:112)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:859)
at
org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:574)
at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1527)
at java.lang.Thread.run(Unknown Source)
</pre></div>
Here is what I did, I first created a edit panel:
#panelheader('DesignRationaleTreeView')
$xwiki.jsfx.use("js/xwiki/designrationaletreeview/designrationaletreeview.nocache.js",
true)
<div id="DR_TreeView"></div>
#panelfooter()
An advice: don't leave useless empty lines in the panel content because
they generate paragraphs.
Two questions: (1) do you get the same velocity exception when viewing
the Panels.YourPanelName page? (2) When you get the velocity exception,
is your JavaScript file loaded properly? Check with firebug in the
header of the edited page for the associated script tag.
Hope this helps,
Marius
In my GWT application I used to inject javascript
String hookId = "DR_TreeView";
RootPanel.get(hookId).add(outer);
Thank you everyone, have a nice day!
Leon