deltaspike-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bart Smyth <...@dezolve.com>
Subject Re: data module @Repository question
Date Tue, 15 Oct 2013 11:31:18 GMT
Apologies - I'm on GF 3.1.2.2 and DS 0.5.

On 15 October 2013 at 10:20:24 PM, John D. Ament (john.d.ament@gmail.com) wrote:

So, what version of DeltaSpike are you using? What is your container  
(other than seeing Weld in the stacktrace)?  

On Tue, Oct 15, 2013 at 7:19 AM, Bart Smyth <bjs@dezolve.com> wrote:  
> Hi All,  
>  
> I'm having an issue getting my container up and running after defining a  
> Repository after following the docs at  
> :https://cwiki.apache.org/confluence/display/DeltaSpike/Repository+Drafts  
>  
> I have included the following dependencies in my pom:  
>  
> <dependency>  
>  
> <groupId>org.apache.deltaspike.core</groupId>  
>  
> <artifactId>deltaspike-core-api</artifactId>  
>  
> <version>${deltaspike.version}</version>  
>  
> <scope>compile</scope>  
>  
> </dependency>  
>  
> <dependency>  
>  
> <groupId>org.apache.deltaspike.core</groupId>  
>  
> <artifactId>deltaspike-core-impl</artifactId>  
>  
> <version>${deltaspike.version}</version>  
>  
> <scope>runtime</scope>  
>  
> </dependency>  
>  
> <dependency>  
>  
> <groupId>org.apache.deltaspike.modules</groupId>  
>  
> <artifactId>deltaspike-data-module-api</artifactId>  
>  
> <version>${deltaspike.version}</version>  
>  
> <scope>compile</scope>  
>  
> </dependency>  
>  
> <dependency>  
>  
> <groupId>org.apache.deltaspike.modules</groupId>  
>  
> <artifactId>deltaspike-data-module-impl</artifactId>  
>  
> <version>${deltaspike.version}</version>  
>  
> <scope>runtime</scope>  
>  
> </dependency>  
>  
>  
> and defined an producer for my EntityManager:  
>  
> public class EntityManagerProducer {  
>  
>  
> @PersistenceContext  
>  
> private EntityManager em;  
>  
>  
> @Produces  
>  
> public EntityManager expose() {  
>  
> return em;  
>  
> }  
>  
> }  
>  
>  
> and a repository:  
>  
> @Repository  
>  
> public interface FOORepository extends EntityRepository<Foo, Long> {  
>  
> }  
>  
>  
> at startup I get the following exception:  
>  
>  
> org.jboss.weld.exceptions.DefinitionException: Exception List with 1  
> exceptions:  
>  
> Exception 0 :  
>  
> java.lang.IllegalStateException: Multiple handlers found for  
> org.apache.deltaspike.data.api.Repository  
> (org.apache.deltaspike.data.impl.handler.QueryHandler and  
> org.apache.deltaspike.data.impl.handler.QueryHandler)  
>  
> at  
> org.apache.deltaspike.partialbean.impl.PartialBeanBindingExtension.validateInvocationHandler(PartialBeanBindingExtension.java:174)
 
>  
> at  
> org.apache.deltaspike.partialbean.impl.PartialBeanBindingExtension.findInvocationHandlerBindings(PartialBeanBindingExtension.java:80)
 
>  
> at sun.reflect.GeneratedMethodAccessor55.invoke(Unknown Source)  
>  
> at  
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 
>  
> at java.lang.reflect.Method.invoke(Method.java:597)  
>  
> at  
> org.jboss.weld.util.reflection.SecureReflections$13.work(SecureReflections.java:267)
 
>  
> at  
> org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:52)
 
>  
> at  
> org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInvocation(SecureReflectionAccess.java:137)
 
>  
> at  
> org.jboss.weld.util.reflection.SecureReflections.invoke(SecureReflections.java:263) 

>  
> at  
> org.jboss.weld.introspector.jlr.WeldMethodImpl.invokeOnInstance(WeldMethodImpl.java:170)
 
>  
> at  
> org.jboss.weld.introspector.ForwardingWeldMethod.invokeOnInstance(ForwardingWeldMethod.java:51)
 
>  
> at  
> org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstanceWithSpecialValue(MethodInjectionPoint.java:154)
 
>  
> at  
> org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:245)  
>  
> at  
> org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:233)  
>  
> at  
> org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:213)  
>  
> at  
> org.jboss.weld.manager.BeanManagerImpl.notifyObservers(BeanManagerImpl.java:590)  
>  
> at  
> org.jboss.weld.manager.BeanManagerImpl.fireEvent(BeanManagerImpl.java:580)  
>  
> at  
> org.jboss.weld.bootstrap.events.AbstractContainerEvent.fire(AbstractContainerEvent.java:60)
 
>  
> at  
> org.jboss.weld.bootstrap.events.AbstractDefinitionContainerEvent.fire(AbstractDefinitionContainerEvent.java:38)
 
>  
> at  
> org.jboss.weld.bootstrap.events.ProcessAnnotatedTypeImpl.fire(ProcessAnnotatedTypeImpl.java:41)
 
>  
> at org.jboss.weld.bootstrap.BeanDeployer.addClass(BeanDeployer.java:81)  
>  
> at org.jboss.weld.bootstrap.BeanDeployer.addClasses(BeanDeployer.java:123)  
>  
> at  
> org.jboss.weld.bootstrap.BeanDeployment.createBeans(BeanDeployment.java:184)  
>  
> at  
> org.jboss.weld.bootstrap.WeldBootstrap.deployBeans(WeldBootstrap.java:350)  
>  
> SNIPPED  
>  
>  
> Am I missing anything else?  
>  
>  
> Regards  
>  
>  
> BJS
Mime
  • Unnamed multipart/mixed (inline, None, 0 bytes)
    • Unnamed multipart/alternative (inline, None, 0 bytes)
      • Unnamed multipart/related (inline, None, 0 bytes)
View raw message