Something about "stack" makes junit4 mad. try -Dargs="-Djava.security.debug=access,failure" instead: that still gives stacktrace on failures, which is usually what you want, and works fine. If its not enough, -Dargs="-Djava.security.debug=all" seems to work just fine with the junit runner too, and its mega-verbose.
On Sun, Nov 5, 2017 at 6:57 PM, Michael McCandless <[email protected]> wrote: > I'm trying to understand why the JVM security manager is preventing Lucene > from finding all codecs ... and I thought I could e.g. run this: > > ant test -Dargs="-Djava.security.debug=access,failure,stack" > -Dtestcase=TestIndexWriter > > That property tells the security manager to dump the stack when it blocks > attempted access to something, and I could swear I've done this successfully > in the past ... > > But when I run that, I see this output on the console: > > -test: > > [junit4] <JUnit4> says salut! Master seed: AA9B8DC97F4B0C7 > > [junit4] Executing 1 suite with 1 JVM. > > [junit4] > > [junit4] Started J0 PID(50156@localhost). > > [junit4] Event stream error: java.lang.IllegalStateException: Expected > BEGIN_OBJECT but was BEGIN_ARRAY at line 3382 column 19 path > $[1].description > > [junit4] java.lang.IllegalStateException: Expected BEGIN_OBJECT but was > BEGIN_ARRAY at line 3382 column 19 path $[1].description > > [junit4] at > com.carrotsearch.ant.tasks.junit4.gson.stream.JsonReader.beginObject(JsonReader.java:386) > > [junit4] at > com.carrotsearch.ant.tasks.junit4.events.JsonHelpers.readDescription(JsonHelpers.java:47) > > [junit4] at > com.carrotsearch.ant.tasks.junit4.events.AbstractEventWithDescription.deserialize(AbstractEventWithDescription.java:34) > > [junit4] at > com.carrotsearch.ant.tasks.junit4.events.SuiteStartedEvent.deserialize(SuiteStartedEvent.java:48) > > [junit4] at > com.carrotsearch.ant.tasks.junit4.events.EventType.deserialize(EventType.java:48) > > [junit4] at > com.carrotsearch.ant.tasks.junit4.events.Deserializer.deserialize(Deserializer.java:29) > > [junit4] at > com.carrotsearch.ant.tasks.junit4.LocalSlaveStreamHandler.pumpEvents(LocalSlaveStreamHandler.java:220) > > [junit4] at > com.carrotsearch.ant.tasks.junit4.LocalSlaveStreamHandler$2.run(LocalSlaveStreamHandler.java:122) > > And then no more output, and the process hangs. > > It's as if the added verbosity from security manager messed up the > communications between the test runner and ant, or something? > > Or am I running this incorrectly? How else to get verbosity about the > security manager? > > Thanks, > > Mike McCandless > > http://blog.mikemccandless.com --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
