Announcement Announcement Module
Collapse
No announcement yet.
Problem with Generic Dao Jpa in dm server 2.0.RC1 Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Problem with Generic Dao Jpa in dm server 2.0.RC1

    I changed it from petclinic, but always error with "Exported service object does not implement the given interface"

    Thanks any advice.


    Configurations:


    Code:
    <bean id="abstractDaoTarget"
    		class="org.springframework.petclinic.repository.jpa.GenericJpaDao"
    		abstract="true">
    		<property name="entityManagerFactory" ref="entityManagerFactory"></property>
    	</bean>
    
    	<bean id="abstractDao" class="org.springframework.aop.framework.ProxyFactoryBean"
    		abstract="true">
    	</bean>
    
    	<bean id="messageDao" parent="abstractDao">
    		<property name="proxyInterfaces">
    			<value>org.springframework.petclinic.repository.IMessageDao</value>
    		</property>
    		<property name="proxyTargetClass">
    			<value>true</value>
    		</property>
    		<property name="target">
    			<bean parent="abstractDaoTarget">
    				<constructor-arg>
    					<value>org.springframework.petclinic.domain.Message</value>
    				</constructor-arg>
    			</bean>
    		</property>
    	</bean>

  • #2
    ERRORS:
    Code:
    [2010-01-04 15:30:05.296]  TCP Connection(7)-127.0.0.1 <DE0013I> Uninstalling par 'org.springframework.petclinic.hibernate.jpa' version '1.0.0'. 
    [2010-01-04 15:30:05.296]  TCP Connection(7)-127.0.0.1 <DE0010I> Stopping bundle 'org.springframework.petclinic.hibernate.jpa-1-org.springframework.petclinic.domain' version '1.0.0'. 
    [2010-01-04 15:30:05.312]  TCP Connection(7)-127.0.0.1 <DE0011I> Stopped bundle 'org.springframework.petclinic.hibernate.jpa-1-org.springframework.petclinic.domain' version '1.0.0'. 
    [2010-01-04 15:30:05.312]  TCP Connection(7)-127.0.0.1 <DE0013I> Uninstalling bundle 'org.springframework.petclinic.hibernate.jpa-1-org.springframework.petclinic.domain' version '1.0.0'. 
    [2010-01-04 15:30:05.312]  TCP Connection(7)-127.0.0.1 <DE0014I> Uninstalled bundle 'org.springframework.petclinic.hibernate.jpa-1-org.springframework.petclinic.domain' version '1.0.0'. 
    [2010-01-04 15:30:05.328]  TCP Connection(7)-127.0.0.1 <DE0010I> Stopping bundle 'org.springframework.petclinic.hibernate.jpa-1-synthetic.context' version '1.0.0'. 
    [2010-01-04 15:30:05.328]  TCP Connection(7)-127.0.0.1 <DE0011I> Stopped bundle 'org.springframework.petclinic.hibernate.jpa-1-synthetic.context' version '1.0.0'. 
    [2010-01-04 15:30:05.343]  TCP Connection(7)-127.0.0.1 <DE0010I> Stopping bundle 'org.springframework.petclinic.hibernate.jpa-1-org.springframework.petclinic.repository' version '1.0.0'. 
    [2010-01-04 15:30:05.359]  TCP Connection(7)-127.0.0.1 <DE0011I> Stopped bundle 'org.springframework.petclinic.hibernate.jpa-1-org.springframework.petclinic.repository' version '1.0.0'. 
    [2010-01-04 15:30:05.359]  TCP Connection(7)-127.0.0.1 <DE0010I> Stopping bundle 'org.springframework.petclinic.hibernate.jpa-1-org.springframework.petclinic.repository.jpa' version '2.0.0'. 
    [2010-01-04 15:30:05.453] Thread-3                     <AG0000E> Application context creation failure for bundle 'org.springframework.petclinic.hibernate.jpa-1-org.springframework.petclinic.repository.jpa' version '2.0.0'. org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'messageService': Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Exported service object does not implement the given interface: interface org.osgi.framework.ServiceRegistration is not assignable to interface org.springframework.petclinic.repository.IMessageService
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1401)
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:512)
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:450)
    	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:290)
    	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
    	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:287)
    	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:189)
    	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:540)
    	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:842)
    	at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.access$1600(AbstractDelegatedExecutionApplicationContext.java:69)
    	at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:355)
    	at org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)
    	at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:320)
    	at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:132)
    	at com.springsource.kernel.agent.dm.ContextPropagatingTaskExecutor$2.run(ContextPropagatingTaskExecutor.java:106)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
    	at java.lang.Thread.run(Thread.java:619)
    Caused by: java.lang.IllegalArgumentException: Exported service object does not implement the given interface: interface org.osgi.framework.ServiceRegistration is not assignable to interface org.springframework.petclinic.repository.IMessageService
    	at org.springframework.util.Assert.isAssignable(Assert.java:368)
    	at org.springframework.osgi.service.exporter.support.OsgiServiceFactoryBean.afterPropertiesSet(OsgiServiceFactoryBean.java:197)
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1460)
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1398)
    	... 17 common frames omitted
    
    [2010-01-04 15:30:05.468] start-signalling-6           <DE0006E> Start failed for bundle 'org.springframework.petclinic.hibernate.jpa-1-org.springframework.petclinic.repository.jpa' version '2.0.0'. org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'messageService': Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Exported service object does not implement the given interface: interface org.osgi.framework.ServiceRegistration is not assignable to interface org.springframework.petclinic.repository.IMessageService
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1401)
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:512)
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:450)
    	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:290)
    	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
    	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:287)
    	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:189)
    	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:540)
    	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:842)
    	at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.access$1600(AbstractDelegatedExecutionApplicationContext.java:69)
    	at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:355)
    	at org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)
    	at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:320)
    	at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:132)
    	at com.springsource.kernel.agent.dm.ContextPropagatingTaskExecutor$2.run(ContextPropagatingTaskExecutor.java:106)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
    	at java.lang.Thread.run(Thread.java:619)
    Caused by: java.lang.IllegalArgumentException: Exported service object does not implement the given interface: interface org.osgi.framework.ServiceRegistration is not assignable to interface org.springframework.petclinic.repository.IMessageService
    	at org.springframework.util.Assert.isAssignable(Assert.java:368)
    	at org.springframework.osgi.service.exporter.support.OsgiServiceFactoryBean.afterPropertiesSet(OsgiServiceFactoryBean.java:197)
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1460)
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1398)
    	... 17 common frames omitted

    Comment

    Working...
    X