无法从servlet加载配置

时间:2014-06-17 16:41:31

标签: java tomcat servlets apache-chemistry

我正在使用Apache化学客户端。我可以运行独立代码,但是当我使用时 它在servlet中是异常的。我正在使用Apache化学0.11.00。

Servlet代码

protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        try{
            org.apache.chemistry.opencmis.client.api.SessionFactory factory = org.apache.chemistry.opencmis.client.runtime.SessionFactoryImpl.newInstance();
        }catch(Exception e){
            e.printStackTrace();
        }

}



SEVERE: StandardWrapper.Throwable
org.apache.chemistry.opencmis.commons.exceptions.CmisRuntimeException: Service factory not available! Configuration problem?
    at org.apache.chemistry.opencmis.server.impl.webservices.CmisWebServicesServlet.getDelegate(CmisWebServicesServlet.java:256)
    at com.sun.xml.ws.transport.http.servlet.WSServlet.init(WSServlet.java:60)
    at org.apache.chemistry.opencmis.server.impl.webservices.CmisWebServicesServlet.init(CmisWebServicesServlet.java:101)
    at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1213)
    at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1026)
    at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4425)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4738)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:583)
    at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:943)
    at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:778)
    at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:504)
    at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1317)
    at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324)
    at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1065)
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:822)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
    at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
    at org.apache.catalina.core.StandardService.start(StandardService.java:525)
    at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Jun 17, 2014 10:03:13 PM org.apache.catalina.core.StandardContext loadOnStartup

2 个答案:

答案 0 :(得分:1)

这是OpenCMIS服务器异常。你想建立一个CMIS服务器吗? 如果没有,请从web.xml中删除所有OpenCMIS servlet。客户不需要它们。

答案 1 :(得分:1)

当repository.properties文件不在类路径

中时,我收到此错误