尝试部署服务器

时间:2017-10-28 20:11:51

标签: java

您好我是java开发的新手,我正在尝试修改由同事开发的应用程序,但是当我尝试部署它时,我收到此错误:

  

javax.servlet.ServletException:   org.apache.ibatis.exceptions.PersistenceException:

     

构建SqlSession时出错。

     

SQL Mapper配置

中可能存在错误      

原因:org.apache.ibatis.builder.BuilderException:解析SQL Mapper配置时出错。原因:java.io.IOException:找不到

     

resource database.properties     org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:373)     org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:372)     org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:335)     org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:218)     org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)

     

org.apache.ibatis.exceptions.PersistenceException:

     

构建SqlSession时出错。

     

SQL Mapper配置

中可能存在错误      

原因:org.apache.ibatis.builder.BuilderException:解析SQL Mapper配置时出错。原因:java.io.IOException:找不到

     

resource database.properties     org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:23)     org.apache.ibatis.session.SqlSessionFactoryBuilder.build(SqlSessionFactoryBuilder.java:79)     org.apache.ibatis.session.SqlSessionFactoryBuilder.build(SqlSessionFactoryBuilder.java:67)     com.jeeutils.db.ConnectionBuilderAction。(ConnectionBuilderAction.java:30)     com.jeeutils.db.ConnectionBuilderAction.getSqlSession(ConnectionBuilderAction.java:45)     com.utils.dbsession.DbSession.newSessionKey(DbSession.java:47)     com.utils.dbsession.DbSession.getSession(DbSession.java:147)     com.webapp.actions.BusinessAction.loadProfileMenuList(BusinessAction.java:391)     com.webapp.actions.BusinessAction.preprocessRequest(BusinessAction.java:158)     com.webapp.actions.LoginAction.addForm(LoginAction.java:56)     sun.reflect.NativeMethodAccessorImpl.invoke0(原生方法)     sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)     sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)     java.lang.reflect.Method.invoke(Method.java:497)     org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory $ 1.invoke(ResourceMethodInvocationHandlerFactory.java:81)     org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher $ 1.run(AbstractJavaResourceMethodDispatcher.java:140)     org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:158)     org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider $ ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:152)     org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:101)     org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:353)     org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:343)     org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102)     org.glassfish.jersey.server.ServerRuntime $ 1.run(ServerRuntime.java:237)     org.glassfish.jersey.internal.Errors $ 1.call(Errors.java:271)     org.glassfish.jersey.internal.Errors $ 1.call(Errors.java:267)     org.glassfish.jersey.internal.Errors.process(Errors.java:315)     org.glassfish.jersey.internal.Errors.process(Errors.java:297)     org.glassfish.jersey.internal.Errors.process(Errors.java:267)     org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:318)     org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:211)     org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:982)     org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:359)     org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:372)     org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:335)     org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:218)     org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)

我想知道这个错误的原因是什么以及如何解决它。

1 个答案:

答案 0 :(得分:1)

Ibatis是一个数据映射框架(它位于数据库和面向对象的逻辑之间...提供对象以返回查询)并且它确实有一个配置文件和这个&#34 ; database.properties&#34 ;.部署后,您的程序找不到它。在不了解更多细节的情况下,我无法告诉你更多信息。

也许this也可以提供帮助,响应建议可以放置属性文件的位置。