Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Issue with Hibernate and Spring Integration

 
echarish Kumar
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • 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.
 
Iwein Fuld
Author
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • 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.
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • 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
  • 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
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Looks like those are your classes. Are they not being placed in your classpath?

Mark
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic