Je lance l'application Broadleaf Commerce en utilisant Oracle Database
et Tomcat 6 server
. J'ai suivi les étapes de ici J'ai apporté des modifications dans Persistence-admin.xml
, application_context-custom.xml
et pom.xml
pour Connecting to Oracle
et Tomcat
. L’application est active, mais lorsque j’essaie de me connecter à admin ou à la boutique, j’obtiens une erreur.
org.springframework.jdbc.UncategorizedSQLException: PreparedStatementCallback; uncategorized SQLException for SQL [SELECT USER_NAME,PASSWORD,'TRUE' FROM BLC_CUSTOMER WHERE USER_NAME=?]; SQL state [null]; error code [17059]; Fail to convert to internal representation; nested exception is Java.sql.SQLException: Fail to convert to internal representation
org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.Java:83)
org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.Java:80)
org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.Java:80)
org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.Java:602)
org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.Java:636)
org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.Java:665)
org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.Java:673)
org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.Java:713)
org.springframework.security.core.userdetails.jdbc.JdbcDaoImpl.loadUsersByUsername(JdbcDaoImpl.Java:189)
org.springframework.security.core.userdetails.jdbc.JdbcDaoImpl.loadUserByUsername(JdbcDaoImpl.Java:152)
org.broadleafcommerce.profile.service.LoginServiceImpl.loginCustomer(LoginServiceImpl.Java:25)
org.broadleafcommerce.profile.web.controller.RegisterCustomerController.registerCustomer(RegisterCustomerController.Java:75)
Sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
Sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.Java:39)
Sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.Java:25)
Java.lang.reflect.Method.invoke(Method.Java:597)
org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.Java:175)
org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.Java:421)
org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.Java:409)
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.Java:774)
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.Java:719)
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.Java:644)
org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.Java:560)
javax.servlet.http.HttpServlet.service(HttpServlet.Java:637)
javax.servlet.http.HttpServlet.service(HttpServlet.Java:717)
org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.Java:77)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.Java:76)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.Java:343)
org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.Java:109)
org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.Java:83)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.Java:355)
org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.Java:97)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.Java:355)
org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.Java:100)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.Java:355)
org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.Java:78)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.Java:355)
org.broadleafcommerce.profile.web.security.CustomerStateFilter.doFilter(CustomerStateFilter.Java:123)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.Java:355)
org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter.doFilter(RememberMeAuthenticationFilter.Java:112)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.Java:355)
org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.Java:54)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.Java:355)
org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.Java:35)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.Java:355)
org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.Java:177)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.Java:355)
org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.Java:187)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.Java:355)
org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.Java:105)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.Java:355)
org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.Java:79)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.Java:355)
org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.Java:149)
org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.Java:237)
org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.Java:167)
org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter.doFilterInternal(OpenEntityManagerInViewFilter.Java:113)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.Java:76)
root cause
Java.sql.SQLException: Fail to convert to internal representation
Oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.Java:125)
Oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.Java:162)
Oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.Java:227)
Oracle.jdbc.driver.CharCommonAccessor.getBigDecimal(CharCommonAccessor.Java:325)
Oracle.jdbc.driver.CharCommonAccessor.getBoolean(CharCommonAccessor.Java:158)
Oracle.jdbc.driver.OracleResultSetImpl.getBoolean(OracleResultSetImpl.Java:394)
org.Apache.commons.dbcp.DelegatingResultSet.getBoolean(DelegatingResultSet.Java:178)
org.springframework.security.core.userdetails.jdbc.JdbcDaoImpl$1.mapRow(JdbcDaoImpl.Java:193)
org.springframework.security.core.userdetails.jdbc.JdbcDaoImpl$1.mapRow(JdbcDaoImpl.Java:189)
org.springframework.jdbc.core.RowMapperResultSetExtractor.extractData(RowMapperResultSetExtractor.Java:92)
org.springframework.jdbc.core.RowMapperResultSetExtractor.extractData(RowMapperResultSetExtractor.Java:1)
org.springframework.jdbc.core.JdbcTemplate$1.doInPreparedStatement(JdbcTemplate.Java:648)
org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.Java:586)
org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.Java:636)
org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.Java:665)
org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.Java:673)
org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.Java:713)
org.springframework.security.core.userdetails.jdbc.JdbcDaoImpl.loadUsersByUsername(JdbcDaoImpl.Java:189)
org.springframework.security.core.userdetails.jdbc.JdbcDaoImpl.loadUserByUsername(JdbcDaoImpl.Java:152)
org.broadleafcommerce.profile.service.LoginServiceImpl.loginCustomer(LoginServiceImpl.Java:25)
org.broadleafcommerce.profile.web.controller.RegisterCustomerController.registerCustomer(RegisterCustomerController.Java:75)
Sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
Sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.Java:39)
Sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.Java:25)
Java.lang.reflect.Method.invoke(Method.Java:597)
org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.Java:175)
org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.Java:421)
org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.Java:409)
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.Java:774)
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.Java:719)
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.Java:644)
org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.Java:560)
javax.servlet.http.HttpServlet.service(HttpServlet.Java:637)
javax.servlet.http.HttpServlet.service(HttpServlet.Java:717)
org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.Java:77)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.Java:76)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.Java:343)
org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.Java:109)
org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.Java:83)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.Java:355)
org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.Java:97)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.Java:355)
org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.Java:100)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.Java:355)
org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.Java:78)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.Java:355)
org.broadleafcommerce.profile.web.security.CustomerStateFilter.doFilter(CustomerStateFilter.Java:123)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.Java:355)
org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter.doFilter(RememberMeAuthenticationFilter.Java:112)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.Java:355)
org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.Java:54)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.Java:355)
org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.Java:35)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.Java:355)
org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.Java:177)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.Java:355)
org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.Java:187)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.Java:355)
org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.Java:105)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.Java:355)
org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.Java:79)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.Java:355)
org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.Java:149)
org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.Java:237)
org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.Java:167)
org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter.doFilterInternal(OpenEntityManagerInViewFilter.Java:113)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.Java:76)
Quelqu'un peut-il m'aider?
Cela est probablement dû au fait que votre code (directement ou via Hibernate) tente de lire une valeur dans un jeu de résultats renvoyé et qu'il utilise un type incorrect (tel que getString (...) sur une valeur numérique). Assurez-vous que vous avez correctement configuré votre infrastructure ORM (ou ce que Broadleaf est) pour votre base de données Oracle. Surtout le dialecte, assurez-vous que c'est Oracle et pas une autre valeur.
Il s’agissait d’une ancienne version de Broadleaf qui n’avait pas été entièrement testée avec Oracle
. Un certain nombre de requêtes ont été modifiées dans les versions ultérieures pour assurer la compatibilité avec Oracle
et, si je me souviens bien, c'était l'une d'entre elles. Je crois que le problème vient du paramètre boolean
dans la requête:
select user_name,password,'TRUE' from blc_customer where user_name=?
Cette requête a été modifiée comme suit dans la version 1.6 et les versions suivantes:
select user_name,password,true from blc_customer where user_name=?
Cette modification de la configuration de la sécurité des clients Broadleaf devrait résoudre ce problème.