Ticket #30 (assigned defect)

Opened 1 year ago

Last modified 1 year ago

Mika tries to load class 'boolean' using BundleClassLoader

Reported by: chris Assigned to: chris (accepted)
Priority: major Milestone:
Component: core-vm Version:
Keywords: Cc:

Description

When using Caucho Hessian with KnopflerFish?? 2.0.1, Mika tries to load the class 'boolean' using KF's BundleClassLoader??, which fails as it should. At this point Hessian's SerializerFactory?? makes a reference to 'boolean.class', which may be a clue. See forum discussion: [url]http://www.k-embedded-java.com/support/open/forum/viewtopic.php?id=5[/url]

Replaces Ticket #4, which was defaced with spam for hotels in China.

Change History

01/31/08 10:50:07 changed by chris

  • status changed from new to assigned.

(Information supplied by O. Gandit)

Problem could be fixed by updating function namedClassIsSystemClass in file loading.c :

w_boolean namedClassIsSystemClass(w_string name) {

w_ubyte *ch;

if (!string_is_latin1(name)) {

woempa(1, "'%w' is not Latin-1 => not a system class\n", name);

return WONKA_FALSE;

}

ch = name->contents.bytes; while (*ch == '[') ++ch;

woempa(1, "Length %d, prefix %c%c%c%c%c%c\n", string_length(name) - (ch - name->contents.bytes), ch[0], ch[1], ch[2], ch[3], ch[4], ch[5]); if (((int)string_length(name) > (ch - name->contents.bytes) + 5 && strncmp(ch, "java.", 5) == 0)

((int)string_length(name) > (ch - name->contents.bytes) + 6 && strncmp(ch, "wonka.", 6) == 0)

((int)string_length(name) == (ch - name->contents.bytes) + 7 && strncmp(ch, "boolean", 7) == 0)

((int)string_length(name) == (ch - name->contents.bytes) + 4 && strncmp(ch, "byte", 4) == 0)

((int)string_length(name) == (ch - name->contents.bytes) + 5 && strncmp(ch, "short", 5) == 0)

((int)string_length(name) == (ch - name->contents.bytes) + 3 && strncmp(ch, "int", 3) == 0)

((int)string_length(name) == (ch - name->contents.bytes) + 4 && strncmp(ch, "long", 4) == 0)

((int)string_length(name) == (ch - name->contents.bytes) + 5 && strncmp(ch, "float", 5) == 0)

((int)string_length(name) == (ch - name->contents.bytes) + 6 && strncmp(ch, "double", 6) == 0)

((int)string_length(name) == (ch - name->contents.bytes) + 4 && strncmp(ch, "char", 4) == 0)

) {

woempa(1, "'%w' is a system class\n", name);

return WONKA_TRUE;

} woempa(1, "'%w' is not a system class\n", name);

return WONKA_FALSE;

}