Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cross-project-issues-dev] Need help with pack200

This class file is corrupted.
Once recompiled it works fine. It might have been committed as an ascii 
file.

I opened https://bugs.eclipse.org/bugs/show_bug.cgi?id=147510 to track it 
down.

The simplest solution would be to remove the contents of the output folder 
from the CVS server and also add a .cvsignore file in the root of this 
project.

HTH,

Olivier




Andrew Niefer/Ottawa/IBM@IBMCA 
Sent by: cross-project-issues-dev-bounces@xxxxxxxxxxx
2006-06-13 15:46
Please respond to
Cross project issues <cross-project-issues-dev@xxxxxxxxxxx>


To
Cross project issues <cross-project-issues-dev@xxxxxxxxxxx>
cc

Subject
Re: [cross-project-issues-dev] Need help with pack200







Hubert, 
There is something wrong with some of the class files in the 
org.eclipse.tptp.platform.examples.isv jar. 
Specifically ExportToXML.class, ExportViewerGeneratorSamplePlugin.class 
and Messages.class in archive/ExportViewerGeneratorSample/bin. 

When you try running pack200.exe directly on the jar, you end up with 
something like the following: 

C:\Dev\test\packer>pack200 -r ExportToXML.jar 
Exception in thread "main" java.io.IOException: Bad constant pool tag 13 
        at 
com.sun.java.util.jar.pack.ClassReader.readConstantPool(ClassReader.java:232) 

        at 
com.sun.java.util.jar.pack.ClassReader.read(ClassReader.java:123) 
        at 
com.sun.java.util.jar.pack.PackerImpl$DoPack.readClass(PackerImpl.java:490) 

        at 
com.sun.java.util.jar.pack.PackerImpl$DoPack.run(PackerImpl.java:464) 
        at com.sun.java.util.jar.pack.PackerImpl.pack(PackerImpl.java:73) 
        at com.sun.java.util.jar.pack.Driver.main(Driver.java:261) 


I don't know enough about class files to say exactly what is wrong, but 
perhaps you should try recompiling those class files. 

-Andrew 


Hubert H Leung/Toronto/IBM@IBMCA 
Sent by: cross-project-issues-dev-bounces@xxxxxxxxxxx 
06/13/2006 10:32 AM 

Please respond to
Cross project issues <cross-project-issues-dev@xxxxxxxxxxx>


To
Cross project issues <cross-project-issues-dev@xxxxxxxxxxx> 
cc

Subject
Re: [cross-project-issues-dev] Need help with pack200









Hi Andrew, 

Thank you for your reply.  Your suggestion of unzipping the files and only 
condition the jar files in the zip file really worked.   I have 
successfully created a conditioned (repacked) zip files with proper file 
permissions. The idea is not to let the pack200 program touch files other 
than jar files or class files.  However, if I pack the feature and plugin 
jar files when I prepare the update site, and users download the plugins 
through the updater, which unpacks the jar files, the execute permissions 
of files in the plugins will still be lost.  The change of file 
permissions seems to be a limitation of pack200. 

As for the error returned when repacking the 
org.eclipse.tptp.platform.examples.isv plugin, I couldn't get more 
detailed error messages.  I am now excluding that plugin from the repack 
process.   


You can see our build scripts at dev.eclipse.org:/home/tptp, under module 
platform/org.eclipse.hyades.releng.builder.   
Files related to pack200 include 
/org.eclipse.hyades.releng.builder/master/runtime/customTargets.xml and 
/org.eclipse.hyades.releng.builder/master/bash/pack200.sh 


Thanks again for your helpful input!
_________________________
Hubert Leung
IBM Toronto Lab
hkyleung@xxxxxxxxxx
905-413-3382 

Andrew Niefer/Ottawa/IBM@IBMCA 
Sent by: cross-project-issues-dev-bounces@xxxxxxxxxxx 
06/12/2006 03:12 PM 

Please respond to
Cross project issues <cross-project-issues-dev@xxxxxxxxxxx>



To
Cross project issues <cross-project-issues-dev@xxxxxxxxxxx> 
cc

Subject
Re: [cross-project-issues-dev] Need help with pack200











Hubert, 
If you are talking about the permissions on files in the zip (as opposed 
to permissions on files inside jars), then one workaround would be to 
extract the zip to a temporary directory and run the jarprocessor on the 
directory instead of on the zip, then rezip the directory.  I don't see 
how there should be any difference between postAssemble and postPackage as 
far as permissions go so this is a bit of a mystery. 

