java.lang.NoSuchMethodError: org.objectweb.asm.ClassVisitor.visit
hi all !
i have a problem with my Spring application. I have a applicationContext.xml :
Code:
lt;?xml version=quot;1.0quot; encoding=quot;UTF-8quot;?gt;
lt;beans
xmlns=quot;schema/beansquot;
xmlns:xsi=quot;2001/XMLSchema-instancequot;
xsi:schemaLocation=quot;schema/beans schema/beans/spring-beans-2.0.xsdquot;gt;lt;bean id=quot;hibernateSessionFactoryquot;
class=quot;org..orm.hibernate3.LocalSessionFactoryBeanquot;gt;
lt;property name=quot;configLocationquot;
value=quot;classpath:hibernate.cfg.xmlquot;gt;
lt;/propertygt;
lt;/beangt;
lt;bean id=quot;AccountDAOquot; class=quot;dao.AccountDAOquot;gt;
lt;property name=quot;sessionFactoryquot;gt;
lt;ref bean=quot;hibernateSessionFactoryquot; /gt;
lt;/propertygt;
lt;/beangt;
lt;bean id=quot;TrantypeDAOquot; class=quot;dao.TrantypeDAOquot;gt;
lt;property name=quot;sessionFactoryquot;gt;
lt;ref bean=quot;hibernateSessionFactoryquot; /gt;
lt;/propertygt;
lt;/beangt;
lt;bean id=quot;TransactionDAOquot; class=quot;dao.TransactionDAOquot;gt;
lt;property name=quot;sessionFactoryquot;gt;
lt;ref bean=quot;hibernateSessionFactoryquot; /gt;
lt;/propertygt;
lt;/beangt;
lt;bean name=quot;accountServicequot; class=quot;service.AccountServicequot;
abstract=quot;falsequot; lazy-init=quot;defaultquot; autowire=quot;defaultquot;
dependency-check=quot;defaultquot;gt;
lt;/beangt;
lt;bean name=quot;/registerquot; class=quot;action.RegisterActionquot;
abstract=quot;falsequot; lazy-init=quot;defaultquot; autowire=quot;defaultquot;
dependency-check=quot;defaultquot;gt;
lt;property name=quot;accountServicequot;gt;
lt;ref bean=quot;accountServicequot; /gt;
lt;/propertygt;
lt;/beangt;lt;/beansgt;
and hibernate.cfg.xml :
Code:
lt;?xml version='1.0' encoding='UTF-8'?gt;
lt;!DOCTYPE hibernate-configuration PUBLIC quot;-//Hibernate/Hibernate Configuration DTD 3.0//ENquot; quot;hibernate-configuration-3.0.dtdquot;gt;
lt;!-- Generated by MyEclipse Hibernate Tools. --gt;
lt;hibernate-configurationgt;
lt;session-factorygt;
lt;property name=quot;connection.usernamequot;gt;rootlt;/propertygt;
lt;property name=quot;connection.uclquot;gt;
jdbc:mysql--localhost/atm
lt;/propertygt;
lt;property name=quot;dialectquot;gt;
org.hibernate.dialect.MySQLDialect
lt;/propertygt;
lt;property name=quot;myeclipse.connection.profilequot;gt;mysqllt;/propertygt;
lt;property name=quot;connection.passwordquot;gt;rootlt;/propertygt;
lt;property name=quot;connection.driver_classquot;gt;
com.mysql.jdbc.Driver
lt;/propertygt;
lt;mapping resource=quot;mapping/Transaction.hbm.xmlquot; /gt;
lt;mapping resource=quot;mapping/Trantype.hbm.xmlquot; /gt;
lt;mapping resource=quot;mapping/Account.hbm.xmlquot; /gt;
lt;/session-factorygt;
lt;/hibernate-configurationgt;
and struts-config.xml :
Code:
lt;?xml version=quot;1.0quot; encoding=quot;UTF-8quot;?gt;
lt;!DOCTYPE struts-config PUBLIC quot;-//Apache Software Foundation//DTD Struts Configuration 1.1//ENquot; quot;struts/dtds/struts-config_1_1.dtdquot;gt;
lt;struts-configgt;lt;form-beansgt; lt;form-bean name=quot;registerFormquot; type=quot;org.apache.struts.validator.DynaValidatorFormquot;gt; lt;form-property name=quot;addressquot; type=quot;java.lang.Stringquot;/gt; lt;form-property name=quot;balancequot; type=quot;java.lang.Floatquot;/gt; lt;form-property name=quot;birthdayquot; type=quot;java.lang.Stringquot;/gt; lt;form-property name=quot;fullnamequot; type=quot;java.lang.Stringquot;/gt; lt;form-property name=quot;hobbyquot; type=quot;java.lang.Stringquot;/gt; lt;form-property name=quot;passwordquot; type=quot;java.lang.Stringquot;/gt; lt;form-property name=quot;sexquot; type=quot;java.lang.Stringquot;/gt; lt;form-property name=quot;usernamequot; type=quot;java.lang.Stringquot;/gt; lt;/form-beangt; lt;/form-beansgt;lt;action-mappingsgt; lt;action path=quot;/registerquot; type=quot;action.RegisterActionquot; input=quot;/Register.jspquot; validate=quot;truequot; name=quot;registerFormquot;gt; lt;forward name=quot;successquot; path=quot;/success.jspquot;/gt; lt;forward name=quot;errorsquot; path=quot;/errors.jspquot;/gt; lt;/actiongt;
lt;/action-mappingsgt;
lt;message-resources parameter=quot;ApplicationResourcesquot;/gt;
lt;plug-in className=quot;org.apache.struts.validator.ValidatorPlugInquot;gt; lt;set-property property=quot;pathnamesquot; value=quot;/WEB-INF/validator-rules.xml,/WEB-INF/validation.xmlquot;/gt;lt;/plug-ingt;
lt;plug-in className=quot;org..web.struts.ContextLoaderPlugInquot;gt; lt;set-property property=quot;contextConfigLocationquot; value=quot;/WEB-INF/applicationContext.xmlquot;/gt;lt;/plug-ingt;
lt;/struts-configgt;
when i start Tomcat Server i get the following errors :
Code:
SEVERE: action: null
org..beans.factory.BeanCreationException: Error creating bean with name 'hibernateSessionFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: org.objectweb.asm.ClassVisitor.visit(IILjava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)V
Caused by: java.lang.NoSuchMethodError: org.objectweb.asm.ClassVisitor.visit(IILjava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)V
Apr 6, 2008 9:46:57 AM org.apache.catalina.core.ApplicationContext log
INFO: Marking servlet action as unavailable
Apr 6, 2008 9:46:57 AM org.apache.catalina.core.StandardContext loadOnStartup
SEVERE: Servlet /ATM9 threw load() exception
javax.servlet.UnavailableException
at org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.java:1169)
at org.apache.struts.action.ActionServlet.init(ActionServlet.java:473)
....
may can you help me ?
trie to add hibernate-support\asm.jar
i think that you missing asm.jar |