Solucionado (ver solução)
Solucionado
(ver solução)
15
respostas

Erro ao executar o servidor - erro 500

Pessoal tudo bem ?

Estou tento um problema ao tentar executar o projeto proposto pelo Mauricio.

HTTP Status 500 - an exception was raised while executing resource method


type Exception report

message an exception was raised while executing resource method

description The server encountered an internal error that prevented it from fulfilling this request.

exception 
br.com.caelum.vraptor.InterceptionException: an exception was raised while executing resource method
    br.com.caelum.vraptor.interceptor.ExecuteMethodInterceptor.intercept(ExecuteMethodInterceptor.java:86)
    br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler.execute(ToInstantiateInterceptorHandler.java:54)
    br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:65)
    br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler.execute(ToInstantiateInterceptorHandler.java:56)
    br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:65)
    br.com.caelum.vraptor.interceptor.ParametersInstantiatorInterceptor.intercept(ParametersInstantiatorInterceptor.java:77)
    br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler.execute(ToInstantiateInterceptorHandler.java:54)
    br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:65)
    br.com.caelum.vraptor.interceptor.InstantiateInterceptor.intercept(InstantiateInterceptor.java:42)
    br.com.caelum.vraptor.core.InstantiatedInterceptorHandler.execute(InstantiatedInterceptorHandler.java:47)
    br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:65)
    br.com.caelum.vraptor.interceptor.InterceptorListPriorToExecutionExtractor.intercept(InterceptorListPriorToExecutionExtractor.java:46)
    br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler.execute(ToInstantiateInterceptorHandler.java:54)
    br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:65)
    br.com.caelum.vraptor.interceptor.FlashInterceptor.intercept(FlashInterceptor.java:80)
    br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler.execute(ToInstantiateInterceptorHandler.java:54)
    br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:65)
    br.com.caelum.vraptor.interceptor.ResourceLookupInterceptor.intercept(ResourceLookupInterceptor.java:67)
    br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler.execute(ToInstantiateInterceptorHandler.java:54)
    br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:65)
    br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler.execute(ToInstantiateInterceptorHandler.java:56)
    br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:65)
    br.com.caelum.vraptor.core.DefaultRequestExecution.execute(DefaultRequestExecution.java:70)
    br.com.caelum.vraptor.VRaptor$1.insideRequest(VRaptor.java:92)
    br.com.caelum.vraptor.ioc.spring.SpringProvider.provideForRequest(SpringProvider.java:56)
    br.com.caelum.vraptor.VRaptor.doFilter(VRaptor.java:89)



root cause 
org.hibernate.exception.GenericJDBCException: Cannot open connection
    org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:126)
    org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:114)
    org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
    org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:52)
    org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:449)
    org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:167)
    org.hibernate.jdbc.JDBCContext.connection(JDBCContext.java:142)
    org.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:85)
    org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1354)
    br.com.caelum.produtos.controller.LoginController.criaUsuarioEProduto(LoginController.java:44)
    br.com.caelum.produtos.controller.LoginController.formulario(LoginController.java:71)
    sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    java.lang.reflect.Method.invoke(Unknown Source)
    br.com.caelum.vraptor.interceptor.ExecuteMethodInterceptor.intercept(ExecuteMethodInterceptor.java:57)
    br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler.execute(ToInstantiateInterceptorHandler.java:54)
    br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:65)
    br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler.execute(ToInstantiateInterceptorHandler.java:56)
    br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:65)
    br.com.caelum.vraptor.interceptor.ParametersInstantiatorInterceptor.intercept(ParametersInstantiatorInterceptor.java:77)
    br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler.execute(ToInstantiateInterceptorHandler.java:54)
    br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:65)
    br.com.caelum.vraptor.interceptor.InstantiateInterceptor.intercept(InstantiateInterceptor.java:42)
    br.com.caelum.vraptor.core.InstantiatedInterceptorHandler.execute(InstantiatedInterceptorHandler.java:47)
    br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:65)
    br.com.caelum.vraptor.interceptor.InterceptorListPriorToExecutionExtractor.intercept(InterceptorListPriorToExecutionExtractor.java:46)
    br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler.execute(ToInstantiateInterceptorHandler.java:54)
    br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:65)
    br.com.caelum.vraptor.interceptor.FlashInterceptor.intercept(FlashInterceptor.java:80)
    br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler.execute(ToInstantiateInterceptorHandler.java:54)
    br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:65)
    br.com.caelum.vraptor.interceptor.ResourceLookupInterceptor.intercept(ResourceLookupInterceptor.java:67)
    br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler.execute(ToInstantiateInterceptorHandler.java:54)
    br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:65)
    br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler.execute(ToInstantiateInterceptorHandler.java:56)
    br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:65)
    br.com.caelum.vraptor.core.DefaultRequestExecution.execute(DefaultRequestExecution.java:70)
    br.com.caelum.vraptor.VRaptor$1.insideRequest(VRaptor.java:92)
    br.com.caelum.vraptor.ioc.spring.SpringProvider.provideForRequest(SpringProvider.java:56)
    br.com.caelum.vraptor.VRaptor.doFilter(VRaptor.java:89)



