my dog learned polymorphism*
The moose likes Spring and the fly likes Error with Spring 3.0 in deployment. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Error with Spring 3.0 in deployment." Watch "Error with Spring 3.0 in deployment." New topic
Author

Error with Spring 3.0 in deployment.

Mithil Wane
Greenhorn

Joined: Sep 10, 2006
Posts: 5
Hi,

I'm quite a newbie in spring. After doing the FormController in a easy way I tried to use Hibernate with spring but its giving me an error while deploying.



Am using JBoss 4.3,Spring 3.0.2 and Hibernate 3.2.1
Here are the xmls


persistenceContext.xml



construction-servlet.xml


and finally

web.xml



Regards
Mithil

Mark Secrist
Ranch Hand

Joined: Jul 01, 2003
Posts: 89
Hi Mithil,
I think the problem is you're missing a Spring JAR dependency. The file you need is the spring-aspects-3.0.2.RELEASE.jar file. If you are using Maven, you can add the following to your POM file.



I hope this helps.

Mark
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Are you deploying the appropriate Spring jar(s)?
Mithil Wane
Greenhorn

Joined: Sep 10, 2006
Posts: 5
Hi,

I'm not using Maven. There are two eclipse projects Construction and ConstructionMVC. Construction has all of the base classes related to Hibernate and the MVC project has spring MVC things.

Am attaching screenshots of the two project so that you guys understand.



[Thumbnail for ScrShot Construction.jpg]


[Thumbnail for MVC.jpg]

Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

"mithilwane",
Welcome to the ranch. You may not be aware of the ranch Naming Policy. Please read it carefully and change your name accordingly (you need to set both first and last name). Thank you.


[My Blog]
All roads lead to JavaRanch
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

Make sure that all the necessary JARs are in your WAR file. Unpack it and check that they are all in there.
Mithil Wane
Greenhorn

Joined: Sep 10, 2006
Posts: 5
Hi,

I did include more jars. So the previous error have gone. But another new one popped up. Let me know which jar to include.

Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

Let me know which jar to include.

Please check this post first.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Error with Spring 3.0 in deployment.
 
Similar Threads
spring wont inject the entitymanager
The matching wildcard is strict, but no declaration can be found for element 'context:annotation'
org.springframework.beans.factory.BeanCreationException
No unique bean of type [javax.persistence.EntityManagerFactory] is defined: expected single bean but
Spring / Hibernate / cxf problems connecting with oracle