• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Issue with Hibernate and Spring Integration

 
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi all,

I tried to integrate hibernate with Spring and still trying it. I m using hibernate 3 and Spring 2. my application server is jboss and my DB is sql server. I use annotations here.

this is my spring configuration file and its name is application_config.xml and it is in /src directory.


this is my jboss-web.xml file. it is in applications WEB-INF folder


this is my web.xml file


this is mssql-ds.xml file inside server\default\deploy directory in jboss distribution.


All libraries are inside relevant folders. But it gives this error inside this ControllerServlet.java


Please help regarding this.
 
Author
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Great that you're using SI.

It looks like this error is related to you slf4j dependencies and neither related to Spring Integration nor Hibernate. I'm sure if you share a simple project online you can get help with this.
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"java.lang.ClassNotFoundException: No ClassLoaders found for: org.slf4j.impl.StaticLoggerBinder "

Yeah you either are missing the org.slf4j jar files, or you have two different versions in your classpath.

Also, in your configuration, I didn't see a bean for TransactionManager.

Also, if you are using Hibernate 3.1 or higher, there is absolutely no reason to use HibernateTemplate. There is nothing you will get from that class.

Mark
 
echarish Kumar
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have solved some issues here,

1. I removed slf4j-api-1.5.2.jar from lib and add

slf4j-api-1.5.6.jar and
slf4j-log4j12-1.5.6.jar

and I also add one line to my mssql-ds.xml file, that is

<use-java-context>false</use-java-context>


ok now I have two different errors,

1. java.lang.ClassNotFoundException: com.trn.Caller.java
2. java.lang.IllegalArgumentException: Cannot find class [com.trn.Caller.java]

and earlier 1, 2, 3 errors (these are error numbers which I mentioned earlier post)
so im still finding a solution.

please help me.
 
Mark Spritzler
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Looks like those are your classes. Are they not being placed in your classpath?

Mark
 
reply
    Bookmark Topic Watch Topic
  • New Topic