关于J2EE开发中遇到的一个问题(急!!!!)

anihc_001 2005-11-13 03:44:36
MVC环境介绍:
Linux下安装: j2sdk,tomcat,Hiberate;
Windows 下浏览.
运行Execution Server(自己开发的)时,发现localhost报告错误如下:
2005-11-1 11:29:11 xx.util.LogManager error
警告: Job Execution Server Error: Unknown host: localhost; nested exception is:
java.net.UnknownHostException: localhost
sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:565)
sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:185)
sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:171)
sun.rmi.server.UnicastRef.newCall(UnicastRef.java:313)
sun.rmi.registry.RegistryImpl_Stub.rebind(Unknown Source)
java.rmi.Naming.rebind(Naming.java:160)
xx.execution.server.JobExecutionServerImpl.main(JobExecutionServerImpl.java:198)

源程序如下:
public static void main(String[] args) {

RMISecurityManager sm = new RMISecurityManager();
System.setSecurityManager(sm);

try {
// Get Properties from property file
Properties props = Properties.getInstance();
int port = props.getIntProperty("ats.execution.port", 3000);

// Export the registry from the same JVM
LocateRegistry.createRegistry(port);

// Construct an instance of Job Execution Server
JobExecutionServerImpl exeServer = new
JobExecutionServerImpl(Constants.JOB_EXECUTION_SERVER);

// Bind the instance to the server
Naming.rebind("//localhost:" + port + "/" +
Constants.JOB_EXECUTION_SERVER, exeServer);

// Write information to log file
LogManager.info("Job Execution Server is bound in RMI Registry.");

// Reload running suite to job-suite queue
exeServer.setup();

} catch (Exception e) {
LogManager.error("Job Execution Server Error: " + e.getMessage(),
e.getStackTrace());
请问:1)该如何解决?Tomcat服务器已正常启动.报错显示位于: Naming.rebind,该如何解决?
2)如何在Windows下通过Eclipse实时调试?如何配置?

急!!!!!!
...全文
440 10 打赏 收藏 转发到动态 举报
写回复
用AI写文章
10 条回复
切换为时间正序
请发表友善的回复…
发表回复
rocker9527 2005-12-10
  • 打赏
  • 举报
回复
java.lang.NullPointerException
JobExecutionServerImpl.java:216 看看哪里有个引用为空了!
anihc_001 2005-12-08
  • 打赏
  • 举报
回复
我是菜鸟,能详细的说说吗?
谢谢!
happyanyday 2005-12-08
  • 打赏
  • 举报
回复
位置指定错误
anihc_001 2005-12-06
  • 打赏
  • 举报
回复
各位老大,我调试该程序报错,如下:
java.lang.ExceptionInInitializerError
at ats.execution.server.JobExecutionServerImpl.main(JobExecutionServerImpl.java:216)
Caused by: java.lang.NullPointerException
at java.io.Reader.<init>(Unknown Source)
at java.io.InputStreamReader.<init>(Unknown Source)
at java.util.Properties.load(Unknown Source)
at ats.util.Properties.initProperties(Properties.java:91)
at ats.util.Properties.<init>(Properties.java:30)
at ats.util.Properties.getInstance(Properties.java:40)
at ats.util.LogManager.<clinit>(LogManager.java:34)
... 1 more
Exception in thread "main"

请大家帮忙给我分析分析!谢谢!
zhangji__2000 2005-11-21
  • 打赏
  • 举报
回复
有同感,你看你连接数据源的配置有没有问题,找不到服务主机
shenhf_ 2005-11-21
  • 打赏
  • 举报
回复
感觉象是数据源配置的问题,具体哪个环节看不出来。实时调试?如果你问的是断点调试,用调试模式启服务就可以的。
anihc_001 2005-11-18
  • 打赏
  • 举报
回复
各位大虾,救命啊!
soso119 2005-11-17
  • 打赏
  • 举报
回复
up~
bohemia 2005-11-17
  • 打赏
  • 举报
回复
只能帮你顶了。没有涉及到此类问题.
anihc_001 2005-11-15
  • 打赏
  • 举报
回复
怎么没人回呢?

50,527

社区成员

发帖
与我相关
我的任务
社区描述
Java相关技术讨论
javaspring bootspring cloud 技术论坛(原bbs)
社区管理员
  • Java相关社区
  • 小虚竹
  • 谙忆
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