IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Spring Java Discussion :

exception : Driver for test database type [HSQL] is not available in the classpath [Security]


Sujet :

Spring Java

  1. #1
    Candidat au Club
    Inscrit en
    Septembre 2010
    Messages
    3
    Détails du profil
    Informations forums :
    Inscription : Septembre 2010
    Messages : 3
    Points : 4
    Points
    4
    Par défaut exception : Driver for test database type [HSQL] is not available in the classpath
    bonjour,
    j'essaye de me logger a travers une Bdd mais lorsque je demarre mon serveur tomcat j'ai cette execption:

    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.security.authentication.ProviderManager#0': Cannot create inner bean '(inner bean)' of type [org.springframework.security.config.authentication.AuthenticationManagerFactoryBean] while setting bean property 'parent'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)': FactoryBean threw exception on object creation; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.security.authenticationManager': Cannot resolve reference to bean 'org.springframework.security.authentication.dao.DaoAuthenticationProvider#0' while setting bean property 'providers' with key [0]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.security.authentication.dao.DaoAuthenticationProvider#0': Cannot resolve reference to bean 'org.springframework.security.provisioning.JdbcUserDetailsManager#0' while setting bean property 'userDetailsService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.security.provisioning.JdbcUserDetailsManager#0': Cannot resolve reference to bean 'dataSource' while setting bean property 'dataSource'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource': Error setting property values; nested exception is org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are:
    PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'databaseType' threw exception; nested exception is java.lang.IllegalStateException: Driver for test database type [HSQL] is not available in the classpath
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:281)
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:125)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1317)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1076)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:574)
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
    at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
    at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
    at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4350)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
    at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
    at org.apache.catalina.core.StandardService.start(StandardService.java:516)
    at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
    Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)': FactoryBean threw exception on object creation; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.security.authenticationManager': Cannot resolve reference to bean 'org.springframework.security.authentication.dao.DaoAuthenticationProvider#0' while setting bean property 'providers' with key [0]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.security.authentication.dao.DaoAuthenticationProvider#0': Cannot resolve reference to bean 'org.springframework.security.provisioning.JdbcUserDetailsManager#0' while setting bean property 'userDetailsService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.security.provisioning.JdbcUserDetailsManager#0': Cannot resolve reference to bean 'dataSource' while setting bean property 'dataSource'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource': Error setting property values; nested exception is org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are:
    PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'databaseType' threw exception; nested exception is java.lang.IllegalStateException: Driver for test database type [HSQL] is not available in the classpath
    at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:149)
    at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:109)
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:274)
    ... 30 more
    voici mon security context :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
     
    <?xml version="1.0" encoding="UTF-8"?>
    <beans:beans xmlns="http://www.springframework.org/schema/beans"
    			 xmlns:beans="http://www.springframework.org/schema/beans"
    			 xmlns:security="http://www.springframework.org/schema/security"
    			 xmlns:jdbc="http://www.springframework.org/schema/jdbc"
    			 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    				   xsi:schemaLocation="http://www.springframework.org/schema/beans
    									   http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
    									   http://www.springframework.org/schema/jdbc
    									   http://www.springframework.org/schema/jdbc/spring-jdbc-3.0.xsd
    									   http://www.springframework.org/schema/security
    									   http://www.springframework.org/schema/security/spring-security-3.0.3.xsd">
     
    	<security:http auto-config='true'>
    	    <security:intercept-url pattern="/index.htm*" filters="none"/>
    	    <security:intercept-url pattern="/logo*" filters="none"/>  
    		<security:intercept-url pattern="/vermeg.css" filters="none"/> 
    		<security:intercept-url pattern="/login.jsp*" filters="none"/>
    		<security:intercept-url pattern="/Managing.html" access="ROLE_ADMIN" />
    		<security:intercept-url pattern="/Application.html" access="ROLE_USER" />
    		<security:intercept-url pattern="/**" access="ROLE_USER" />
    		<security:form-login login-page='/login.jsp' authentication-failure-url="/login.jsp?login_error=1" />
    		<security:logout logout-success-url="/index.htm" />	
    	</security:http>				   
     
    	<jdbc:embedded-database id="dataSource" type="HSQL">
    		<jdbc:script location="classpath:security-schema.sql"/>
    		<jdbc:script location="classpath:test-data.sql"/>
    	</jdbc:embedded-database>
     
    	<security:authentication-manager alias="authenticationManager">
    		<security:authentication-provider>
    			<security:jdbc-user-service data-source-ref="dataSource"/>
    		</security:authentication-provider>
    	</security:authentication-manager>
     
     
    </beans:beans>
    et mon web.xml :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
     
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app id="WebApp_ID" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
    	<display-name>
    	JDBCAuthentication</display-name>
    	<welcome-file-list>
    		<welcome-file>index.htm</welcome-file>
    	</welcome-file-list>
     
     
    	<filter>
    	  	<filter-name>springSecurityFilterChain</filter-name>
      	  	<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
    	</filter>
     
    	<filter-mapping>
      		<filter-name>springSecurityFilterChain</filter-name>
      		<url-pattern>/*</url-pattern>
    	</filter-mapping>
        
        <context-param>
      		<param-name>contextConfigLocation</param-name> 
      		<param-value>/WEB-INF/security-context.xml</param-value> 
    	</context-param>
     
    	<context-param>
     	   <param-name>log4jConfigLocation</param-name>
    	    <param-value>/WEB-INF/classes/log4j.properties</param-value>
      	</context-param>
     
     
    	<listener>
            <listener-class>org.springframework.web.util.Log4jConfigListener</listener-class>
        </listener>
        
        <listener>
      		<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> 
      	</listener>
        	
    </web-app>
     
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app id="WebApp_ID" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
    	<display-name>
    	JDBCAuthentication</display-name>
    	<welcome-file-list>
    		<welcome-file>index.htm</welcome-file>
    	</welcome-file-list>
     
     
    	<filter>
    	  	<filter-name>springSecurityFilterChain</filter-name>
      	  	<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
    	</filter>
     
    	<filter-mapping>
      		<filter-name>springSecurityFilterChain</filter-name>
      		<url-pattern>/*</url-pattern>
    	</filter-mapping>
        
        <context-param>
      		<param-name>contextConfigLocation</param-name> 
      		<param-value>/WEB-INF/security-context.xml</param-value> 
    	</context-param>
     
    	<context-param>
     	   <param-name>log4jConfigLocation</param-name>
    	    <param-value>/WEB-INF/classes/log4j.properties</param-value>
      	</context-param>
     
     
    	<listener>
            <listener-class>org.springframework.web.util.Log4jConfigListener</listener-class>
        </listener>
        
        <listener>
      		<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> 
      	</listener>
        	
    </web-app>
    j'apprécierai toute aide

    merci

  2. #2
    Candidat au Club
    Inscrit en
    Septembre 2010
    Messages
    3
    Détails du profil
    Informations forums :
    Inscription : Septembre 2010
    Messages : 3
    Points : 4
    Points
    4
    Par défaut
    Il falllait ajouter le jar HSQLDB.JAR avec les lib

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. Réponses: 18
    Dernier message: 30/11/2011, 09h55
  2. Type mismatch / Item not found in the collection.
    Par broise dans le forum VBA Access
    Réponses: 2
    Dernier message: 18/07/2008, 14h14
  3. Réponses: 4
    Dernier message: 22/09/2005, 23h57
  4. Réponses: 1
    Dernier message: 15/09/2005, 10h14
  5. jdbc driver for jdk1.4
    Par peppena dans le forum PostgreSQL
    Réponses: 4
    Dernier message: 18/05/2005, 09h05

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo