I'm not sure why you're pulling it any 2.0.4 jars.  Spring Security's 2.0.4
version shouldn't be pulling any of that in.  Spring Security, at a minimum
would be pulling in Spring 2.0.8.  Either way, you can add exclude
statements (check out some of the examples in our pom.xml files).


On Fri, Jun 19, 2009 at 3:51 AM, Jean-Noel Colin <[email protected]> wrote:

> Indeed, there are multiple versions of some Spring jars; the webapp pom.xml
> requires 2.0.4 for spring-security-cas-client while the one for spring-aop
> requires spring.version (which I guess is 2.5.6)
> I tried forcing spring.version for spring-security-cas-client, or forcing
> 2.0.4 for spring-aop, without success. Would you have any other
> idea/recommendation to get this to work? It's really a mandatory part of my
> project, which is getting quite urgent.
>
> Thanks a lot
>
> Jean-Noel
>
>
>     <dependencies>
>         <dependency>
>             <groupId>org.springframework.security</groupId>
>             <artifactId>spring-security-cas-client</artifactId>
>             <version>2.0.4</version>
>
>         <dependency>
>             <groupId>org.springframework</groupId>
>             <artifactId>spring-aop</artifactId>
>             <version>${spring.version}</version>
>         </dependency>
>
> using spring.version for spring-aop:
>
> strider:lib jnc$ ls -l *spring*
> -rw-r--r--  1 jnc  staff  303009 Jun 19 09:41 spring-aop-2.0.4.jar
> -rw-r--r--  1 jnc  staff  325942 Jun  4 11:54 spring-aop-2.5.6.jar
> -rw-r--r--  1 jnc  staff  386894 Jun 19 09:42 spring-beans-2.0.4.jar
> -rw-r--r--  1 jnc  staff  488282 Jun  4 11:13 spring-beans-2.5.6.jar
> -rw-r--r--  1 jnc  staff   86817 Jun  4 11:08 spring-binding-1.0.5.jar
> -rw-r--r--  1 jnc  staff  156511 Jun 18 15:27 spring-context-2.0.4.jar
> -rw-r--r--  1 jnc  staff  476940 Jun  4 11:14 spring-context-2.5.6.jar
> -rw-r--r--  1 jnc  staff   96880 Jun  4 11:14
> spring-context-support-2.5.6.jar
> -rw-r--r--  1 jnc  staff  179193 Jun 19 09:41 spring-core-2.0.4.jar
> -rw-r--r--  1 jnc  staff  285491 Jun  4 11:13 spring-core-2.5.6.jar
> -rw-r--r--  1 jnc  staff  130199 Jun 18 15:08 spring-dao-2.0.8.jar
> -rw-r--r--  1 jnc  staff  224065 Jun 18 15:27 spring-jdbc-2.0.4.jar
> -rw-r--r--  1 jnc  staff  377805 Jun  4 11:13 spring-orm-2.5.6.jar
> -rw-r--r--  1 jnc  staff   16043 Jun  4 11:54
> spring-security-cas-client-2.0.4.jar
> -rw-r--r--  1 jnc  staff  773156 Jun  4 11:54
> spring-security-core-2.0.4.jar
> -rw-r--r--  1 jnc  staff  231173 Jun  4 11:14 spring-tx-2.5.6.jar
> -rw-r--r--  1 jnc  staff  194577 Jun  4 11:14 spring-web-2.5.6.jar
> -rw-r--r--  1 jnc  staff  406438 Jun  4 11:08 spring-webflow-1.0.5.jar
> -rw-r--r--  1 jnc  staff  402396 Jun  4 11:14 spring-webmvc-2.5.6.jar
>
> using 2.0.4 for spring-aop
>
> strider:lib jnc$ ls -l *spring*
> -rw-r--r--  1 jnc  staff  303009 Jun 19 09:41 spring-aop-2.0.4.jar
> -rw-r--r--  1 jnc  staff  386894 Jun 19 09:42 spring-beans-2.0.4.jar
> -rw-r--r--  1 jnc  staff   86817 Jun  4 11:08 spring-binding-1.0.5.jar
> -rw-r--r--  1 jnc  staff  156511 Jun 18 15:27 spring-context-2.0.4.jar
> -rw-r--r--  1 jnc  staff  476940 Jun  4 11:14 spring-context-2.5.6.jar
> -rw-r--r--  1 jnc  staff   96880 Jun  4 11:14
> spring-context-support-2.5.6.jar
> -rw-r--r--  1 jnc  staff  179193 Jun 19 09:41 spring-core-2.0.4.jar
> -rw-r--r--  1 jnc  staff  130199 Jun 18 15:08 spring-dao-2.0.8.jar
> -rw-r--r--  1 jnc  staff  224065 Jun 18 15:27 spring-jdbc-2.0.4.jar
> -rw-r--r--  1 jnc  staff  377805 Jun  4 11:13 spring-orm-2.5.6.jar
> -rw-r--r--  1 jnc  staff   16043 Jun  4 11:54
> spring-security-cas-client-2.0.4.jar
> -rw-r--r--  1 jnc  staff  773156 Jun  4 11:54
> spring-security-core-2.0.4.jar
> -rw-r--r--  1 jnc  staff  231173 Jun  4 11:14 spring-tx-2.5.6.jar
> -rw-r--r--  1 jnc  staff  194577 Jun  4 11:14 spring-web-2.5.6.jar
> -rw-r--r--  1 jnc  staff  406438 Jun  4 11:08 spring-webflow-1.0.5.jar
> -rw-r--r--  1 jnc  staff  402396 Jun  4 11:14 spring-webmvc-2.5.6.jar
>
> The webapp pom.xml requires 2.0.4
>
>     <dependencies>
>         <dependency>
>             <groupId>org.springframework.security</groupId>
>             <artifactId>spring-security-cas-client</artifactId>
>             <version>2.0.4</version>
>
>
> On 18 Jun 2009, at 16:10, Scott Battaglia wrote:
>
> Check the lib directory of the produced war to make sure there are not
> multiple Spring versioned jars in there.
>
>
> On Thu, Jun 18, 2009 at 10:02 AM, Jean-Noel Colin <[email protected]>wrote:
>
>> I'm trying to configure the serviceRegistryDao to work with a database to
>> persist the service configuration.
>> I carefully followed the instructions on
>> http://www.ja-sig.org/wiki/display/CASUM/Configuring but I can't start
>> the CAS server; I always get the following error in the logs:
>>
>>
>> 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.springframework.instrument.classloading.InstrumentationLoadTimeWeaver.isInstrumentationAvailable()Z
>>
>> ...
>>
>> Caused by: java.lang.NoSuchMethodError:
>> org.springframework.instrument.classloading.InstrumentationLoadTimeWeaver.isInstrumentationAvailable()Z
>>         at
>> org.springframework.orm.jpa.persistenceunit.DefaultPersistenceUnitManager.afterPropertiesSet(DefaultPersistenceUnitManager.java:257)
>>         at
>> org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:192)
>>
>> Here's my deployerConfigContext.xml:
>>
>> The changes I made are:
>>
>>    - comment out the exclusion for spring-dao
>>    - add dependencies for commons-dbcp, mysql, org.hibernate and
>>    concurrent
>>    - add dependencies for org.springframework/spring-jdbc, but this does
>>    not solve anything; without it, i get a different problem
>>
>>
>> I need to connect to a mysql 5.0 database, using the 5.0.8 connector.
>>
>> Thank a lot
>>
>> Jean-Noël
>>
>>
>> <project xmlns="http://maven.apache.org/POM/4.0.0"; xmlns:xsi="
>> http://www.w3.org/2001/XMLSchema-instance";
>>   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
>> http://maven.apache.org/maven-v4_0_0.xsd";>
>>     <parent>
>>         <groupId>org.jasig.cas</groupId>
>>         <artifactId>cas-server</artifactId>
>>         <version>3.3.2</version>
>>     </parent>
>>     <modelVersion>4.0.0</modelVersion>
>>     <groupId>org.jasig.cas</groupId>
>>     <artifactId>cas-server-webapp</artifactId>
>>     <packaging>war</packaging>
>>     <name>JA-SIG CAS Web Application</name>
>>     <dependencies>
>>         <dependency>
>>             <groupId>org.springframework.security</groupId>
>>              <artifactId>spring-security-cas-client</artifactId>
>>             <version>2.0.4</version>
>>             <scope>runtime</scope>
>>             <exclusions>
>>                 <!--
>>                 <exclusion>
>>                     <groupId>org.springframework</groupId>
>>                     <artifactId>spring-dao</artifactId>
>>                 </exclusion>
>>                 -->
>>                 <exclusion>
>>                     <groupId>org.springframework</groupId>
>>                     <artifactId>spring-tx</artifactId>
>>                 </exclusion>
>>                 <exclusion>
>>                     <groupId>org.springframework</groupId>
>>                     <artifactId>spring-jdbc</artifactId>
>>                 </exclusion>
>>                 <exclusion>
>>                     <groupId>org.springframework</groupId>
>>                     <artifactId>spring-beans</artifactId>
>>                 </exclusion>
>>                 <exclusion>
>>                     <groupId>org.springframework</groupId>
>>                     <artifactId>spring-context</artifactId>
>>                 </exclusion>
>>                 <exclusion>
>>                     <groupId>org.springframework</groupId>
>>                     <artifactId>spring-support</artifactId>
>>                 </exclusion>
>>             </exclusions>
>>         </dependency>
>>
>>         <dependency>
>>             <groupId>org.springframework</groupId>
>>             <artifactId>spring-jdbc</artifactId>
>>             <version>${spring.version}</version>
>>         </dependency>
>>
>>         <dependency>
>>             <groupId>org.springframework</groupId>
>>             <artifactId>spring-aop</artifactId>
>>             <version>${spring.version}</version>
>>         </dependency>
>>
>>         <dependency>
>>             <groupId>org.jasig.cas</groupId>
>>             <artifactId>cas-server-core</artifactId>
>>             <version>${project.version}</version>
>>         </dependency>
>>         <dependency>
>>             <groupId>quartz</groupId>
>>             <artifactId>quartz</artifactId>
>>             <version>1.5.2</version>
>>             <type>jar</type>
>>         </dependency>
>>         <dependency>
>>             <groupId>javax.servlet</groupId>
>>             <artifactId>jstl</artifactId>
>>             <version>1.1.2</version>
>>             <type>jar</type>
>>         </dependency>
>>         <dependency>
>>             <groupId>taglibs</groupId>
>>             <artifactId>standard</artifactId>
>>             <version>1.1.2</version>
>>             <type>jar</type>
>>         </dependency>
>>         <dependency>
>>             <groupId>ognl</groupId>
>>             <artifactId>ognl</artifactId>
>>             <version>2.6.9</version>
>>             <scope>runtime</scope>
>>         </dependency>
>>         <dependency>
>>             <groupId>log4j</groupId>
>>             <artifactId>log4j</artifactId>
>>             <version>1.2.15</version>
>>             <type>jar</type>
>>             <scope>runtime</scope>
>>             <exclusions>
>>                 <exclusion>
>>                     <groupId>javax.mail</groupId>
>>                     <artifactId>mail</artifactId>
>>                 </exclusion>
>>                 <exclusion>
>>                     <groupId>javax.jms</groupId>
>>                     <artifactId>jms</artifactId>
>>                 </exclusion>
>>                 <exclusion>
>>                     <groupId>com.sun.jdmk</groupId>
>>                     <artifactId>jmxtools</artifactId>
>>                 </exclusion>
>>                 <exclusion>
>>                     <groupId>com.sun.jmx</groupId>
>>                     <artifactId>jmxri</artifactId>
>>                 </exclusion>
>>             </exclusions>
>>         </dependency>
>>
>>         <dependency>
>>             <groupId>commons-dbcp</groupId>
>>             <artifactId>commons-dbcp</artifactId>
>>             <version>1.2.2</version>
>>             <scope>runtime</scope>
>>         </dependency>
>>
>>         <dependency>
>>             <groupId>mysql</groupId>
>>             <artifactId>mysql-connector-java</artifactId>
>>             <version>5.0.8</version>
>>             <scope>provided</scope>
>>         </dependency>
>>         <dependency>
>>             <groupId>org.hibernate</groupId>
>>             <artifactId>hibernate-entitymanager</artifactId>
>>             <version>3.3.1.ga</version>
>>         </dependency>
>>         <dependency>
>>             <groupId>org.hibernate</groupId>
>>             <artifactId>hibernate</artifactId>
>>             <version>3.2.5.ga</version>
>>         </dependency>
>>         <dependency>
>>             <groupId>concurrent</groupId>
>>             <artifactId>concurrent</artifactId>
>>             <version>1.3.4</version>
>>         </dependency>
>>
>>     </dependencies>
>>     <build>
>>         <plugins>
>>             <plugin>
>>                 <groupId>org.apache.maven.plugins</groupId>
>>                 <artifactId>maven-war-plugin</artifactId>
>>                 <configuration>
>>                     <warName>cas</warName>
>>                 </configuration>
>>             </plugin>
>>         </plugins>
>>     </build>
>> </project>
>>
>>
> --
> You are currently subscribed to [email protected] as: 
> [email protected]
>
> To unsubscribe, change settings or access archives, see 
> http://www.ja-sig.org/wiki/display/JSG/cas-user
>
>
>

-- 
You are currently subscribed to [email protected] as: 
[email protected]
To unsubscribe, change settings or access archives, see 
http://www.ja-sig.org/wiki/display/JSG/cas-user

Reply via email to