我遵循了以下指南(针对java环境)并遇到了一个问题: http : //www.highcharts.com/docs/export-module/setting-up-the-server
当highcharts-export-web应用程序部署在WebLogic服务器上时,它将返回空图像。 服务器返回一个图像对象,但它不包含任何数据。 当在Jetty服务器上部署相同的战争时,一切都很完美。
打开日志记录信息没有透露任何信息。 一切似乎都很顺利,但我得到“空图像”
有没有人知道为什么会发生这种情况以及我怎么能解决这个问题?
Weblogic 12.1.2 Highcharts 3.0.5I have followed the following guide (for a java environment) and encountered a problem: http://www.highcharts.com/docs/export-module/setting-up-the-server
The highcharts-export-web application returns empty images when it's deployed on a WebLogic server. An image object is returned by the server but it contains no data. When the same war is deployed on a Jetty server everything works perfect.
Turning on the logging information did not reveal anything. Everything seems to be going fine, but I'm getting "empty images"
Does anybody have a clue why this could be happening and how I could be able to fix this?
Weblogic 12.1.2 Highcharts 3.0.5最满意答案
默认情况下,WebLogic会注册自己的URLStreamHandler来处理http URL。 这导致Connection静默返回并清空从服务器返回的文件。 解决方案是引用Java的默认URLStreamHandler,而不是WebLogic中的URLStreamHandler。 按着这些次序
更改此文件:highcharts-export \ highcharts-export-convert / src / main / java / com / highcharts / export / server.Server.java改变第94,95行
URL url = new URL("http://" + host + ":" + port + "/");至
sun.net.www.protocol.http.Handler handler = new sun.net.www.protocol.http.Handler(); URL url = new URL(null, "http://" + host + ":" + port + "/", handler); 转到文件夹java / highcharts-export 更新本地maven存储库,运行:mvn install 转到文件夹java / highcharts-export / highcharts-export-web 创建一个新的.war文件,运行:mvn clean packageBy default WebLogic registers its own URLStreamHandler to handle http URLs. This results in that the Connection silently returns and empty files being returned from the server. The solution is to get in a reference to Java's default URLStreamHandler instead of the one from WebLogic. Follow these steps
Alter this file: highcharts-export\highcharts-export-convert/src/main/java/com/highcharts/export/server.Server.javaChange line 94,95 from
URL url = new URL("http://" + host + ":" + port + "/");to
sun.net.www.protocol.http.Handler handler = new sun.net.www.protocol.http.Handler(); URL url = new URL(null, "http://" + host + ":" + port + "/", handler); Goto the folder java/highcharts-export Update your local maven repository, Run: mvn install Goto the folder java/highcharts-export/highcharts-export-web Create a new .war file, Run: mvn clean package更多推荐
发布评论