Opened 14 years ago

Closed 14 years ago

#818 closed defect (fixed)

JarClassLoader doesn't load classes correctly

Reported by: Nicklas Nordborg Owned by: Nicklas Nordborg
Priority: critical Milestone: BASE 2.4.6
Component: core Version:
Keywords: Cc:

Description

Classes that are larger than a specific number of bytes are not loaded correctly by the JarClassLoader?. The problem is that it expects the entire class file to be loaded by a single call to the InputStream?.read() method. This may, however, load fewer bytes than expected. To load the entire class file several calls to the InputStream?.read() method is needed.

Temporary workaround for plug-in developers is to reorganize their code into separate classes, making each class file smaller. There seems to be limit around 15K. Here is a sample debug output which requires four calls to read the entire class file:

numRead=18699
numRead=18849
numRead=15203
numRead=6877
name=com.ctc.wstx.sr.BasicStreamReader; totalRead=59628; size=59628

Change History (2)

comment:1 Changed 14 years ago by Nicklas Nordborg

Owner: changed from everyone to Nicklas Nordborg
Status: newassigned
Summary: JarClassLoaded doesn't load classes correctlyJarClassLoader doesn't load classes correctly

comment:2 Changed 14 years ago by Nicklas Nordborg

Resolution: fixed
Status: assignedclosed

(In [3938]) Fixes #818: JarClassLoader? doesn't load classes correctly

Note: See TracTickets for help on using tickets.