I think my first assumption, that problems with loading some javascript files
were OC4J- specific (vs. Tomcat), was wrong.
I am not the specialist in parsing details, but it seems to be a difference
in the providing parsing in Windows XP (that I use on my local computer) and
Unix/Linux platform that we use on the remote server. (?)
If am running XWiki on the server, the both browsers I use (Internet
Explorer 6.0.29000.2180.xpsp_sp2 and Firefox 2.0.0.6) show javascript
errors.
The following error messages appear in the Firefox Javascript Console (I
have to translate them all from German to English :-) :
Error: missing ; before statement
Source:
http://server/xwiki/bin/skin/skins/albatross/scripts/table/tablefilterNsort…
Row: 2, Column: 10
Source code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
with the cursor position pointing on the word “html”
Error: missing ) after argument list
Source:
http://server/xwiki//skins/albatross/fullscreenEdit.js
Row: 71
showBtn.setAttribute("title",
"$msg.get("fullScreenTooltip")");
Error: missing ; before statement
Source:
http://server/xwiki/bin/skin/skins/albatross/import.js
Row: 2, Column: 10
Source code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
Even so, the xwiki-enterprise-wiki-1.1-milestone-4.xar was imported, but I
could not expand it to select several files to import.
The error messages:
Error: missing ; before statement
Source:
http://server/xwiki/bin/skin/skins/albatross/import.js
Row: 2, Column: 10
Source code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
Error: selectPackage is not defined
Source:
http://server/xwiki/bin/import/XWiki/Import?editor=import
Row: 1
Error: syntax error
Source: javascript:void()
Row: 1, Column: 5
Source Code:
void()
I could find a reason for troubling in fullscreenEdit.js and
tablefilterNsort.js – there were double quotation marks in the javascript
code:
fullscreenEdit.js:
showBtn.setAttribute("title",
"$msg.get("fullScreenTooltip")");
in tablefilterNsort.js:
var image_up = "$xwiki.getSkinFile("icons/table/arrow-up.gif")";
var image_down =
"$xwiki.getSkinFile("icons/table/arrow-down.gif")";
var image_none =
"$xwiki.getSkinFile("icons/table/arrow-none.gif")";
After I changed the internal double quotation marks to single ones, error
messages have disappeared.
But I still could not find a cause for the similar syntax errors in
import.js.
I tried to place a test function in import.js and called it per onclick()
from importinline.vm – it works,
i.e. it was not the problem with the loading import.js with
<script type="text/javascript"
src="$xwiki.getSkinFile("import.js",
true)"></script>,
but rather with some javascript errors inside of import.js or other
javascript files.
It looks like var myAjax in import.js has no value.
Firefox Javascript debugger shows also further messages:
Error ``ActiveXObject is not defined'' [xs] in file
``http://server/xwiki/skins/albatross/rico/prototype.js'', line 549,
character 0.
Error ``ActiveXObject is not defined'' [xs] in file
``http://server/xwiki/skins/albatross/rico/prototype.js'', line 550,
character 0.
It points also to:
var Ajax = {
getTransport: function() {
return Try.these(
function() {return new ActiveXObject('Msxml2.XMLHTTP')},
function() {return new ActiveXObject('Microsoft.XMLHTTP')},
function() {return new XMLHttpRequest()}
) || false;
},
activeRequestCount: 0
}
What could be wrong hier?
BUT: If I copy the whole text of import.js in the importinline.vm – I can
expand
the xar-archive.
I can access javascript files in browser URLs with
http://server/xwiki/skins/albatross/, but calling them via
http://server/xwiki/bin/skin/skins/albatross/ produces java errors. Is it
normal?
Error number 0 in 11: Uncaught exception
Wrapped Exception: null
com.xpn.xwiki.XWikiException: Error number 0 in 11: Uncaught exception
Wrapped Exception: null
at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:163)
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:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
at
com.xpn.xwiki.web.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:117)
at
com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:673)
at
com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:340)
at
com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:830)
at
com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:228)
at
com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:133)
at
com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)
at java.lang.Thread.run(Thread.java:595)
Wrapped Exception:
java.lang.NullPointerException
at com.xpn.xwiki.web.SkinAction.isJavascriptMimeType(SkinAction.java:213)
at com.xpn.xwiki.web.SkinAction.renderSkin(SkinAction.java:148)
at com.xpn.xwiki.web.SkinAction.render(SkinAction.java:57)
at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:148)
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:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
at
com.xpn.xwiki.web.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:117)
at
com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:673)
at
com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:340)
at
com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:830)
at
com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:228)
at
com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:133)
at
com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)
at java.lang.Thread.run(Thread.java:595)
Regards,
adoro
--
View this message in context:
http://www.nabble.com/OC4J---JavaScript-tf4315467.html#a12381461
Sent from the XWiki- Dev mailing list archive at
Nabble.com.
_______________________________________________
devs mailing list
devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs