Unable to create a folder through java code on weblogic server 10GR3

Hi,
I have java code which creates a folder and writes an XML file in to it.
File saveDirectory = new File(storePath);
if(!saveDirectory.exists()){
System.out.println("directory doesnt exists");
boolean isDirectoryCreated = saveDirectory.mkdir();
System.out.println("directory doesnt exist creating status :"+isDirectoryCreated);
This code works fine on my local weblogic server.Whereas the one installed on Unix box is not.
saveDirectory.mkdir() is unable to create a directory at the given path.
I feel there is some permission problems.
Please let me know what can be done.
Thanks,

I have my Linux/Unix Admin either add me to a group that can do this or create one that can and add me to it.
If you command prompt can you manually do it now?
Best Regards
mseberg

Similar Messages

  • How to create a folder through java

    Hi All,
    Can any one give the solution of my prob.
    I want to create a folder in windows m/c through java programe .Is it possible.
    If yes then kindly suggest me how...?
    Thanks In advance
    Vikas

    String newFolderPath = "C:\\";
    String newFolderName = "MyFolder";
    String spoonFeeding = newFolderPath + newFolderName;
    File f = new File(spoonFeeding);
    f.mkDir();

  • How to get the shared name of a folder in my PC through java code.

    Hi,
    I have a shared folder in my PC adn its shared name is different. Is there any way to get the shared name of that folder from java code. I have the absolute path of that dir. Can I get the shared name from that path in java or is there any other method.
    Thanks.
    Edited by: pavanspecial on Nov 28, 2007 11:34 PM

    Hi, Thanks for your reply. I have even tried through 'net share' , but i could not the share name from the path i have. For the 'net share' i need to give the share name itself.

  • Code to create a folder in java

    Hi friends
    I want to know how to create a folder in java using files concept.
    Can any one send me the code to create a folder in our system using files concept.
    Thanks in advance.

    [http://java.sun.com/docs/books/tutorial/essential/io/file.html]

  • Adding rows to J2ME WTK/Settings/User Defined (through Java code)

    Hi all..
    Just a quick question..
    Is it possible to add Key/Value pairs to a MIDlet's 'User Defined' field through Java code..(ie) - add a new row to the User Defined field..
    If not, can anyone tell me how a Bluetooth-Client GUI can save an image it has been sent by a Bluetooth-Server GUI?
    Thanks in advance..
    Rookie

    if i understand you, you want to call application module method when user clicks on add button on the UI and your table is from VO
    so what i can come up for now is:
    1) create variable binding from the iterator for both name and price.
    2) on your UI action button :
    <af:commandButton actionListener="yourbean.addToCart">
    <f:attribute name="pName" value ="binding.<created name bind variable>"
    <f:attribute name="pPrice" value = "binding.<created price bind variable>"
    </af:commandButton>
    3) custom Managed Bean:
    //yourBean.java
    public void addToCart(ActionEvent e){
    // get binding here
    // use executeWitParams method to send parameter to the function "testMethod" and execute
    //AppModuleImp.java
    public void testMethod(String pName,String pPrice) {
    CardVOImpl vo = this.getCartVO1();
    CardVORowImpl r = (CardVORowImpl)vo.createRow();
    r.setAttribute("NAME", pName);
    r.setAttribute("PRICE", pPrice);
    vo.insertRow(r);
    Hope this helps...
    Let me know if not..
    Thanks
    Edited by: MavenDev on Oct 30, 2011 8:08 PM

  • Problem with executing shell script on linux through java code.

    i am facing problem to kill jboss process on linux that is my application requirement. for that i created one shell script that will get all the process for jboss instance and kill them when i am running that script from command prompt on linux its working perfectly.
    The command i am using ---
    /opt/RW9/jboss/v4.0.5.GA/bin/restartjboss.sh.
    but when i am running through java code its not working.
    the java code i am using is:-
    pp = Runtime.getRuntime().exec(new String[]{"/bin/sh", "-c", "/opt/RW9/jboss/v4.0.5.GA/bin/restartjboss.sh"});
    could anyone tell me what is the problem ?
    Edited by: akm198110 on Sep 2, 2008 9:24 AM

    I got the problem after long struggle ,after doing proper path i am able to execute the shell script..

  • Setting java_home through java code

    Hello , i went through lots of information for setting java_home through java code but i was unable to find any useful information, does anybody know how to set java home through java code
    Regards
    Mayur Mitkari

    The question doesn't make any sense to me. If Java needs the JAVA_HOME variable set, how is it ever going to execute any code that does so? And if it doesn't need it, why set it?

  • Opening a word file in MS Office Word software window through Java code

    I want to open a word file in MS Office Word software window through Java code.
    Is it possible ? If possible then please let me now how can I do it.
    Bhoopender

    Thanks for replying.
    I tried the following code -
    public class OpenFileWithItsExt
         public static void main(String[] args) throws java.io.IOException
              Runtime.getRuntime().exec("a.doc");
    and it gets compiled successfully, but on running outputs as -
    Exception in thread "main" java.io.IOException: CreateProcess: a.doc error=193
    at java.lang.Win32Process.create(Native Method)
    at java.lang.Win32Process.<init>(Win32Process.java:66)
    at java.lang.Runtime.execInternal(Native Method)
    at java.lang.Runtime.exec(Runtime.java:566)
    at java.lang.Runtime.exec(Runtime.java:428)
    at java.lang.Runtime.exec(Runtime.java:364)
    at java.lang.Runtime.exec(Runtime.java:326)
    at OpenFileWithItsExt.main(OpenFileWithItsExt.java:5)
    My file is in the pesent working directoty.
    Please solve my problem.
    Thanks

  • Unable to create remote folder

    When I attempt to go to the data bindings on an ASP form I
    have, I get the following error:
    Unable to create remote folder 550 _mmdbscripts: Access
    Denied
    The form works fine, but I can add any new fields to the form
    because I get this error when I attempt to update the field list
    under server behaviors.
    Any suggestions?

    Does your FTP hang on all sites? Or this this the only one?
    How many sites
    do you have? Does it hang with all folders or only these
    specific ones?
    What happens if you create a new folder in the site and try
    to upload that?
    Such curious FTP problems in DW are almost ALWAYS the result
    of an
    interference from your local firewall - are you running one?
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "hfeurstein" <[email protected]> wrote in
    message
    news:fe7uu9$34r$[email protected]..
    >I am so glad you are out there - this is the most
    responsive forum I have
    >ever
    > experienced:)
    >
    > Essentially I am trying to upload my site from my hard
    disk to the ftp
    > server
    > using DW.
    >
    > Each time I make an attempt, it will copy a few files
    and then I will get
    > the
    > error message as described in my initial posting. First
    I thought that it
    > had
    > to do with my file and I deleted an entire folder from
    my hard disk. Upon
    > my
    > next attempt to upload, the same error message occurred
    with a different
    > folder. And each time I attempt to upload the same thing
    will happen with
    > "a"
    > folder...
    >
    > In the last two hours while having this correspondence,
    I have switched to
    > FireFTP - a free FTP by Mozilla and the entire site is
    uploading swiftly
    > and
    > without any error messages - I am only half way through
    but the three
    > folders
    > that have given me errors in DW have already been
    uploaded successfully.
    >
    >
    >

  • Unable to create virtual folder

    Hi im getting this error when im trying to create a folder please help
    Content Server Request Failed
    Unable to create virtual folder. Unable to create virtual folder.
    [ Details ]
    intradoc.common.ServiceException: !csCollectionUnableToCreateCollection at collections.CollectionStructure.forceChildEx(CollectionStructure.java:2197) at collections.CollectionStructure.forceChild(CollectionStructure.java:2179) at collections.CollectionStructure.forceChild(CollectionStructure.java:2174) at collections.CollectionUserHandler.addCollectionInCollection(CollectionUserHandler.java:483) at sun.reflect.GeneratedMethodAccessor86.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at intradoc.common.IdcMethodHolder.invokeMethod(ClassHelperUtils.java:461) at intradoc.common.ClassHelperUtils.executeMethodReportStatus(ClassHelperUtils.java:142) at intradoc.server.ServiceHandler.executeAction(ServiceHandler.java:75) at intradoc.server.Service.doCodeEx(Service.java:488) at intradoc.server.Service.doCode(Service.java:470) at intradoc.server.ServiceRequestImplementor.doAction(ServiceRequestImplementor.java:1332) at intradoc.server.Service.doAction(Service.java:450) at intradoc.server.ServiceRequestImplementor.doActions(ServiceRequestImplementor.java:1173) at intradoc.server.Service.doActions(Service.java:445) at intradoc.server.ServiceRequestImplementor.executeActions(ServiceRequestImplementor.java:1093) at intradoc.server.Service.executeActions(Service.java:431) at intradoc.server.ServiceRequestImplementor.doRequest(ServiceRequestImplementor.java:632) at intradoc.server.Service.doRequest(Service.java:1697) at intradoc.server.ServiceManager.processCommand(ServiceManager.java:357) at intradoc.server.IdcServerThread.run(IdcServerThread.java:195)

    It is solved now......
    Solution.....
    the contibution folders have a security group "All" and the user that im using to create a new folder was having just R permission to "All" so If you tried to create a new folder from the action list choose link folder then u will get the error that i mentiond above and i think this is the way the content server works "corrent me if im wrong" .now to solve this i gave that user a RW to the "All" security group and now he can create folders.
    Note:what i discovred is that when the system folder has a security group defined then the contibuter the contributer that he want to create a new folder under it must have RW to the security group in the Contribution folders.

  • I keep getting this error in Dreamweaver when I am trying to upload my website?  Can you tell me what I am doing wrong?  here is the error message: /html - error occurred - Unable to create remote folder /html.  Access denied.  The file may not exist, or

    I keep getting this error in Dreamweaver when I am trying to upload my website?  Can you tell me what I am doing wrong?  here is the error message: /html - error occurred - Unable to create remote folder /html.  Access denied.  The file may not exist, or there could be a permission problem.   Make sure you have proper authorization on the server and the server is properly configured.  File activity incomplete. 1 file(s) or folder(s) were not completed.  Files with errors: 1 /html

    Nobody can tell you anything without knowing exact site and server specs, but I would suspect that naming the folder "html" wasn't the brightest of ideas, since that's usually a default (invisible) folder name existing somewhere on the server and the user not having privileges to overwrite it.
    Mylenium

  • Unable to create virtual folder. Too many folders

    Hi,
    We are getting this error while trying to create new folder in UCM (even trying directly from UCM throws same error)
    oracle.stellent.ridc.protocol.ServiceException: Unable to create virtual folder. Too many folders
    Has anyone experienced this? If yes, please let us know how you resolved it.
    Thanks!

    You don't "store" anything in contribution folders. They are just webdav access points. I recommend zero folders personally.
    If you want to upload files using webdav, then I suggest using one staging folder, where files can enter the system. When the document is workflowed and/or verified, it is moved out of the folder. It's more likely however that you'll need a few access points for various types of content as each folder enforces specific metadata.
    Now I imagine you are after a way to store all the HR bits and pieces of one person together as a unit. Some people use Content Folios. Personally, I'd just use a metadata field that contains the ContentID of the person's master record. Any new content for that person just gets the master ContentID stamped on it. Just search for that ContentID to get all their stuff.
    Regarding best practices, there are lots of quality blogs floating around. Stellent/Oracle don't talk about best practice because each system is used by their clients in a unique way... well, that's what they say.

  • Running windows command through java code

    Hello
    i want to execute jar.exe through java code , i have written following piece of code , but it isn't working
    ProcessBuilder processBuilder = new ProcessBuilder(new String[]{"cmd.exe","/c","%java_home%\\bin\\jar.exe"});
              Process process = processBuilder.start();
              BufferedReader inputReader = new BufferedReader(new InputStreamReader(process.getErrorStream()));
              String line = inputReader.readLine();
              while(line != null){
                   System.out.println(line);
                   line = inputReader.readLine();
    does anybody knows why
    Regards
    Edited by: Mayur Mitkari on Mar 5, 2013 10:19 PM
    Edited by: Mayur Mitkari on Mar 5, 2013 10:20 PM
    Edited by: Mayur Mitkari on Mar 5, 2013 10:20 PM

    sorry for that , but the
    Runtime runtime = Runtime.getRuntime();
              Process proc = runtime.exec(new String[]{"cmd.exe","/c","jar"});
              proc.waitFor();
    int i = proc.exitValue();
    this code was different from first one
    and in case of Process if runtime .exec is succesful it is wainting for long time , in this case i want if the runtime.exec is succesful something should be returned
    Regards

  • How to create a Folder using java.

    Hi All,
    I have a doubt. I want to create a folder using java.
    Inputs are the destination where the folder should be created and the name of the folder. Plz help me in this regard.
    thanks and regards,
    Vincent .R.

    check out javadoc for java.io
    File reldir=new File("NewDir");//relatively where your program runs
    reldir.mkdir();
    File absdir=new File("C:/NewDir");//absolute path
    reldir.mkdir();
    File newdir=new File(absdir,"SubDir");//defines another dir under absdir
    newdir.mkdir();
    Gil

  • Create web service from java code in Jdeveloper 11.1.1.5

    I am try to create web service from java code by default it is connected to Integrated web logic server and generate a
    WSDL like this.
    http://localhost:7101/javaexcel-project1-context-root/MyWebService1Soap12HttpPort.
    please tell me how we can change this local host to our needed Host and how to deploy this web service to web logic server.

    Hi,
    Just right click on your project and deploy it to your application server (Weblogic Server (Not the Integrated server)). {Before that, you have create your Application server connection in the Jdeveloper).
    After deployment open the Admin console of the weblogic server and find your ear of the project.Click on that (Go to the "Testing tab") and you will get the "WSDL" (Concreate wsdl)  and "Test Client" of the Project.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

Maybe you are looking for