TestPluginManager error during tests

22 views
Skip to first unread message

Slide

unread,
Feb 2, 2017, 2:36:08 PM2/2/17
to Jenkins Developer List
I am working on a plugin, and I am seeing the following error during the injected tests. I have verified that the message does exist, so I'm kind of at a loss. Anyone have any ideas?

java.lang.NoSuchMethodError: hudson.model.Messages._Hudson_Permissions_Title()Lorg/jvnet/localizer/Localizable;
        at hudson.security.Permission.<clinit>(Permission.java:300)
        at hudson.PluginManager.<clinit>(PluginManager.java:1929)
        at org.jvnet.hudson.test.JenkinsRule.<init>(JenkinsRule.java:320)
        at hudson.model.FreestyleJobPublisherTest.<init>(FreestyleJobPublisherTest.java:28)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
        at org.junit.runners.BlockJUnit4ClassRunner.createTest(BlockJUnit4ClassRunner.java:217)
        at org.junit.runners.BlockJUnit4ClassRunner$1.runReflectiveCall(BlockJUnit4ClassRunner.java:266)
        at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
        at org.junit.runners.BlockJUnit4ClassRunner.methodBlock(BlockJUnit4ClassRunner.java:263)
        at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
        at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
        at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
        at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
        at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
        at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
        at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:367)
        at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:274)
        at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:238)
        at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:161)
        at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:290)
        at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:242)
        at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:121)

Daniel Beck

unread,
Feb 2, 2017, 3:32:57 PM2/2/17
to jenkin...@googlegroups.com

> On 02.02.2017, at 20:35, Slide <slide...@gmail.com> wrote:
>
> I have verified that the message does exist, so I'm kind of at a loss.

Did the localizer run? I.e. are there generated sources for Messages.java?

Jesse Glick

unread,
Feb 2, 2017, 3:49:20 PM2/2/17
to Jenkins Dev
On Thu, Feb 2, 2017 at 2:35 PM, Slide <slide...@gmail.com> wrote:
> java.lang.NoSuchMethodError: hudson.model.Messages._Hudson_Permissions_Title()Lorg/jvnet/localizer/Localizable;
> at hudson.security.Permission.<clinit>(Permission.java:300)

Perhaps you accidentally created a
`src/main/resources/hudson/model/Messages.properties` in your plugin,
clobbering the core one?

Slide

unread,
Feb 2, 2017, 3:53:22 PM2/2/17
to Jenkins Dev
Ding ding, you are correct. I should have thought of that. 

Thanks!

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CANfRfr1aTQusbRoYwgA0es8D6k%3DLB7LXu1rBEXUg3WuNgpK%3DLg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages