You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@deltaspike.apache.org by Jakub Ječmínek <je...@gmail.com> on 2013/12/14 14:30:32 UTC

Deltaspike JPA module + eclipselink problems

Hello,
in my company's new project we've decided to go with OpenWebBeans +
Deltaspike JPA module to have @Transactional and automatic producing and
closing of EntityManager. I created very small simple "proof of concept"
project for presentation to the chief of our department. I used in the
presentation Hibernate 4.2.0.Final, openwebbeans 1.2.1 and deltaspike 0.5.
This project was deployed on Apache Tomcat 7.0.47. Everything worked great.
Then I was tasked with moving this small project to EclipseLink because it
is standard in my company. Version of eclipselink is 2.5.1. I got into
several problems, first I got errors during deployment:
org.apache.webbeans.corespi.scanner.AbstractMetaDataDiscovery getBeanClasses
WARNING: Ignoring class
[org.apache.deltaspike.jpa.impl.transaction.EnvironmentAwareTransactionStrategy]
because it could not be loaded: java.lang.NoClassDefFoundError:
javax/transaction/SystemException

So I added dependency to javax.transaction(jta.jar) version 1.1 and problem
was solved. Does this means that Deltaspike JPA module has dependency to
JTA? Why the previous example with Hibernate worked out of the box?

The project is now working with Eclipselink and Deltaspike, without
problem, only concern I have is one warning message in tomcat's log during
deployment:
XII 14, 2013 2:03:48 ODP. org.apache.webbeans.xml.WebBeansXMLConfigurator
configureInterceptorsElement
WARNING: Interceptor class :
org.apache.deltaspike.jpa.impl.transaction.TransactionalInterceptor is
already defined

I don't know what this error could possibly mean, I followed all steps
defined in offical documentation http://deltaspike.apache.org/jpa.html when
it comes to configuration(beans.xml etc.)
The project is on my github account:
https://github.com/JakubJecminek/CDIExperiments

I would be very thnakful for any help(explentation). Currenly project is
working, but I would like to know what the error means, If I am not using
deltaspike JPA module incorrectly.

With regards,

Jakub Ječmínek

Re: Deltaspike JPA module + eclipselink problems

Posted by Jason Porter <li...@gmail.com>.
Welcome to the list! Great to hear things are working for you. As for the
eclipselink issue with JTA, it shouldn't be required, but is likely
happening because of one of the transaction classes being incorrectly
selected for use (we currently support resource local and JTA
transactions). However, you said you got that fixed, so it doesn't sound
like that's an issue.

The warning about the interceptor is probably because you have it in a
beans.xml file you're using in your project and DeltaSpike has already
enabled it. Essentially you're enabling it twice, but it isn't a problem.

Hope that helps, and looking forward to hearing more about your success
with DeltaSpike!


On Sat, Dec 14, 2013 at 6:30 AM, Jakub Ječmínek <je...@gmail.com> wrote:

> Hello,
> in my company's new project we've decided to go with OpenWebBeans +
> Deltaspike JPA module to have @Transactional and automatic producing and
> closing of EntityManager. I created very small simple "proof of concept"
> project for presentation to the chief of our department. I used in the
> presentation Hibernate 4.2.0.Final, openwebbeans 1.2.1 and deltaspike 0.5.
> This project was deployed on Apache Tomcat 7.0.47. Everything worked great.
> Then I was tasked with moving this small project to EclipseLink because it
> is standard in my company. Version of eclipselink is 2.5.1. I got into
> several problems, first I got errors during deployment:
> org.apache.webbeans.corespi.scanner.AbstractMetaDataDiscovery
> getBeanClasses
> WARNING: Ignoring class
>
> [org.apache.deltaspike.jpa.impl.transaction.EnvironmentAwareTransactionStrategy]
> because it could not be loaded: java.lang.NoClassDefFoundError:
> javax/transaction/SystemException
>
> So I added dependency to javax.transaction(jta.jar) version 1.1 and problem
> was solved. Does this means that Deltaspike JPA module has dependency to
> JTA? Why the previous example with Hibernate worked out of the box?
>
> The project is now working with Eclipselink and Deltaspike, without
> problem, only concern I have is one warning message in tomcat's log during
> deployment:
> XII 14, 2013 2:03:48 ODP. org.apache.webbeans.xml.WebBeansXMLConfigurator
> configureInterceptorsElement
> WARNING: Interceptor class :
> org.apache.deltaspike.jpa.impl.transaction.TransactionalInterceptor is
> already defined
>
> I don't know what this error could possibly mean, I followed all steps
> defined in offical documentation http://deltaspike.apache.org/jpa.htmlwhen
> it comes to configuration(beans.xml etc.)
> The project is on my github account:
> https://github.com/JakubJecminek/CDIExperiments
>
> I would be very thnakful for any help(explentation). Currenly project is
> working, but I would like to know what the error means, If I am not using
> deltaspike JPA module incorrectly.
>
> With regards,
>
> Jakub Ječmínek
>



-- 
Jason Porter
http://en.gravatar.com/lightguardjp