Ainda não tem acesso? Estude com a gente! Matricule-se
Ainda não tem acesso? Estude com a gente! Matricule-se

Solucionado (ver solução)

erro ao acessar aplicação deployada

a aplicação subiu no heroku, mas não consigo acessa-la (executando localmente o projeto sobe corretamente e acesso normalmente)

link do projeto no github: https://github.com/AndreCarvalho94/ehospedagem

obtive o seguinte resultado no log:

2019-06-12T12:42:03.212965+00:00 app[web.1]: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in br.com.ehospedagem.reservas.conf.JPAConfiguration: Invocation of init method failed; nested exception is javax.persistence.PersistenceException: [PersistenceUnit: default] Unable to build Hibernate SessionFactory
2019-06-12T12:42:03.212967+00:00 app[web.1]: at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1583)
2019-06-12T12:42:03.212970+00:00 app[web.1]: at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553)

2019-06-12T12:42:03.213023+00:00 app[web.1]: Caused by: javax.persistence.PersistenceException: [PersistenceUnit: default] Unable to build Hibernate SessionFactory
2019-06-12T12:42:03.213025+00:00 app[web.1]: at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.persistenceException(EntityManagerFactoryBuilderImpl.java:951)
2019-06-12T12:42:03.213027+00:00 app[web.1]: at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:881)
2019-06-12T12:42:03.213029+00:00 app[web.1]: at org.hibernate.jpa.HibernatePersistenceProvider.createContainerEntityManagerFactory(HibernatePersistenceProvider.java:151)

2019-06-12T12:42:03.213038+00:00 app[web.1]: at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1579)
2019-06-12T12:42:03.213041+00:00 app[web.1]: ... 21 more
2019-06-12T12:42:03.213043+00:00 app[web.1]: Caused by: org.hibernate.exception.SQLGrammarException: Error accessing index information: public.Hospede
2019-06-12T12:42:03.213045+00:00 app[web.1]: at org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:106)
2019-06-12T12:42:03.213055+00:00 app[web.1]: at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42)
2019-06-12T12:42:03.213057+00:00 app[web.1]: at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111)
2019-06-12T12:42:03.213059+00:00 app[web.1]: at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97)
2019-06-12T12:42:03.213063+00:00 app[web.1]: at org.hibernate.tool.schema.extract.internal.InformationExtractorJdbcDatabaseMetaDataImpl.convertSQLException(InformationExtractorJdbcDatabaseMetaDataImpl.java:97)
2019-06-12T12:42:03.213065+00:00 app[web.1]: at org.hibernate.tool.schema.extract.internal.InformationExtractorJdbcDatabaseMetaDataImpl.getIndexes(InformationExtractorJdbcDatabaseMetaDataImpl.java:613)

resumi porque não coube o log inteiro, mas creio que essa é a parte principal.

4 respostas

Tem a stack completa do erro?

solução

Rapaz, esse erro:

Caused by: org.postgresql.util.PSQLException: ERROR: column am.amcanorder does not exist

é por conta da versão do driver do postgres

tenta usar a versão

<postgresql.version>9.4.1211</postgresql.version>

Oi Alberto, que bom que resolveu o seu problema. Vou fechar o tópico, ok?

Qualquer coisa não hesite em abrir outro, ok?