500 error indexing zip files of pdf

New install of CF10 and updated with mandatory hotfix and up to update 7.  I create a collection through CF Admin and attempt to index the contents of a directory that contains PDF and compressed zip files containing PDF files, I add .PDF and .ZIP to the list of file extensions to index.  I get a 500 error and indexing fails.  If I only attempt to index PDF extensions, the indexing operation completes successfully on the same directory.
Has anyone else experienced this behavior and found a fix for it?
Thanks in advance
Tony
Update: further testing shows that .txt files and .ppt files that are contained within a .zip file container are indexed successfully.  As soon as I add a .pdf to the .zip, it fails with the 500 internal server error.
Message was edited by: Krispy74

Resolved

Similar Messages

  • Error reading zip file in Java 6

    We have a bespoke installer program that fails, intermittently, in Java 6 on Windows. After installing some files, it then fails with a stack trace like this:
    java.util.zip.ZipException: error reading zip file
         at java.util.zip.ZipFile.read(Native Method)
         at java.util.zip.ZipFile.access$1200(ZipFile.java:29)
         at java.util.zip.ZipFile$ZipFileInputStream.read(ZipFile.java:447)
         at java.util.zip.ZipFile$1.fill(ZipFile.java:230)
         at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:141)
         at java.io.FilterInputStream.read(FilterInputStream.java:90)
         at com.XXXX.trent.installer.Installer.writeStreamToFile(Unknown Source)
         at com.XXXX.trent.installer.Installer.installFile(Unknown Source)
         at com.XXXX.trent.installer.PatchFileInstaller.installFile(Unknown Source)
         at com.XXXX.trent.installer.PatchFileInstaller.installFiles(Unknown Source)
         at com.XXXX.trent.installer.UpgradeInstaller$TpfAction.run(Unknown Source)
         at com.XXXX.trent.installer.UpgradeInstaller.runActions(Unknown Source)
         at com.XXXX.trent.installer.UpgradeInstaller.install(Unknown Source)
         at com.XXXX.trent.installer.TrentInstall$SoftwareInstallStage.install(Unknown Source)
         at com.XXXX.trent.installer.TrentInstall$UpgradeInstallWorker.install(Unknown Source)
         at com.XXXX.trent.installer.PatchInstall$InstallWorker.construct(Unknown Source)
         at com.XXXX.trent.utils.SwingWorker$2.run(Unknown Source)
         at java.lang.Thread.run(Thread.java:619)The same code works in Java 5 on the same environments that it now fails in Java 6 (1.6.0_16).
    Any ideas?
    Thanks.

    gimbal2 wrote:
    it is not weird, it is a bug in the application. Don't let the upgrade from Java 5 to Java 6 make you believe otherwise.It's a singularly bad exception message though. I would have thought that something from java.util might be a bit more explicit about what the problem is.
    Winston

  • Error opening zip file:ZipException

    Hi,
        I am getting the Log Error in NWA while running the Web Dynpro Java application..The Error is,
    java.util.zip.ZipException: Error opening zip file /usr/sap/EPD/JC00/j2ee/cluster/server0/./log/archive/_log_system_logging.log1233875882599.zip
    at java.util.zip.ZipFile.open(Native Method)
    at java.util.zip.ZipFile.<init>(ZipFile.java:140)
    at java.util.zip.ZipFile.<init>(ZipFile.java:155)
    at com.sapmarkets.bam.jmxadapter.AbstractLog.getArchiveInfo(AbstractLog.java:328)
    at com.sapmarkets.bam.jmxadapter.AbstractLog.getArchives(AbstractLog.java:454)
    at com.sapmarkets.bam.jmxadapter.AbstractLog.getArchives(AbstractLog.java:477)
    at sun.reflect.GeneratedMethodAccessor357.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:62)
    at java.lang.reflect.Method.invoke(Method.java:391)
    Can any one explian me why this error occurs.And How to Rectify this error.Please suggests the solution for this problem.
    Thanks & Regards,
    SatheshKumar R

    The archive file is empty that why this exception is coming, Find and remove the empty archive file.
    OR
    To solve the issue you have to close the previously opened streams in your application, when you don't need anymore
    hope it will  hlep you.
    Thanks

  • Error reading zip file containing an excel file

    Hi all,
    Using servlets I am able to zip an excel file using java.util.zip package. The excel file is created using POI API.
    While I save and extract the zip file on my machine and then open the file in MS Excel. Excel pops a message saying "MS Office Excel has encountered a problem and need to close" and it gives me an option to "Recover my work and restart MS Office Excel". I select the option and then MS Excel does a document recovery and I am able to view my data. I get an excel repair log file saying as follows
    "Microsoft Office Excel File Repair Log
    Errors were detected in file 'C:\Documents and Settings\JohnDoe\Desktop\excel\test.xls'
    The following is a list of repairs:
    Damage to the file was so extensive that repairs were not possible. Excel attempted to recover your formulas and values, but some data may have been lost or corrupted.
    I have attached my servlet code down below I suspect there is a problem with PrintWriter to output or do I need to use OutputStream to write excel data.
    Below is my servlet code:
    import java.io.*;
    import javax.servlet.*;
    import org.apache.log4j.Logger;
    import java.util.*;
    import java.util.zip.*;
    import java.net.*;
    import org.apache.poi.hssf.usermodel.*;
    import org.apache.poi.hssf.record.*;
    import org.apache.poi.hssf.util.*;
    public class ZipServlet extends HttpServlet {
         * @see javax.servlet.http.HttpServlet#doGet(javax.servlet.http.HttpServletRequest,
         * javax.servlet.http.HttpServletResponse)
         public void doGet(HttpServletRequest request, HttpServletResponse response)
              throws ServletException, IOException {
              makeZip(request, response, "GET");
         * @see javax.servlet.http.HttpServlet#doPost(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
         protected void doPost(HttpServletRequest request, HttpServletResponse response)
                   throws ServletException, IOException {
                   makeZip(request, response, "POST");
         public void makeZip(HttpServletRequest request, HttpServletResponse response, String methodGetPost) {
              Logger logger = Logger.getLogger(ZipServlet.class);
              try
                   int id=1;
                   ServletContext sc = getServletContext();
         HttpSession session = request.getSession();          
                   ConnectionPoolManager cpm = (ConnectionPoolManager)sc.getAttribute("CONNECTION_POOL_MANAGER");
                   ConnectionPool cp = cpm.getConnectionPool(id);
              createTestExcelZip(request,response,methodGetPost,session);
              } catch (Exception e2) {
         public void createTestExcelZip(HttpServletRequest request, HttpServletResponse response,
                   String methodGetPost,HttpSession session
                   )throws ServletException, IOException
              Logger logger = Logger.getLogger(ZipServlet.class);
              try
              {      //Create an Excel Workbook and placing value "Test" in the first cell
                   HSSFWorkbook wb = new HSSFWorkbook();
                   HSSFSheet sheet = wb.createSheet("new sheet");
                   HSSFCell cell=null;
                   HSSFRow row = sheet.createRow((short) 0);
                   short column = 0;
                   cell = row.createCell(column);
                   cell.setCellValue(new HSSFRichTextString("Test"));
                   HSSFCellStyle fontStyle = wb.createCellStyle();
              HSSFFont f = wb.createFont();
              f.setFontHeight((short) 200);
              f.setBoldweight(HSSFFont.BOLDWEIGHT_BOLD);
              fontStyle.setFont(f);
              cell.setCellStyle(fontStyle);
              response.setContentType("application/zip");
                   response.setHeader("Content-Disposition","attachment; filename=zipExcelRecordFiles.zip;");
                   int BUFFER = 2048;
                   byte buf[]=new byte[300000];
                   ByteArrayOutputStream baos = new ByteArrayOutputStream();
                   ZipOutputStream zos = new ZipOutputStream( baos );
                   ByteArrayInputStream is = null;
                   BufferedInputStream origin = null;
                   byte[] b = null;
                   String fileName = null;
                   b = wb.getBytes();
                   fileName = "testExcelRecords.xls";
                   try
                   is = new ByteArrayInputStream(b);
                   origin = new BufferedInputStream(is, BUFFER);
                   zos.putNextEntry(new ZipEntry(fileName)); // Add ZIP entry to output stream.
              int count;
              while((count = origin.read(buf, 0, BUFFER)) != -1)
              zos.write(buf, 0, count);
              zos.closeEntry(); // Complete the entry
                   is.close();
                   }catch(Exception e)
                        logger.error(e);
                   zos.close();
              PrintWriter pr = response.getWriter();
                   pr.write(baos.toString("ISO-8859-1"));
                   pr.close();
              catch(Exception e)
              logger.error(e);     
         * @see javax.servlet.GenericServlet#destroy()
         public void destroy() {
    Any help would be appreciated.
    Regards
    jdcunha

    Jdcunha,
    I am new to the field but encountered the same problem and recently found a solution. Hope this helps.
    For my project I wanted to create individual Excel 2003 workbooks for each file I created. Excel would give me the same error it gave you when I used the same HSSFWorkbook object. I tried creating a new Workbook object each time, but ran into the same issue.
    I ended up fixing the error by creating a new instance of my write-to-excel class each time I wanted to create a new workbook, instead of just recreating a new HSSFWorkbook object. It works perfectly and the Excel errors don't show. It may also be important to note I used OutputStream, I did not try it with printwriter.

  • Error converting Pagemaker file to PDF

    Hi there,
    I've been trying endlessly to convert an Adobe PageMaker 7.0  file to PDF. I've followed the process of "click on File, and then Export to PDF"; however, during the conversion process, an error message always pops up:
    "When you create a PDF file, you have to send the host fonts. Please go to the Acrobat distiller printer properties, 'Adobe PDF settings page' and turn off the option "Don't send fonts to Distiller."
    I've searched tirelessly where this option can be found and unchecked, but it seems elusive.
    Can you help with this please?
    Thank you.

    Hello,
    Thanks for posting. Unfortunately, at this time Acrobat.com doesn't support the conversion of Pagemaker files to PDF. For a list of supported formats, please see our help page on converting to PDF:
    http://help.adobe.com/en_US/Acrobat.com/Using/WS4c4da310f3b0910a64131dac123f400852b-8000.h tml
    What you're trying to do is possible with the desktop version of Acrobat; if this is an urgent need and you don't currently have a copy of Acrobat, I would try downloading a free 30-day trial version here:
    http://www.adobe.com/products/acrobatpro/tryout.html
    I hope this is helpful!

  • How to read ZIP files(having PDFs,Image) using MQ Series link for R/3

    Hi,
    1)Is it possible to transfer a zip file (having an image or pdf) using IDocs in SAP 4.6C using MQ Series link for R/?
    Scenario: "MQ Series link for R/3" converts Business-Reports from a third-party software,into SAP IDocs.Each Business-Report contains one XML file and one ZIP file.
    2)Being on ABAP side,do I have to worry about how the zip file would be converted into IDocs?
    Detailed descrption:
    This scenario requires integration of a non-SAP software which talks in XML with SAP R/3(4.6C).The customer has decided to go with 'MQ Series link for R/3' (which integrates any non-SAP application running on IBM MQ Series to R/3,by converting data(in any format) into IDocs).He is not ready to go for XI.
    The Problem area is a functionality which requires the non-SAP software to send XML file along with an attached Zip file.So,XML document,basically,has a 'zippedFile' XML element having actual file in XML keyword 'file'.
    This XML document ideally, should be converted by the subsystem(MQSeries link for R/3) into IDocs i.e. into a stream which could be stored in a table on R/3 side and later, sent back to the non-SAP software through MQ Series link to be converted into zip-file again with corresponding pdfs,images.I want someone who has worked in a similar scenario to confirm this.

    Hi,
    I have a feeling I have posted this question in the wrong forum or maybe I will let you decide this.Any help would be appreciated (even the right forum name).
    My scenario requires integration of a non-SAP software which talks in XML with SAP R/3(4.6C).The customer has decided to go with 'MQ Series link for R/3' (which integrates any non-SAP application running on IBM MQ Series to R/3,by converting data(in any format) into IDocs).He is not ready to go for XI.
    The Problem area is a functionality which requires the non-SAP software to send XML file along with an attached Zip file.So,XML document,basically,has a 'zippedFile' XML element having actual file in XML keyword 'file'.
    This XML document ideally, should be converted by the subsystem(MQSeries link for R/3) into IDocs i.e. into a stream which could be stored in a table on R/3 side and later, sent back to the non-SAP software through MQ Series link to be converted into zip-file again with corresponding pdfs,images.I wanted someone who has worked in a similar scenario to confirm this.

  • Keynote (6.2) file won't open. Can I make a new Index.zip file using some of the extracted .iwa files?

    Keynote (6.2) file won't open (hung and crashed during auto-OS update).  Trying to salvage everything possible.  I know about grabbing the pictures from Data folder, but is there a way to extract the good .iwa files and make a new Index.zip? 
    Tried extracting, capturing uncorrupted .iwa and deleting corrupted ones, but can't figure out how to re-compress to readable format for Keynote.  Seems silly that I can't ge the new .zip file to work.  There has to be some sort of manual work-around, yeah?
    Thanks.

    This problem has been reported to the AppleWorks team, but I doubt that we will ever hear if there is a fix. AppleWorks 6 is now nearly 6 years old & hasn't even had an update since March, 2004.
    Nothing has been found to be able to make AppleWorks 6.2.9 open the problem files. I've had it happen & not happen with all AppleWorks file types. These files can be opened by any other version of AppleWorks 6, including the OS 8/9 component 6.2.8. If you have the retail version of AppleWorks & have Classic installed, you can "Force" AppleWorks 6 to open in Classic to open the files, save them as AW 6 files & then open them in the OS X version. You do want to make sure you don't have both the Classic & OS X versions of AppleWorks 6 running at the same time. I find it much easier to use AppleWorks 5 in Classic to open & save the files. AppleWorks 6.2.9 has no problem opening AppleWorks 5 files.
    Peggy

  • Errors in ZIP files from OTN

    Hello,
    I try to download the client software for Oracle 8.1.7 on NT, but the downloaded ZIP file contains errors. When I try to fix the errors my original ZIP file is truncated from over 500Mb to 20Kb! And it does not work of course.
    All the other ZIP files contains errors too.
    I use the PKWARE PKunzip utility.
    Where can I find the correct ZIP files for download?
    Kind regards, Richard Klavers.

    Can you please try with this direct url: http://otn.oracle.com/software/htdocs/devlic.html?http://download.oracle.com/otn/nt/oracle8i/win817client.zip
    Regards,
    OTN

  • Download error for .zip files

    I got this:
    'Download Error - /Users/beth/Desktop/8tracksUploader.zip could not be opened, because an unknown error occurred.
    Try saving to disk first and then opening the file.'
    When tried to download this uploader.
    I also get it when I try to open jpeg photos from my mom. She also has a Mac.
    My DVD drive is dead so I can't save them to a disk. I do have an external CD drive.

    'Download Error - /Users/beth/Desktop/8tracksUploader.zip could not be opened, because an unknown error occurred
    If you are using dialup or satellite for internet, latency in the internet connection can cause downloads to fail part way. For those, you'll want smaller segmented archives to be sent to you. Same if the sender has such a connection. Cable, DSL, and FiOS this is much less likely. Data corruption on your hard drive is more likely to fail extracting of a zip file on Cable, DSL, and FiOS connections. What kind of connection do you have? Is your data backed up so we can analyze why this is happening?
    http://www.macmaps.com/backup.html
    My DVD drive is dead so I can't save them to a disk. I do have an external CD drive.
    From the sounds of this statement, it sounds like you are assuming having a DVD or CD drive that works would make a difference in being able to save to disk.
    CDs and DVDs don't allow direct saves like a hard disk. They require a separate burn command to burn to disc. Except for DVD-RAM, all optical medias for CD and DVD drives allow only limited rewrite capability, and require special steps to write to disc. If a disc is -R or +R, it can be written sessions until it fills up but again requires the use of disc burning software at the operating system level, or third party. If a disc is -RW or +RW you can erase the disc and write whole new blocks of files as a rewrite of the disc. But you can't selectively write over existing blocks with either.
    - * Links to my pages may give me compensation.

  • Error opening .zip files in EP

    hello to all, my problem is the following one:
    I have an url iview, this one points at a flash file witch opens a .zip file. When I preview the iview  I'm able to download the .zip file without problems BUT when I assign this role to my user, the .zip file download popup doesn't open (it appears and sudenly dissapears).
    Any idea?
    thank you.

    Hi,
         Check if it is browser popup problem (You will get one popup bar blocked). If not, check the logs for any useful hint.
    Regards,
    Harini S

  • [ERRORS]Converting large files to pdfs

    Some errors occur when I try to convert large file(about 30MB.....or may be more....word or ppt) to pdfs with Livecycle PDF Generator .
    But the same file can be converted to pdf with the Acrobat Pro
              Environment:
              Websphere 7.0
              DB2 9.5
              LiveCycle ES2
    websphere log as following:
         [8/25/10 0:07:05:093 PDT] 00000008 TimeoutManage I   WTRN0006W: Transaction 0000012AA80DB61600000003000011F7F5576B5DC585E6443AFA415F07FC959B3436ED460000012AA80DB6160 0000003000011F7F5576B5DC585E6443AFA415F07FC959B3436ED4600000001 has timed out after 300 seconds.
    [8/25/10 0:07:05:093 PDT] 00000008 TimeoutManage I   WTRN0124I: When the timeout occurred the thread with which the transaction is, or was most recently, associated was Thread[WebContainer : 2,5,main]. The stack trace of this thread when the timeout occurred was:
        java.lang.Object.wait(Native Method)
        java.lang.Object.wait(Object.java:196)
        com.ibm.rmi.iiop.OutCallDesc.waitForResponse(OutCallDesc.java:67)
        com.ibm.rmi.iiop.Connection.send(Connection.java:2232)
        com.ibm.rmi.iiop.ClientRequestImpl.invoke(ClientRequestImpl.java:326)
        com.ibm.rmi.corba.ClientDelegate.invoke(ClientDelegate.java:436)
        com.ibm.CORBA.iiop.ClientDelegate.invoke(ClientDelegate.java:1184)
        com.ibm.rmi.corba.ClientDelegate.invoke(ClientDelegate.java:783)
        com.ibm.CORBA.iiop.ClientDelegate.invoke(ClientDelegate.java:1214)
        org.omg.CORBA.portable.ObjectImpl._invoke(ObjectImpl.java:484)
        com.adobe.native2pdf.bmc._ConverterAgentStub.convertToPdf(_ConverterAgentStub.java:36)
        com.adobe.pdfg.callbacks.NativeToPDFTransactionCallback.convertToPdf(NativeToPDFTransacti onCallback.java:214)
        com.adobe.pdfg.callbacks.NativeToPDFTransactionCallback.doInTransaction(NativeToPDFTransa ctionCallback.java:188)
        com.adobe.idp.dsc.transaction.impl.ejb.adapter.EjbTransactionBMTAdapterBean.doRequiresNew (EjbTransactionBMTAdapterBean.java:218)
        com.adobe.idp.dsc.transaction.impl.ejb.adapter.EJSLocalStatelessEjbTransactionBMTAdapter_ 3af08fdf.doRequiresNew(Unknown Source)
        com.adobe.idp.dsc.transaction.impl.ejb.EjbTransactionProvider.execute(EjbTransactionProvi der.java:133)
        com.adobe.idp.dsc.transaction.impl.DefaultTransactionTemplate.execute(DefaultTransactionT emplate.java:79)
        com.adobe.pdfg.BMCCaller.invokeInSMT(BMCCaller.java:789)
        com.adobe.pdfg.Native2PdfCaller.callNativeBMC(Native2PdfCaller.java:1064)
        com.adobe.pdfg.Native2PdfCaller.createPDF(Native2PdfCaller.java:382)
        com.adobe.pdfg.GeneratePDFImpl.createPDFInternal(GeneratePDFImpl.java:501)
        com.adobe.pdfg.GeneratePDFImpl.createPDFCommon(GeneratePDFImpl.java:280)
        com.adobe.pdfg.GeneratePDFImpl.createPDF(GeneratePDFImpl.java:232)
        sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:45)
        sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
        java.lang.reflect.Method.invoke(Method.java:599)
        com.adobe.idp.dsc.component.impl.DefaultPOJOInvokerImpl.invoke(DefaultPOJOInvokerImpl.jav a:118)
        com.adobe.idp.dsc.interceptor.impl.InvocationInterceptor.intercept(InvocationInterceptor. java:140)
        com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptor ChainImpl.java:60)
        com.adobe.idp.dsc.interceptor.impl.DocumentPassivationInterceptor.intercept(DocumentPassi vationInterceptor.java:53)
        com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptor ChainImpl.java:60)
        com.adobe.idp.dsc.transaction.interceptor.TransactionInterceptor$1.doInTransaction(Transa ctionInterceptor.java:74)
        com.adobe.idp.dsc.transaction.impl.ejb.adapter.EjbTransactionBMTAdapterBean.doBMT(EjbTran sactionBMTAdapterBean.java:197)
        com.adobe.idp.dsc.transaction.impl.ejb.adapter.EJSLocalStatelessEjbTransactionBMTAdapter_ 3af08fdf.doBMT(Unknown Source)
        com.adobe.idp.dsc.transaction.impl.ejb.EjbTransactionProvider.execute(EjbTransactionProvi der.java:95)
        com.adobe.idp.dsc.transaction.interceptor.TransactionInterceptor.intercept(TransactionInt erceptor.java:72)
        com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptor ChainImpl.java:60)
        com.adobe.idp.dsc.interceptor.impl.InvocationStrategyInterceptor.intercept(InvocationStra tegyInterceptor.java:55)
        com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptor ChainImpl.java:60)
        com.adobe.idp.dsc.interceptor.impl.InvalidStateInterceptor.intercept(InvalidStateIntercep tor.java:37)
        com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptor ChainImpl.java:60)
        com.adobe.idp.dsc.interceptor.impl.AuthorizationInterceptor.intercept(AuthorizationInterc eptor.java:188)
        com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptor ChainImpl.java:60)
        com.adobe.idp.dsc.interceptor.impl.JMXInterceptor.intercept(JMXInterceptor.java:48)
        com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptor ChainImpl.java:60)
        com.adobe.idp.dsc.engine.impl.ServiceEngineImpl.invoke(ServiceEngineImpl.java:121)
        com.adobe.idp.dsc.routing.Router.routeRequest(Router.java:129)
        com.adobe.idp.dsc.provider.impl.base.AbstractMessageReceiver.routeMessage(AbstractMessage Receiver.java:93)
        com.adobe.idp.dsc.provider.impl.vm.VMMessageDispatcher.doSend(VMMessageDispatcher.java:22 5)
        com.adobe.idp.dsc.provider.impl.base.AbstractMessageDispatcher.send(AbstractMessageDispat cher.java:66)
        com.adobe.idp.dsc.clientsdk.ServiceClient.invoke(ServiceClient.java:208)
        com.adobe.aes.web.create.CreatePDFAct.createPDF(CreatePDFAct.java:415)
        com.adobe.aes.web.create.CreatePDFAct.createPDF2(CreatePDFAct.java:434)
        com.adobe.aes.web.create.CreatePDFAct.execute(CreatePDFAct.java:183)
        org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
        org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
        org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
        org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:738)
        com.adobe.aes.web.AesActionServlet.service(AesActionServlet.java:66)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
        com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1443)
        com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1384)
        com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:131)
        com.adobe.idp.um.auth.filter.AuthenticationFilter.doFilter(AuthenticationFilter.java:154)
        com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java: 188)
        com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116)
        com.adobe.idp.um.auth.filter.CSRFFilter.doFilter(CSRFFilter.java:41)
        com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java: 188)
        com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116)
        com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:77)
        com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:852)
        com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:785)
        com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:443)
        com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java: 175)
        com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.jav a:91)
        com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:859)
        com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1557)
        com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:173)
        com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink .java:455)
        com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink .java:384)
        com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.jav a:83)
        com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionLi stener.java:165)
        com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
        com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
        com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
        com.ibm.io.async.ResultHandler.complete(ResultHandler.java:202)
        com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:766)
        com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:896)
        com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1527)
    [8/25/10 0:07:13:734 PDT] 00000041 WordToPDFConv A com.adobe.service.ProcessResource$ManagerImpl logJdk ALC-PDG-001-000-Calling function to clean registrys Resiliency entry
    [8/25/10 0:07:18:468 PDT] 00000040 WordToPDFConv A com.adobe.service.ProcessResource$ManagerImpl logJdk ALC-PDG-001-000-Calling function to clean registrys Resiliency entry
    [8/25/10 0:07:18:546 PDT] 0000003a DMAdapter     I com.ibm.ws.ffdc.impl.DMAdapter getAnalysisEngine FFDC1009I: Analysis Engine using data base: E:\Program Files\IBM\WebSphere\AppServer\profiles\AppSrv01\properties\logbr\ffdc\adv\ffdcdb.xml
    [8/25/10 0:07:18:906 PDT] 0000003a FfdcProvider  I com.ibm.ws.ffdc.impl.FfdcProvider logIncident FFDC1003I: FFDC Incident emitted on E:\Program Files\IBM\WebSphere\AppServer\profiles\AppSrv01\logs\ffdc\server1_71917191_10.08.25_00.07 .18.54619796.txt com.ibm.ejs.container.UserTransactionWrapper.commit 285
    [8/25/10 0:07:18:921 PDT] 0000003a EjbTransactio E com.adobe.idp.dsc.transaction.impl.ejb.adapter.EjbTransactionBMTAdapterBean doRequiresNew The current transaction has been marked for rollback.  This means one of three things; 1) This transaction has timed-out (the timeout period was set to [470(sec)]470, while the actual transaction took [313(sec)]), 2) An unhandled exception occurred when calling another service (please check the logs for more detail), or 3) This is a JTA transaction and a service has explicitly marked this transaction for rollback
    [8/25/10 0:07:18:921 PDT] 0000003a EjbTransactio E com.adobe.idp.dsc.transaction.impl.ejb.adapter.EjbTransactionBMTAdapterBean doRequiresNew TRAS0014I: The following exception was logged javax.transaction.RollbackException
        at com.ibm.tx.jta.TransactionImpl.stage3CommitProcessing(TransactionImpl.java:1217)
        at com.ibm.tx.jta.TransactionImpl.processCommit(TransactionImpl.java:991)
        at com.ibm.tx.jta.TransactionImpl.commit(TransactionImpl.java:913)
        at com.ibm.ws.tx.jta.TranManagerImpl.commit(TranManagerImpl.java:369)
        at com.ibm.tx.jta.TranManagerSet.commit(TranManagerSet.java:161)
        at com.ibm.ws.tx.jta.UserTransactionImpl.commit(UserTransactionImpl.java:293)
        at com.ibm.ejs.container.UserTransactionWrapper.commit(UserTransactionWrapper.java:305)
        at com.adobe.idp.dsc.transaction.impl.ejb.adapter.EjbTransactionBMTAdapterBean.doRequiresNew (EjbTransactionBMTAdapterBean.java:220)
        at com.adobe.idp.dsc.transaction.impl.ejb.adapter.EJSLocalStatelessEjbTransactionBMTAdapter_ 3af08fdf.doRequiresNew(Unknown Source)
        at com.adobe.idp.dsc.transaction.impl.ejb.EjbTransactionProvider.execute(EjbTransactionProvi der.java:133)
        at com.adobe.idp.dsc.transaction.impl.DefaultTransactionTemplate.execute(DefaultTransactionT emplate.java:79)
        at com.adobe.pdfg.BMCCaller.invokeInSMT(BMCCaller.java:789)
        at com.adobe.pdfg.Native2PdfCaller.callNativeBMC(Native2PdfCaller.java:1064)
        at com.adobe.pdfg.Native2PdfCaller.createPDF(Native2PdfCaller.java:382)
        at com.adobe.pdfg.GeneratePDFImpl.createPDFInternal(GeneratePDFImpl.java:501)
        at com.adobe.pdfg.GeneratePDFImpl.createPDFCommon(GeneratePDFImpl.java:280)
        at com.adobe.pdfg.GeneratePDFImpl.createPDF(GeneratePDFImpl.java:232)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:45)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
        at java.lang.reflect.Method.invoke(Method.java:599)
        at com.adobe.idp.dsc.component.impl.DefaultPOJOInvokerImpl.invoke(DefaultPOJOInvokerImpl.jav a:118)
        at com.adobe.idp.dsc.interceptor.impl.InvocationInterceptor.intercept(InvocationInterceptor. java:140)
        at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptor ChainImpl.java:60)
        at com.adobe.idp.dsc.interceptor.impl.DocumentPassivationInterceptor.intercept(DocumentPassi vationInterceptor.java:53)
        at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptor ChainImpl.java:60)
        at com.adobe.idp.dsc.transaction.interceptor.TransactionInterceptor$1.doInTransaction(Transa ctionInterceptor.java:74)
        at com.adobe.idp.dsc.transaction.impl.ejb.adapter.EjbTransactionBMTAdapterBean.doBMT(EjbTran sactionBMTAdapterBean.java:197)
        at com.adobe.idp.dsc.transaction.impl.ejb.adapter.EJSLocalStatelessEjbTransactionBMTAdapter_ 3af08fdf.doBMT(Unknown Source)
        at com.adobe.idp.dsc.transaction.impl.ejb.EjbTransactionProvider.execute(EjbTransactionProvi der.java:95)
        at com.adobe.idp.dsc.transaction.interceptor.TransactionInterceptor.intercept(TransactionInt erceptor.java:72)
        at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptor ChainImpl.java:60)
        at com.adobe.idp.dsc.interceptor.impl.InvocationStrategyInterceptor.intercept(InvocationStra tegyInterceptor.java:55)
        at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptor ChainImpl.java:60)
        at com.adobe.idp.dsc.interceptor.impl.InvalidStateInterceptor.intercept(InvalidStateIntercep tor.java:37)
        at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptor ChainImpl.java:60)
        at com.adobe.idp.dsc.interceptor.impl.AuthorizationInterceptor.intercept(AuthorizationInterc eptor.java:188)
        at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptor ChainImpl.java:60)
        at com.adobe.idp.dsc.interceptor.impl.JMXInterceptor.intercept(JMXInterceptor.java:48)
        at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptor ChainImpl.java:60)
        at com.adobe.idp.dsc.engine.impl.ServiceEngineImpl.invoke(ServiceEngineImpl.java:121)
        at com.adobe.idp.dsc.routing.Router.routeRequest(Router.java:129)
        at com.adobe.idp.dsc.provider.impl.base.AbstractMessageReceiver.routeMessage(AbstractMessage Receiver.java:93)
        at com.adobe.idp.dsc.provider.impl.vm.VMMessageDispatcher.doSend(VMMessageDispatcher.java:22 5)
        at com.adobe.idp.dsc.provider.impl.base.AbstractMessageDispatcher.send(AbstractMessageDispat cher.java:66)
        at com.adobe.idp.dsc.clientsdk.ServiceClient.invoke(ServiceClient.java:208)
        at com.adobe.aes.web.create.CreatePDFAct.createPDF(CreatePDFAct.java:415)
        at com.adobe.aes.web.create.CreatePDFAct.createPDF2(CreatePDFAct.java:434)
        at com.adobe.aes.web.create.CreatePDFAct.execute(CreatePDFAct.java:183)
        at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
        at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
        at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
        at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:738)
        at com.adobe.aes.web.AesActionServlet.service(AesActionServlet.java:66)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
        at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1443)
        at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1384)
        at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:131)
        at com.adobe.idp.um.auth.filter.AuthenticationFilter.doFilter(AuthenticationFilter.java:154)
        at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java: 188)
        at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116)
        at com.adobe.idp.um.auth.filter.CSRFFilter.doFilter(CSRFFilter.java:41)
        at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java: 188)
        at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116)
        at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:77)
        at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:852)
        at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:785)
        at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:443)
        at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java: 175)
        at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.jav a:91)
        at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:859)
        at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1557)
        at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:173)
        at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink .java:455)
        at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink .java:384)
        at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.jav a:83)
        at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionLi stener.java:165)
        at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
        at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
        at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
        at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:202)
        at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:766)
        at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:896)
        at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1527)
          what should I do?
          Please advise
          thanks

    Hi,
         Have you seen the following?
         http://blogs.adobe.com/livecycle/2008/10/livecycle_processing_big_docum.html
    http://blogs.adobe.com/livecycle/2008/10/livecycle_tuning_knob_default.html
    These articles both helped me.

  • How to replace or remove last 500 bytes of a file without rewriting all the file?

    Hi everyone,
    Usually I only ask for help when I can't find a solution for several days or weeks... And guess what? That just happen!
    So, this is what i am trying to do:
    I have a program to ZIP folder and protect them with password, then it encrypts the zip file.
    That it's working fine, until the user forgets his password.
    So, what I want to do is give the user a Recovery Password option for each ZIP file created. I can't use the Windows Registry because the idea is to be able to recover the password in any computer.So i came up with an idea...
    In simple terms, this will work like this:
    0 - Choose folder to ZIP
    1 - Ask user for recover details (date of birth, email etc)
    2 - ZIP folder with password
    3 - Encrypt ZIP file
    4 - Encrypt recover details and convert it to HEX
    5 - Add recover details (in HEX) to the end of the ZIP file (last bytes)
    6 - Add "5265636F76657244657461696C73" which is the text "RecoverDetails" in HEX
    7 - Add "504B0506000000000000000000000000000000000000" this is the final bytes of a ZIP file and will make the Operating System think that is a ZIP file (i know that will give an error when we try to open it.. the ideia is to change the
    extension later and use my software to do all the work to access this ZIP/folder again)
    So, explaining what it's here, I want to say that I managed how to do all of this so far. The point number 6 will help us to determine where the recover details are in the file, or if they actually exist because user can choose not to use them.
    In order to unlock this ZIP and extract it's contents, I need to reverse what I've done. That means, that  need to read only the last 500 bytes (or less if the file is smaller) of the ZIP and remove those extra bytes I added so the program can check
    if the user is inputing a correct password, and if so decrypt contents and extract them.
    But, if the user insert a wrong password I need to re-add those bytes with the recover details again to the ZIP file.
    The second thing is, if the user forgets his password and asks to recover it, a form will be shown asking to insert the recover detail (date of birth, email etc), so we need to reed the last 500 bytes of the ZIP, find the bytes in number 6 and remove the
    bytes before number 6, remove bytes in number 6 and number 7, and we will have the recover details to match against the user details input.
    I have all done so far with the locking process. But i need help with the unlocking.
    I am not sure if it's possible, but this what i am looking for:
    Read last 500 bytes of a file, remove the bytes with recover details and save the file. Without reading the whole file, because if we have a 1GB file that will take a very long time. Also, i don't want to "waste" hard drive space creating a new
    clone file with 1GB and then delete the original.
    And then add them back "in case user fails the password" which should be exactly the same.
    This sounds a bit confusing I know, even to me, I am writing and trying to explain this the better I can.. Also my English is not the best..
    Here it goes some code to better understanding:
    'READ LAST 500 BYTES OF ZIP FILE TO CHECK IF IT CONTAINS RECOVER DETAILS
    Dim oFileStream As New FileStream(TextBox_ZIP_to_Protect.Text & ".zip", FileMode.Open, FileAccess.Read)
    Dim oBinaryReader As New BinaryReader(oFileStream)
    Dim lBytes As Long = oFileStream.Length
    oBinaryReader.BaseStream.Position = lBytes - 500
    Dim fileData As Byte() = oBinaryReader.ReadBytes(500)
    oBinaryReader.Close()
    oFileStream.Close()
    Dim txtTemp As New System.Text.StringBuilder()
    For Each myByte As Byte In fileData
    txtTemp.Append(myByte.ToString("X2"))
    Next
    Dim RecoveryDetailsPass_Holder = txtTemp.ToString()
    'Dim Temp_2 = txtTemp.ToString()
    'RichTextBox1.Text = txtTemp.ToString()
    If txtTemp.ToString.Contains("505245434F47414653") Then
    'we have password recovery details(the numbers mean RecoverDetails in HEX)
    'next we will get rid of everything before and after of string "cut_at"
    Dim mystr As String = RecoveryDetailsPass_Holder 'RichTextBox1.Text
    Dim cut_at As String = "505245434F47414653"
    Dim x As Integer = InStr(mystr, cut_at)
    ' Dim string_before As String = mystr.Substring(0, x - 1)
    Dim string_after As String = mystr.Substring(x + cut_at.Length - 1)
    RecoveryDetailsPass_Holder = RecoveryDetailsPass_Holder.Replace(string_after.ToString, "")
    RecoveryDetailsPass_Holder = RecoveryDetailsPass_Holder.Replace("505245434F47414653", "") ' this is RecoverDetails in HEX
    RecoveryDetailsPass_Holder = RecoveryDetailsPass_Holder.Replace("504B0506000000000000000000000000000000000000", "") ' this is the bytes of an empty zip file
    'AT THIS POINT WE HAVE ONLY THE RECOVER PASSWORD DETAILS (date of birth, email etc) IN THE VARIABLE "RecoveryDetailsPass_Holder"
    '////////////////////////////////////////////////////// TO DEBUG
    'MsgBox(string_after.ToString & "505245434F47414653")
    'InputBox("", "", string_after.ToString)
    '\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ TO DEBUG
    'Temp_2 = Temp_2.Replace(RecoveryDetailsPass_Holder.ToString, "")
    Now that we have the recover details, we need to remove them from ZIP in order to the software try to unzip it with the password provided by the user on the GUI.
    If the user needs to recover the password we have the details already in RecoveryDetailsPass_Holder variable and just need to match them against user input details.
    If the user fails, we need to put the RecoveryDetailsPass_Holder back on the file.
    Any question just ask, it's a bit trick to explain i think, but please ask.
    Anyone know how to do this?
    Many thanks in advanced.
    Nothing is impossible!
    @ Portugal
    Vote if it's helpfull :)

    @ ALL
    Thank you very much for you help. I know that if I'm "playing" with bytes you should assume that I know a lot of VB.net, but I don't know that much unfortunately. I am not a beginner but I am still very fresh and I probably do stuff that work but
    probably not in the best way...
    Anyway, I will explain the idea of this little software I'm making. Once I wanted to create a program to protect folders with password, and I came up with something to change folder permissions to lock access to them, and that actually worked fine and quickly.
    However, I managed how to "crack" the protection by going to folder properties, security tab and then give permissions back to my username. So that, to me, wasn't a safer system to protect folders, also I want the ability to use passwords. So I search
    and search online for a way to do it, and someone replied (to someone with the same question as me) that the best option would be to create a zip with all contents of the folder, with password and then change the extension from .zip to .whatever and register
    the new extension .whatever on the Windows Registry, so that file will have an icon and open with my software.
    So I did...The program zips everything, change the extension and I added the encryption to avoid people changing the extension to ZIP or trying to open with 7-Zip or similar and be able to see the protected files names in the .zip/.whatever
    Answering to all of you now:
    @Armi
    "System.IO.FileStream.SetLength"
    I know I tried that but I erased the code because it didn't work for some reason, I don't remember why sorry, was long time before I created this post.
    The last code I was trying to use was this:
    ' Set the stream position to the desired location of the stream.
    Dim fileStream As IO.FileStream = _
    New IO.FileStream(TextBox_ZIP_to_Protect.Text & ".zip", IO.FileMode.Append)
    Try
    ' Set the stream (OFFSET) position to the desired location of the stream.
    fileStream.Seek(210, IO.SeekOrigin.Current)
    Dim Bytes_do_ZE As Byte() = HexStringToByteArray(Temp_2.ToString)
    'Write Characters ASCII
    For Each Byte_Do_Zeca As Byte In Bytes_do_ZE
    fileStream.WriteByte(Byte_Do_Zeca)
    Next
    Finally
    fileStream.Close()
    End Try
    and we need this:
    Private Shared Function HexStringToByteArray(ByRef strInput As String) As Byte()
    Dim length As Integer
    Dim bOutput As Byte()
    Dim c(1) As Integer
    length = strInput.Length / 2
    ReDim bOutput(length - 1)
    For i As Integer = 0 To (length - 1)
    For j As Integer = 0 To 1
    c(j) = Asc(strInput.Chars(i * 2 + j))
    If ((c(j) >= Asc("0")) And (c(j) <= Asc("9"))) Then
    c(j) = c(j) - Asc("0")
    ElseIf ((c(j) >= Asc("A")) And (c(j) <= Asc("F"))) Then
    c(j) = c(j) - Asc("A") + &HA
    ElseIf ((c(j) >= Asc("a")) And (c(j) <= Asc("f"))) Then
    c(j) = c(j) - Asc("a") + &HA
    End If
    Next j
    bOutput(i) = (c(0) * &H10 + c(1))
    Next i
    Return (bOutput)
    End Function
    That code, as I understand, is to search for the OFFSET of the bytes in the file and start to write from there... That OFFSET should be the beginning of the 500 bytes read on the code before. I got the OFFSET position "210" reading the file with
    the HEX editor "HxD - Hexeditor v1.7.7.0" but using the OFFSET won't work because every file, password, recover details and so on, are different and so the file size, changing the OFFSET I
    think.
    @Reed Kimble
    Does that sound like something which might work for you?
    Thanks for your help. That might be some solution, however it seams a bit of the same problem where we need to read the bytes again to get the recover details. But, as I said in this post, because this is meant to password protect folders, do you think that
    will apply as well?
    @Crazypennie
    Thanks for your reply.
    All this appears really weak. The user has your application since he need it to open the file .... and the code in the application contain the code to read the file without knowing the password. Therefore anyone can read your code and retrieve the
    data without the password ... if he knows VB.
    The application can only open the file if the user didn't use a password to protect the file. Because the file is encrypted and needs to be unencrypted first.
    When the application tries to open/read the file, will need to decrypt it first and then check for a password and do the validation. Also the application is with the code masked/protected which i think it might not be easy for reverse engineering.
    - You need to use a web server and a symmetric key encryption
    This a good idea, besides I don't know how to implement it. However the idea is to be able to:
    1 - Protect a folder anywhere in any Windows computer (portable app)
    2 - Recover password details (security question) in any computer, online and offline
    And I think we need a computer always connected to the Internet to use that method, right?
    @ Mr. Monkeyboy
    Thank you very much for your effort.
    I just wanted to let you know that the zip method you are using is no longer supported.
    I didn't actually knew that. Thanks for letting me know.
    Do you require the compressed encrypted files to actually be Zip files or could they just be compressed files that have nothing to do with Zip?
    No, it doesn't need to be a .zip extension. I am actually using my own extension. It starts as a Zip but then I changed to my own extension which I have registered on the Windows Registry.
    @ ALL
    Thanks again to all for trying and spending time helping me.
    By the way, I might not be able to answer or try any code during the weekend... It's easter break and family is around. Have a nice easter everyone. :)
    Nothing is impossible! Imagination is the limit!

  • Erro in bursting ZIP file must have at least one entry

    Hi All ,
    i am using bursting utility for xmlp report ,but getting the following error
    --Exception
    ZIP file must have at least one entry
    java.util.zip.ZipException: ZIP file must have at least one entry
         at java.util.zip.ZipOutputStream.finish(ZipOutputStream.java:304)
         at oracle.apps.xdo.oa.cp.JCP4XDOBurstingEngine.zipOutputFiles(JCP4XDOBurstingEngine.java:534)
         at oracle.apps.xdo.oa.cp.JCP4XDOBurstingEngine.runProgram(JCP4XDOBurstingEngine.java:292)
         at oracle.apps.fnd.cp.request.Run.main(Run.java:161)
    i have no clue y this error is coming ,any hint would be very helpful,
    Thanks in advance
    thanks
    Pratap

    Hi All
    i got resolved this error (Erro in bursting ZIP file must have at least one entry) ,was doing very silly mistake i was using the template name instead of Data Definition code name in location string
    location= ' '
    so the ZIP file error is removed ,now getting one more error after this ,which i am not able to under stand
    --Exception
    /tmp/011211_023243126/xdo1_164902_2.pdf (No such file or directory)
    java.io.FileNotFoundException: /tmp/011211_023243126/xdo1_164902_2.pdf (No such file or directory)
         at java.io.FileInputStream.open(Native Method)
         at java.io.FileInputStream.<init>(FileInputStream.java:106)
         at java.io.FileInputStream.<init>(FileInputStream.java:66)
         at oracle.apps.xdo.oa.cp.JCP4XDOBurstingEngine.zipOutputFiles(JCP4XDOBurstingEngine.java:532)
         at oracle.apps.xdo.oa.cp.JCP4XDOBurstingEngine.runProgram(JCP4XDOBurstingEngine.java:299)
         at oracle.apps.fnd.cp.request.Run.main(Run.java:161)
    Please help me on this
    Thanks
    Pratap

  • Process multiple documents in zip file without using ccBPM in PI

    Hi,
    Is it possible for PI to handle multiple documents within a zipped source file without the use of ccBPM?
    For example, I have an incoming source zip file containing 0.pdf, a,xml, z.pdf respectively,  After having the sender communication channel uncompress the zip file, each pdf file should be pushed to a directory on a file server, and the xml file should go through a message mapping.
    Is this possible to process all of the files without the use of ccBPM?
    Regards,
    Jim

    Hi Michal,
    Thank you for your response.  The example I provided is just one potential case.  In general, the zip file will always contain 1 xml file and 0-n PDFs, Word docs, or other types of documents.  Also, the first file in the zip may not always be the xml file, which is what I was trying to portray by my example.  Since I am not sure how many non-xml files will be included, I did not know if I could handle all of them directly, without ccBPM.
    At this point, I am leaning towards using a script preprocessor to uncompress the zip, then for each file found, push the xml file to an NFS channel which will process/map the xml, and push every other file type to another NFS channel to copy these documents to a predetermined directory on a predetermined server.
    What are your thoughts on this approach?
    Thanks and Regards,
    Jim

  • Need to send the zip file to mail as an attachment

    i want to pick the zip file which consists some 2,3 files inside it. and send as it is to mail as an attachment.what i did is
    i have taken one zip file,,, "testing.zip" inside it i have "test1.txt" & "test2.csv"
    i created sender CC ,,in that i used module payloadzipbean and  unzipped and called the file adapter.. created reciever CC as mail ..used same payload module now here i zipped all the payloads.
    Result..i see the attachment coming as "test1.txt.zip" ..here i can see inside this zipfile my original file names as "test1.txt"&"test2.csv" as i enabled ASMA in both CC.
    issues:i am unable to get the original file name like "testing.zip" ,,
    can anyone help me in this.
    Regards,
    Loordh

    Hi  all,
    as i posted last time my requirement ,i am going with java mapping for my scenario. i am using this code .
    http://wiki.sdn.sap.com/wiki/display/XI/Dynamicfilenameforpass-through+scenario
    this is working perfect for zip file  (file to file) scenario. but my scenario is file to mail ..as i need to send this to mail package there it is throwing error.i am getting  "zip file name as attachment properly but when  i try to  open it is giving error in zip file." this is what i modied code ..i am able to see my messge in sender CC and reciever CC..any java experts please help on this.
    try {
    // create XML structure of mail package
    String output = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
    + "<ns:Mail xmlns:ns=\"http://sap.com/xi/XI/Mail/30\">"
    + "<Subject>" + mailSubject + "</Subject>"
    + "<From>" + mailSender + "</From>"
    + "<To>" + mailReceiver + "</To>"
    + "<Content_Type>multipart/mixed; boundary=\"" + boundary + "\"</Content_Type>"
    + "<Content>";
    out.write(output.getBytes());
    // create the declaration of the MIME parts
    //First part
    output = "--" + boundary + CRLF
    + "Content-Type: text/plain; charset=UTF-8" + CRLF
    //+ "Content-Transfer-Encoding: 8bit" + CRLF
    + "Content-Disposition: inline" + CRLF + CRLF
    + mailContent + CRLF
    //Second part
    + "--" + boundary + CRLF
    + "Content-Type: Application/zip; name=" + attachmentName + CRLF
    //+ "Content-Transfer-Encoding: base64" + CRLF
    + "Content-Disposition: attachment; filename=" + attachmentName + CRLF + CRLF;
    out.write(output.getBytes());
    //Source is taken as attachment
    copySource(in, out);
    out.write("</Content></ns:Mail>".getBytes());
    } catch (IOException e) {
    throw new StreamTransformationException(e.getMessage());
    protected static void copySource(InputStream in, OutputStream out)
    throws IOException {
    byte[] bbuf = new bytehttp://in.available();
    int bblen = in.read(bbuf);
    if (!(bblen < 0)) {
    //String sbuf = new String(bbuf);
    //String encoded = Base64.encode(sbuf);
    // replace all control characters with escape sequences
    //sbuf = sbuf.replaceAll("&", "&");
    //sbuf = sbuf.replaceAll("\"", """);
    //sbuf = sbuf.replaceAll("'", "&apos;");
    //sbuf = sbuf.replaceAll("<"<");
    //sbuf = sbuf.replaceAll(">", ">");
    out.write(bbuf);}}

Maybe you are looking for