提示租户不存在。000000

Blade 未结 1 258
153934475
153934475 2024-09-26 10:42

一、该问题的重现步骤是什么?

1. 

Execute SQL : select * from blade_user where tenant_id = '000000' and account = 'admin' and status = 1 and is_deleted = 0

Execute Time: 1.946ms

==============  Sql  End   ==============


2024-09-25 21:27:51.616  INFO 51548 --- [  XNIO-1 task-2] o.s.core.mp.plugins.SqlLogInterceptor    : 


==============  Sql Start  ==============

Execute SQL : select role_alias from blade_role where id in (1123598816738675201) and is_deleted = 0

Execute Time: 1.969ms

==============  Sql  End   ==============


2024-09-25 21:27:51.625  INFO 51548 --- [  XNIO-1 task-2] o.s.core.mp.plugins.SqlLogInterceptor    : 


==============  Sql Start  ==============

Execute SQL : select id, user_id, user_ext, status, is_deleted from blade_user_web where is_deleted = 0 and user_id = 1123598821738675201

Execute Time: 4.624ms

==============  Sql  End   ==============


2024-09-25 21:27:51.641  INFO 51548 --- [  XNIO-1 task-2] o.s.core.mp.plugins.SqlLogInterceptor    : 


==============  Sql Start  ==============

Execute SQL : select id, client_id, client_secret, resource_ids, scope , authorized_grant_types, web_server_redirect_uri, authorities, access_token_validity, refresh_token_validity , additional_information, autoapprove from blade_client where client_id = 'saber3'

Execute Time: 3.595ms

==============  Sql  End   ==============


java.lang.RuntimeException: Reading from a byte array threw an IOException (should never happen).

at io.protostuff.IOUtil.mergeFrom(IOUtil.java:54)

at io.protostuff.ProtobufIOUtil.mergeFrom(ProtobufIOUtil.java:103)

at org.springblade.core.redis.serializer.ProtoStuffSerializer.deserialize(ProtoStuffSerializer.java:68)

at org.springframework.data.redis.serializer.DefaultRedisElementReader.read(DefaultRedisElementReader.java:46)

at org.springframework.data.redis.serializer.RedisSerializationContext$SerializationPair.read(RedisSerializationContext.java:277)

at org.springframework.data.redis.cache.RedisCache.deserializeCacheValue(RedisCache.java:390)

at org.springframework.data.redis.cache.RedisCache.lookup(RedisCache.java:209)

at org.springframework.cache.support.AbstractValueAdaptingCache.get(AbstractValueAdaptingCache.java:58)

at org.springblade.core.cache.utils.CacheUtil.get(CacheUtil.java:219)

at org.springblade.common.cache.SysCache.getTenant(SysCache.java:316)

at org.springblade.modules.auth.handler.BladeAuthorizationHandler.validateTenant(BladeAuthorizationHandler.java:125)

at org.springblade.modules.auth.handler.BladeAuthorizationHandler.authValidation(BladeAuthorizationHandler.java:77)

at org.springblade.core.oauth2.endpoint.OAuth2TokenEndPoint.token(OAuth2TokenEndPoint.java:105)

at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)

at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.base/java.lang.reflect.Method.invoke(Method.java:568)

at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:255)

at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:188)

at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:118)

at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:926)

at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:831)

at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)

at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1089)

at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:979)

at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1014)

at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:914)

at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:547)

at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:885)

at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:614)

at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:74)

at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:129)

at org.springblade.core.log.filter.LogTraceFilter.doFilter(LogTraceFilter.java:48)

at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:67)

at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)

at org.springblade.core.boot.request.BladeRequestFilter.doFilter(BladeRequestFilter.java:67)

at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:67)

at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)

at com.alibaba.druid.support.jakarta.WebStatFilter.doFilter(WebStatFilter.java:113)

at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:67)

at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)

at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100)

at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)

at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:67)

at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)

at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93)

at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)

at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:67)

at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)

at org.springframework.session.web.http.SessionRepositoryFilter.doFilterInternal(SessionRepositoryFilter.java:142)

at org.springframework.session.web.http.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:82)

at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:352)

at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:268)

at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:67)

at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)

at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)

at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)

at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:67)

at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)

at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84)

at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)

at io.undertow.servlet.handlers.ServletChain$1.handleRequest(ServletChain.java:68)

at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)

at io.undertow.servlet.handlers.RedirectDirHandler.handleRequest(RedirectDirHandler.java:68)

at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:117)

at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)

at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)

at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)

at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64)

at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60)

at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77)

at io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43)

at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)

at io.undertow.servlet.handlers.SendErrorPageHandler.handleRequest(SendErrorPageHandler.java:52)

at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)

at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:276)

at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:135)

at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:132)

at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48)

at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)

at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:256)

at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:101)

at io.undertow.server.Connectors.executeRootHandler(Connectors.java:393)

at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:859)

at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)

at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2513)

at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1538)

at org.xnio.XnioWorker$WorkerThreadFactory$1$1.run(XnioWorker.java:1282)

at java.base/java.lang.Thread.run(Thread.java:833)

Caused by: io.protostuff.ProtostuffException: Corrupt input.

at io.protostuff.runtime.ObjectSchema.readObjectFrom(ObjectSchema.java:708)

at io.protostuff.runtime.ObjectSchema.mergeFrom(ObjectSchema.java:351)

at io.protostuff.ByteArrayInput.mergeObject(ByteArrayInput.java:503)

at io.protostuff.runtime.RuntimeUnsafeFieldFactory$15$1.mergeFrom(RuntimeUnsafeFieldFactory.java:1229)

at io.protostuff.runtime.RuntimeSchema.mergeFrom(RuntimeSchema.java:466)

at io.protostuff.IOUtil.mergeFrom(IOUtil.java:45)

... 88 more

2024-09-25 21:28:58.994 ERROR 51548 --- [  XNIO-1 task-2] o.s.m.a.h.BladeAuthorizationHandler      : 用户:admin,认证失败,失败原因:用户租户不存在

2. 数据库默认建立,也有这个租户信息image.png

3.


二、你期待的结果是什么?实际看到的又是什么?


三、你正在使用的是什么产品,什么版本?在什么操作系统上?

baladex boot,   v4.1.0,windows 11

四、请提供详细的错误堆栈信息,这很重要。


五、若有更多详细信息,请在下面提供。


1条回答
  •  admin
    admin (楼主)
    2024-09-26 11:52

    清redis缓存后再登录

    0 讨论(0)
提交回复