does it ring a bell: java.lang.SecurityException: Prohibited package name: java.lang
Starting with 1131, or 1136, I can't run tests that use the openapi, and the testFramework anymore.
I now get dozens of failing tests with the stacktrace below. Does it ring a bell to you?
AFAIK, nothing has changed, except that I now use the newest jars.
请先登录再写评论。
Note: another problem started appearing at the same time :
see:
java.lang.RuntimeException: log.xml file is not exists! Path:
http://www.intellij.net/tracker/idea/viewSCR?publicId=28748#797970
Alain Ravet wrote:
Yup. Noticed ame problem here - note that I'm not even using the
testFramework. Mainly because I don't know how - the Wiki seems outdated?
CU,
Edwin
Any idea about this problem? (still happens with 1141.)
I'm now desperately stuck in my plugin project, with 45 failing tests ,
and Google doesn't have much to say about this one.
Alain
What class is failing to load?
--
Dmitry Peshehonov
Software Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
Dmitry,
> What class is failing to load?
It happens when calling a class of mines' method. Always the same method.
All the failing tests fail on a call like this :
(this is the deepest line of mines, found in the stacktrace.)
, and the troublesome called method lives in this class :
Dmitry,
> What class is failing to load?
OK. I've finally tracked the problem. It's linked to the use of the generic compiler, but I still don't know if its a bug, or if I'm wrong?
Here is a very simple way to reproduce it:
1/ create the class 'Fail' as below
2/ use the generic enabled compiler
3/ add the 'collect.jar' library, and move it to the 1st position.
4/ set project jdk to 1.4.2
5/ compile and run
This configuration doesn't run (see stacktrace below)
If I remove generics (collect jar, and compiler), it runs fine.
Alain,
I still can't reproduce the problem. I've tried your code with jdk1.4.2
(but probably I use a bit different collect.jar). But I've got an idea how
to find bad class name:
Attach junit sources to your project (to junit jar).
Create Application configuration to run swing test runner (set Class
name to junit.swingui.TestRunner, set Module as you run your tests, specify
VM parameters if you'd like to).
Debug this new configuration and set breakpoint to first line of
junit.runner.TestCaseClassLoader.loadClass(String, boolean). In breakpoint
properties dialog uncheck Suspend VM execution, check Log evaluated
expression and type smth like "loading: " + name.
Start your tests with Swing runner and get the name of bad class.
--
Dmitry Peshehonov
Software Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
"Alain Ravet" < alainravet-jetbrains@yahoo.com> wrote in message
news:4646683.1076113518682.JavaMail.itn@is.intellij.net...
>
>
generic compiler, but I still don't know if its a bug, or if I'm wrong?
>
>
>
>
>
>
>
>
Dmitry,
> I've got an idea how to find bad class name:
>..
I tried, but it didn't help. All I saw is 'null'. At some point, I also saw a mention, somewhere, of 'java.lang.SimpleIterator', but couldn't reproduce it.
I've attached a minimal self-contained - with my collect.jar - failing project.
The code doesn't use generics at all, and works fine, as long as I don't use the 'generic-enabled compiler'.
I'm lost:
- I reinstalled a fresh copy of the jdk 1.4.2_03
- I tried multiple versions of collect jar
, to no avail.
In the end, it boils down to the compilation of a class that extends ArrayList:
- the code produced by the standard compiler works fine.
- the code produced by the generic-enabled compiler fails.
Alain
Attachment(s):
SecurityExceptionBug.zip
Alain,
I've tried to reproduce the problem with your project (I had to configure it
a bit), but failed again. So I think the problem is in the only generics
related thing which wasn't tried - your gjc-rt.jar. To solve the problem (if
my suggestion it right) you need to downgrade to previous version (build
1147 has problem with latest generics compiler).
--
Dmitry Peshehonov
Software Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
"Alain Ravet" < alainravet-jetbrains@yahoo.com> wrote in message
news:22670579.1076174147885.JavaMail.itn@is.intellij.net...
>
>
>
saw a mention, somewhere, of 'java.lang.SimpleIterator', but couldn't
reproduce it.
>
project.
use the 'generic-enabled compiler'.
>
>
ArrayList:
>
>
>
>
Dmitry,
> So I think the problem is in the only generics
> related thing which wasn't tried - your gjc-rt.jar.
Alleluia..You were right.
Somehow, my copy of gjc-rt.jar got corrupted - ? cosmic ray ?-. I overwrote it with a backup copy, and it works fine now.
Note: how strange, and frightening, that java couldn't detect a jar corruption !!
"Alain Ravet" < alainravet-jetbrains@yahoo.com> wrote in message
news:7897263.1076268467363.JavaMail.itn@is.intellij.net...
>
>
>
overwrote it with a backup copy, and it works fine now.
>
corruption !!
Alain,
It hardly was cosmic ray - good jar structure and wrong byte code was good
enough to be executed by VM, I think you've faced with alien incursion.
However, have you used Tools | Setup Generics action? May be jar was
corrupted when overwriten by newer version?
--
Dmitry Peshehonov
Software Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
Dmitry,
> .. have you used Tools | Setup Generics action?
> May be jar was corrupted when overwriten by newer version?
I never used "Tools | Setup Generics": with each new build, I would copy and paste /lib/generics to ]]>/lib/. It worked fine till a few builds ago.
After your suggestion, I retrieved an old build - 977 - , and copied the lilb/generics/gjc-rt.jar over the new and corrupted one. (I checked that they were the same size, and same date).