root cause 
java.sql.SQLException: File input/output error app.db.properties java.io.FileNotFoundException: app.db.properties.new (Acesso negado)
    org.hsqldb.jdbc.Util.sqlException(Unknown Source)
    org.hsqldb.jdbc.jdbcConnection.<init>(Unknown Source)
    org.hsqldb.jdbcDriver.getConnection(Unknown Source)
    org.hsqldb.jdbcDriver.connect(Unknown Source)
    java.sql.DriverManager.getConnection(Unknown Source)
    java.sql.DriverManager.getConnection(Unknown Source)
    org.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProvider.java:133)
    org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:446)
    org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:167)
    org.hibernate.jdbc.JDBCContext.connection(JDBCContext.java:142)
    org.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:85)
    org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1354)
    br.com.caelum.produtos.controller.LoginController.criaUsuarioEProduto(LoginController.java:44)
    br.com.caelum.produtos.controller.LoginController.formulario(LoginController.java:71)
    sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    java.lang.reflect.Method.invoke(Unknown Source)
    br.com.caelum.vraptor.interceptor.ExecuteMethodInterceptor.intercept(ExecuteMethodInterceptor.java:57)
    br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler.execute(ToInstantiateInterceptorHandler.java:54)
    br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:65)
    br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler.execute(ToInstantiateInterceptorHandler.java:56)
    br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:65)
    br.com.caelum.vraptor.interceptor.ParametersInstantiatorInterceptor.intercept(ParametersInstantiatorInterceptor.java:77)
    br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler.execute(ToInstantiateInterceptorHandler.java:54)
    br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:65)
    br.com.caelum.vraptor.interceptor.InstantiateInterceptor.intercept(InstantiateInterceptor.java:42)
    br.com.caelum.vraptor.core.InstantiatedInterceptorHandler.execute(InstantiatedInterceptorHandler.java:47)
    br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:65)
    br.com.caelum.vraptor.interceptor.InterceptorListPriorToExecutionExtractor.intercept(InterceptorListPriorToExecutionExtractor.java:46)
    br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler.execute(ToInstantiateInterceptorHandler.java:54)
    br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:65)
    br.com.caelum.vraptor.interceptor.FlashInterceptor.intercept(FlashInterceptor.java:80)
    br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler.execute(ToInstantiateInterceptorHandler.java:54)
    br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:65)
    br.com.caelum.vraptor.interceptor.ResourceLookupInterceptor.intercept(ResourceLookupInterceptor.java:67)
    br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler.execute(ToInstantiateInterceptorHandler.java:54)
    br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:65)
    br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler.execute(ToInstantiateInterceptorHandler.java:56)
    br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:65)
    br.com.caelum.vraptor.core.DefaultRequestExecution.execute(DefaultRequestExecution.java:70)
    br.com.caelum.vraptor.VRaptor$1.insideRequest(VRaptor.java:92)
    br.com.caelum.vraptor.ioc.spring.SpringProvider.provideForRequest(SpringProvider.java:56)
    br.com.caelum.vraptor.VRaptor.doFilter(VRaptor.java:89)



note The full stack trace of the root cause is available in the Apache Tomcat/7.0.67 logs.

Erro gerado no console


