08-14-2009 10:01 AM
{
"result" : "Node created",
"nodeRef":"workspace://SpacesStore/edfaddde-afd1-4e2f-9fdb-f8be85179c5a",
"name":"wrong? file: name!"
}<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Web Script Status 500 - Internal Error</title>
<link rel="stylesheet" href="/alfresco/css/base.css" type="text/css" />
</head>
<body>
<div>
<table>
<tr>
<td><img src="/alfresco/images/logo/AlfrescoLogo32.png" alt="Alfresco" /></td>
<td><span class="title">Web Script Status 500 - Internal Error</span></td>
</tr>
</table>
<br/>
<table>
<tr><td>The Web Script <a href="/alfresco/service/test/create?alf_ticket=TICKET_e3f29349013fcedc2c2a92f7e862b08c9a2c3f7d">/alfresco/service/test/create</a> has responded with a status of 500 - Internal Error.</td></tr>
</table>
<br/>
<table>
<tr><td><b>500 Description:</b></td><td> An error inside the HTTP server which prevented it from fulfilling the request.</td></tr>
<tr><td> </td></tr>
<tr><td><b>Message:</b></td><td>Found 1 integrity violations:
try {
var node = companyhome.createNode(name, "my:customtype", props, "cm:contains");
model.node = node;
} catch (error) {
status.code = 500;
status.message="Unexpected error";
model.error = error.message;
status.redirect=true;
return;
}
09-15-2009 02:40 AM
04-29-2010 05:43 PM
Integrity checks are performed when a transaction commits. To trigger these checks from within a webscript, you have to:
1. Ensure that the webscript itself is not a transaction (you can configure this in your desc.xml)
2. Create a Java-backed webscript
3. In your webscript, create a new transaction and attempt to commit it
4. Now, you can catch the error and process accordingly, possibly using your own custom 5xx error codes & ftl's
Gluck,
Rogier
04-30-2010 03:26 AM
Can you please provide some example for the transaction and attempt to commit step?
UserTransaction tx = transactionService.getUserTransaction(false);
tx.begin();
// do something
try {
tx.commit();
} catch (RollbackException re) {
// something bad has happened and the transaction has been rolled back
// notify the client
}
05-03-2010 04:53 PM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.