Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to run the init functions - broken postgresql 9.6 support #52

Open
spyhunter99 opened this issue Dec 14, 2016 · 3 comments
Open

Comments

@spyhunter99
Copy link

After screwing around with configuration files and database scripts, I ran into the following.... Not sure how to proceed with this.

st
[2016-12-13 22:42:01,681] WARN  - bernatePersistenceProvider -  - Installing our Spring managed interceptor.
[2016-12-13 22:42:02,566] WARN  - stractEhcacheRegionFactory -  - HHH020003: Could not find a specific ehcache configuration for cache named [fr.openwide.core.jpa.externallinkchecker.business.model.ExternalLinkWrapper]; using defaults.
[2016-12-13 22:42:02,594] WARN  - stractEhcacheRegionFactory -  - HHH020003: Could not find a specific ehcache configuration for cache named [fr.openwide.maven.artifact.notifier.core.business.project.model.Project]; using defaults.
[2016-12-13 22:42:02,639] WARN  - stractEhcacheRegionFactory -  - HHH020003: Could not find a specific ehcache configuration for cache named [fr.openwide.maven.artifact.notifier.core.business.project.model.ProjectVersion]; using defaults.
[2016-12-13 22:42:02,664] WARN  - stractEhcacheRegionFactory -  - HHH020003: Could not find a specific ehcache configuration for cache named [fr.openwide.maven.artifact.notifier.core.business.user.model.UserGroup.authorities]; using defaults.
[2016-12-13 22:42:02,692] WARN  - stractEhcacheRegionFactory -  - HHH020003: Could not find a specific ehcache configuration for cache named [fr.openwide.maven.artifact.notifier.core.business.project.model.Project.versions]; using defaults.
[2016-12-13 22:42:04,198] WARN  - SqlExceptionHelper         -  - SQL Error: 0, SQLState: 42703
[2016-12-13 22:42:04,198] ERROR - SqlExceptionHelper         -  - column am.amcanorder does not exist
[2016-12-13 22:42:04,205] WARN  - onConfigApplicationContext -  - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [fr/openwide/maven/artifact/notifier/core/config/spring/MavenArtifactNotifierCoreCommonJpaConfig.class]: Invocation of init method failed; nested exception is javax.persistence.PersistenceException: [PersistenceUnit: default] Unable to build Hibernate SessionFactory
[2016-12-13 22:42:04,240] ERROR - tNotifierInitFromExcelMain -  - Initialization fails
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [fr/openwide/maven/artifact/notifier/core/config/spring/MavenArtifactNotifierCoreCommonJpaConfig.class]: Invocation of init method failed; nested exception is javax.persistence.PersistenceException: [PersistenceUnit: default] Unable to build Hibernate SessionFactory
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1578)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:545)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
        at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1054)
        at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:829)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:538)
        at org.springframework.context.annotation.AnnotationConfigApplicationContext.<init>(AnnotationConfigApplicationContext.java:84)
        at fr.openwide.maven.artifact.notifier.init.MavenArtifactNotifierInitFromExcelMain.main(MavenArtifactNotifierInitFromExcelMain.java:23)
        at fr.openwide.maven.artifact.notifier.init.Main.main(Main.java:34)
Caused by: javax.persistence.PersistenceException: [PersistenceUnit: default] Unable to build Hibernate SessionFactory
        at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.persistenceException(EntityManagerFactoryBuilderImpl.java:954)
        at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:884)
        at org.hibernate.jpa.HibernatePersistenceProvider.createContainerEntityManagerFactory(HibernatePersistenceProvider.java:135)
        at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:343)
        at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:319)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1637)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1574)
        ... 12 more
