javax.naming.CommunicationException [Root exception is java.rmi.NoSuchObjectException: no such object in table]
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:703)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:568)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
Caused by: java.rmi.NoSuchObjectException: no such object in table
at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:255)
at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:233)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:142)
at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:606)
... 4 more
每次catch住的错误都没有地方显示时间信息。不知道有啥办法能在catch住的地方都显示时间信息呢?
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:703)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:568)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
Caused by: java.rmi.NoSuchObjectException: no such object in table
at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:255)
at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:233)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:142)
at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:606)
... 4 more
每次catch住的错误都没有地方显示时间信息。不知道有啥办法能在catch住的地方都显示时间信息呢?
try {
...
} catch(Exception e) {
System.err.println("ERROR occurs at " + new Date());
e.printStackTrace();
}
不想加log4j或者system.out
当然你可以用动态代理来实现。。
就是catch时候输出堆栈信息的时候自动能输出时间否则都要在catch里面写代码我觉得这样太麻烦了啊。
可是为什么要让我每写一个catch都要写一句log4j呢?难道不能在基类写1句呢?