[ nice-Bugs-900099 ] compiler exception - missing java .jar

"SourceForge.net" <[email protected]>
Newsgroups gmane.comp.lang.nice.devel
Message-ID <[email protected]>
Bugs item #900099, was opened at 2004-02-19 09:41
Message generated for change (Comment added) made by bonniot
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=112788&aid=900099&group_id=12788

Category: None
Group: None
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Isaac Gouy (igouy)
>Assigned to: Daniel Bonniot (bonniot)
Summary: compiler exception - missing java .jar

Initial Comment:
There&#039;s a jar file containing compiled Nice retypings for 
some Java libraries: niceswt.jar

There&#039;s a jar file containing the Java library: swt.jar

There&#039;s a little program importing the Nice retypings =

import org.nice.swt.events;
void main(String[] args){}


When we sensibly give both jar files to nicec everything 
is fine:

Test>nicec --sourcepath .. --
classpath "niceswt.jar;swt.jar" -a t.jar test

nice.lang: parsing
org.nice.swt.events: parsing
test: parsing
test: typechecking
test: generating code
test: linking
test: writing in archive
org.nice.swt.events: writing in archive
nice.lang: writing in archive


When we stupidly omit the Java library, the compiler 
crashes:

Test>nicec --sourcepath .. --classpath niceswt.jar -a 
t.jar test

nice.lang: parsing
org.nice.swt.events: parsing
test: parsing

An exception has occured in the compiler
Please fill-in a bug report at the following webpage:
http://sourceforge.net/tracker/?
func=add&group_id=12788&atid=112788

Stack trace:
Exception in thread "main" java.lang.RuntimeException: 
no such class: org.eclipse.swt.events.ArmListener
        at gnu.bytecode.ObjectType.getReflectClass
(ObjectType.java:62)
        at gnu.bytecode.ClassType.getDeclaredMethod
(ClassType.java:533)
        at 
bossa.syntax.RetypedJavaMethod.findReflectMethod
(RetypedJavaMethod.java:156)
        at bossa.syntax.RetypedJavaMethod.buildScope
(RetypedJavaMethod.java:68)
        at bossa.syntax.Node.buildScope(Node.java:232)
        at bossa.syntax.Node.buildScope(Node.java:162)
        at bossa.syntax.AST.buildScope(AST.java:93)
        at bossa.modules.Package.scope
(Package.java:234)
        at mlsub.compilation.fun.lambda23(load.nice:23)
        at mlsub.compilation.fun.apply1(make.nice:0)
        at gnu.expr.ModuleMethod.apply1
(ModuleMethod.java:89)
        at nice.lang.fun.foreach(collections.nice:129)
        at nice.lang.dispatch.foreach(strings.nice:0)
        at mlsub.compilation.fun.loadComponent
(load.nice:23)
        at mlsub.compilation.dispatch.loadComponent
(dispatch.nice)
        at mlsub.compilation.fun$load.lambda22
(load.nice:45)
        at mlsub.compilation.fun$load.apply1(load.nice:0)
        at gnu.expr.ModuleMethod.apply1
(ModuleMethod.java:89)
        at nice.lang.fun.foreach(collections.nice:129)
        at nice.lang.dispatch.foreach(strings.nice:0)
        at mlsub.compilation.fun.load(load.nice:44)
        at mlsub.compilation.dispatch.load(dispatch.nice)
        at mlsub.compilation.fun.make(make.nice:41)
        at mlsub.compilation.dispatch.make(dispatch.nice)
        at nice.tools.compiler.fun.compile
(interface.nice:40)
        at nice.tools.compiler.dispatch.compile
(dispatch.nice)
        at nice.tools.compiler.console.fun.compile
(main.nice:168)
        at nice.tools.compiler.console.dispatch.compile
(dispatch.nice)
        at nice.tools.compiler.console.fun.main
(main.nice:184)



----------------------------------------------------------------------

Comment By: Daniel Bonniot (bonniot)
Date: 2004-02-25 01:22

Message:
Logged In: YES 
user_id=88952

This bug has been fixed. The next release of the compiler will
include this correction. In the mean time, I encourage you try
the development version. It contains a version of the compiler
that fixes the bug. Please try it and reopen the bug-report if
you find any problem with it.

To know how to get an install the development version of the
compiler that fixes this bug, please read
http://nice.sourceforge.net/cgi-bin/twiki/view/Dev/DevelopmentVersion

Note that the bug has first been fixed in the CVS version, and it
might take one or two hours until the development version
includes the fix.

Thanks again for your help by submiting this bug report. 

Daniel Bonniot


----------------------------------------------------------------------

Comment By: Isaac Gouy (igouy)
Date: 2004-02-24 19:00

Message:
Logged In: YES 
user_id=536291

It would have been 'some version' of the nice swt I sent to 
you. Sorry, I have no record of that older version.

----------------------------------------------------------------------

Comment By: Daniel Bonniot (bonniot)
Date: 2004-02-24 18:02

Message:
Logged In: YES 
user_id=88952

Is this with the version of NiceSWT you sent me? There is no
retyped method in org.nice.swt.events, so that seems strange
that the error occurs in a RetypedJavaMethod.

I can see the global problem, but i'd like to precisely
reproduce your case.

----------------------------------------------------------------------

Comment By: Daniel Bonniot (bonniot)
Date: 2004-02-19 09:49

Message:
Logged In: YES 
user_id=88952

Right, the compiler should be more polite in this case ;-)

Daniel

(over 900K bug reports on SF. Yay!)

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=112788&aid=900099&group_id=12788


-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.