ConfigHubPub/ConfigHubPlatform

Error with version 1.9.7 when creating repository on a fresh install

Closed this issue · 10 comments

Here is the stack trace. Database Manager (v1.9) has been run

confighub_1  | Jul 01, 2021 9:29:18 AM org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver onMessage
confighub_1  | SEVERE: Error occurred during error handling, give up!
confighub_1  | org.apache.cxf.interceptor.Fault: could not extract ResultSet
confighub_1  |  at org.apache.cxf.service.invoker.AbstractInvoker.createFault(AbstractInvoker.java:162)
confighub_1  |  at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:128)
confighub_1  |  at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:165)
confighub_1  |  at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:89)
confighub_1  |  at org.apache.openejb.server.cxf.rs.AutoJAXRSInvoker.invoke(AutoJAXRSInvoker.java:68)
confighub_1  |  at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:57)
confighub_1  |  at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:93)
confighub_1  |  at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
confighub_1  |  at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
confighub_1  |  at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:240)
confighub_1  |  at org.apache.openejb.server.cxf.rs.CxfRsHttpListener.doInvoke(CxfRsHttpListener.java:227)
confighub_1  |  at org.apache.tomee.webservices.CXFJAXRSFilter.doFilter(CXFJAXRSFilter.java:94)
confighub_1  |  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
confighub_1  |  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
confighub_1  |  at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
confighub_1  |  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
confighub_1  |  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
confighub_1  |  at com.confighub.api.server.filters.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:66)
confighub_1  |  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
confighub_1  |  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
confighub_1  |  at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
confighub_1  |  at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
confighub_1  |  at org.apache.tomee.catalina.OpenEJBValve.invoke(OpenEJBValve.java:44)
confighub_1  |  at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)
confighub_1  |  at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
confighub_1  |  at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
confighub_1  |  at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:957)
confighub_1  |  at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
confighub_1  |  at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:423)
confighub_1  |  at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1079)
confighub_1  |  at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:620)
confighub_1  |  at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:318)
confighub_1  |  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
confighub_1  |  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
confighub_1  |  at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
confighub_1  |  at java.lang.Thread.run(Thread.java:745)
confighub_1  | Caused by: org.hibernate.exception.SQLGrammarException: could not extract ResultSet
confighub_1  |  at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:63)
confighub_1  |  at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42)
confighub_1  |  at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111)
confighub_1  |  at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97)
confighub_1  |  at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.extract(ResultSetReturnImpl.java:69)
confighub_1  |  at org.hibernate.loader.plan.exec.internal.AbstractLoadPlanBasedLoader.getResultSet(AbstractLoadPlanBasedLoader.java:419)
confighub_1  |  at org.hibernate.loader.plan.exec.internal.AbstractLoadPlanBasedLoader.executeQueryStatement(AbstractLoadPlanBasedLoader.java:191)
confighub_1  |  at org.hibernate.loader.plan.exec.internal.AbstractLoadPlanBasedLoader.executeLoad(AbstractLoadPlanBasedLoader.java:121)
confighub_1  |  at org.hibernate.loader.plan.exec.internal.AbstractLoadPlanBasedLoader.executeLoad(AbstractLoadPlanBasedLoader.java:86)
confighub_1  |  at org.hibernate.loader.collection.plan.AbstractLoadPlanBasedCollectionInitializer.initialize(AbstractLoadPlanBasedCollectionInitializer.java:87)
confighub_1  |  at org.hibernate.persister.collection.AbstractCollectionPersister.initialize(AbstractCollectionPersister.java:688)
confighub_1  |  at org.hibernate.event.internal.DefaultInitializeCollectionEventListener.onInitializeCollection(DefaultInitializeCollectionEventListener.java:75)
confighub_1  |  at org.hibernate.internal.SessionImpl.initializeCollection(SessionImpl.java:2223)
confighub_1  |  at org.hibernate.collection.internal.AbstractPersistentCollection$4.doWork(AbstractPersistentCollection.java:565)
confighub_1  |  at org.hibernate.collection.internal.AbstractPersistentCollection.withTemporarySessionIfNeeded(AbstractPersistentCollection.java:247)
confighub_1  |  at org.hibernate.collection.internal.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:561)
confighub_1  |  at org.hibernate.collection.internal.PersistentSet.add(PersistentSet.java:185)
confighub_1  |  at com.confighub.core.user.Account.joinRepository(Account.java:239)
confighub_1  |  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
confighub_1  |  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
confighub_1  |  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
confighub_1  |  at java.lang.reflect.Method.invoke(Method.java:498)
confighub_1  |  at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:84)
confighub_1  |  at com.confighub.core.user.Account_$$_jvst877_7.joinRepository(Account_$$_jvst877_7.java)
confighub_1  |  at com.confighub.core.repository.Repository.<init>(Repository.java:216)
confighub_1  |  at com.confighub.core.store.Store.createRepository(Store.java:631)
confighub_1  |  at com.confighub.api.user.CreateRepository.createRepository(CreateRepository.java:106)
confighub_1  |  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
confighub_1  |  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
confighub_1  |  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
confighub_1  |  at java.lang.reflect.Method.invoke(Method.java:498)
confighub_1  |  at org.apache.openejb.server.cxf.rs.PojoInvoker.performInvocation(PojoInvoker.java:43)
confighub_1  |  at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:96)
confighub_1  |  ... 34 more
confighub_1  | Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'repository1_.cachingEnabled' in 'field list'
confighub_1  |  at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
confighub_1  |  at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
confighub_1  |  at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
confighub_1  |  at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
confighub_1  |  at com.mysql.jdbc.Util.handleNewInstance(Util.java:425)
confighub_1  |  at com.mysql.jdbc.Util.getInstance(Util.java:408)
confighub_1  |  at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:943)
confighub_1  |  at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3970)
confighub_1  |  at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3906)
confighub_1  |  at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2524)
confighub_1  |  at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2677)
confighub_1  |  at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2549)
confighub_1  |  at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1861)
confighub_1  |  at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1962)
confighub_1  |  at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.extract(ResultSetReturnImpl.java:60)
confighub_1  |  ... 62 more
confighub_1  |

