0

我在控制器中呈现返回 JSON 值:

 def index = {

        def g_resourcen = []
        def g_standorte = []


    def query = "from Resource as b where b.typ='MDLT' and b.varchar_1 <> '' order by b.name"

        Resource.findAll(query).each{


                g_standorte << [id:it.id, name:it.name, standorte: it.standorte]
                g_resourcen << [id:it.id, name:it.name, gruppe: it.resourcenGruppe]
            }

        println("1: ");
        println(g_resourcen);

        println("2: ")
        println(g_standorte);


        [  g_resourcen: g_resourcen as JSON, 
         g_standorte: g_standorte as JSON
     ]


    }

并像这样在客户端检索它:

 var g_standorte = dojo.fromJson('${g_standorte}');

g_resourcen 工作正常,但 g_standort 给出错误。我的代码中有多种情况,就像这个工作一样。但在这里我不断收到这个奇怪的错误:

Error 500: Error processing GroovyPageView: org.codehaus.groovy.grails.web.converters.exceptions.ConverterException: Error converting Bean with class sun.proxy.$Proxy15
Servlet: grails
URI: /etermin/grails/terminKorridor/index.dispatch
Exception Message: No signature of method: com.digithurst.global.utils.db.PostgresUtilities$_integerToSqlArray_closure17.doCall() is applicable for argument types: () values: [] Possible solutions: doCall(long, int, java.util.Map), call(), call([Ljava.lang.Object;), call(java.lang.Object), call(long, int, java.util.Map), equals(java.lang.Object) 
Caused by: Error processing GroovyPageView: org.codehaus.groovy.grails.web.converters.exceptions.ConverterException: Error converting Bean with class sun.proxy.$Proxy15 
Class: /WEB-INF/grails-app/views/terminKorridor/index.gsp 
At Line: [-1] 
Code Snippet:
4

0 回答 0