-
Bug
-
Resolution: Fixed
-
P2
-
7u6
-
b11
-
b49
-
x86
-
windows_7
-
Verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2227139 | 7u6 | Nam Nguyen | P2 | Closed | Fixed | b21 |
J2SE Version (please include all output from java -version flag):
7u6 b17
Does this problem occur on J2SE 6ux or 7ux? Yes / No (pick one)
No
Operating System Configuration Information (be specific):
Windows_7
Bug Description:
Issue 1:
1. While the jars gets downloaded in our application, got class not found exception for LocalApplicationProperties.class
It seems you have removed both LocalApplicationProperties.class and AssociationDesc.class from your deploy.jar.
deploy\com\sun\deploy\cache\LocalApplicationProperties.class
deploy\com\sun\deploy\cache\AssociationDesc.class
As a work around we added new classes
with the same name and it seems to have solved the issue for now.
Issue 2:
But as soon as the jars gets downloaded, Got the below issue as soon as the applet tries to launch.
cache: Trying to upgrade in place D:\JavaCache\6.0\4\369cd984-158f6707-6.4.0.0-.idx
Invalidating entry url= file=D:\JavaCache\6.0\4\369cd984-158f6707-6.4.0.0-.idx
java.io.UTFDataFormatException: malformed input around byte 177
at java.io.DataInputStream.readUTF(Unknown Source)
at java.io.RandomAccessFile.readUTF(Unknown Source)
at com.sun.deploy.cache.CacheEntry.readIndexFile602(Unknown Source)
at com.sun.deploy.cache.CacheEntry.readIndexFileOld(Unknown Source)
at com.sun.deploy.cache.CacheEntry.readIndexFile(Unknown Source)
We verified the deploy.jar again and oracle seems to have made many changes to this jar out of which notable changes were made to CacheEntry file where this
exception occurs. Attaching the diff file of CacheEntry of Jre 17U5 (working) and Jre 17U6 (Not working).
There are some changes being made especially in the methods readIndexFile where a check is made for the .idx file which is downloaded into our cache.
Steps to reproduce:
1. Install jre17u6
2. Delete all the file from java cache location (can be found from control panel -> java -> settings (in general tab) -> locations.
3. Also enable tracing and console logs of java in Control Panel->Java->Advanced->Debugging and Java Console
4. check 'Comments' field for login information
5. Browser tries to download jars and will throw exception as "No class def found for the class LocalApplicationProperties" in the console.
6. To fix the above we modified our code and changed the package of the import for the class LocalApplicationProperties as com.sun.deploy.model (earlier <Com.sun.deploy.cache>). The modified code is present in the "com" package provided in the attachment.
Below steps is to repackage the jar file with the modified package.
7. Now go to the java cache location and search for the string "customjpipreloader7u2" (most probably it will be available in folder no 57)
8. Copy the 0- file (eg. 329fde76-3166fa61-6.4.0.0-) which contains this string.
9. Paste into some local folder and then extract using following command - jar -xvf <name of the 0- file>
10. After extract delete the 0- file. (eg. 329fde76-3166fa61-6.4.0.0-) from the local folder
11. Replace the com folder with the attached com folder.
12. Make the jar file using following command - jar -cvf <name of the 0- file> *
13. Now replace the old 0- file in java cache location with the newly created one.
14. Re-login the application using 4th step without clearing java cache. Now jars get downloaded but as soon as applet tries to launch java exception throws in the console.
7u6 b17
Does this problem occur on J2SE 6ux or 7ux? Yes / No (pick one)
No
Operating System Configuration Information (be specific):
Windows_7
Bug Description:
Issue 1:
1. While the jars gets downloaded in our application, got class not found exception for LocalApplicationProperties.class
It seems you have removed both LocalApplicationProperties.class and AssociationDesc.class from your deploy.jar.
deploy\com\sun\deploy\cache\LocalApplicationProperties.class
deploy\com\sun\deploy\cache\AssociationDesc.class
As a work around we added new classes
with the same name and it seems to have solved the issue for now.
Issue 2:
But as soon as the jars gets downloaded, Got the below issue as soon as the applet tries to launch.
cache: Trying to upgrade in place D:\JavaCache\6.0\4\369cd984-158f6707-6.4.0.0-.idx
Invalidating entry url= file=D:\JavaCache\6.0\4\369cd984-158f6707-6.4.0.0-.idx
java.io.UTFDataFormatException: malformed input around byte 177
at java.io.DataInputStream.readUTF(Unknown Source)
at java.io.RandomAccessFile.readUTF(Unknown Source)
at com.sun.deploy.cache.CacheEntry.readIndexFile602(Unknown Source)
at com.sun.deploy.cache.CacheEntry.readIndexFileOld(Unknown Source)
at com.sun.deploy.cache.CacheEntry.readIndexFile(Unknown Source)
We verified the deploy.jar again and oracle seems to have made many changes to this jar out of which notable changes were made to CacheEntry file where this
exception occurs. Attaching the diff file of CacheEntry of Jre 17U5 (working) and Jre 17U6 (Not working).
There are some changes being made especially in the methods readIndexFile where a check is made for the .idx file which is downloaded into our cache.
Steps to reproduce:
1. Install jre17u6
2. Delete all the file from java cache location (can be found from control panel -> java -> settings (in general tab) -> locations.
3. Also enable tracing and console logs of java in Control Panel->Java->Advanced->Debugging and Java Console
4. check 'Comments' field for login information
5. Browser tries to download jars and will throw exception as "No class def found for the class LocalApplicationProperties" in the console.
6. To fix the above we modified our code and changed the package of the import for the class LocalApplicationProperties as com.sun.deploy.model (earlier <Com.sun.deploy.cache>). The modified code is present in the "com" package provided in the attachment.
Below steps is to repackage the jar file with the modified package.
7. Now go to the java cache location and search for the string "customjpipreloader7u2" (most probably it will be available in folder no 57)
8. Copy the 0- file (eg. 329fde76-3166fa61-6.4.0.0-) which contains this string.
9. Paste into some local folder and then extract using following command - jar -xvf <name of the 0- file>
10. After extract delete the 0- file. (eg. 329fde76-3166fa61-6.4.0.0-) from the local folder
11. Replace the com folder with the attached com folder.
12. Make the jar file using following command - jar -cvf <name of the 0- file> *
13. Now replace the old 0- file in java cache location with the newly created one.
14. Re-login the application using 4th step without clearing java cache. Now jars get downloaded but as soon as applet tries to launch java exception throws in the console.
- backported by
-
JDK-2227139 Deployment cache incompatible issue
-
- Closed
-