Sunday 15 February 2015

Error on xml of spring config -


I am trying to run an epicode in TomK by using Spring + JSF + Hibernate, but I have the following error hear:

grim: exception sending square org.springframework.web.context.ContextLoaderListener org.springframework.beans.factory.BeanDefinitionStoreException say listener reference Start event: unexpected exception ServletContext resources Parse XML document [/ WEB-INF / spring-config.xml]; Nested exceptions java.lang.NoClassDefFoundError: org / aopalliance / intercept / method on interceptor org.springframework.beans.factory.xml.xmlBeanDefinitionReader.doLoadBeanDefinitions (XmlBeanDefinitionReader.java:412) org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions (XmlBeanDefinitionReader.java:334)

My spring-config.xml:

  & lt; Bem xmlns = "http: //www.springframework.org/schema/beans" xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance" xmlns: aop = "http: // www. springframework.org/schema / Aop "xmlns: reference =" http://www.springframework.org/schema/context "xmlns: jee =" http://www.springframework.org/schema/jee "xmlns: tx = "Http: // www.springframework.org/schema/tx" xmlns: util = "http://www.springframework.org/schema/util" xsi: schemaLocation = "http://www.springframework.org/schema / beans http: / /wwwkspringfrmevorkkorg/skima/bins/spring-bins-3klkksd Actiteepi://wwwkspringfrmevorkkorg/skima/awp http: //wwwkspringfrmev Orkkorg/skima/awp /spring-awp-3klkksd Actiteepi://wwwkspringfrmevorkkorg/skima/contekst Actiteepi://wwwkspringfrmevorkkorg/skima/contekst/spring-contekst-3klkksd http: //wwwkspringfrmevork. Org / schema / jee http://www.springframework.org/schema/jee/spring-jee-3.1.xsd http://www.springframework.org/schema/tx http: // www.springframework.org/schema /tx/spring-tx-3.1.xsd http: // w Ww.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.1. XSD "& gt; Byan ID =" Cadrastapi "MB" class = "br.com.prontuario.mb.CadastraPaciente" Scope = "Session" /> & Lt; Bean id = "Pesvisa prienchembam" class = "br.com.prontuario.mb.PesquisaPaciente" scope = "session" & gt; & Lt; Property Name = "Aditya Prineet" referee = "Aditya PiaNichMM" /> & Lt; / Bean & gt; & Lt; Bean id = "editaPacienteMB" class = "br.com.prontuario.mb.EditaPaciente" scope = "session" /> & Lt; Tx: annotation-driven transaction-manager = "txManager" /> & Lt; Reference: Annotation-config / & gt; & Lt ;! - JPA - transmitters near GRNADR - & gt; & Lt; Bean id = "txManager" class = "org.springframework.orm.jpa.JpaTransactionManager" & gt; & Lt; Property Name = "entityManagerFactory" Reference = "entityManagerFactory" /> & Lt; Property Name = "Data Source" Riff = "MyData Source" /> & Lt; / Bean & gt; & Lt ;! - Fabrica de entity managers - & gt; & Lt; Bean id = "entityManagerFactory" class = "org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean" & gt; & Lt; Property Name = "Data Source" Riff = "MyData Source" /> & Lt; Property Name = "JPAVENDER Adapter" & gt; & Lt; Bean square = "org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter" & gt; & Lt; Property Name = "Show SQL" value = "true" /> & Lt; Property Name = "Generated DDL" value = "True" /> & Lt; Property name = "database" value = "postgresqual" /> & Lt; / Bean & gt; & Lt; / Property & gt; & Lt; Property Name = "JPAP Properties" & gt; & Lt; Theater Content & gt; & Lt; Prop key = "hibernate.dialect" & gt; Org.hibernate.dialect.PostgreSQLDialect & lt; / Prop & gt; & Lt; / Theater & gt; & Lt; / Property & gt; & Lt; / Bean & gt; & Lt ;! - Backdoes Dedos de Applecoso -> to configure Datasource & Lt; Bean id = "myDataSource" class = "org.apache.tomcat.dbcp.dbcp.BasicDataSource" & gt; & Lt; Property Name = "driverClassName" value = "org.postgresql.Driver" /> & Lt; Asset name = "url" value = "jdbc: postgresql: // localhost: 5433 / postgrad" /> & Lt; Property Name = "User Name" Value = "Postgrad" /> & Lt; Property Name = "Password" Value = "Postgrad" /> & Lt; / Bean & gt; & Lt; / Bean & gt; You are using spring-tx (as you are using tx: annotation-dvance)    

. Spring tx depends on aopaliance and this jar is missing in your classpath:

  java.lang.NoClassDefFoundError: org / aopalliance / Pause / MethodInterceptor   

You can get it:

  http://mirrors.ibiblio.org/pub/mirrors/maven/aopalliance/jars/aopalliance-1.0.jar  < / Pre> 

Or use (better) Maven ...

No comments:

Post a Comment