cancel
Showing results for 
Search instead for 
Did you mean: 

Exception in Share when executing http method from applet

hackyou
Champ in-the-making
Champ in-the-making
I had an applet embeded in share using a client side javascript. The applet invokes custom script in alfresco. The problem is the following exception in share (the result from the script is ok). I use some custom libs in the applet and commons-httpclient 3.1 to communicate with alfresco.
SEVERE: Servlet.service() for servlet Spring Surf Dispatcher Servlet threw exception
javax.servlet.ServletException: Could not resolve view with name 'site/eiso/commons-logging.properties' in servlet with name 'Spring Surf Dispatcher Servlet'
   at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1042)
   at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:798)
   at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:716)
   at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:647)
   at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:552)
   at javax.servlet.http.HttpServlet.doHead(HttpServlet.java:241)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:634)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at org.alfresco.web.site.servlet.MTAuthenticationFilter.doFilter(MTAuthenticationFilter.java:74)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at org.alfresco.web.site.servlet.SSOAuthenticationFilter.doFilter(SSOAuthenticationFilter.java:301)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
   at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
   at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
   at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
   at java.lang.Thread.run(Thread.java:662)
2011-5-8 22:00:41 org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet Spring Surf Dispatcher Servlet threw exception
javax.servlet.ServletException: Could not resolve view with name 'site/eiso/META-INF/services/org.apache.commons.logging.LogFactory' in servlet with name 'Spring Surf Dispatcher Servlet'
   at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1042)
   at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:798)
   at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:716)
   at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:647)
   at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:552)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at org.alfresco.web.site.servlet.MTAuthenticationFilter.doFilter(MTAuthenticationFilter.java:74)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at org.alfresco.web.site.servlet.SSOAuthenticationFilter.doFilter(SSOAuthenticationFilter.java:301)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
   at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
   at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
   at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
   at java.lang.Thread.run(Thread.java:662)
2011-5-8 22:00:42 org.apache.catalina.core.StandardWrapperValve invoke
…..
Should i worry about this error and how to fix it?
2 REPLIES 2

amitev
Champ in-the-making
Champ in-the-making
Looks like the problem comes from the commons-logging API which most apache commons library depend on. Is the commons-logging.jar in the applet's classpath?

erikwinlof
Confirmed Champ
Confirmed Champ
Looks like you need to play around with the <applet>/<embed>/<object> tags and make sure you make all the .jar files that the applet requires are available.
Try packaging all your custom files in a custom jar file, i.e. acme-applet-extension.jar and make sure to place it in:

tomcat/shared/lib/

Now make sure acme-applet-extension.jar contains all your code and especially the .jars and .properites files (i.e. commons-logging.properties) that the applet depends on inside the jar files META_INF folder: applet-extension.jar!/META-INF/acme/java/

Then make sure to have the <applet>'s "codebase" parameter pointing to something like /share/res/acme/java and see if you can get the applet to work.
You should now get the applet to request /share/res/acme/java/commons-logging.properties instead of giving you an error.

If you haven't invested a lot of time in this already I would recommend implementing this using javascript if possible (YUI or jquery) since I'm pretty sure you will run into additional problems 😞

Cheers and good luck, Erik
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.