Java.io.IOException in servlet-based file upload

Hi,
          I'm running into some problems with Weblogic Server 5.1 on Unix (Solaris), while
          trying to do a servlet-based file upload. I'm trying to upload a file to the
          server file system through a file upload servlet running inside Weblogic Server
          5.1, and I get an exception when I try to create a file on the Unix server
          filesystem:
          java.io.IOException: Not owner
          at java.io.UnixFileSystem.createFileExclusively(Native Method)
          at java.io.File.createNewFile(File.java:692)
          at com.cysive.filemanagement.UploadFile.save(UploadFile.java:84)
          I tried changing the upload location to various places, like directly in the
          docroot (myserver/public_html), in my home directory, etc. I am not sure which
          owner Weblogic is looking for, because the process is owned by whoever starts
          the WL server. And the strange thing is, I am able to create new directories on
          the file system, just not files.
          When I run the exact code on WinNT, everything works fine... I am able to create
          files and directories and the upload goes through smoothly.
          I'm thinking there is something I need to be setting in the weblogic.properties
          file on Unix by way of permissions/privileges that is not required on WinNT, but
          was not able to find anything in the documentation.
          Could anyone help, please?
          Thanks.
          Hrishi
          

Check what user/group you are running your weblogic server.(check out the user who starts as well as UID/user/group in weblogic.properties file if you have set them).
check out whether that user/group has necessary permission on unix m/c
Hrishi Dixit <[email protected]> wrote:
>
Hi,
I'm running into some problems with Weblogic Server on Unix, while trying to do
a servlet-based file upload. I'm trying to upload a file to the server file
system through a file upload servlet running inside Weblogic Server 5.1, and I
get an exception when I try to create a file on the Unix server filesystem:
java.io.IOException: Not owner
     at java.io.UnixFileSystem.createFileExclusively(Native Method)
     at java.io.File.createNewFile(File.java:692)
     at com.cysive.filemanagement.UploadFile.save(UploadFile.java:84)
I tried changing the upload location to various places, like directly in the
docroot (myserver/public_html), in my home directory, etc. I am not sure which
owner Weblogic is looking for, because the process is owned by whoever starts
the WL server. And the strange thing is, I am able to create new directories on
the file system, just not files.
When I run the exact code on WinNT, everything works fine... I am able to create
files and directories and the upload goes through smoothly.
I'm thinking there is something I need to be setting in the weblogic.properties
file on Unix by way of permissions/privileges that is not required on WinNT, but
was not able to find anything in the documentation.
Could anyone help, please?
Thanks.
Hrishi

Similar Messages

  • Getting java.io.IOException: Too many open files+ClassNotFoundException

    Dear All
    We have a web application deployed on Rational Application Developer 6.0 (Operating System is Windows 2000 professional) our users are randomly getting java.io.IOException: Too many open files+ClassNotFoundException when they click on some servlet or jsp link, but they are getting this error randomly for example when they click some link they may get these exceptions but refreshing page or clicking once again on same link executes servlet successfully.If anyone could help on this topic we will be grateful
    Thanks

    I think this these two exceptions are occuring in differrent environment
    java.io.IOException is occuring under heavy load to web server its stack trace is as follows:
    JSPG0225E: An error occurred at line: 2 in the statically included file: /SessionCheck.jsp
    JSPG0093E: Generated servlet error from file: /Admin/AdminInsuranceCertificates.jsp
    E:\WebSphere_6\AppServer\profiles\AUSECert\temp\centraNode04\server1\AUSECert\Vero.war\Admin\_AdminInsuranceCertificates.java:259: cannot access com.bplus.natmar.LoginDetails
    bad class file: E:\WebSphere_6\AppServer\java\jre\lib\core.jar(java/io/Writer.class)
    unable to access file: E:\WebSphere_6\AppServer\profiles\AUSECert\installedApps\centraNode04Cell\AUSECert.ear\Vero.war\WEB-INF\classes\com\bplus\natmar\LoginDetails.class (Too many open files)
    Please remove or make sure it appears in the correct subdirectory of the classpath.
    (source unavailable)
    1 error
    ]: com.ibm.ws.jsp.JspCoreException: JSPG0049E: /Admin/AdminInsuranceCertificates.jsp failed to compile :
    this error always occurs in reference to logindetails class this clas is used to make a session check on different roles in our project for e.g., user having end user role should not be able to log in as a user having admin role
    we have included a sessioncheck.jsp in our every jsp page in this jsp we have simply used logindetails class as useBean and called its getresource() method
    above stacktrace is from our live application server
    while testing same project on our local system we are not getting too many open files exception but we are getting following ClassNotFoundException
    [11/30/05 17:11:42:797 EST] 0000004a SystemOut O SELECT count(*) as NoofRecs FROM resourcerolebindings WHERE ResourceName = 'mainEdit.jsp' and IsEndUser=1
    [11/30/05 17:12:50:891 EST] 000001eb SystemOut O SELECT count(*) as NoofRecs FROM resourcerolebindings WHERE ResourceName = 'InsuranceCertificates.jsp' and IsEndUser=1
    [11/30/05 17:17:40:828 EST] 0000008d SystemOut O AppURL is: http://www.VeroECert.com/Vero/indexU.jsp
    [11/30/05 17:17:58:141 EST] 0000008b SystemOut O SELECT count(*) as NoofRecs FROM resourcerolebindings WHERE ResourceName = 'InsuranceCertificates.jsp' and IsEndUser=1
    [11/30/05 17:20:41:703 EST] 00000034 ServletWrappe E SRVE0026E: [Servlet Error]-[com.servlet.UserHelpServlet]: java.lang.ClassNotFoundException: com.servlet.UserHelpServlet
         at com.ibm.ws.classloader.CompoundClassLoader.findClass(CompoundClassLoader.java(Compiled Code))
         at com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClassLoader.java(Compiled Code))
         at java.lang.ClassLoader.loadClass(ClassLoader.java(Compiled Code))
         at java.beans.Beans.instantiate(Beans.java:202)
         at java.beans.Beans.instantiate(Beans.java:63)
         at com.ibm.ws.webcontainer.servlet.ServletWrapper$3.run(ServletWrapper.java:1384)
         at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java(Compiled Code))
         at com.ibm.ws.webcontainer.servlet.ServletWrapper.loadServlet(ServletWrapper.java(Compiled Code))
         at com.ibm.ws.webcontainer.servlet.ServletWrapper.initialize(ServletWrapper.java:1312)
         at com.ibm.wsspi.webcontainer.extension.WebExtensionProcessor.createServletWrapper(WebExtensionProcessor.java:84)
         at com.ibm.ws.webcontainer.extension.InvokerExtensionProcessor.handleRequest(InvokerExtensionProcessor.java:238)
         at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:2841)
         at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:220)
         at com.ibm.ws.webcontainer.VirtualHost.handleRequest(VirtualHost.java:204)
         at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java(Compiled Code))
         at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java(Compiled Code))
         at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java(Compiled Code))
         at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java(Compiled Code))
         at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java(Compiled Code))
         at com.ibm.ws.tcp.channel.impl.WorkQueueManager.requestComplete(WorkQueueManager.java(Compiled Code))
         at com.ibm.ws.tcp.channel.impl.WorkQueueManager.attemptIO(WorkQueueManager.java(Compiled Code))
         at com.ibm.ws.tcp.channel.impl.WorkQueueManager.workerRun(WorkQueueManager.java(Compiled Code))
         at com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worker.run(WorkQueueManager.java(Compiled Code))
         at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java(Compiled Code))
    this error is occuring on concurrent clicks suppose three users click on same button then it is possible that one user gets correct output while other users experience this exception
    Also one more point we are not using web.xml for calling servlets we are directly calling it giving its full path.
    Thanks

  • Java.io.IOException: Too many open files while deploying in soa 11g

    hi all,
    I am getting a strange error while deploying any composite .. it's a hello world kinda composite but while i am trying to deploy it i am getting "java.io.IOException: Too many open files" while deployment.. i have tried to deploy it in 2-3 ways but all of them resulted in the same error..bouncing the soa server might be an option but can someone give an insight as why it is happening and can it be resolved without restarting the server..
    Thanks

    yes..so this problem is with unix only ..coz i previously worked in Windows ..never got this problem..

  • "java.io.IOException: Too many open files"  in LinuX

    Hi Developers,
    * I am continiously running and processing more than 2000 XML files by using SAX and DOM.....
    * My process is as follows,
    - Converting the XML file as Document object by DOM....
    - And that DOM will be used while creating log file report, that log file will be created after executing all XML files..
    * After processing approx 1000 files, it throws *"java.io.IOException: Too many open files" in LinuX system* ....
    * I have googled more and more in all sites including sun forum also, but they are telling only to increase the system config by ULIMIT in linux....If i increase that its executing well without exception........
    * My question is, Is it possible to do it by JAVA code itself or any other VM arguments like -Xms512m and -Xmx512m.....
    * Please let me know , if you have any idea.....
    Thanks And Regards,
    JavaImran

    Doh! I forgot to post my little code sample...
    package forums.crap;
    import java.io.*;
    import java.util.*;
    public class TooManyFileHandles
      private static final int HOW_MANY = 8*1024;
      public static void main(String[] args) {
        List<PrintWriter> writers = new ArrayList<PrintWriter>(HOW_MANY);
        try {
          try {
            for (int i=1; i<=HOW_MANY; i++ ) {
              writers.add(new PrintWriter("file"+i+".txt"));
          } finally {
            for (PrintWriter w : writers) {
              if(w!=null)w.close();
        } catch (Exception e) {
          e.printStackTrace();
    }... and the problem still isn't OOME ;-)
    Cheers. Keith.

  • Java.io.IOException: Too many open files

    I am running web-service, by which i have to run .sh file on linux. My code is as follow,
    import java.io.BufferedReader;
    import java.io.IOException;
    import java.io.InputStreamReader;
    public class DomRenewProcessN4Vrsgn
         Process process;
         String s;
         String step;
    public String renewDomain(String ACTIVITY_ID,String DOMAIN_NAME,String DURATION,String EXPIRY_DATE)
              //readOutput(ITEM_ID,TLD);
              Runtime runtime;
                   runtime = Runtime.getRuntime();
                   String domRegisterCmd = "";
                   domRegisterCmd = "sh /home/kesharil/DomainRenew/n4vrsgn/DomainRenew-n4vrsgn.sh"+ " " ACTIVITY_ID " " DOMAIN_NAME" "+DURATION+" "+EXPIRY_DATE;
                   try
                   runtime = Runtime.getRuntime();
                   step=runtime.toString();
                   process =runtime.exec(domRegisterCmd);// + " " ITEM_ID " "+TLD);
                   step=step+process;
                   BufferedReader reader = new BufferedReader(
                   new InputStreamReader(process.getInputStream()));
                   step=step+reader.toString();
                   s = reader.readLine();
                   step=step+s.toString();
                   try
                        process.waitFor();
                   catch (InterruptedException e)
                        return e.getMessage()+1;
                   catch (IOException ex)
                        return ex.getMessage()+step;
              process.destroy();
              int k=process.exitValue();
              String x=String.valueOf(k);
              return x;
    After every 5-6 days, I am getting same error, "java.io.IOException: Too many open files"

    hi,
    domRegisterCmd = "sh /home/kesharil/DomainRenew/n4vrsgn/DomainRenew-n4vrsgn.sh{code}
    you are opening the above file and not closing,,
    so that each and every file still in existence, one the memory full, then you are getting this error..
    please to confirm on this..                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • OSB is throwing java.io.IOException: Failed to rename file

    Hi,
    I'm getting the below error when I try to deploy the OSB code changes via OEPE:
    +<Error> <ConfigFwk> <D---00146903> <AdminServer> <[ACTIVE] ExecuteThread: '5' for queue: 'weblogic.kernel.Default (self-tuning)'> <admin> <> <d71c3b335fa8baa2:39d72cb4:13951f6b38f:-8000-00000000000000bf> <1345702069308> <BEA-000000> <Failed to commit changes to file D:\Oracle\Middleware\user_projects\domains\base_domain\osb\config\sessions\ALSB_IDE_Internal_PublishOp_1345525-4159\_binary\SessionData\singleton+
    java.io.IOException: Failed to rename file 'D:\Oracle\Middleware\user_projects\domains\base_domain\osb\config\sessions\ALSB_IDE_Internal_PublishOp_1345525-4159\_binary\SessionData\singleton.gz.upd~' to 'D:\Oracle\Middleware\user_projects\domains\base_domain\osb\config\sessions\ALSB_IDE_Internal_PublishOp_1345525-4159\_binary\SessionData\singleton'
    +     at com.bea.wli.config.transaction.TransactionalFileManager._renameFile(TransactionalFileManager.java:1660)+
    +     at com.bea.wli.config.transaction.TransactionalFileManager.commitFile(TransactionalFileManager.java:448)+
    +     at com.bea.wli.config.transaction.TransactionalFileManager.commit(TransactionalFileManager.java:320)+
    +     at com.bea.wli.config.transaction.TransactionalFileManager.commit(TransactionalFileManager.java:298)+
    +     at com.bea.wli.config.transaction.TransactionManager.commit(TransactionManager.java:1495)+
    +     at com.bea.wli.config.transaction.TransactionManager._endTransaction(TransactionManager.java:842)+
    +     at com.bea.wli.config.transaction.TransactionManager.endTransaction(TransactionManager.java:783)+
    +     at com.bea.wli.config.deployment.server.ServerDeploymentReceiver$2.run(ServerDeploymentReceiver.java:275)+
    +     at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)+
    +     at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)+
    +     at com.bea.wli.config.deployment.server.ServerDeploymentReceiver.commit(ServerDeploymentReceiver.java:260)+
    +     at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doCommitCallback(DeploymentReceiverCallbackDeliverer.java:195)+
    +     at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$100(DeploymentReceiverCallbackDeliverer.java:13)+
    +     at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$2.run(DeploymentReceiverCallbackDeliverer.java:68)+
    +     at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:528)+
    +     at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)+
    +     at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)+
    +>+
    OSB version: 11.1.1.5
    Please help me to resolve this issue.
    Thanks,
    Hari

    Hari,
    If it is multi user environment then ask all users to close their sessions using change center. If it is a single user environment then please rename the sessions folder (D:\Oracle\Middleware\user_projects\domains\base_domain\osb\config\sessions\ALSB_IDE_Internal_PublishOp_1345525-4159) and restart all the servers. It should solve the problem.
    Also check whether the OS user who started the servers, has full access to the complete domain folder and permission to create directories/files into the domain folder and it's subfolders.
    Regards,
    Anuj

  • Java.io.IOException in file upload: WLS 5.1 on Unix

    Hi,
    I'm running into some problems with Weblogic Server on Unix, while trying to do
    a servlet-based file upload. I'm trying to upload a file to the server file
    system through a file upload servlet running inside Weblogic Server 5.1, and I
    get an exception when I try to create a file on the Unix server filesystem:
    java.io.IOException: Not owner
         at java.io.UnixFileSystem.createFileExclusively(Native Method)
         at java.io.File.createNewFile(File.java:692)
         at com.cysive.filemanagement.UploadFile.save(UploadFile.java:84)
    I tried changing the upload location to various places, like directly in the
    docroot (myserver/public_html), in my home directory, etc. I am not sure which
    owner Weblogic is looking for, because the process is owned by whoever starts
    the WL server. And the strange thing is, I am able to create new directories on
    the file system, just not files.
    When I run the exact code on WinNT, everything works fine... I am able to create
    files and directories and the upload goes through smoothly.
    I'm thinking there is something I need to be setting in the weblogic.properties
    file on Unix by way of permissions/privileges that is not required on WinNT, but
    was not able to find anything in the documentation.
    Could anyone help, please?
    Thanks.
    Hrishi

    Check what user/group you are running your weblogic server.(check out the user who starts as well as UID/user/group in weblogic.properties file if you have set them).
    check out whether that user/group has necessary permission on unix m/c
    Hrishi Dixit <[email protected]> wrote:
    >
    Hi,
    I'm running into some problems with Weblogic Server on Unix, while trying to do
    a servlet-based file upload. I'm trying to upload a file to the server file
    system through a file upload servlet running inside Weblogic Server 5.1, and I
    get an exception when I try to create a file on the Unix server filesystem:
    java.io.IOException: Not owner
         at java.io.UnixFileSystem.createFileExclusively(Native Method)
         at java.io.File.createNewFile(File.java:692)
         at com.cysive.filemanagement.UploadFile.save(UploadFile.java:84)
    I tried changing the upload location to various places, like directly in the
    docroot (myserver/public_html), in my home directory, etc. I am not sure which
    owner Weblogic is looking for, because the process is owned by whoever starts
    the WL server. And the strange thing is, I am able to create new directories on
    the file system, just not files.
    When I run the exact code on WinNT, everything works fine... I am able to create
    files and directories and the upload goes through smoothly.
    I'm thinking there is something I need to be setting in the weblogic.properties
    file on Unix by way of permissions/privileges that is not required on WinNT, but
    was not able to find anything in the documentation.
    Could anyone help, please?
    Thanks.
    Hrishi

  • File Upload: Please Help

    Hi Ppl, Will midp allow me to write an application that can upload a file preferably less than 100kb in a file server.

    Unless you're required to use FTP, it might be worth looking at doing the upload via an HTTP POST. Look at [RFC 1867 - Form-based File Upload in HTML|http://www.ietf.org/rfc/rfc1867.txt]. This is fairly easy to implement on the client side, and since it's the same technique that browsers use for file upload, there's usually a straightforward way to implement server side support. There's some sample code for a servlet to receive the file at [http://www.servlets.com/cos/|http://www.servlets.com/cos/].

  • HELP !...getting ERROR: java.io.IOException: CreateProcess: ... error=3

    I use stand alone "XMLBeans survival kit" ( which I downloaded on 11/1/03 from
    BEA site ). I use its xmlbean.jar and it works fine. I did not use its "scomp"
    utility until today ( I used BEA's on-line compiler and it worked just great ).
    When I tried to use the stand alone "scomp" , I've got into trouble. Here is the
    trace of the error I receive for all schemas including the example schema ( I
    have followed the instructions described in the attached README file for the environment
    configuration) :
    C:\WSAD_Workspaces\dc_xml_beans\xml_to_java\test>scomp -out myeasypo.jar C:\XMLBeanToolkit\xkit\schemas\easypo
    Loading schema file C:\XMLBeanToolkit\xkit\schemas\easypo\easypo.xsd
    Loading config file C:\XMLBeanToolkit\xkit\schemas\easypo\easypo.xsdconfig
    Time to build schema type system: 1.297 seconds
    java.io.IOException: CreateProcess: "C:\Program Files\Java\j2re1.4.1_05\..\bin\javac.exe"
    -J-Xmx256M @C:\DOCUME~1\a337335\LOCALS~1\Temp\javac31952 error=3
    null
    java.io.IOException: CreateProcess: "C:\Program Files\Java\j2re1.4.1_05\..\bin\javac.exe"
    -J-Xmx256M @C:\DOCUME~1\a337335\LOCALS~1\Temp\javac31952 error=3
    at java.lang.Win32Process.create(Native Method)
    at java.lang.Win32Process.<init>(Win32Process.java:67)
    at java.lang.Runtime.execInternal(Native Method)
    at java.lang.Runtime.exec(Runtime.java:566)
    at java.lang.Runtime.exec(Runtime.java:491)
    at java.lang.Runtime.exec(Runtime.java:457)
    at com.bea.xbean.tool.CodeGenUtil.externalCompile(CodeGenUtil.java:167)
    at com.bea.xbean.tool.SchemaCodeGenerator.compileTypeSystem(SchemaCodeGenerator.java:178)
    at com.bea.xbean.tool.SchemaCompiler.compileImpl(SchemaCompiler.java:547)
    at com.bea.xbean.tool.SchemaCompiler.main(SchemaCompiler.java:141)
    BUILD FAILED
    Please, help me to find what is wrong here !!!
    Thank you,
    - Michael P.
    [README.txt]

    Sorry, folks, the answer was quite simple: the default scomp script has pointed
    to "wrong" location for java.exe. In particular, the scrip has specified compilation
    command like this:
    java -classpath %cp% com.bea.xbean.tool.SchemaCompiler %*
    while it had to specify path to the java.exe based on JAVA_HOME env. variable
    ( I am saying "had" because README instructions state that the JAVA_HOME has to
    be properly configured ). So, the solution looks like:
    %JAVA_HOME%\bin\java -classpath %cp% com.bea.xbean.tool.SchemaCompiler %*
    - Michael P.
    "Michael P." <[email protected]> wrote:
    >
    >
    >
    I use stand alone "XMLBeans survival kit" ( which I downloaded on 11/1/03
    from
    BEA site ). I use its xmlbean.jar and it works fine. I did not use its
    "scomp"
    utility until today ( I used BEA's on-line compiler and it worked just
    great ).
    When I tried to use the stand alone "scomp" , I've got into trouble.
    Here is the
    trace of the error I receive for all schemas including the example schema
    ( I
    have followed the instructions described in the attached README file
    for the environment
    configuration) :
    C:\WSAD_Workspaces\dc_xml_beans\xml_to_java\test>scomp -out myeasypo.jar
    C:\XMLBeanToolkit\xkit\schemas\easypo
    Loading schema file C:\XMLBeanToolkit\xkit\schemas\easypo\easypo.xsd
    Loading config file C:\XMLBeanToolkit\xkit\schemas\easypo\easypo.xsdconfig
    Time to build schema type system: 1.297 seconds
    java.io.IOException: CreateProcess: "C:\Program Files\Java\j2re1.4.1_05\..\bin\javac.exe"
    -J-Xmx256M @C:\DOCUME~1\a337335\LOCALS~1\Temp\javac31952 error=3
    null
    java.io.IOException: CreateProcess: "C:\Program Files\Java\j2re1.4.1_05\..\bin\javac.exe"
    -J-Xmx256M @C:\DOCUME~1\a337335\LOCALS~1\Temp\javac31952 error=3
    at java.lang.Win32Process.create(Native Method)
    at java.lang.Win32Process.<init>(Win32Process.java:67)
    at java.lang.Runtime.execInternal(Native Method)
    at java.lang.Runtime.exec(Runtime.java:566)
    at java.lang.Runtime.exec(Runtime.java:491)
    at java.lang.Runtime.exec(Runtime.java:457)
    at com.bea.xbean.tool.CodeGenUtil.externalCompile(CodeGenUtil.java:167)
    at com.bea.xbean.tool.SchemaCodeGenerator.compileTypeSystem(SchemaCodeGenerator.java:178)
    at com.bea.xbean.tool.SchemaCompiler.compileImpl(SchemaCompiler.java:547)
    at com.bea.xbean.tool.SchemaCompiler.main(SchemaCompiler.java:141)
    BUILD FAILED
    Please, help me to find what is wrong here !!!
    Thank you,
    - Michael P.

  • Help with file uploader, php script, Windows Authentication

    I am trying to setup a really basic web-based file uploader that I will expand upon later. I have the flex application working well enough (very basic). However, I have a php script in a secure folder using windows authentication. When I try to send the file to the script, it doesn't seem to like my credentials, and refuses to do anything. I do not get an error message; just nothing happens.
    My questions are:
    Does anybody know where I should've looked before posting this thread?
    Do I even have PHP set up correctly? (At first I just made a txt file and put a .php extension on it, then I tried to setup PHP on the server, but it was a little confusing for me)
    Is Windows Authentication the problem?
    I do plan on implementing SQL Server in the future (to keep track of Files and user-defined attributes for files), but I do not want to store the files in SQLserver, just their pathnames.
    Is there a simple way to use ColdFusion (for free) to acheive this end?
    I am somewhat experienced at coding applications, but am totally new to server-side scripts.
    This is my php script:
    <?php
    $tempFile = $_FILES['Filedata']['tmp_name'];
    $fileName = $_FILES['Filedata']['name'];
    $fileSize = $_FILES['Filedata']['size'];
    move_uploaded_file($tempFile, "./" . $fileName);
    ?>
    This is my flex application:
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                      xmlns:s="library://ns.adobe.com/flex/spark"
                      xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600">
    <fx:Script>
         <![CDATA[
         private var fileRef:FileReference
         private var uploadFilePath:String
         private function selectFile():void
              fileRef = new FileReference();
              fileRef.addEventListener(Event.SELECT, fileRef_select);
              fileRef.browse();
         private function fileRef_select(evt:Event):void
              fileRef.upload(new URLRequest("http://SERVERLOCATION/PDFUploader.php"));
         ]]>
    </fx:Script>
         <s:Button top="30" left="5" label="Browse" click="selectFile()"/>
    </s:Application>
    Thanks to any who take the time to respond.

    Hey, so far all I have found is this tutorial.. I'm about to try it out
    http://www.smartwebby.com/Flash/external_data.asp

  • Java.io.IOException: CreateProcess............

    Hello,
    I got this exception when I ran my build file on Eclipse. If I ran it outside
    Eclipse,
    everything works fine.
    java.io.IOException: CreateProcess: "C:\Program Files\Java\j2re1.4.2\..\bin\javac.exe"
    -J-Xmx256M @C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\javac53402 error=3
    The error comes from the following place:
    [xmlbean]      at com.bea.xbean.tool.CodeGenUtil.externalCompile(CodeGenUtil.java:167)
    It seems the above method is not getting the correct "java.home", it should get
    jdk/bin/javac.
    Can anyone give a pointer on this?
    thanks,

    Hello,
    I got this exception when I ran my build file on Eclipse. If I ran it outside
    Eclipse,
    everything works fine.
    java.io.IOException: CreateProcess: "C:\Program Files\Java\j2re1.4.2\..\bin\javac.exe"
    -J-Xmx256M @C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\javac53402 error=3
    The error comes from the following place:
    [xmlbean]      at com.bea.xbean.tool.CodeGenUtil.externalCompile(CodeGenUtil.java:167)
    It seems the above method is not getting the correct "java.home", it should get
    jdk/bin/javac.
    Can anyone give a pointer on this?
    thanks,

  • File upload program by jsf

    I am doing one file upload program using
    <af:inputFile label="File to Upload" columns="90"
    value="#{FileProcessor.uploadedFile}"/>
    component..
    in Jdeveloper 11g i am getting the correct result,
    but when i'm tryin to run it in Jdeveloper jdevstudio10131 it is giving this error.
    java.io.EOFException: Per-request disk space limits exceeded. at oracle.adfinternal.view.faces.webapp.UploadedFileImpl.loadFile(UploadedFileImpl.java:187) at
    i want this file upload application to run in ecplise..but there it is not working..do i need so some to import some jar files??
    tomat 5.0 i'm using there..
    Or is there any otherway to upload file using jsf component which should work in eclipse-tomcat enviornment also..
    please help
    thanks

    Mr BalusC,
    Yes Iam talking about a custom made upload component. The fileupload tutorials u send are good but my requirement is not meeting them. Among my requirements one is mutilple file uploads in the single view page. This is possible at present with my custom upload componet. Only if the problem gets solved. Any way once again please think on my problem and give your solution on it.
    Here is my problem:
    The problem is I have to access the components from view page which this kind of requirement possible in jsp by request parsing which results the key value pairs of the form components. This same thing/way I should get in backing bean from JSF view page.
    The solution I want may like as follows.
    Note this code is incorrect and wrong but for to understand my requirement.
    someobject.getComponentIdValue("clientID"); which returns a string value as d:\images\Tutle.jpg
    The clientID is upload file component' Id . In the request it may be the key associated with value as file complete path. By this kind of way my upload filter is able to get the orignal file. Ok i need this in my  backing bean to get the orignal filename to insert into the database. Please for this give the solution or reply.many thanx,
    vijaycanaan.

  • Upload Friendly (Multiple File Upload Applet)

    Title : Upload Friendly (Multiple File Upload Applet)
    Description : UploadFriendly is an easy to use Java Applet that will allow multiple file
    uploads on a web server in a web page. The control supports file filtering, limits and more.
    Samples available in the following languages: ASP, ASP.NET, PHP, Coldfusion and JSP
    Link: http://www.uploadfriendly.com/
    Type: Commercial (30 days Trial)

    Hi shiil,
    To move the documents between site collection, content organizer rules would be a recommended method, you can activate Content Organizer features to enable content organizer rules on the site, to root the document to another site collection.
    Also, for this issue, as Prasath suggested, you can check out the document in the ItemAdded event, then add ItemCheckedout event, in the ItemCheckedout event, delete the document. Or as content organizer rule does, you can create your own timer job to move
    the document.
    More information, Content Organizer Feature Overview for SharePoint Server 2010 Developers (ECM):
    http://msdn.microsoft.com/en-us/library/office/ee558288(v=office.14).aspx
    Thanks,
    Qiao Wei
    TechNet Community Support

  • Build Failed: java.io.IOException: CreateProcess

    Hi,
    Would someone help me on my problem. I had encountered a "java.io.IOException: CreateProcess" when the ant script was about to execute the lines below:
    <java classname="AllTests" fork="true" failonerror="yes">
         <classpath>
              <path refid="all.classpath" />
              <path refid="emma.coverage.classes" />
              <pathelement location="${emma.instr}" />
              <pathelement location="${classes.temp}" />
         </classpath>
         <jvmarg
              value="-Demma.coverage.out.file=${emma.coverage}/coverage.emma" />
         <jvmarg value="-Demma.coverage.out.merge=true" />
    </java>
    The result and the message was stated below.
    BUILD FAILED
    C:\RAD901\build\emma-build.xml:89: java.io.IOException: CreateProcess: "C:\Program Files\IBM\Rational\SDP\6.0\runtimes\base_v6\java\
    jre\bin\java.exe" -Demma.coverage.out.file=C:\RAD901\build/temp/emma/coverage/coverage.emma -Demma.coverage.out.merge=true -classpat
    h "C:\RAD901\build\libs\XmlWriter.jar;C:\RAD901\build\libs\cactus1-6\aspectjrt-1.1.1.jar;C:\RAD901\build\libs\cactus1-6\cactus-1.6.1
    .jar;C:\RAD901\build\libs\cactus1-6\cactus-ant-1.6.1.modified.jar;C:\RAD901\build\libs\cactus1-6\commons-codec-1.3.jar;C:\RAD901\bui
    ld\libs\cactus1-6\commons-httpclient-3.0.1.jar;C:\RAD901\build\libs\cactus1-6\commons-logging-1.0.3.jar;C:\RAD901\build\libs\cactus1
    -6\httpunit-1.5.4.jar;C:\RAD901\build\libs\cactus1-6\nekohtml-0.7.4.jar;C:\RAD901\build\libs\catalina.jar;C:\RAD901\build\libs\com-d
    arwinsys-util.jar;C:\RAD901\build\libs\commons-pool-1.4.jar;C:\RAD901\build\libs\db2jcc.jar;C:\RAD901\build\libs\db2jcc_license_cu.j
    ar;C:\RAD901\build\libs\emma.jar;C:\RAD901\build\libs\hapi-0.5.1.jar;C:\RAD901\build\libs\jboss-common.jar;C:\RAD901\build\libs\jstl
    -1.0.jar;C:\RAD901\buil
    The result was incomplete. I don't know why, but I would like to know the cause of my exception. I hope somebody could help me.
    Thank you so much in advance.

    Hello all,
    I'm having almost the same issue related to error message when I hit a button on my manufacturing software.
    *"ScriptException: Error in exec: java.io.IOException: CreateProcess*
    *exec(C:\\progra~1\\intern~1\\iexplore.exe http://cbweb4:81/barcode/CMbombyorder.asp\u003FR2=P&T2=12875424-P")*
    This is when I hit a button that works for us to show this webpage I wrote previously. Last week we didnt have this issue, this just started this morning and I dont know what do to, it shows something about JAVA, that's why I'm asking to you guys, I dont know if you could please enlight me a little bit.
    Thanks in advance.

  • Session tracking for File Upload Servlet

    Hey Friends,
    I am developing a File Upload servlet and I need your help in certain matters .I have taken the servlet code from java-edge.com and am modifying it to give custom behaviour.I have a main page for upload (form upload)(lets call it form 1).If the file to be uploaded already exists on the server then a page is generated by the server saying that file already exists.(form 2)Now it is here(in form 2) that I want to provide an extra button which when submitted would recall the same servlet /or maybe another one and would provide the user for overriding the existing file.
    Now as per the code I would set the Override flag to be false in the second form and false in the main form .
    Given the case that it is a form based uploading servlet how do I maintain the user session when going to the next form or how do i pass the variables of the first form into second form .
    I am also facing another problem that is how do i manage multiple file uploads at a time .This basic system allows only one file per upload .
    P.S If someone could also throw some light on how to use the com.oreilly servlet (the latest version) it would be lovely but for now I want to focus on developing the current one

    Hi Jocelyn,
    I want to apologize firstly for the delay in my response.
    I was seriously bogged down due to certain circumstances and so couldnt reply.Thanks a million for your prompt reply.I'll post the Html content here and you will find the servlet code as is at the following U.R.L
    http://www.java-edge.com/Viewcode.asp?Value=serv012
    Form1:
    <HTML>
    <HEAD>
    <TITLE> Upload </TITLE>
    </HEAD>
    <BODY >
    <h2>Upload Your File!</h2>
    <form ENCTYPE="multipart/form-data" action="http://localhost:8080/servlet/Upload" method=post>
    click <b> browse </b>to select the file <br>
    <b> File:</b>
    <input type="FILE" name="Filename" value="" MAXLENGTH=255 size=50><br>
    Click here to upload!<input type=submit value=Upload>
    <input type=hidden name=Directory value="G:/Workspace/Upload/">
    <input type=hidden name=SuccessPage value="G:/Workspace/successpage.html">
    <input type=hidden name="OverWrite" value="false">
    <input type=hidden name="OverWritePage" value="">
    </form>
    </BODY>
    </HTML>
    Form 2
    <HTML>
    <HEAD>
    <TITLE> Upload </TITLE>
    </HEAD>
    <BODY >
    <h2>Upload Your File!</h2>
    <form ENCTYPE="multipart/form-data" action="http://localhost:8080/servlet/Upload" method=post>
    click <b> browse </b>to select the file <br>
    <b> File:</b>
    <input type="FILE" name="Filename" value="" MAXLENGTH=255 size=50><br>
    Click here to upload!<input type=submit value=Upload>
    <input type=hidden name=Directory value="G:/Workspace/Upload/">
    <input type=hidden name=SuccessPage value="G:/Workspace/successpage.html">
    <input type=hidden name="OverWrite" value="true">
    <input type=hidden name="OverWritePage" value="G:/Workspace/overwritepage.html">
    </form>
    </BODY>
    </HTML>
    Now in Form 2 I would add another button which when clicked would prompt the user if he wishes to overwrite the page.
    I am also posting the servlet code although I am sure u would prefer reading the one on the site
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;
    public class Upload extends HttpServlet
    static final int Max = 102400;// max. size of the file can be 100K
    String path;// stores path
    String msg;// store message of success
    //init method is called when servlet is first loaded
    public void init(ServletConfig config)throws ServletException
    super.init(config);
    if(path == null)
    path = "G:/Workspace/Upload/";
    if(msg == null)
    msg = "File successfully uploaded. Check out!";
    public void doPost(HttpServletRequest req, HttpServletResponse resp)throws ServletException, IOException
    ServletOutputStream sos = null;
    DataInputStream dis = null;
    FileOutputStream fos = null;
    try
    resp.setContentType("text/plain");// return type of response is being set as plain
    sos = resp.getOutputStream();// gets handle to the output stream
    catch(IOException e)
    System.out.println(e);
    return;
    try
    String contentType = req.getContentType();// gets client's content type that should be multipart/form-data
    if(contentType!=null && contentType.indexOf("multipart/form-data")!= -1)
         // gets handle to the input stream to get the file to be uploaded from client
         dis = new DataInputStream(req.getInputStream());
         // gets length of the content data
         int Length = req.getContentLength();
         if(Length>Max)// length of the content data is compared with max size set
         sos.println("sorry! file too large");
         sos.flush();
         return;
         //to store the contents of file in byte array
         byte arr[] = new byte[Length];
         int dataRead = 0;
         int totalData = 0;
         while(totalData <Length)
         dataRead = dis.read(arr,totalData,Length);
         totalData += dataRead;
         String data = new String(arr);//byte array converted to String
         arr = null;
         // gets boundary value
         int lastIndex = contentType.lastIndexOf("=");
         String boundary = contentType.substring(lastIndex+1,contentType.length());
         String dir = "";
         if(data.indexOf("name=Directory")>0)// the type ""Directory"" is searched in the web page
         dir = data.substring(data.indexOf("name=Directory"));
         //gets directory
         // the directory higher in the directory tree cannot be selected
         if(dir.indexOf("..")>0)
         sos.println("Error- the directory higher in the directory tree cannot be selected");
         return;
         String successPage="";
         if(data.indexOf("name=\"SuccessPage\"")>0)// the type ""SuccessPage"" is searched in the web page
         successPage =data.substring(data.indexOf("name=\"SuccessPage\""));
         // gets successpage
         String overWrite="";
         if(data.indexOf("name=\"OverWrite\"")>0)// the type ""Overwrite"" is searched in the web page
         overWrite =data.substring(data.indexOf("name=\"OverWrite\""));
         overWrite = overWrite.substring(overWrite.indexOf("\n")+1);
         overWrite = overWrite.substring(overWrite.indexOf("\n")+1);
         overWrite = overWrite.substring(0,overWrite.indexOf("\n")-1);//gets overwrite flag
         else
         //overWrite = "false";
         String overWritePage ="";
         if(data.indexOf("name=\"OverWritePage\"")>0)// the type ""OverwritePage"" is searched in the web page
         // ensures same file is not uploaded twice
         overWritePage =data.substring(data.indexOf("name=\"OverWritePage\""));
         overWritePage = overWritePage.substring(overWritePage.indexOf("\n")+1);
         overWritePage = overWritePage.substring(overWritePage.indexOf("\n")+1);
         overWritePage = overWritePage.substring(0,overWritePage.indexOf("\n")-1);// // gets overwritepage
         //gets upload file name
         String file =data.substring(data.indexOf("filename=\"")+10);
         file = file.substring(0,file.indexOf("\n"));
         file = file.substring(file.lastIndexOf("\\")+1,file.indexOf("\""));
         int position;//upload file's position
         position =data.indexOf("filename=\"");//find position of upload file section of request
         position =data.indexOf("\n",position)+1;//find position of content-disposition line
         position =data.indexOf("\n",position)+1;//find position of content-type line
         position =data.indexOf("\n",position)+1;//find position of blank line
         int location =data.indexOf(boundary,position)-4;//find position of next boundary marker
         data =data.substring(position,location);// uploaded file lies between position and location
         String fileName = new String(path + dir + file);// the complete path of uploadad file
         File check = new File(fileName);
    /*************************CASE OVERRIDE ************************************/
         //String overwrite=req.getParameter("OverWrite");
         if(check.exists())// checks for existence of file
              if(overWrite.equals("false"))
                        if(overWritePage.equals(""))
                        sos.println("Sorry ,file already exists");
                        //return;
                        else
                        //overWritePage="G:/Workspace/overwritepage.html";
                        fos = new FileOutputStream(fileName);
                        fos.write(data.getBytes(),0,data.length());
                        //resp.sendRedirect(overWritePage);
                        sos.println("File Overridden");
              //return;
         File checkDir = new File(path + dir);
         if(!checkDir.exists())//checks for existence of directory
         checkDir.mkdirs();
    fos = new FileOutputStream(fileName);
    fos.write(data.getBytes(),0,data.length());
    sos.println("File successfully uploaded");
    if(check.exists())
              if(overWrite.equals("true"))
                   fos = new FileOutputStream(fileName);
                   fos.write(data.getBytes(),0,data.length());
                   if(successPage.equals(""))
                   sos.println(msg);
                   sos.println("File successfully uploaded");// if success HTML page URL not received
                   else
                   successPage="G:/Workspace/successpage.html";
                   resp.sendRedirect(successPage);
         else// incase request is not multipart
         sos.println("Not multipart");
    }//END OF TRY BLOCK
    catch(Exception e)
              try
              System.out.println(e);
              sos.println("unexpected error");
              catch(Exception f)
              System.out.println(f);
    finally
              try
              fos.close();// file output stream closed
              catch(Exception f)
              System.out.println(f);
              try
              dis.close();// input stream to client closed
              catch(Exception f)
              System.out.println(f);
              try
              sos.close();// output stream to client closed
              catch(Exception f)
              System.out.println(f);
    }//END OF DOPOST METHOD
    } //END OF CLASS
    Jocelyn the above code may have tid bit errors which u could understand.But I hope u get the overall idea of whats going on

Maybe you are looking for

  • Themes invisible, blank pages, colours not right, looks like a graphic error, but isn't one

    hey there Keynote '08 (used on a 10.6.8 Mac OS X) doesn't work anymore. The only thing that works and looks as it should is the window itself with all the buttons and stuff. I choose a theme and want to start working and all I can see is a blank page

  • Iphoto 11 and Photoshop elements 9

    I just upgraded to iPhoto '11 and am trying to get the Photoshop Elements 9 organizer to import from iPhoto. I get the error 'There is no media to import from your iphoto'. Any ideas on what's wrong? Is iPhoto 11 compatiable with '11??

  • Rich Text editor in Webdynpro

    Hi, With the new FormattedTextView in 2004s one will be able to render xhtml compliant rich test in Webdynpro. This however only covers the rednering of rich text. There still does not seem to be a rich text editor control available for webdynpro app

  • Class will only run with full package path - why?

    Hi, I've recently used Ant to package up a jar file with a simple gui application. Though I believe I've done everything right in terms of packaging I find that when I copy jar file to another computer not only do I need to unjar it I also need to us

  • Ipod doesnt not play audio when watching videos

    why?? what can i do i already was recomened mpeg streamclip and i dont no what to demux it to im completely confused i dont no what to do might just take ipod back to the store and get a zune?