out 20, 2016 7:15:52 AM org.apache.catalina.core.StandardWrapperValve invoke
GRAVE: Servlet.service() for servlet [default] in context with path [/produtos] threw exception
br.com.caelum.vraptor.InterceptionException: an exception was raised while executing resource method
    at br.com.caelum.vraptor.interceptor.ExecuteMethodInterceptor.intercept(ExecuteMethodInterceptor.java:86)
    at br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler.execute(ToInstantiateInterceptorHandler.java:54)
    at br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:65)
    at br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler.execute(ToInstantiateInterceptorHandler.java:56)
    at br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:65)
    at br.com.caelum.vraptor.interceptor.ParametersInstantiatorInterceptor.intercept(ParametersInstantiatorInterceptor.java:77)
    at br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler.execute(ToInstantiateInterceptorHandler.java:54)
    at br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:65)
    at br.com.caelum.vraptor.interceptor.InstantiateInterceptor.intercept(InstantiateInterceptor.java:42)
    at br.com.caelum.vraptor.core.InstantiatedInterceptorHandler.execute(InstantiatedInterceptorHandler.java:47)
    at br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:65)
    at br.com.caelum.vraptor.interceptor.InterceptorListPriorToExecutionExtractor.intercept(InterceptorListPriorToExecutionExtractor.java:46)
    at br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler.execute(ToInstantiateInterceptorHandler.java:54)
    at br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:65)
    at br.com.caelum.vraptor.interceptor.FlashInterceptor.intercept(FlashInterceptor.java:80)
    at br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler.execute(ToInstantiateInterceptorHandler.java:54)
    at br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:65)
    at br.com.caelum.vraptor.interceptor.ResourceLookupInterceptor.intercept(ResourceLookupInterceptor.java:67)
    at br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler.execute(ToInstantiateInterceptorHandler.java:54)
    at br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:65)
    at br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler.execute(ToInstantiateInterceptorHandler.java:56)
    at br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:65)
    at br.com.caelum.vraptor.core.DefaultRequestExecution.execute(DefaultRequestExecution.java:70)
    at br.com.caelum.vraptor.VRaptor$1.insideRequest(VRaptor.java:92)
    at br.com.caelum.vraptor.ioc.spring.SpringProvider.provideForRequest(SpringProvider.java:56)
    at br.com.caelum.vraptor.VRaptor.doFilter(VRaptor.java:89)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:956)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:423)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1079)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:625)
    at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:318)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    at java.lang.Thread.run(Unknown Source)
Caused by: org.hibernate.exception.GenericJDBCException: Cannot open connection
    at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:126)
    at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:114)
    at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
    at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:52)
    at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:449)
    at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:167)
    at org.hibernate.jdbc.JDBCContext.connection(JDBCContext.java:142)
    at org.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:85)
    at org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1354)
    at br.com.caelum.produtos.controller.LoginController.criaUsuarioEProduto(LoginController.java:44)
    at br.com.caelum.produtos.controller.LoginController.formulario(LoginController.java:71)
    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 br.com.caelum.vraptor.interceptor.ExecuteMethodInterceptor.intercept(ExecuteMethodInterceptor.java:57)
    ... 42 more
Caused by: java.sql.SQLException: File input/output error app.db.properties java.io.FileNotFoundException: app.db.properties.new (Acesso negado)
    at org.hsqldb.jdbc.Util.sqlException(Unknown Source)
    at org.hsqldb.jdbc.jdbcConnection.<init>(Unknown Source)
    at org.hsqldb.jdbcDriver.getConnection(Unknown Source)
    at org.hsqldb.jdbcDriver.connect(Unknown Source)
    at java.sql.DriverManager.getConnection(Unknown Source)
    at java.sql.DriverManager.getConnection(Unknown Source)
    at org.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProvider.java:133)
    at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:446)
    ... 53 more

