Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
SDK CSFile Copy
stimpy
I am encountering strange problems using CSFile.copy in JSP.
On the development box, if the operation is performed on a file size > 14Mb I get this error (?? is Japanese character)
If the file is < 14 Mb, everything works. Strangely on the other development box, if file size > 36 Mb, the method fails. Or sometimes, the file would be copied succesfully and then the below message would show up.
any ideas?
?? The server encountered an internal error () that prevented it from fulfilling this request.
??
javax.servlet.ServletException: (500)Internal Server Error
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:867)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:800)
org.apache.jsp.CustomImport_jsp._jspService(CustomImport_jsp.java:471)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
??
com.interwoven.cssdk.common.CSException: ((500)Internal Server Error)
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
java.lang.reflect.Constructor.newInstance(Constructor.java:274)
com.interwoven.cssdk.client.axis.common.AxisExceptionTranslator.translateException(AxisExceptionTranslator.java:72)
com.interwoven.cssdk.client.axis.filesys.FileServiceAdapterImpl.copyFile(FileServiceAdapterImpl.java:255)
com.interwoven.cssdk.filesys.impl.CSFileImpl.copy(CSFileImpl.java:560)
org.apache.jsp.CustomImport_jsp._jspService(CustomImport_jsp.java:388)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
??
(500)Internal Server Error
org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java:630)
org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:128)
org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:71)
org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:150)
org.apache.axis.SimpleChain.invoke(SimpleChain.java:120)
org.apache.axis.client.AxisClient.invoke(AxisClient.java:180)
org.apache.axis.client.Call.invokeEngine(Call.java:2526)
org.apache.axis.client.Call.invoke(Call.java:2515)
org.apache.axis.client.Call.invoke(Call.java:2210)
org.apache.axis.client.Call.invoke(Call.java:2133)
org.apache.axis.client.Call.invoke(Call.java:1656)
com.interwoven.cssdk.client.axis.generated.FileServiceBindingStub.copyFile(FileServiceBindingStub.java:3540)
com.interwoven.cssdk.client.axis.filesys.FileServiceAdapterImpl.copyFile(FileServiceAdapterImpl.java:253)
com.interwoven.cssdk.filesys.impl.CSFileImpl.copy(CSFileImpl.java:560)
org.apache.jsp.CustomImport_jsp._jspService(CustomImport_jsp.java:388)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
<%
try
{
mySelectedFile.copy(waRelPath, true);
}
catch (CSObjectNotFoundException copye)
{
System.out.println("CSException is: " + copye.toString());
}
%>
<html code to redirct to another page>
Find more posts tagged with
Comments
stimpy
Could someone run this in their system to see if you have the same problem?
the jsp script copies files from 1 dir to another - all you need to do is change the source and target (hardcoded) in the jsp.
My size limit is about 36 megs before error occurs.
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page import="com.interwoven.cssdk.common.*"%>
<%@ page import="com.interwoven.cssdk.filesys.*"%>
<%@ page import="com.interwoven.cssdk.factory.*"%>
<%@ page import="com.interwoven.cssdk.access.*"%>
<%@ page import="java.util.*, java.text.*, java.io.*, java.lang.*, java.net.*"%>
<%
// ***************************************************************************************************************************
// Set-Up Environment
// ***************************************************************************************************************************
// read a factory setting from a properties file
Properties props=new Properties();
InputStream in=(InputStream)getClass().getResourceAsStream("/sampleapp.properties");
props.load(in);
// Using factory properties
props.list(System.out);
in.close();
CSFactory factory=CSFactory.getFactory(props);
String TSDomain[]= factory.getDomains(Locale.getDefault(),"myImport");
CSClient client=null;
// Login parameters
// your test login and password
String username= "tester1";
String password= "password";
String role= "AUTHOR";
String domain= "Domain";
String JspClient= "localhost:9080/sampledir/";
if (username!=null && password!=null && role!=null) {
// get login values from the param request
// Instantiate CSClient object
client = factory.getClient(domain + "\\" + username, role, password, Locale.getDefault(), "MyImport", null);
// User authenticated and client object obtained
// put the client object in the session so other
HttpSession currentSession = request.getSession();
currentSession.setAttribute( "client", client );
}
// Test vpaths
String vFile_Source= "//machine/default/main/WORKAREA/mainWA/Source"; // create this first
String vFile_Target= "//machine/default/main/WORKAREA/mainWA/Target";
CSVPath waPath= new CSVPath ( vFile_Source );
CSVPath targetVPath = new CSVPath ( vFile_Target );
CSAreaRelativePath targetRelVPath =targetVPath.getAreaRelativePath();
out.println("targetRelVPath= " + targetRelVPath.toString() + "<br>");
CSWorkarea wa= client.getWorkarea(waPath.getArea(), false);
CSAreaRelativePath waRelPath =waPath.getAreaRelativePath();
out.println("waPath= " + waPath.toString() + "<br>");
// test copy a file
CSFile PathFile= client.getFile(waPath);
CSFile[] ImpFiles= (CSFile[])PathFile.getChildren();
for (int i=0; i<ImpFiles.length; i++){
out.println("Files in the directory: " + ImpFiles
.getVPath().toString() + "<br>");
ImpFiles
.copy(targetRelVPath, true);
}
%>
Edited by stimpy on 06/17/04 01:40 AM (server time).
Adam Stoller
I haven't tred out any of the code - just taking a shot in the dark - what kind of free space do you have on the two machines - in terms of where temporary file space goes? ($TMP, $TEMP, $TMPDIR, $TEMPDIR, /tmp, /var/tmp, etc.) [note: this could be either on the client side or server side]
If the difference in space is around 22 Mb - that's probably where the problem lies.
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
stimpy
on the dev1 machine - free disk space is about 10 Gigs (and CSFile copy failes at 36 mb)
on the dev2 machine - free disk space is about 99 Gigs (and CSFile copy failes at 14 mb!!)
both on Windows 2000 SP4 running teamsite 6.1
client side
>10Gb free hd space.
windows 2000 SP4, IE6
Edited by stimpy on 06/18/04 01:44 AM (server time).