You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by Lukasz Lech <l....@ringler.ch> on 2019/03/28 07:59:49 UTC

Guide for upgrading from karaf 4.1.x to 4.2.x

Hello,

Do you have some guide for upgrading from karaf 4.1.x line to 4.2.x line?

I have a legacy app that wasn't possible to upgrade because of some critical bugs introduced with library updates (PostgreSQL support issues), now I've tried to install our app from 4.1.3 to 4.2.4 and I'm getting errors that are totally puzzling me:

org.osgi.service.blueprint.container.ComponentDefinitionException: Unsupported node namespace: http://aries.apache.org/xmlns/transactions/v2.0.0

java.lang.LinkageError: loader constraint violation in interface itable initialization: when resolving method "org.apache.aries.jpa.container.impl.AriesEntityManagerFactoryBuilder.createEntityManagerFactory(Ljava/util/Map;)Ljavax/persistence/EntityManagerFactory;" the class loader (instance of org/apache/felix/framework/BundleWiringImpl$BundleClassLoader) of the current class, org/apache/aries/jpa/container/impl/AriesEntityManagerFactoryBuilder, and the class loader (instance of org/apache/felix/framework/BundleWiringImpl$BundleClassLoader) for interface org/osgi/service/jpa/EntityManagerFactoryBuilder have different Class objects for the type javax/persistence/EntityManagerFactory used in the signature

Our app installs Aries JPA 2.7.0 (mvn:org.apache.aries.jpa/jpa-features/2.7.0/xml/features).
Is there anything that need to be upgraded etc.?

Thank you for any hints.

Best regards,
Lukasz Lech


Re: Guide for upgrading from karaf 4.1.x to 4.2.x

Posted by lechlukasz <l....@ringler.ch>.
Thanks, I've needed to update persistence to 2_1, unfortunately it means that
the change in code is not backwards-compatible... placing blueprint
descriptors in the same project like JPA classes and logic looked like a
good idea at the beginning, as always in life...

I have no idea why my RESOURCE_LOCAL transactions stopped to work and I've
needed to switch to JTA, but I've managed to run my app as the whole.

BTW I'm not getting emails from the list from a long time. I'm able to post
and log online. So I haven't noticed your response... 



--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html

Re: Guide for upgrading from karaf 4.1.x to 4.2.x

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi Lukasz,

We don't have such guide for now, but it makes sense as there's some
changes.

About your question, I would recommend to use the features provided by
Karaf as the examples are based on this.
In your case, did you check you don't have different JPA versions ?
(like 2.0/2.1) ?

Regards
JB

On 28/03/2019 08:59, Lukasz Lech wrote:
> Hello,
> 
>  
> 
> Do you have some guide for upgrading from karaf 4.1.x line to 4.2.x line?
> 
>  
> 
> I have a legacy app that wasn’t possible to upgrade because of some
> critical bugs introduced with library updates (PostgreSQL support
> issues), now I’ve tried to install our app from 4.1.3 to 4.2.4 and I’m
> getting errors that are totally puzzling me:
> 
>  
> 
> org.osgi.service.blueprint.container.ComponentDefinitionException:
> Unsupported node namespace:
> http://aries.apache.org/xmlns/transactions/v2.0.0
> 
>  
> 
> java.lang.LinkageError: loader constraint violation in interface itable
> initialization: when resolving method
> "org.apache.aries.jpa.container.impl.AriesEntityManagerFactoryBuilder.createEntityManagerFactory(Ljava/util/Map;)Ljavax/persistence/EntityManagerFactory;"
> the class loader (instance of
> org/apache/felix/framework/BundleWiringImpl$BundleClassLoader) of the
> current class,
> org/apache/aries/jpa/container/impl/AriesEntityManagerFactoryBuilder,
> and the class loader (instance of
> org/apache/felix/framework/BundleWiringImpl$BundleClassLoader) for
> interface org/osgi/service/jpa/EntityManagerFactoryBuilder have
> different Class objects for the type
> javax/persistence/EntityManagerFactory used in the signature
> 
>  
> 
> Our app installs Aries JPA 2.7.0
> (mvn:org.apache.aries.jpa/jpa-features/2.7.0/xml/features).
> 
> Is there anything that need to be upgraded etc.?
> 
>  
> 
> Thank you for any hints.
> 
>  
> 
> Best regards,
> 
> Lukasz Lech
> 
>  
> 

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com