AnsweredAssumed Answered

SimpleWebScript and Alfresco 3.4 ... broken?

Question asked by exel88 on Mar 1, 2011
Latest reply on Mar 3, 2011 by exel88
Alfresco version: Community v3.4.0 (both C and D version) (with tomcat and mysql installation bundle)
OS: Windows 7 Professional - English
IDE: Eclipse Helios


Hello to everyone.

In the last days, you're seen, I've had some problems with a Java Backend Web Script development.
For ensure wich wasn't me the problem, I've tried to follow the tutorial on http://wiki.alfresco.com/wiki/Java-backed_Web_Scripts_Samples for deploy the SimpleWebScript.
I followed instructions to the letter (for Alfresco 3.3 and beyond)! But, this is the result:


Community v3.4.0 (c 3335) schema 4,113
1 Web Scripts

Back to Web Scripts Home

Up to package /org/alfresco

The World's Simplest Webscript
GET /alfresco/service/demo/simple
Description:   Hands back a little bit of JSON
Authentication:   none
Transaction:   none
Format Style:   argument
Default Format:   Determined at run-time
Id:   org/alfresco/demo/simple.get
Description:   classpath:alfresco/templates/webscripts/org/alfresco/demo/simple.get.desc.xml


Web Script: org/alfresco/demo/simple.get
Generated from /alfresco/service/script/org/alfresco/demo/simple.get on Mar 1, 2011 10:14:40 AM

Script Properties
Id:   org/alfresco/demo/simple.get
Short Name:   The World's Simplest Webscript
Description:   Hands back a little bit of JSON
Authentication:   none
Transaction:   none
Method:   GET
URL Template:   /demo/simple
Format Style:   argument
Default Format:   [undefined]
Negotiated Formats:   [undefined]
Implementation:   class org.springframework.extensions.webscripts.DeclarativeWebScript
Extensions:   [undefined]

Store: workspace://SpacesStore/app:company_home/app:dictionary/cm:extensionwebscripts

[No implementation files]

Store: workspace://SpacesStore/app:company_home/app:dictionary/cm:webscripts

[No implementation files]

Store: classpath:alfresco/templates/webscripts

File: org/alfresco/demo/simple.get.desc.xml

<webscript>
  <shortname>The World's Simplest Webscript</shortname>
  <description>Hands back a little bit of JSON</description>
  <url>/demo/simple</url>
  <authentication>none</authentication>
  <format default="">argument</format>
</webscript>

Store: classpath:webscripts

[No implementation files]


http://localhost:8081/alfresco/service/demo/simple

The Web Script /alfresco/service/demo/simple 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:   02010002 Web Script format '' is not registered
   
Exception:   org.springframework.extensions.webscripts.WebScriptException - 02010002 Web Script format '' is not registered
   
   org.springframework.extensions.webscripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:58)
   org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecute(RepositoryContainer.java:336)
   org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecuteAs(RepositoryContainer.java:466)
   org.alfresco.repo.web.scripts.RepositoryContainer.executeScript(RepositoryContainer.java:263)
   org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:333)
   org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:189)
   org.springframework.extensions.webscripts.servlet.WebScriptServlet.service(WebScriptServlet.java:118)
   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.web.app.servlet.GlobalLocalizationFilter.doFilter(GlobalLocalizationFilter.java:58)
   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:127)
   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:298)
   org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:859)
   org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579)
   org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1555)
   java.lang.Thread.run(Thread.java:619)
   
Server:   Community v3.4.0 (c 3335) schema 4,113
Time:   Mar 1, 2011 10:14:35 AM
   
Diagnostics:   Inspect Web Script (org/alfresco/demo/simple.get)

http://localhost:8081/share/page/script/org/alfresco/module/demoscripts/simple.get

Web Script Status 500 - Internal Error

The Web Script /share/page/script/org/alfresco/module/demoscripts/simple.get 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:   02010000 Web Script Id 'org/alfresco/module/demoscripts/simple.get' not found

Exception:   org.springframework.extensions.webscripts.WebScriptException - 02010000 Web Script Id 'org/alfresco/module/demoscripts/simple.get' not found

org.springframework.extensions.webscripts.bean.ServiceDump.executeImpl(ServiceDump.java:61)
org.springframework.extensions.webscripts.DeclarativeWebScript.executeImpl(DeclarativeWebScript.java:235)
org.springframework.extensions.webscripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:64)
org.springframework.extensions.webscripts.PresentationContainer.executeScript(PresentationContainer.java:69)
org.springframework.extensions.webscripts.LocalWebScriptRuntimeContainer.executeScript(LocalWebScriptRuntimeContainer.java:231)
org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:333)
org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:189)
org.springframework.extensions.webscripts.servlet.mvc.WebScriptView.renderMergedOutputModel(WebScriptView.java:99)
org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:250)
org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1060)
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:798)
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:716)
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:647)
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:552)
javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
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.web.site.servlet.MTAuthenticationFilter.doFilter(MTAuthenticationFilter.java:74)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.alfresco.web.site.servlet.SSOAuthenticationFilter.doFilter(SSOAuthenticationFilter.java:301)
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:127)
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:298)
org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:859)
org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579)
org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1555)
java.lang.Thread.run(Thread.java:619)

Server:   Spring WebScripts - v1.0.0 (Release Candidate 2 739) schema 1,000
Time:   Mar 1, 2011 10:12:37 AM

This is the files tree:

.jar file in <Alfresco>/tomcat/webapps/alfresco/WEB-INF/lib or class files in <Alfresco>/tomcat/webapps/alfresco/WEB-INF/classes
web-scripts-application-context.xml - <Alfresco>/tomcat/webapps/alfresco/WEB-INF/classes/alfresco
simple.get.desc.xml  - <Alfresco>/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/templates/webscripts/org/alfresco/demo

And, this is the manifest.mf inside the JAR:

Manifest-Version: 1.0
Ant-Version: Apache Ant 1.7.1
Created-By: 19.0-b09 (Sun Microsystems Inc.)


What I've missed?  :cry: Is my Alfresco installation broken?

Regards,


Andrea

Outcomes