简体   繁体   English

Websphere CE(社区版)无法将属性从文件加载到InitialContext

[英]Websphere CE (Community Edition) fails to load properties from file to InitialContext

my web app works good on tomcat server, now i am porting it to Websphere CE, 我的Web应用程序在tomcat服务器上运行良好,现在我将其移植到Websphere CE,

app reads properties file & load it to IntialContext, if I run the app using 如果我使用以下命令运行应用程序,则该应用程序会读取属性文件并将其加载到IntialContext中

  • tomcat >> InitialContext ic has env variable and properties are loaded in env tomcat >> InitialContext ic具有env变量,并且属性已加载到env中

but in 但在

  • Websphere CE >> InitialContext ic has env variable and env is empty Websphere CE >> InitialContext ic具有env变量,而env为空

and app is failing? 应用失败了吗?

just to add in both cases (running on tomcat or websphere CE), InitialContext has variable myProp which has all properties from the file... which means properties file was read .. 只是为了在两种情况下都添加(在tomcat或Websphere CE上运行),InitialContext具有变量myProp,该变量具有文件中的所有属性...这意味着已读取属性文件。

I have properties file in classes dir and call a service from third party jar file, using debugger & decompiler I could found above difference, but now stuck here? 我在类目录中有属性文件,并使用调试器和反编译器从第三方jar文件调用服务,我可以发现上述差异,但是现在卡在这里了吗?

can you please share tips/suggestions in this case? 在这种情况下,能否请您分享一些技巧/建议?

thanks... 谢谢...

Fixed this issue by adding jboss jars (used for NJDI) in endorsed directory of WAS-CE. 通过在WAS-CE的认可目录中添加jboss jar(用于NJDI)来解决此问题。

But now facing SocketTimeout while getting remote object. 但是现在在获取远程对象时面临SocketTimeout。

How/where can we set sockettimeout property of WAS-CE ? 我们如何/在哪里设置WAS-CE的sockettimeout属性?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM