Problem when upload file
Hello everybody, i need to upload a file to a server and i use the following code:
DiskFileUpload upload=new DiskFileUpload();
List items=upload.parseRequest(request);
Iterator itr=items.iterator();
while(itr.hasNext()) {
FileItem item=(FileItem)itr.next();
if(item.isFormField()) {
String fieldName=item.getFieldName();
if(fieldName.equals("pagina")) {
pagina=item.getString();
if(fieldName.equals("posizione")) {
posizione=item.getString();
if(fieldName.equals("link_pub")) {
link_pub=item.getString();
else {
path=application.getRealPath("/")+"pubblicita"+"/"+pagina+"/"+posizione;
File fullFile=new File(item.getName());
image=item.getName();
savedFile=new File(path+"/"+fullFile.getName());
link_foto=path+"/"+fullFile.getName();
item.write(savedFile);
it is working on local machine (localhost) but i publish the site on the server and i have this problem:
type Status report
message /home/242654543544/www/web/pubblicita/home/1/publicita.gif (Permission denied)
description The requested resource (/home/242654543544/www/web/pubblicita/home/1/publicita.gif (Permission denied)) is not available.
Help me......
How i can give the right permission for upload the file?I try to give the 777 permission to the www/web/ folder but i don thave the permission.
Have i speak with the provider of the hosting?
Similar Messages
-
How to avoid the split problem when uploading the data from csv file
Dear Friends,
I have to upload data from the .csv file to my custom table , i have found a problem when uploading the data .
i am using the code as below , please suggest me what i have to do in this regard
SPLIT wa_raw_csv AT ',' INTO
wa_empdata_csv-status
wa_empdata_csv-userid
wa_empdata_csv-username
wa_empdata_csv-Title
wa_empdata_csv-department.
APPEND wa_empdata_csv TO itab.
in the flat file i can see for one of the record for the field Title as
Director, Finance - NAR............there by through my code the wa_empdata_csv-Title is getting splited data as "Director, and Department field is getting Finance - NAR" , i can see that even though " Director, Finance - NAR" is one word it is getting split .
.......which is the problem iam facing.Please could any body let me know how in this case i should handle in my code that this word
"Director,Finance - NAR" wil not be split into two words.
Thanks & Records
MadhuriHi Madhuri,
Best way to avoid such problem is to use TAB delimited file instead of comma separated data. Generally TAB does not appear in data.
If you are generating the file, use tab instead of comma.
If you cannot modify the format of file and data length in file is fixed character, you will need to define the structure and then move data in fixed length structure.
Regards,
Mohaiyuddin -
Dear All,
My firefox (version 23 on win 7) crashed when upload file on our internal web based application. This happen on two PC, even in firefox safe mode the problem still exist. So, my first conclusion the problem nothing to do with extension. here the crash ID https://crash-stats.mozilla.com/report/index/81220865-36c0-4e10-a484-6d27e2131023 and https://crash-stats.mozilla.com/report/index/86d2b779-9730-4d2c-b276-a86d42131023. I wonder if this happen because jquery modul in our web based application. But when I tried on my laptop, the problem dissapear. I tried to replicate same situation on different server, I mean I put the exact same application source to other server, never meet the same problem. Thus, I suspect may be it related to antivirus that installed in our network which is kaspersky. I am googling, never meet the clue.
If you meet the same problem, please help me.
I am so sorry for my poor english.
Him HimThe crashes are a problem with the winhadnt.dll file (OCular Agent from TEC Solutions Limited) as you can see in the crash reports.
*http://www.freefixer.com/library/file/winhadnt.dll-52397/ -
Problem when uploading a large file in PI - weird SQL I/O errors
Hi guys,
I'm facing a very difficult problem when uploading a 35 MB with an FTPs adapter. I see in the logs that, after the translation to XML, it's going to 170 MB.
I receive the following error in the CC Monitoring:
Error: com.sap.aii.af.ra.ms.api.DeliveryException: Problem inserting 41827ca7-6b8c-4a87-198d-ad8a81fcb12b(OUTBOUND) into the database: com.sap.engine.services.dbpool.exceptions.BaseSQLException: Connection is invalid.
When I look in the NWA Monitoring, I see the following details:
SQL error occurred on connection affhb201:X11:SAPSR3DB: code=17,002, state="null", message="Io exception: Socket closed";
SQL statement is "INSERT INTO "XI_AF_MSG" ("MSG_ID","DIRECTION","MSG_BYTES","TIMES_FAILED","SENT_RECV_TIME","STATUS","CONN_NAME","MSG_TYPE","REF_TO_MSG_ID","ADDRESS","TRANSPORT","CREDENTIAL","TRAN_HEADER","MSG_PROFILE","CONVERSATION_ID","SCHEDULE_TIME","PERSIST_UNTIL","FROM_P........
I cannot check the Visual Admin Logs 'cause I don't have access to them yet.
I'm pretty convinced that some swap memory, message size or whatever setting on the adapter engine or on the Java stack is preventing this. I do not get any message in CC Monitoring when uploading a smaller, 6 MB version of the same file.
Can you please help me solve this or give me some interesting pointers?
Never before did we experience something like this in the PI system. In addition, I didn't find any useful resource on the SDN and throughout the SAP notes for this.
Let me know if you need more info about this.
Best regards,
GeorgeHi George
I am facing the same issue, where did you configure the message split in the Communication Channel?
If I do the message split as you said, is it going to create several files or how does it work?
Thanks in advanced
Emmanuel -
Adobe Send - Problem with uploading files. When is this going to get fixed?
When is the Adobe Send problem with uploading files going to get fixed. Similar to others - I have tried and tried to make Adobe Send work and get an error. I have tried to upload the file and it looks like it uploads and then - it is nowhere to be found.
I then go to Adobe Send Now and it works fine.The problem is the same as described in other similar threads.
I have a 57 MB PowerPoint file I am trying to send using Adobe Send. I go through the normal steps to identify the file and select recipients and then send the file. After the file completes the upload - an error saying there was a problem comes up and the file is not uploaded.
I have tried to upload the file to the site with similar results - error and the file doesn't go.
I can go to the old SendNow site and it works flawlessly.
If I need to get screenshots - let me know. There are several other threads describing this same problem. It isn't something new or not heard of before.
Sent from my iPod -
Error when uploading file in TA: SFP (Form Builder)
Hi Everybody,
i am having a problem in Transaction SFP (Form Builder)
I download a Form Objekt and it was written correct in my Local Drive with the ending xxxx.XML.
Then i wanted to Updold the file, then it says:
"Error occurred when uploading file (unknown file format)
Message no. FPUIFB068"
we are using ERP2005 Rel. SAP ECC 6.0
Hope to hear a solution for my problem.
thank + regards
I.IsmailHi All,
Even I faced the same issue whenI tried to upload the form which was developed in Standalone Live cycle designer and I wanted to upload the same into SAP SFP. Initially I felt that this kind of activity might be supported by SAP Adobe Live Cycle deisgner, But it says the Error wron file foramt....
So what I felt is instead of trying to upload the form by using the tool provided by SAP... I directly copy pasted the XML source code into the SFP newly ccreated blank form. ya..it displays some warning messages...But still since I used a Printable form so I could not face any issue...Might be there would be some effect of this warning in Interactive forms.....
But for copying this you donot want to be a expert in the XML area.. All I did was just copied the source xml file from the line <TEMPLATE> tag and till the end and I replaced in the target xml fiel from the same tag from the top <TEMPLATE>....
and save and activate.....
Regards
Pavan
Edited by: Pavan Bhamidipati on Mar 25, 2011 11:58 AM -
When "Upload File" , show the IE error page
question: when "Upload File" , show the IE error page. How to soluve the problem?
Duplicate post.
when "Upload File" , show the IE error page
when "Upload File" , show the IE error page -
Error occurred when uploading file (unknown file format) in t.code SFP
Hi,
According to SAP Note 1465628 - ESI Limit increased and length of temp. ESI no increased, when we are doing Step 4. PDF form changes (valid for ECC 6.0 and above)....and point (i)...in transaction SFP (From - HR_IN_ESI_005_99), system shows the below message.
Error occurred when uploading file (unknown file format)
Message no. FPUIFB068
Plz guide..Hi Anil,
Refer following links :
Re: Adobe Form assignment
Adobe Uploading form error unknown file forma
Hope this will help.
Regards,
Vivek -
Problem when upload legacy data
Hi all,
I've faced a problem when uploading asset legacy data (AS91) for customer. My customer have started depreciation on May 21, 2009, and I set transfer date is November 30, 2010. So SAP doesn't calculate right planned value for December, 2010. I think that problem related to the first month depreciation. It calculated full month for depreciation (instead of from May 21) and change the planned value for December 2010. So I want SAP just calculate 11 days depreciation for May 2009. How can I config to do this?
Thanks in advance!Hi,
Check in the asset master Opening Start Date for depreciation.. If it is under open mode change that date and see asset explorer for depreciation values.
Thanks,
Padmaja -
Error when uploading file : Return code = 6 in LSMW
Hello All,
Getting the bleow mentioned error in LSMW.
Error when uploading file Return code = 6 )
Is it related to access. please suggest.did you define the file in step 7 without any error and allocate in step 8 without any error before?
I mean in the same system where you execute the read step.
Make sure you have the file not open when you execute the read step. -
Error when uploading file :( Return code = 6 )
Hello All,
Getting the bleow mentioned error in LSMW.
Error when uploading file Return code = 6 )
Is it related to access. please suggest.Hi,
If the Sy-Subrc is 0 then Success,
Sy-SUBRC is 4 then failure,
Sy-SUBRC = 6 then the user might be not access to read the file.
This is due to authorization issue. -
A strange problem when uploading a file in Struts
When i upload a file, the other elements in the form of the jsp cannot be got by the ActionForm, instead, the getters show that they are "null"s. But when i upload no file, everthing is ok.
Moreover, the problem happens when i update an article which can have an picture with it, but when i add a new article, the problem does not appear, instead, the file can be uploaded and other element can also be got.
i think i might be a problem of the volume of the request , because i put more information to update than to add.
Hope someboby can help me with the problem.When i upload a file, the other elements in the form of the jsp cannot be got by the ActionForm, instead, the getters show that they are "null"s. But when i upload no file, everthing is ok.
Moreover, the problem happens when i update an article which can have an picture with it, but when i add a new article, the problem does not appear, instead, the file can be uploaded and other element can also be got.
i think i might be a problem of the volume of the request , because i put more information to update than to add.
Hope someboby can help me with the problem. -
Hello everyone. I am having trouble writing a utility that uses SharePoint web services to upload a file and metatag it. It keeps throwing the following error message:
"The request failed with the error message: -- <html><head><title>Object moved</title></head><body> <h2>Object moved to <a href="/_forms/default.aspx?ReturnUrl=%2fsites%2fgk%2f_vti_bin%2fcopy.asmx">here</a>.</h2>
</body></html> --."
Not sure why. I pass the file that I am going to upload to the subroutine and it is suppose to upload it to the appropriate library. I have burned several days on this problem and I am not sure what is going on. I would appreciate anyone that can point me in
the right direction. Below is the subroutine that I have that is causing the problem. Obviously, I have stripped the name from the example.
Thanks
Mike
******** <Begin snip of code> **********************
Public Shared Sub CreateNewDocumentWithCopyService(ByVal fileName As String)
Dim c As New copyservice.Copy
c.PreAuthenticate = True
c.Credentials = New System.Net.NetworkCredential("[email protected]", "mypassword")
c.Url = "https://x.sharepoint.com/sites/gk/_vti_bin/copy.asmx"
Dim myBinary As Byte() = System.IO.File.ReadAllBytes(fileName)
Dim destination As String = "https://x.sharepoint.com/sites/gk/Gatekeeper%20Reference/" & System.IO.Path.GetFileName(fileName)
Dim destinationUrl As String() = {destination}
Dim info1 As New copyservice.FieldInformation
info1.DisplayName = "Title"
info1.InternalName = "Title"
info1.Type = copyservice.FieldType.Text
info1.Value = "new title"
Dim info2 As New copyservice.FieldInformation
info2.DisplayName = "Modified By"
info2.InternalName = "Editor"
info2.Type = copyservice.FieldType.User
info2.Value = "-1;#servername\\testmoss"
Dim info As copyservice.FieldInformation() = {info1, info2}
Dim resultTest As New copyservice.CopyResult
Dim result As copyservice.CopyResult() = {resultTest}
Try
' When creating new content use the same URL in the SourceURI as in the Destination URL argument
c.CopyIntoItems(destination, destinationUrl, info, myBinary, result)
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub
******** <End snip of code> **********************Hi,
If you want to upload a file to a library in SharePoint 2013 online, I suggest you use Client Object Model or REST API.
The code snippets in the two threads below will be helpful:
http://social.technet.microsoft.com/Forums/sharepoint/en-US/deac7cb7-c677-47b0-acdc-c56b32dfaac8/uploading-bigger-files-using-csom
http://stackoverflow.com/questions/17057074/how-to-download-upload-files-from-to-sharepoint-2013-using-csom
Uploading Files Using the REST API
http://blogs.msdn.com/b/uksharepoint/archive/2013/04/20/uploading-files-using-the-rest-api-and-client-side-techniques.aspx
You can handle the authentication with
SharePointOnlineCredentials object:
http://www.vrdmn.com/2013/01/authenticating-net-client-object-model.html
Best regards
Patrick Liang
TechNet Community Support -
Problem in upload file using oreilly classes
Hi
I stucked on a problem......
I want to upload file from html page....On this page I want only a upload button so that when I click on this button file will upload from my client m/c to server m/c....
I have code n all but browse button on html page....now I want to remove this browse button n want to give the file path somewhere in the code itself........so that on html page there will only the uplod button and by click on this button file will upload from client to server.......server path already there in code.....Please do the needful
Abhishek
I m putting the code here:-
FileUpload.java
upload-FileUpload.java
NOTE: This file is a generated file.
Do not modify it by hand!
package upload;
//custom imports for FileUpload
//add your custom import statements here
import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
import com.oreilly.servlet.MultipartRequest;
import java.util.*;
public class FileUpload extends javax.servlet.http.HttpServlet
protected boolean create() throws java.lang.Exception
return true;
public FileUpload()
{ // Constructor.
private void unhandledEvent( String listenerName, String methodName, java.lang.Object event )
* destroy Method
public void destroy()
super.destroy();
// TODO: implement
* doGet Method
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
System.out.println("abhishek");
response.setContentType( "text/html" );
PrintWriter out = response.getWriter();
out.println("<HTML>");
out.println("<HEAD><TITLE>FileUpload</TITLE></HEAD>");
out.println("<BODY>");
out.println("<H1>FileUpload</H1>");
out.println("Hello World!");
out.println("<P>Default Implementation From PowerJ</P>");
out.println("</BODY></HTML>");
// TODO: implement
* doPost Method
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
PrintWriter out = response.getWriter();
try{
response.setContentType("text/html");
out.println("<HTML>");
out.println("<head><Title>Decoded Uploaded File</title><head>");
out.println("<body>");
out.println("<H1>UploadFile</h1>");
// path must be absolute to upload dir
// This is the decoder class that extracts the parameters and transfer file
// request argument = Http input stream
// c:\\temp\\upload = directory to save file
// 15*1024*1024 = 15mb max size file
MultipartRequest multi = new MultipartRequest(request, "c:\\temp\\upload",15*1024*1024);
// Lists form parameters
out.println("Params:");
Enumeration params = multi.getParameterNames();
out.println("<pre>");
while (params.hasMoreElements()) {
String name = (String)params.nextElement();
String value = multi.getParameter(name);
out.println(name + " = " + value);
out.println("</pre>");
// Show details of uploaded file
out.println("Files:");
Enumeration files = multi.getFileNames();
out.println("<pre>");
while (files.hasMoreElements()) {
String name = (String)files.nextElement();
String filename = multi.getFilesystemName(name);
String type = multi.getContentType(name);
File f = multi.getFile(name);
out.println("name: " + name);
out.println("filename: " + filename);
out.println("type: " + type);
if (f != null) {
out.println("f.toString(): " + f.toString());
out.println("f.getName(): " + f.getName());
out.println("f.exists(): " + f.exists());
out.println("f.length(): " + f.length());
out.println();
out.println("</pre>");
}catch (Exception e){
out.println("<pre>");
e.printStackTrace(out);
out.println("</pre>");
out.println("</body></html>");
* init Method
public void init(ServletConfig config) throws ServletException
super.init(config);
// TODO: implement
* data members
// add your data members here
UploadFile.html
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>File Upload using EAS</title>
</head>
<body>
<form method="POST" enctype="multipart/form-data" action="upload/FileUpload">
<p><b>File Upload using EAS </b></p>
<p>Select file to send: <input type="file" name="name" size="30"></p>
<p>Your Name: <input type="input" name="yourname" size="20"> </p>
<p align="left"><input type="submit" value="Send File" name="submit"></p>
</form>
</body>
</html>
You can download the oreilly files from :- (same code is also here)
http://www.sybase.com/detail?id=1011664where I should write down the file path(The file in client pc....e.g. C:\Documents and Settings\abhishek.jain\Desktop\Daily Order Manual.pdf ) in code........I m getting stuck
-
Problem in Uploading Files with Categories
Hi All,
We are working on uploading files to Content Database(CDB) after creating categories for all files to be uploaded individually. The code is working fine when we are using FdkConstants.ATTRIBUTE_TYPE_STRING for Attributes.ATTRIBUTE_TYPE while creating named-value pair for categoryAttributes. In this case all the files are uploading with category.
But the problem we are facing is, when we use datatype other than STRING for FdkConstants like FdkConstants.ATTRIBUTE_TYPE_INTEGER, or FdkConstants.ATTRIBUTE_TYPE_BINARY…….. category sub class is not creating, and getting errors like
AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: ORACLE.FDK.MetaDataError:ORACLE.FDK.MetadataOperationFailed
faultActor:
faultNode:
faultDetail:
{http://xmlns.oracle.com/content/ws}fault:<detailedErrorCode xsi:type="xsd:string">ORACLE.FDK.MetadataOperationFailed</detailedErrorCode><errorCode xsi:type="xsd:string">ORACLE.FDK.MetaDataError</errorCode><exceptionEntries xsi:type="ns1:ArrayOfFdkExceptionEntry" xsi:nil="true"/><info xsi:type="ns1:ArrayOfNamedValue" xsi:nil="true"/><serverStackTraceId xsi:type="xsd:string"/>
{http://xml.apache.org/axis/}hostname:bluejays.appsassociates.com
ORACLE.FDK.MetaDataError:ORACLE.FDK.MetadataOperationFailed
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
at java.lang.Class.newInstance0(Class.java:350)
at java.lang.Class.newInstance(Class.java:303)
at org.apache.axis.encoding.ser.BeanDeserializer.<init>(BeanDeserializer.java:104)
at org.apache.axis.encoding.ser.BeanDeserializer.<init>(BeanDeserializer.java:90)
at oracle.ifs.fdk.FdkException.getDeserializer(FdkException.java:270)
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.apache.axis.encoding.ser.BaseDeserializerFactory.getSpecialized(BaseDeserializerFactory.java:154)
at org.apache.axis.encoding.ser.BaseDeserializerFactory.getDeserializerAs(BaseDeserializerFactory.java:84)
at org.apache.axis.encoding.DeserializationContext.getDeserializer(DeserializationContext.java:464)
at org.apache.axis.encoding.DeserializationContext.getDeserializerForType(DeserializationContext.java:547)
at org.apache.axis.message.SOAPFaultDetailsBuilder.onStartChild(SOAPFaultDetailsBuilder.java:157)
at org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1035)
at oracle.xml.parser.v2.NonValidatingParser.parseElement(NonValidatingParser.java:1276)
at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:324)
at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:291)
at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:207)
at oracle.xml.jaxp.JXSAXParser.parse(JXSAXParser.java:292)
at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
at org.apache.axis.Message.getSOAPEnvelope(Message.java:424)
at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
at org.apache.axis.client.Call.invokeEngine(Call.java:2765)
at org.apache.axis.client.Call.invoke(Call.java:2748)
at org.apache.axis.client.Call.invoke(Call.java:2424)
at org.apache.axis.client.Call.invoke(Call.java:2347)
at org.apache.axis.client.Call.invoke(Call.java:1804)
at oracle.ifs.fdk.CategoryManagerSoapBindingStub.createCategorySubClass(CategoryManagerSoapBindingStub.java:611)
at oracle.ifs.fdk.client.impl.CategoryManagerProxy.createCategorySubClass(CategoryManagerProxy.java:100)
at scheduleUpload.AarlmsUpload.createCategory(AarlmsUpload.java:851)
Can anyone please solve our problem why this is happening? Please give solution as early as possible.
Thanks in advance
EswariHi Shashikumar,
Can i have your mail id.
I have some documents on bid process.
Best Regards,
Anil Rajpal
Maybe you are looking for
-
Move an subscription from one account to another
I would like to move my premium subscription from one account to another. Where can I do this?
-
Calling a Swing class method from from another swing class method
Hi guys, I'm desperate for help or a pointing in the right direction. Basically, I want to call the public void createUI method in class AddressUI in the public void createUI method of PartnerUI class. Is that legal? How do I go about it? Thanks. pac
-
HT3728 how to reset my ipod touch
I have been locked out of my ipodtouch and do not know the passcode
-
I have tried to run and deploy demo web app that comes with java mail 1.3, but while logging i have got the following error: javax.mail.MessagingException: Connection timed out: connect; nested exception is: java.net.ConnectException: Connection time
-
while posting of business transaction in f-22 & f-48 after g/l account number the system showing syntax error tax code is missing Runtime Errors SYNTAX_ERROR Date and Time 06.05.2009 11:42:28 Short text Syntax error in program