> So a transient declaration or a writeObject() , > in the x-doclet implementation could > solve this problem.
writeObject() yes, transient no. If the problem analysis is correct, then the cause is not a field but a return value of a method. There are two larger issues: 1) log4j.jar should be in the ejbdoclet task classpath anyway, since an ejbdoclet error would attempt to log an error message but raise a misleading NoClassDefFoundError exception instead. 2) The jdk1.4 behavior is questionable. E.g., suppose I instrument code with logging for development but turn it off with a shipped product. I shouldn't have to ship the logging jar with the released product since a logging method is never invoked, but I would have to do so given this behavior. I am curious if the problem analysis is correct. If so, then Sun and others might also want to know. > > > Check that log4j.jar is in the ejbdoclet task classpath. Unlike > > EJBDoclet, xdoclet requires log4j.jar for error processing. > > > > The difference above might manifest itself as a jdk 1.4 incompatibility > > due to the 1.4 serialization rewrite. 1.4 serialization requires a > > broader class resolution scope. It appears that 1.4 loads every class > > declared in every method of an inherited class of every data member of a > > serialization target object. In the situation below, xdoclet serializes > > DocletContext, which in turn holds SubTasks which extends a class that > > declares a method returning a Category. Although Category is not part of > > the serialized state, the Category class must be in the serialization > > classpath. I don't know if this a 1.4 jdk feature or bug. > > > > ----- Original Message ----- > > From: "Philip Van Bogaert" <[EMAIL PROTECTED]> > > To: <[EMAIL PROTECTED]> > > Sent: Saturday, September 29, 2001 7:02 AM > > Subject: [JBoss-dev] build fails strangely with jdk1.4 > > > > > > > If i build jboss with jdk1.3 everything works fine > > > > > > but if i try to build it with jdk1.4 i get a strange error, > > > it seems that the compiler can't find the log4j Category class. > > > does this meen that jdk1.4 internally use the new log4j package where > > > Category is changed to Logger ? > > > > > > Tbone > > > > > > > > > compile-bean-sources: > > > [mkdir] Created dir: C:\sandbox\jboss-all\server\output\beans > > > [mkdir] Created dir: > > > C:\sandbox\jboss-all\server\output\metadata\META-INF > > > > > > BUILD FAILED > > > > > > java.lang.NoClassDefFoundError: org/apache/log4j/Category > > > at java.lang.Class.getDeclaredMethods0(Native Method) > > > at java.lang.Class.privateGetDeclaredMethods(Class.java:1618) > > > at java.lang.Class.getMethod0(Class.java:1737) > > > at java.lang.Class.getDeclaredMethod(Class.java:1224) > > > at > > > > > java.io.ObjectStreamClass.getInheritableMethod(ObjectStreamClass.java:11 > > 80) > > > at > > java.io.ObjectStreamClass.access$1800(ObjectStreamClass.java:48) > > > at java.io.ObjectStreamClass$3.run(ObjectStreamClass.java:353) > > > at java.security.AccessController.doPrivileged(Native Method) > > > at > > java.io.ObjectStreamClass.<init>(ObjectStreamClass.java:332) > > > at > > java.io.ObjectStreamClass.lookup(ObjectStreamClass.java:252) > > > at > > java.io.ObjectStreamClass.<init>(ObjectStreamClass.java:328) > > > at > > java.io.ObjectStreamClass.lookup(ObjectStreamClass.java:252) > > > at > > java.io.ObjectStreamClass.<init>(ObjectStreamClass.java:328) > > > at > > java.io.ObjectStreamClass.lookup(ObjectStreamClass.java:252) > > > at > > > java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1013) > > > > > > at > > > java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1227) > > > at > > > java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1053) > > > > > > at > > > > > java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:13 > > 33) > > > at > > > > > java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1305) > > > at > > > > > java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1 > > 248) > > > at > > > java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1055) > > > > > > at > ************************************************************ > > > java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:281) > > > at xdoclet.AbstractDocletTask.saveContext(Unknown Source) > > > at xdoclet.ejb.EjbDocletTask.execute(Unknown Source) > > > at > ************************************************************ > > > org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:104) > > > at org.apache.tools.ant.Task.perform(Task.java:217) > > > at org.apache.tools.ant.Target.execute(Target.java:164) > > > at org.apache.tools.ant.Target.performTasks(Target.java:182) > > > at > > org.apache.tools.ant.Project.executeTarget(Project.java:601) > > > at planet57.tools.buildmagic.task.Ant.execute(Ant.java:261) > > > at > > > > > planet57.tools.buildmagic.task.module.ExecuteModules.executeModule(Execu > > teMo > > > dules.java:282) > > > at > > > > > planet57.tools.buildmagic.task.module.ExecuteModules.execute(ExecuteModu > > les. > > > java:197) > > > at org.apache.tools.ant.Task.perform(Task.java:217) > > > at org.apache.tools.ant.Target.execute(Target.java:164) > > > at org.apache.tools.ant.Target.performTasks(Target.java:182) > > > at > > org.apache.tools.ant.Project.executeTarget(Project.java:601) > > > at > > org.apache.tools.ant.Project.executeTargets(Project.java:560) > > > at org.apache.tools.ant.Main.runBuild(Main.java:454) > > > at org.apache.tools.ant.Main.start(Main.java:153) > > > at org.apache.tools.ant.Main.main(Main.java:176) > > > > > > > > > _______________________________________________ > > > Jboss-development mailing list > > > [EMAIL PROTECTED] > > > https://lists.sourceforge.net/lists/listinfo/jboss-development > > > > > > > > > _______________________________________________ > > Jboss-development mailing list > > [EMAIL PROTECTED] > > https://lists.sourceforge.net/lists/listinfo/jboss-development > > > > > _______________________________________________ > Jboss-development mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/jboss-development _______________________________________________ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
