Read-only Git mirror of the Mercurial gecko repositories at https://hg.mozilla.org. How to contribute: https://firefox-source-docs.mozilla.org/contributing/contribution_quickref.html
Go to file
norris%netscape.com aec69cc2f4 Fixed bug. We weren't loading classes in bottom-up dependency order.
Subject:
            Re: another getClassLoader exception
       Date:
            Mon, 18 Oct 1999 22:01:24 -0400
      From:
            Andrew Wason <aw@softcom.com>
        To:
            norris@netscape.com (Norris Boyd)
        CC:
            Howard Lin <howard@softcom.com>
 References:
            1 , 2




At 05:03 PM 10/18/99 -0700, Norris Boyd wrote:
>Are you still seeing this problem?


Yes.  I just did a CVS update to get the latest stuff and we still have
this problem.

I wrote a standalone sample program that duplicates the problem.  Run
JSSupport and you should get this exception:

defineClass org.mozilla.javascript.gen.c2
Exception in thread "main" java.lang.NoClassDefFoundError:
org/mozilla/javascript/gen/c1
         at java.lang.ClassLoader.resolveClass0(Native Method)
         at java.lang.ClassLoader.resolveClass(ClassLoader.java:545)
         at
JSSupport$MySecuritySupport$DataClassLoader.loadClass(JSSupport.java:89)
         at JSSupport$MySecuritySupport.defineClass(JSSupport.java:47)
         at org.mozilla.javascript.optimizer.Codegen.compile(Codegen.java,
Compiled Code)
         at org.mozilla.javascript.Context.compile(Context.java:1761)
         at org.mozilla.javascript.Context.compile(Context.java:1691)
         at org.mozilla.javascript.Context.compileReader(Context.java:810)
         at org.mozilla.javascript.Context.evaluateReader(Context.java:725)
         at org.mozilla.javascript.Context.evaluateString(Context.java:692)
         at JSSupport.<init>(JSSupport.java:20)
         at JSSupport.main(JSSupport.java:9)



Andrew



>--N
>
>Andrew Wason wrote:
>
> > At 04:54 PM 10/12/99 -0700, Norris Boyd wrote:
> > >I just checked in changes so that the class calling ScriptRuntime (c5
> in your
> > >case) will load the class itself using the normal Java classloading
> mechanism
> > >rather than an explicit call to the class loader. I pushed the bits up
> to the
> > >ftp site, but it takes a bit to propagate.
> >
> > I get this exception now (debugging statements are from my code):
> >
> > SecuritySupport.defineClass org.mozilla.javascript.gen.c5
> > DataClassLoader.loadClass org.mozilla.javascript.gen.c5
> > DataClassLoader.loadClass org.mozilla.javascript.gen.c4
> > using default loader com.softcom.realjava.PluginClassLoader@da9486a0
> > java.lang.NoClassDefFoundError: org/mozilla/javascript/gen/c4
> >          at java.lang.ClassLoader.resolveClass0(Native Method)
> >          at java.lang.ClassLoader.resolveClass(ClassLoader.java:545)
> >          at
> >
> com.softcom.realjava.plugins.RealJavaScript$RealJavaScriptSecuritySupport$Da
> > taClassLoader.loadClass(RealJavaScript.java:410)
> >          at
> >
> com.softcom.realjava.plugins.RealJavaScript$RealJavaScriptSecuritySupport.de
> > fineClass(RealJavaScript.java:352)
> >          at org.mozilla.javascript.optimizer.Codegen.compile(Codegen.java,
> > Compiled Code)
> >          at org.mozilla.javascript.Context.compile(Context.java:1761)
> >          at org.mozilla.javascript.Context.compile(Context.java:1691)
> >          at org.mozilla.javascript.Context.compileReader(Context.java:810)
> >
> > So when c5 is being loaded by my SecuritySupport, it also needs to load c4.
> > I decompiled org.mozilla.javascript.gen.c5 and it's constant pool
> > references CLASS org.mozilla.javascript.gen.c4, so c5 is dependent on c4
> > being loadable.  Is the problem that c5 is being loaded before the
> > optimizer has defined c4?
> >
> > I get the above exception for some classes and not others.  It seems
> > consistent that I always get it for classes with dependencies on other
> > optimizer classes that haven't been generated yet.
> >
> > Andrew
> >
> > --
> > Andrew Wason
> > SoftCom, Inc.
> > aw@softcom.com