Any update on this issue ?
Experimented: same issue when upgrading from 1.8*

Thank you

The error is from adding a caching option to the admin panel. I'd have to see what migration is missing because i thought it was added almost a year ago.

On Fri, Jul 30, 2021, 2:30 AM Gaëtan SLONGO @.**> wrote: Any update on this issue ? Experimented: same issue when upgrading from 1.8 Thank you — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#148 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAKQ2MXFRI6SHHOU3DIHYKDT2JIJHANCNFSM47UEEVHQ .

Thank you for your answer ! Do you mean it is not working at all for everyone using 1.9 version ? (So currently nobody uses it?)
Let me know if I can help, provide you more information or do tests.

Thanks !

Ok Thank you for your answer.

Can you tell me if your company still intend to develop and maintain this project ?

Thanks !

More information, looking at the source code and in order to do a test I added a column ;

ALTER TABLE `repository`
ADD `cachingEnabled` BOOLEAN NOT NULL

The list of repositories now displays. However, when creating of updating a repository I have another stacktrace:

confighub_1  | Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'cachingEnabled' in 'field list'
confighub_1  |  at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
confighub_1  |  at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
confighub_1  |  at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
confighub_1  |  at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
confighub_1  |  at com.mysql.jdbc.Util.handleNewInstance(Util.java:425)
confighub_1  |  at com.mysql.jdbc.Util.getInstance(Util.java:408)
confighub_1  |  at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:943)
confighub_1  |  at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3970)
confighub_1  |  at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3906)
confighub_1  |  at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2524)
confighub_1  |  at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2677)
confighub_1  |  at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2549)
confighub_1  |  at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1861)
confighub_1  |  at com.mysql.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2073)
confighub_1  |  at com.mysql.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2009)
confighub_1  |  at com.mysql.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:5098)
confighub_1  |  at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1994)
confighub_1  |  at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:175)
confighub_1  |  ... 61 more

Strange.. Something missing in the code ? Any other ALTER TABLE to run ?

Update: Looking at the code, it seems another Alter Table is required to make it work :

ALTER TABLE `repository_audit` ADD `cachingEnabled` BOOLEAN NOT NULL;

Now it seems I can create and manage repositories in 1.9.7

The strange thing is, looking at the Database-Manager source the field cachingEnabled should be managed as well as the field 'confirmcontextchange'. This last one is however taken into account and is present in my database

//EDIT: I think the DatabaseManager build available to download is not correct.
The changelog-master.yml contains the following :

databaseChangeLog:

- include:
    file: db/changes/v1.8-type-changes.yml

- include:
    file: db/changes/v1.7-schema.yml

- include:
    file: db/changes/v1.8-camel-case.yml

- include:
    file: db/changes/v1.8-schema.yml

- include:
    file: db/changes/v1.9-schema.yml

It should contain :

databaseChangeLog:

- include:
    file: db/changes/v1.8-type-changes.yml

- include:
    file: db/changes/v1.7-schema.yml

- include:
    file: db/changes/v1.8-camel-case.yml

- include:
    file: db/changes/v1.8-schema.yml

- include:
    file: db/changes/v1.9-schema.yml

- include:
    file: db/changes/v1.9-caching.yml

The source code in the master branch is correct, but not in the 1.9 BRANCH ! This is the issue. Can you merge the changes and run a build again ?
ConfigHubPub/Database-Manager@v1.9...master

Thanks !

Thanks for figuring this out. Will look into adding those into the db migration once i am back from vacation and can figure out where that needs to go. The separation of the db and the code repos has lead to this kinda of thing in the past. We must have just done a manual migration when this was deployed internally.

On Tue, Aug 3, 2021, 8:03 AM Gaëtan SLONGO @.***> wrote: Update: Looking at the code, it seems another Alter Table is required to make it work : ALTER TABLE repository_audit ADD cachingEnabled BOOLEAN NOT NULL; Now it seems I can create and manage repositories in 1.9.7 The strange thing is, looking at the Database-Manager source the field cachingEnabled should be managed as well as the field 'confirmcontextchange'. This last one is however taken into account and is present in my database — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#148 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAKQ2MXICYKQRAWGGDJXUPDT27LIXANCNFSM47UEEVHQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email .

Hi, Meanwhile I updated my comment. Please have a look, the solution is quite easy ;-)

Have a good vacation ! :-)

Thanks !

There's a version 1.9.1 release of Database-Manager. Once i can create another release for ConfigHubPlatform i will attach it as well.