Niclas Hedhman created POLYGENE-269:
---------------------------------------
Summary: indexing-sql seems to be broken
Key: POLYGENE-269
URL: https://issues.apache.org/jira/browse/POLYGENE-269
Project: Polygene
Issue Type: Bug
Affects Versions: 3.0.0
Reporter: Niclas Hedhman
When starting indexing-sql the first time it works. Maybe even the second time,
not sure... But eventually the following exception is preventing starts.
{code}
Exception in thread "main"
org.apache.polygene.api.activation.ActivationException: Unable to Activate
application.
at
org.apache.polygene.runtime.activation.ActivationDelegate.activate(ActivationDelegate.java:160)
at
org.apache.polygene.runtime.activation.ActivationDelegate.activate(ActivationDelegate.java:89)
at
org.apache.polygene.runtime.service.ServicesInstance.activate(ServicesInstance.java:69)
at
org.apache.polygene.runtime.activation.ActivationDelegate.activate(ActivationDelegate.java:120)
at
org.apache.polygene.runtime.activation.ActivationDelegate.activate(ActivationDelegate.java:89)
at
org.apache.polygene.runtime.structure.ModuleInstance.activate(ModuleInstance.java:432)
at
org.apache.polygene.runtime.activation.ActivationDelegate.activate(ActivationDelegate.java:120)
at
org.apache.polygene.runtime.activation.ActivationDelegate.activate(ActivationDelegate.java:89)
at
org.apache.polygene.runtime.structure.LayerInstance.activate(LayerInstance.java:93)
at
org.apache.polygene.runtime.activation.ActivationDelegate.activate(ActivationDelegate.java:120)
at
org.apache.polygene.runtime.activation.ActivationDelegate.activate(ActivationDelegate.java:89)
at
org.apache.polygene.runtime.structure.ApplicationInstance.activate(ApplicationInstance.java:140)
at
org.apache.polygene.library.restlet.PolygeneRestApplicationLauncher.activateApplication(PolygeneRestApplicationLauncher.java:65)
at
org.apache.polygene.library.restlet.PolygeneRestApplicationLauncher.initialize(PolygeneRestApplicationLauncher.java:49)
at com.sensetif.sink.app.SinkLauncher.main(SinkLauncher.java:23)
Caused by: org.apache.polygene.api.service.ServiceUnavailableException: Could
not activate service SecureJettyService
at
org.apache.polygene.runtime.service.ServiceReferenceInstance.getInstance(ServiceReferenceInstance.java:172)
at
org.apache.polygene.runtime.service.ServiceReferenceInstance.activate(ServiceReferenceInstance.java:124)
at
org.apache.polygene.runtime.activation.ActivationDelegate.activate(ActivationDelegate.java:120)
... 14 more
Caused by: org.apache.polygene.api.activation.ActivationException: Unable to
Activate application.
at
org.apache.polygene.runtime.activation.ActivationDelegate.activate(ActivationDelegate.java:160)
at
org.apache.polygene.runtime.activation.ActivationDelegate.activate(ActivationDelegate.java:83)
at
org.apache.polygene.runtime.service.ServiceReferenceInstance.getInstance(ServiceReferenceInstance.java:166)
... 16 more
Caused by: java.lang.IllegalStateException: java.lang.InstantiationException:
Could not instantiate configuration, and no configuration initialization file
was found (SecureJettyService)
at method "get" of SecureJettyService:SecureJettyService in module
[HttpServer Module] of layer [Connectivity Layer].(:0)
at
org.apache.polygene.api.configuration.Configuration$ConfigurationMixin.get(Configuration.java:206)
at
org.apache.polygene.library.http.SecureJettyMixin.configuration(SecureJettyMixin.java:69)
at
org.apache.polygene.library.http.AbstractJettyMixin.startJetty(AbstractJettyMixin.java:87)
at
org.apache.polygene.library.http.JettyActivation$Activator.afterActivation(JettyActivation.java:43)
at
org.apache.polygene.library.http.JettyActivation$Activator.afterActivation(JettyActivation.java:35)
... 3 more
Caused by: java.lang.InstantiationException: Could not instantiate
configuration, and no configuration initialization file was found
(SecureJettyService)
at
org.apache.polygene.api.configuration.Configuration$ConfigurationMixin.initializeConfigurationInstance(Configuration.java:319)
at
org.apache.polygene.api.configuration.Configuration$ConfigurationMixin.findConfigurationInstanceFor(Configuration.java:262)
at
org.apache.polygene.api.configuration.Configuration$ConfigurationMixin.get(Configuration.java:202)
... 7 more
Caused by: org.apache.polygene.api.unitofwork.UnitOfWorkException:
org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique
constraint "indexing_entities_entity_identity_key"
Detail: Key (entity_identity)=(SecureJettyService) already exists.
at method "notifyChanges" of PostgreSQLService:indexing-sql in module
[SQLIndexing Module] of layer [Infrastructure Layer].(:0)
at
org.apache.polygene.index.sql.internal.SQLStateChangeListener.notifyChanges(SQLStateChangeListener.java:46)
at
org.apache.polygene.spi.entitystore.StateChangeNotificationConcern$1.commit(StateChangeNotificationConcern.java:50)
at
org.apache.polygene.spi.entitystore.ConcurrentModificationCheckConcern$ConcurrentCheckingEntityStoreUnitOfWork$1.commit(ConcurrentModificationCheckConcern.java:123)
at java.util.ArrayList.forEach(ArrayList.java:1249)
at
org.apache.polygene.api.configuration.Configuration$ConfigurationMixin.initializeConfigurationInstance(Configuration.java:312)
... 9 more
Caused by: org.postgresql.util.PSQLException: ERROR: duplicate key value
violates unique constraint "indexing_entities_entity_identity_key"
Detail: Key (entity_identity)=(SecureJettyService) already exists.
at method "indexEntities" of PostgreSQLService:indexing-sql in module
[SQLIndexing Module] of layer [Infrastructure Layer].(:0)
at
org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2412)
at
org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2125)
at
org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:297)
at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:428)
at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:354)
at
org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:169)
at
org.postgresql.jdbc.PgPreparedStatement.executeQuery(PgPreparedStatement.java:117)
at
org.apache.commons.dbcp2.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:83)
at
org.apache.commons.dbcp2.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:83)
at
org.apache.polygene.index.sql.support.postgresql.PostgreSQLIndexing.getPKFromAutoGeneratedIDInsert(PostgreSQLIndexing.java:51)
at
org.apache.polygene.index.sql.support.skeletons.AbstractSQLIndexing.indexEntities(AbstractSQLIndexing.java:226)
at
org.apache.polygene.index.sql.internal.SQLStateChangeListener.notifyChanges(SQLStateChangeListener.java:41)
... 13 more
{code}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)