Severe: Exception Processing errorpage [exceptiontype = Java. lang. throwable, location =/500.jsp] Java. lang. illegalstateexceptionat Org. apache. coyote. response. reset (response. java: 297) at Org. apache. catalina. connector. response. reset (response. java: 652) at Org. apache. catalina. connector. response. reset (response. java: 916) at Org. apache. catalina. core. standardhostvalve. custom (standardhostvalve. java: 417) at Org. apache. catalina. core. standardhostvalve. throwable (standardhostvalve. java: 271) at Org. apache. catalina. core. standardhostvalve. invoke (standardhostvalve. java: 142) at Org. apache. catalina. valves. errorreportvalve. invoke (errorreportvalve. java: 102) at Org. apache. catalina. core. standardenginevalve. invoke (standardenginevalve. java: 109) at Org. apache. catalina. connector. coyoteadapter. service (coyoteadapter. java: 263) at Org. apache. coyote. http11.http11processor. process (http11processor. java: 844) at Org. apache. coyote. http11.http11protocol $ http11connectionhandler. process (http11protocol. java: 584) at org.apache.tomcat.util.net. jioendpoint $ worker. run (jioendpoint. java: 447) at java. lang. thread. run (thread. java: 619)
Two-way Association is converted to JSON. because both sides are associated, an endless loop is formed. Add the following annotations to the object:
@ Entity
@ Table (name = "t_dl_urbandetectunit ")
@ Jsonignoreproperties (value = {"urbanroadinfo "})
/*@ManyToOne(cascade=CascadeType.ALL)@JoinColumn(name="URBANID")public UrbanRoadInfo getUrbanRoadInfo() {return urbanRoadInfo;}public void setUrbanRoadInfo(UrbanRoadInfo urbanRoadInfo) {this.urbanRoadInfo = urbanRoadInfo;}*/
Then urbanroadinfo is not included in the JSON string.