我正在研究Jhipster。今天我已将我们的项目移至最新版本,现在我在userResource上遇到异常。函数的一些正在处理此文件但是当我尝试使用facebook和google登录时获得异常。因为谷歌和Facebook都有没有密码的登录用户。
例外是
[ERROR] org.apache.catalina.core.ContainerBase.[Tomcat].[localhost].[/].[dispatcherServlet] - Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception
com.hazelcast.nio.serialization.HazelcastSerializationException: java.io.NotSerializableException: com.application.gom.web.rest.user.UserResource
at com.hazelcast.nio.serialization.SerializationServiceImpl.handleException(SerializationServiceImpl.java:295) ~[hazelcast-3.1.5.jar:3.1.5]
at com.hazelcast.nio.serialization.SerializationServiceImpl.toData(SerializationServiceImpl.java:194) ~[hazelcast-3.1.5.jar:3.1.5]
at com.hazelcast.nio.serialization.SerializationServiceImpl.toData(SerializationServiceImpl.java:157) ~[hazelcast-3.1.5.jar:3.1.5]
at com.hazelcast.web.SerializationHelper.toData(SerializationHelper.java:38) ~[hazelcast-wm-3.1.5.jar:3.1.5]
at com.hazelcast.web.WebFilter$HazelcastHttpSession.writeObject(WebFilter.java:508) ~[hazelcast-wm-3.1.5.jar:3.1.5]
at com.hazelcast.web.WebFilter$HazelcastHttpSession.access$1000(WebFilter.java:395) ~[hazelcast-wm-3.1.5.jar:3.1.5]
at com.hazelcast.web.WebFilter.doFilter(WebFilter.java:605) ~[hazelcast-wm-3.1.5.jar:3.1.5]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) ~[tomcat-embed-core-7.0.47.jar:7.0.47]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) ~[tomcat-embed-core-7.0.47.jar:7.0.47]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222) ~[tomcat-embed-core-7.0.47.jar:7.0.47]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123) [tomcat-embed-core-7.0.47.jar:7.0.47]
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502) [tomcat-embed-core-7.0.47.jar:7.0.47]
at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:680) [tomcat-embed-core-7.0.47.jar:7.0.47]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171) [tomcat-embed-core-7.0.47.jar:7.0.47]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100) [tomcat-embed-core-7.0.47.jar:7.0.47]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) [tomcat-embed-core-7.0.47.jar:7.0.47]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408) [tomcat-embed-core-7.0.47.jar:7.0.47]
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1041) [tomcat-embed-core-7.0.47.jar:7.0.47]
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:603) [tomcat-embed-core-7.0.47.jar:7.0.47]
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1721) [tomcat-embed-core-7.0.47.jar:7.0.47]
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1679) [tomcat-embed-core-7.0.47.jar:7.0.47]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [na:1.7.0_51]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [na:1.7.0_51]
at java.lang.Thread.run(Unknown Source) [na:1.7.0_51]
Caused by: java.io.NotSerializableException: com.application.gom.web.rest.user.UserResource
at java.io.ObjectOutputStream.writeObject0(Unknown Source) ~[na:1.7.0_51]
at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source) ~[na:1.7.0_51]
at java.io.ObjectOutputStream.writeSerialData(Unknown Source) ~[na:1.7.0_51]
at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source) ~[na:1.7.0_51]
at java.io.ObjectOutputStream.writeObject0(Unknown Source) ~[na:1.7.0_51]
at java.io.ObjectOutputStream.writeObject(Unknown Source) ~[na:1.7.0_51]
at java.util.ArrayList.writeObject(Unknown Source) ~[na:1.7.0_51]
at sun.reflect.GeneratedMethodAccessor330.invoke(Unknown Source) ~[na:na]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[na:1.7.0_51]
at java.lang.reflect.Method.invoke(Unknown Source) ~[na:1.7.0_51]
at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source) ~[na:1.7.0_51]
at java.io.ObjectOutputStream.writeSerialData(Unknown Source) ~[na:1.7.0_51]
at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source) ~[na:1.7.0_51]
at java.io.ObjectOutputStream.writeObject0(Unknown Source) ~[na:1.7.0_51]
at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source) ~[na:1.7.0_51]
at java.io.ObjectOutputStream.writeSerialData(Unknown Source) ~[na:1.7.0_51]
at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source) ~[na:1.7.0_51]
at java.io.ObjectOutputStream.writeObject0(Unknown Source) ~[na:1.7.0_51]
at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source) ~[na:1.7.0_51]
at java.io.ObjectOutputStream.writeSerialData(Unknown Source) ~[na:1.7.0_51]
at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source) ~[na:1.7.0_51]
at java.io.ObjectOutputStream.writeObject0(Unknown Source) ~[na:1.7.0_51]
at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source) ~[na:1.7.0_51]
at java.io.ObjectOutputStream.writeSerialData(Unknown Source) ~[na:1.7.0_51]
at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source) ~[na:1.7.0_51]
at java.io.ObjectOutputStream.writeObject0(Unknown Source) ~[na:1.7.0_51]
at java.io.ObjectOutputStream.writeObject(Unknown Source) ~[na:1.7.0_51]
at java.util.HashMap.writeObject(Unknown Source) ~[na:1.7.0_51]
at sun.reflect.GeneratedMethodAccessor328.invoke(Unknown Source) ~[na:na]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[na:1.7.0_51]
at java.lang.reflect.Method.invoke(Unknown Source) ~[na:1.7.0_51]
at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source) ~[na:1.7.0_51]
at java.io.ObjectOutputStream.writeSerialData(Unknown Source) ~[na:1.7.0_51]
at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source) ~[na:1.7.0_51]
at java.io.ObjectOutputStream.writeObject0(Unknown Source) ~[na:1.7.0_51]
at java.io.ObjectOutputStream.writeObject(Unknown Source) ~[na:1.7.0_51]
at com.hazelcast.nio.serialization.DefaultSerializers$ObjectSerializer.write(DefaultSerializers.java:204) ~[hazelcast-3.1.5.jar:3.1.5]
at com.hazelcast.nio.serialization.StreamSerializerAdapter.write(StreamSerializerAdapter.java:48) ~[hazelcast-3.1.5.jar:3.1.5]
at com.hazelcast.nio.serialization.SerializationServiceImpl.toData(SerializationServiceImpl.java:176) ~[hazelcast-3.1.5.jar:3.1.5]
... 22 common frames omitted
[ERROR] org.springframework.boot.actuate.web.BasicErrorController - com.hazelcast.nio.serialization.HazelcastSerializationException: java.io.NotSerializableException: com.application.gom.web.rest.user.UserResource
[ERROR] org.springframework.boot.actuate.web.BasicErrorController - com.hazelcast.nio.serialization.HazelcastSerializationException: java.io.NotSerializableException: com.application.gom.web.rest.user.UserResource
答案 0 :(得分:0)
初始项目我没有这个例外。
在0.11版本上进行的唯一更改是在getUser方法上添加@RolesAllowed(AuthoritiesConstants.ADMIN)注释。
你能尝试删除吗?