JaroslavTulach: /* No Class Error!? */ - 2011-11-11 08:42:11

No Class Error!?

←Older revision Revision as of 08:42, 11 November 2011
Line 13: Line 13:
''Is there a problem in an initializer?'' is a second question to ask. Sometimes, when a class throws an exception from one of its static initializers, it becomes unavailable to the [[JVM]]. Later, if any other class references the broken one, a {{JDK|java/lang|NoClassDefFoundError}} is generated at very unexpected places. However this was not the problem either. There was no other exception in the log files!
''Is there a problem in an initializer?'' is a second question to ask. Sometimes, when a class throws an exception from one of its static initializers, it becomes unavailable to the [[JVM]]. Later, if any other class references the broken one, a {{JDK|java/lang|NoClassDefFoundError}} is generated at very unexpected places. However this was not the problem either. There was no other exception in the log files!
-
A complete mistery.
+
A complete mystery.
=== Friends are [[API]]! ===
=== Friends are [[API]]! ===

82.151.39.201: /* No Class Error!? */ - 2011-09-20 08:23:40

No Class Error!?

←Older revision Revision as of 08:23, 20 September 2011
Line 7: Line 7:
=== No Class Error!? ===
=== No Class Error!? ===
-
Recently we had to deal with a bug [http://netbeans.org/bugzilla/show_bug.cgi?id=201021 201021] - suddenly one module was getting {{JDK|java/lang|NoClassDefFoundError}} when trying to access a ''LexerUtils'' class from another module. The ''LexerUtils'' class existed since the creation of its module, so it was a mistery for all of us. How could a class not be found, if it exists for ages?
+
Recently we had to deal with a bug [http://netbeans.org/bugzilla/show_bug.cgi?id=201021 201021] - suddenly one module was getting {{JDK|java/lang|NoClassDefFoundError}} when trying to access a ''LexerUtils'' class from another module. The ''LexerUtils'' class existed since the creation of its module, so it was a mystery for all of us. How could a class not be found, if it exists for ages?
''Is the installation corrupted?'' was our first question. No, it was not. We received the same report from multiple users. Thus we could rule out random corruption error. Something in our shared infrastructure must have been broken.
''Is the installation corrupted?'' was our first question. No, it was not. We received the same report from multiple users. Thus we could rule out random corruption error. Something in our shared infrastructure must have been broken.

JaroslavTulach: /* Notes */ - 2011-09-19 15:10:15

Notes

←Older revision Revision as of 15:10, 19 September 2011
Line 44: Line 44:
== Notes ==
== Notes ==
-
Btw. removing someone from list of '''friends'' is basically incompatible change in your [[API]] and you should produce incompatible version of your module.
+
Btw. removing someone from list of '''friends''' is basically incompatible change in your [[API]] and you should produce incompatible version of your module.
Can this happen in [[OSGi]]? Well, [[OSGi]] by itself does not have support for '''friends''' now, so no. But [[Equinox]] provides an extended functionality to support this concept and yes, you'd run into same issues there.
Can this happen in [[OSGi]]? Well, [[OSGi]] by itself does not have support for '''friends''' now, so no. But [[Equinox]] provides an extended functionality to support this concept and yes, you'd run into same issues there.
[[Category:APITypes]]
[[Category:APITypes]]

JaroslavTulach: /* Friends are API! */ - 2011-09-19 15:08:32

Friends are API!

←Older revision Revision as of 15:08, 19 September 2011
Line 17: Line 17:
=== Friends are [[API]]! ===
=== Friends are [[API]]! ===
-
It turns out that one new module (let's call it '''uses.lexer.utils''') needed to access this '''friend''' [[API]] and his developer just added it to the list of friends:
+
It turned out that one new module (let's call it '''uses.lexer.utils''') needed to access this '''friend''' [[API]] and his developer just added it to the list of friends:
<source lang="bash">
<source lang="bash">

JaroslavTulach at 15:08, 19 September 2011 - 2011-09-19 15:08:03

←Older revision Revision as of 15:08, 19 September 2011
Line 11: Line 11:
''Is the installation corrupted?'' was our first question. No, it was not. We received the same report from multiple users. Thus we could rule out random corruption error. Something in our shared infrastructure must have been broken.
''Is the installation corrupted?'' was our first question. No, it was not. We received the same report from multiple users. Thus we could rule out random corruption error. Something in our shared infrastructure must have been broken.
-
''Is there a problem in an initializer?'' is a second question to ask. Sometimes, when a class throws an exception from one of its static initializers, it becomes unavailable TO the [[JVM]]. Later, if any other class references the broken one, a {{JDK|java/lang|NoClassDefFoundError}} is generated at very unexpected places. However this was not the problem either. There was no other exception in the log files!
+
''Is there a problem in an initializer?'' is a second question to ask. Sometimes, when a class throws an exception from one of its static initializers, it becomes unavailable to the [[JVM]]. Later, if any other class references the broken one, a {{JDK|java/lang|NoClassDefFoundError}} is generated at very unexpected places. However this was not the problem either. There was no other exception in the log files!
A complete mistery.
A complete mistery.

JaroslavTulach: /* No Class Error!? */ - 2011-09-19 15:07:23

No Class Error!?

←Older revision Revision as of 15:07, 19 September 2011
Line 11: Line 11:
''Is the installation corrupted?'' was our first question. No, it was not. We received the same report from multiple users. Thus we could rule out random corruption error. Something in our shared infrastructure must have been broken.
''Is the installation corrupted?'' was our first question. No, it was not. We received the same report from multiple users. Thus we could rule out random corruption error. Something in our shared infrastructure must have been broken.
-
''Is there a problem in an initializer?'' is a second question to ask. Sometimes, when a class throws an exception from one of its static initializers, it becomes unavailable for the [[JVM]]. Later, if any other class references the broken one, a {{JDK|java/lang|NoClassDefFoundError}} is generated at very unexpected places. However this was not the problem either. There was no other exception in the log files!
+
''Is there a problem in an initializer?'' is a second question to ask. Sometimes, when a class throws an exception from one of its static initializers, it becomes unavailable TO the [[JVM]]. Later, if any other class references the broken one, a {{JDK|java/lang|NoClassDefFoundError}} is generated at very unexpected places. However this was not the problem either. There was no other exception in the log files!
A complete mistery.
A complete mistery.

JaroslavTulach: /* No Class Error!? */ - 2011-09-19 15:05:26

No Class Error!?

←Older revision Revision as of 15:05, 19 September 2011
Line 11: Line 11:
''Is the installation corrupted?'' was our first question. No, it was not. We received the same report from multiple users. Thus we could rule out random corruption error. Something in our shared infrastructure must have been broken.
''Is the installation corrupted?'' was our first question. No, it was not. We received the same report from multiple users. Thus we could rule out random corruption error. Something in our shared infrastructure must have been broken.
-
''Is there are problem in initialized?'' is a second question to ask. Sometimes, when a class throws an exception from one of its static initializers, it becomes unavailable for the [[JVM]]. Later, if any other class references the broken one, a {{JDK|java/lang|NoClassDefFoundError}} is generated at very unexpected places. However this was not the problem either. There was no other exception in the log files!
+
''Is there a problem in an initializer?'' is a second question to ask. Sometimes, when a class throws an exception from one of its static initializers, it becomes unavailable for the [[JVM]]. Later, if any other class references the broken one, a {{JDK|java/lang|NoClassDefFoundError}} is generated at very unexpected places. However this was not the problem either. There was no other exception in the log files!
A complete mistery.
A complete mistery.

JaroslavTulach: /* NetBeans Friends Support */ - 2011-09-19 15:04:24

NetBeans Friends Support

←Older revision Revision as of 15:04, 19 September 2011
Line 4: Line 4:
The [[NetBeans Runtime Container]] has first class support for '''friends''' concept. Every module can, inside its manifest, enumerate the programatic names of modules that may access given [[API]]. Surprisingly, this list of '''friends''' is an [[API]] of the module itself. In case you change the list, you are changing the module [[API]] and you need to properly [[netbeans:VersioningPolicy|version]] such change.
The [[NetBeans Runtime Container]] has first class support for '''friends''' concept. Every module can, inside its manifest, enumerate the programatic names of modules that may access given [[API]]. Surprisingly, this list of '''friends''' is an [[API]] of the module itself. In case you change the list, you are changing the module [[API]] and you need to properly [[netbeans:VersioningPolicy|version]] such change.
 +
 +
=== No Class Error!? ===
Recently we had to deal with a bug [http://netbeans.org/bugzilla/show_bug.cgi?id=201021 201021] - suddenly one module was getting {{JDK|java/lang|NoClassDefFoundError}} when trying to access a ''LexerUtils'' class from another module. The ''LexerUtils'' class existed since the creation of its module, so it was a mistery for all of us. How could a class not be found, if it exists for ages?
Recently we had to deal with a bug [http://netbeans.org/bugzilla/show_bug.cgi?id=201021 201021] - suddenly one module was getting {{JDK|java/lang|NoClassDefFoundError}} when trying to access a ''LexerUtils'' class from another module. The ''LexerUtils'' class existed since the creation of its module, so it was a mistery for all of us. How could a class not be found, if it exists for ages?

JaroslavTulach: /* NetBeans Friends Support */ - 2011-09-19 15:03:19

NetBeans Friends Support

←Older revision Revision as of 15:03, 19 September 2011
Line 3: Line 3:
== [[NetBeans]] Friends Support ==
== [[NetBeans]] Friends Support ==
-
The [[NetBeans Runtime Container]] has first class support for '''friends'''. Inside manifest one can enumerate the names of modules that may access given [[API]]. Surprisingly, this list of '''friends''' is an [[API]] of the module itself. In case you change the list, you are changing the module [[API]] and you need to properly [[netbeans:VersioningPolicy|version]] such change.
+
The [[NetBeans Runtime Container]] has first class support for '''friends''' concept. Every module can, inside its manifest, enumerate the programatic names of modules that may access given [[API]]. Surprisingly, this list of '''friends''' is an [[API]] of the module itself. In case you change the list, you are changing the module [[API]] and you need to properly [[netbeans:VersioningPolicy|version]] such change.
Recently we had to deal with a bug [http://netbeans.org/bugzilla/show_bug.cgi?id=201021 201021] - suddenly one module was getting {{JDK|java/lang|NoClassDefFoundError}} when trying to access a ''LexerUtils'' class from another module. The ''LexerUtils'' class existed since the creation of its module, so it was a mistery for all of us. How could a class not be found, if it exists for ages?
Recently we had to deal with a bug [http://netbeans.org/bugzilla/show_bug.cgi?id=201021 201021] - suddenly one module was getting {{JDK|java/lang|NoClassDefFoundError}} when trying to access a ''LexerUtils'' class from another module. The ''LexerUtils'' class existed since the creation of its module, so it was a mistery for all of us. How could a class not be found, if it exists for ages?

JaroslavTulach: /* Version Friends List */ - 2011-09-19 15:00:32

Version Friends List

←Older revision Revision as of 15:00, 19 September 2011
Line 38: Line 38:
</source>
</source>
-
The '''uses.lexer.utils''' then needs to requests '''provides.lexer.utils''' in version '''1.2'''. List of [[FriendDepenedencies|friends]] is your [[API]]!
+
The '''uses.lexer.utils''' then needs to requests '''provides.lexer.utils''' in version '''1.2'''. List of [[FriendDependencies|friends]] is your [[API]]!
== Notes ==
== Notes ==