2016-07-27 6 views
0

私はspring mvcとspring securityの新機能です。ユーザーが間違った資格を3回入力するたびにログインフォームのセキュリティを提供します。 spring_security.xmlで定義されているデータ・アクセスBeanクラスがOracleデータベースに接続できません。この問題を解決する方法はあります。ありがとうございます。ここ春のセキュリティとカスタムユーザーサービスを使用したOracleデータベースの接続の問題

は、ここに私のspring_security.xml

<?xml version="1.0" encoding="UTF-8"?> 

<beans:beans xmlns="http://www.springframework.org/schema/security" 
    xmlns:beans="http://www.springframework.org/schema/beans" 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/security 
         http://www.springframework.org/schema/security/spring-security-3.2.xsd"> 

    <!-- enable use-expressions --> 
    <http auto-config="true" use-expressions="true"> 
     <intercept-url pattern="/admin**" access="hasRole('role_admin')" /> 

     <!-- access denied page --> 
     <access-denied-handler error-page="/403" /> 
     <form-login login-page="/login" login-processing-url="/j_spring_security_check" default-target-url="/welcome" always-use-default-target="false" 
      authentication-failure-url="/login?error" username-parameter="username" password-parameter="password" /> 
     <logout logout-success-url="/login?logout" delete-cookies="JSESSIONID" invalidate-session="true" /> 
     <!-- enable csrf protection --> 
     <csrf /> 

    </http> 




    <beans:bean id="customUserDetailsService" class="com.dxb.users.service.CustomUserDetailsService"> 
      <beans:property name="usersByUsernameQuery" value="select * from users where username = ?"/> 
      <beans:property name="authoritiesByUsernameQuery" value="select username, role from user_roles where username =?" /> 
      <beans:property name="dataSource" ref="dataSource" /> 
     </beans:bean> 




     <beans:bean id="userDetailsDao" class="com.dxb.users.dao.UserDetailsDaoImpl" > 
      <beans:property name="dataSource" ref="dataSource" /> 
     </beans:bean> 




     <beans:bean id="authenticationProvider" class="com.dxb.web.handler.LimitLoginAuthenticationProvider"> 
      <beans:property name="userDetailsService" ref="customUserDetailsService" /> 
      <beans:property name="userDetailsDao" ref="userDetailsDao" /> 
     </beans:bean> 

     <authentication-manager> 

      <authentication-provider ref="authenticationProvider"></authentication-provider> 

     </authentication-manager> 



</beans:beans> 

あり、ここでspring_database.xml

<?xml version="1.0" encoding="UTF-8"?> 

<beans xmlns="http://www.springframework.org/schema/beans" 
    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"> 

    <bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource"> 

     <property name="driverClassName" value="oracle.jdbc.OracleDriver" /> 
     <property name="url" value="jdbc:oracle:thin:@192.168.1.7:1521/XE" /> 
     <property name="username" value="procdb" /> 
     <property name="password" value="procdbadmin" /> 
    </bean> 

</beans> 

あるmvc_dispatcher_servlet

<?xml version="1.0" encoding="UTF-8"?> 

<beans xmlns="http://www.springframework.org/schema/beans" 
    xmlns:context="http://www.springframework.org/schema/context" 
    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/context 
         http://www.springframework.org/schema/context/spring-context-3.0.xsd"> 

    <context:component-scan base-package="com.dxb.*" /> 
    <bean 
     class="org.springframework.web.servlet.view.InternalResourceViewResolver"> 
     <property name="prefix" value="/WEB-INF/pages/"/> 
     <property name="suffix" value=".jsp"/> 


    </bean> 

</beans> 

とweb.xml

012ですここ

上記のコードのスタックトレース

