cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
james_decosta
Level 9

hi i am having a problem with the modify text file inside an archive problem

hi,
I have a requirement in which i need to change a configuration file inside an arcihve depending on the system (so as to make my installer system independent)
so this is what i did:

In the install task i have included the jar file say xyz.jar
and i added a task as modify text file in archive xyz.jar (yyyConfig.properties)

installed archive: $USER_INSTALL_DIR$$/$xyz.jar

archive path: $USER_INSTALL_DIR$$/$xyz.jar$/$yyyConfig.properties
in the configure button i gave search for "somestring" and replace with $USER_INSTALL_DIR$
CHECKED Substitute installanywhere variables in file
and the error i got is
Modify Text File - In Archive: xxx.jar
Status: ERROR
Additional Notes: ERROR - There was a problem editing F:\testfolder\xxx.jar: java.util.zip.ZipException: Entry: F:/testfolder/xxx.jar/yyyConfig.properties not found in zip
can anyone please suggest some solution
Labels (1)
0 Kudos
(13) Replies
pv7721
Level 20

Would it be possible for you to post your project?
0 Kudos
james_decosta
Level 9

hi ,
do you want me to post the installer build iap.xml but i have already posted the steps which i am doing exactly as i did nothing did i miss but still can you tell me how to upload that project.iap_xml .
It would really be a pleasure if you can help me in cracking the "modify text file in an archive" .I did replicate the same as i had said.
0 Kudos
james_decosta
Level 9

Hi,
it would really be a pleasure if someone can help in cracking the jinx of modifying text file in an archive.
0 Kudos
purcellk24
Level 7

It looks like you have the Archive Path set wrong. This is the path inside the archive. So, remove the $USER_INSTALL_DIR$$/$xyz.jar$/$ so that you only have yyyConfig.properties. Also, make sure that that xyz.jar is installed before you try to modify it.
0 Kudos
james_decosta
Level 9

hi,
as you said in the install task i added the file saying that xxx.jar and in the post install task i added "modify text file in archive "

installed archive----$USER_INSTALL_DIR$$/$xxx.jar

Archive path -----yyyconfig.properties
i tried your option but it did not work.
Even i think that my archive path is wrong but can you help me in setting it right.

i got the exception in the installer log as
Modify Text File - In Archive: xxx.jar
Status: ERROR
Additional Notes: ERROR - There was a problem editing F:\temp\xxx.jar: java.util.zip.ZipException: invalid entry compressed size (expected 2644 but got 2630 bytes)
0 Kudos
pv7721
Level 20

This was precisely why I was asking for you your .iap_xml file. We might be easier and faster for us to help you if we get a chance to look at your project. And as this forum's software has a limitation on type of files to be uploaded I suggest you zip your project first.
0 Kudos
james_decosta
Level 9

hi,
i tried to do what you said but still it is showing an error in the install log saying that
Status: ERROR
Additional Notes: ERROR - There was a problem editing F:\temp\temp2\xxx.jar: java.util.zip.ZipException: Entry: ./yyyConfig.properties not found in zip
0 Kudos
purcellk24
Level 7

Ok. What pv7721 said about posting your project will probably help faster. If you can't post your project, post a sample project that does just what you are having problems with.

How was your original jar file created? The compression size entry error probably means the xxx.jar is corrupted somehow. Was it modified with winzip at anytime?

Also, Are we correct in assuming that you are installing to f:\temp?
0 Kudos
james_decosta
Level 9

hello everyone,

I tried whatever i can but still unable to crack it can anyone help me out.
0 Kudos
pv7721
Level 20

We still don't see your project posted or if you are not allowed to post your project (which is perfectly understable) you should post a sample project which reproduces your issue. Thanks!
0 Kudos
james_decosta
Level 9

hello,
I have tried that option also but still its not working . can you suggest me why.
0 Kudos
pv7721
Level 20

What exactly do you mean by: "I have tried that option but still its not working"? Have you tried to upload your project but you haven't succeed? If this is the case, like I've already told you, you will need to zip your .iap_xml file before attempting to attach it to your post.
0 Kudos
james_decosta
Level 9

hello,
This is what i am trying to do :
Pre install task:
I give a "Get User Input Advanced " panel and capturing user input in user input variables for a file userinput.properties and delimiter.xml both of which are contained in a jar file called dummy.jar
In the install task:
i added the dummy.jar which contains userinput.properties
and delimiter.xml.
In the post install task:
i added an action " modify text file in archive" and gave the path to "userinput.properties" and "delimiter.xml " and i added configure strings
and then search for and replace wiith but it does not happen and the action fails.
0 Kudos