错误是为Oracle Coherence设置Cacehs配置

时间:2018-06-01 21:39:21

标签: java oracle-coherence

我在尝试运行oracle coherence项目时遇到异常。

Exception in thread "main" java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at my.core.server.JSWServerDelegate.main(ServerDelegate.java:139)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at com.intellij.uiDesigner.snapShooter.SnapShooter.main(SnapShooter.java:59)
Caused by: (Wrapped) java.io.IOException: Could not load cache configuration resource file://etrading-cache-config.xml
    at com.tangosol.util.Base.ensureRuntimeException(Base.java:296)
    at com.tangosol.util.Base.ensureRuntimeException(Base.java:277)
    at com.tangosol.net.ScopedCacheFactoryBuilder.loadConfigFromURI(ScopedCacheFactoryBuilder.java:399)
    at com.tangosol.net.ScopedCacheFactoryBuilder.buildFactory(ScopedCacheFactoryBuilder.java:428)
    at com.tangosol.net.ScopedCacheFactoryBuilder.getFactoryInternal(ScopedCacheFactoryBuilder.java:272)
    at com.tangosol.net.ScopedCacheFactoryBuilder.getFactory(ScopedCacheFactoryBuilder.java:235)
    at com.tangosol.net.ScopedCacheFactoryBuilder.getConfigurableCacheFactory(ScopedCacheFactoryBuilder.java:115)
    at com.tangosol.net.CacheFactory.getConfigurableCacheFactory(CacheFactory.java:154)
    at com.tangosol.net.CacheFactory.getConfigurableCacheFactory(CacheFactory.java:136)
    at com.tangosol.net.DefaultCacheServer.getConfigurableCacheFactory(DefaultCacheServer.java:702)
    at com.tangosol.net.DefaultCacheServer.main(DefaultCacheServer.java:416)
    ... 10 more
Caused by: java.io.IOException: Could not load cache configuration resource file://my-cache-config.xml
    at com.tangosol.net.ScopedCacheFactoryBuilder.loadConfigFromURI(ScopedCacheFactoryBuilder.java:396)

我已经从oracle中探讨了documentation,其中提到只要您的属性文件在类路径中它应该运行,但它没有运行。我正在使用系统属性设置属性文件。

另一件事我注意到代码运行正常并且在eclipse中加载属性但它不在intellij中运行。

1 个答案:

答案 0 :(得分:0)

我的道歉,似乎引用该属性文件的最后一个地方有空格,所以尽管属性文件的名称是正确的但是由于空间一致性无法找到该文件。我发布了关于如何解决该错误的答案。