java - class path resource [../EnableTransactionManagement.class] cannot be opened because it does not exist -


i'm having error in mvc spring project made in spring tool suite. java file there , there no compilation error in there, have included respective jars. stand-alone program test runs fine, when try publish on test server, web page display http 500 status error.

i made default web project spring, , works,the server display home page, used template make own project, , since didn't touched configuration files unrelated webserver (only spring , hibernate xml files) i'm not sure why i'm getting this.

here full message stack trace(only error)

http 500 status - servlet.init () servlet threw exception appservlet

org.springframework.beans.factory.beandefinitionstoreexception: failed load bean class: mvc.test.hib.hibernateconfig;

nested exception java.io.filenotfoundexception: class path resource [org/springframework/transaction/annotation/enabletransactionmanagement.class] cannot opened because not exist

here mentioned java file supposed error

package mvc.test.hib;   import java.util.properties;  import javax.sql.datasource;  import org.hibernate.sessionfactory; import org.springframework.beans.factory.annotation.autowired; import org.springframework.context.annotation.bean; import org.springframework.context.annotation.componentscan; import org.springframework.context.annotation.configuration; import org.springframework.context.annotation.propertysource; import org.springframework.core.env.environment; import org.springframework.jdbc.datasource.drivermanagerdatasource; import org.springframework.orm.hibernate4.hibernatetransactionmanager; import org.springframework.orm.hibernate4.localsessionfactorybean; import org.springframework.transaction.annotation.enabletransactionmanagement;  @configuration @enabletransactionmanagement @componentscan({"mvc.test.hib" }) @propertysource(value = { "classpath:application.properties" }) public class hibernateconfig {     @autowired    private environment environment;     @bean    public localsessionfactorybean sessionfactory() {        localsessionfactorybean sessionfactory = new localsessionfactorybean();        sessionfactory.setdatasource(datasource());        sessionfactory.setpackagestoscan(new string[] { "mvc.test.hib" });        sessionfactory.sethibernateproperties(hibernateproperties());        return sessionfactory;     }     @bean    public datasource datasource() {        drivermanagerdatasource datasource = new drivermanagerdatasource();        datasource.setdriverclassname(environment.getrequiredproperty("jdbc.driverclassname"));        datasource.seturl(environment.getrequiredproperty("jdbc.url"));        datasource.setusername(environment.getrequiredproperty("jdbc.username"));        datasource.setpassword(environment.getrequiredproperty("jdbc.password"));        return datasource;    }     private properties hibernateproperties() {        properties properties = new properties();        properties.put("hibernate.dialect", environment.getrequiredproperty("hibernate.dialect"));        properties.put("hibernate.show_sql", environment.getrequiredproperty("hibernate.show_sql"));        properties.put("hibernate.format_sql", environment.getrequiredproperty("hibernate.format_sql"));        return properties;            }     @bean    @autowired    public hibernatetransactionmanager transactionmanager(sessionfactory s) {       hibernatetransactionmanager txmanager = new hibernatetransactionmanager();       txmanager.setsessionfactory(s);       return txmanager;    } }  

edit: thougth error because didn´t have added jar, downloaded jar contains org/springframework/transaction/annotation/enabletransactionmanagement.class, still same message. i'm lost.

i'm not using maven, jars imported manually


Comments

Popular posts from this blog

html - Firefox flex bug applied to buttons? -

html - Missing border-right in select on Firefox -

c# - two queries in same method -