Reference: stackoverflowcontextConfigLocation classpath:applicationContext.xml
2013年3月17日 星期日
Put Spring's applicationContext.xml into src/main/resources folder
The standard folder layout of Maven is quite convenient for me, the applicationContext.xml is put into /webapp/WEB-INF instead of /src/main/resources folder. It conflicts the convention of Maven, therefore I add the following command in web.xml in order to load applicationContext.xml from /webapp/WEB-INF folder.
標籤:
applicationContext.xml,
maven,
spring,
xml
2012年9月17日 星期一
當RMI呼叫試圖存取127.0.0.1的時候
錯誤訊息可能長這樣
Caused by: java.rmi.ConnectException: Connection refused to host: 127.0.0.1; nested exception is: java.net.ConnectException: Connection refused at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEnd point.java:574) at sun.rmi.transport.tcp.TCPChannel.createConnection( TCPChannel.java:185) at sun.rmi.transport.tcp.TCPChannel.newConnection(TCP Channel.java:171) at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:9 4) at org.springframework.remoting.rmi.RmiInvocationWrap per_Stub.invoke(Unknown Source) at org.springframework.remoting.rmi.RmiClientIntercep tor.doInvoke(RmiClientInterceptor.java:400) at org.springframework.remoting.rmi.RmiClientIntercep tor.doInvoke(RmiClientInterceptor.java:344) at org.springframework.remoting.rmi.RmiClientIntercep tor.invoke(RmiClientInterceptor.java:259) at org.springframework.aop.framework.ReflectiveMethod Invocation.proceed(ReflectiveMethodInvocation.java :185) at org.springframework.aop.framework.JdkDynamicAopPro xy.invoke(JdkDynamicAopProxy.java:209) at $Proxy0.settle(Unknown Source)
這個時候,通常是RMI server的/etc/hosts設定了localhost為127.0.0.1, 只要修改/etc/hosts,把localhost的entry改為真實IP,就可以正常運作了。Reference: gflei.iteye.com
訂閱:
文章 (Atom)