The return code of 1 is what was returned from pack200.exe, I have not 
been able to find any documention on it either.  I would suggest manually 
running the command that failed and see if pack200 wrote any error message 
to the screen that may be helpful.  Although it might be hard to stop the 
processor before it deletes that temporary file.  You could also run the 
command manually on org.eclipse.tptp.platform.examples.isv.  I wouldn't 
think that any nested examples plugins should make a difference. 

Are your releng scripts in CVS that I can get them to try and debug this a 
bit? 

-Andrew 
Hubert H Leung/Toronto/IBM@IBMCA 
Sent by: cross-project-issues-dev-bounces@xxxxxxxxxxx 
06/11/2006 05:54 PM 

Please respond to
Cross project issues <cross-project-issues-dev@xxxxxxxxxxx>



To
Cross project issues <cross-project-issues-dev@xxxxxxxxxxx> 
cc

Subject
[cross-project-issues-dev] Need help with pack200













I face two problems with pack200 when trying to compress the packages for 
TPTP.  If someone has a similar experience but has a solution, please help 
me out.  Please also let me know if you think I'm doing something wrong. 

The first problem is about file permissions.  From the documentation of 
pack200, you can find this quote: "By default, the packer does not change 
the order of JAR elements. Also, the modification time and deflation hint 
of each JAR element is passed unchanged. (Any other ZIP-archive 
information, such as extra attributes giving Unix file permissions, are 
lost.)" 

I learned about this limitation the hard way.  I condition the jar files 
(at least for TPTP) in the postAssemble step of the PDE build, after PDE 
creates all the feature zip files, but before we slice and dice the 
features into zipfiles for download.  Since the same feature can end up in 
more than one package (such as runtime, sdk, etc.), doing the conditioning 
before the packaging step can avoid conditioning the same jar file several 
times.  However, if I do this, the file mode of all files and directories 
in the final zip files become 000.  That is, all read, write and execute 
permissions are gone.  I noticed WTP does the conditioning in the 
postPackage step, which is equivalent to doing the conditioning on the 
final zip files.  I tried that too, and the result was that the read and 
write permissions flags are set, but all execute flags are lost.  There 
are some operating system specific files which I took special care to make 
sure the execute permission is set, but that's gone after pack200.   


The second problem I found was an error returned when repacking (or 
packing) some of our jar files.  For example: 
  [exec] Extracting 
eclipse/plugins/org.eclipse.tptp.platform.examples.isv_4.2.0.v200606061039.jar 

  [exec] Running Repack on 
/public/TPTP/4.2.0/TPTP-4.2.0-200606110100/temp_tptp.platform.sdk-TPTP-4.2.0-200606110100.zip/eclipse/plugins/org.eclipse.tptp.platform.examples.isv_4.2.0.v200606061039.jar 

  [exec] Error: 1 was returned from command: 
/opt/ibm/jdk1.5.0_06/jre/bin/pack200 -r 
/public/TPTP/4.2.0/TPTP-4.2.0-200606110100/temp_tptp.platform.sdk-TPTP-4.2.0-200606110100.zip/temp_org.eclipse.tptp.platform.examples.isv_4.2.0.v200606061039.jar 
/public/TPTP/4.2.0/TPTP-4.2.0-200606110100/temp_tptp.platform.sdk-TPTP-4.2.0-200606110100.zip/temp.org.eclipse.tptp.platform.examples.isv_4.2.0.v200606061039.jar/org.eclipse.tptp.platform.examples.isv_4.2.0.v200606061039.jar 

  [exec] Adding 
eclipse/plugins/org.eclipse.tptp.platform.examples.isv_4.2.0.v200606061039.jar 
to 
/public/TPTP/4.2.0/TPTP-4.2.0-200606110100/tptp.platform.sdk-TPTP-4.2.0-200606110100.zip.temp 


I could not find any documentation on this error code.  A possible reason 
of the error is that this plugin contains some examples plugins, which 
contain a MANIFEST.MF file for each example, and the packer is somehow 
confused.   


_________________________
Hubert Leung
IBM Toronto Lab
hkyleung@xxxxxxxxxx
905-413-3382_______________________________________________
cross-project-issues-dev mailing list
cross-project-issues-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cross-project-issues-dev
_______________________________________________
cross-project-issues-dev mailing list
cross-project-issues-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cross-project-issues-dev
_______________________________________________
cross-project-issues-dev mailing list
cross-project-issues-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cross-project-issues-dev
_______________________________________________
cross-project-issues-dev mailing list
cross-project-issues-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cross-project-issues-dev




Back to the top