07:16:12,827 DEBUG [VRaptor             ] VRaptor received a new request
07:16:12,834 DEBUG [DefaultRequestExecution] executing stack  DefaultRequestExecution
07:16:12,865 DEBUG [ToInstantiateInterceptorHandler] Invoking interceptor ResourceLookupInterceptor
07:16:12,866 DEBUG [DefaultResourceTranslator] trying to access /
07:16:12,866 DEBUG [DefaultResourceTranslator] found resource [DefaultResourceMethod: IndexController.indexIndexController.index()]
07:16:12,873 DEBUG [ToInstantiateInterceptorHandler] Invoking interceptor FlashInterceptor
07:16:12,875 DEBUG [ToInstantiateInterceptorHandler] Invoking interceptor InterceptorListPriorToExecutionExtractor
07:16:12,880 DEBUG [InstantiatedInterceptorHandler] Invoking interceptor LoginInterceptor
07:16:12,892 DEBUG [DefaultLogicResult  ] redirecting to class LoginController
07:16:12,893 DEBUG [ParanamerNameProvider] Found parameter names with paranamer for LoginController.formulario() as []
07:16:12,893 DEBUG [DefaultLogicResult  ] redirecting to /produtos/login/formulario
07:16:12,894 DEBUG [VRaptor             ] VRaptor ended the request
07:16:12,965 DEBUG [VRaptor             ] VRaptor received a new request
07:16:12,973 DEBUG [DefaultRequestExecution] executing stack  DefaultRequestExecution
07:16:12,981 DEBUG [ToInstantiateInterceptorHandler] Invoking interceptor ResourceLookupInterceptor
07:16:12,981 DEBUG [DefaultResourceTranslator] trying to access /login/formulario
07:16:12,982 DEBUG [DefaultResourceTranslator] found resource [DefaultResourceMethod: LoginController.formularioLoginController.formulario()]
07:16:12,991 DEBUG [ToInstantiateInterceptorHandler] Invoking interceptor FlashInterceptor
07:16:12,994 DEBUG [ToInstantiateInterceptorHandler] Invoking interceptor InterceptorListPriorToExecutionExtractor
07:16:12,999 DEBUG [InstantiatedInterceptorHandler] Invoking interceptor InstantiateInterceptor
07:16:13,013 DEBUG [ToInstantiateInterceptorHandler] Invoking interceptor ParametersInstantiatorInterceptor
07:16:13,015 DEBUG [ParametersInstantiatorInterceptor] Parameter values for [DefaultResourceMethod: LoginController.formularioLoginController.formulario()] are []
07:16:13,028 DEBUG [ToInstantiateInterceptorHandler] Invoking interceptor ExecuteMethodInterceptor
07:16:13,028 DEBUG [ExecuteMethodInterceptor] Invoking LoginController.formulario()
out 20, 2016 7:16:13 AM org.apache.catalina.core.StandardWrapperValve invoke
GRAVE: Servlet.service() for servlet [default] in context with path [/produtos] threw exception
br.com.caelum.vraptor.InterceptionException: an exception was raised while executing resource method
    at br.com.caelum.vraptor.interceptor.ExecuteMethodInterceptor.intercept(ExecuteMethodInterceptor.java:86)
    at br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler.execute(ToInstantiateInterceptorHandler.java:54)
    at br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:65)
    at br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler.execute(ToInstantiateInterceptorHandler.java:56)
    at br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:65)
    at br.com.caelum.vraptor.interceptor.ParametersInstantiatorInterceptor.intercept(ParametersInstantiatorInterceptor.java:77)
    at br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler.execute(ToInstantiateInterceptorHandler.java:54)
    at br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:65)
    at br.com.caelum.vraptor.interceptor.InstantiateInterceptor.intercept(InstantiateInterceptor.java:42)
    at br.com.caelum.vraptor.core.InstantiatedInterceptorHandler.execute(InstantiatedInterceptorHandler.java:47)
    at br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:65)
    at br.com.caelum.vraptor.interceptor.InterceptorListPriorToExecutionExtractor.intercept(InterceptorListPriorToExecutionExtractor.java:46)
    at br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler.execute(ToInstantiateInterceptorHandler.java:54)
    at br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:65)
    at br.com.caelum.vraptor.interceptor.FlashInterceptor.intercept(FlashInterceptor.java:80)
    at br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler.execute(ToInstantiateInterceptorHandler.java:54)
    at br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:65)
    at br.com.caelum.vraptor.interceptor.ResourceLookupInterceptor.intercept(ResourceLookupInterceptor.java:67)
    at br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler.execute(ToInstantiateInterceptorHandler.java:54)
    at br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:65)
    at br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler.execute(ToInstantiateInterceptorHandler.java:56)
    at br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:65)
    at br.com.caelum.vraptor.core.DefaultRequestExecution.execute(DefaultRequestExecution.java:70)
    at br.com.caelum.vraptor.VRaptor$1.insideRequest(VRaptor.java:92)
    at br.com.caelum.vraptor.ioc.spring.SpringProvider.provideForRequest(SpringProvider.java:56)
    at br.com.caelum.vraptor.VRaptor.doFilter(VRaptor.java:89)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:956)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:423)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1079)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:625)
    at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:318)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    at java.lang.Thread.run(Unknown Source)
