尝试从 docker 上发布的 Neo4jRepository 检索数据时出现 Neo4jSession 错误[ONLY DOCKER ISSUE]
Posted
技术标签:
【中文标题】尝试从 docker 上发布的 Neo4jRepository 检索数据时出现 Neo4jSession 错误[ONLY DOCKER ISSUE]【英文标题】:Neo4jSession Error when trying to retrieve data from Neo4jRepository published on docker[ONLY DOCKER ISSUE] 【发布时间】:2019-09-23 19:15:27 【问题描述】:我正在使用 docker 发布带有 neo4j 和 mssql 数据库的 spring-boot 应用程序。
我在尝试从 Neoj4Repository 检索数据时遇到异常 500:Internal Server Error,但是仅当应用程序在 docker 上发布时才会发生异常。当我在 Intellij Idea 中启动 spring-boot 应用程序时,一切都很好。当它发布到 docker-compose Neo4jRepository Optional findById() 抛出 NullPointerException 和其他方法 CollectionfindFriendsById() 抛出 ArrayIndexBoundException。此外,当我试图在 Neo4jBrowser http://localhost:7474/browser/ 中查找我的数据时 - 它工作得很好。我看到我的数据库中的所有数据,除了每个查询都是成功的。我附上了代码和配置文件。如果您能帮我解决我的麻烦,我将不胜感激。请不要犹豫,给我任何想法。非常感谢。
我尝试在 docker-compose 中将 neo4j 数据库与我的应用程序实例一起使用。
[已编辑]: 据我了解,spring-boot-app 整体上看不到 neo4j 服务器。但是应用程序与 mssql 成功通信,它们都在本地主机上。
我的 docker-compose.yaml 文件:
version: '3'
services:
docker-neo4j:
image: neo4j:3.5.5
ports:
- "7474:7474"
- "7687:7687"
volumes:
- /var/lib/neo4j/data:/data
- /var/lib/neo4j/logs:/logs
docker-current-app:
image: current:latest
depends_on:
- docker-neo4j
build:
context: ./
dockerfile: Dockerfile
volumes:
- /usr/app/springboot-docker-compose-app
network_mode: host
environment:
- JWT_SECRET=
- JWT_EXPIRATION_TIME_MS=
应用程序的 DockerFile
FROM openjdk:8-jdk-alpine
COPY ./target/current-*.jar /usr/app/current-build.jar
WORKDIR /usr/app
ENTRYPOINT ["java","-jar","current-build.jar"]
application.properties 文件
spring.datasource.url=jdbc:sqlserver://localhost;database=dbForMe
spring.datasource.username=SA
spring.datasource.password=password
spring.jpa.hibernate.ddl-auto=none
spring.data.neo4j.uri=bolt://localhost
spring.data.neo4j.username=neo4j
spring.data.neo4j.password=password
存储库/服务/控制器
@Repository
public interface Neo4jUserRepository extends Neo4jRepository<NeoUser, Long>
Optional<NeoUser> findByUuid(String userId);
@Query("MATCH (u:User uuid : itemId)<-[:REQUEST]-(u2:User) RETURN u2")
Collection<NeoUser> findRequestsById(@Param("itemId") String userId);
@Query("MATCH (u:User uuid:itemId)-[:FRIENDS]-(u2:User) RETURN u2")
Collection<NeoUser> findFriendsById(@Param("itemId") String userId);
@Service
public class RelationshipsService
private static final Logger log = LoggerFactory.getLogger(RelationshipsService.class.getName());
private final Neo4jUserRepository userRepository;
public RelationshipsService(Neo4jUserRepository userRepository)
this.userRepository = userRepository;
public List<UserPreview> getReceivedRequests(String userId)
log.info("Getting requests for itemId ", userId);
return userRepository.findRequestsById(userId).stream()
.map(this::toUserPreview)
.collect(Collectors.toList());
public List<UserPreview> getFriends(String userId)
log.info("Getting friends for itemId ", userId);
return userRepository.findFriendsById(userId).stream()
.map(this::toUserPreview)
.collect(Collectors.toList());
@RestController
@RequestMapping("/relationships")
public class RelationshipController
private final RelationshipsService service;
public RelationshipController(RelationshipsService service)
this.service = service;
@GetMapping("/getFriends/userId")
public List<UserPreview> getFriends(@PathVariable String userId)
return service.getFriends(userId);
@GetMapping("/getRequests/userId")
public List<UserPreview> getReceivedRequests(@PathVariable String userId)
return service.getReceivedRequests(userId);
pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.1.RELEASE</version>
<relativePath/>
</parent>
<groupId>artem.bashtovyi</groupId>
<artifactId>current</artifactId>
<version>0.0.1</version>
<name>current</name>
<description>Demo project</description>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.microsoft.sqlserver</groupId>
<artifactId>mssql-jdbc</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt</artifactId>
<version>0.2</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-neo4j</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<compilerArgs>
<arg>-parameters</arg>
</compilerArgs>
</configuration>
</plugin>
</plugins>
</build>
</project>
docker-current-app_1 | 2019-05-05 20:33:43.684 INFO 1 --- [nio-8080-exec-1] c.b.c.service.RelationshipsService : Getting requests for itemId ff80818169ae57130169b0d4661f0002
docker-current-app_1 | 2019-05-05 20:33:43.965 INFO 1 --- [nio-8080-exec-1] Driver : Direct driver instance 1518060028 created for server address localhost:7687
docker-current-app_1 | 2019-05-05 20:33:44.829 WARN 1 --- [nio-8080-exec-1] org.neo4j.ogm.session.Neo4jSession : Error executing query : 0. Rolling back transaction.
docker-current-app_1 | 2019-05-05 20:33:44.865 ERROR 1 --- [nio-8080-exec-1] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is java.lang.ArrayIndexOutOfBoundsException: 0] with root cause
docker-current-app_1 |
docker-current-app_1 | java.lang.ArrayIndexOutOfBoundsException: 0
docker-current-app_1 | at org.neo4j.ogm.context.EntityRowModelMapper.extractColumnValue(EntityRowModelMapper.java:75) ~[neo4j-ogm-core-3.1.6.jar!/:3.1.6]
docker-current-app_1 | at org.neo4j.ogm.context.EntityRowModelMapper.map(EntityRowModelMapper.java:64) ~[neo4j-ogm-core-3.1.6.jar!/:3.1.6]
docker-current-app_1 | at org.neo4j.ogm.session.delegates.ExecuteQueriesDelegate.lambda$executeAndMap$1(ExecuteQueriesDelegate.java:133) ~[neo4j-ogm-core-3.1.6.jar!/:3.1.6]
docker-current-app_1 | at org.neo4j.ogm.session.Neo4jSession.doInTransaction(Neo4jSession.java:579) ~[neo4j-ogm-core-3.1.6.jar!/:3.1.6]
docker-current-app_1 | at org.neo4j.ogm.session.Neo4jSession.doInTransaction(Neo4jSession.java:558) ~[neo4j-ogm-core-3.1.6.jar!/:3.1.6]
docker-current-app_1 | at org.neo4j.ogm.session.delegates.ExecuteQueriesDelegate.executeAndMap(ExecuteQueriesDelegate.java:124) ~[neo4j-ogm-core-3.1.6.jar!/:3.1.6]
docker-current-app_1 | at org.neo4j.ogm.session.delegates.ExecuteQueriesDelegate.query(ExecuteQueriesDelegate.java:94) ~[neo4j-ogm-core-3.1.6.jar!/:3.1.6]
docker-current-app_1 | at org.neo4j.ogm.session.Neo4jSession.query(Neo4jSession.java:413) ~[neo4j-ogm-core-3.1.6.jar!/:3.1.6]
docker-current-app_1 | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_111-internal]
docker-current-app_1 | at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_111-internal]
docker-current-app_1 | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_111-internal]
docker-current-app_1 | at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_111-internal]
docker-current-app_1 | at org.springframework.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:246) ~[spring-core-5.1.4.RELEASE.jar!/:5.1.4.RELEASE]
docker-current-app_1 | at org.springframework.data.neo4j.transaction.SharedSessionCreator$SharedSessionInvocationHandler.lambda$invoke$0(SharedSessionCreator.java:108) ~[spring-data-neo4j-5.1.4.RELEASE.jar!/:5.1.4.RELEASE]
docker-current-app_1 | at org.springframework.data.neo4j.transaction.SharedSessionCreator$SharedSessionInvocationHandler.invokeInTransaction(SharedSessionCreator.java:139) ~[spring-data-neo4j-5.1.4.RELEASE.jar!/:5.1.4.RELEASE]
docker-current-app_1 | at org.springframework.data.neo4j.transaction.SharedSessionCreator$SharedSessionInvocationHandler.invoke(SharedSessionCreator.java:110) ~[spring-data-neo4j-5.1.4.RELEASE.jar!/:5.1.4.RELEASE]
docker-current-app_1 | at com.sun.proxy.$Proxy127.query(Unknown Source) ~[na:na]
docker-current-app_1 | at org.springframework.data.neo4j.repository.query.GraphQueryExecution$CollectionExecution.execute(GraphQueryExecution.java:96) ~[spring-data-neo4j-5.1.4.RELEASE.jar!/:5.1.4.RELEASE]
docker-current-app_1 | at org.springframework.data.neo4j.repository.query.GraphRepositoryQuery.doExecute(GraphRepositoryQuery.java:92) ~[spring-data-neo4j-5.1.4.RELEASE.jar!/:5.1.4.RELEASE]
docker-current-app_1 | at org.springframework.data.neo4j.repository.query.AbstractGraphRepositoryQuery.execute(AbstractGraphRepositoryQuery.java:57) ~[spring-data-neo4j-5.1.4.RELEASE.jar!/:5.1.4.RELEASE]
docker-current-app_1 | at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.doInvoke(RepositoryFactorySupport.java:605) ~[spring-data-commons-2.1.4.RELEASE.jar!/:2.1.4.RELEASE]
docker-current-app_1 | at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.lambda$invoke$3(RepositoryFactorySupport.java:595) ~[spring-data-commons-2.1.4.RELEASE.jar!/:2.1.4.RELEASE]
docker-current-app_1 | at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.invoke(RepositoryFactorySupport.java:595) ~[spring-data-commons-2.1.4.RELEASE.jar!/:2.1.4.RELEASE]
docker-current-app_1 | at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.1.4.RELEASE.jar!/:5.1.4.RELEASE]
docker-current-app_1 | at org.springframework.data.projection.DefaultMethodInvokingMethodInterceptor.invoke(DefaultMethodInvokingMethodInterceptor.java:59) ~[spring-data-commons-2.1.4.RELEASE.jar!/:2.1.4.RELEASE]
docker-current-app_1 | at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.1.4.RELEASE.jar!/:5.1.4.RELEASE]
docker-current-app_1 | at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:294) ~[spring-tx-5.1.4.RELEASE.jar!/:5.1.4.RELEASE]
docker-current-app_1 | at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:98) ~[spring-tx-5.1.4.RELEASE.jar!/:5.1.4.RELEASE]
docker-current-app_1 | at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.1.4.RELEASE.jar!/:5.1.4.RELEASE]
docker-current-app_1 | at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:139) ~[spring-tx-5.1.4.RELEASE.jar!/:5.1.4.RELEASE]
docker-current-app_1 | at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.1.4.RELEASE.jar!/:5.1.4.RELEASE]
docker-current-app_1 | at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:93) ~[spring-aop-5.1.4.RELEASE.jar!/:5.1.4.RELEASE]
docker-current-app_1 | at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.1.4.RELEASE.jar!/:5.1.4.RELEASE]
docker-current-app_1 | at org.springframework.data.repository.core.support.SurroundingTransactionDetectorMethodInterceptor.invoke(SurroundingTransactionDetectorMethodInterceptor.java:61) ~[spring-data-commons-2.1.4.RELEASE.jar!/:2.1.4.RELEASE]
docker-current-app_1 | at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.1.4.RELEASE.jar!/:5.1.4.RELEASE]
docker-current-app_1 | at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212) ~[spring-aop-5.1.4.RELEASE.jar!/:5.1.4.RELEASE]
docker-current-app_1 | at com.sun.proxy.$Proxy133.findRequestsById(Unknown Source) ~[na:na]
docker-current-app_1 | at com.bashtovyi.current.service.RelationshipsService.getReceivedRequests(RelationshipsService.java:40) ~[classes!/:0.0.1]
docker-current-app_1 | at com.bashtovyi.current.controller.RelationshipController.getReceivedRequests(RelationshipController.java:39) ~[classes!/:0.0.1]
docker-current-app_1 | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_111-internal]
docker-current-app_1 | at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_111-internal]
docker-current-app_1 | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_111-internal]
docker-current-app_1 | at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_111-internal]
docker-current-app_1 | at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:189) ~[spring-web-5.1.4.RELEASE.jar!/:5.1.4.RELEASE]
docker-current-app_1 | at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:138) ~[spring-web-5.1.4.RELEASE.jar!/:5.1.4.RELEASE]
docker-current-app_1 | at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:102) ~[spring-webmvc-5.1.4.RELEASE.jar!/:5.1.4.RELEASE]
docker-current-app_1 | at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895) ~[spring-webmvc-5.1.4.RELEASE.jar!/:5.1.4.RELEASE]
docker-current-app_1 | at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:800) ~[spring-webmvc-5.1.4.RELEASE.jar!/:5.1.4.RELEASE]
docker-current-app_1 | at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87) ~[spring-webmvc-5.1.4.RELEASE.jar!/:5.1.4.RELEASE]
docker-current-app_1 | at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1038) ~[spring-webmvc-5.1.4.RELEASE.jar!/:5.1.4.RELEASE]
docker-current-app_1 | at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:942) ~[spring-webmvc-5.1.4.RELEASE.jar!/:5.1.4.RELEASE]
docker-current-app_1 | at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1005) ~[spring-webmvc-5.1.4.RELEASE.jar!/:5.1.4.RELEASE]
docker-current-app_1 | at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:897) ~[spring-webmvc-5.1.4.RELEASE.jar!/:5.1.4.RELEASE]
docker-current-app_1 | at javax.servlet.http.HttpServlet.service(HttpServlet.java:634) ~[tomcat-embed-core-9.0.14.jar!/:9.0.14]
docker-current-app_1 | at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:882) ~[spring-webmvc-5.1.4.RELEASE.jar!/:5.1.4.RELEASE]
docker-current-app_1 | at javax.servlet.http.HttpServlet.service(HttpServlet.java:741) ~[tomcat-embed-core-9.0.14.jar!/:9.0.14]
docker-current-app_1 | at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) ~[tomcat-embed-core-9.0.14.jar!/:9.0.14]
docker-current-app_1 | at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.14.jar!/:9.0.14]
docker-current-app_1 | at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) ~[tomcat-embed-websocket-9.0.14.jar!/:9.0.14]
docker-current-app_1 | at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.14.jar!/:9.0.14]
docker-current-app_1 | at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.14.jar!/:9.0.14]
docker-current-app_1 | at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:101) ~[spring-web-5.1.4.RELEASE.jar!/:5.1.4.RELEASE]
docker-current-app_1 | at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.14.jar!/:9.0.14]
docker-current-app_1 | at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.14.jar!/:9.0.14]
docker-current-app_1 | at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:320) ~[spring-security-web-5.1.3.RELEASE.jar!/:5.1.3.RELEASE]
docker-current-app_1 | at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:127) ~[spring-security-web-5.1.3.RELEASE.jar!/:5.1.3.RELEASE]
docker-current-app_1 | at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:91) ~[spring-security-web-5.1.3.RELEASE.jar!/:5.1.3.RELEASE]
docker-current-app_1 | at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) ~[spring-security-web-5.1.3.RELEASE.jar!/:5.1.3.RELEASE]
docker-current-app_1 | at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:119) ~[spring-security-web-5.1.3.RELEASE.jar!/:5.1.3.RELEASE]
docker-current-app_1 | at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) ~[spring-security-web-5.1.3.RELEASE.jar!/:5.1.3.RELEASE]
docker-current-app_1 | at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:137) ~[spring-security-web-5.1.3.RELEASE.jar!/:5.1.3.RELEASE]
docker-current-app_1 | at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) ~[spring-security-web-5.1.3.RELEASE.jar!/:5.1.3.RELEASE]
docker-current-app_1 | at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:111) ~[spring-security-web-5.1.3.RELEASE.jar!/:5.1.3.RELEASE]
docker-current-app_1 | at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) ~[spring-security-web-5.1.3.RELEASE.jar!/:5.1.3.RELEASE]
docker-current-app_1 | at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:170) ~[spring-security-web-5.1.3.RELEASE.jar!/:5.1.3.RELEASE]
docker-current-app_1 | at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) ~[spring-security-web-5.1.3.RELEASE.jar!/:5.1.3.RELEASE]
docker-current-app_1 | at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63) ~[spring-security-web-5.1.3.RELEASE.jar!/:5.1.3.RELEASE]
docker-current-app_1 | at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) ~[spring-security-web-5.1.3.RELEASE.jar!/:5.1.3.RELEASE]
docker-current-app_1 | at com.bashtovyi.current.custom.token.JwtAuthFilter.doFilterInternal(JwtAuthFilter.java:52) ~[classes!/:0.0.1]
docker-current-app_1 | at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-5.1.4.RELEASE.jar!/:5.1.4.RELEASE]
docker-current-app_1 | at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) ~[spring-security-web-5.1.3.RELEASE.jar!/:5.1.3.RELEASE]
docker-current-app_1 | at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:116) ~[spring-security-web-5.1.3.RELEASE.jar!/:5.1.3.RELEASE]
docker-current-app_1 | at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) ~[spring-security-web-5.1.3.RELEASE.jar!/:5.1.3.RELEASE]
docker-current-app_1 | at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:96) ~[spring-web-5.1.4.RELEASE.jar!/:5.1.4.RELEASE]
docker-current-app_1 | at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-5.1.4.RELEASE.jar!/:5.1.4.RELEASE]
docker-current-app_1 | at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) ~[spring-security-web-5.1.3.RELEASE.jar!/:5.1.3.RELEASE]
docker-current-app_1 | at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:74) ~[spring-security-web-5.1.3.RELEASE.jar!/:5.1.3.RELEASE]
docker-current-app_1 | at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-5.1.4.RELEASE.jar!/:5.1.4.RELEASE]
docker-current-app_1 | at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) ~[spring-security-web-5.1.3.RELEASE.jar!/:5.1.3.RELEASE]
docker-current-app_1 | at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:105) ~[spring-security-web-5.1.3.RELEASE.jar!/:5.1.3.RELEASE]
docker-current-app_1 | at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) ~[spring-security-web-5.1.3.RELEASE.jar!/:5.1.3.RELEASE]
docker-current-app_1 | at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:56) ~[spring-security-web-5.1.3.RELEASE.jar!/:5.1.3.RELEASE]
docker-current-app_1 | at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-5.1.4.RELEASE.jar!/:5.1.4.RELEASE]
docker-current-app_1 | at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) ~[spring-security-web-5.1.3.RELEASE.jar!/:5.1.3.RELEASE]
docker-current-app_1 | at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:215) ~[spring-security-web-5.1.3.RELEASE.jar!/:5.1.3.RELEASE]
docker-current-app_1 | at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:178) ~[spring-security-web-5.1.3.RELEASE.jar!/:5.1.3.RELEASE]
docker-current-app_1 | at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:357) ~[spring-web-5.1.4.RELEASE.jar!/:5.1.4.RELEASE]
docker-current-app_1 | at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:270) ~[spring-web-5.1.4.RELEASE.jar!/:5.1.4.RELEASE]
docker-current-app_1 | at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.14.jar!/:9.0.14]
docker-current-app_1 | at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.14.jar!/:9.0.14]
docker-current-app_1 | at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99) ~[spring-web-5.1.4.RELEASE.jar!/:5.1.4.RELEASE]
docker-current-app_1 | at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-5.1.4.RELEASE.jar!/:5.1.4.RELEASE]
docker-current-app_1 | at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.14.jar!/:9.0.14]
docker-current-app_1 | at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.14.jar!/:9.0.14]
docker-current-app_1 | at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:92) ~[spring-web-5.1.4.RELEASE.jar!/:5.1.4.RELEASE]
docker-current-app_1 | at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-5.1.4.RELEASE.jar!/:5.1.4.RELEASE]
docker-current-app_1 | at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.14.jar!/:9.0.14]
docker-current-app_1 | at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.14.jar!/:9.0.14]
docker-current-app_1 | at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:93) ~[spring-web-5.1.4.RELEASE.jar!/:5.1.4.RELEASE]
docker-current-app_1 | at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-5.1.4.RELEASE.jar!/:5.1.4.RELEASE]
docker-current-app_1 | at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.14.jar!/:9.0.14]
docker-current-app_1 | at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.14.jar!/:9.0.14]
docker-current-app_1 | at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:200) ~[spring-web-5.1.4.RELEASE.jar!/:5.1.4.RELEASE]
docker-current-app_1 | at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-5.1.4.RELEASE.jar!/:5.1.4.RELEASE]
docker-current-app_1 | at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-9.0.14.jar!/:9.0.14]
docker-current-app_1 | at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-9.0.14.jar!/:9.0.14]
docker-current-app_1 | at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199) ~[tomcat-embed-core-9.0.14.jar!/:9.0.14]
docker-current-app_1 | at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) [tomcat-embed-core-9.0.14.jar!/:9.0.14]
docker-current-app_1 | at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490) [tomcat-embed-core-9.0.14.jar!/:9.0.14]
docker-current-app_1 | at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139) [tomcat-embed-core-9.0.14.jar!/:9.0.14]
docker-current-app_1 | at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) [tomcat-embed-core-9.0.14.jar!/:9.0.14]
docker-current-app_1 | at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74) [tomcat-embed-core-9.0.14.jar!/:9.0.14]
【问题讨论】:
【参考方案1】:我遇到了同样的问题。该服务器似乎有一些旧的 Oracle JDK。当我安装更新的 OpenJDK 包(更改为 1.8.0_141 -> 1.8.0_222)时,问题就消失了。
【讨论】:
以上是关于尝试从 docker 上发布的 Neo4jRepository 检索数据时出现 Neo4jSession 错误[ONLY DOCKER ISSUE]的主要内容,如果未能解决你的问题,请参考以下文章
从 docker 主机外部远程连接到在 docker 容器上运行的 oracle 数据库