Post your pom.xml please. -----Original Message----- From: Baron Fujimoto [mailto:ba...@hawaii.edu] Sent: Monday, April 13, 2015 11:48 AM To: cas-user@lists.jasig.org Subject: Re: [cas-user] Error creating bean with name 'entityManagerFactory'
The following jar files don't appear anywhere in the resulting dependency tree but are in the cas.war file that results from a "mvn clean package" build: WEB-INF/lib/hibernate-commons-annotations-3.2.0.Final.jar WEB-INF/lib/hibernate-core-3.6.0.Final.jar WEB-INF/lib/hibernate-jpa-2.0-api-1.0.0-CR-1.jar WEB-INF/lib/hibernate-validator-4.0.2.GA.jar FWIW, the dependency trees, like the contents of the cas.war files appear to be identical between the working and non-working systems. So, their source is still unknown, but on the working system their presence doesn't seem to matter. I'm quite at a loss here. Are there othe mvn build options I should try, or places I should look for potential differences? The builds do warn that "The POM for org.opensaml:opensaml:jar:1.1b is missing, no dependency information available", but AFAIK, it has always been thus and it hasn't hithertofore been a problem. (And I don't see any obvious relationship to the apparent hibernate error?) On Sat, Apr 11, 2015 at 11:55:36AM +0430, Misagh Moayyed wrote: >run mvn dependency:tree from the command line and it will show you where the extra jars are coming from. > >- Misagh > >> On Apr 11, 2015, at 12:13 AM, Baron Fujimoto <ba...@hawaii.edu> wrote: >> >> On Thu, Apr 09, 2015 at 08:42:45AM +0200, Alberto Cabello Sánchez wrote: >>> On Wed, 08 Apr 2015 09:38:50 -1000 >>> Baron Fujimoto <ba...@hawaii.edu> wrote: >>> >>>> I'm encountering the following error using a >>>> deployerConfigContext.xml and pom.xml that has worked previously. >>>> Any suggestions on how to resolve this would be welcome. >>>> >>>> 015-04-08 09:16:32,771 ERROR >>>> [org.springframework.web.context.ContextLoader] - <Context >>>> initialization failed> >>>> org.springframework.beans.factory.BeanCreationException: Error >>>> creating bean with name 'servicesManager' defined in ServletContext >>>> resource [/WEB-INF/spring-configuration/applicationContext.xml]: >>>> Cannot resolve reference to bean 'serviceRegistryDao' while setting >>>> constructor argument; nested exception is >>>> org.springframework.beans.factory.BeanCreationException: Error >>>> creating bean with name 'serviceRegistryDao' defined in >>>> ServletContext resource [/WEB-INF/deployerConfigContext.xml]: Cannot resolve reference to bean 'entityManagerFactory' while setting bean property 'entityManagerFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: >>>> Error creating bean with name 'entityManagerFactory' defined in ServletContext resource [/WEB-INF/deployerConfigContext.xml]: >>>> Invocation of init method failed; nested exception is >>>> java.lang.NoSuchMethodError: >>>> org.hibernate.mapping.SimpleValue.<init>(Lorg/hibernate/mapping/Tab >>>> le;)V >>> >>> Did you check this post (it apparently deals with the same issue)? >>> >>> http://java-with-shiva.blogspot.com.es/2013/06/invocation-of-init-me >>> thod-failed-nested.html >> >> I did find that post in my research into the problem, but I don't >> understand how anything I have done may have caused it. I don't find >> any references to hibernate-annotations in a recursive grep of src/ . >> >> The following hibernate jar files wind up in the resulting war file >> for both my seemingly identical working and non-working versions: >> >> WEB-INF/lib/hibernate-annotations-3.5.0-CR-2.jar >> WEB-INF/lib/hibernate-commons-annotations-3.2.0.Beta1.jar >> WEB-INF/lib/hibernate-commons-annotations-3.2.0.Final.jar >> WEB-INF/lib/hibernate-core-3.5.0-CR-2.jar >> WEB-INF/lib/hibernate-core-3.6.0.Final.jar >> WEB-INF/lib/hibernate-entitymanager-3.5.0-CR-2.jar >> WEB-INF/lib/hibernate-jpa-2.0-api-1.0.0-CR-1.jar >> WEB-INF/lib/hibernate-jpa-2.0-api-1.0.0.Final.jar >> WEB-INF/lib/hibernate-validator-4.0.2.GA.jar >> >> The 3.5.0-CR-2 stuff is presumably the result of the inclusion of the >> dependency in my pom.xml >> >> <dependency> >> <groupId>org.hibernate</groupId> >> <artifactId>hibernate-entitymanager</artifactId> >> <version>3.5.0-CR-2</version> >> </dependency> >> >> But I don't know where the others are being invoked from, nor why >> there seem to be mutiple versions for some of them. If I remove the >> hibernate-entitymanager dependency from pom.xml, the app throws a >> different hibernat related error. >> >> Constructor threw exception; nested exception is >> java.lang.NoClassDefFoundError: >> org/hibernate/ejb/HibernatePersistence >> >> The pom.xml and deployerConfigContext.xml are essentially identical; >> there are no dependency differences. Nor did a recursive diff from >> the src/ dir in my maven overlay workspace turn up any material >> differences either as far as I can tell. Where else might the source >> of these differences originate? >> >> -- >> Baron Fujimoto <ba...@hawaii.edu> :: UH Information Technology >> Services minutas cantorum, minutas balorum, minutas carboratum >> desendus pantorum >> >> -- >> You are currently subscribed to cas-user@lists.jasig.org as: >> mmoay...@unicon.net To unsubscribe, change settings or access >> archives, see http://www.ja-sig.org/wiki/display/JSG/cas-user > > >-- >You are currently subscribed to cas-user@lists.jasig.org as: >ba...@hawaii.edu To unsubscribe, change settings or access archives, >see http://www.ja-sig.org/wiki/display/JSG/cas-user > -- Baron Fujimoto <ba...@hawaii.edu> :: UH Information Technology Services minutas cantorum, minutas balorum, minutas carboratum desendus pantorum -- You are currently subscribed to cas-user@lists.jasig.org as: mmoay...@unicon.net To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/cas-user -- You are currently subscribed to cas-user@lists.jasig.org as: arch...@mail-archive.com To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/cas-user