Highcharts导出Web战争在Weblogic服务器上不起作用(Highcharts export web war does not work on Weblogic server)

编程入门 行业动态 更新时间:2024-10-26 14:32:12
Highcharts导出Web战争在Weblogic服务器上不起作用(Highcharts export web war does not work on Weblogic server)

我遵循了以下指南(针对java环境)并遇到了一个问题: http : //www.highcharts.com/docs/export-module/setting-up-the-server

当highcharts-export-web应用程序部署在WebLogic服务器上时,它将返回空图像。 服务器返回一个图像对象,但它不包含任何数据。 当在Jetty服务器上部署相同的战争时,一切都很完美。

打开日志记录信息没有透露任何信息。 一切似乎都很顺利,但我得到“空图像”

有没有人知道为什么会发生这种情况以及我怎么能解决这个问题?

Weblogic 12.1.2 Highcharts 3.0.5

I 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 package

By 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.java

Change 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

更多推荐

本文发布于:2023-08-07 09:07:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1463680.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:上不   战争   服务器   Weblogic   Web

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!