Caused by: org.hibernate.exception.GenericJDBCException: Cannot open connection
    at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:126)
    at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:114)
    at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
    at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:52)
    at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:449)
    at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:167)
    at org.hibernate.jdbc.JDBCContext.connection(JDBCContext.java:142)
    at org.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:85)
    at org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1354)
    at br.com.caelum.produtos.controller.LoginController.criaUsuarioEProduto(LoginController.java:44)
    at br.com.caelum.produtos.controller.LoginController.formulario(LoginController.java:71)
    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 br.com.caelum.vraptor.interceptor.ExecuteMethodInterceptor.intercept(ExecuteMethodInterceptor.java:57)
    ... 42 more
Caused by: java.sql.SQLException: File input/output error app.db.properties java.io.FileNotFoundException: app.db.properties.new (Acesso negado)
    at org.hsqldb.jdbc.Util.sqlException(Unknown Source)
    at org.hsqldb.jdbc.jdbcConnection.<init>(Unknown Source)
    at org.hsqldb.jdbcDriver.getConnection(Unknown Source)
    at org.hsqldb.jdbcDriver.connect(Unknown Source)
    at java.sql.DriverManager.getConnection(Unknown Source)
    at java.sql.DriverManager.getConnection(Unknown Source)
    at org.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProvider.java:133)
    at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:446)
    ... 53 more

Conforme as instrucoes do que o professor passou durante a aulas, nao foi informado se ha necessidade de fazer configuracao previa. Estou usando a ultima versao do eclipse, windows 10 com tomcat 7.

15 respostas

Segue as informacoes do app.db.properties

#HSQL Database Engine 1.8.0.10
#Thu Jul 18 15:26:47 BRT 2013
hsqldb.script_format=0
runtime.gc_interval=0
sql.enforce_strict_size=false
hsqldb.cache_size_scale=8
readonly=false
hsqldb.nio_data_file=true
hsqldb.cache_scale=14
version=1.8.0
hsqldb.default_table_type=memory
hsqldb.cache_file_scale=1
hsqldb.log_size=200
modified=yes
hsqldb.cache_version=1.7.0
hsqldb.original_version=1.8.0
hsqldb.compatible_version=1.8.0

Opa Julio, como eu acho que vc não mexeu em nada vou dar meu chute. Na aba servers, quando vc dá dois cliques no seu tomcat, ta marcado a opção Use tomcat installation? Caso não esteja, minha sugestão é que vc apague o tomcat do eclipse... Aí vc cria de novo, clica 2x, marca a opção que eu falei e tenta de novo.

Só estou falando isso pq subi o projeto aqui e foi ok.

Desculpa Alberto, mas nao consegui localiza esta opcao =/ mas nao consegui localizar a opcao que voce mencionou.

Mas mas ja fiz o procedimento de colocar o tomcat 7 e 8 (versao 8 do netbeans), mas o erro ainda persiste.

Oi Julio, ah.. vc usa o netbeans.. estava falando do eclipse. Bom, é o próprio driver do hsqldb que está reclamando que não acha o caminho do arquivo de configuração.. eu acho que tem a ver com alguma estrutura de pastas que vc ta utilizando... alguma pasta com espaço ou algo assim... meu chute é que dê uma olhada nisso.

Alberto estou usando o eclipse mesmo, o tomcat 8 eh a versao que vem junto na instalação do netbeans (achei que tinha colocado isto =/ falha minha). é possivel voce fornecer o projeto que voce testou e funcionou em sua maquina? Pq posso comparar com o arquivo que o Mauricio forneceu e identificar se ha algo de errado.