Jul 27, 2016 4:16:56 PM org.apache.catalina.core.AprLifecycleListener init 
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files (x86)\Java\jre7\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:/Program Files (x86)/Java/jre7/bin/client;C:/Program Files (x86)/Java/jre7/bin;C:/Program Files (x86)/Java/jre7/lib/i386;D:\app\user\product\11.2.0\client_1\bin;C:\oraclexe\app\oracle\product\11.2.0\server\bin;;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Java\jdk1.7.0\bin;C:\Program Files (x86)\Java\jre7\lib\ext;%C:\Program Files\Apache Software Foundation\apache-maven-3.3.9\bin%;C:\Program Files (x86)\Java\jdk1.7.0\bin;D:\software\eclipse;;. 
Jul 27, 2016 4:16:56 PM org.apache.tomcat.util.digester.SetPropertiesRule begin 
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.j2ee.server:LoginAttempt' did not find a matching property. 
Jul 27, 2016 4:16:56 PM org.apache.tomcat.util.digester.SetPropertiesRule begin 
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.j2ee.server:test' did not find a matching property. 
Jul 27, 2016 4:16:56 PM org.apache.tomcat.util.digester.SetPropertiesRule begin 
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:SpringHibernateEx' did not find a matching property. 
Jul 27, 2016 4:16:56 PM org.apache.coyote.http11.Http11Protocol init 
INFO: Initializing Coyote HTTP/1.1 on http-8080 
Jul 27, 2016 4:16:56 PM org.apache.catalina.startup.Catalina load 
INFO: Initialization processed in 710 ms 
Jul 27, 2016 4:16:57 PM org.apache.catalina.core.StandardService start 
INFO: Starting service Catalina 
Jul 27, 2016 4:16:57 PM org.apache.catalina.core.StandardEngine start 
INFO: Starting Servlet Engine: Apache Tomcat/6.0.24 
log4j:WARN No appenders could be found for logger (org.springframework.web.servlet.DispatcherServlet). 
log4j:WARN Please initialize the log4j system properly. 
Jul 27, 2016 4:16:57 PM org.apache.catalina.core.ApplicationContext log 
INFO: Initializing Spring FrameworkServlet 'sdnext' 
Jul 27, 2016 4:17:00 PM org.apache.catalina.loader.WebappClassLoader validateJarFile 
INFO: validateJarFile(C:\b2bAER_v1.0\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\test\WEB-INF\lib\servlet-api-2.5.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class 
Jul 27, 2016 4:17:00 PM org.apache.catalina.core.ApplicationContext log 
INFO: Initializing Spring root WebApplicationContext 
Jul 27, 2016 4:17:00 PM org.springframework.web.context.ContextLoader initWebApplicationContext 
INFO: Root WebApplicationContext: initialization started 
Jul 27, 2016 4:17:00 PM org.springframework.web.context.support.XmlWebApplicationContext prepareRefresh 
INFO: Refreshing Root WebApplicationContext: startup date [Wed Jul 27 16:17:00 IST 2016]; root of context hierarchy 
Jul 27, 2016 4:17:01 PM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions 
INFO: Loading XML bean definitions from ServletContext resource [/WEB-INF/spring-database.xml] 
Jul 27, 2016 4:17:01 PM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions 
INFO: Loading XML bean definitions from ServletContext resource [/WEB-INF/spring-security.xml] 
Jul 27, 2016 4:17:01 PM org.springframework.security.core.SpringSecurityCoreVersion performVersionChecks 
INFO: You are running with Spring Security Core 3.2.3.RELEASE 
Jul 27, 2016 4:17:01 PM org.springframework.security.config.SecurityNamespaceHandler <init> 
INFO: Spring Security 'config' module version is 3.2.3.RELEASE 
Jul 27, 2016 4:17:01 PM org.springframework.security.config.http.FilterInvocationSecurityMetadataSourceParser parseInterceptUrlsForFilterInvocationRequestMap 
INFO: Creating access control expression attribute 'hasRole('role_admin')' for /admin** 
Jul 27, 2016 4:17:01 PM org.springframework.security.config.http.HttpSecurityBeanDefinitionParser checkFilterChainOrder 
INFO: Checking sorted filter chain: [Root bean: class [org.springframework.security.web.access.channel.ChannelProcessingFilter]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null, order = 100, Root bean: class [org.springframework.security.web.context.SecurityContextPersistenceFilter]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null, order = 200, Root bean: class [org.springframework.security.web.csrf.CsrfFilter]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null, order = 600, Root bean: class [org.springframework.security.web.authentication.logout.LogoutFilter]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null, order = 700, <org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter#0>, order = 1100, Root bean: class [org.springframework.security.web.authentication.www.BasicAuthenticationFilter]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null, order = 1500, Root bean: class [org.springframework.security.web.savedrequest.RequestCacheAwareFilter]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null, order = 1600, Root bean: class [org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null, order = 1700, Root bean: class [org.springframework.security.web.authentication.AnonymousAuthenticationFilter]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null, order = 2000, Root bean: class [org.springframework.security.web.session.SessionManagementFilter]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null, order = 2100, Root bean: class [org.springframework.security.web.access.ExceptionTranslationFilter]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null, order = 2200, <org.springframework.security.web.access.intercept.FilterSecurityInterceptor#0>, order = 2300] 
Jul 27, 2016 4:17:01 PM org.springframework.beans.factory.parsing.FailFastProblemReporter warning 
WARNING: Configuration problem: Overriding globally registered AuthenticationManager 
Offending resource: ServletContext resource [/WEB-INF/spring-security.xml] 
Jul 27, 2016 4:17:01 PM org.springframework.beans.factory.support.DefaultListableBeanFactory registerBeanDefinition 
INFO: Overriding bean definition for bean 'org.springframework.security.authenticationManager': replacing [Root bean: class [org.springframework.security.authentication.ProviderManager]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null] with [Root bean: class [org.springframework.security.authentication.ProviderManager]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null] 
Jul 27, 2016 4:17:01 PM org.springframework.beans.factory.parsing.FailFastProblemReporter warning 
WARNING: Configuration problem: Overriding globally registered AuthenticationManager 
Offending resource: ServletContext resource [/WEB-INF/spring-security.xml] 
Jul 27, 2016 4:17:01 PM org.springframework.beans.factory.support.DefaultListableBeanFactory registerBeanDefinition 
INFO: Overriding bean definition for bean 'org.springframework.security.authenticationManager': replacing [Root bean: class [org.springframework.security.authentication.ProviderManager]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null] with [Root bean: class [org.springframework.security.authentication.ProviderManager]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null] 
Jul 27, 2016 4:17:01 PM org.springframework.beans.factory.parsing.FailFastProblemReporter warning 
WARNING: Configuration problem: Overriding globally registered AuthenticationManager 
Offending resource: ServletContext resource [/WEB-INF/spring-security.xml] 
Jul 27, 2016 4:17:01 PM org.springframework.beans.factory.support.DefaultListableBeanFactory registerBeanDefinition 
INFO: Overriding bean definition for bean 'org.springframework.security.authenticationManager': replacing [Root bean: class [org.springframework.security.authentication.ProviderManager]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null] with [Root bean: class [org.springframework.security.authentication.ProviderManager]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null] 
Jul 27, 2016 4:17:01 PM org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons 
INFO: Pre-instantiating singletons in org.s[email protected]1bfcbd8: defining beans [dataSource,org.springframework.security.filterChains,org.springframework.security.filterChainProxy,org.springframework.security.web.PortMapperImpl#0,org.springframework.security.web.PortResolverImpl#0,org.springframework.security.config.authentication.AuthenticationManagerFactoryBean#0,org.springframework.security.authentication.ProviderManager#0,requestDataValueProcessor,org.springframework.security.web.csrf.HttpSessionCsrfTokenRepository#0,org.springframework.security.web.context.HttpSessionSecurityContextRepository#0,org.springframework.security.web.authentication.session.CompositeSessionAuthenticationStrategy#0,org.springframework.security.web.savedrequest.HttpSessionRequestCache#0,org.springframework.security.web.access.channel.ChannelDecisionManagerImpl#0,org.springframework.security.web.access.expression.DefaultWebSecurityExpressionHandler#0,org.springframework.security.access.vote.AffirmativeBased#0,org.springframework.security.web.access.intercept.FilterSecurityInterceptor#0,org.springframework.security.web.access.DefaultWebInvocationPrivilegeEvaluator#0,org.springframework.security.authentication.AnonymousAuthenticationProvider#0,org.springframework.security.web.authentication.www.BasicAuthenticationEntryPoint#0,org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter#0,org.springframework.security.userDetailsServiceFactory,org.springframework.security.web.DefaultSecurityFilterChain#0,org.springframework.security.authentication.DefaultAuthenticationEventPublisher#0,org.springframework.security.authenticationManager,customUserDetailsService,org.springframework.security.authentication.DefaultAuthenticationEventPublisher#1,userDetailsDao,org.springframework.security.authentication.DefaultAuthenticationEventPublisher#2,authenticationProvider,org.springframework.security.authentication.DefaultAuthenticationEventPublisher#3]; root of factory hierarchy 
Jul 27, 2016 4:17:01 PM org.springframework.jdbc.datasource.DriverManagerDataSource setDriverClassName 
INFO: Loaded JDBC driver: oracle.jdbc.OracleDriver 
Jul 27, 2016 4:17:01 PM org.springframework.security.web.access.channel.ChannelProcessingFilter afterPropertiesSet 
INFO: Validated configuration attributes 
Jul 27, 2016 4:17:01 PM org.springframework.security.web.DefaultSecurityFilterChain <init> 
INFO: Creating filter chain: [email protected]1, [org.spri[email protected]1eb620c, org.spring[email protected]7206ea, [email protected], org.[email protected]78f1a0, org.springframework.s[email protected]3f562f, org.springfram[email protected]334482, org.sp[email protected]1d6d6cf, org.springframework.[email protected]1b0d8fc, org.springfram[email protected]17599ab, o[email protected]1bbdb89, org[email protected]4a38ae, org.springfr[email protected]cf32f0] 
Jul 27, 2016 4:17:02 PM org.springframework.security.config.http.DefaultFilterChainValidator checkLoginPageIsntProtected 
INFO: Checking whether login URL '/login' is accessible with your configuration 
Jul 27, 2016 4:17:02 PM org.springframework.web.context.ContextLoader initWebApplicationContext 
INFO: Root WebApplicationContext: initialization completed in 1161 ms 
Jul 27, 2016 4:17:02 PM org.apache.catalina.core.ApplicationContext log 
INFO: Initializing Spring FrameworkServlet 'mvc-dispatcher' 
Jul 27, 2016 4:17:02 PM org.springframework.web.servlet.DispatcherServlet initServletBean 
INFO: FrameworkServlet 'mvc-dispatcher': initialization started 
Jul 27, 2016 4:17:02 PM org.springframework.web.context.support.XmlWebApplicationContext prepareRefresh 
INFO: Refreshing WebApplicationContext for namespace 'mvc-dispatcher-servlet': startup date [Wed Jul 27 16:17:02 IST 2016]; parent: Root WebApplicationContext 
Jul 27, 2016 4:17:02 PM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions 
INFO: Loading XML bean definitions from ServletContext resource [/WEB-INF/mvc-dispatcher-servlet.xml] 
Jul 27, 2016 4:17:02 PM org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons 
INFO: Pre-instantiating singletons in org.s[email protected]1f7a4f8: defining beans [mainController,org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.web.servlet.view.InternalResourceViewResolver#0,org.springframework.context.annotation.ConfigurationClassPostProcessor.importAwareProcessor]; parent: org.s[email protected]1bfcbd8 
Jul 27, 2016 4:17:02 PM org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping registerHandler 
INFO: Root mapping to handler 'mainController' 
Jul 27, 2016 4:17:02 PM org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping registerHandler 
INFO: Mapped URL path [/welcome**] onto handler 'mainController' 
Jul 27, 2016 4:17:02 PM org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping registerHandler 
INFO: Mapped URL path [/welcome**.*] onto handler 'mainController' 
Jul 27, 2016 4:17:02 PM org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping registerHandler 
INFO: Mapped URL path [/welcome**/] onto handler 'mainController' 
Jul 27, 2016 4:17:02 PM org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping registerHandler 
INFO: Mapped URL path [/admin**] onto handler 'mainController' 
Jul 27, 2016 4:17:02 PM org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping registerHandler 
INFO: Mapped URL path [/admin**.*] onto handler 'mainController' 
Jul 27, 2016 4:17:02 PM org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping registerHandler 
INFO: Mapped URL path [/admin**/] onto handler 'mainController' 
Jul 27, 2016 4:17:02 PM org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping registerHandler 
INFO: Mapped URL path [/login] onto handler 'mainController' 
Jul 27, 2016 4:17:02 PM org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping registerHandler 
INFO: Mapped URL path [/login.*] onto handler 'mainController' 
Jul 27, 2016 4:17:02 PM org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping registerHandler 
INFO: Mapped URL path [/login/] onto handler 'mainController' 
Jul 27, 2016 4:17:02 PM org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping registerHandler 
INFO: Mapped URL path [/403] onto handler 'mainController' 
Jul 27, 2016 4:17:02 PM org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping registerHandler 
INFO: Mapped URL path [/403.*] onto handler 'mainController' 
Jul 27, 2016 4:17:02 PM org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping registerHandler 
INFO: Mapped URL path [/403/] onto handler 'mainController' 
Jul 27, 2016 4:17:02 PM org.springframework.web.servlet.DispatcherServlet initServletBean 
INFO: FrameworkServlet 'mvc-dispatcher': initialization completed in 440 ms 
Jul 27, 2016 4:17:02 PM org.apache.catalina.loader.WebappClassLoader validateJarFile 
INFO: validateJarFile(C:\b2bAER_v1.0\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\LoginAttempt\WEB-kINF\lib\servlet-api-2.5.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class 
Jul 27, 2016 4:17:02 PM org.apache.coyote.http11.Http11Protocol start 
INFO: Starting Coyote HTTP/1.1 on http-8080 
Jul 27, 2016 4:17:02 PM org.apache.jk.common.ChannelSocket init 
INFO: JK: ajp13 listening on /0.0.0.0:8009 
Jul 27, 2016 4:17:02 PM org.apache.jk.server.JkMain start 
INFO: Jk running ID=0 time=0/15 config=null 
Jul 27, 2016 4:17:02 PM org.apache.catalina.startup.Catalina start 
INFO: Server startup in 5691 ms 
Jul 27, 2016 4:17:15 PM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions 
INFO: Loading XML bean definitions from class path resource [org/springframework/jdbc/support/sql-error-codes.xml] 
Jul 27, 2016 4:17:15 PM org.springframework.jdbc.support.SQLErrorCodesFactory <init> 
INFO: SQLErrorCodes loaded: [DB2, Derby, H2, HSQL, Informix, MS-SQL, MySQL, Oracle, PostgreSQL, Sybase] 
+0

あなたは、障害のスタックトレースを共有することはできますか? –

+0

-haim raman、上記コードのスタックトレースです –

+0

私には例外はありませんか? SQLErrorCodesはエラーの情報ではありませんか? –

答えて

0

私の推測では、CustomUserDetailsS​​erviceからのSQL文のいずれかが根本原因であることになります。

「INFO:SQLErrorCodes loaded:」というメッセージは、JdbcTemplateが例外をスローするためです。

はCustomUserDetailsS​​erviceまたはuserDetailsDaoは、あらゆる例外

嚥下されていない、私は次のことを確認することを確認してください:

  1. すべてのSQL文の構文は、データベース のコンテキストで正しく、スキーマ(データベース上で直接実行してみてください)。
  2. すべてのプレースホルダ(つまり「?」)は、コアになっています。希望スキーマ

を指し

  • データソース正しいユーザーに正しいSIDを指す 名も参照してください:
    spring security login not working with oracle
    Spring Security form login using database

  • +0

    jdbc-serviceを使用しても問題ありませんが、oracleデータベース接続用のカスタム・ユーザー・サービスを使用しています。Beanクラスを使用して接続する方法を開始から説明してください。 –

    関連する問題