AnsweredAssumed Answered

Error at retrieving API index list

Question asked by minirich on Apr 18, 2007
Latest reply on May 16, 2007 by minirich
Hi!

I tried to get the list of all available http-api's according to wiki
http://wiki.alfresco.com/wiki/REST#API_Index

But if i try to call http://supernova:8080/alfresco/service/index
i get the following errormessage on the screen

org.alfresco.web.api.APIException: Failed to process format 'html'
caused by:
org.alfresco.service.cmr.repository.TemplateException: Fehler während der Ausführung der Vorlage "Expression service.defaultFormat is undefined on line 21, column 175 in Services_view_html.ftl.". Bitte kontaktieren Sie Ihren System Administrator
caused by:
freemarker.core.InvalidReferenceException: Expression service.defaultFormat is undefined on line 21, column 175 in Services_view_html.ftl.

and in the logfile i get this

15:52:58,043 ERROR [runtime]
Expression service.defaultFormat is undefined on line 21, column 175 in Services_view_html.ftl.
The problematic instruction:
———-
==> ${service.defaultFormat} [on line 21, column 173 in Services_view_html.ftl]
———-

Java backtrace for programmers:
———-
freemarker.core.InvalidReferenceException: Expression service.defaultFormat is undefined on line 21, column 175 in Services_view_html.ftl.
   at freemarker.core.TemplateObject.assertNonNull(TemplateObject.java:124)
   at freemarker.core.Expression.getStringValue(Expression.java:118)
   at freemarker.core.Expression.getStringValue(Expression.java:93)
   at freemarker.core.DollarVariable.accept(DollarVariable.java:76)
   at freemarker.core.Environment.visit(Environment.java:196)
   at freemarker.core.MixedContent.accept(MixedContent.java:92)
   at freemarker.core.Environment.visit(Environment.java:196)
   at freemarker.core.IteratorBlock$Context.runLoop(IteratorBlock.java:172)
   at freemarker.core.Environment.visit(Environment.java:351)
   at freemarker.core.IteratorBlock.accept(IteratorBlock.java:95)
   at freemarker.core.Environment.visit(Environment.java:196)
   at freemarker.core.MixedContent.accept(MixedContent.java:92)
   at freemarker.core.Environment.visit(Environment.java:196)
   at freemarker.core.Environment.process(Environment.java:176)
   at freemarker.template.Template.process(Template.java:232)
   at org.alfresco.repo.template.FreeMarkerProcessor.process(FreeMarkerProcessor.java:212)
   at org.alfresco.web.api.services.APIServiceImpl.renderTemplate(APIServiceImpl.java:229)
   at org.alfresco.web.api.services.APIServiceTemplateImpl.renderTemplate(APIServiceTemplateImpl.java:119)
   at org.alfresco.web.api.services.APIServiceTemplateImpl.execute(APIServiceTemplateImpl.java:82)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:585)
   at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:335)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:181)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:148)
   at org.alfresco.web.api.ServiceLogger.invoke(ServiceLogger.java:66)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
   at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:176)
   at $Proxy154.execute(Unknown Source)
   at org.alfresco.web.api.APIServlet.service(APIServlet.java:103)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
   at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
   at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
   at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
   at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
   at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
   at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
   at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
   at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
   at java.lang.Thread.run(Thread.java:595)
15:52:58,045 ERROR [[apiServlet]] Servlet.service() for servlet apiServlet threw exception
org.alfresco.web.api.APIException: Failed to process format 'html'
   at org.alfresco.web.api.services.APIServiceTemplateImpl.execute(APIServiceTemplateImpl.java:86)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:585)
   at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:335)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:181)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:148)
   at org.alfresco.web.api.ServiceLogger.invoke(ServiceLogger.java:66)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
   at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:176)
   at $Proxy154.execute(Unknown Source)
   at org.alfresco.web.api.APIServlet.service(APIServlet.java:103)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
   at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
   at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
   at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
   at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
   at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
   at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
   at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
   at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
   at java.lang.Thread.run(Thread.java:595)
Caused by: org.alfresco.service.cmr.repository.TemplateException: Fehler während der Ausführung der Vorlage "Expression service.defaultFormat is undefined on line 21, column 175 in Services_view_html.ftl.". Bitte kontaktieren Sie Ihren System Administrator 
   at org.alfresco.repo.template.FreeMarkerProcessor.process(FreeMarkerProcessor.java:216)
   at org.alfresco.web.api.services.APIServiceImpl.renderTemplate(APIServiceImpl.java:229)
   at org.alfresco.web.api.services.APIServiceTemplateImpl.renderTemplate(APIServiceTemplateImpl.java:119)
   at org.alfresco.web.api.services.APIServiceTemplateImpl.execute(APIServiceTemplateImpl.java:82)
   … 32 more
Caused by: freemarker.core.InvalidReferenceException: Expression service.defaultFormat is undefined on line 21, column 175 in Services_view_html.ftl.
   at freemarker.core.TemplateObject.assertNonNull(TemplateObject.java:124)
   at freemarker.core.Expression.getStringValue(Expression.java:118)
   at freemarker.core.Expression.getStringValue(Expression.java:93)
   at freemarker.core.DollarVariable.accept(DollarVariable.java:76)
   at freemarker.core.Environment.visit(Environment.java:196)
   at freemarker.core.MixedContent.accept(MixedContent.java:92)
   at freemarker.core.Environment.visit(Environment.java:196)
   at freemarker.core.IteratorBlock$Context.runLoop(IteratorBlock.java:172)
   at freemarker.core.Environment.visit(Environment.java:351)
   at freemarker.core.IteratorBlock.accept(IteratorBlock.java:95)
   at freemarker.core.Environment.visit(Environment.java:196)
   at freemarker.core.MixedContent.accept(MixedContent.java:92)
   at freemarker.core.Environment.visit(Environment.java:196)
   at freemarker.core.Environment.process(Environment.java:176)
   at freemarker.template.Template.process(Template.java:232)
   at org.alfresco.repo.template.FreeMarkerProcessor.process(FreeMarkerProcessor.java:212)
   … 35 more


I did not found a clue in the forums nor in bugtracking.
thanks in  advance
Mike
[edit]
I forgott to tell:
Im Using Alfresco2 on JBoss on OpenSuse Linux with an Oracle 10g2 DB
[/edit]

Outcomes