AnsweredAssumed Answered

Web Script Sample example issue

Question asked by unknown-user on Dec 15, 2008
Latest reply on Apr 21, 2009 by swamychaitanya
Hello,

I am new to web scripts.I am unable to run the simplest script example, "Hello World", posted on this web link:
http://wiki.alfresco.com/wiki/Web_Scripts_Examples, it would be greatly appreciated if someone can shed some light on what I've done wrong, missing or whatnot?

Under Company Home -> Data Dictionary -> Web scripts -> org -> alfresco -> sample, I've added two contents (files), hello.get.desc.xml and hello.get.html.ftl. Now when i try to run this script, i am getting the following error–

Web Script Status 500 - Internal Error

The Web Script /alfresco/service/sample/hello has responded with a status of 500 - Internal Error. 

500 Description: An error inside the HTTP server which prevented it from fulfilling the request. 
  
Message: charsetName 
  
Exception: java.lang.NullPointerException - charsetName 
   
java.io.InputStreamReader.(InputStreamReader.java:82) 
org.alfresco.web.scripts.RepoStore$RepoTemplateSource$2$1.execute(RepoStore.java:592) 
org.alfresco.web.scripts.RepoStore$RepoTemplateSource$2$1.execute(RepoStore.java:589) 
org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:225) 
org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:155) 
org.alfresco.web.scripts.RepoStore$RepoTemplateSource$2.doWork(RepoStore.java:587) 
org.alfresco.web.scripts.RepoStore$RepoTemplateSource$2.doWork(RepoStore.java:585) 
org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:260) 
org.alfresco.web.scripts.RepoStore$RepoTemplateSource.getReader(RepoStore.java:583) 
org.alfresco.web.scripts.RepoStore$RepoTemplateLoader.getReader(RepoStore.java:491) 
freemarker.cache.MultiTemplateLoader$MultiSource.getReader(MultiTemplateLoader.java:168) 
freemarker.cache.MultiTemplateLoader.getReader(MultiTemplateLoader.java:133) 
freemarker.cache.TemplateCache.loadTemplate(TemplateCache.java:370) 
freemarker.cache.TemplateCache.getTemplate(TemplateCache.java:347) 
freemarker.cache.TemplateCache.getTemplate(TemplateCache.java:229) 
freemarker.template.Configuration.getTemplate(Configuration.java:487) 
freemarker.template.Configuration.getTemplate(Configuration.java:452) 
org.alfresco.repo.template.FreeMarkerProcessor.process(FreeMarkerProcessor.java:193) 
org.alfresco.web.scripts.AbstractWebScript.renderTemplate(AbstractWebScript.java:329) 
org.alfresco.web.scripts.DeclarativeWebScript.renderFormatTemplate(DeclarativeWebScript.java:232) 
org.alfresco.web.scripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:158) 
org.alfresco.web.scripts.WebScriptRuntime.wrappedExecute(WebScriptRuntime.java:342) 
org.alfresco.web.scripts.WebScriptRuntime.authenticatedExecute(WebScriptRuntime.java:308) 
org.alfresco.web.scripts.WebScriptRuntime$1.execute(WebScriptRuntime.java:163) 
org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:225) 
org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:155) 
org.alfresco.web.scripts.WebScriptRuntime.executeScript(WebScriptRuntime.java:174) 
org.alfresco.web.scripts.WebScriptServlet.service(WebScriptServlet.java:109) 
javax.servlet.http.HttpServlet.service(HttpServlet.java:810) 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) 
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96) 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) 
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175) 
org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74) 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) 
org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156) 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869) 
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664) 
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) 
org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112) 
java.lang.Thread.run(Thread.java:595) 
   
Server: Alfresco Community Network v2.1.0 (482) schema 64 
Time: Dec 15, 2008 10:11:20 AM 
  
Diagnostics: Inspect Web Script (org/alfresco/sample/hello.get) 


Could someone help me please  :cry:

Regards
Nishant

Outcomes