--
Andrew Wason
SoftCom, Inc.
aw@softcom.com



   JSSupport.java

                  Name:
                         JSSupport.java
                   Type:
                         Java Source File (text/java)
                Encoding:
                         base64
1999-10-19 16:38:23 +00:00
apache/gzip/src
build 14974 apprunner fails to start up on B&W G3 8.6 Add file to generate logs on the mac r sdagley 1999-10-14 23:46:27 +00:00
calendar
caps Fix a Unix warning by removing an unused local variable 1999-10-14 23:49:36 +00:00
cck Minor cleanup 1999-10-19 03:46:54 +00:00
chrome/src Another warning. r=gimpy. 1999-10-19 07:59:20 +00:00
cmd Adding context menu library to the interface stubs 1999-05-14 21:58:33 +00:00
config add flag for boehm (doesn't quite work yet) 1999-10-18 23:13:47 +00:00
content Removed the last of gimpy's warnings. r=gimpy. 1999-10-19 08:03:11 +00:00
db fix mork linked list which was disabling more than one table change from getting recorded r=davidmc 1999-10-15 00:05:10 +00:00
dbm Add memmove to autoconf tests. 1999-09-18 02:55:39 +00:00
directory Fixed a bad link 1999-09-28 19:58:15 +00:00
docshell Mail news regresion with replying to a message. r=mscott bug # 16550 1999-10-18 19:09:27 +00:00
dom synching with nsWebShellWindow 1.219 (nsIModalWindowSupport removed). r:hyatt@netscape.com 1999-10-18 15:06:38 +00:00
editor add images from Dan Haddix (r=pavlov@pavlov.net) 1999-10-19 14:53:55 +00:00
ef add simple test to make sure things are actually working. 1999-08-30 08:04:12 +00:00
embedding First Check-in. 1999-10-15 20:51:58 +00:00
expat Fixing build warning. 1999-09-20 21:35:50 +00:00
extensions r=neeti@netscape.com 1999-10-19 00:03:33 +00:00
gc/boehm fixed histogram sorting. 1999-10-19 03:03:12 +00:00
gconfig
gfx Various fixes to correct bugs in nsRegionPh and to correct clipping 1999-10-19 00:27:56 +00:00
grendel Updates for JavaMail 1.1.x. 1999-08-12 03:28:00 +00:00
htmlparser fixed bug 16584; CRCRLF not handled correctly. r=syd 1999-10-19 08:52:30 +00:00
include Export platform.h. This is legacy stuff that should be removed eventually. 1999-10-08 22:37:37 +00:00
intl Fixing the linux build bustage. 1999-10-19 00:03:57 +00:00
java 16427 r=akhil.arora@sun.com fixed by Denis Sharypov <sdv@sparc.spb.su> 1999-10-18 21:53:20 +00:00
jpeg changed from directly using "MSL ShLibRuntime.Lib" to using "NSLibraryStartup.o" to enable GC leak detector. r=smfr 1999-10-03 20:23:01 +00:00
js Fixed bug. We weren't loading classes in bottom-up dependency order. 1999-10-19 16:38:23 +00:00
js2/semantics Updated for recent semantic engine changes. Changed the meaning of (?= to match Perl. 1999-07-27 01:05:59 +00:00
l10n Add flags to selectively build subdirectories. 1999-10-06 00:03:37 +00:00
layout Changes to frame property API (code's not being used yet) 1999-10-19 14:41:55 +00:00
lib Fix build in Mac embedding apps after last week's changes in nsIWebShell. 1999-10-19 03:02:01 +00:00
mailnews removed obsolete menubar xul tag; fixed bug 16145; r=rhp, ducarroz; a=dp 1999-10-19 03:08:43 +00:00
modules other part of fix for #15235. fix send later. r=alecf 1999-10-19 01:24:25 +00:00
msgsdk
nav-java General cleanup. 1999-09-14 01:35:43 +00:00
netwerk fix ref count logging on nsMimeImpl r=warren 1999-10-19 14:50:09 +00:00
network Bug 16105. (Bugsplat 366256.) Ensure that nsISupports::Release() calls dtor only once by 'stabilizing' refcnt to a non-zero value before invoking the dtor. See also news://news.mozilla.org/37FD0F3C.3078AE5C%40netscape.com. r=scc,fur 1999-10-12 02:10:08 +00:00
nsprpub Syncing Makefile.ins with srinivas' previous checkin. 1999-10-19 05:30:36 +00:00
nunet Changes to build http in its own library. and use auto detection/registry. 1999-03-27 02:05:59 +00:00
parser fixed bug 16584; CRCRLF not handled correctly. r=syd 1999-10-19 08:52:30 +00:00
plugin/oji/MRJ Took out the debug panel which appears whenever System.out messages are 1999-09-23 20:36:16 +00:00
privacy
profile Landing of SIDEBAR_19991007_BRANCH. r=waterson 1999-10-18 19:21:52 +00:00
rdf Removed the last of gimpy's warnings. r=gimpy. 1999-10-19 08:03:11 +00:00
README/mozilla checkin new image file names 1999-10-13 03:57:13 +00:00
silentdl Fixing 8.3 library name problems, bugs 10355, 10359,10364, 10365, 10372, 11796, 11791. Checking in for cathleen, r=dveditz 1999-10-10 01:32:59 +00:00
string/obsolete updated FAQ section of nsString documentation 1999-10-16 18:45:18 +00:00
suite Fix for bug 14784. Moved pref item up. r=cathleen. 1999-10-19 01:01:51 +00:00
sun-java General cleanup. 1999-09-15 22:29:43 +00:00
timer ignore generated Makefile 1999-08-10 05:16:39 +00:00
tools Removed an unsupported argument (-f) 1999-10-13 14:43:04 +00:00
tripledb Allow a way to finely control the order of query results. 1999-07-12 22:09:23 +00:00
uriloader Removed an unneccesary include statement. No bug number. 1999-10-13 10:28:10 +00:00
view Fix for bug #15360: Drag Selecting, Clicking, then Clicking leaves caret cruft. 1999-10-15 04:29:30 +00:00
wallet New files for wallet 1999-03-10 21:35:41 +00:00
webshell Mail news regresion with replying to a message. r=mscott bug # 16550 1999-10-18 19:09:27 +00:00
webtools Fixed perl warnings. 1999-10-19 16:33:06 +00:00
widget Added a method in the debug build to return the Navigator size for a given 1999-10-19 11:34:00 +00:00
xpcom Fixing warning. Moved declaration into if 0 block. 1999-10-19 05:49:04 +00:00
xpfc
xpfe Removed border from the XUL browser, editor, and iframe tags. This allows content coming up in chromeless pop-up windows not be visually cluttered with a needless border. r=hyatt. 1999-10-19 07:40:44 +00:00
xpinstall clean up wizard code a bit 1999-10-18 21:52:03 +00:00
.cvsignore ignore a.out as well 1999-04-10 21:22:55 +00:00
aclocal.m4 oops, forgot to include these files for libIDL detection 1999-04-10 00:54:58 +00:00
allmakefiles.sh remove makefiles that arent' part of the module anymore 1999-10-18 22:49:05 +00:00
client.mak Fix build bustage 1999-10-19 01:29:44 +00:00
client.mk Forgot a semicolon and that caused the creation of bogus files. a=leaf. Thanks to jim_nance@yahoo.com for pointing out the problem. 1999-10-12 17:05:05 +00:00
configure Automated update 1999-10-18 23:15:10 +00:00
configure.in add flag for boehm (doesn't quite work yet) 1999-10-18 23:13:47 +00:00
LEGAL Add Y2K disclaimer. 1999-07-06 23:00:05 +00:00
LICENSE new version of LICENSE; not part of the build 1999-10-06 02:14:51 +00:00
Makefile.in build boehm when flag is used r=sspitzer 1999-10-18 23:14:16 +00:00
makefile.win changed order to do splitsym before componentreg. 1999-09-30 17:50:24 +00:00
nglayout.mac
nglayout.mk General cleanup. 1999-09-11 04:50:16 +00:00
trex.mak
trex.mk