Closed ahonor closed 12 years ago
A server error page is thrown when attempting to create a childNode.
Example:
curl --verbose --request POST --header "Content-Type: application/json" -d "{relationshipName:'parent_child_test',parent:'1',child:'5'}" http://localhost:8080/api/childNode/none --cookie cookies.txt
Result:
* About to connect() to localhost port 8080 (#0) * Trying ::1... connected * Connected to localhost (::1) port 8080 (#0) > POST /api/childNode/none HTTP/1.1 > User-Agent: curl/7.21.2 (x86_64-apple-darwin10.5.0) libcurl/7.21.2 OpenSSL/1.0.0c zlib/1.2.6 libidn/1.19 > Host: localhost:8080 > Accept: */* > Cookie: JSESSIONID=D8903A17887303AEC13D6E24F2CA1B11 > Content-Type: application/json > Content-Length: 59 > < HTTP/1.1 500 Internal Server Error < Server: Apache-Coyote/1.1 < Content-Type: text/html;charset=UTF-8 < Content-Language: en-US < Transfer-Encoding: chunked < Date: Wed, 23 May 2012 21:54:40 GMT < Connection: close < <!DOCTYPE html> <html> <head> <title>YANA Grails Runtime Exception</title> <link rel="stylesheet" href="/static/css/yana.css" /> <link rel="shortcut icon" href="/static/images/favicon.ico?v=2" /> <link href="/static/css/jquery-ui-1.8.19.custom.css" type="text/css" rel="stylesheet" media="screen, projection" /> <script src="/static/plugins/jquery-1.7.1/js/jquery/jquery-1.7.1.min.js" type="text/javascript" ></script> <script src="/static/plugins/jquery-ui-1.8.15/jquery-ui/js/jquery-ui-1.8.15.custom.min.js" type="text/javascript" ></script> <script src="/js/jquery.json-2.3.js" type="text/javascript"></script> <meta name="layout" content="main"> <link rel="stylesheet" href="/static/css/errors.css" type="text/css"> <link rel="stylesheet" type="text/css" href="/static/css/superfish.css" /> <script type="text/javascript" src="/js/hoverIntent.js"></script> <script type="text/javascript" src="/js/superfish.js"></script> <script type="text/javascript"> // initialise plugins jQuery(function(){ jQuery('ul.sf-menu').superfish(); }); </script> <script type="text/javascript"> $(document).ready(function() { $('ul.sf-menu').superfish({ delay: 250, // one second delay on mouseout animation: {opacity:'show',height:'show'}, // fade-in and slide-down animation speed: 'fast', // faster animation speed autoArrows: false, // disable generation of arrow mark-up dropShadows: false // disable drop shadows }); }); </script> </head> <body> <div id="fullheightcontainer"> <div id="wrapper"> <div id="outer"> <div id="float-wrap"> <div id="center"> <div id="clearheadercenter"></div> <div id="container-center"> <div id="header"> <br><br> <table border=0 cellspacing=0 cellpadding=0 width='100%' valign=top> <tr> <td width="27"> </td> <td align=left class="logo"> </td> <td class="header_spacer"><div style="width:300px;padding-right:0px;margin:0px;position:relative;top:4px;left:20px;"><div style='width:400px;font:bold 12px Helvetica, Arial, sans-serif;color:#ffffff;padding:0px 5px 3px 5px;'><a href="/childNode/index">childNode</a> > <div style="color:#ff6600;display:inline">api</div></div></div></td> <td class="header_login_corner"> </td> <td class="header_login_body"> Welcome back, admin | <a href="/logout/index">Logout</a> </td> </tr> <tr> <td class="header_login_corner2"> </td> <td colspan=4 rowspan=2 class="header_search"> <center> <div> <form action="/search/index" method="get" id="searchableForm" name="searchableForm" > <input type="text" class="search_input" name="q" value="" size="50" id="q" /> <input class="button" type="submit" value="Search" /> </form> <div style="clear: both; display: none;" class="hint">See <a href="http://lucene.apache.org/java/docs/queryparsersyntax.html">Lucene query syntax</a> for advanced queries</div> </div> </center> </td> </tr> <tr> <td class="header_login_side"> </td> </tr> <tr> <td colspan=2 align=top><div class="header_bottom_corner"> </div></td> <td colspan=3> <ul class="sf-menu"> <li class="current"><a href="/">Nodes</a> <ul> <li><a href="/">List</a></li> <li><a href="/node/create">Create</a></li> <li class="current"><a href="/childNode/list">Node Relationships</a> <ul> <li class="current"><a href="/childNode/create">Create Node Relationship</a></li> </ul> </li> </ul> </li> <li class="spacer"><img src="/static/images/pix.png" width='10' height='24'/></li> <li><a href="/nodeType/list">Types</a> <ul> <li><a href="/nodeType/list">NodeTypes</a> <ul> <li><a href="/nodeType/create">Create NodeType</a></li> </ul> </li> <li><a href="/attribute/list">Attributes</a> <ul> <li><a href="/attribute/create">Create Attribute</a></li> </ul> </li> <li><a href="/filter/list">Filters</a> <ul> <li><a href="/filter/create">Create Filter</a></li> </ul> </li> <li><a href="/nodeTypeRelationship/list">Nodetype Relationship</a> <ul> <li><a href="/nodeTypeRelationship/create">Create Nodetype Relationship</a></li> </ul> </li> </ul> </li> <li class="spacer"><img src="/static/images/pix.png" width='10' height='24'/></li> <li><a href="/webhook/list">Webhooks</a> <ul> <li><a href="/webhook/list">List</a></li> <li><a href="/webhook/create">Create</a></li> </ul> </li> <li class="spacer"><img src="/static/images/pix.png" width='10' height='24'/></li> <li><a href="http://localhost:8080/import">Admin</a> <ul> <li><a href="/import/importxml">Import Resources</a></li> <li><a href="/user/search">Users</a> <ul> <li><a href="/user/create">Create User</a></li> </ul> </li> <li><a href="/role/search">Roles</a> <ul> <li><a href="/role/create">Create Role</a></li> </ul> </li> </ul> </li> </ul> </td> </tr> </table> </div> <div id="body"> <table border=0 width='100%' height='100%' cellspacing=0 cellpadding=20 valign=top align=middle> <tr><td width=100% height=100% valign=top> <h1>Error 500: Internal Server Error</h1> <dl class="error-details"> <dt>URI</dt><dd>/api/childNode/none</dd> <dt>Class</dt><dd>groovy.lang.MissingPropertyException</dd><dt>Message</dt><dd>No such property: id for class: java.lang.String</dd></dl><h2>Around line 100 of <span class="filename">grails-app/controllers/com/dtosolutions/ChildNodeController.groovy</span></h2> <pre class="snippet"><code class="line"><span class="lineNumber">97:</span> </code><code class="line"><span class="lineNumber">98:</span> def save() {</code><code class="line"><span class="lineNumber">99:</span></code><code class="line error"><span class="lineNumber">100:</span> Node parent = Node.get(params.parent.id.toLong())</code><code class="line"><span class="lineNumber">101:</span> Node child = Node.get(params.child.id.toLong())</code><code class="line"><span class="lineNumber">102:</span> </code><code class="line"><span class="lineNumber">103:</span> def ntparents = NodeTypeRelationship.findByChild(child.nodetype)</code></pre><h2>Around line 20 of <span class="filename">grails-app/controllers/com/dtosolutions/ChildNodeController.groovy</span></h2> <pre class="snippet"><code class="line"><span class="lineNumber">17:</span> switch(request.method){</code><code class="line"><span class="lineNumber">18:</span> case "POST":</code><code class="line"><span class="lineNumber">19:</span> def json = request.JSON</code><code class="line error"><span class="lineNumber">20:</span> this.save()</code><code class="line"><span class="lineNumber">21:</span> return</code><code class="line"><span class="lineNumber">22:</span> break</code><code class="line"><span class="lineNumber">23:</span> case "GET":</code></pre><h2>Trace</h2><pre class="stack"> Line | Method ->> 100 | save in ChildNodeController.groovy - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | 20 | api in '' | 886 | runTask in java.util.concurrent.ThreadPoolExecutor$Worker | 908 | run in '' ^ 680 | run . . in java.lang.Thread </pre> </td></tr> </table> </div> <div id="footer"> <div style="height:1px;"><img src="/static/images/pix.gif" width='1' height='1'/></div> <div class="foot_style"> <center>© Copyright 2010 <a href="https://github.com/dtolabs">DTO Labs</a>. DTO Labs is affiliated with <a href="http://dtosolutions.com/">DTO Solutions</a>. All rights reserved.</center> </div> <div style="height:1px;"><img src="/static/images/pix.gif" width='1' height='20'/></div> <br> </div> </div> <div id="clearfootercenter"></div> </div> <div id="left"> <div id="clearheaderleft"></div> <div id="container-left"> </div> <div id="clearfooterleft"></div> </div> </div> <div id="right"> <div id="clearheaderright"></div> <div id="container-right"> </div> <div id="clearfooterright"></div> </div> <div class="clear"> </div> </div> <div id="gfx_bg_middle"> </div> </div> <div class="clear"> </div> </div> </body> * Closing connection #0 </html>alexh@strongbad:~/rerun-workspace/rerun [723] $
Ok no response back on this. Pushed this over 18 hrs ago and retested again and it is still working fine. Please test and close.
Changing to a format resolved the problem.
A server error page is thrown when attempting to create a childNode.
Example:
curl --verbose --request POST --header "Content-Type: application/json" -d "{relationshipName:'parent_child_test',parent:'1',child:'5'}" http://localhost:8080/api/childNode/none --cookie cookies.txt
Result: