使用eclipse运行Java程序出现如下异常(只标明主要异常点):
java.io.FileNotFoundException:
D:***\config\security.properties (The system cannot find the path specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.(FileInputStream.java:106)
at com.sun.enterprise.util.Utility.getPropertiesFromFile(Utility.java:42)
at com.sun.enterprise.iiop.POAEJBORB.(POAEJBORB.java:78)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:247)
at org.omg.CORBA.ORB.create_impl(ORB.java:295)
at org.omg.CORBA.ORB.init(ORB.java:336)
at com.sun.enterprise.util.ORBManager.createORB(ORBManager.java:138)
at com.sun.enterprise.util.ORBManager.init(ORBManager.java:65)
at com.sun.enterprise.naming.SerialInitContextFactory.(SerialInitContextFactory.java:31)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at
java.io.FileNotFoundException: D:***\config\ejb.properties (The system cannot find the path specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.(FileInputStream.java:106)
at com.sun.enterprise.util.Utility.getPropertiesFromFile(Utility.java:42)
at com.sun.enterprise.iiop.J2EEInitializer.(J2EEInitializer.java:54)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
Warning: unable to read transaction.interoperability config property
java.io.FileNotFoundException:
D:***\config\security.properties (The system cannot find the path specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.(FileInputStream.java:106)
at com.sun.enterprise.util.Utility.getPropertiesFromFile(Utility.java:42)
at com.sun.enterprise.iiop.security.SecurityMechanismSelector.(SecurityMechanismSelector.java:102)
解决办法:
右击要运行类所在的项目,然后选择Run As ,Run Configurations,配置Arguments参数,-DuseSelfPool=true,然后重新运行程序,问题解决。