You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@polygene.apache.org by zhuangmz08 <zh...@qq.com> on 2016/05/03 09:30:12 UTC

could not active service

Caused by: org.qi4j.api.service.ServiceUnavailableException: 【Could not activate service indexing-sql】
	at org.qi4j.runtime.service.ServiceReferenceInstance.getInstance(ServiceReferenceInstance.java:166)
	at org.qi4j.runtime.service.ServiceReferenceInstance.activate(ServiceReferenceInstance.java:114)
	at org.qi4j.runtime.activation.ActivationDelegate.activate(ActivationDelegate.java:112)
	... 17 more
Caused by: org.qi4j.api.activation.ActivationException: Unable to Activate application.
	at org.qi4j.runtime.activation.ActivationDelegate.activate(ActivationDelegate.java:152)
	at org.qi4j.runtime.activation.ActivationDelegate.activate(ActivationDelegate.java:75)
	at org.qi4j.runtime.service.ServiceReferenceInstance.getInstance(ServiceReferenceInstance.java:154)
	... 19 more
Caused by: org.postgresql.util.PSQLException: 【ERROR: duplicate key value violates unique constraint "entity_types_entity_type_name_key"】
  :Key (entity_type_name)=(org.qi4j.api.entity.EntityComposite) already exists.


I'm learning on the 【sql-support】 sample. I'm using org.qi4j.extension.indexing-sql and org.qi4j.extension.entitystore-sql, both postgrseql as backend. I seems that If I declare more than two entities, it will throw this exception. I found that org.qi4j.api.entity.EntityComposite exists in the table 【entity_types】? Is this a bug or ? 
Thanks a lot.

Re: could not active service

Posted by Stanislav Muhametsin <st...@zest.mail.kapsi.fi>.
It's been very long time since I visited that code, but either:
1. Things have changed and the "walk the whole entity composite type 
chain of the whole application" logic of the SQL-indexing is no longer 
valid, or
2. You have multiple entity composite declarations with the same types 
(interfaces).

Viewing the entity declaration would greatly help resolving this.

On 03/05/2016 16:31, Niclas Hedhman wrote:
> I have not been involved in the SQL ES or Indexing, so I won't be able to
> give good advice.
>
> Paul??
>
> Can you show us the entity declarations?
>
> Cheers
> Niclas
>
> On Tue, May 3, 2016 at 3:30 PM, zhuangmz08 <zh...@qq.com> wrote:
>
>> Caused by: org.qi4j.api.service.ServiceUnavailableException: \u3010Could not
>> activate service indexing-sql\u3011
>>          at
>> org.qi4j.runtime.service.ServiceReferenceInstance.getInstance(ServiceReferenceInstance.java:166)
>>          at
>> org.qi4j.runtime.service.ServiceReferenceInstance.activate(ServiceReferenceInstance.java:114)
>>          at
>> org.qi4j.runtime.activation.ActivationDelegate.activate(ActivationDelegate.java:112)
>>          ... 17 more
>> Caused by: org.qi4j.api.activation.ActivationException: Unable to Activate
>> application.
>>          at
>> org.qi4j.runtime.activation.ActivationDelegate.activate(ActivationDelegate.java:152)
>>          at
>> org.qi4j.runtime.activation.ActivationDelegate.activate(ActivationDelegate.java:75)
>>          at
>> org.qi4j.runtime.service.ServiceReferenceInstance.getInstance(ServiceReferenceInstance.java:154)
>>          ... 19 more
>> Caused by: org.postgresql.util.PSQLException: \u3010ERROR: duplicate key value
>> violates unique constraint "entity_types_entity_type_name_key"\u3011
>>    \uff1aKey (entity_type_name)=(org.qi4j.api.entity.EntityComposite) already
>> exists.
>>
>>
>> I'm learning on the \u3010sql-support\u3011 sample. I'm using
>> org.qi4j.extension.indexing-sql and org.qi4j.extension.entitystore-sql,
>> both postgrseql as backend. I seems that If I declare more than two
>> entities, it will throw this exception. I found that
>> org.qi4j.api.entity.EntityComposite exists in the table \u3010entity_types\u3011? Is
>> this a bug or ?
>> Thanks a lot.
>
>
>


Re: could not active service

Posted by Niclas Hedhman <ni...@hedhman.org>.
I have not been involved in the SQL ES or Indexing, so I won't be able to
give good advice.

Paul??

Can you show us the entity declarations?

Cheers
Niclas

On Tue, May 3, 2016 at 3:30 PM, zhuangmz08 <zh...@qq.com> wrote:

> Caused by: org.qi4j.api.service.ServiceUnavailableException: 【Could not
> activate service indexing-sql】
>         at
> org.qi4j.runtime.service.ServiceReferenceInstance.getInstance(ServiceReferenceInstance.java:166)
>         at
> org.qi4j.runtime.service.ServiceReferenceInstance.activate(ServiceReferenceInstance.java:114)
>         at
> org.qi4j.runtime.activation.ActivationDelegate.activate(ActivationDelegate.java:112)
>         ... 17 more
> Caused by: org.qi4j.api.activation.ActivationException: Unable to Activate
> application.
>         at
> org.qi4j.runtime.activation.ActivationDelegate.activate(ActivationDelegate.java:152)
>         at
> org.qi4j.runtime.activation.ActivationDelegate.activate(ActivationDelegate.java:75)
>         at
> org.qi4j.runtime.service.ServiceReferenceInstance.getInstance(ServiceReferenceInstance.java:154)
>         ... 19 more
> Caused by: org.postgresql.util.PSQLException: 【ERROR: duplicate key value
> violates unique constraint "entity_types_entity_type_name_key"】
>   :Key (entity_type_name)=(org.qi4j.api.entity.EntityComposite) already
> exists.
>
>
> I'm learning on the 【sql-support】 sample. I'm using
> org.qi4j.extension.indexing-sql and org.qi4j.extension.entitystore-sql,
> both postgrseql as backend. I seems that If I declare more than two
> entities, it will throw this exception. I found that
> org.qi4j.api.entity.EntityComposite exists in the table 【entity_types】? Is
> this a bug or ?
> Thanks a lot.




-- 
Niclas Hedhman, Software Developer
http://zest.apache.org - New Energy for Java