I don't have the Qi4j sources loaded right now, but as I wrote elsewhere, from the stacktrace it looks like the Configuration object of the Indexer is getting "indexed" which is not allowed. So, either Queryable(false) is missing or there is a bug in the handling of Queryable.
Cheers Niclas On Wed, Mar 4, 2009 at 1:12 AM, Alex Shneyderman <[email protected]> wrote: > Hi, all! > > I have been trying to get my CRUD up, with no success so far. > Basically, querying stores that have data in it using either > > MemoryRepository or NativeRepository did not work. the former just has > no code to do it and the latter had some nasty StackOverflow. I could > not get my head around SOE so I decided to ammend > MemoryRepositoryMixin: > > public class MemoryRepositoryMixin extends SailRepository > implements Repository, Activatable > { > > �...@service EntityStore entityStore; > �...@service private Iterable<EntityStoreListener> listeners; > > ... > > public void activate() throws Exception > { > initialize(); > > List<EntityState> existingStates = new ArrayList<EntityState>(); > > Iterator<EntityState> temp = entityStore.iterator(); > > while( temp.hasNext() ) > { > EntityState entityState = temp.next(); > existingStates.add(entityState); > } > > for( EntityStoreListener listener : listeners ) > { > listener.notifyChanges( existingStates, null, null ); > } > > } > > ... > > } > > The cool part is that I now have almost exactly the same long doodle > of the exception stack as with native repo with no code changes. I > suspect it has something to do with RdfQueryService (it is an > EntityStoreListener). The long doodle looks like the stack below. > needless to say I am sort of puzzled by why. So, if you guys have any > clues as to why this might be, I would really appreciate your input. > > And of course just like in the case of native repo if I remove RdfQS > things work, but I can not query. > > Thanks, > Alex. > > -- stack --- > at > org.qi4j.runtime.service.ServiceReferenceInstance$ServiceInvocationHandler.invoke(ServiceReferenceInstance.java:145) > at $Proxy19.getConnection(Unknown Source) > at > org.qi4j.index.rdf.internal.RdfEntityIndexerMixin.notifyChanges(RdfEntityIndexerMixin.java:99) > at sun.reflect.GeneratedMethodAccessor11.invoke(Unknown Source) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:597) > at > org.qi4j.runtime.composite.TypedFragmentInvocationHandler.invoke(TypedFragmentInvocationHandler.java:43) > at > org.qi4j.runtime.composite.CompositeMethodInstance.invoke(CompositeMethodInstance.java:59) > at > org.qi4j.runtime.composite.DefaultCompositeInstance.invoke(DefaultCompositeInstance.java:121) > at > org.qi4j.runtime.composite.CompositeMethodModel.invoke(CompositeMethodModel.java:146) > at > org.qi4j.runtime.composite.CompositeMethodsModel.invoke(CompositeMethodsModel.java:77) > at > org.qi4j.runtime.composite.AbstractCompositeModel.invoke(AbstractCompositeModel.java:112) > at > org.qi4j.runtime.composite.DefaultCompositeInstance.invoke(DefaultCompositeInstance.java:57) > at > org.qi4j.runtime.service.ServiceReferenceInstance$ServiceInvocationHandler.invoke(ServiceReferenceInstance.java:147) > at $Proxy20.notifyChanges(Unknown Source) > at > org.qi4j.spi.entity.EntityStoreListenerNotificationSideEffect.prepare(EntityStoreListenerNotificationSideEffect.java:47) > at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:597) > at > org.qi4j.runtime.composite.TypedFragmentInvocationHandler.invoke(TypedFragmentInvocationHandler.java:43) > at > org.qi4j.runtime.composite.MethodSideEffectsInstance.invokeSideEffect(MethodSideEffectsInstance.java:79) > at > org.qi4j.runtime.composite.MethodSideEffectsInstance.invokeSideEffects(MethodSideEffectsInstance.java:65) > at > org.qi4j.runtime.composite.MethodSideEffectsInstance.invoke(MethodSideEffectsInstance.java:45) > at > org.qi4j.runtime.composite.CompositeMethodInstance.invoke(CompositeMethodInstance.java:59) > at > org.qi4j.runtime.composite.DefaultCompositeInstance.invoke(DefaultCompositeInstance.java:121) > at > org.qi4j.runtime.composite.CompositeMethodModel.invoke(CompositeMethodModel.java:146) > at > org.qi4j.runtime.composite.CompositeMethodsModel.invoke(CompositeMethodsModel.java:77) > at > org.qi4j.runtime.composite.AbstractCompositeModel.invoke(AbstractCompositeModel.java:112) > at > org.qi4j.runtime.composite.DefaultCompositeInstance.invoke(DefaultCompositeInstance.java:57) > at > org.qi4j.runtime.service.ServiceReferenceInstance$ServiceInvocationHandler.invoke(ServiceReferenceInstance.java:147) > at $Proxy25.prepare(Unknown Source) > at > org.qi4j.runtime.unitofwork.UnitOfWorkInstance.commitCompleteLists(UnitOfWorkInstance.java:551) > at > org.qi4j.runtime.unitofwork.UnitOfWorkInstance.complete(UnitOfWorkInstance.java:419) > at > org.qi4j.runtime.unitofwork.UnitOfWorkInstance.apply(UnitOfWorkInstance.java:403) > at > org.qi4j.runtime.Qi4jRuntimeImpl.getConfigurationInstance(Qi4jRuntimeImpl.java:160) > at > org.qi4j.api.configuration.Configuration$ConfigurationMixin.<init>(Configuration.java:72) > at sun.reflect.GeneratedConstructorAccessor12.newInstance(Unknown > Source) > at > sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) > at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > at > org.qi4j.runtime.composite.ConstructorModel.newInstance(ConstructorModel.java:99) > at > org.qi4j.runtime.composite.ConstructorsModel.newInstance(ConstructorsModel.java:168) > at > org.qi4j.runtime.composite.MixinModel.newInstance(MixinModel.java:107) > at > org.qi4j.runtime.composite.MixinsModel.newMixins(MixinsModel.java:40) > at > org.qi4j.runtime.service.ServiceModel.newInstance(ServiceModel.java:226) > at > org.qi4j.runtime.service.ServiceReferenceInstance.getInstance(ServiceReferenceInstance.java:101) > at > org.qi4j.runtime.service.ServiceReferenceInstance.access$100(ServiceReferenceInstance.java:34) > at > org.qi4j.runtime.service.ServiceReferenceInstance$ServiceInvocationHandler.invoke(ServiceReferenceInstance.java:145) > at $Proxy17.iterator(Unknown Source) > at > org.qi4j.library.rdf.repository.MemoryRepositoryMixin.activate(MemoryRepositoryMixin.java:48) > at sun.reflect.GeneratedMethodAccessor12.invoke(Unknown Source) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:597) > at > org.qi4j.runtime.composite.TypedFragmentInvocationHandler.invoke(TypedFragmentInvocationHandler.java:43) > at > org.qi4j.runtime.composite.CompositeMethodInstance.invoke(CompositeMethodInstance.java:59) > at > org.qi4j.runtime.composite.DefaultCompositeInstance.invoke(DefaultCompositeInstance.java:121) > at > org.qi4j.runtime.composite.CompositeMethodModel.invoke(CompositeMethodModel.java:146) > at > org.qi4j.runtime.composite.CompositeMethodsModel.invoke(CompositeMethodsModel.java:77) > at > org.qi4j.runtime.composite.AbstractCompositeModel.invoke(AbstractCompositeModel.java:112) > at > org.qi4j.runtime.composite.DefaultCompositeInstance.invoke(DefaultCompositeInstance.java:57) > at $Proxy19.activate(Unknown Source) > at org.qi4j.spi.service.Activator.activate(Activator.java:51) > at > org.qi4j.runtime.service.ServiceReferenceInstance.getInstance(ServiceReferenceInstance.java:108) > at > org.qi4j.runtime.service.ServiceReferenceInstance.access$100(ServiceReferenceInstance.java:34) > at > org.qi4j.runtime.service.ServiceReferenceInstance$ServiceInvocationHandler.invoke(ServiceReferenceInstance.java:145) > at $Proxy19.getConnection(Unknown Source) > at > org.qi4j.index.rdf.internal.RdfEntityIndexerMixin.notifyChanges(RdfEntityIndexerMixin.java:99) > at sun.reflect.GeneratedMethodAccessor11.invoke(Unknown Source) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:597) > at > org.qi4j.runtime.composite.TypedFragmentInvocationHandler.invoke(TypedFragmentInvocationHandler.java:43) > at > org.qi4j.runtime.composite.CompositeMethodInstance.invoke(CompositeMethodInstance.java:59) > at > org.qi4j.runtime.composite.DefaultCompositeInstance.invoke(DefaultCompositeInstance.java:121) > at > org.qi4j.runtime.composite.CompositeMethodModel.invoke(CompositeMethodModel.java:146) > at > org.qi4j.runtime.composite.CompositeMethodsModel.invoke(CompositeMethodsModel.java:77) > at > org.qi4j.runtime.composite.AbstractCompositeModel.invoke(AbstractCompositeModel.java:112) > at > org.qi4j.runtime.composite.DefaultCompositeInstance.invoke(DefaultCompositeInstance.java:57) > at > org.qi4j.runtime.service.ServiceReferenceInstance$ServiceInvocationHandler.invoke(ServiceReferenceInstance.java:147) > at $Proxy20.notifyChanges(Unknown Source) > at > org.qi4j.spi.entity.EntityStoreListenerNotificationSideEffect.prepare(EntityStoreListenerNotificationSideEffect.java:47) > at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:597) > at > org.qi4j.runtime.composite.TypedFragmentInvocationHandler.invoke(TypedFragmentInvocationHandler.java:43) > at > org.qi4j.runtime.composite.MethodSideEffectsInstance.invokeSideEffect(MethodSideEffectsInstance.java:79) > at > org.qi4j.runtime.composite.MethodSideEffectsInstance.invokeSideEffects(MethodSideEffectsInstance.java:65) > at > > _______________________________________________ > qi4j-dev mailing list > [email protected] > http://lists.ops4j.org/mailman/listinfo/qi4j-dev > -- http://www.qi4j.org - New Energy for Java _______________________________________________ qi4j-dev mailing list [email protected] http://lists.ops4j.org/mailman/listinfo/qi4j-dev

