DEBUG [restartedMain] io.netty.util.internal.PlatformDependent0 (261)- direct buffer constructor: unavailable
java.lang.UnsupportedOperationException: Reflective setAccessible(true) disabled
at io.netty.util.internal.ReflectionUtil.trySetAccessible(ReflectionUtil.java:31)
at io.netty.util.internal.PlatformDependent0
4.
r
u
n
(
P
l
a
t
f
o
r
m
D
e
p
e
n
d
e
n
t
0.
j
a
v
a
:
233
)
a
t
j
a
v
a
.
b
a
s
e
/
j
a
v
a
.
s
e
c
u
r
i
t
y
.
A
c
c
e
s
s
C
o
n
t
r
o
l
l
e
r
.
d
o
P
r
i
v
i
l
e
g
e
d
(
N
a
t
i
v
e
M
e
t
h
o
d
)
a
t
i
o
.
n
e
t
t
y
.
u
t
i
l
.
i
n
t
e
r
n
a
l
.
P
l
a
t
f
o
r
m
D
e
p
e
n
d
e
n
t
0.
<
c
l
i
n
i
t
>
(
P
l
a
t
f
o
r
m
D
e
p
e
n
d
e
n
t
0.
j
a
v
a
:
227
)
a
t
i
o
.
n
e
t
t
y
.
u
t
i
l
.
i
n
t
e
r
n
a
l
.
P
l
a
t
f
o
r
m
D
e
p
e
n
d
e
n
t
.
i
s
A
n
d
r
o
i
d
(
P
l
a
t
f
o
r
m
D
e
p
e
n
d
e
n
t
.
j
a
v
a
:
289
)
a
t
i
o
.
n
e
t
t
y
.
u
t
i
l
.
i
n
t
e
r
n
a
l
.
P
l
a
t
f
o
r
m
D
e
p
e
n
d
e
n
t
.
<
c
l
i
n
i
t
>
(
P
l
a
t
f
o
r
m
D
e
p
e
n
d
e
n
t
.
j
a
v
a
:
92
)
a
t
i
o
.
n
e
t
t
y
.
u
t
i
l
.
H
a
s
h
e
d
W
h
e
e
l
T
i
m
e
r
.
<
i
n
i
t
>
(
H
a
s
h
e
d
W
h
e
e
l
T
i
m
e
r
.
j
a
v
a
:
109
)
a
t
i
o
.
n
e
t
t
y
.
u
t
i
l
.
H
a
s
h
e
d
W
h
e
e
l
T
i
m
e
r
.
<
i
n
i
t
>
(
H
a
s
h
e
d
W
h
e
e
l
T
i
m
e
r
.
j
a
v
a
:
218
)
a
t
i
o
.
n
e
t
t
y
.
u
t
i
l
.
H
a
s
h
e
d
W
h
e
e
l
T
i
m
e
r
.
<
i
n
i
t
>
(
H
a
s
h
e
d
W
h
e
e
l
T
i
m
e
r
.
j
a
v
a
:
197
)
a
t
i
o
.
n
e
t
t
y
.
u
t
i
l
.
H
a
s
h
e
d
W
h
e
e
l
T
i
m
e
r
.
<
i
n
i
t
>
(
H
a
s
h
e
d
W
h
e
e
l
T
i
m
e
r
.
j
a
v
a
:
179
)
a
t
i
o
.
n
e
t
t
y
.
u
t
i
l
.
H
a
s
h
e
d
W
h
e
e
l
T
i
m
e
r
.
<
i
n
i
t
>
(
H
a
s
h
e
d
W
h
e
e
l
T
i
m
e
r
.
j
a
v
a
:
163
)
a
t
i
o
.
l
e
t
t
u
c
e
.
c
o
r
e
.
r
e
s
o
u
r
c
e
.
D
e
f
a
u
l
t
C
l
i
e
n
t
R
e
s
o
u
r
c
e
s
.
<
i
n
i
t
>
(
D
e
f
a
u
l
t
C
l
i
e
n
t
R
e
s
o
u
r
c
e
s
.
j
a
v
a
:
167
)
a
t
i
o
.
l
e
t
t
u
c
e
.
c
o
r
e
.
r
e
s
o
u
r
c
e
.
D
e
f
a
u
l
t
C
l
i
e
n
t
R
e
s
o
u
r
c
e
s
4.run(PlatformDependent0.java:233) at java.base/java.security.AccessController.doPrivileged(Native Method) at io.netty.util.internal.PlatformDependent0.
at io.lettuce.core.resource.DefaultClientResources.create(DefaultClientResources.java:231)
at
在springboot2配置log4j2,在上篇中出错后解决后出现了debug级别的错误,虽说不影响运行,但是职业的强迫症犯了。
解决:
设置虚拟机参数如下
--add-opens java.base/jdk.internal.misc=ALL-UNNAMED
-Dio.netty.tryReflectionSetAccessible=true
--illegal-access=warn (选填)
在 CentOS 中的启动方式为:
nohup java -jar --add-opens java.base/jdk.internal.misc=ALL-UNNAMED -Dio.netty.tryReflectionSetAccessible=true



