`
simpledev
  • 浏览: 194416 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论

XML request error: Internal Server Error (500)解决方法

 
阅读更多

XML request error: Internal Server Error (500)解决方法

以下是网上找的最多的资料:

网上很容易找到一篇关于fckeditorjava文件上传扩展的帖子。但是,实践的时候经常会有人遇到servlet error的报错。如果有log,或正在debug,可以看到报错信息:java.lang.NoClassDefFoundError: org/apache/xml/serializer/TreeWalker
    at org.apache.xalan.processor.TransformerFactoryImpl.newTransformer(TransformerFactoryImpl.java:821)
    at com.fredck.FCKeditor.connector.ConnectorServlet.doGet(ConnectorServlet.java:151)
找不到TreeWalker这个类。

   原本这个类是包含在xalan.jar中的,但是xalan-j2.7.0版的发布包中,将serializer包中的类单独打包成serializer.jar,不再包含在xalan.jar中,所以才会即使添加了xalan.jar也无法找到该类,添加后即可解决问题。

网上的相关资料:

> You need to include serializer.jar file also.  This file includes the
> serializer.  In the Xalan Java 2.7 release, serializer code is included in
> this jar file.  The release 2.6 has serializer code included in the
> xalan.jar file.

:我的总结是:一般来说fckeditor出现问题首先web.xml里面是否配置正确,然后看是目录否权限问题

第三可能是xalan.jar不存在。

 

后面发现问题还是没有解决,开始从源代码中找问题的根源。

找到:browser.html中找

var oXML = new FCKXml() ;

       alert('111111');

       if ( callBackFunction ){

              alert('2222:'+sUrl);

              oXML.LoadUrl( sUrl, callBackFunction ) ;   // Asynchronous load.

       }else{

              alert('3333');

              return oXML.LoadUrl( sUrl ) ;

       }

发现是在加载LoadUrl xml文件的时候报错,找到FCKXmlfckxml.js文件中定义的。

oXmlHttp.onreadystatechange = function()

              {

                     if ( oXmlHttp.readyState == 4 )

                     {

                            oFCKXml.DOMDocument = oXmlHttp.responseXML ;

                            alert('444444:'+oXmlHttp.status);

                            if ( oXmlHttp.status == 200 || oXmlHttp.status == 304 ){

                                   asyncFunctionPointer( oFCKXml ) ;

                            }else{

                                   alert('5555555555555:'+oXmlHttp.responseText);

                                   alert( 'XML request error: ' + oXmlHttp.statusText + ' (' + oXmlHttp.status + ')' ) ;

                            }

                     }

              }

弹出oXmlHttp.status=500和异常情况信息:

java.net.URISyntaxException:Illegal character in path at index 18: file:///D:/Program File/

Apache Software Foundation/Tomcat 5.5/webapps/zeqi/upload

       at java.net.URI$Parser.fail<URI.java:2809>

       at java.net.URI$Parser.checkChars<URI.java:2902>

       at java.net.URI$Parser.parseHierarchical<URI.java:3066>

       at java.net.URI$Parser.parse<URI.java:3014>

       at java.net.URI.<init><URI.java:578>

另外一种方法:在本地tomcat下测试的时候,如果启动控制台,在点击fck图片上传的时候控制台也会报上面相同的错误。确定了找到问题的原因之后,下面就比较好解决问题了。

 

主要原因是由于文件夹Program File中的空格所致,所以可以把我们发布在tomcat下的工程放到没有空格的文件夹下,如D盘根目录下。

修改tomcat配置文件,如:D:\Program Files\Apache Software Foundation\Tomcat 5.5\conf\server.xml

Host节点配置上加一个Context<Context path="" docBase="D:\zeqi" reloadable="true" debug="0"></Context>

 

重新启动就可以了。由于开发的时候是用的eclipse+jetty+webwork(richtexteditor),在eclipse中运行的时候是没有问题的。

另外关于图片上传上去之后,选择显示不了图片的问题是由于端口不对,可以修改webwork.properties中的下面这行:

### used to build URLs, such as the UrlTag

webwork.url.http.port = 8081

修改成tomcat的端口号就可以了。

分享到:
评论

相关推荐

    Fckeditor XML Request error:internal server error (500) 解决方法小结

    本文章收藏了关于FCKEditor XML Request Error:Internal Server Error(500)各种问题的解决办法

    FCKEDITOR-2.6.3 代码高亮与图片水印

    FCKEDITOR-2.6.3 代码高亮与图片水印 VS2005,VS2008下. FCKeditor增加了代码高亮显示,和图片水印功能 经过X8023Z团队修改精简....2:FCKEditor.net PK XML request error: Internal Server Error(500)

    java调用net开发的webservice实例

    javax.wsdl.WSDLException: WSDLException: faultCode=PARSER_ERROR: Problem parsing '- WSDL Document -'.: org.xml.sax.SAXParseException: The element type "p" must be terminated by the matching end-tag ...

    Borland Delphi 2005 Architect Update 3

    F2084 Internal Error SCR765.00 of 5 Closed11193 Inlined function affects working of the enclosing for loop0.00 of 5 Closed11184 [Fatal Error] F2084 Internal Error: ILLK26340.00 of 5 Closed11069 ...

    Beginning Python (2005).pdf

    Glade Creates an XML Representation of the GUI 230 Try It Out: Building a GUI from a Glade File 231 Creating a Real Glade Application 231 Advanced Widgets 238 Further Enhancing PyRAP 241 Summary ...

    php.ini-development

    should be disabled, as enabling it may result in issues when generating XML ; documents, however this remains supported for backward compatibility reasons. ; Note that this directive does not control...

    CentOS7.2.1511 gcc4.8.5 通过编译的 tfs2.2.16

    client_request_server.cpp:167:21: error: 'abs' is not a member of '__gnu_cxx' stat[3] = __gnu_cxx::abs(out.size() - block_count); 解决:替换成cstdlib的abs 问题: meta_server_service.cpp:1584:48: ...

    python3.6.5参考手册 chm

    PEP 3333: Python Web Server Gateway Interface v1.0.1 Other Language Changes New, Improved, and Deprecated Modules email elementtree functools itertools collections threading datetime and time ...

    springmybatis

    请注意,这里面有一个方法名 selectUserByID 必须与 User.xml 里面配置的 select 的id 对应() 重写测试代码 程序代码 程序代码 public static void main(String[] args) { SqlSession session = ...

    Professional C# 3rd Edition

    Internal Comments Within the Source Files 67 XML Documentation 68 The C# Preprocessor Directives 70 #define and #undef 70 #if, #elif, #else, and #endif 71 #warning and #error 72 #region and #endregion...

    eac3to V3.17

    * increased some internal buffers to avoid AC3 overflow in the "thd ac3 joiner" * fixed: frame counting didn't work for MKV video tracks * fixed: video track FPS change was sometimes declined * fixed:...

    UPnP_Programming_Guide

    4.1.16 UPNP E NETWORK ERROR [-200] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 4.1.17 UPNP E SOCKET WRITE [-201] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...

Global site tag (gtag.js) - Google Analytics