AnsweredAssumed Answered

trying to upload a file from JAVA program

Question asked by chraja on Jan 6, 2009
Latest reply on Jun 19, 2009 by nowhere
Jan 6, 2009 5:41:08 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet apiServlet threw exception

I am trying to upload a file from JAVA program which actually sends a post request to the webscript .

the same request is working fine with the browser .

Included basic authentication headers also in the request

java.io.IOException: Server returned HTTP response code: 500 for URL: http://localhost:8090/alfresco/service/sample/import?alf_ticket=TICKET_f62777be1b790038d6efb7ba00832e004819746c
   at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
   at com.docharbor.repository.alfresco.service.webscripts.ClientHttpRequest.post(ClientHttpRequest.java:262)
   at com.docharbor.repository.alfresco.dao.ImportDAO.processRequest(ImportDAO.java:80)
   at com.docharbor.repository.alfresco.dao.AbstractDAORequest.process(AbstractDAORequest.java:59)
   at com.docharbor.repository.alfresco.dao.ImportDAO.main(ImportDAO.java:155)

when i look in the log i found this exception …

java.lang.NullPointerException
   at org.alfresco.web.scripts.WebScriptRequestImpl.parseContent(WebScriptRequestImpl.java:235)
   at org.alfresco.web.scripts.servlet.WebScriptServletRequest.<init>(WebScriptServletRequest.java:90)
   at org.alfresco.web.app.servlet.MTWebScriptAuthenticationFilter.doFilter(MTWebScriptAuthenticationFilter.java:94)
   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:128)
   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:286)
   at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
   at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
   at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
   at java.lang.Thread.run(Thread.java:595)

I am actually evaluating alfresco performance and trying to do some basic operation for custom content .
Please let me know if any other info u may require .

thanks,
raja

Outcomes