Hi Ian,

I was able to get rid of the problem by modifying the code such that ConcurrentHashMap isn't loaded at bootimage build time. Since the snapshots in the Classpath and JVM might differ, this seems to be the best thing to do.

Thanks for the information!

Immad Naseer
Dept. of Computer Science
University of British Columbia

On 9/26/07, Ian Rogers < ian.rogers@manchester.ac.uk> wrote:
Immad Naseer wrote:
> Hi all,
>
> I added a few classes to the primordial list, after which I have been
> getting the following error when the bootimage is being built.
>
> build-bootimage:
>      [echo] classpath is
> /home/inaseer/avm/trunk/ajvm/target/prototype-opt_ia32-linux/jksvm.jar:/home/inaseer/avm/trunk/ajvm/target/prototype-opt_ia32-linux/rvmrt.jar
> :/home/inaseer/avm/trunk/ajvm/aspectj/commons.jar
>      [echo] Building bootimage. Output redirected to :
> /home/inaseer/avm/trunk/ajvm/target/prototype-opt_ia32-linux/BootImageWriterOutput.txt
>
>      [java] Java Result: 1
>      [echo] jdkObject is class java.util.concurrent.ConcurrentHashMap
>      [echo] rvmFieldName is type
>      [echo] rvmFieldType is < BootstrapCL,
> Lorg/jikesrvm/classloader/VM_Type; >
>      [echo] Exception in thread "main" java.lang.Error: Failed to
> populate Class.type for class java.util.concurrent.ConcurrentHashMap
>      [echo]     at BootImageWriter.copyKnownClasspathInstanceField
> (BootImageWriter.java:2153)
>      [echo]     at
> BootImageWriter.copyToBootImage(BootImageWriter.java:1695)
>      [echo]     at BootImageWriter.main(BootImageWriter.java:684)
>
> I was building using the prototype-opt configuration of Jikes 2.9.0.1
> <http://2.9.0.1>.
>
> The text in green shows a jar file that I added to the classpath. The
> lines in blue are some debugging statements inserted by me in
> BootImageWriter.java to show the values of the parameters passed to
> copyKnownClasspathInstanceField.
>
> Apparently, the code in copyKnownClasspathInstanceField  isn't able to
> find a VM_Type object for java.util.concurrent.ConcurrentHashMap.
> ConcurrentHashMap.class is present in rvmrt.jar, and rvmrt.jar is
> included in the classpath when invoking BootImageWriter.
>
> Any guesses as to what the proble might be?
>
> Thanks,
> Immad
Hi Immad,

Jikes RVM 2.9.0.1 doesn't support java.util.concurrent, but the SVN head
does. We should release Jikes RVM 2.9.2 in the next few weeks, and so
this will also support java.util.concurrent. You can monitor progress of
the 2.9.2 release here [1], you'll see most of my issues are closed ;-)
Feel free to help us get 2.9.2 ship shape :-)

Wrt using java.util.concurrent in the boot image there are some issues.
The biggest problem is that java.util.concurrent is a snapshot of Doug
Lea's work and the snapshots in Classpath and the JVM you are using to
bootstrap build the Jikes RVM will probably differ. I had a problem
using an AtomicInteger in the boot image for this reason, but I think we
may be able to work around the problem. I haven't spent much time trying
to get it to work.

Hope that helps. As your posting from gmail could I remind you to list
your affiliation.

Thanks,
Ian Rogers

[1]
http://jira.codehaus.org/secure/IssueNavigator.jspa?reset=true&mode=hide&sorter/order=DESC&sorter/field=priority&resolution=-1&pid=11591&fixfor=13599


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Jikesrvm-researchers mailing list
Jikesrvm-researchers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers