2
respostas

Erro quando o sistema é executado no Heroku

Boa noite.

Estou publicando um sistema que fiz com VRaptor no Heroku, mas estão acontecendo muitos erros e não estou conseguindo desvendar o mistério. Estou publicando com Tomcat 8, que é executado por meio do webapp-runner.jar (https://devcenter.heroku.com/articles/java-webapp-runner).

Faço a publicação por meio do git push.

O conteúdo do Procfile é o padrão sugerido na página que linkei acima:

web:    java $JAVA_OPTS -jar target/dependency/webapp-runner.jar --port $PORT target/*.war

O sistema chega a rodar, consigo navegar entre algumas páginas, gravar alguns dados, mas logo aparece um stack de erros gigante. Como já li que a comunidade usa e gosta muito do Heroku imagino que vocês possam me ajudar.

Ao executar o sistema localmente com o webapp-runner.jav tudo funciona normalmente.

O pom.xml do sistema é:

<?xml version="1.0" encoding="UTF-8"?>

<persistence xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/persistence 
                        http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"
    version="2.0">

    <persistence-unit name="default" transaction-type="RESOURCE_LOCAL">

        <provider>org.hibernate.jpa.HibernatePersistenceProvider</provider>
        <exclude-unlisted-classes>false</exclude-unlisted-classes>

        <properties>

            <property name="javax.persistence.jdbc.driver" value="com.mysql.jdbc.Driver" />

             <property name="javax.persistence.jdbc.url" value="jdbc:mysql://us-cdbr-iron-east-04.cleardb.net/heroku_...?reconnect=true" />
             <property name="javax.persistence.jdbc.user" value="<usuario>" />
             <property name="javax.persistence.jdbc.password" value="<senha>" />

            <property name="hibernate.dialect" value="org.hibernate.dialect.MySQL5InnoDBDialect" />
            <property name="hibernate.hbm2ddl.auto" value="update" />
            <property name="hibernate.show_sql" value="true" />
            <property name="hibernate.format_sql" value="true" />
        </properties>
    </persistence-unit>
</persistence>

Vou colocar a seguir um dos erros que recebi.

`` HTTP Status 500 - javax.persistence.PersistenceException: unexpected error when rollbacking

type Exception report

message javax.persistence.PersistenceException: unexpected error when rollbacking

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

exception

br.com.caelum.vraptor.InterceptionException: javax.persistence.PersistenceException: unexpected error when rollbacking br.com.caelum.vraptor.interceptor.StepInvoker.invokeMethod(StepInvoker.java:69) br.com.caelum.vraptor.interceptor.StepInvoker.tryToInvoke(StepInvoker.java:55) br.com.caelum.vraptor.interceptor.StepInvoker$Proxy$$$_WeldClientProxy.tryToInvoke(Unknown Source) br.com.caelum.vraptor.interceptor.InterceptorExecutor.executeAround(InterceptorExecutor.java:75) br.com.caelum.vraptor.interceptor.InterceptorExecutor$Proxy$$$WeldClientProxy.executeAround(Unknown Source) br.com.caelum.vraptor.interceptor.AspectStyleInterceptorHandler.execute(AspectStyleInterceptorHandler.java:85) br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:83) br.com.caelum.vraptor.interceptor.ExceptionHandlerInterceptor.intercept(ExceptionHandlerInterceptor.java:75) br.com.caelum.vraptor.interceptor.ExceptionHandlerInterceptor$Proxy$$$WeldClientProxy.intercept(Unknown Source) br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler$1.call(ToInstantiateInterceptorHandler.java:71) br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler$1.call(ToInstantiateInterceptorHandler.java:68) br.com.caelum.vraptor.core.Try.run(Try.java:18) br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler.executeSafely(ToInstantiateInterceptorHandler.java:68) br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler.execute(ToInstantiateInterceptorHandler.java:61) br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:83) br.com.caelum.vraptor.core.DefaultInterceptorStack.start(DefaultInterceptorStack.java:93) br.com.caelum.vraptor.core.DefaultInterceptorStack$Proxy$$$_WeldClientProxy.start(Unknown Source) br.com.caelum.vraptor.observer.RequestHandlerObserver.handle(RequestHandlerObserver.java:93) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) java.lang.reflect.Method.invoke(Method.java:498) org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstanceWithSpecialValue(MethodInjectionPoint.java:93) org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:266) org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:253) org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:232) org.jboss.weld.event.ObserverNotifier.notifyObserver(ObserverNotifier.java:169) org.jboss.weld.event.ObserverNotifier.notifyObserver(ObserverNotifier.java:165) org.jboss.weld.event.ObserverNotifier.notifyObservers(ObserverNotifier.java:119) org.jboss.weld.event.ObserverNotifier.fireEvent(ObserverNotifier.java:112) org.jboss.weld.event.EventImpl.fire(EventImpl.java:83) br.com.caelum.vraptor.VRaptor.doFilter(VRaptor.java:123)

root cause

javax.persistence.PersistenceException: unexpected error when rollbacking org.hibernate.jpa.internal.TransactionImpl.rollback(TransactionImpl.java:111) br.com.caelum.vraptor.jpa.JPATransactionInterceptor.intercept(JPATransactionInterceptor.java:79) br.com.caelum.vraptor.jpa.JPATransactionInterceptor$Proxy$$$_WeldClientProxy.intercept(Unknown Source) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) java.lang.reflect.Method.invoke(Method.java:498) net.vidageek.mirror.provider.java.PureJavaMethodReflectionProvider.invoke(PureJavaMethodReflectionProvider.java:38) net.vidageek.mirror.invoke.MethodHandlerByMethod.withArgs(MethodHandlerByMethod.java:54) br.com.caelum.vraptor.core.DefaultReflectionProvider.invoke(DefaultReflectionProvider.java:42) br.com.caelum.vraptor.core.DefaultReflectionProvider$Proxy$$$WeldClientProxy.invoke(Unknown Source) br.com.caelum.vraptor.interceptor.StepInvoker.invokeMethod(StepInvoker.java:64) br.com.caelum.vraptor.interceptor.StepInvoker.tryToInvoke(StepInvoker.java:55) br.com.caelum.vraptor.interceptor.StepInvoker$Proxy$$$WeldClientProxy.tryToInvoke(Unknown Source) br.com.caelum.vraptor.interceptor.InterceptorExecutor.executeAround(InterceptorExecutor.java:75) br.com.caelum.vraptor.interceptor.InterceptorExecutor$Proxy$$$WeldClientProxy.executeAround(Unknown Source) br.com.caelum.vraptor.interceptor.AspectStyleInterceptorHandler.execute(AspectStyleInterceptorHandler.java:85) br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:83) br.com.caelum.vraptor.interceptor.ExceptionHandlerInterceptor.intercept(ExceptionHandlerInterceptor.java:75) br.com.caelum.vraptor.interceptor.ExceptionHandlerInterceptor$Proxy$$$WeldClientProxy.intercept(Unknown Source) br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler$1.call(ToInstantiateInterceptorHandler.java:71) br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler$1.call(ToInstantiateInterceptorHandler.java:68) br.com.caelum.vraptor.core.Try.run(Try.java:18) br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler.executeSafely(ToInstantiateInterceptorHandler.java:68) br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler.execute(ToInstantiateInterceptorHandler.java:61) br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:83) br.com.caelum.vraptor.core.DefaultInterceptorStack.start(DefaultInterceptorStack.java:93) br.com.caelum.vraptor.core.DefaultInterceptorStack$Proxy$$$_WeldClientProxy.start(Unknown Source) br.com.caelum.vraptor.observer.RequestHandlerObserver.handle(RequestHandlerObserver.java:93) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) java.lang.reflect.Method.invoke(Method.java:498) org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstanceWithSpecialValue(MethodInjectionPoint.java:93) org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:266) org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:253) org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:232) org.jboss.weld.event.ObserverNotifier.notifyObserver(ObserverNotifier.java:169) org.jboss.weld.event.ObserverNotifier.notifyObserver(ObserverNotifier.java:165) org.jboss.weld.event.ObserverNotifier.notifyObservers(ObserverNotifier.java:119) org.jboss.weld.event.ObserverNotifier.fireEvent(ObserverNotifier.java:112) org.jboss.weld.event.EventImpl.fire(EventImpl.java:83) br.com.caelum.vraptor.VRaptor.doFilter(VRaptor.java:123)

root cause

org.hibernate.TransactionException: rollback failed org.hibernate.engine.transaction.spi.AbstractTransactionImpl.rollback(AbstractTransactionImpl.java:217) org.hibernate.jpa.internal.TransactionImpl.rollback(TransactionImpl.java:108) br.com.caelum.vraptor.jpa.JPATransactionInterceptor.intercept(JPATransactionInterceptor.java:79) br.com.caelum.vraptor.jpa.JPATransactionInterceptor$Proxy$$$_WeldClientProxy.intercept(Unknown Source) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) java.lang.reflect.Method.invoke(Method.java:498) net.vidageek.mirror.provider.java.PureJavaMethodReflectionProvider.invoke(PureJavaMethodReflectionProvider.java:38) net.vidageek.mirror.invoke.MethodHandlerByMethod.withArgs(MethodHandlerByMethod.java:54) br.com.caelum.vraptor.core.DefaultReflectionProvider.invoke(DefaultReflectionProvider.java:42) br.com.caelum.vraptor.core.DefaultReflectionProvider$Proxy$$$WeldClientProxy.invoke(Unknown Source) br.com.caelum.vraptor.interceptor.StepInvoker.invokeMethod(StepInvoker.java:64) br.com.caelum.vraptor.interceptor.StepInvoker.tryToInvoke(StepInvoker.java:55) br.com.caelum.vraptor.interceptor.StepInvoker$Proxy$$$WeldClientProxy.tryToInvoke(Unknown Source) br.com.caelum.vraptor.interceptor.InterceptorExecutor.executeAround(InterceptorExecutor.java:75) br.com.caelum.vraptor.interceptor.InterceptorExecutor$Proxy$$$WeldClientProxy.executeAround(Unknown Source) br.com.caelum.vraptor.interceptor.AspectStyleInterceptorHandler.execute(AspectStyleInterceptorHandler.java:85) br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:83) br.com.caelum.vraptor.interceptor.ExceptionHandlerInterceptor.intercept(ExceptionHandlerInterceptor.java:75) br.com.caelum.vraptor.interceptor.ExceptionHandlerInterceptor$Proxy$$$WeldClientProxy.intercept(Unknown Source) br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler$1.call(ToInstantiateInterceptorHandler.java:71) br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler$1.call(ToInstantiateInterceptorHandler.java:68) br.com.caelum.vraptor.core.Try.run(Try.java:18) br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler.executeSafely(ToInstantiateInterceptorHandler.java:68) br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler.execute(ToInstantiateInterceptorHandler.java:61) br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:83) br.com.caelum.vraptor.core.DefaultInterceptorStack.start(DefaultInterceptorStack.java:93) br.com.caelum.vraptor.core.DefaultInterceptorStack$Proxy$$$_WeldClientProxy.start(Unknown Source) br.com.caelum.vraptor.observer.RequestHandlerObserver.handle(RequestHandlerObserver.java:93) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) java.lang.reflect.Method.invoke(Method.java:498) org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstanceWithSpecialValue(MethodInjectionPoint.java:93) org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:266) org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:253) org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:232) org.jboss.weld.event.ObserverNotifier.notifyObserver(ObserverNotifier.java:169) org.jboss.weld.event.ObserverNotifier.notifyObserver(ObserverNotifier.java:165) org.jboss.weld.event.ObserverNotifier.notifyObservers(ObserverNotifier.java:119) org.jboss.weld.event.ObserverNotifier.fireEvent(ObserverNotifier.java:112) org.jboss.weld.event.EventImpl.fire(EventImpl.java:83) br.com.caelum.vraptor.VRaptor.doFilter(VRaptor.java:123)

root cause

org.hibernate.TransactionException: unable to rollback against JDBC connection org.hibernate.engine.transaction.internal.jdbc.JdbcTransaction.doRollback(JdbcTransaction.java:167) org.hibernate.engine.transaction.spi.AbstractTransactionImpl.rollback(AbstractTransactionImpl.java:211) org.hibernate.jpa.internal.TransactionImpl.rollback(TransactionImpl.java:108) br.com.caelum.vraptor.jpa.JPATransactionInterceptor.intercept(JPATransactionInterceptor.java:79) br.com.caelum.vraptor.jpa.JPATransactionInterceptor$Proxy$$$_WeldClientProxy.intercept(Unknown Source) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) java.lang.reflect.Method.invoke(Method.java:498) net.vidageek.mirror.provider.java.PureJavaMethodReflectionProvider.invoke(PureJavaMethodReflectionProvider.java:38) net.vidageek.mirror.invoke.MethodHandlerByMethod.withArgs(MethodHandlerByMethod.java:54) br.com.caelum.vraptor.core.DefaultReflectionProvider.invoke(DefaultReflectionProvider.java:42) br.com.caelum.vraptor.core.DefaultReflectionProvider$Proxy$$$WeldClientProxy.invoke(Unknown Source) br.com.caelum.vraptor.interceptor.StepInvoker.invokeMethod(StepInvoker.java:64) br.com.caelum.vraptor.interceptor.StepInvoker.tryToInvoke(StepInvoker.java:55) br.com.caelum.vraptor.interceptor.StepInvoker$Proxy$$$WeldClientProxy.tryToInvoke(Unknown Source) br.com.caelum.vraptor.interceptor.InterceptorExecutor.executeAround(InterceptorExecutor.java:75) br.com.caelum.vraptor.interceptor.InterceptorExecutor$Proxy$$$WeldClientProxy.executeAround(Unknown Source) br.com.caelum.vraptor.interceptor.AspectStyleInterceptorHandler.execute(AspectStyleInterceptorHandler.java:85) br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:83) br.com.caelum.vraptor.interceptor.ExceptionHandlerInterceptor.intercept(ExceptionHandlerInterceptor.java:75) br.com.caelum.vraptor.interceptor.ExceptionHandlerInterceptor$Proxy$$$WeldClientProxy.intercept(Unknown Source) br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler$1.call(ToInstantiateInterceptorHandler.java:71) br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler$1.call(ToInstantiateInterceptorHandler.java:68) br.com.caelum.vraptor.core.Try.run(Try.java:18) br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler.executeSafely(ToInstantiateInterceptorHandler.java:68) br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler.execute(ToInstantiateInterceptorHandler.java:61) br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:83) br.com.caelum.vraptor.core.DefaultInterceptorStack.start(DefaultInterceptorStack.java:93) br.com.caelum.vraptor.core.DefaultInterceptorStack$Proxy$$$_WeldClientProxy.start(Unknown Source) br.com.caelum.vraptor.observer.RequestHandlerObserver.handle(RequestHandlerObserver.java:93) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) java.lang.reflect.Method.invoke(Method.java:498) org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstanceWithSpecialValue(MethodInjectionPoint.java:93) org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:266) org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:253) org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:232) org.jboss.weld.event.ObserverNotifier.notifyObserver(ObserverNotifier.java:169) org.jboss.weld.event.ObserverNotifier.notifyObserver(ObserverNotifier.java:165) org.jboss.weld.event.ObserverNotifier.notifyObservers(ObserverNotifier.java:119) org.jboss.weld.event.ObserverNotifier.fireEvent(ObserverNotifier.java:112) org.jboss.weld.event.EventImpl.fire(EventImpl.java:83) br.com.caelum.vraptor.VRaptor.doFilter(VRaptor.java:123)

root cause

com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: No operations allowed after connection closed. sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) java.lang.reflect.Constructor.newInstance(Constructor.java:423) com.mysql.jdbc.Util.handleNewInstance(Util.java:377) com.mysql.jdbc.Util.getInstance(Util.java:360) com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956) com.mysql.jdbc.SQLError.createSQLException(SQLError.java:935) com.mysql.jdbc.SQLError.createSQLException(SQLError.java:924) com.mysql.jdbc.SQLError.createSQLException(SQLError.java:870) com.mysql.jdbc.ConnectionImpl.throwConnectionClosedException(ConnectionImpl.java:1232) com.mysql.jdbc.ConnectionImpl.checkClosed(ConnectionImpl.java:1225) com.mysql.jdbc.ConnectionImpl.rollback(ConnectionImpl.java:4564) org.hibernate.engine.transaction.internal.jdbc.JdbcTransaction.doRollback(JdbcTransaction.java:163) org.hibernate.engine.transaction.spi.AbstractTransactionImpl.rollback(AbstractTransactionImpl.java:211) org.hibernate.jpa.internal.TransactionImpl.rollback(TransactionImpl.java:108) br.com.caelum.vraptor.jpa.JPATransactionInterceptor.intercept(JPATransactionInterceptor.java:79) br.com.caelum.vraptor.jpa.JPATransactionInterceptor$Proxy$$$_WeldClientProxy.intercept(Unknown Source) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) java.lang.reflect.Method.invoke(Method.java:498) net.vidageek.mirror.provider.java.PureJavaMethodReflectionProvider.invoke(PureJavaMethodReflectionProvider.java:38) net.vidageek.mirror.invoke.MethodHandlerByMethod.withArgs(MethodHandlerByMethod.java:54) br.com.caelum.vraptor.core.DefaultReflectionProvider.invoke(DefaultReflectionProvider.java:42) br.com.caelum.vraptor.core.DefaultReflectionProvider$Proxy$$$WeldClientProxy.invoke(Unknown Source) br.com.caelum.vraptor.interceptor.StepInvoker.invokeMethod(StepInvoker.java:64) br.com.caelum.vraptor.interceptor.StepInvoker.tryToInvoke(StepInvoker.java:55) br.com.caelum.vraptor.interceptor.StepInvoker$Proxy$$$WeldClientProxy.tryToInvoke(Unknown Source) br.com.caelum.vraptor.interceptor.InterceptorExecutor.executeAround(InterceptorExecutor.java:75) br.com.caelum.vraptor.interceptor.InterceptorExecutor$Proxy$$$WeldClientProxy.executeAround(Unknown Source) br.com.caelum.vraptor.interceptor.AspectStyleInterceptorHandler.execute(AspectStyleInterceptorHandler.java:85) br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:83) br.com.caelum.vraptor.interceptor.ExceptionHandlerInterceptor.intercept(ExceptionHandlerInterceptor.java:75) br.com.caelum.vraptor.interceptor.ExceptionHandlerInterceptor$Proxy$$$WeldClientProxy.intercept(Unknown Source) br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler$1.call(ToInstantiateInterceptorHandler.java:71) br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler$1.call(ToInstantiateInterceptorHandler.java:68) br.com.caelum.vraptor.core.Try.run(Try.java:18) br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler.executeSafely(ToInstantiateInterceptorHandler.java:68) br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler.execute(ToInstantiateInterceptorHandler.java:61) br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:83) br.com.caelum.vraptor.core.DefaultInterceptorStack.start(DefaultInterceptorStack.java:93) br.com.caelum.vraptor.core.DefaultInterceptorStack$Proxy$$$_WeldClientProxy.start(Unknown Source) br.com.caelum.vraptor.observer.RequestHandlerObserver.handle(RequestHandlerObserver.java:93) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) java.lang.reflect.Method.invoke(Method.java:498) org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstanceWithSpecialValue(MethodInjectionPoint.java:93) org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:266) org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:253) org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:232) org.jboss.weld.event.ObserverNotifier.notifyObserver(ObserverNotifier.java:169) org.jboss.weld.event.ObserverNotifier.notifyObserver(ObserverNotifier.java:165) org.jboss.weld.event.ObserverNotifier.notifyObservers(ObserverNotifier.java:119) org.jboss.weld.event.ObserverNotifier.fireEvent(ObserverNotifier.java:112) org.jboss.weld.event.EventImpl.fire(EventImpl.java:83) br.com.caelum.vraptor.VRaptor.doFilter(VRaptor.java:123)

root cause

com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

The last packet successfully received from the server was 203,699 milliseconds ago. The last packet sent successfully to the server was 0 milliseconds ago. sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) java.lang.reflect.Constructor.newInstance(Constructor.java:423) com.mysql.jdbc.Util.handleNewInstance(Util.java:377) com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1036) com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:3427) com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:3327) com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3814) com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2435) com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2582) com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2530) com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1907) com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:2030) org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.extract(ResultSetReturnImpl.java:82) org.hibernate.loader.Loader.getResultSet(Loader.java:2065) org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1862) org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1838) org.hibernate.loader.Loader.doQuery(Loader.java:909) org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:354) org.hibernate.loader.Loader.doList(Loader.java:2553) org.hibernate.loader.Loader.doList(Loader.java:2539) org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2369) org.hibernate.loader.Loader.list(Loader.java:2364) org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:496) org.hibernate.hql.internal.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:387) org.hibernate.engine.query.spi.HQLQueryPlan.performList(HQLQueryPlan.java:231) org.hibernate.internal.SessionImpl.list(SessionImpl.java:1264) org.hibernate.internal.QueryImpl.list(QueryImpl.java:103) org.hibernate.jpa.internal.QueryImpl.list(QueryImpl.java:573) org.hibernate.jpa.internal.QueryImpl.getResultList(QueryImpl.java:449) sistrevi.domain.repositories.CursosRepository.cursosDoUsuario(CursosRepository.java:37) sistrevi.domain.repositories.CursosRepository$Proxy$$$_WeldClientProxy.cursosDoUsuario(Unknown Source) sistrevi.controller.HomeController.dashboard(HomeController.java:27) sistrevi.controller.HomeController$Proxy$$$WeldClientProxy.dashboard(Unknown Source) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) java.lang.reflect.Method.invoke(Method.java:498) net.vidageek.mirror.provider.java.PureJavaMethodReflectionProvider.invoke(PureJavaMethodReflectionProvider.java:38) net.vidageek.mirror.invoke.MethodHandlerByMethod.withArgs(MethodHandlerByMethod.java:54) br.com.caelum.vraptor.core.DefaultReflectionProvider.invoke(DefaultReflectionProvider.java:42) br.com.caelum.vraptor.core.DefaultReflectionProvider$Proxy$$$WeldClientProxy.invoke(Unknown Source) br.com.caelum.vraptor.observer.ExecuteMethod$1.call(ExecuteMethod.java:82) br.com.caelum.vraptor.observer.ExecuteMethod$1.call(ExecuteMethod.java:72) br.com.caelum.vraptor.core.Try.run(Try.java:18) br.com.caelum.vraptor.observer.ExecuteMethod.execute(ExecuteMethod.java:72) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) java.lang.reflect.Method.invoke(Method.java:498) org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstanceWithSpecialValue(MethodInjectionPoint.java:93) org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:266) org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:253) org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:232) org.jboss.weld.event.ObserverNotifier.notifyObserver(ObserverNotifier.java:169) org.jboss.weld.event.ObserverNotifier.notifyObserver(ObserverNotifier.java:165) org.jboss.weld.event.ObserverNotifier.notifyObservers(ObserverNotifier.java:119) org.jboss.weld.event.ObserverNotifier.fireEvent(ObserverNotifier.java:112) org.jboss.weld.event.EventImpl.fire(EventImpl.java:83) br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:78) br.com.caelum.vraptor.interceptor.FlashInterceptor.intercept(FlashInterceptor.java:98) br.com.caelum.vraptor.interceptor.FlashInterceptor$Proxy$$$WeldClientProxy.intercept(Unknown Source) br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler$1.call(ToInstantiateInterceptorHandler.java:71) br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler$1.call(ToInstantiateInterceptorHandler.java:68) br.com.caelum.vraptor.core.Try.run(Try.java:18) br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler.executeSafely(ToInstantiateInterceptorHandler.java:68) br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler.execute(ToInstantiateInterceptorHandler.java:61) br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:83) br.com.caelum.vraptor.core.DefaultInterceptorStack$Proxy$$$WeldClientProxy.next(Unknown Source) br.com.caelum.vraptor.interceptor.DefaultSimpleInterceptorStack.next(DefaultSimpleInterceptorStack.java:49) br.com.caelum.vraptor.interceptor.DefaultSimpleInterceptorStack$Proxy$$$WeldClientProxy.next(Unknown Source) sistrevi.infra.AutenticacaoInterceptor.intercept(AutenticacaoInterceptor.java:44) sistrevi.infra.AutenticacaoInterceptor$Proxy$$$WeldClientProxy.intercept(Unknown Source) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) java.lang.reflect.Method.invoke(Method.java:498) net.vidageek.mirror.provider.java.PureJavaMethodReflectionProvider.invoke(PureJavaMethodReflectionProvider.java:38) net.vidageek.mirror.invoke.MethodHandlerByMethod.withArgs(MethodHandlerByMethod.java:54) br.com.caelum.vraptor.core.DefaultReflectionProvider.invoke(DefaultReflectionProvider.java:42) br.com.caelum.vraptor.core.DefaultReflectionProvider$Proxy$$$WeldClientProxy.invoke(Unknown Source) br.com.caelum.vraptor.interceptor.StepInvoker.invokeMethod(StepInvoker.java:64) br.com.caelum.vraptor.interceptor.StepInvoker.tryToInvoke(StepInvoker.java:55) br.com.caelum.vraptor.interceptor.StepInvoker$Proxy$$$WeldClientProxy.tryToInvoke(Unknown Source) br.com.caelum.vraptor.interceptor.InterceptorExecutor.executeAround(InterceptorExecutor.java:75) br.com.caelum.vraptor.interceptor.InterceptorExecutor$Proxy$$$WeldClientProxy.executeAround(Unknown Source) br.com.caelum.vraptor.interceptor.AspectStyleInterceptorHandler.execute(AspectStyleInterceptorHandler.java:85) br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:83) br.com.caelum.vraptor.core.DefaultInterceptorStack$Proxy$$$WeldClientProxy.next(Unknown Source) br.com.caelum.vraptor.interceptor.DefaultSimpleInterceptorStack.next(DefaultSimpleInterceptorStack.java:49) br.com.caelum.vraptor.interceptor.DefaultSimpleInterceptorStack$Proxy$$$WeldClientProxy.next(Unknown Source) br.com.caelum.vraptor.jpa.JPATransactionInterceptor.intercept(JPATransactionInterceptor.java:73) br.com.caelum.vraptor.jpa.JPATransactionInterceptor$Proxy$$$WeldClientProxy.intercept(Unknown Source) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) java.lang.reflect.Method.invoke(Method.java:498) net.vidageek.mirror.provider.java.PureJavaMethodReflectionProvider.invoke(PureJavaMethodReflectionProvider.java:38) net.vidageek.mirror.invoke.MethodHandlerByMethod.withArgs(MethodHandlerByMethod.java:54) br.com.caelum.vraptor.core.DefaultReflectionProvider.invoke(DefaultReflectionProvider.java:42) br.com.caelum.vraptor.core.DefaultReflectionProvider$Proxy$$$WeldClientProxy.invoke(Unknown Source) br.com.caelum.vraptor.interceptor.StepInvoker.invokeMethod(StepInvoker.java:64) br.com.caelum.vraptor.interceptor.StepInvoker.tryToInvoke(StepInvoker.java:55) br.com.caelum.vraptor.interceptor.StepInvoker$Proxy$$$WeldClientProxy.tryToInvoke(Unknown Source) br.com.caelum.vraptor.interceptor.InterceptorExecutor.executeAround(InterceptorExecutor.java:75) br.com.caelum.vraptor.interceptor.InterceptorExecutor$Proxy$$$WeldClientProxy.executeAround(Unknown Source) br.com.caelum.vraptor.interceptor.AspectStyleInterceptorHandler.execute(AspectStyleInterceptorHandler.java:85) br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:83) br.com.caelum.vraptor.interceptor.ExceptionHandlerInterceptor.intercept(ExceptionHandlerInterceptor.java:75) br.com.caelum.vraptor.interceptor.ExceptionHandlerInterceptor$Proxy$$$WeldClientProxy.intercept(Unknown Source) br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler$1.call(ToInstantiateInterceptorHandler.java:71) br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler$1.call(ToInstantiateInterceptorHandler.java:68) br.com.caelum.vraptor.core.Try.run(Try.java:18) br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler.executeSafely(ToInstantiateInterceptorHandler.java:68) br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler.execute(ToInstantiateInterceptorHandler.java:61) br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:83) br.com.caelum.vraptor.core.DefaultInterceptorStack.start(DefaultInterceptorStack.java:93) br.com.caelum.vraptor.core.DefaultInterceptorStack$Proxy$$$_WeldClientProxy.start(Unknown Source) br.com.caelum.vraptor.observer.RequestHandlerObserver.handle(RequestHandlerObserver.java:93) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) java.lang.reflect.Method.invoke(Method.java:498) org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstanceWithSpecialValue(MethodInjectionPoint.java:93) org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:266) org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:253) org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:232) org.jboss.weld.event.ObserverNotifier.notifyObserver(ObserverNotifier.java:169) org.jboss.weld.event.ObserverNotifier.notifyObserver(ObserverNotifier.java:165) org.jboss.weld.event.ObserverNotifier.notifyObservers(ObserverNotifier.java:119) org.jboss.weld.event.ObserverNotifier.fireEvent(ObserverNotifier.java:112) org.jboss.weld.event.EventImpl.fire(EventImpl.java:83) br.com.caelum.vraptor.VRaptor.doFilter(VRaptor.java:123)

root cause java.io.EOFException: Can not read response from server. Expected to read 4 bytes, read 0 bytes before connection was unexpectedly lost. com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:2914) com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:3337) com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:3327) com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3814) com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2435) com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2582) com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2530) com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1907) com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:2030) org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.extract(ResultSetReturnImpl.java:82) org.hibernate.loader.Loader.getResultSet(Loader.java:2065) org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1862) org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1838) org.hibernate.loader.Loader.doQuery(Loader.java:909) org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:354) org.hibernate.loader.Loader.doList(Loader.java:2553) org.hibernate.loader.Loader.doList(Loader.java:2539) org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2369) org.hibernate.loader.Loader.list(Loader.java:2364) org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:496) org.hibernate.hql.internal.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:387) org.hibernate.engine.query.spi.HQLQueryPlan.performList(HQLQueryPlan.java:231) org.hibernate.internal.SessionImpl.list(SessionImpl.java:1264) org.hibernate.internal.QueryImpl.list(QueryImpl.java:103) org.hibernate.jpa.internal.QueryImpl.list(QueryImpl.java:573) org.hibernate.jpa.internal.QueryImpl.getResultList(QueryImpl.java:449) sistrevi.domain.repositories.CursosRepository.cursosDoUsuario(CursosRepository.java:37) sistrevi.domain.repositories.CursosRepository$Proxy$$$_WeldClientProxy.cursosDoUsuario(Unknown Source) sistrevi.controller.HomeController.dashboard(HomeController.java:27) sistrevi.controller.HomeController$Proxy$$$WeldClientProxy.dashboard(Unknown Source) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) java.lang.reflect.Method.invoke(Method.java:498) net.vidageek.mirror.provider.java.PureJavaMethodReflectionProvider.invoke(PureJavaMethodReflectionProvider.java:38) net.vidageek.mirror.invoke.MethodHandlerByMethod.withArgs(MethodHandlerByMethod.java:54) br.com.caelum.vraptor.core.DefaultReflectionProvider.invoke(DefaultReflectionProvider.java:42) br.com.caelum.vraptor.core.DefaultReflectionProvider$Proxy$$$WeldClientProxy.invoke(Unknown Source) br.com.caelum.vraptor.observer.ExecuteMethod$1.call(ExecuteMethod.java:82) br.com.caelum.vraptor.observer.ExecuteMethod$1.call(ExecuteMethod.java:72) br.com.caelum.vraptor.core.Try.run(Try.java:18) br.com.caelum.vraptor.observer.ExecuteMethod.execute(ExecuteMethod.java:72) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) java.lang.reflect.Method.invoke(Method.java:498) org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstanceWithSpecialValue(MethodInjectionPoint.java:93) org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:266) org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:253) org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:232) org.jboss.weld.event.ObserverNotifier.notifyObserver(ObserverNotifier.java:169) org.jboss.weld.event.ObserverNotifier.notifyObserver(ObserverNotifier.java:165) org.jboss.weld.event.ObserverNotifier.notifyObservers(ObserverNotifier.java:119) org.jboss.weld.event.ObserverNotifier.fireEvent(ObserverNotifier.java:112) org.jboss.weld.event.EventImpl.fire(EventImpl.java:83) br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:78) br.com.caelum.vraptor.interceptor.FlashInterceptor.intercept(FlashInterceptor.java:98) br.com.caelum.vraptor.interceptor.FlashInterceptor$Proxy$$$WeldClientProxy.intercept(Unknown Source) br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler$1.call(ToInstantiateInterceptorHandler.java:71) br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler$1.call(ToInstantiateInterceptorHandler.java:68) br.com.caelum.vraptor.core.Try.run(Try.java:18) br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler.executeSafely(ToInstantiateInterceptorHandler.java:68) br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler.execute(ToInstantiateInterceptorHandler.java:61) br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:83) br.com.caelum.vraptor.core.DefaultInterceptorStack$Proxy$$$WeldClientProxy.next(Unknown Source) br.com.caelum.vraptor.interceptor.DefaultSimpleInterceptorStack.next(DefaultSimpleInterceptorStack.java:49) br.com.caelum.vraptor.interceptor.DefaultSimpleInterceptorStack$Proxy$$$WeldClientProxy.next(Unknown Source) sistrevi.infra.AutenticacaoInterceptor.intercept(AutenticacaoInterceptor.java:44) sistrevi.infra.AutenticacaoInterceptor$Proxy$$$WeldClientProxy.intercept(Unknown Source) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) java.lang.reflect.Method.invoke(Method.java:498) net.vidageek.mirror.provider.java.PureJavaMethodReflectionProvider.invoke(PureJavaMethodReflectionProvider.java:38) net.vidageek.mirror.invoke.MethodHandlerByMethod.withArgs(MethodHandlerByMethod.java:54) br.com.caelum.vraptor.core.DefaultReflectionProvider.invoke(DefaultReflectionProvider.java:42) br.com.caelum.vraptor.core.DefaultReflectionProvider$Proxy$$$WeldClientProxy.invoke(Unknown Source) br.com.caelum.vraptor.interceptor.StepInvoker.invokeMethod(StepInvoker.java:64) br.com.caelum.vraptor.interceptor.StepInvoker.tryToInvoke(StepInvoker.java:55) br.com.caelum.vraptor.interceptor.StepInvoker$Proxy$$$WeldClientProxy.tryToInvoke(Unknown Source) br.com.caelum.vraptor.interceptor.InterceptorExecutor.executeAround(InterceptorExecutor.java:75) br.com.caelum.vraptor.interceptor.InterceptorExecutor$Proxy$$$WeldClientProxy.executeAround(Unknown Source) br.com.caelum.vraptor.interceptor.AspectStyleInterceptorHandler.execute(AspectStyleInterceptorHandler.java:85) br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:83) br.com.caelum.vraptor.core.DefaultInterceptorStack$Proxy$$$WeldClientProxy.next(Unknown Source) br.com.caelum.vraptor.interceptor.DefaultSimpleInterceptorStack.next(DefaultSimpleInterceptorStack.java:49) br.com.caelum.vraptor.interceptor.DefaultSimpleInterceptorStack$Proxy$$$WeldClientProxy.next(Unknown Source) br.com.caelum.vraptor.jpa.JPATransactionInterceptor.intercept(JPATransactionInterceptor.java:73) br.com.caelum.vraptor.jpa.JPATransactionInterceptor$Proxy$$$WeldClientProxy.intercept(Unknown Source) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) java.lang.reflect.Method.invoke(Method.java:498) net.vidageek.mirror.provider.java.PureJavaMethodReflectionProvider.invoke(PureJavaMethodReflectionProvider.java:38) net.vidageek.mirror.invoke.MethodHandlerByMethod.withArgs(MethodHandlerByMethod.java:54) br.com.caelum.vraptor.core.DefaultReflectionProvider.invoke(DefaultReflectionProvider.java:42) br.com.caelum.vraptor.core.DefaultReflectionProvider$Proxy$$$WeldClientProxy.invoke(Unknown Source) br.com.caelum.vraptor.interceptor.StepInvoker.invokeMethod(StepInvoker.java:64) br.com.caelum.vraptor.interceptor.StepInvoker.tryToInvoke(StepInvoker.java:55) br.com.caelum.vraptor.interceptor.StepInvoker$Proxy$$$WeldClientProxy.tryToInvoke(Unknown Source) br.com.caelum.vraptor.interceptor.InterceptorExecutor.executeAround(InterceptorExecutor.java:75) br.com.caelum.vraptor.interceptor.InterceptorExecutor$Proxy$$$WeldClientProxy.executeAround(Unknown Source) br.com.caelum.vraptor.interceptor.AspectStyleInterceptorHandler.execute(AspectStyleInterceptorHandler.java:85) br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:83) br.com.caelum.vraptor.interceptor.ExceptionHandlerInterceptor.intercept(ExceptionHandlerInterceptor.java:75) br.com.caelum.vraptor.interceptor.ExceptionHandlerInterceptor$Proxy$$$WeldClientProxy.intercept(Unknown Source) br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler$1.call(ToInstantiateInterceptorHandler.java:71) br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler$1.call(ToInstantiateInterceptorHandler.java:68) br.com.caelum.vraptor.core.Try.run(Try.java:18) br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler.executeSafely(ToInstantiateInterceptorHandler.java:68) br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler.execute(ToInstantiateInterceptorHandler.java:61) br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:83) br.com.caelum.vraptor.core.DefaultInterceptorStack.start(DefaultInterceptorStack.java:93) br.com.caelum.vraptor.core.DefaultInterceptorStack$Proxy$$$_WeldClientProxy.start(Unknown Source) br.com.caelum.vraptor.observer.RequestHandlerObserver.handle(RequestHandlerObserver.java:93) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) java.lang.reflect.Method.invoke(Method.java:498) org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstanceWithSpecialValue(MethodInjectionPoint.java:93) org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:266) org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:253) org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:232) org.jboss.weld.event.ObserverNotifier.notifyObserver(ObserverNotifier.java:169) org.jboss.weld.event.ObserverNotifier.notifyObserver(ObserverNotifier.java:165) org.jboss.weld.event.ObserverNotifier.notifyObservers(ObserverNotifier.java:119) org.jboss.weld.event.ObserverNotifier.fireEvent(ObserverNotifier.java:112) org.jboss.weld.event.EventImpl.fire(EventImpl.java:83) br.com.caelum.vraptor.VRaptor.doFilter(VRaptor.java:123)

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

Desde já agradeço!

2 respostas

É.. ta dando algum timeout na conexão com o banco de dados... eu tentaria usar um datasource, tipo um c3p0 para ver se melhora. E só uma ressalva em relação ao heroku.. ele é bem bom para rodar exemplos, mas se for uma aplicação de verdade, a chance é grande de vc ter que começar a pagar em pouco tempo.. e lá não é barato.

Então, inicialmente tentei fazer funcionar lá com JNDI, mas usando o ds padrão (DBCP); mas não tive sucesso. Inicialmente o Heroku desconsidera o arquivo context.xml - que se for necessário deve ser parametrizado na linha que executa a aplicação. Não tive sucesso, então voltei para o convencional.

Como disse, esse é um sistema acadêmico. Inicialmente preciso publicar para fazer a apresentação do projeto.

Eu fui no Heroku porque já li bastante gente falando bem dele - inclusive da facilidade para fazer o deploy com git. Como seria minha primeira experiência com deploy de m sistema Java, optei por ele.

Considerando o fato de que sou iniciante na arte de deploiar aplicações web em Java (e considerando teu comentário sobre Heroku), poderias me dar uma sugestão de provedor alternativo?