2 lh602560308 lh602560308 于 2015.06.11 16:55 提问

ORA-01436: CONNECT BY loop in user data

初始化树形结构失败
用的是Groovy+grails
请大神出来帮帮我!

org.codehaus.groovy.grails.web.servlet.mvc.exceptions.ControllerExecutionException: Executing action [getTree] of controller [lggmr.analysis.ReadrateController] caused exception: Runtime error executing action
at org.codehaus.groovy.grails.web.servlet.mvc.AbstractGrailsControllerHelper.executeAction(AbstractGrailsControllerHelper.java:236) ~[grails-web-2.2.5.jar:2.2.5]
at org.codehaus.groovy.grails.web.servlet.mvc.AbstractGrailsControllerHelper.handleURI(AbstractGrailsControllerHelper.java:197) ~[grails-web-2.2.5.jar:2.2.5]
at org.codehaus.groovy.grails.web.servlet.mvc.AbstractGrailsControllerHelper.handleURI(AbstractGrailsControllerHelper.java:118) ~[grails-web-2.2.5.jar:2.2.5]
at org.codehaus.groovy.grails.web.servlet.mvc.SimpleGrailsController.handleRequest(SimpleGrailsController.java:72) ~[grails-web-2.2.5.jar:2.2.5]
at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48) ~[spring-webmvc-3.1.4.RELEASE.jar:3.1.4.RELEASE]
at org.codehaus.groovy.grails.web.servlet.GrailsDispatcherServlet.doDispatch(GrailsDispatcherServlet.java:328) ~[grails-web-2.2.5.jar:2.2.5]
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852) [spring-webmvc-3.1.4.RELEASE.jar:3.1.4.RELEASE]
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882) [spring-webmvc-3.1.4.RELEASE.jar:3.1.4.RELEASE]
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:789) [spring-webmvc-3.1.4.RELEASE.jar:3.1.4.RELEASE]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:647) [tomcat-embed-core-7.0.42.jar:7.0.42]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:728) [tomcat-embed-

3个回答

wa_tadie
wa_tadie   2015.06.11 17:02

这个问题太复杂了,我是来赚点的

edouardzyc
edouardzyc   2015.06.11 17:33

你的语句有问题
你获取树形数据 用了 CONNECT BY PRIOR ,但是出现循环,所以报这个错

frank_20080215
frank_20080215   2015.06.11 22:19

将第一条数据中的parent_id改为null,否则loop循环找parent_id就找不到了!

Csdn user default icon
上传中...
上传图片
插入图片