2012-01-28 8 views
0

イムRCPを使用して、私は自分のアプリケーションクラスでは、この「スタート」の方法があります。エラーPlatform.getBundle( "")。start();

public class Application implements IApplication { 
public Object start(IApplicationContext context) throws Exception { 
    Display display = PlatformUI.createDisplay(); 

    try { 
     // Enforcing that Spring Dynamic Modules extender is started 
     Platform.getBundle("org.springframework.osgi.extender").start(); **//THIS IS LINE 26** 
     int returnCode = PlatformUI.createAndRunWorkbench(display, new ApplicationWorkbenchAdvisor()); 
     if (returnCode == PlatformUI.RETURN_RESTART) 
      return IApplication.EXIT_RESTART; 
     else 
      return IApplication.EXIT_OK; 
    } finally { 
     display.dispose(); 
    } 

} 
//More methods... 
} 

をし、エラーが言う:

!SESSION 2012-01-27 21:59:11.417 ----------------------------------------------- 
eclipse.buildId=unknown 
java.version=1.6.0_29 
java.vendor=Apple Inc. 
BootLoader constants: OS=macosx, ARCH=x86, WS=cocoa, NL=es_ES 
Framework arguments: -product com.blackthorne.mvctest.product -d32 
Command-line arguments: -product com.blackthorne.mvctest.product -data /Users/Hepale/Documents/Java/Wisconsin - ET/Eclipse/MVCTest/../runtime-com.blackthorne.mvctest.product -dev file:/Users/Hepale/Documents/Java/Wisconsin - ET/Eclipse/MVCTest/.metadata/.plugins/org.eclipse.pde.core/com.blackthorne.mvctest.product/dev.properties -os macosx -ws cocoa -arch x86 -consoleLog -d32 

!ENTRY org.eclipse.osgi 4 0 2012-01-27 21:59:12.168 
!MESSAGE Application error 
!STACK 1 
java.lang.NullPointerException 
    at com.blackthorne.mvctest.Application.start(Application.java:26) 
    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 sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 
    at java.lang.reflect.Method.invoke(Method.java:597) 
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:620) 
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:575) 
    at org.eclipse.equinox.launcher.Main.run(Main.java:1408) 
    at org.eclipse.equinox.launcher.Main.main(Main.java:1384) 
An error has occurred. 

私はそれがJavaのバージョンcosのだと信じて、私は「追加-d32 'プログラムの引数に(実行コンフィギュレーションで...) 私は何が不足しているか分からない。

私を助けることができる人は、本当に緊急事態であり、感謝しています。

私はプログラマーのこの世界で知っている、我々は疑問や知識を共有する必要があります。事前に

感謝;)

答えて

1

私はバンドルが正常に開始されていることを確認するためにOSGiバンドルの開始レベルを使用します。 「構成」ページの製品構成またはosgi.bundlesプロパティを使用してconfig.iniファイルに直接開始レベルを設定できます。