You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Charles Moulliard <cm...@gmail.com> on 2010/05/10 13:25:30 UTC
SMX4.2 / Hibernate JPA & Xerces Parser
Hi,
I try to configure Hibernate JPA + Spring where Transactional Aspect
is added by spring in DAO class but get this error in SMX4.x
Caused by: java.lang.NoClassDefFoundError:
com/sun/org/apache/xerces/internal/parsers/ObjectFactory
at com.sun.org.apache.xerces.internal.parsers.SAXParser.<init>(SAXParser.java:102)
at com.sun.org.apache.xerces.internal.parsers.SAXParser.<init>(SAXParser.java:87)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at java.lang.Class.newInstance0(Class.java:355)
at java.lang.Class.newInstance(Class.java:308)
at org.xml.sax.helpers.NewInstance.newInstance(NewInstance.java:51)
at org.xml.sax.helpers.XMLReaderFactory.loadClass(XMLReaderFactory.java:187)
at org.xml.sax.helpers.XMLReaderFactory.createXMLReader(XMLReaderFactory.java:150)
at org.dom4j.io.SAXHelper.createXMLReader(SAXHelper.java:83)
at org.dom4j.io.SAXReader.createXMLReader(SAXReader.java:894)
at org.dom4j.io.SAXReader.getXMLReader(SAXReader.java:715)
at org.dom4j.io.SAXReader.setFeature(SAXReader.java:218)
at org.hibernate.ejb.Ejb3Configuration.addXMLEntities(Ejb3Configuration.java:447)
at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:369)
at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:131)
at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:224)
I have installed the following bundles to be able to work with
Hibernate + Spring + Aspects but the error is always there.
[ 76] [Active ] [ ] [ ] [ 60] Commons DBCP (1.4)
[ 77] [Active ] [ ] [ ] [ 60] Sun
Microsystems' JDBC Driver for MySQL (5.1.9)
[ 106] [Active ] [ ] [ ] [ 60] Apache
ServiceMix Specs :: JAVA PERSISTENCE API 1.4 (1.5.0)
[ 125] [Active ] [ ] [ ] [ 60] Apache
ServiceMix Bundles: dom4j-1.6.1 (1.6.1.2)
[ 126] [Active ] [ ] [ ] [ 60] ANTLR (2.7.7)
[ 127] [Active ] [ ] [ ] [ 60] JGroups Toolkit (2.5.1)
[ 128] [Active ] [ ] [ ] [ 60] ObjectWeb ASM (1.5.3)
[ 129] [Active ] [ ] [ ] [ 60] CGLIB Code
Generation Library (2.2.0)
[ 130] [Active ] [ ] [ ] [ 60] Javassist Java
Programming Assistant (3.9.0.GA)
[ 131] [Active ] [ ] [ ] [ 60] JBoss Hibernate
Object-Relational Mapper (3.3.2.GA)
Fragments: 132,134
[ 132] [Resolved ] [ ] [ ] [ 60] JBoss Hibernate
Annotations (3.4.0.GA)
Hosts: 131
[ 133] [Active ] [ ] [ ] [ 60] JBoss Hibernate
Common Annotations (3.3.0.ga)
[ 134] [Resolved ] [ ] [ ] [ 60] JBoss Hibernate
Entity Manager (3.4.0.GA)
Hosts: 131
[ 147] [Active ] [ ] [ ] [ 60]
sap-prodspec-model (1.0.0.SNAPSHOT)
[ 148] [Active ] [ ] [Failed ] [ 60]
sap-prodspec-persistence (1.0.0.SNAPSHOT)
[ 149] [Active ] [ ] [Waiting] [ 60]
sap-prodspec-service (1.0.0.SNAPSHOT)
[ 150] [Active ] [ ] [Waiting] [ 60]
sap-prodspec-routing (1.0.0.SNAPSHOT)
[ 151] [Active ] [ ] [ ] [ 60] Spring JDBC (2.5.6.SEC01)
[ 152] [Active ] [ ] [ ] [ 60] Spring ORM (2.5.6.SEC01)
[ 153] [Active ] [ ] [ ] [ 60] Spring Aspects
(2.5.6.SEC01)
[ 154] [Active ] [ ] [ ] [ 60] Apache
ServiceMix Bundles: aspectj-1.6.8 (1.6.8.SNAPSHOT)
[ 155] [Active ] [ ] [ ] [ 60] Apache
ServiceMix Bundles: jaxp-ri-1.4.2 (1.4.2.3)
The bundle : [ 155] [Active ] [ ] [ ] [ 60]
Apache ServiceMix Bundles: jaxp-ri-1.4.2 (1.4.2.3) exposes the
packages required.
Any idea is welcome ?
Kind regards,
Charles Moulliard
Senior Enterprise Architect (J2EE, .NET, SOA)
Apache Camel Committer
*******************************************************************
- Blog : http://cmoulliard.blogspot.com
- Twitter : http://twitter.com/cmoulliard
- Linkedlin : http://www.linkedin.com/in/charlesmoulliard
Re: SMX4.2 / Hibernate JPA & Xerces Parser
Posted by iocanel <ca...@upstreamsystems.com>.
cmoulliard wrote:
>
> This class is used by Hibernate EJB so it makes no sense that my bundle
> import it.
>
I am not very familiar with osgi, but I notice that the class that cannot be
found is class that exists in jvms rt.jar.
So I assume that either this system package is not properly exposed, or you
should check Jboss Hibernate EntityManager, to see how the bundle is
imported.
-----
Ioannis Canellos
--
View this message in context: http://old.nabble.com/SMX4.2---Hibernate-JPA---Xerces-Parser-tp28510377p28520684.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.
Re: SMX4.2 / Hibernate JPA & Xerces Parser
Posted by Charles Moulliard <cm...@gmail.com>.
This class is used by Hibernate EJB so it makes no sense that my
bundle import it.
Charles Moulliard
Senior Enterprise Architect (J2EE, .NET, SOA)
Apache Camel Committer
*******************************************************************
- Blog : http://cmoulliard.blogspot.com
- Twitter : http://twitter.com/cmoulliard
- Linkedlin : http://www.linkedin.com/in/charlesmoulliard
2010/5/10 Agustín Gañán <ag...@gmail.com>:
> Hi,
>
> Is your bundle importing the missing package?
>
> 2010/5/10 Charles Moulliard <cm...@gmail.com>
>
>> Hi,
>>
>> I try to configure Hibernate JPA + Spring where Transactional Aspect
>> is added by spring in DAO class but get this error in SMX4.x
>>
>> Caused by: java.lang.NoClassDefFoundError:
>> com/sun/org/apache/xerces/internal/parsers/ObjectFactory
>> at
>> com.sun.org.apache.xerces.internal.parsers.SAXParser.<init>(SAXParser.java:102)
>> at
>> com.sun.org.apache.xerces.internal.parsers.SAXParser.<init>(SAXParser.java:87)
>> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
>> Method)
>> at
>> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
>> at
>> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
>> at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
>> at java.lang.Class.newInstance0(Class.java:355)
>> at java.lang.Class.newInstance(Class.java:308)
>> at org.xml.sax.helpers.NewInstance.newInstance(NewInstance.java:51)
>> at
>> org.xml.sax.helpers.XMLReaderFactory.loadClass(XMLReaderFactory.java:187)
>> at
>> org.xml.sax.helpers.XMLReaderFactory.createXMLReader(XMLReaderFactory.java:150)
>> at org.dom4j.io.SAXHelper.createXMLReader(SAXHelper.java:83)
>> at org.dom4j.io.SAXReader.createXMLReader(SAXReader.java:894)
>> at org.dom4j.io.SAXReader.getXMLReader(SAXReader.java:715)
>> at org.dom4j.io.SAXReader.setFeature(SAXReader.java:218)
>> at
>> org.hibernate.ejb.Ejb3Configuration.addXMLEntities(Ejb3Configuration.java:447)
>> at
>> org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:369)
>> at
>> org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:131)
>> at
>> org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:224)
>>
>> I have installed the following bundles to be able to work with
>> Hibernate + Spring + Aspects but the error is always there.
>>
>> [ 76] [Active ] [ ] [ ] [ 60] Commons DBCP (1.4)
>> [ 77] [Active ] [ ] [ ] [ 60] Sun
>> Microsystems' JDBC Driver for MySQL (5.1.9)
>> [ 106] [Active ] [ ] [ ] [ 60] Apache
>> ServiceMix Specs :: JAVA PERSISTENCE API 1.4 (1.5.0)
>> [ 125] [Active ] [ ] [ ] [ 60] Apache
>> ServiceMix Bundles: dom4j-1.6.1 (1.6.1.2)
>> [ 126] [Active ] [ ] [ ] [ 60] ANTLR (2.7.7)
>> [ 127] [Active ] [ ] [ ] [ 60] JGroups Toolkit
>> (2.5.1)
>> [ 128] [Active ] [ ] [ ] [ 60] ObjectWeb ASM (1.5.3)
>> [ 129] [Active ] [ ] [ ] [ 60] CGLIB Code
>> Generation Library (2.2.0)
>> [ 130] [Active ] [ ] [ ] [ 60] Javassist Java
>> Programming Assistant (3.9.0.GA)
>> [ 131] [Active ] [ ] [ ] [ 60] JBoss Hibernate
>> Object-Relational Mapper (3.3.2.GA)
>> Fragments: 132,134
>> [ 132] [Resolved ] [ ] [ ] [ 60] JBoss Hibernate
>> Annotations (3.4.0.GA)
>> Hosts: 131
>> [ 133] [Active ] [ ] [ ] [ 60] JBoss Hibernate
>> Common Annotations (3.3.0.ga)
>> [ 134] [Resolved ] [ ] [ ] [ 60] JBoss Hibernate
>> Entity Manager (3.4.0.GA)
>> Hosts: 131
>> [ 147] [Active ] [ ] [ ] [ 60]
>> sap-prodspec-model (1.0.0.SNAPSHOT)
>> [ 148] [Active ] [ ] [Failed ] [ 60]
>> sap-prodspec-persistence (1.0.0.SNAPSHOT)
>> [ 149] [Active ] [ ] [Waiting] [ 60]
>> sap-prodspec-service (1.0.0.SNAPSHOT)
>> [ 150] [Active ] [ ] [Waiting] [ 60]
>> sap-prodspec-routing (1.0.0.SNAPSHOT)
>> [ 151] [Active ] [ ] [ ] [ 60] Spring JDBC
>> (2.5.6.SEC01)
>> [ 152] [Active ] [ ] [ ] [ 60] Spring ORM
>> (2.5.6.SEC01)
>> [ 153] [Active ] [ ] [ ] [ 60] Spring Aspects
>> (2.5.6.SEC01)
>> [ 154] [Active ] [ ] [ ] [ 60] Apache
>> ServiceMix Bundles: aspectj-1.6.8 (1.6.8.SNAPSHOT)
>> [ 155] [Active ] [ ] [ ] [ 60] Apache
>> ServiceMix Bundles: jaxp-ri-1.4.2 (1.4.2.3)
>>
>> The bundle : [ 155] [Active ] [ ] [ ] [ 60]
>> Apache ServiceMix Bundles: jaxp-ri-1.4.2 (1.4.2.3) exposes the
>> packages required.
>>
>> Any idea is welcome ?
>>
>> Kind regards,
>>
>> Charles Moulliard
>>
>> Senior Enterprise Architect (J2EE, .NET, SOA)
>> Apache Camel Committer
>>
>> *******************************************************************
>> - Blog : http://cmoulliard.blogspot.com
>> - Twitter : http://twitter.com/cmoulliard
>> - Linkedlin : http://www.linkedin.com/in/charlesmoulliard
>>
>
Re: SMX4.2 / Hibernate JPA & Xerces Parser
Posted by Agustín Gañán <ag...@gmail.com>.
Hi,
Is your bundle importing the missing package?
2010/5/10 Charles Moulliard <cm...@gmail.com>
> Hi,
>
> I try to configure Hibernate JPA + Spring where Transactional Aspect
> is added by spring in DAO class but get this error in SMX4.x
>
> Caused by: java.lang.NoClassDefFoundError:
> com/sun/org/apache/xerces/internal/parsers/ObjectFactory
> at
> com.sun.org.apache.xerces.internal.parsers.SAXParser.<init>(SAXParser.java:102)
> at
> com.sun.org.apache.xerces.internal.parsers.SAXParser.<init>(SAXParser.java:87)
> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
> Method)
> at
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
> at
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
> at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
> at java.lang.Class.newInstance0(Class.java:355)
> at java.lang.Class.newInstance(Class.java:308)
> at org.xml.sax.helpers.NewInstance.newInstance(NewInstance.java:51)
> at
> org.xml.sax.helpers.XMLReaderFactory.loadClass(XMLReaderFactory.java:187)
> at
> org.xml.sax.helpers.XMLReaderFactory.createXMLReader(XMLReaderFactory.java:150)
> at org.dom4j.io.SAXHelper.createXMLReader(SAXHelper.java:83)
> at org.dom4j.io.SAXReader.createXMLReader(SAXReader.java:894)
> at org.dom4j.io.SAXReader.getXMLReader(SAXReader.java:715)
> at org.dom4j.io.SAXReader.setFeature(SAXReader.java:218)
> at
> org.hibernate.ejb.Ejb3Configuration.addXMLEntities(Ejb3Configuration.java:447)
> at
> org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:369)
> at
> org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:131)
> at
> org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:224)
>
> I have installed the following bundles to be able to work with
> Hibernate + Spring + Aspects but the error is always there.
>
> [ 76] [Active ] [ ] [ ] [ 60] Commons DBCP (1.4)
> [ 77] [Active ] [ ] [ ] [ 60] Sun
> Microsystems' JDBC Driver for MySQL (5.1.9)
> [ 106] [Active ] [ ] [ ] [ 60] Apache
> ServiceMix Specs :: JAVA PERSISTENCE API 1.4 (1.5.0)
> [ 125] [Active ] [ ] [ ] [ 60] Apache
> ServiceMix Bundles: dom4j-1.6.1 (1.6.1.2)
> [ 126] [Active ] [ ] [ ] [ 60] ANTLR (2.7.7)
> [ 127] [Active ] [ ] [ ] [ 60] JGroups Toolkit
> (2.5.1)
> [ 128] [Active ] [ ] [ ] [ 60] ObjectWeb ASM (1.5.3)
> [ 129] [Active ] [ ] [ ] [ 60] CGLIB Code
> Generation Library (2.2.0)
> [ 130] [Active ] [ ] [ ] [ 60] Javassist Java
> Programming Assistant (3.9.0.GA)
> [ 131] [Active ] [ ] [ ] [ 60] JBoss Hibernate
> Object-Relational Mapper (3.3.2.GA)
> Fragments: 132,134
> [ 132] [Resolved ] [ ] [ ] [ 60] JBoss Hibernate
> Annotations (3.4.0.GA)
> Hosts: 131
> [ 133] [Active ] [ ] [ ] [ 60] JBoss Hibernate
> Common Annotations (3.3.0.ga)
> [ 134] [Resolved ] [ ] [ ] [ 60] JBoss Hibernate
> Entity Manager (3.4.0.GA)
> Hosts: 131
> [ 147] [Active ] [ ] [ ] [ 60]
> sap-prodspec-model (1.0.0.SNAPSHOT)
> [ 148] [Active ] [ ] [Failed ] [ 60]
> sap-prodspec-persistence (1.0.0.SNAPSHOT)
> [ 149] [Active ] [ ] [Waiting] [ 60]
> sap-prodspec-service (1.0.0.SNAPSHOT)
> [ 150] [Active ] [ ] [Waiting] [ 60]
> sap-prodspec-routing (1.0.0.SNAPSHOT)
> [ 151] [Active ] [ ] [ ] [ 60] Spring JDBC
> (2.5.6.SEC01)
> [ 152] [Active ] [ ] [ ] [ 60] Spring ORM
> (2.5.6.SEC01)
> [ 153] [Active ] [ ] [ ] [ 60] Spring Aspects
> (2.5.6.SEC01)
> [ 154] [Active ] [ ] [ ] [ 60] Apache
> ServiceMix Bundles: aspectj-1.6.8 (1.6.8.SNAPSHOT)
> [ 155] [Active ] [ ] [ ] [ 60] Apache
> ServiceMix Bundles: jaxp-ri-1.4.2 (1.4.2.3)
>
> The bundle : [ 155] [Active ] [ ] [ ] [ 60]
> Apache ServiceMix Bundles: jaxp-ri-1.4.2 (1.4.2.3) exposes the
> packages required.
>
> Any idea is welcome ?
>
> Kind regards,
>
> Charles Moulliard
>
> Senior Enterprise Architect (J2EE, .NET, SOA)
> Apache Camel Committer
>
> *******************************************************************
> - Blog : http://cmoulliard.blogspot.com
> - Twitter : http://twitter.com/cmoulliard
> - Linkedlin : http://www.linkedin.com/in/charlesmoulliard
>