Uma outra coisa em relacao ao hsqldb, é necessario fazer algumas configuracao inicial nele?

Eu iria no chute do Alberto. A linha de erro a seguir pode significar que o arquivo app.db.properties não foi encontrado ou que o tomcat não tem permissão para abrir o arquivo.

Caused by: java.sql.SQLException: File input/output error app.db.properties java.io.FileNotFoundException: app.db.properties.new (Acesso negado)

Confira as permissões do seu arquivo. Pelo terminal, navegue até o diretório onde ele está e digite o comando a seguir. Aí cole o resultado aqui!

ls -l app.db.properties

como estou usando windows, pelo que vi seria mais ou menos isto certo ?


20/10/2016  11:23    <DIR>          .
20/10/2016  11:23    <DIR>          ..
01/10/2012  16:09               714 .classpath
22/07/2013  11:44             1.005 .project
20/10/2016  11:23    <DIR>          .settings
18/07/2013  16:26                 0 app.db.log
18/07/2013  16:26               420 app.db.properties
18/07/2013  16:26               101 app.db.script
20/10/2016  11:23    <DIR>          build
20/10/2016  11:23    <DIR>          src
20/10/2016  11:23    <DIR>          WebContent
               5 arquivo(s)          2.240 bytes
               6 pasta(s)   141.889.937.408 bytes disponíveis

 Pasta de C:\Users\Julio\OneDrive\Engenharia de Software - Curso\Quarto Semestre\POO 3\Workspace\produtos

18/07/2013  16:26               420 app.db.properties
               1 arquivo(s)            420 bytes
               0 pasta(s)   141.889.937.408 bytes disponíveis

Meu medo é justamente essas pastas com espaco => Engenharia de Software - Curso\Quarto Semestre

Tiraria tudo quanto é espaço do nome.

Alberto, resolvi trocar o workspace pra algumas pasta que nao contenha espaços, workspace: C:\Users\Julio\Documents\curso-jstl, mas mesmo assim eh gerado os mesmos erros do inicio do topico =/ Nao estou usando UAC (Configurações de controle de Conta de Usuarios) Ja cheguei a desabilitar o antivirus por garantia. Mas nao esta funcionando

solução!

Pessoal o programa rodou agora normal \o/. A questao é nao saberei informar onde realmente estava o problema, pois precisei desinstalar antivirus (estava dando muito falso positivo). Fiz a reinstalação do java, pois tive um problema com elem ai abri o eclipse, importei o projeto e executei, o servidor iniciou normalmente.

Cheguei a incluir ele na build path manualmente. botao direito -> build path -> configure build path -> add library -> Server Runtime -> Apache Tomcat v7.

Okay, Julio! Vou marcar sua própria resposta como solução do tópico, já que você explica a trajetória do seu sucesso!

Bons estudos!

Mesmo erro aqui.

Já alterei no hibernate.properties

de: hibernate.connection.url jdbc:hsqldb:file:app.db

para:

hibernate.connection.url jdbc:hsqldb:file:C:\Users\doug_\workspace\curso-jstl\produtos\app.db

Mas continua o mesmo erro.

Douglas boa tarde!

Este topico ja esta marcado como solucionado, por gentileza abra outro topico relatando o seu erro pois assim os moderadores poderam te ajudar de uma melhor forma \o/

Explique certinho o erro e coloca alguns trechos do seu codigo onde voce acha que esta o erro

A "solução" foi :

Pessoal o programa rodou agora normal \o/. A questao é nao saberei informar onde realmente estava o problema, pois precisei desinstalar antivirus (estava dando muito falso positivo). Fiz a reinstalação do java, pois tive um problema com elem ai abri o eclipse, importei o projeto e executei, o servidor iniciou normalmente.

Cheguei a incluir ele na build path manualmente. botao direito -> build path -> configure build path -> add library -> Server Runtime -> Apache Tomcat v7.

Não resolve nada, por isso perguntei.

Mas ok, já abri outro tópico.

Por isto pedi pra tu abrir um outro topico, pois o pessoal te ajuda de uma forma melhor :) Neste meu caso, sabe Deus o motivo de nao estar funcionando e voltou ao normal '-'.

Espero que seu problema seja solucionado em breve \o/ Se Cuida