我正在开发一个AngularJS Java Web应用程序,我正在重构现有的父pom以使用Java 8.
为此,我更改了所有Spring引用,将Spring物料清单用于4.1.2.RELEASE,将Jetty应用程序服务器更改为9.2.5.v20141112,全部用于Java 8兼容性。
在我调用URL获取最初的数据之前,几乎所有工作都正常。 URL被调用,并被委托(通过SpringMVC)到正确的代码,返回一些JSON。
出于调试目的,我调用的是返回简单JSON字符串[{“system”:“test”}]“
的testApp.do肯定会调用该方法,并返回预期的String。
然而在某个地方(不确定它是Spring,Jetty还是Jackson),我在堆栈中看到以下异常,并且永远不会分配返回值。
非常感谢任何建议
2014-11-19 09:57:04.371:WARN:oejs.ServletHandler:qtp1601800698-18: /MYCONTEXT/testApp.do
at org.codehaus.jackson.map.ser.BeanPropertyWriter._reportSelfReference(BeanPropertyWriter.java:491)
at org.codehaus.jackson.map.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:429)
...
at org.codehaus.jackson.map.ObjectMapper.writeValue(ObjectMapper.java:1604)
at org.springframework.web.servlet.view.json.MappingJacksonJsonView.writeContent(MappingJacksonJsonView.java:303)
...
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:852)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:837)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:800)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:118)
...
at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:344)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:261)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
at com.opensymphony.sitemesh.webapp.SiteMeshFilter.obtainContent(SiteMeshFilter.java:125)
at com.opensymphony.sitemesh.webapp.SiteMeshFilter.doFilter(SiteMeshFilter.java:76)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
...
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:540)
at java.lang.Thread.run(Thread.java:745)