View Full Version : Spring DM TopLink
dinamlab
May 28th, 2008, 10:36 PM
Hi Im trying spring osgi, I want to use TopLink & Commons DBCP & Spring. Here is my spring-dm.xml file
<beans definitions >
<bean id="ADPPDS"
class="org.springframework.jdbc.datasource.DriverManagerD ataSource">
<property name="driverClassName">
<value>org.apache.derby.jdbc.ClientDriver</value>
</property>
<property name="url">
<value>jdbc:derby://localhost:1527/adpp</value>
</property>
<property name="username">
<value>adpp</value>
</property>
<property name="password">
<value>app</value>
</property>
</bean>
<bean id="dsConnectionFactoryADPP"
class="org.apache.commons.dbcp.DataSourceConnectionFactor y">
<constructor-arg>
<ref bean="ADPPDS" />
</constructor-arg>
</bean>
<bean id="poolableConnectionADPP"
class="org.apache.commons.dbcp.PoolableConnectionFactory">
<constructor-arg index="0">
<ref bean="dsConnectionFactoryADPP" />
</constructor-arg>
<constructor-arg index="1">
<ref bean="pool" />
</constructor-arg>
<constructor-arg index="2">
<null />
</constructor-arg>
<constructor-arg index="3">
<null />
</constructor-arg>
<constructor-arg index="4">
<value>false</value>
</constructor-arg>
<constructor-arg index="5">
<value>true</value>
</constructor-arg>
</bean>
<bean id="pool"
class="org.apache.commons.pool.impl.GenericObjectPool">
<property name="minEvictableIdleTimeMillis">
<value>300000</value>
</property>
<property name="timeBetweenEvictionRunsMillis">
<value>60000</value>
</property>
</bean>
<bean id="pooledADPPDS"
class="org.apache.commons.dbcp.PoolingDataSource"
depends-on="poolableConnectionADPP">
<constructor-arg>
<ref bean="pool" />
</constructor-arg>
</bean>
<bean id="entityManagerFactoryADPP"
class="org.springframework.orm.toplink.LocalSessionFactor yBean">
<property name="dataSource" ref="pooledADPPDS" />
<property name="configLocation" value="META-INF/toplink-sessions.xml"/>
</bean>
<bean id="transactionManagerADPP"
class="org.springframework.orm.jpa.JpaTransactionManager">
<property name="entityManagerFactory"
ref="entityManagerFactoryADPP" />
<property name="dataSource" ref="pooledADPPDS" />
</bean>
<bean id="CodigosDS"
class="org.springframework.jdbc.datasource.DriverManagerD ataSource">
<property name="driverClassName">
<value>org.apache.derby.jdbc.ClientDriver</value>
</property>
<property name="url">
<value>jdbc:derby://localhost:1527/sepomex</value>
</property>
<property name="username">
<value>sepo</value>
</property>
<property name="password">
<value>sepo</value>
</property>
</bean>
<bean id="dsConnectionFactoryCodigos"
class="org.apache.commons.dbcp.DataSourceConnectionFactor y">
<constructor-arg>
<ref bean="CodigosDS" />
</constructor-arg>
</bean>
<bean id="poolableConnectionFactoryCodigos"
class="org.apache.commons.dbcp.PoolableConnectionFactory">
<constructor-arg index="0">
<ref bean="dsConnectionFactoryCodigos" />
</constructor-arg>
<constructor-arg index="1">
<ref bean="poolCodigos" />
</constructor-arg>
<constructor-arg index="2">
<null />
</constructor-arg>
<constructor-arg index="3">
<null />
</constructor-arg>
<constructor-arg index="4">
<value>false</value>
</constructor-arg>
<constructor-arg index="5">
<value>true</value>
</constructor-arg>
</bean>
<bean id="poolCodigos"
class="org.apache.commons.pool.impl.GenericObjectPool">
<property name="minEvictableIdleTimeMillis">
<value>300000</value>
</property>
<property name="timeBetweenEvictionRunsMillis">
<value>60000</value>
</property>
</bean>
<bean id="pooledCodigosDS"
class="org.apache.commons.dbcp.PoolingDataSource"
depends-on="poolableConnectionFactoryCodigos">
<constructor-arg>
<ref bean="poolCodigos" />
</constructor-arg>
</bean>
<bean id="entityManagerFactoryCodigos"
class="org.springframework.orm.jpa.LocalContainerEntityMa nagerFactoryBean">
<property name="dataSource" ref="pooledCodigosDS" />
<property name="persistenceUnitName" value="codigosPPU" />
<property name="jpaVendorAdapter">
<bean
class="org.springframework.orm.jpa.vendor.TopLinkJpaVendo rAdapter">
<property name="showSql" value="true" />
<property name="generateDdl" value="false" />
<property name="databasePlatform"
value="oracle.toplink.essentials.platform.database.DerbyP latform" />
</bean>
</property>
<property name="loadTimeWeaver">
<bean
class="org.springframework.instrument.classloading.Simple LoadTimeWeaver" />
</property>
</bean>
<bean id="transactionManagerCodigos"
class="org.springframework.orm.jpa.JpaTransactionManager">
<property name="entityManagerFactory"
ref="entityManagerFactoryCodigos" />
<property name="dataSource" ref="pooledCodigosDS" />
</bean>
<bean name="agenda" id="agendaDao" class="adpp.dao.JpaAgendaDao">
<property name="entityManagerFactory"
ref="entityManagerFactoryADPP" />
</bean>
dinamlab
May 28th, 2008, 10:37 PM
I have this bundles
Framework is launched.
id State Bundle
0 ACTIVE org.eclipse.osgi_3.4.0.v20080205
1 ACTIVE spring.source_2.5.2
2 ACTIVE org.springframework.osgi.log4j.osgi_1.2.15.SNAPSHO T
Fragments=20
3 ACTIVE org.springframework.bundle.osgi.extensions.annotat ions_1.0.2
5 ACTIVE org.springframework.bundle.spring.web_2.5.3
6 ACTIVE org.apache.derby.core_10.3.2.1
7 ACTIVE slf4j.api_1.4.3
8 ACTIVE slf4j.log4j12_1.4.3
9 ACTIVE jcl104.over.slf4j_1.4.3
10 ACTIVE com.springsource.org.apache.commons.dbcp_1.2.2.osg i
11 ACTIVE org.springframework.bundle.osgi.extender_1.0.2
12 INSTALLED org.springframework.bundle.spring.jms_2.5.3
13 ACTIVE org.springframework.bundle.osgi.io_1.0.2
14 ACTIVE org.springframework.osgi.asm.osgi_2.2.3.SNAPSHOT
15 ACTIVE org.springframework.osgi.cglib-nodep.osgi_2.1.3.SNAPSHOT
17 ACTIVE org.springframework.bundle.spring.jdbc_2.5.3
18 ACTIVE springdm.source_1.0.2
19 RESOLVED org.springframework.bundle.osgi.test_1.0.2
20 RESOLVED com.springsource.logging.config_1.0.0
Master=2
21 ACTIVE org.springframework.bundle.osgi.core_1.0.2
22 ACTIVE org.springframework.bundle.spring.webmvc.portlet_2 .5.3
24 ACTIVE org.springframework.osgi.backport-util-concurrent.osgi_3.1.0.SNAPSHOT
25 ACTIVE com.springsource.org.apache.commons.pool_1.3.0
26 ACTIVE org.springframework.bundle.spring.test_2.5.2
27 ACTIVE org.springframework.bundle.spring.core_2.5.2
28 ACTIVE org.springframework.osgi.aopalliance.osgi_1.0.0.SN APSHOT
29 ACTIVE org.springframework.bundle.spring.orm_2.5.3
30 ACTIVE org.springframework.bundle.spring.context.support_ 2.5.2
31 ACTIVE org.springframework.bundle.spring.webmvc_2.5.3
32 ACTIVE org.springframework.bundle.spring.context_2.5.2
33 ACTIVE org.springframework.bundle.spring.aop_2.5.2
34 ACTIVE org.springframework.bundle.spring.beans_2.5.2
35 ACTIVE org.springframework.osgi.junit.osgi_3.8.2.SNAPSHOT
36 ACTIVE com.springsource.javax.persistence_1.0.0
37 ACTIVE org.springframework.bundle.spring.tx_2.5.3
39 ACTIVE com.springsource.oracle.toplink.essentials_2.0.0.b 41-beta2
41 ACTIVE com.springsource.oracle.jdbc_10.2.0.2
42 ACTIVE com.springsource.javax.resource_1.5.0
43 ACTIVE com.springsource.oracle.xdb_10.2.0.2
44 ACTIVE com.springsource.oracle.toplink_10.1.3
47 ACTIVE SpringOSGi_1.0.0
48 ACTIVE com.springsource.oracle.xml_10.2.0.2
SpringOSGi its my bundle....
when Im trying to start this bundle (47)
dinamlab
May 28th, 2008, 10:38 PM
And I have this exception
Exception in thread "SpringOsgiExtenderThread-4" org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'entityManagerFactoryADPP' defined in URL [bundleentry://47/META-INF/spring/adppDM-context.xml]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: oracle/xml/parser/v2/XMLParseException
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.initializeBean(Abstract AutowireCapableBeanFactory.java:1302)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.doCreateBean(AbstractAu towireCapableBeanFactory.java:463)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory$1.run(AbstractAutowireC apableBeanFactory.java:404)
at java.security.AccessController.doPrivileged(Native Method)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBean(AbstractAuto wireCapableBeanFactory.java:375)
at org.springframework.beans.factory.support.Abstract BeanFactory$1.getObject(AbstractBeanFactory.java:2 63)
at org.springframework.beans.factory.support.DefaultS ingletonBeanRegistry.getSingleton(DefaultSingleton BeanRegistry.java:170)
at org.springframework.beans.factory.support.Abstract BeanFactory.doGetBean(AbstractBeanFactory.java:260 )
at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:184)
at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:163)
at org.springframework.beans.factory.support.DefaultL istableBeanFactory.preInstantiateSingletons(Defaul tListableBeanFactory.java:424)
at org.springframework.context.support.AbstractApplic ationContext.finishBeanFactoryInitialization(Abstr actApplicationContext.java:729)
at org.springframework.osgi.context.support.AbstractD elegatedExecutionApplicationContext.completeRefres h(AbstractDelegatedExecutionApplicationContext.jav a:251)
at org.springframework.osgi.extender.internal.depende ncies.startup.DependencyWaiterApplicationContextEx ecutor$CompleteRefreshTask.run(DependencyWaiterApp licationContextExecutor.java:136)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NoClassDefFoundError: oracle/xml/parser/v2/XMLParseException
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Unk nown Source)
at java.lang.Class.getConstructor0(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at oracle.toplink.internal.security.PrivilegedAccessC ontroller.newInstanceFromClass(PrivilegedAccessCon troller.java:542)
at oracle.toplink.platform.xml.XMLPlatformFactory.get XMLPlatform(XMLPlatformFactory.java:75)
at oracle.toplink.tools.sessionconfiguration.XMLSessi onConfigLoader.loadDocument(XMLSessionConfigLoader .java:188)
at oracle.toplink.tools.sessionconfiguration.XMLSessi onConfigLoader.loadDocument(XMLSessionConfigLoader .java:156)
at oracle.toplink.tools.sessionconfiguration.XMLSessi onConfigLoader.load(XMLSessionConfigLoader.java:93 )
at oracle.toplink.tools.sessionmanagement.SessionMana ger.getSession(SessionManager.java:367)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknow n Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Un known Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.util.ReflectionUtils.invokeMet hod(ReflectionUtils.java:160)
at org.springframework.orm.toplink.LocalSessionFactor y.loadDatabaseSession(LocalSessionFactory.java:419 )
at org.springframework.orm.toplink.LocalSessionFactor y.createSessionFactory(LocalSessionFactory.java:29 7)
at org.springframework.orm.toplink.LocalSessionFactor yBean.afterPropertiesSet(LocalSessionFactoryBean.j ava:100)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.invokeInitMethods(Abstr actAutowireCapableBeanFactory.java:1333)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.initializeBean(Abstract AutowireCapableBeanFactory.java:1299)
... 14 more
Caused by: java.lang.ClassNotFoundException: oracle.xml.parser.v2.XMLParseException
at org.eclipse.osgi.framework.internal.core.BundleLoa der.findClassInternal(BundleLoader.java:467)
at org.eclipse.osgi.framework.internal.core.BundleLoa der.findClass(BundleLoader.java:383)
at org.eclipse.osgi.framework.internal.core.BundleLoa der.findClass(BundleLoader.java:371)
at org.eclipse.osgi.internal.baseadaptor.DefaultClass Loader.loadClass(DefaultClassLoader.java:87)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
... 35 more
I dont know what its wrong... Could any one have an idea, I have all the dependencies but the class its not founded
mburbidg
May 28th, 2008, 11:15 PM
The java.lang.NoClassDefFoundError exception sometimes means you have not imported the appropriate bundle into your bundle. Trying importing oracle.xml.parser.v2.
Michael-
Costin Leau
May 29th, 2008, 02:56 AM
It's likely the class is not imported and thus the bundle starts since all its external class dependencies are satisfied but at runtime, as this Exception class is not found inside the bundle, an exception is thrown.
Identify the bundle that contains the class, export it and then import it in your bundle.
See the SpringSource Bundle Repository for jars already bundled with OSGi manifests - this means you just have to import your the missing classes.
dinamlab
May 29th, 2008, 10:59 AM
Thanks for the reply, The bundle that export this package its com.springsource.oracle.xml_10.2.0.2.... Do I need to import the packages, or import the bundle ? Import the com.springsource.oracle.xml_10.2.0.2 bundle in to SpringOSGi ? or only the packages ? I tried with the packages but no luck, I will try that later
dinamlab
May 29th, 2008, 07:41 PM
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Spring_OSGi
Bundle-SymbolicName: SpringOSGi
Bundle-Version: 1.0.0
Export-Package: adpp.dao
Import-Package:
oracle.toplink.exceptions;version="10.1.3",
oracle.toplink.expressions;version="10.1.3",
oracle.toplink.internal.databaseaccess;version="10.1.3",
oracle.toplink.internal.queryframework;version="10.1.3",
oracle.toplink.internal.sessions;version="10.1.3",
oracle.toplink.jndi;version="10.1.3",
oracle.toplink.jts;version="10.1.3",
oracle.toplink.libraries.asm;version="2.0.0.b41-beta2",
oracle.toplink.libraries.asm.attrs;version="2.0.0.b41-beta2",
oracle.toplink.logging;version="10.1.3",
oracle.toplink.platform.database;version="10.1.3",
oracle.toplink.publicinterface;version="10.1.3",
oracle.toplink.queryframework;version="10.1.3",
oracle.toplink.remote;version="10.1.3",
oracle.toplink.remotecommand;version="10.1.3",
oracle.toplink.sequencing;version="10.1.3",
oracle.toplink.sessionbroker;version="10.1.3",
oracle.toplink.sessions;version="10.1.3",
oracle.toplink.threetier;version="10.1.3",
oracle.toplink.tools.sessionconfiguration;version="10.1.3",
oracle.toplink.tools.sessionmanagement;version="10.1.3",
oracle.xdb;version="10.2.0.2",
oracle.xdb.bean;version="10.2.0.2",
oracle.xdb.dom;version="10.2.0.2",
oracle.xdb.servlet;version="10.2.0.2",
oracle.xdb.spi;version="10.2.0.2",
oracle.xml.async;version="10.2.0.2",
oracle.xml.comp;version="10.2.0.2",
oracle.xml.jaxp;version="10.2.0.2",
oracle.xml.jdwp;version="10.2.0.2",
oracle.xml.mesg;version="10.2.0.2",
oracle.xml.parser.schema;version="10.2.0.2",
oracle.xml.parser.v2;version="10.2.0.2",
oracle.xml.util;version="10.2.0.2",
oracle.xml.xpath;version="10.2.0.2",
oracle.xml.xqxp;version="10.2.0.2",
oracle.xml.xqxp.datamodel;version="10.2.0.2",
oracle.xml.xqxp.functions;version="10.2.0.2",
oracle.xml.xqxp.functions.builtIns;version="10.2.0.2",
oracle.xml.xslt;version="10.2.0.2",
dinamlab
May 29th, 2008, 07:43 PM
That is my manifest-mf any idea?
Costin Leau
May 30th, 2008, 04:08 AM
Try to track down who's trying to load the exception - it might be that it's not your bundle but toplink itself. Bring the issue to the S2BR through the BRITS issue tracker - maybe that would help.
dinamlab
Jun 4th, 2008, 07:59 PM
hi the last error was resolved, It continue some time but... another error its there....
I make this changes to the toplink manifest.inf file
Manifest-Version: 1.0
Bundle-Name: Oracle TopLink API
Created-By: 1.5.0_02-b09 (Sun Microsystems Inc.)
Ant-Version: Apache Ant 1.6.5
Import-Package: javax.naming,javax.sql,oracle.xdb;version="10.2.0.2",
oracle.xdb.bean;version="10.2.0.2",
oracle.xdb.dom;version="10.2.0.2",
oracle.xdb.servlet;version="10.2.0.2",
oracle.xdb.spi;version="10.2.0.2",
oracle.xml.async;version="10.2.0.2",
oracle.xml.comp;version="10.2.0.2",
oracle.xml.jaxp;version="10.2.0.2",
oracle.xml.jdwp;version="10.2.0.2",
oracle.xml.mesg;version="10.2.0.2",
oracle.xml.parser.schema;version="10.2.0.2",
oracle.xml.parser.v2;version="10.2.0.2",
oracle.xml.util;version="10.2.0.2",
oracle.xml.xpath;version="10.2.0.2",
oracle.xml.xqxp;version="10.2.0.2",
oracle.xml.xqxp.datamodel;version="10.2.0.2",
oracle.xml.xqxp.functions;version="10.2.0.2",
oracle.xml.xqxp.functions.builtIns;version="10.2.0.2",
oracle.xml.xslt;version="10.2.0.2"
Bundle-ManifestVersion: 2
Bundle-Vendor: SpringSource
Bundle-SymbolicName: com.springsource.oracle.toplink
dinamlab
Jun 4th, 2008, 08:00 PM
After this changes I made some changes on the application-DM.xml file
<bean id="pooledCodigosDS"
class="org.apache.commons.dbcp.PoolingDataSource"
depends-on="poolableConnectionFactoryCodigos">
<constructor-arg>
<ref bean="poolCodigos" />
</constructor-arg>
</bean>
<bean id="persistenceUnitManagerCodigos"
class="org.springframework.orm.jpa.persistenceunit.Defaul tPersistenceUnitManager">
<!-- Multiple value can be specified here -->
<property name="persistenceXmlLocations">
<list>
<value>META-INF/persistence-codigos.xml</value>
</list>
</property>
<property name="dataSources">
<map>
<entry key="localDataSource" value-ref="pooledCodigosDS" />
<!--<entry key="remoteDataSource" value-ref="remote-db" />-->
</map>
</property>
<!-- if no datasource is specified, use this one -->
<property name="defaultDataSource" ref="pooledCodigosDS" />
</bean>
<!-- JPA EntityManagerFactory -->
<bean id="entityManagerFactoryCodigos"
class="org.springframework.orm.jpa.LocalContainerEntityMa nagerFactoryBean"
p:dataSource-ref="pooledCodigosDS"
p:persistenceUnitManager-ref="persistenceUnitManagerCodigos">
<property name="jpaVendorAdapter">
<bean
class="org.springframework.orm.jpa.vendor.TopLinkJpaVendo rAdapter"
p:databasePlatform="oracle.toplink.essentials.platform.database.oracle .OraclePlatform"
p:showSql="true" />
</property>
<property name="loadTimeWeaver">
<bean
class="org.springframework.instrument.classloading.Instru mentationLoadTimeWeaver" />
</property>
<property name="jpaDialect">
<bean
class="org.springframework.orm.jpa.vendor.TopLinkJpaDiale ct" />
</property>
</bean>
dinamlab
Jun 4th, 2008, 08:02 PM
when I add those lines I get some dependencies so I get the bundles from springsource bundle repository
42 ACTIVE com.springsource.javax.mail_1.4.0
43 ACTIVE com.springsource.javax.servlet_2.5.0
44 ACTIVE org.springframework.instrument.classloading_2.5.3. A
45 ACTIVE com.springsource.javax.annotation_1.0.0
46 ACTIVE com.springsource.javax.ejb_3.0.0
47 ACTIVE com.springsource.org.apache.catalina_6.0.16
Fragments=49
48 ACTIVE com.springsource.org.apache.juli.extras_6.0.16
49 RESOLVED com.springsource.org.apache.coyote_6.0.16
Master=47
50 ACTIVE com.springsource.javax.xml.rpc_1.1.0
51 ACTIVE com.springsource.javax.xml.soap_1.3.0
52 ACTIVE com.springsource.javax.activation_1.1.0
53 ACTIVE com.springsource.javax.xml.ws_2.1.1
54 ACTIVE com.springsource.javax.xml.bind_2.0.0
55 ACTIVE com.springsource.javax.xml.stream_1.0.1
to get the org.springframework.instrument.classloading bundle....
dinamlab
Jun 4th, 2008, 08:04 PM
Now I have this error....
INFO : Loaded JDBC driver: org.apache.derby.jdbc.ClientDriver
INFO : Building JPA container EntityManagerFactory for persistence unit 'codigosPPU'
[TopLink Config]: 2008.06.02 07:36:09.430--ServerSession(25421790)--Thread(Thread[SpringOsgiExtenderThread-2,5,spring-osgi-extender[13a317a]-threads])--The alias name for the entity class [class adpp.codigosPostales.Codigos] is being defaulted to: Codigos.
[TopLink Config]: 2008.06.02 07:36:09.461--ServerSession(25421790)--Thread(Thread[SpringOsgiExtenderThread-2,5,spring-osgi-extender[13a317a]-threads])--The column name for element [private java.lang.Long adpp.codigosPostales.Codigos.id] is being defaulted to: ID.
INFO : Destroying singletons in org.springframework.beans.factory.support.DefaultL istableBeanFactory@15db314: defining beans [CodigosDS,dsConnectionFactoryCodigos,poolableConne ctionFactoryCodigos,poolCodigos,pooledCodigosDS,pe rsistenceUnitManagerCodigos,entityManagerFactoryCo digos,transactionManagerCodigos,ADPPDS,dsConnectio nFactoryADPP,poolableConnectionADPP,pool,pooledADP PDS,persistenceUnitManagerADPP,entityManagerFactor yADPP,transactionManagerADPP,agendaDao,anotacionDa o,departamentoDao,direccionDao,empleadoDao,persona Dao,codigosDao,agendaOsgi,anotacionOsgi,departamen toOsgi,direccionOsgi,empleadoOsgi,codigoOsgi]; root of factory hierarchy
ERROR: Post refresh error
org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'entityManagerFactoryCodigos' defined in URL [bundleentry://37/META-INF/spring/adppDM-context.xml]: Invocation of init method failed; nested exception is java.lang.IllegalStateException: Cannot apply class transformer without LoadTimeWeaver specified
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.initializeBean(Abstract AutowireCapableBeanFactory.java:1302)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.doCreateBean(AbstractAu towireCapableBeanFactory.java:463)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory$1.run(AbstractAutowireC apableBeanFactory.java:404)
any ideas???
Costin Leau
Jun 5th, 2008, 01:41 AM
To use toplink you need to use a LTW which can be tricky to setup in OSGi. Try using the S2AP which solves this problem quite nicely. Additionally you could setup Toplink (I forgot how exactly) to not use weaving through I'm not sure what the implications are.
A last option would be to use the TopLink agent instead which does processing a VM level and should work in OSGi as well (I haven't tried it myself so YMMV).
dinamlab
Jun 5th, 2008, 09:29 PM
Right now my plugin its ACTIVE, without error I made some changes, to the application-DM.xml, lets make some tests..... :D
These are the changes...
<bean id="entityManagerFactoryCodigos"
class="org.springframework.orm.jpa.LocalContainerEntityMa nagerFactoryBean"
p:dataSource-ref="pooledCodigosDS"
p:persistenceUnitManager-ref="persistenceUnitManagerCodigos">
<property name="loadTimeWeaver">
<bean
class="org.springframework.instrument.classloading.Instru mentationLoadTimeWeaver" />
</property>
<property name="jpaPropertyMap">
<map>
<entry key="toplink.jdbc.native-sql" value="true"/>
<entry key="toplink.logging.level" value="FINEST"/>
<entry key="toplink.logging.exceptions" value="true"/>
<entry key="toplink.target-database" value="Derby"/>
<entry key="toplink.weaving" value="false"/>
</map>
</property>
<property name="jpaVendorAdapter">
<bean
class="org.springframework.orm.jpa.vendor.TopLinkJpaVendo rAdapter"
p:databasePlatform="oracle.toplink.essentials.platform.database.DerbyP latform"
p:showSql="true" />
</property>
<property name="jpaDialect">
<bean
class="org.springframework.orm.jpa.vendor.TopLinkJpaDiale ct" />
</property>
</bean>
Ill post the results of the tests...
Thanks
vBulletin® v3.7.3, Copyright ©2000-2008, Jelsoft Enterprises Ltd.