近期将一java网站布署到新浪云上,系统采用的MiinCMP,网站布布署上去后,发现网站无法正常加载Gres UI库,网站即时乱成一堆。
把gresc源码找来看下,发现是在jetty服务器下的路径获取方式导致gresc无法正常加载配置文件所致。
MiinCMP GresC UI错误信息:
加载 gresc配置文件:/data1/jetty_work/588/juusoft/jetty-0.0.0.0-11679-juusoft.war- _1_juusoft-any-/webappWEB-INF/classes/gres-config.properties更新gresc配置失败: /data1/jetty_work/588/juusoft/jetty-0.0.0.0-11679-juusoft.war-_1_juusoft-any-/webappWEB-INF/classes/gres-config.properties (No such file or directory)
错误原因:路径问题
gresc是一个java web程序调用UI共享库gres的客户端软件,该错误导致MiinCMP在新浪等平台上无法加载UI组件得模板。
详细原因:可能是jetty与Tomcat对realpath不同处理所致。
Tomcat下返回:/tomcat/webapps/ROOT/
在jetty下,即变成/tomcat/webapps/ROOT
结果导致GresC无法正确获取UI。
目前该BUG已修改,MiinCMP等程序可正常布署到新浪SAE云平台。
Juuluu的java开源cms,如kgcms,MiinCMP等皆受该BUG影响,新版本已修改该BUG,可同时兼容jetyy,tomcat等不同云平台的应用服务器。
加载 gresc配置文件:/data1/jetty_work/588/juusoft/jetty-0.0.0.0-11679-juusoft.war- _1_juusoft-any-/webappWEB-INF/classes/gres-config.properties更新gresc配置失败: /data1/jetty_work/588/juusoft/jetty-0.0.0.0-11679-juusoft.war-_1_juusoft-any-/webappWEB-INF/classes/gres-config.properties (No such file or directory)
错误原因:路径问题
gresc是一个java web程序调用UI共享库gres的客户端软件,该错误导致MiinCMP在新浪等平台上无法加载UI组件得模板。
详细原因:可能是jetty与Tomcat对realpath不同处理所致。
Tomcat下返回:/tomcat/webapps/ROOT/
在jetty下,即变成/tomcat/webapps/ROOT
结果导致GresC无法正确获取UI。
目前该BUG已修改,MiinCMP等程序可正常布署到新浪SAE云平台。
Juuluu的java开源cms,如kgcms,MiinCMP等皆受该BUG影响,新版本已修改该BUG,可同时兼容jetyy,tomcat等不同云平台的应用服务器。
更正后代码:
/*\
* 通过web目录方式加载gresc
*/
private GresConig loadWebGresServerConfig(String webSiteDir){
/*
// URL url= GresConfigLoader.class.getClassLoader().getResource("");
URL url= GresConfigLoader.class.getResource("");
System.out.println("url:"+url.getPath());
String configFile=url+configLocalFile;
configFile.replace("\\", "/");
configFile=configFile.replace("file:","");
//for jboss
configFile=configFile.replace("vfs:","");
configFile=configFile.replace("/com/juuluu/gres/web/client/java","");
*/
String configFile=webSiteDir+"/WEB-INF/classes/"+configLocalFile;
System.out.println("load gres config file:"+configFile);
log.append("加载 gresc配置文件:"+configFile);
GresConig dbConfig=new GresConig ();
try {
System.out.println("load config:"+configFile);
FileInputStream fi=new FileInputStream(configFile);
InputStream resourceAsStream = fi;
//load config
Properties p= new java.util.Properties();
p.load(resourceAsStream);
// Database.Type=Mysql
String version=p.getProperty("gres.web.server.version");
dbConfig.setVersion(version);
//Database.dbName=guuraacmsdb
String resAppC=p.getProperty("gres.web.server.appContext");
dbConfig.setServerAppContext(resAppC);
//Database.Host=localhost
String res_Host=p.getProperty("gres.web.server.host");
dbConfig.setResHost(res_Host);
//Database.Port=3306
String database_Port=p.getProperty("gres.web.server.port");
//Database.User=root
dbConfig.setResPort(database_Port);
String database_User=p.getProperty("gres.web.server.user");
dbConfig.setResUser(database_User);
//Database.password=6636a635902bcc
String database_password=p.getProperty("gres.web.server.pwd");
//Database.urlEncode=utf8
dbConfig.setResPwd(database_password);
String database_urlEncode=p.getProperty("gres.web.server.encode");
// create connection
dbConfig.setEncode(database_urlEncode);
GresConfigLoader.resConfig=dbConfig;
System.out.println("laod "+res_Host+" Config:"+resAppC);
log.append("更新上下文gresc配置成功,新UI服务器:"+res_Host);
}catch (FileNotFoundException ex) {
ex.printStackTrace();
log.append("更新gresc配置失败:"+ex.getMessage());
// Logger.getLogger(DefaultJdbcDbUtil.class.getName()).log(Level.SEVERE, null, ex);
} catch (IOException ex) {
System.out.println(ex.getMessage());
ex.printStackTrace();;
log.append("更新gresc配置失败:"+ex.getMessage());
// Logger.getLogger(DefaultJdbcDbUtil.class.getName()).log(Level.SEVERE, null, ex);
}
return dbConfig;
}
修正bug后,新浪云应用显示信息:
重设UI组件服务器 重设GRESC客户端成功!
gres Ui组件服务器 :appres.sththg.com
服务器端口 :80
网站目录:/data1/jetty_work/588/juusoft/jetty-0.0.0.0-11679-juusoft.war- _1_juusoft-any-/webapp
重启日志:
加载 gresc配置文件:/data1/jetty_work/588/juusoft/jetty-0.0.0.0-11679-juusoft.war- _1_juusoft-any-/webapp/WEB-INF/classes/gres-config.properties更新上下文gresc配 置成功,新UI服务器:appres.sththg.com
加载 gresc配置文件:/data1/jetty_work/588/juusoft/jetty-0.0.0.0-11679-juusoft.war- _1_juusoft-any-/webappWEB-INF/classes/gres-config.properties更新gresc配置失败: /data1/jetty_work/588/juusoft/jetty-0.0.0.0-11679-juusoft.war-_1_juusoft-any-/webappWEB-INF/classes/gres-config.properties (No such file or directory)
错误原因:路径问题
gresc是一个java web程序调用UI共享库gres的客户端软件,该错误导致MiinCMP在新浪等平台上无法加载UI组件得模板。
详细原因:可能是jetty与Tomcat对realpath不同处理所致。
Tomcat下返回:/tomcat/webapps/ROOT/
在jetty下,即变成/tomcat/webapps/ROOT
结果导致GresC无法正确获取UI。
目前该BUG已修改,MiinCMP等程序可正常布署到新浪SAE云平台。
Juuluu的java开源cms,如kgcms,MiinCMP等皆受该BUG影响,新版本已修改该BUG,可同时兼容jetyy,tomcat等不同云平台的应用服务器。
加载 gresc配置文件:/data1/jetty_work/588/juusoft/jetty-0.0.0.0-11679-juusoft.war- _1_juusoft-any-/webappWEB-INF/classes/gres-config.properties更新gresc配置失败: /data1/jetty_work/588/juusoft/jetty-0.0.0.0-11679-juusoft.war-_1_juusoft-any-/webappWEB-INF/classes/gres-config.properties (No such file or directory)
错误原因:路径问题
gresc是一个java web程序调用UI共享库gres的客户端软件,该错误导致MiinCMP在新浪等平台上无法加载UI组件得模板。
详细原因:可能是jetty与Tomcat对realpath不同处理所致。
Tomcat下返回:/tomcat/webapps/ROOT/
在jetty下,即变成/tomcat/webapps/ROOT
结果导致GresC无法正确获取UI。
目前该BUG已修改,MiinCMP等程序可正常布署到新浪SAE云平台。
Juuluu的java开源cms,如kgcms,MiinCMP等皆受该BUG影响,新版本已修改该BUG,可同时兼容jetyy,tomcat等不同云平台的应用服务器。
更正后代码:
/*\
* 通过web目录方式加载gresc
*/
private GresConig loadWebGresServerConfig(String webSiteDir){
/*
// URL url= GresConfigLoader.class.getClassLoader().getResource("");
URL url= GresConfigLoader.class.getResource("");
System.out.println("url:"+url.getPath());
String configFile=url+configLocalFile;
configFile.replace("\\", "/");
configFile=configFile.replace("file:","");
//for jboss
configFile=configFile.replace("vfs:","");
configFile=configFile.replace("/com/juuluu/gres/web/client/java","");
*/
String configFile=webSiteDir+"/WEB-INF/classes/"+configLocalFile;
System.out.println("load gres config file:"+configFile);
log.append("加载 gresc配置文件:"+configFile);
GresConig dbConfig=new GresConig ();
try {
System.out.println("load config:"+configFile);
FileInputStream fi=new FileInputStream(configFile);
InputStream resourceAsStream = fi;
//load config
Properties p= new java.util.Properties();
p.load(resourceAsStream);
// Database.Type=Mysql
String version=p.getProperty("gres.web.server.version");
dbConfig.setVersion(version);
//Database.dbName=guuraacmsdb
String resAppC=p.getProperty("gres.web.server.appContext");
dbConfig.setServerAppContext(resAppC);
//Database.Host=localhost
String res_Host=p.getProperty("gres.web.server.host");
dbConfig.setResHost(res_Host);
//Database.Port=3306
String database_Port=p.getProperty("gres.web.server.port");
//Database.User=root
dbConfig.setResPort(database_Port);
String database_User=p.getProperty("gres.web.server.user");
dbConfig.setResUser(database_User);
//Database.password=6636a635902bcc
String database_password=p.getProperty("gres.web.server.pwd");
//Database.urlEncode=utf8
dbConfig.setResPwd(database_password);
String database_urlEncode=p.getProperty("gres.web.server.encode");
// create connection
dbConfig.setEncode(database_urlEncode);
GresConfigLoader.resConfig=dbConfig;
System.out.println("laod "+res_Host+" Config:"+resAppC);
log.append("更新上下文gresc配置成功,新UI服务器:"+res_Host);
}catch (FileNotFoundException ex) {
ex.printStackTrace();
log.append("更新gresc配置失败:"+ex.getMessage());
// Logger.getLogger(DefaultJdbcDbUtil.class.getName()).log(Level.SEVERE, null, ex);
} catch (IOException ex) {
System.out.println(ex.getMessage());
ex.printStackTrace();;
log.append("更新gresc配置失败:"+ex.getMessage());
// Logger.getLogger(DefaultJdbcDbUtil.class.getName()).log(Level.SEVERE, null, ex);
}
return dbConfig;
}
修正bug后,新浪云应用显示信息:
重设UI组件服务器 重设GRESC客户端成功!
gres Ui组件服务器 :appres.sththg.com
服务器端口 :80
网站目录:/data1/jetty_work/588/juusoft/jetty-0.0.0.0-11679-juusoft.war- _1_juusoft-any-/webapp
重启日志:
加载 gresc配置文件:/data1/jetty_work/588/juusoft/jetty-0.0.0.0-11679-juusoft.war- _1_juusoft-any-/webapp/WEB-INF/classes/gres-config.properties更新上下文gresc配 置成功,新UI服务器:appres.sththg.com
相关推荐
arcmap9.2连接postgres时候,需要依赖32位的postgres的dll。
利用新的MSDBN网络对图像进行去噪处理,取得了较好的效果
GRES - 替代文件或流中的模式
Sed and Awk 单行脚本快速处理字符或者文本
网络API/UI库配置: /tomcat6/webapps/MiinE/WEB-INF/classes/gres-config.properties MiinCMP开发方法: 在eclipse或netbeans下,新建WEB项目,导入Tomcat/lib库,或javaee API库,导入CMP/WEB-INF/lib下的...
nohup srun --job-name=cf23 $pt --gres=gpu:2 -n1 bash cluster_run.sh $cmd 2>&1 1>>log.cf50_2GPU & 修改 –gres=gpu:2 即可 Python 文件代码修改 parser.add_argument('--batch_size', type=
FAN_FAILURE 6 2.2.6 CHASSISD_FCHIP_HSR_ERROR 6 2.2.7 CHASSISD_FCHIP_HST_ERROR 7 2.2.8 CHASSISD_FPC_TYPE_SIB_TYPE_ERROR 7 2.2.9 CHASSISD_GRES_UNSUPP_INTERFACE 7 2.2.10 CHASSISD_GRES_UNSUPP_PIC 7 2.2.11...
如果你找到一个错误,你可以自己修复或找别人帮你修复。我们从1978年开始试用开源软件,包括优秀的GNU工具,包括GNU Emacs和GCC。我们从1993年开始使用Linux并愉快地使用Linux内核和GNU工具建立了一个完整的,自由的...
您还需要一个SSH客户端。 如果使用Windows操作系统,则建议使用。 对于其他操作系统,可以使用系统默认终端。 > ssh [username]@10.8.4.170 然后,使用以下命令加载必要的模块以运行GPU代码: > module load slurm ...
走进科学带你了解Gres,Java在线问题诊断工具。 相关文档 程序安装 远程安装 curl -sLk http://ompc.oss.aliyuncs.com/greys/install.sh | sh 远程安装(短链接) curl -sLk http://t.cn/R2QbHFc | sh 最新版本 ...
前提条件: MavenJava JDK 1.8配置su proyecto 卢塞戈·德·克洛纳尔·库图尔储藏所,制罐厂和工程公司, mvn clean install工厂中的建筑工人。 一个连续的,连续的,连续的,连续的播放mvn spring-boot:run y ...
salloc --time=3:0:0 --ntasks=2 --account=def-your_username --mem-per-cpu=24G --gres=gpu:t4:1 --nodes=2 salloc --job-name=live --time=12:0:0 --ntasks=1 --account=def-your_username --gres=gpu:k80:1 --...
SLURM sudo ln -s ~ /mpi-servers/slurm/etc/slurm/cgroups.conf /etc/slurm/cgroups.confsudo ln -s ~ /mpi-servers/slurm/etc/slurm/gres.conf /etc/slurm/gres.confsudo ln -s ~ /mpi-servers/slurm/etc/slurm/...
资源内容是postgresql离线安装程序。包括posthresql安装文件、依赖文件、gcc-c++安装文件;还有postgresql安装文档、psql使用指令、postgresql的windows管理客户端。
eschnett --gres=gpu:t4:1 --pty bash用于对称rsync -CPr $HOME /src/chord symmetry:srcmodule load cudamodule load gcc/10module load slurmsrun --partition=gpudebugq --gpus=1 --pty bash
互联网üzerindeki网站lerinin gres肾上腺素域拒绝。 Domainlerkişiselveya kurumsal olarakcûziücretlerkarşılığındatescil edilebilmektedir。 域sorguladıktan桑拉主持paketi alabilirsiniz。 Domain ...
OPLA-Tool 是由位于巴西巴拉那联邦大学 (UFPR) 计算机科学系的软件工程研究组 (GrES) 开发的 PLA 设计 (MOA4PLA) 多目标优化方法。 项目 OPLA-Tool 由以下项目组成: 架构表示 OPLA-模式 OPLA-核心 OPLA-工具 ...
互联网üzerindeki网站lerinin gres肾上腺素域拒绝。 Domainlerkişiselveya kurumsal olarakcûziücretlerkarşılığındatescil edilebilmektedir。 域sorguladıktan桑拉主持paketi alabilirsiniz。 Domain ...
(适用于Post gres SQL的python Deco rator) 描述 这是一个小模块,用于维护连接到单个数据库或连接到多个数据库的应用程序的连接池。 动机与推理 装饰器因隐藏诸如全球状态之类的愚蠢事物而备受人群欢迎。 这个...
它是Gerold Schneider的English Pro3Gres解析器的分支。 它的体系结构是混合的,由手写语法和统计模块组成,该模块返回最可能的句子分析。 与英语解析器的主要区别是德语语法和统计模块。 在结构上,它的不同之处...