aspose file tools*
The moose likes Spring and the fly likes Issue with Hibernate and Spring Integration Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Issue with Hibernate and Spring Integration" Watch "Issue with Hibernate and Spring Integration" New topic
Author

Issue with Hibernate and Spring Integration

echarish Kumar
Ranch Hand

Joined: Feb 02, 2010
Posts: 42
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

Joined: Nov 01, 2012
Posts: 14
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

Joined: Feb 05, 2001
Posts: 17260
    
    6

"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


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
echarish Kumar
Ranch Hand

Joined: Feb 02, 2010
Posts: 42
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

Joined: Feb 05, 2001
Posts: 17260
    
    6

Looks like those are your classes. Are they not being placed in your classpath?

Mark
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Issue with Hibernate and Spring Integration