I'm using the default JSSE provider in Java 6 (SunJSSE) like so,
SSLContext sslCtx = SSLContext.getInstance("TLS");
Can I call the method sslCtx.createSSLEngine() safely from multiple threads?
Update 1:
The code that's calling createSSLEngine() in this manner is run on the server-side only. Basically, a thread calls this method for every client that connects to the server.
The call to SSLContext.createSSLEngine() seems to be thread-safe. At least based on the fact that the application has not failed with any race-condition-related error.
In trying to find a definitive answer, I downloaded the source code of OpenJDK6 b27 and took a look at it. I’m assuming, of course, that this is the same code that is inside Oracle’s JRE 6.
When SSLContext.createSSLEngine() is called, it in its turn calls the abstract method engineCreateSSLEngine() on whatever implementation it has of the javax.net.ssl.SSLContextSpi class. In this case the implementation is sun.security.ssl.SSLContextImpl. The implementation of the engineCreateSSLEngine() method provided by SSLContextImpl simply returns a new instance of sun.security.ssl.SSLEngineImpl by calling the SSLEngineImpl(SSLContextImpl ctx) constructor.
Inspecting the code, I couldn’t find anything that suggested a possible thread-unsafe operation.
I can also agree with Elliot concerning the thread-safeness of SSLContext.createSSLEngine() in OpenJDK8 (based on analysing the code and performing simple tests).
I added this answer, because there exist situations when you HAVE to re-use SSLContexts (if you do not like wrapper classes or cannot use synchronisation): When connecting to a Wildfly application server EJB using SSL encryption, the jboss-remoting EndpointImpl decides to open a new connection based on a ConnectionKey that contains the SSLContext instance. So if you always specify a new SSLContext for each EJB call, always a new connection is used. The sad thing is, that the connection is considered "shared", so it is not closed after the call (but never re-used, due to the differing ConnectionKeys). After some time, you will only get many of those:
Caused by: java.net.SocketException: No buffer space available
at sun.nio.ch.Net.socket0(Native Method) ~[?:1.8.0_91]
at sun.nio.ch.Net.socket(Net.java:411) ~[?:1.8.0_91]
at sun.nio.ch.Net.socket(Net.java:404) ~[?:1.8.0_91]
at sun.nio.ch.SocketChannelImpl.<init>(SocketChannelImpl.java:105) ~[?:1.8.0_91]
at sun.nio.ch.SelectorProviderImpl.openSocketChannel(SelectorProviderImpl.java:60) ~[?:1.8.0_91]
at java.nio.channels.SocketChannel.open(SocketChannel.java:145) ~[?:1.8.0_91]
at org.xnio.nio.WorkerThread.openTcpStreamConnection(WorkerThread.java:250) ~[xnio-nio-3.6.2.Final.jar:3.6.2.Final]
at org.xnio.XnioIoThread.internalOpenTcpStreamConnection(XnioIoThread.java:247) ~[xnio-api-3.6.2.Final.jar:3.6.2.Final]
at org.xnio.XnioIoThread.openStreamConnection(XnioIoThread.java:226) ~[xnio-api-3.6.2.Final.jar:3.6.2.Final]
at org.xnio.XnioWorker.openStreamConnection(XnioWorker.java:398) ~[xnio-api-3.6.2.Final.jar:3.6.2.Final]
at org.jboss.remoting3.remote.RemoteConnectionProvider.createSslConnection(RemoteConnectionProvider.java:246) ~[jboss-remoting-5.0.0.
at org.jboss.remoting3.remote.HttpUpgradeConnectionProvider.createSslConnection(HttpUpgradeConnectionProvider.java:136) ~[jboss-remot
at org.jboss.remoting3.remote.RemoteConnectionProvider.connect(RemoteConnectionProvider.java:206) ~[jboss-remoting-5.0.0.Final.jar:5.
at org.jboss.remoting3.EndpointImpl.lambda$connect$6(EndpointImpl.java:618) ~[jboss-remoting-5.0.0.Final.jar:5.0.0.Final]
at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_91]
at org.jboss.remoting3.EndpointImpl.connect(EndpointImpl.java:617) ~[jboss-remoting-5.0.0.Final.jar:5.0.0.Final]
at org.jboss.remoting3.EndpointImpl.connect(EndpointImpl.java:536) ~[jboss-remoting-5.0.0.Final.jar:5.0.0.Final]
at org.jboss.remoting3.ConnectionInfo$None.getConnection(ConnectionInfo.java:83) ~[jboss-remoting-5.0.0.Final.jar:5.0.0.Final]
at org.jboss.remoting3.ConnectionInfo.getConnection(ConnectionInfo.java:56) ~[jboss-remoting-5.0.0.Final.jar:5.0.0.Final]
at org.jboss.remoting3.EndpointImpl.doGetConnection(EndpointImpl.java:487) ~[jboss-remoting-5.0.0.Final.jar:5.0.0.Final]
at org.jboss.remoting3.EndpointImpl.getConnectedIdentity(EndpointImpl.java:433) ~[jboss-remoting-5.0.0.Final.jar:5.0.0.Final]
at org.jboss.remoting3.UncloseableEndpoint.getConnectedIdentity(UncloseableEndpoint.java:51) ~[jboss-remoting-5.0.0.Final.jar:5.0.0.F
at org.jboss.remoting3.Endpoint.getConnectedIdentity(Endpoint.java:122) ~[jboss-remoting-5.0.0.Final.jar:5.0.0.Final]
at org.jboss.ejb.protocol.remote.RemoteEJBReceiver.lambda$getConnection$2(RemoteEJBReceiver.java:185) ~[jboss-ejb-client-4.0.9.Final.
at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_91]
at org.jboss.ejb.protocol.remote.RemoteEJBReceiver.getConnection(RemoteEJBReceiver.java:185) ~[jboss-ejb-client-4.0.9.Final.jar:4.0.9
at org.jboss.ejb.protocol.remote.RemoteEJBReceiver.processInvocation(RemoteEJBReceiver.java:128) ~[jboss-ejb-client-4.0.9.Final.jar:4
at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:454) ~[jboss-ejb-client-4.0.9.Final.ja
Re-using a static SSLContext fixes this.
Related
I want to be able to run multiple iterations of this test plan.
Thread Group
While ${__javaScript("${user}" != "<EOF>",)}
csv1 config
If "${user}" != "<EOF>"
Module Controller
While ${__javaScript("${user2}" != "<EOF>",)}
csv2 config
If "${user2}" != "<EOF>"
Module Controller 2
When I run the test, at the end of the 2nd while controller, it outputs the following error:
I've also tried running just 1 of the while controllers, and it has the same response. I'm not sure why it doesn't stop the current iteration and start a new one if it's able to get to the 2nd while controller.
java.lang.StackOverflowError: null
at java.lang.Class.getDeclaredFields0(Native Method) ~[?:1.8.0_231]
at java.lang.Class.privateGetDeclaredFields(Unknown Source) ~[?:1.8.0_231]
at java.lang.Class.getDeclaredField(Unknown Source) ~[?:1.8.0_231]
at jdk.nashorn.internal.runtime.Context$ContextCodeInstaller$1.run(Context.java:209) ~[nashorn.jar:?]
at jdk.nashorn.internal.runtime.Context$ContextCodeInstaller$1.run(Context.java:204) ~[nashorn.jar:?]
at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_231]
at jdk.nashorn.internal.runtime.Context$ContextCodeInstaller.initialize(Context.java:204) ~[nashorn.jar:?]
at jdk.nashorn.internal.codegen.CompilationPhase$InstallPhase.transform(CompilationPhase.java:508) ~[nashorn.jar:?]
at jdk.nashorn.internal.codegen.CompilationPhase.apply(CompilationPhase.java:624) ~[nashorn.jar:?]
at jdk.nashorn.internal.codegen.Compiler.compile(Compiler.java:655) ~[nashorn.jar:?]
at jdk.nashorn.internal.runtime.Context.compile(Context.java:1317) ~[nashorn.jar:?]
at jdk.nashorn.internal.runtime.Context.compileScript(Context.java:1251) ~[nashorn.jar:?]
at jdk.nashorn.internal.runtime.Context.compileScript(Context.java:627) ~[nashorn.jar:?]
at jdk.nashorn.api.scripting.NashornScriptEngine.compileImpl(NashornScriptEngine.java:535) ~[nashorn.jar:?]
at jdk.nashorn.api.scripting.NashornScriptEngine.compileImpl(NashornScriptEngine.java:524) ~[nashorn.jar:?]
at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:402) ~[nashorn.jar:?]
at jdk.nashorn.api.scripting.NashornScriptEngine.eval(NashornScriptEngine.java:155) ~[nashorn.jar:?]
at org.apache.jmeter.functions.JavaScript.executeWithNashorn(JavaScript.java:142) ~[ApacheJMeter_functions.jar:5.1.1 r1855137]
at org.apache.jmeter.functions.JavaScript.execute(JavaScript.java:103) ~[ApacheJMeter_functions.jar:5.1.1 r1855137]
at org.apache.jmeter.engine.util.CompoundVariable.execute(CompoundVariable.java:136) ~[ApacheJMeter_core.jar:5.1.1 r1855137]
at org.apache.jmeter.engine.util.CompoundVariable.execute(CompoundVariable.java:111) ~[ApacheJMeter_core.jar:5.1.1 r1855137]
at org.apache.jmeter.testelement.property.FunctionProperty.getStringValue(FunctionProperty.java:101)
...
Thanks in advance.
It might be connected with the test data, check the last line(s) of your 2nd CSV file, there might be a blank line or non-printable character which is causing errors.
Since JMeter 3.1 it's recommended to use JSR223 Test Elements and Groovy language for scripting so consider migrating to __groovy() function in the While and If Controllers. The equivalent Groovy expression would be:
${__groovy(!vars.get("user2").equals("<EOF>"),)}
where vars is the shorthand for JMeterVariables class instance, check out Top 8 JMeter Java Classes You Should Be Using with Groovy article for more information on this and other JMeter API shortcuts
It's also recommended to always use the latest version of JMeter so consider migrating to JMeter 5.2.1 (or whatever is the most recent stable JMeter version which is available at JMeter Downloads page)
I didn't know how Loop Controllers worked, but I used them to solve this problem.
Thread Group
Throughput Controller
Loop Controller (size_of_csv)
csv config
Module Controller
Loop Controller 2(size_of_csv 2)
csv 2 config
Module Controller 2
I have a 3 node Apache Ignite Cluster, I have created a cache with Integer as Key and a 'Subscriber' POJO as value, when I connect to the cluster from inside a JAVA program and access the cache , I get the above mentioned exception, I have 'peerclassloading' property set to false, and I have deployed 'Subscriber' POJO Binaries in all the nodes, Please find the complete stack trace below. What am I missing here? Why is it looking for some file inside my IGNITE_HOME when I am starting client inside my JAVA program with Ignition.start()?
class org.apache.ignite.IgniteCheckedException: Failed to read class name from file [id=-1219769240, file=/home/benakaraj/Downloads/apache-ignite-fabric-1.5.0.final-bin/work/marshaller/-1219769240.classname]
at org.apache.ignite.internal.MarshallerContextImpl.className(MarshallerContextImpl.java:158)
at org.apache.ignite.internal.MarshallerContextAdapter.getClass(MarshallerContextAdapter.java:174)
at org.apache.ignite.internal.binary.BinaryContext.descriptorForTypeId(BinaryContext.java:483)
at org.apache.ignite.internal.binary.BinaryReaderExImpl.deserialize(BinaryReaderExImpl.java:1443)
at org.apache.ignite.internal.binary.BinaryObjectImpl.deserializeValue(BinaryObjectImpl.java:537)
at org.apache.ignite.internal.binary.BinaryObjectImpl.value(BinaryObjectImpl.java:117)
at org.apache.ignite.internal.processors.cache.CacheObjectContext.unwrapBinary(CacheObjectContext.java:280)
at org.apache.ignite.internal.processors.cache.CacheObjectContext.unwrapBinaryIfNeeded(CacheObjectContext.java:145)
at org.apache.ignite.internal.processors.cache.CacheObjectContext.unwrapBinaryIfNeeded(CacheObjectContext.java:132)
at org.apache.ignite.internal.processors.cache.GridCacheContext.unwrapBinaryIfNeeded(GridCacheContext.java:1748)
at org.apache.ignite.internal.processors.cache.distributed.dht.GridPartitionedSingleGetFuture.setResult(GridPartitionedSingleGetFuture.java:598)
at org.apache.ignite.internal.processors.cache.distributed.dht.GridPartitionedSingleGetFuture.onResult(GridPartitionedSingleGetFuture.java:454)
at org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtCacheAdapter.processNearSingleGetResponse(GridDhtCacheAdapter.java:153)
at org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache.access$1200(GridDhtAtomicCache.java:128)
at org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache$11.apply(GridDhtAtomicCache.java:295)
at org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicCache$11.apply(GridDhtAtomicCache.java:293)
at org.apache.ignite.internal.processors.cache.GridCacheIoManager.processMessage(GridCacheIoManager.java:582)
at org.apache.ignite.internal.processors.cache.GridCacheIoManager.onMessage0(GridCacheIoManager.java:280)
at org.apache.ignite.internal.processors.cache.GridCacheIoManager.handleMessage(GridCacheIoManager.java:204)
at org.apache.ignite.internal.processors.cache.GridCacheIoManager.access$000(GridCacheIoManager.java:80)
at org.apache.ignite.internal.processors.cache.GridCacheIoManager$1.onMessage(GridCacheIoManager.java:163)
at org.apache.ignite.internal.managers.communication.GridIoManager.processRegularMessage0(GridIoManager.java:821)
at org.apache.ignite.internal.managers.communication.GridIoManager.access$1600(GridIoManager.java:103)
at org.apache.ignite.internal.managers.communication.GridIoManager$5.run(GridIoManager.java:784)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.io.FileNotFoundException: /home/benakaraj/Downloads/apache-ignite-fabric-1.5.0.final-bin/work/marshaller/-1219769240.classname (No such file or directory)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:138)
at java.io.FileReader.<init>(FileReader.java:72)
at org.apache.ignite.internal.MarshallerContextImpl.className(MarshallerContextImpl.java:154)
... 26 more
Looks like the cache tries to deserialize the value after retrieving it from cache, but you don't have a class for it on the node where IgniteCache.get() was called. You can either deploy the class, or use IgniteCache.withKeepBinary() to avoid deserialization: https://apacheignite.readme.io/docs/binary-marshaller#binaryobject-cache-api
The issue turned out to be pretty simple, Ignite looks for the user defined POJOs from the list of classes loaded by default class loader, if it does not find it there , it looks inside marshalled classes, In my case, my value POJO was inside the test resources , hence default class loader was not loading the class, causing ignite to look inside marshalled classes folder(IGNITE_HOME/work/marshaller/) .
I have some JAX-RS 2.0 clients running ok in Liberty Profile 8.5.5.6. They are all working ok sequentially, but I want to execute some of them in a Thread so they run concurrently. When I try to get a "target" inside a FutureTask with:
WebTarget myResource = client.target(apiURLBase + ...);
I get NullPointerExcepton in this com.ibm.ws... class:
Caused by: java.lang.NullPointerException
at com.ibm.ws.jaxrs20.client.bus.LibertyJAXRSClientBusFactory.getClientScopeBus(LibertyJAXRSClientBusFactory.java:89)
at com.ibm.ws.jaxrs20.client.JAXRSClientImpl.target(JAXRSClientImpl.java:109)
at org.apache.cxf.jaxrs.client.spec.ClientImpl.target(ClientImpl.java:100)
at com.servengine.watson.naturallanguageclassifier.NaturalLanguageClassifierRESTClient.classify(NaturalLanguageClassifierRESTClient.java:161)
at com.servengine.watson.naturallanguageclassifier.NaturalLanguageClassifierRESTClient$Proxy$_$$_WeldClientProxy.classify(Unknown Source)
at com.skios.eliza.nlq.NaturalLanguageQueryFlowView$1.call(NaturalLanguageQueryFlowView.java:66)
at com.skios.eliza.nlq.NaturalLanguageQueryFlowView$1.call(NaturalLanguageQueryFlowView.java:1)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
CXF cannot be used out of "main" Thread? What am I missing?
Thanks for any help.
If you want to use the client API in a forked new thread, you need to make sure the new thread is a container managed one. In your case, you can enable concurrent-1.0 feature. Then use:
#Resource(name="java:comp/DefaultManagedExecutorServcie")
ManagedExecutorService executor;
Task task = new Task();
Future<String> result = executor.submit(task);
In Your Task class, you can do the same thing with what you done before: WebTarget myResource = client.target(apiURLBase + ...);
I am trying easyMock test few classes / interface methods. Methods with parameters, trying to capture the parameter, but getting one or other error. If I manage to only record one expectation, it doesn't even capture anything in the parameter pipe, where if i use the following approach, I am getting error as follows the code.
#Test
public void testFireChannelInitializer() throws Exception
{
expect(c.pipeline()).andReturn(pipeline).times(1);
channelListener.fireChannelInitializer(EasyMock.capture(pipe), serverHandler);
EasyMock.replay(c, pipeline, channelListener);
initializer.initChannel(c);
verifyAll();
assertEquals(4, pipe.getValues().size());
assertTrue(pipe.getValues().get(0) instanceof LoggingHandler);
assertTrue(pipe.getValues().get(0) instanceof ObjectEncoder);
assertTrue(pipe.getValues().get(0) instanceof ObjectDecoder);
assertTrue(pipe.getValues().get(0) instanceof ServerHandler);
}
Results in Error
testFireChannelInitializer(com.obolus.generic.impl.DefaultChannelListenerTest)
Time elapsed: 3.812 sec <<< ERROR! java.lang.IllegalStateException: 2
matchers expected, 1 recorded. This exception usually occurs when
matchers are mixed with raw values when recording a method: foo(5,
eq(6)); // wrong You need to use no matcher at all or a matcher for
every single param: foo(eq(5), eq(6)); // right foo(5, 6); // also
right at
org.easymock.internal.ExpectedInvocation.createMissingMatchers(ExpectedInvocation.java:51)
at
org.easymock.internal.ExpectedInvocation.(ExpectedInvocation.java:40)
at org.easymock.internal.RecordState.invoke(RecordState.java:78) at
org.easymock.internal.MockInvocationHandler.invoke(MockInvocationHandler.java:40)
at
org.easymock.internal.ObjectMethodsFilter.invoke(ObjectMethodsFilter.java:94)
at
org.easymock.internal.ClassProxyFactory$MockMethodInterceptor.intercept(ClassProxyFactory.java:97)
at
com.obolus.generic.impl.DefaultChannelListener$$EnhancerByCGLIB$$2da02970.fireChannelInitializer()
at
com.obolus.generic.impl.DefaultChannelListenerTest.testFireChannelInitializer(DefaultChannelListenerTest.java:63)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483) at
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
at
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
at
org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263) at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231) at
org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60) at
org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229) at
org.junit.runners.ParentRunner.access$000(ParentRunner.java:50) at
org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222) at
org.junit.runners.ParentRunner.run(ParentRunner.java:300) at
org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:242)
at
org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:137)
at
org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483) at
org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
at
org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
at
org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
at
org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
at
org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)
Any idea whats wrong or How to use easy mock? No good documentation or examples around.
The easymock website has a user guide but they redid their website recently and the guide isn't as complete as it used to be.
I think your problem might be you have to do a capture AND an argument matcher.
From the user guide:
Matches any value but captures it in the Capture parameter for later access. You can do and(someMatcher(...), capture(c)) to capture a parameter from a specific call to the method. You can also specify a CaptureType telling that a given Capture should keep the first, the last, all or no captured values.
So you might need to do an and( capture(..), paramMatcher)
Also EasyMock has an annoying API "feature" where if you use one argument matcher in a method call, then all the arguments must also be wrapped in matchers even if it's eq(). I think that's what your exception is complaining about. So I think those are your two problems.
I'm not sure what your method signature looks like so I will assume it's
void fireChannelInitializer(Object, ServerHandler);
after using static imports to import EasyMock.*
channelListener.fireChannelInitializer(
and(capture(pipe), isA(Object.class)), //captures the argument to `pipe` Capture object
eq(serverHandler));
As some of you may know, Eclipse IDE has a nice feature called "Plug-in Spy".
I would like to add this feature to my own RCP application. Now, I added the org.eclipse.pde.runtime to my list of dependencies, and since I defined a different key binding schema, I also created a command that points to SpyHandler, and I defined a key binding that binds a certain key combination in a given context.
Now the problem is, the command is executed, but I get the following exception:
KEYS >>> WorkbenchKeyboard.executeCommand(commandId = 'org.eclipse.pde.ui.spy.commands.spyCommand', parameters = {})
16:00:52,107 WARN [ErrorReporter] - Error Reporter invoked to handle java.lang.ExceptionInInitializerError
at org.eclipse.pde.internal.runtime.spy.dialogs.SpyDialog.createDialogArea(SpyDialog.java:82)
at org.eclipse.pde.internal.runtime.spy.dialogs.SpyDialog.createContents(SpyDialog.java:71)
at org.eclipse.jface.window.Window.create(Window.java:431)
at org.eclipse.pde.internal.runtime.spy.handlers.SpyHandler.execute(SpyHandler.java:38)
at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:293)
at org.eclipse.core.commands.Command.executeWithChecks(Command.java:476)
at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
at org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:169)
at org.eclipse.ui.internal.keys.WorkbenchKeyboard.executeCommand(WorkbenchKeyboard.java:468)
at org.eclipse.ui.internal.keys.WorkbenchKeyboard.press(WorkbenchKeyboard.java:786)
at org.eclipse.ui.internal.keys.WorkbenchKeyboard.processKeyEvent(WorkbenchKeyboard.java:885)
at org.eclipse.ui.internal.keys.WorkbenchKeyboard.filterKeySequenceBindings(WorkbenchKeyboard.java:567)
at org.eclipse.ui.internal.keys.WorkbenchKeyboard.access$3(WorkbenchKeyboard.java:508)
at org.eclipse.ui.internal.keys.WorkbenchKeyboard$KeyDownFilter.handleEvent(WorkbenchKeyboard.java:123)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.filterEvent(Display.java:1253)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1052)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1077)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1062)
at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1103)
at org.eclipse.swt.widgets.Shell.sendKeyEvent(Shell.java:1361)
at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1099)
at org.eclipse.swt.widgets.Widget.wmChar(Widget.java:1508)
at org.eclipse.swt.widgets.Control.WM_CHAR(Control.java:4268)
at org.eclipse.swt.widgets.Canvas.WM_CHAR(Canvas.java:345)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:4160)
at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:341)
at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1598)
at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2038)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:4873)
at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2459)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3655)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2640)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438)
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:619)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
at org.eclipse.equinox.launcher.Main.run(Main.java:1407)
at org.eclipse.equinox.launcher.Main.main(Main.java:1383)
Caused by: java.lang.NullPointerException
at org.eclipse.pde.internal.runtime.PDERuntimePluginImages.makeIconURL(PDERuntimePluginImages.java:117)
at org.eclipse.pde.internal.runtime.PDERuntimePluginImages.create(PDERuntimePluginImages.java:106)
at org.eclipse.pde.internal.runtime.PDERuntimePluginImages.<clinit>(PDERuntimePluginImages.java:43)
... 50 more
Can anybody help me with this? Is it possible that I'm missing something in my target (it's a custom built target)? And if so, what? I added org.eclipse.pde.runtime, and, as far as I can see, no other plugin should be necessary.
Why do you need to create a new command? You can bind an existing command in your keybinding schema and assign new keys.