Unzip using zlib java

hello friends,
Please help me out...iam in urgent help..iam not getting answer for this .. Using zlib java..
I have a zipfile named prabhu.zip
It contains
prabhu\prabhuimage\imagefiles
right now iam able to unzip only files in current folders..i mean prabhu
i want to unzip subfolders also...eg prabhuimage folder..
RIght now only files in current folder is getting unzipped..
please understand this and help me out my friend..
Thanks and Regards,
Prabhu

hello friends,
Please help me out...iam in urgent help..iam not getting answer for this .. Using zlib java..
I have a zipfile named prabhu.zip
It contains
prabhu\prabhuimage\imagefiles
right now iam able to unzip only files in current folders..i mean prabhu
i want to unzip subfolders also...eg prabhuimage folder..
RIght now only files in current folder is getting unzipped..
please understand this and help me out my friend..
Thanks and Regards,
Prabhu

Similar Messages

  • Zipping /Unzipp both current directories and subdirectories using zlib java

    Hi
    Guys any one provide me code for zipping and unzipping directory contains a subdirectories..using zlib java
    It is very urgent ..please send me the code..............
    consider..
    folder name is input for zipping
    and zipfile name is input for unzipping..
    Please help me out in this problemm
    Thanks regards,
    javaprabhu

    package ar.com.unizono.utils;
    import java.io.File;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import java.io.InputStream;
    import java.util.Enumeration;
    import java.util.SortedSet;
    import java.util.TreeSet;
    import java.util.zip.ZipEntry;
    import java.util.zip.ZipFile;
    * UnZip -- print or unzip a JAR or PKZIP file using java.util.zip. Command-line
    * version: extracts files.
    * @author Ian Darwin, [email protected] $Id: UnZip.java,v 1.7 2004/03/07
    *         17:40:35 ian Exp $
    public class UnZip {
         /** Constants for mode listing or mode extracting. */
         public static final int LIST = 0, EXTRACT = 1;
         /** Whether we are extracting or just printing TOC */
         protected int mode = LIST;
         /** The ZipFile that is used to read an archive */
         protected ZipFile zippy;
         /** The buffer for reading/writing the ZipFile data */
         protected byte[] b;
    * Simple main program, construct an UnZipper, process each .ZIP file from
    * argv[] through that object.
         public static void main(String[] argv) {
              UnZip u = new UnZip();
              for (int i = 0; i < argv.length; i++) {
                   if ("-x".equals(argv)) {
                        u.setMode(EXTRACT);
                        continue;
                   String candidate = argv[i];
                   // System.err.println("Trying path " + candidate);
                   if (candidate.endsWith(".zip") || candidate.endsWith(".jar"))
                   u.unZip(candidate);
                   else
                   System.err.println("Not a zip file? " + candidate);
              System.err.println("All done!");
         /** Construct an UnZip object. Just allocate the buffer */
         UnZip() {
              b = new byte[8092];
         /** Set the Mode (list, extract). */
         protected void setMode(int m) {
              if (m == LIST || m == EXTRACT)
              mode = m;
         /** Cache of paths we've mkdir()ed. */
         protected SortedSet dirsMade;
         /** For a given Zip file, process each entry. */
         public void unZip(String fileName) {
              dirsMade = new TreeSet();
              try {
                   zippy = new ZipFile(fileName);
                   Enumeration all = zippy.entries();
                   while (all.hasMoreElements()) {
                        getFile((ZipEntry) all.nextElement());
              } catch (IOException err) {
                   System.err.println("IO Error: " + err);
                   return;
         protected boolean warnedMkDir = false;
    * Process one file from the zip, given its name. Either print the name, or
    * create the file on disk.
         protected void getFile(ZipEntry e) throws IOException {
              String zipName = e.getName();
              switch (mode) {
              case EXTRACT:
                   if (zipName.startsWith("/") || zipName.startsWith(File.separatorChar+"")) {
                        if (!warnedMkDir)
                        System.out.println("Ignoring absolute paths");
                        warnedMkDir = true;
                        zipName = zipName.substring(1);
                   // if a directory, just return. We mkdir for every file,
                   // since some widely-used Zip creators don't put out
                   // any directory entries, or put them in the wrong place.
                   if (zipName.endsWith("/") || zipName.startsWith(File.separatorChar+"")) {
                        return;
                   // Else must be a file; open the file for output
                   // Get the directory part.
                   int ix = zipName.lastIndexOf('/');
                   if(ix==-1)
                        ix=zipName.lastIndexOf(File.separatorChar+"");
                   if (ix > 0) {
                        String dirName = zipName.substring(0, ix);
                        if (!dirsMade.contains(dirName)) {
                             File d = new File(dirName);
                             // If it already exists as a dir, don't do anything
                             if (!(d.exists() && d.isDirectory())) {
                                  // Try to create the directory, warn if it fails
                                  System.out.println("Creating Directory: " + dirName+" at "+d.getAbsolutePath());
                                  if (!d.mkdirs()) {
                                       System.err.println("Warning: unable to mkdir "
                                       + dirName);
                                  dirsMade.add(dirName);
                   System.err.println("Creating " + zipName);
                   FileOutputStream os = new FileOutputStream(zipName);
                   InputStream is = zippy.getInputStream(e);
                   int n = 0;
                   while ((n = is.read(b)) > 0)
                   os.write(b, 0, n);
                   is.close();
                   os.close();
                   break;
              case LIST:
                   // Not extracting, just list
                   if (e.isDirectory()) {
                        System.out.println("Directory " + zipName);
                   } else {
                        System.out.println("File " + zipName);
                   break;
              default:
                   throw new IllegalStateException("mode value (" + mode + ") bad");
    This version works fine for me but needs enhacements                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Unzipping  zipfile with sub folders...using zlib java

    Hello,
    I am encounterig a problem while unzipping a zipfile using zlib.The zip file contaings subdirectories.so i am not able to unzip the zipfile.Since my code is able to unzip only the files which are in current directory.Please help me out to unzip the subdirectories using zlib.
    Please find my below code..for unzip the files in current directory..
    String destinationname = rootFolder.getAbsolutePath();
    byte[] buf = new byte[1024];
    ZipInputStream zipinputstream = null;
    ZipEntry zipentry;
    zipinputstream = new ZipInputStream(
    new FileInputStream(destinationname+"\\"+date+".zip"));
    zipentry = zipinputstream.getNextEntry();
    while (zipentry != null)
    //for each entry to be extracted
    String entryName = zipentry.getName();
         LoggerHtml.debug(entryName);
         int n;
         FileOutputStream fileoutputstream;
         File newFile = new File(entryName);
         String directory = newFile.getParent();
         if(directory == null)
         //break;
         fileoutputstream = new FileOutputStream(
         entryName);
         while ((n = zipinputstream.read(buf, 0, 1024)) > -1)
         fileoutputstream.write(buf, 0, n);
         fileoutputstream.close();
         zipinputstream.closeEntry();
         zipentry = zipinputstream.getNextEntry();
    Please provide me the coding..It is very urgent...

    google
    code #1
    import java.io.*;
    import java.util.*;
    import java.util.zip.*;
    public class unzip
        public static void main(String args[])
            if(args.length < 1)
                System.out.println("Syntax : unzip zip-file destination-dir[optional]");
                return;
            try
                ZipFile zf = new ZipFile(args[0]);
                Enumeration zipEnum = zf.entries();
                String dir = new String(".");
                if( args.length == 2 )
                    dir = args[1].replace('\\', '/');
                if(dir.charAt(dir.length()-1) != '/')
                    dir += "/";
                while( zipEnum.hasMoreElements() )
                    ZipEntry item = (ZipEntry) zipEnum.nextElement();
                    if( item.isDirectory() ) //Directory
                        File newdir = new File( dir + item.getName() );
                        System.out.print("Creating directory "+newdir+"..");
                        newdir.mkdir();
                        System.out.println("Done!");
                    else //File
                        String newfile = dir + item.getName();
                        System.out.print("Writing "+newfile+"..");
                        InputStream is = zf.getInputStream(item);
                        FileOutputStream fos = new FileOutputStream(newfile);
                        int ch;
                        while( (ch = is.read()) != -1 )
                            fos.write(ch);
                        is.close();
                        fos.close();
                        System.out.println("Done!");
                zf.close();  
            catch(Exception e)
                System.err.println(e);
    }code #2
    import java.io.File;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import java.io.InputStream;
    import java.util.Enumeration;
    import java.util.SortedSet;
    import java.util.TreeSet;
    import java.util.zip.ZipEntry;
    import java.util.zip.ZipFile;
    * UnZip -- print or unzip a JAR or PKZIP file using java.util.zip. Command-line
    * version: extracts files.
    * @author Ian Darwin, [email protected] $Id: UnZip.java,v 1.7 2004/03/07
    *         17:40:35 ian Exp $
    public class UnZip {
      /** Constants for mode listing or mode extracting. */
      public static final int LIST = 0, EXTRACT = 1;
      /** Whether we are extracting or just printing TOC */
      protected int mode = LIST;
      /** The ZipFile that is used to read an archive */
      protected ZipFile zippy;
      /** The buffer for reading/writing the ZipFile data */
      protected byte[] b;
       * Simple main program, construct an UnZipper, process each .ZIP file from
       * argv[] through that object.
      public static void main(String[] argv) {
        UnZip u = new UnZip();
        for (int i = 0; i < argv.length; i++) {
          if ("-x".equals(argv)) {
    u.setMode(EXTRACT);
    continue;
    String candidate = argv[i];
    // System.err.println("Trying path " + candidate);
    if (candidate.endsWith(".zip") || candidate.endsWith(".jar"))
    u.unZip(candidate);
    else
    System.err.println("Not a zip file? " + candidate);
    System.err.println("All done!");
    /** Construct an UnZip object. Just allocate the buffer */
    UnZip() {
    b = new byte[8092];
    /** Set the Mode (list, extract). */
    protected void setMode(int m) {
    if (m == LIST || m == EXTRACT)
    mode = m;
    /** Cache of paths we've mkdir()ed. */
    protected SortedSet dirsMade;
    /** For a given Zip file, process each entry. */
    public void unZip(String fileName) {
    dirsMade = new TreeSet();
    try {
    zippy = new ZipFile(fileName);
    Enumeration all = zippy.entries();
    while (all.hasMoreElements()) {
    getFile((ZipEntry) all.nextElement());
    } catch (IOException err) {
    System.err.println("IO Error: " + err);
    return;
    protected boolean warnedMkDir = false;
    * Process one file from the zip, given its name. Either print the name, or
    * create the file on disk.
    protected void getFile(ZipEntry e) throws IOException {
    String zipName = e.getName();
    switch (mode) {
    case EXTRACT:
    if (zipName.startsWith("/")) {
    if (!warnedMkDir)
    System.out.println("Ignoring absolute paths");
    warnedMkDir = true;
    zipName = zipName.substring(1);
    // if a directory, just return. We mkdir for every file,
    // since some widely-used Zip creators don't put out
    // any directory entries, or put them in the wrong place.
    if (zipName.endsWith("/")) {
    return;
    // Else must be a file; open the file for output
    // Get the directory part.
    int ix = zipName.lastIndexOf('/');
    if (ix > 0) {
    String dirName = zipName.substring(0, ix);
    if (!dirsMade.contains(dirName)) {
    File d = new File(dirName);
    // If it already exists as a dir, don't do anything
    if (!(d.exists() && d.isDirectory())) {
    // Try to create the directory, warn if it fails
    System.out.println("Creating Directory: " + dirName);
    if (!d.mkdirs()) {
    System.err.println("Warning: unable to mkdir "
    + dirName);
    dirsMade.add(dirName);
    System.err.println("Creating " + zipName);
    FileOutputStream os = new FileOutputStream(zipName);
    InputStream is = zippy.getInputStream(e);
    int n = 0;
    while ((n = is.read(b)) > 0)
    os.write(b, 0, n);
    is.close();
    os.close();
    break;
    case LIST:
    // Not extracting, just list
    if (e.isDirectory()) {
    System.out.println("Directory " + zipName);
    } else {
    System.out.println("File " + zipName);
    break;
    default:
    throw new IllegalStateException("mode value (" + mode + ") bad");
    hth

  • How do I estimate time takes to Zip/Unzip using java.util.zip ?

    If I am compressing files or uncompressing zips using java.util.zip is there a way for me to tell the user how long it should take or for perhaps displaying a progress monitor ?

    For unzip use the ZipInputStream and pass it a CountingInputStream that keeps track ofr the number of bytes read from it (you write this). This CountingInputStream extends fileInputStream and as such can provide you with information about the total number of bytes available to be read and the number already read. This can give a crude idea of how much work has been done and how much work still needs to be done. It is inaccurate but should be good enoough for a progress bar
    As for zipping use the ZipOutputStream and pass it blocks of information. Keep track of the number of blocks you have written and the number you still need to write.
    matfud

  • Is it possible to use the JAVA Report Engine SDK to modify DESKI reports?

    Post Author: Nadine
    CA Forum: JAVA
    Hi, is it possible to add a complex filter to a DESKI report using the JAVA report engine sdk?
    In the developer tutorials for this API, I've only found references to WEBI in terms of modifying reports, though it seems to be possible to view DESKI reports with this sdk.
    I am a bit confused in terms of the scope of this API and how I would use it in regard to DESKI.
    Many thanks for any suggestions!
    Nadine

    Post Author: Ted Ueda
    CA Forum: JAVA
    Current (XI R2) version of ReportEngine API only supports refreshing/viewing functionality for Desktop Intelligence documents.  Document modification/creation is only supported with Web Intelligence documents.  Queries aren't modifiable for Deski using ReportEngine API - you can only do so using Desktop Intelligence Reporter SDK, which is COM based.Sincerely,Ted Ueda

  • How can I use Seeburger java functions on SAP XI's user defined functions?

    Hi All,
    As my title implies; how can I use Seeburger java functions on SAP XI's user defined functions?  I've tried searching over the net in tutorials regarding this topic but I failed to find one; can someone provide me information regarding my question? thanks very much.
    best regards,
    Mike

    Hi Mike !
    You should check your documentation about which java classes you need to reference in the "import" section of your UDF. And also deploy the java classes into the java stack or include them as a imported archive in integration repository...it should be stated in the seeburger documentation.
    What kind of functions are you trying to use?
    Regards,
    Matias.

  • How to Use the JAVA SCRIPT code in .htm page of the component

    Hi .
    In my requirement i have to use Java Script Function in .htm code ..how to use the java script code and functions in .htm???
    thank you
    B.Mani

    Check this document  [Arun's Blog|http://wiki.sdn.sap.com/wiki/display/CRM/CRMWebClientUI-TalkingwithJava+Script]
    Regards
    Kavindra

  • How to use another java program to stop this running prpgram???

    Dear Sir:
    I have following code and I run it success,
    import java.util.*;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.io.*;
    public class CertainAndRepeatTime{
      public static void main(String[] args) throws IOException{
        int delay = 1;
        Timer timer = new Timer();
        ActionListener actionListener = new ActionListener() {
            public void actionPerformed(ActionEvent actionEvent) {
              System.out.println("Hello World Timer");
        System.out.println("What do you want (Certain time or Repeat time)?");
        System.out.print("Please enter \'C\' or \'R\' for that: ");
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        String ans = in.readLine();
        System.out.print("Please enter  ans=" + ans  + " IsTrue=  " + (ans.equals("R") || ans.equals("r")) +"\n");
        if (ans.equals("C") || ans.equals("c")){
          //System.out.println("This line is printed only once start...");
          timer.schedule(new TimerTask(){
            public void run(){
              System.out.println("This line is printed only once.");
          },delay,1);
        else if(ans.equals("r") || ans.equals("R")){
            timer.scheduleAtFixedRate(new TimerTask(){
              public void run(){
                System.out.println("This line is printed repeatedly.");
            },delay, 1000);
          while(true){
               //System.out.println("Charles print This line is printed repeatedly.");          
          } //This will make your main thread hang.
        else{
          System.out.println("Invalid Entry.");
          System.exit(0);
        System.exit(0);
    }But I hope to use another java program to stop it when it is running instead of pressing CRTL + C to stop it.
    How to do it??
    Any example??
    Thanks a lot!!

    Sorry, I think i did not express cearly. It is my fault.
    I re-write my requirements again:
    I have
    Class AAA1.java,
    Class AAA2.java,
    Class AAA3.java,
    Class AAA20.java...
    etc
    they all look like the program I posted first time,, once executed, they will run for ever, and they will be stopped until I press CRTL + C;
    Now I hope to use another java class StopProgram.java to stop them 1 by 1 or at once instead of pressing CRTL + C;
    In this case, how to code this StopProgram.java ??
    Thanks

  • How to use a Java Resource in my java source

    Hello,
    I need to know how to use my external JAR I loaded in the database using this line below:
    CREATE OR REPLACE JAVA RESOURCE NAMED "MyJar" USING BFILE (BFILE_DIR,'MyExternal.jar');
    In fact, I have a Java file using this JAR, but I do not know how to tell to the java source that it have to use this JAR.
    ==========Java Source importing the Jar===================
    package com.gemalto.ws.snmp;
    import java.io.IOException;
    import java.util.Vector;
    import org.snmp4j.Snmp;
    import org.snmp4j.smi.*;
    import org.snmp4j.TransportMapping;
    import org.snmp4j.transport.DefaultUdpTransportMapping;
    import org.snmp4j.CommunityTarget;
    import org.snmp4j.mp.SnmpConstants;
    import org.snmp4j.PDU;
    import org.snmp4j.event.ResponseEvent;
    public class SNMPAgent
    ==========================
    Could you give the SQL request or loadjava command line permitting to do use my java resource file?
    Thks

    The JAR is already load by using CREATE JAVA RESOURCE ... or "loadjava -resolve –force -user p/p@SID –genmissing -jarasresource MyJar.jar"
    If we can create a resource by SQL or loadjava, how can I use it in my java code?
    Edited by: 847873 on 28 mars 2011 06:05
    Edited by: 847873 on 28 mars 2011 06:07

  • How to retrieve the data from MDM hierarchy table using MDM Java API

    Hi,
    I had a hierarchy table in MDM. This table had some column say x. I want to retrieve the values of this x column and need to show them in a drop down using MDM Java API.
    Can anyone help me to solve this?
    Regards
    Vallabhaneni

    Hi,
    Here is your code...
    TableId Hier_TId = repository_schema.getTableId(<hierarchy table id>);
    java.util.List list = new ArrayList();
    ResultDefinition Supporting_result_dfn = null;
    FieldProperties[] Hier_Field_props =rep_schema.getTableSchema(Hier_TId).getFields();
    LookupFieldProperties lookup_field = null;
    TableSchema lookupTableSchema = null;
    FieldId[] lookupFieldIDs = null;
    for (int i = 0, j = Hier_Field_props.length; i < j; i++) {
    if (Hier_Field_props<i>.isLookup()) {     
                                  lookup_field = (LookupFieldProperties) Hier_Field_props<i>;
         lookupTableSchema =repository_schema.getTableSchema(lookup_field.getLookupTableId());
                                  lookupFieldIDs = lookupTableSchema.getFieldIds();
         Supporting_result_dfn = new ResultDefinition(lookup_field.getLookupTableId());
         Supporting_result_dfn.setSelectFields(lookupFieldIDs);
         list.add(Supporting_result_dfn);
    com.sap.mdm.search.Search hier_search =new com.sap.mdm.search.Search(Hier_TId);
    ResultDefinition Hier_Resultdfn =     new ResultDefinition(Hier_TId);
    Hier_Resultdfn.setSelectFields(rep_schema.getTableSchema(Hier_TId).getDisplayFieldIds());
    ResultDefinition[] supportingResultDefinitions =
    (ResultDefinition[])list.toArray(new ResultDefinition [ list.size() ]);
    RetrieveLimitedHierTreeCommand retrieve_Hier_tree_cmd =
    new RetrieveLimitedHierTreeCommand(conn_acc);
    retrieve_Hier_tree_cmd.setResultDefinition(Hier_Resultdfn);
    retrieve_Hier_tree_cmd.setSession(Auth_User_session_cmd.getSession());
    retrieve_Hier_tree_cmd.setSearch(hier_search);
    retrieve_Hier_tree_cmd.setSupportingResultDefinitions(supportingResultDefinitions);
    try {
         retrieve_Hier_tree_cmd.execute();
    } catch (CommandException e5) {
              // TODO Auto-generated catch block
              e5.printStackTrace();
    HierNode Hier_Node = retrieve_Hier_tree_cmd.getTree();
    print(Hier_Node,1);
    //method print()
    static private void print(HierNode node, int level) {
    if (!node.isRoot()) {
         for (int i = 0, j = level; i < j; i++) {
              System.out.print("\t");
         System.out.println(node.getDisplayValue());
    HierNode[] children = node.getChildren();
    if (children != null) {
              level++;
    for (int i = 0, j = children.length; i < j; i++) {
    print(children<i>, level);
    //end method print()
    Best regards,
    Arun prabhu S
    Edited by: Arun Prabhu Sivakumar on Jul 7, 2008 12:19 PM

  • Opening a project in Eclipse by using a java program from outside..

    Hi friends,
    I have a java program which will open the Eclipse editor..now i want to open a file , in a specifeid path, in that eclipse. I completed opening the eclipse editor and also i m fetching the file which in a particular path..my problem is i couldnt open that file in eclipse by using my java program..
    i donno how to open a particulat file or proj in the eclipse from outside java prog.
    thanks,
    Krishna

    Try this:
    Error "This project contained a sequence that could not be opened" 

  • Error while authenticating BPEL WorklistApplication using sun java server

    Hi,
    I have got a situation where i need to use sun java server to authenticate users and groups who can log into the BPEL worklist application.
    This is what i have done.
    I went to middleware services,BPEL,orabpel and to hw services.
    There i changed the Security provider to thrid party LDAP Server.
    the LDAP connection is successfull.
    But when i m loggin onto the Worklist App it says Username invalid .Somehow it autheticates against systemjazndata.xml file .But it's not supposed to do so and validate against the ldap.
    Any help is highly appreciated..

    Hi,
    I have got a situation where i need to use sun java server to authenticate users and groups who can log into the BPEL worklist application.
    This is what i have done.
    I went to middleware services,BPEL,orabpel and to hw services.
    There i changed the Security provider to thrid party LDAP Server.
    the LDAP connection is successfull.
    But when i m loggin onto the Worklist App it says Username invalid .Somehow it autheticates against systemjazndata.xml file .But it's not supposed to do so and validate against the ldap.
    Any help is highly appreciated..

  • Error while using LiveCycle java APIs with Http servlets:"Remote EJBObject lookup failed for ejb/Inv

    Hi all,
    When i try to run more than one servelt of the Quick Start samples that using Livecycle Java APIs and i get an error of "Remote EJBObject lookup failed for ejb/Invocation provider" from any servelt i run.
    I try some Quick samples which is not servelts (java class) and it works fine, which makes me sure that my connection properties is true.
    Environment:
    The LiveCycle is based on "Websphere v6.1", and i use "Eclipse Platform
    Version: 3.4.1".
    i install "tomcat 5.5.17" to test the servelts in developing time through Eclipse.(only for test in developing time not for deploy on )
    The Jars i added in the classpath:
    adobe-forms-client.jar
    adobe-livecycle-client.jar
    adobe-usermanager-client.jar
    adobe-utilities.jar
    ejb.jar
    j2ee.jar
    ecutlis.jar
    com.ibm.ws.admin.client_6.1.0.jar
    com.ibm.ws.webservices.thinclient_6.1.0.jar
    server.jar
    utlis.jar
    wsexception.jar
    My code is :
    Properties ConnectionProps = new Properties();
    ConnectionProps.setProperty(ServiceClientFactoryProperties.DSC_DEFAULT_EJB_ENDPOINT, "iiop://localhost:2809");
    ConnectionProps.setProperty ServiceClientFactoryProperties.DSC_TRANSPORT_PROTOCOL,ServiceClientFactoryProperties.DSC_ EJB_PROTOCOL);
    ConnectionProps.setProperty(ServiceClientFactoryProperties.DSC_SERVER_TYPE,ServiceClientFa ctoryProperties.DSC_WEBSPHERE_SERVER_TYPE);
    ConnectionProps.setProperty(ServiceClientFactoryProperties.DSC_CREDENTIAL_USERNAME, "Administrator");
    ConnectionProps.setProperty(ServiceClientFactoryProperties.DSC_CREDENTIAL_PASSWORD, "password");
    ConnectionProps.setProperty("java.naming.factory.initial", "com.ibm.ws.naming.util.WsnInitCtxFactory");
    //Create a ServiceClientFactory object
    ServiceClientFactory myFactory = ServiceClientFactory.createInstance(ConnectionProps);
    //Create a FormsServiceClient object
    FormsServiceClient formsClient = new FormsServiceClient(myFactory);
    //Get Form data to pass to the processFormSubmission method
    Document formData = new Document(req.getInputStream());
    //Set run-time options
    RenderOptionsSpec processSpec = new RenderOptionsSpec();
    processSpec.setLocale("en_US");
    //Invoke the processFormSubmission method
    FormsResult formOut = formsClient.processFormSubmission(formData,"CONTENT_TYPE=application/pdf&CONTENT_TYPE=app lication/vnd.adobe.xdp+xml&CONTENT_TYPE=text/xml", "",processSpec);
    List fileAttachments = formOut.getAttachments();
    Iterator iter = fileAttachments.iterator();
    int i = 0 ;
    while (iter.hasNext()) {
    Document file = (Document)iter.next();
    file.copyToFile(new File("C:\\Adobe\\tempFile"+i+".jp i++;
    short processState = formOut.getAction();
    ...... (To the end of the sample)
    My Error was:
    com.adobe.livecycle.formsservice.exception.ProcessFormSubmissionException: ALC-DSC-031-000: com.adobe.idp.dsc.net.DSCNamingException: Remote EJBObject lookup failed for ejb/Invocation provider
    at com.adobe.livecycle.formsservice.client.FormsServiceClient.processFormSubmission(FormsSer viceClient.java:416)
    at HandleData.doPost(HandleData.java:62)
    at HandleData.doGet(HandleData.java:31)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.j ava:252)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
    a

    I assume here that your application is deployed on a different physical machine of where LCES is deployed and running.
    Do the following test:
    - Say that LCES is deployed on machine1 and your application is deployed on machine2. Ping machine1 from machine2 and note the ip address.
    - Ping machine1 from machine1 and note the ip address.
    The two pings should match.
    - Ping machine2 from machine1 and note the ip address.
    - Ping machine2 from machine2 and note the ip address.
    The two pings should match.
    Usually this kind of error would happen if your servers have internal and external ip addresses.

  • How do I create a user, in my context in OID using the Java API

    How do I create a user, with subschema, in my context in OID using the JAVA API
    I need to be able to create new users in my OID, I was doing it in our old iPlant Directory, but I don't seem to see the same methods in the Oracle LDAP API. I figured out how to get and modify the attributes of a user, but I can't seem to figure out how to add a new one.

    Try this code , modify it accordingly
    ------- cut here -------
    import oracle.ldap.util.*;
    import oracle.ldap.util.jndi.*;
    import javax.naming.NamingException;
    import javax.naming.directory.*;
    import java.io.*;
    import java.util.*;
    public class NewUser
    final static String ldapServerName = "yourLdapServer";
    final static String ldapServerPort = "4032";
    final static String rootdn = "cn=orcladmin";
    final static String rootpass = "welcome1";
    public static void main(String argv[]) throws NamingException
    // Create the connection to the ldap server
    InitialDirContext ctx = ConnectionUtil.getDefaultDirCtx(ldapServerName,
    ldapServerPort,
    rootdn,
    rootpass);
    // Create the subscriber object using the default subscriber
    Subscriber mysub = null;
    String [] mystr = null;
    try {
    RootOracleContext roc = new RootOracleContext(ctx);
    mysub = roc.getSubscriber(ctx, Util.IDTYPE_DN, "o=dec", mystr);
    catch (UtilException e) {
    e.printStackTrace();
    // Create ModPropertySet with user information
    ModPropertySet mps = new ModPropertySet();
    mps.addProperty(LDIF.ATTRIBUTE_CHANGE_TYPE_ADD,"cn", "Steve.Harvey");
    mps.addProperty(LDIF.ATTRIBUTE_CHANGE_TYPE_ADD,"sn", "Harvey");
    mps.addProperty(LDIF.ATTRIBUTE_CHANGE_TYPE_ADD,"uid", "SHarvey");
    mps.addProperty(LDIF.ATTRIBUTE_CHANGE_TYPE_ADD,"givenname", "Steve");
    mps.addProperty(LDIF.ATTRIBUTE_CHANGE_TYPE_ADD,"mail", "[email protected]");
    mps.addProperty(LDIF.ATTRIBUTE_CHANGE_TYPE_ADD,"userpassword", "welcome1");
    // Create the user
    User newUser = null;
    try {
    newUser = mysub.createUser(ctx, mps, true);
    System.out.println("New User DN: " + newUser.getDN(ctx));
    catch (UtilException e) {
    e.printStacktrace();
    ------- end cut --------
    Enjoy.
    Suhail

  • How to find out jre version installed ,using a java program?

    Hello,
    Is there any way to find out the installed JRE version using a java program ?
    The requirement is as follows:
    There is a html page with 4 steps to install a software. each step is a link, which upon clicking does its work.
    the first step is to install jre 1.4.2_11 if its not installed in the system. But how can i find out whether jre 1.4.2_11 is installed or not ?
    Thanks in advance

    For the hell of it... here is a list of properties you can query:
    java.version Java Runtime Environment version
    java.vendor Java Runtime Environment vendor
    java.vendor.url Java vendor URL
    java.home Java installation directory
    java.vm.specification.version Java Virtual Machine specification version
    java.vm.specification.vendor Java Virtual Machine specification vendor
    java.vm.specification.name Java Virtual Machine specification name
    java.vm.version Java Virtual Machine implementation version
    java.vm.vendor Java Virtual Machine implementation vendor
    java.vm.name Java Virtual Machine implementation name
    java.specification.version Java Runtime Environment specification version
    java.specification.vendor Java Runtime Environment specification vendor
    java.specification.name Java Runtime Environment specification name
    java.class.version Java class format version number
    java.class.path Java class path
    java.library.path List of paths to search when loading libraries
    java.io.tmpdir Default temp file path
    java.compiler Name of JIT compiler to use
    java.ext.dirs Path of extension directory or directories
    os.name Operating system name
    os.arch Operating system architecture
    os.version Operating system version
    file.separator File separator ("/" on UNIX)
    path.separator Path separator (":" on UNIX)
    line.separator Line separator ("\n" on UNIX)
    user.name User's account name
    user.home User's home directory
    user.dir User's current working directory

Maybe you are looking for

  • Using event risen to log data into citadel

    Hi all, I have an HMI application in LV & DS 8 reads My OPC items, and log data, alarms and events into citadel. Knowing Citadel is event-driven, I want to use this event to distinguish a change in database and update my Historical Alarm & Even List

  • Strange problem with ProgressEvent.PROGRESS in different laptob

    i made simple of my project to show the problem the code package      import flash.display.MovieClip;      import flash.net.FileReference;      import flash.net.FileFilter;      import flash.events.MouseEvent;      import flash.events.*;     import f

  • [SOLVED]Ncurses applications broken

    Hi, I have been using Arch Linux for about an year now. Its really is an awesome distro and I havent faced much problems with it, but for recently a minor bump. I spend most of my time in the console session using the ncurses based applications like

  • PC to Mac Networking

    I am trying to directly connect via the ethernet ports a Panther Mac to an XP PC for the purpose of transfering music files from the PC to Mac. I have not been able to get this to work even after following the instructions I have found on the web. I

  • What is the best Messenger Client?

    Right there probably has been a thread like this before but I couldn't find it, sorry if there is one. What is the best program to use to access my Windows Live Messenger account? I currently use Mac Messenger which is... CRAP! I have used Adium befo