Caused by: org.hibernate.exception.SQLGrammarException: Error accessing index information: public.Artifact
        at org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:106)
        at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42)
        at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111)
        at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97)
        at org.hibernate.tool.schema.extract.internal.InformationExtractorJdbcDatabaseMetaDataImpl.convertSQLException(InformationExtractorJdbcDatabaseMetaDataImpl.java:99)
        at org.hibernate.tool.schema.extract.internal.InformationExtractorJdbcDatabaseMetaDataImpl.getIndexes(InformationExtractorJdbcDatabaseMetaDataImpl.java:609)
        at org.hibernate.tool.schema.extract.internal.TableInformationImpl.indexes(TableInformationImpl.java:110)
        at org.hibernate.tool.schema.extract.internal.TableInformationImpl.getIndex(TableInformationImpl.java:121)
        at org.hibernate.tool.schema.internal.SchemaMigratorImpl.findMatchingIndex(SchemaMigratorImpl.java:409)
        at org.hibernate.tool.schema.internal.SchemaMigratorImpl.applyIndexes(SchemaMigratorImpl.java:392)
        at org.hibernate.tool.schema.internal.SchemaMigratorImpl.performMigration(SchemaMigratorImpl.java:277)
        at org.hibernate.tool.schema.internal.SchemaMigratorImpl.doMigration(SchemaMigratorImpl.java:137)
        at org.hibernate.tool.schema.internal.SchemaMigratorImpl.doMigration(SchemaMigratorImpl.java:110)
        at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.performDatabaseAction(SchemaManagementToolCoordinator.java:176)
        at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.process(SchemaManagementToolCoordinator.java:64)
        at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:458)
        at org.hibernate.boot.internal.SessionFactoryBuilderImpl.build(SessionFactoryBuilderImpl.java:465)
        at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:881)
        ... 17 more
Caused by: com.impossibl.postgres.jdbc.PGSQLSimpleException: column am.amcanorder does not exist
        at com.impossibl.postgres.jdbc.ErrorUtils.makeSQLException(ErrorUtils.java:159)
        at com.impossibl.postgres.jdbc.ErrorUtils.makeSQLException(ErrorUtils.java:136)
        at com.impossibl.postgres.jdbc.PGConnectionImpl.execute(PGConnectionImpl.java:442)
        at com.impossibl.postgres.jdbc.PGPreparedStatement$1.call(PGPreparedStatement.java:206)
        at com.impossibl.postgres.jdbc.PGPreparedStatement$1.call(PGPreparedStatement.java:196)
        at com.impossibl.postgres.jdbc.PGConnectionImpl.getCachedStatement(PGConnectionImpl.java:1301)
        at com.impossibl.postgres.jdbc.PGPreparedStatement.parseIfNeeded(PGPreparedStatement.java:196)
        at com.impossibl.postgres.jdbc.PGPreparedStatement.execute(PGPreparedStatement.java:262)
        at com.impossibl.postgres.jdbc.PGPreparedStatement.executeQuery(PGPreparedStatement.java:283)
        at com.impossibl.postgres.jdbc.PGDatabaseMetaData.execForResultSet(PGDatabaseMetaData.java:112)
        at com.impossibl.postgres.jdbc.PGDatabaseMetaData.getIndexInfo(PGDatabaseMetaData.java:1968)
        at org.hibernate.tool.schema.extract.internal.InformationExtractorJdbcDatabaseMetaDataImpl.getIndexes(InformationExtractorJdbcDatabaseMetaDataImpl.java:567)
        ... 29 more

@lalmeras
Copy link
Member

This error "column am.amcanorder" is commonly linked to postgresql 9.6 usage. I recommend you to use a PostgreSQL 9.5 release if possible.

I rename this ticket and I work on the PostgreSQL 9.6 issue as we want to support any new PostgreSQL release.

@lalmeras lalmeras changed the title Unable to run the init functions Unable to run the init functions - broken postgresql 9.6 support Dec 14, 2016
@lalmeras
Copy link
Member

I just push the fix-52-postgresql96 branch that provides postgresql 9.6 support, with the use of an up-to-date jdbc driver.

Issue kept open until this fix is merge in master.

@spyhunter99
Copy link
Author

That fixed it. thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants