rht-labs / automation-api Goto Github PK
View Code? Open in Web Editor NEWSpring Cloud Kubernetes RESTful API for all the automation offered at Red Hat Open Innovation Labs
License: Apache License 2.0
Spring Cloud Kubernetes RESTful API for all the automation offered at Red Hat Open Innovation Labs
License: Apache License 2.0
The application fails to start with the following errors:
java.sql.SQLException: Unable to load class: org.postgresql.Driver from ClassLoader:org.springframework.boot.loader.LaunchedURLClassLoader@7b23ec81;ClassLoader:org.springframework.boot.loader.LaunchedURLClassLoader@7b23ec81
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaAutoConfiguration.class]: Invocation of init method failed; nested exception is org.hibernate.service.spi.ServiceException: Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment]
I encountered these errors when running the application as part of the CI-CD Bootstrap.
CC @sherl0cks
Implement related changes from rht-labs/api-design#54
When the command mvn fabric8:deploy
is called, maven is running all the tests. This probably shouldn't be.
{
"timestamp": 1477596978182,
"status": 400,
"error": "Bad Request",
"exception": "org.springframework.http.converter.HttpMessageNotReadableException",
"message": "Could not read document: Can not deserialize value of type com.rhc.automation.model.Route$RouteTypeEnum from String \"default\": value not one of declared Enum instance names: [reencrypt, passthrough, edge]\n at [Source: java.io.PushbackInputStream@6955e89; line: 647, column: 25] (through reference chain: com.rhc.automation.model.Engagement[\"openshift_clusters\"]->java.util.ArrayList[0]->com.rhc.automation.model.OpenShiftCluster[\"openshift_resources\"]->com.rhc.automation.model.OpenShiftResources[\"projects\"]->java.util.ArrayList[6]->com.rhc.automation.model.Project[\"apps\"]->java.util.ArrayList[1]->com.rhc.automation.model.Application[\"routes\"]->java.util.ArrayList[0]->com.rhc.automation.model.Route[\"route_type\"]); nested exception is com.fasterxml.jackson.databind.exc.InvalidFormatException: Can not deserialize value of type com.rhc.automation.model.Route$RouteTypeEnum from String \"default\": value not one of declared Enum instance names: [reencrypt, passthrough, edge]\n at [Source: java.io.PushbackInputStream@6955e89; line: 647, column: 25] (through reference chain: com.rhc.automation.model.Engagement[\"openshift_clusters\"]->java.util.ArrayList[0]->com.rhc.automation.model.OpenShiftCluster[\"openshift_resources\"]->com.rhc.automation.model.OpenShiftResources[\"projects\"]->java.util.ArrayList[6]->com.rhc.automation.model.Project[\"apps\"]->java.util.ArrayList[1]->com.rhc.automation.model.Application[\"routes\"]->java.util.ArrayList[0]->com.rhc.automation.model.Route[\"route_type\"])",
"path": "/engagements"
}
Should also allow you to use git checkout
instead of scm checkout
Caused by: org.hibernate.exception.ConstraintViolationException: could not execute statement
at org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:112) ~[hibernate-core-5.0.11.Final.jar!/:5.0.11.Final]
at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.0.11.Final.jar!/:5.0.11.Final]
at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:109) ~[hibernate-core-5.0.11.Final.jar!/:5.0.11.Final]
at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:95) ~[hibernate-core-5.0.11.Final.jar!/:5.0.11.Final]
at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.0.11.Final.jar!/:5.0.11.Final]
at org.hibernate.engine.jdbc.batch.internal.NonBatchingBatch.addToBatch(NonBatchingBatch.java:45) ~[hibernate-core-5.0.11.Final.jar!/:5.0.11.Final]
at org.hibernate.persister.entity.AbstractEntityPersister.delete(AbstractEntityPersister.java:3209) ~[hibernate-core-5.0.11.Final.jar!/:5.0.11.Final]
at org.hibernate.persister.entity.AbstractEntityPersister.delete(AbstractEntityPersister.java:3446) ~[hibernate-core-5.0.11.Final.jar!/:5.0.11.Final]
at org.hibernate.action.internal.EntityDeleteAction.execute(EntityDeleteAction.java:98) ~[hibernate-core-5.0.11.Final.jar!/:5.0.11.Final]
at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:582) ~[hibernate-core-5.0.11.Final.jar!/:5.0.11.Final]
at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:456) ~[hibernate-core-5.0.11.Final.jar!/:5.0.11.Final]
at org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:337) ~[hibernate-core-5.0.11.Final.jar!/:5.0.11.Final]
at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:39) ~[hibernate-core-5.0.11.Final.jar!/:5.0.11.Final]
at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1282) ~[hibernate-core-5.0.11.Final.jar!/:5.0.11.Final]
at org.hibernate.internal.SessionImpl.managedFlush(SessionImpl.java:465) ~[hibernate-core-5.0.11.Final.jar!/:5.0.11.Final]
at org.hibernate.internal.SessionImpl.flushBeforeTransactionCompletion(SessionImpl.java:2963) ~[hibernate-core-5.0.11.Final.jar!/:5.0.11.Final]
at org.hibernate.internal.SessionImpl.beforeTransactionCompletion(SessionImpl.java:2339) ~[hibernate-core-5.0.11.Final.jar!/:5.0.11.Final]
at org.hibernate.engine.jdbc.internal.JdbcCoordinatorImpl.beforeTransactionCompletion(JdbcCoordinatorImpl.java:485) ~[hibernate-core-5.0.11.Final.jar!/:5.0.11.Final]
at org.hibernate.resource.transaction.backend.jdbc.internal.JdbcResourceLocalTransactionCoordinatorImpl.beforeCompletionCallback(JdbcResourceLocalTransactionCoordinatorImpl.java:147) ~[hibernate-core-5.0.11.Final.jar!/:5.0.11.Final]
at org.hibernate.resource.transaction.backend.jdbc.internal.JdbcResourceLocalTransactionCoordinatorImpl.access$100(JdbcResourceLocalTransactionCoordinatorImpl.java:38) ~[hibernate-core-5.0.11.Final.jar!/:5.0.11.Final]
at org.hibernate.resource.transaction.backend.jdbc.internal.JdbcResourceLocalTransactionCoordinatorImpl$TransactionDriverControlImpl.commit(JdbcResourceLocalTransactionCoordinatorImpl.java:231) ~[hibernate-core-5.0.11.Final.jar!/:5.0.11.Final]
at org.hibernate.engine.transaction.internal.TransactionImpl.commit(TransactionImpl.java:65) ~[hibernate-core-5.0.11.Final.jar!/:5.0.11.Final]
at org.hibernate.jpa.internal.TransactionImpl.commit(TransactionImpl.java:61) ~[hibernate-entitymanager-5.0.11.Final.jar!/:5.0.11.Final]
at org.springframework.orm.jpa.JpaTransactionManager.doCommit(JpaTransactionManager.java:517) ~[spring-orm-4.3.5.RELEASE.jar!/:4.3.5.RELEASE]
... 78 common frames omitted
Caused by: org.postgresql.util.PSQLException: ERROR: update or delete on table "role" violates foreign key constraint "fk5160c0kl5j1c2t89ogoxoqwt0" on table "role_mapping_roles"
Detail: Key (id)=(11) is still referenced from table "role_mapping_roles".
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2182) ~[postgresql-9.4-1206-jdbc42.jar!/:9.4]
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1911) ~[postgresql-9.4-1206-jdbc42.jar!/:9.4]
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:173) ~[postgresql-9.4-1206-jdbc42.jar!/:9.4]
at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:645) ~[postgresql-9.4-1206-jdbc42.jar!/:9.4]
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:495) ~[postgresql-9.4-1206-jdbc42.jar!/:9.4]
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:441) ~[postgresql-9.4-1206-jdbc42.jar!/:9.4]
at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.0.11.Final.jar!/:5.0.11.Final]
... 97 common frames omitted
currently replies with /enagements/xyz
instead of /engagements/xyz
Place constraints in the JPA (orm.xml). Current versions are very liberal with column size / unique / check constraints...
A user may be valid for only a fixed period of time. The API needs to be able to persist an idm expiry date for a user
Start and end dates are being created as byte arrays in the datastore during the schema auto-generation. The cause is due to the code-generation done by swagger to create dates using LocalDate which is not supported by JPA OOTB.
See db schema here
The ddl for the group role mapping is set unique(roles_id) instead of unique(group_role_mapping_role_id, roles_id)
Use should be able to perform the following steps, which currently results in an NPE.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.