I just updated my JNode sandbox from 'trun

Project:JNode Core
Component:Miscellaneous
Category:bug report
Priority:normal
Assigned:hagar
Status:closed
Description

I just updated my JNode sandbox from 'trunk' and I can no longer build JNode. The build is crashing with the following message while running the 'bootimage' Ant task:

java.lang.SecurityException: Prohibited package name: java.util

The full Java stack trace is attached.

AttachmentSize
issues_273.77 KB

Building JNode needs Java 6

Building JNode needs Java 6. The compiler settings are kept on Java 5 level for different reasons, unrelated to this bug.

Re: Building JNode needs Java 6

1) This is surprising to me. What is different about the JNode source code base that stops it from building under Java 5.0? Or is this a "feature" of the bootimage builder?

2) If this requirement is going to remain, it needs to be prominently documented in all nodes that talk about building JNode from source.

Hi crawley, this bug was

Hi crawley,

this bug was related to a new class added in gnu classpath that
is not present in java 1.5. So if you use the Sun compiler all classes using that class can not be compiled.

I guess we will keep the java 1.6 requirement, because there will be more classes in gnu classpath soon that are not present in java 1.5.

I updated the server to use java 1.6 by default, so the build script is working again, about the documenation you're right I think.
Perhaps someone else can comment on that too, if we update our requirements?

Can we (I) fix the bug?

I don't understand. The exception that was killing the build was in the bootimage builder, not the Sun compiler.

It looked to me that the root cause was that the bootimage builder was trying to use Class.forName() and friends to extract information from bytecode files. And that was failing because of Java's security model restrictions on key packages.

This should be fixable. Can I have a go?

I've submitted a patch for

I've submitted a patch for this as a new 'bug'.

#1

Status:active» closed

#2

The build is failing as the classpath project have interduced 1.6 code in gnu.classpath.ServiceFactory. We will asap shift JNode from 1.5 to 1.6 target when building it.

#3

JNode is now requering java 1.6. This solves and end this issue.

#4

#5

I have reopened this bug because hagar's bug fix has been reverted by lsantha with the comment "Still keep the compiler settings on 1.5 level for some time". If this is the case, we need a different fix for the problem.

Hagar or someone, could you post a more detailed explanation of what is causing the problem? It looked to me as if it might have been caused by bootimage builder failing because it was indirectly trying to using Ant's classloader to load code in the "java.util" package. I thought that a workaround would be to launch the bootimage builder in its own JVM so that it used the standard classloader.