InvalidQNameException
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-21-2009 09:45 AM
I have a presentation template where i have a list of all the documents in the space. In the custom view you can see under each document all the sub-spaces. If you click on the sub-space, the document will move to the sub-space.
I tested it and it worked. But now i have this error, can someone help me?
moveNode.get.js is just the move to the sub-space.
What does this mean:
I tested it and it worked. But now i have this error, can someone help me?
moveNode.get.js is just the move to the sub-space.
500 Description: An error inside the HTTP server which prevented it from fulfilling the request. Message: Wrapped Exception (with status template): Failed to execute script '/moveNode.get.js (in repository store workspace://SpacesStore/Company Home/dictionary/Web Scripts Extensions)': A QName must consist of a local name Exception: org.alfresco.service.namespace.InvalidQNameException - A QName must consist of a local name org.alfresco.service.namespace.QName.createQName(QName.java:90) org.alfresco.repo.security.person.PersonServiceImpl.createPerson(PersonServiceImpl.java:531) org.alfresco.repo.security.person.PersonServiceImpl.createMissingPerson(PersonServiceImpl.java:503) org.alfresco.repo.security.person.PersonServiceImpl.getPerson(PersonServiceImpl.java:245) org.alfresco.repo.usage.ContentUsageImpl.getUserUsage(ContentUsageImpl.java:427) org.alfresco.repo.usage.ContentUsageImpl.incrementUserUsage(ContentUsageImpl.java:352) org.alfresco.repo.usage.ContentUsageImpl.onUpdateProperties(ContentUsageImpl.java:293) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) java.lang.reflect.Method.invoke(Method.java:585) org.alfresco.repo.policy.JavaBehaviour$JavaMethodInvocationHandler.invoke(JavaBehaviour.java:179) $Proxy13.onUpdateProperties(Unknown Source) sun.reflect.GeneratedMethodAccessor270.invoke(Unknown Source) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) java.lang.reflect.Method.invoke(Method.java:585) org.alfresco.repo.policy.PolicyFactory$MultiHandler.invoke(PolicyFactory.java:306) org.alfresco.repo.policy.$Proxy157.onUpdateProperties(Unknown Source) org.alfresco.repo.node.AbstractNodeServiceImpl.invokeOnUpdateProperties(AbstractNodeServiceImpl.java:345) org.alfresco.repo.node.db.DbNodeServiceImpl.setProperties(DbNodeServiceImpl.java:1147) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) java.lang.reflect.Method.invoke(Method.java:585) org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:296) org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:177) org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:144) org.alfresco.repo.transaction.SingleEntryTransactionResourceInterceptor.invokeInternal(SingleEntryTransactionResourceInterceptor.java:163) org.alfresco.repo.transaction.SingleEntryTransactionResourceInterceptor.invoke(SingleEntryTransactionResourceInterceptor.java:138) org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:166) org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) $Proxy7.setProperties(Unknown Source) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) java.lang.reflect.Method.invoke(Method.java:585) org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:296) org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:177) org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:144) org.alfresco.repo.tenant.MultiTNodeServiceInterceptor.invoke(MultiTNodeServiceInterceptor.java:110) org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:166) org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) $Proxy7.setProperties(Unknown Source) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) java.lang.reflect.Method.invoke(Method.java:585) org.alfresco.repo.service.StoreRedirectorProxyFactory$RedirectorInvocationHandler.invoke(StoreRedirectorProxyFactory.java:221) $Proxy8.setProperties(Unknown Source) org.alfresco.repo.node.MLPropertyInterceptor.invoke(MLPropertyInterceptor.java:215) org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:166) org.alfresco.repo.node.NodeRefPropertyMethodInterceptor.invoke(NodeRefPropertyMethodInterceptor.java:249) org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:166) org.alfresco.repo.node.NodeRefPropertyMethodInterceptor.invoke(NodeRefPropertyMethodInterceptor.java:249) org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:166) org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) $Proxy7.setProperties(Unknown Source) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) java.lang.reflect.Method.invoke(Method.java:585) org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:296) org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:177) org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:144) net.sf.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:80) org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:166) org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:49) org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:166) org.alfresco.repo.audit.AuditComponentImpl.audit(AuditComponentImpl.java:275) org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:69) org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:166) org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107) org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:166) org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) $Proxy7.setProperties(Unknown Source) org.alfresco.repo.jscript.ScriptNode.save(ScriptNode.java:1120) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) java.lang.reflect.Method.invoke(Method.java:585) org.mozilla.javascript.MemberBox.invoke(MemberBox.java:155) org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:243) org.mozilla.javascript.optimizer.OptRuntime.callProp0(OptRuntime.java:119) org.mozilla.javascript.gen.c3._c0(AlfrescoScript:18) org.mozilla.javascript.gen.c3.call(AlfrescoScript) org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:393) org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:2834) org.mozilla.javascript.gen.c3.call(AlfrescoScript) org.mozilla.javascript.gen.c3.exec(AlfrescoScript) org.mozilla.javascript.Context.evaluateString(Context.java:1196) org.alfresco.repo.jscript.RhinoScriptProcessor.executeScriptImpl(RhinoScriptProcessor.java:390) org.alfresco.repo.jscript.RhinoScriptProcessor.execute(RhinoScriptProcessor.java:122) org.alfresco.repo.processor.ScriptServiceImpl.executeScript(ScriptServiceImpl.java:263) org.alfresco.repo.web.scripts.RepositoryScriptProcessor.executeScript(RepositoryScriptProcessor.java:108) org.alfresco.web.scripts.AbstractWebScript.executeScript(AbstractWebScript.java:791) org.alfresco.web.scripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:90) org.alfresco.repo.web.scripts.RepositoryContainer$2.execute(RepositoryContainer.java:319) org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:320) org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:227) org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecute(RepositoryContainer.java:368) org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecuteAs(RepositoryContainer.java:390) org.alfresco.repo.web.scripts.RepositoryContainer.executeScript(RepositoryContainer.java:273) org.alfresco.web.scripts.AbstractRuntime.executeScript(AbstractRuntime.java:260) org.alfresco.web.scripts.AbstractRuntime.executeScript(AbstractRuntime.java:139) org.alfresco.web.scripts.servlet.WebScriptServlet.service(WebScriptServlet.java:116) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) org.alfresco.repo.webdav.auth.BaseNTLMAuthenticationFilter.doFilter(BaseNTLMAuthenticationFilter.java:265) org.alfresco.web.app.servlet.WebScriptNTLMAuthenticationFilter.doFilter(WebScriptNTLMAuthenticationFilter.java:116) org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286) org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845) org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) java.lang.Thread.run(Thread.java:595) Exception: org.alfresco.scripts.ScriptException - Failed to execute script '/moveNode.get.js (in repository store workspace://SpacesStore/Company Home/dictionary/Web Scripts Extensions)': A QName must consist of a local name org.alfresco.repo.jscript.RhinoScriptProcessor.execute(RhinoScriptProcessor.java:126) Exception: org.alfresco.web.scripts.WebScriptException - Wrapped Exception (with status template): Failed to execute script '/moveNode.get.js (in repository store workspace://SpacesStore/Company Home/dictionary/Web Scripts Extensions)': A QName must consist of a local name org.alfresco.web.scripts.AbstractWebScript.createStatusException(AbstractWebScript.java:595) Server: Alfresco Enterprise v3.0.1 (303) schema 501Time: 21-avr.-2009 15:31:21 Diagnostics: Inspect Web Script (moveNode.get)
What does this mean:
org.alfresco.service.namespace.InvalidQNameException - A QName must consist of a local name
Labels:
- Labels:
-
Archive
3 REPLIES 3

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2009 02:19 AM
Hi,
post you code too, someone will surely help you.
Cheers,
Ivan.
post you code too, someone will surely help you.
Cheers,
Ivan.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2009 03:00 AM
this is my code:
The presentation template:
for the link to the sub-spaces i use:
This is the code for the moveDocument function:
Then i have a xml-file, js-file and ftl-file in web scripts extension
xml:
js:
The presentation template:
for the link to the sub-spaces i use:
<span class="folderlink"><a href="#" onClick="javascript:moveDocument('${c.id}', '${child.displayPath}', '${child.properties.name}');" title="Move document to ${child.properties.name}">${child.properties.name}</a></span>
This is the code for the moveDocument function:
function moveDocument(docId, path, folder){ path = path.substr(13); if(confirm("Move document to " + folder + "?")){ if(docId != 0) { var options = "menubar=no,scrollbars=no,statusbar=no"; var url = "/alfresco/wcservice/moveNode?id=" + docId + "&destination=" + path + "/" + folder + "&target_location=/alfresco/faces/jsp/browse/browse.jsp"; //alert(url); window.open(url,"","top=0,left=0,width=1200,height=800,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes"); } }}
Then i have a xml-file, js-file and ftl-file in web scripts extension
xml:
<webscript> <shortname>moveNode</shortname> <description>moveNode</description> <url>/moveNode?id={id}&destination={destination}</url> <authentication>user</authentication> <transaction>required</transaction></webscript>
js:
var id = args["id"];var destination = args["destination"];var target_location = args["target_location"];var action = url.extension;var item = null;if (id != null) { item = search.findNode("workspace://SpacesStore/" + id); var currentUser = person.properties.userName; item.properties["cm:owner"] = currentUser; item.save(); destination = companyhome.childByNamePath(destination); item.move(destination); item.properties["cm:owner"] = ""; item.save(); } else { status.code = 400; status.message = "Error: document not found " +" (id="+id+")"; status.redirect = true;}model.target_location = target_location;
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2009 08:12 AM
apparently i can't use
I changed it to
and it works now…
…item.properties["cm:owner"] = "";…
in alfresco 3 (in alfresco 2 it worked)I changed it to
…item.properties["cm:owner"] = null;…
and it works now…
