1

I created my project as "maven project" and I use JSF with beans (defined in faces-config.xml). Right now I'm using my beans to access my DAO object which communicate with DB. I want to add EJBs in my project but I am kind of stuck. In my POJOs i'm using JPA annotations.

I tried to create persistence.xml file where i basically copied my hibernate.cfg file: (see attached url)

then i created class UserSessionBean which should represent EJB for user and annotated it with @LocalBean @Stateless: (see attached url)

and add it to my backing bean with annotation @EJB (see attached url)

examples: http://pastebin.com/kZm6m8n8

when I try to run my projects I get these errors: http://pastebin.com/FTQb98Hh

Can somebody tell me where is the problem?

Thank you!

1 Answers1

0

As I understand you have few dependencies that include commons logging jar inside with different versions. You should investigate your dependencies and find in which commons logging jar is included (you can do this using "Dependency Hierarchy" tab for pom in Eclipse). Then you should left only one dependency with included commons logging jar. For all others dependencies you can exclude commons logging jar by adding exclusion tag into them:

<dependency>
      ...
      <exclusions>
           <exclusion>
                <groupId>commons-logging</groupId>
                <artifactId>commons-logging</artifactId>
           </exclusion>
      </exclusions>
</dependency>
dimas
  • 6,033
  • 36
  • 29