Announcement Announcement Module
Collapse
No announcement yet.
AbstracWebScript class and Alfresco Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • AbstracWebScript class and Alfresco

    Hello to everyone.

    Maybe this isn't the correct forum, but now the webscripts extensions is on Spring framework.
    In the last days I've had some problems with a Java Backend Web Script development on Alfresco (community/3.4).

    For ensure wich wasn't me the problem, I've tried to follow the tutorial on http://wiki.alfresco.com/wiki/Java-b...cripts_Samples for deploy the SimpleWebScript.

    I followed instructions to the letter (for Alfresco 3.3 and beyond)! But, this is the result:

    Code:
    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
    Code:
    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
    Code:
    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/scr...pts/simple.get
    Code:
    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:
    Code:
    .jar file in <tomcat>/webapps/share/WEB-INF/lib
    web-scripts-application-context.xml - <tomcat>/webapps/share/WEB-INF/classes/org/springframework/extensions/webscripts
    simple.get.desc.xml  - <tomcat>/webapps/share/WEB-INF/classes/alfresco/templates/webscripts/org/alfresco/demo
    And, this is the manifest.mf inside the JAR:
    Code:
    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


    Alfresco version: Community v3.4.0 (c 3335) schema 4,113 (with tomcat and mysql installation bundle)
    OS: Windows 7 Professional - English
    IDE: Eclipse Helios
    Last edited by Exel88; Mar 2nd, 2011, 05:58 AM.

  • #2
    Try setting a default format.

    Code:
    <format default=”html”>argument</format>

    Comment

    Working...
    X