android project set up in eclipse showing some error - java

i had set up an android project in eclipse enviornment.
After the set up am getting the following error in Error log :
org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.NullPointerException)
at org.eclipse.swt.SWT.error(SWT.java:3884)
at org.eclipse.swt.SWT.error(SWT.java:3799)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:137)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3885)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3506)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2405)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2221)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:493)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194)
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:368)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
at org.eclipse.equinox.launcher.Main.run(Main.java:1311)
Caused by: java.lang.NullPointerException
at com.android.ddmuilib.logcat.LogCatReceiverFactory.newReceiver(LogCatReceiverFactory.java:57)
at com.android.ddmuilib.logcat.LogCatPanel.deviceSelected(LogCatPanel.java:229)
at com.android.ddmuilib.SelectionDependentPanel.deviceSelected(SelectionDependentPanel.java:52)
at com.android.ide.eclipse.ddms.views.SelectionDependentViewPart.selectionChanged(SelectionDependentViewPart.java:67)
at com.android.ide.eclipse.ddms.DdmsPlugin$6.run(DdmsPlugin.java:690)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134)
... 22 more
always this error is there..so that i can't able to load the simulator.
Is it because of some wrong configuration.?
Experts please help.

It looks like a problem with your code. Is there any, or is that a brand new android project?
Make sure that when you go to execute your code for the first time you chose android application. Also if it is a new android project I would suggest that you try re installing the JDK and eclipse.
Good Luck!

When I have at once many errors in console, I would look into the Problems view. (Maybe, you'll need to make it visible by window/show view). Almost sure, you will see some problems there. In this case you will know what problem to solve.

Related

Anylogic: Local Database Connection

I'm really struggeling here. Anylogic gives me the Database Connection Problem for some days now and the support was not able to help me until now
What I got here is a windows mashine running the latest Win10 with Anylogic 7.3 Professional
My Anylogic Model is completely local and runs perfect until I try to add an Database Table. As mentioned above Anylogic asks me reconnect the database each time I try to insert a table. Pressing the Connect button does nothing, but showing the same window again. Pressing cancel shows me the following error message:
Together with the Anylogic Support I already tried to disable the Antivirus, send them logs,etc. Nothing helped so far. I already tried to reinstall the whole program including a thourough clean (all .Anylogic Folders, files,...).
I don't know anymore what else to do at this point. I hope any of you guys can help out a little.
!ENTRY org.eclipse.ui 4 0 2016-12-21 13:48:02.168
!MESSAGE Unhandled event loop exception
!STACK 0
java.lang.RuntimeException: java.sql.SQLException: Connection timed out
at com.anylogic.objectmodel.commands.database.AbstractDatabaseCommand.execute(Unknown Source)
at com.anylogic.objectmodel.commands.CompoundCommand.execute(Unknown Source)
at com.anylogic.objectmodel.commands.BasicCommandStack.execute(Unknown Source)
at com.anylogic.objectmodel.commands.CommandStack.execute(Unknown Source)
at com.anylogic.properties.widget.WidgetBuilder$86.n(Unknown Source)
at com.anylogic.properties.widget.WidgetBuilder$86.onAdd(Unknown Source)
at com.anylogic.properties.widget.base.list.ListWidget.j(Unknown Source)
at com.anylogic.components.button.ButtonDecorator.a(Unknown Source)
at com.anylogic.components.button.ButtonDecorator.a(Unknown Source)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4353)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1061)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4172)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3761)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1151)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1032)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:148)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:636)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:579)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
at com.anylogic.application.AnyLogicApplication.start(Unknown Source)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:382)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:236)
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:497)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:648)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:603)
at org.eclipse.equinox.launcher.Main.run(Main.java:1465)
Caused by: java.sql.SQLException: Connection timed out
at com.anylogic.database.DatabaseManager.getConnection(Unknown Source)
at com.anylogic.database.DatabaseManager.getConnection(Unknown Source)
at com.anylogic.database.DatabaseManager.a(Unknown Source)
at com.anylogic.database.DatabaseManager.createColumn(Unknown Source)
at com.anylogic.database.DatabaseManager.createColumn(Unknown Source)
at com.anylogic.objectmodel.commands.database.CreateColumnCommand.doExecute(Unknown Source)
... 35 more
I have also run into this problem. If you go into the database folder of the model and delete the lock file and the previous database folder it will open without throwing that error.
I faced the same problem. I don't know exactly why it occurred, but something with storing the Model went wrong. But I managed to reconnect with the following procedure:
Copy the whole folder of the Project and store it somewhere
In the new folder delete the .original.alp-File
Rename the .alp-File
then open the Renamed .alp-File in an text-editor
In that file you'll find something like that:
*************************************************
AnyLogic Project File
*************************************************
-->
<AnyLogicWorkspace WorkspaceVersion="1.9" AnyLogicVersion="8.5.1.201910011746" AlpVersion="8.4.9">
<Model>
<Id>1570541727194</Id>
<Name><![CDATA[20191030-02-SBB-DAT]]></Name>
<EngineVersion>6</EngineVersion>
<JavaPackageName><![CDATA[_20191008_02_sbb_dat]]></JavaPackageName>
<ModelTimeUnit><![CDATA[Minute]]></ModelTimeUnit>
<ActiveObjectClasses>
<!-- ========= Active Object Class ======== -->
Now find all Strings in that file equals to the packageName, in my case:
_20191008_02_sbb_dat
and replace it with the name of your .alp file, in mycase:
sbb_dat.
It should look like this:
<AnyLogicWorkspace WorkspaceVersion="1.9" AnyLogicVersion="8.5.1.201910011746" AlpVersion="8.4.9">
<Model>
<Id>1570541727194</Id>
<Name><![CDATA[SBB-DAT]]></Name>
<EngineVersion>6</EngineVersion>
<JavaPackageName><![CDATA[sbb_dat]]></JavaPackageName>
<ModelTimeUnit><![CDATA[Minute]]></ModelTimeUnit>
<ActiveObjectClasses>
<!-- ========= Active Object Class ======== -->
After that store and close the file and open it with AnyLogic. In my case this helped.
I just got the same error and solved as follow:
(Inspired on #cogijl answer)
Close the model and Anylogic.
Go to the model folder and delete the folder "database".
Open the model. This will generate the error again but with something different: you can now add or delete databases (tables) in the database section.
Delete the database with the option "Delete database" in the Database section.
Add the tables again with the option "Create or Import table..."
Make sure you import the tables using the same names as before, otherwise everything will crash.
Done, the model runs again.
the only thing you will lose, is the Export setting, but it's easy to set them again.
Hope this helps others.
Try deleting all Anylogic relevant rules. This should solve the problem.
According to the result of listening localhost 9001, something blocked the connection between AnyLogic and Server DB. Deleting all rules defined for Anylogic (though all of them were „permit“) helped.

error running javafx application with Intellij

I have a javafx program that I was formerly developing in sublime text before migrating to intellij as my editing environment. As of now, I can compile and run without error through the command line (Windows). However, when I try to run it from intellij, I get the following message:
Exception in Application start method
Exception in thread "main" java.lang.RuntimeException: Exception in Application start method
at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:875)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$147(LauncherImpl.java:157)
at com.sun.javafx.application.LauncherImpl$$Lambda$1/868693306.run(Unknown Source)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NullPointerException: Location is required.
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3201)
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3169)
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3142)
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3118)
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3098)
at javafx.fxml.FXMLLoader.load(FXMLLoader.java:3091)
at Main.setNewScene(Main.java:40)
at Main.start(Main.java:29)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$153(LauncherImpl.java:821)
at com.sun.javafx.application.LauncherImpl$$Lambda$50/2069914884.run(Unknown Source)
at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$166(PlatformImpl.java:323)
at com.sun.javafx.application.PlatformImpl$$Lambda$46/646648017.run(Unknown Source)
at com.sun.javafx.application.PlatformImpl.lambda$null$164(PlatformImpl.java:292)
at com.sun.javafx.application.PlatformImpl$$Lambda$48/1106256089.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$165(PlatformImpl.java:291)
at com.sun.javafx.application.PlatformImpl$$Lambda$47/151108218.run(Unknown Source)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.lambda$null$141(WinApplication.java:102)
at com.sun.glass.ui.win.WinApplication$$Lambda$38/2004449016.run(Unknown Source)
... 1 more
Process finished with exit code 1
I don't know how to fix this.
The problem turned out to be intellij having an issue with the source folder in the project directory. By moving all my java files to a new directory and reopening it in intellij as a new project with a single, correct source folder, the problem completely went away.
(As stated in the question, the code itself was functional and worked through the command line.)

NullPointerException in eclipse in Eclipse itself at PartServiceImpl.internalFixContext

I have a problem about eclipse IDE, I can't open any file in my work space; if I try to open file, eclipse will alert the following error dialog
"An error has occurred. See error log for more details. java.lang.NullPointerException"
I go to see .log file in .meta at workspace and I see a paragraph in the file like this:
!ENTRY org.eclipse.jface 4 2 2557-04-09 11:40:49.422
!MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.jface".
!STACK 0
java.lang.NullPointerException
at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.internalFixContext(PartServiceImpl.java:380)
at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.bringToTop(PartServiceImpl.java:341)
at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.showPart(PartServiceImpl.java:1029)
at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:3047)
at org.eclipse.ui.internal.WorkbenchPage.access$22(WorkbenchPage.java:2969)
at org.eclipse.ui.internal.WorkbenchPage$8.run(WorkbenchPage.java:2951)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2947)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2911)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2902)
at org.eclipse.ui.ide.IDE.openEditor(IDE.java:655)
at org.eclipse.ui.ide.IDE.openEditor(IDE.java:614)
at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:360)
at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:167)
at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:249)
at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:228)
at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun(SelectionDispatchAction.java:275)
at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run(SelectionDispatchAction.java:251)
at org.eclipse.jdt.internal.ui.packageview.PackageExplorerActionGroup.handleOpen(PackageExplorerActionGroup.java:376)
at org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart$4.open(PackageExplorerPart.java:538)
at org.eclipse.ui.OpenAndLinkWithEditorHelper$InternalListener.open(OpenAndLinkWithEditorHelper.java:48)
at org.eclipse.jface.viewers.StructuredViewer$2.run(StructuredViewer.java:866)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49)
at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
at org.eclipse.jface.viewers.StructuredViewer.fireOpen(StructuredViewer.java:864)
at org.eclipse.jface.viewers.StructuredViewer.handleOpen(StructuredViewer.java:1152)
at org.eclipse.jface.viewers.StructuredViewer$6.handleOpen(StructuredViewer.java:1256)
at org.eclipse.jface.util.OpenStrategy.fireOpenEvent(OpenStrategy.java:275)
at org.eclipse.jface.util.OpenStrategy.access$2(OpenStrategy.java:269)
at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:309)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4169)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3758)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1053)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:942)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:86)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:588)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:543)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
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:353)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
at org.eclipse.equinox.launcher.Main.main(Main.java:1414)
How can I solve this problem - any idea?
There is a bug filed for Eclipse:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=385680
You could try restarting Eclipse, it helped the original poster of the issue there.
Better you update your eclipse by clicking it on help >> check for updates, also you can start eclipse by entering command in command prompt eclipse -clean.
Hope this will help you.
I have also encountered this error . Just i opened the new window ie Window -> New Window in eclipse .Then , I closed my old window. This solved my problem.
hi,that maybe the project's problem,
chose the project and setting you eclipse:
project -> clean...
After exiting eclipse I moved .eclipse (found in the user's home directory) to .eclipse.old (just in case I may have had to undo). The error does not show up any more and my projects are working fine after restarting eclipse.
Caution: I have a simple setup and this may not be the best for environments with advanced settings.
I am posting this as a separate answer as previously listed methods did not work for me.
I faced the same error, but only with files cloned from git that were assigned to a proprietary plugin.
I realized that even after cloning the files from git, I needed to create a new project or import a project in eclipse and this resolved the error.

Eclipse: Installation of a set of Plugins from the command line -> DefaultProfile is not current. Expected timestamp

We are trying to install a set of eclipse plugins from the commandline.
For this we are using the General command: [1]
The command works most of the times perfect.
But for some plugins we get a similar error: [2]
The only difference is the timestamp.
As a result the plugins could not be installed from the command line. When installing the plugin in the UI everything is working.
Any idea what is causing the error [2]. Might this be an issue with the Installation sequence? How can we set the Defaultprofile
Thanks for a hint.
Best Regards
Frank
[1]
eclipsec.exe
-application org.eclipse.equinox.p2.director -repository -installIU -destination C:/developmenttools/JDT/4.3/eclipse -profile DefaultProfile -followReferences
[2]
!MESSAGE Application error
!STACK 1
java.lang.IllegalStateException: Profile DefaultProfile is not current. Expected timestamp 1392631752387 but was 1392631752387.
at org.eclipse.equinox.internal.p2.engine.SimpleProfileRegistry.lockProfile(SimpleProfileRegistry.java:819)
at org.eclipse.equinox.internal.p2.engine.Engine.perform(Engine.java:67)
at org.eclipse.equinox.internal.p2.engine.Engine.perform(Engine.java:44)
at org.eclipse.equinox.internal.provisional.p2.director.PlanExecutionHelper.executePlan(PlanExecutionHelper.java:31)
at org.eclipse.equinox.internal.provisional.p2.director.PlanExecutionHelper.executePlan(PlanExecutionHelper.java:23)
at org.eclipse.equinox.internal.p2.director.app.DirectorApplication.executePlan(DirectorApplication.java:783)
at org.eclipse.equinox.internal.p2.director.app.DirectorApplication.planAndExecute(DirectorApplication.java:776)
at org.eclipse.equinox.internal.p2.director.app.DirectorApplication.performProvisioningActions(DirectorApplication.java:763)
at org.eclipse.equinox.internal.p2.director.app.DirectorApplication.run(DirectorApplication.java:1063)
at org.eclipse.equinox.internal.p2.director.app.DirectorApplication.start(DirectorApplication.java:1245)
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:354)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:181)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:636)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)
at org.eclipse.equinox.launcher.Main.run(Main.java:1450)
at org.eclipse.equinox.launcher.Main.main(Main.java:1426)
This sounds like Eclipse bug 392818. Comments in the bug report say:
Not sure if this can be considered a bug; the guide for installing
software using the p2 director application (1) states that if you want
to run the provisioning operation from within the target you're
provisioning into you're not supposed to use the -destination
argument.
The problem you're facing most likely stems from the fact that you're
trying to modify the platform while it is running. The -destination
flag assumes that the target you're provisioning into is not started.
(1)
http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse.platform.doc.isv/guide/p2_director.html
- "Running inside the target application" section.

Notes 9 rcp / IBM SBT SDK: How to get the endpoint correctly

I am currently developing an Notes 9 rcp plugin (using Eclipse, the Expeditor Toolkit and the SBT SDK java framework) for connecting to IBM Connections.
I first wrote a standard Java application to test the code (here: getting some blogs and manipulate them, using the SBT SDK) which works fine.
But if I use the code inside the plugin, I get an SBTException, that the endpoint wasn't found. So I wonder what I have to change in order to make it work.
I put the managed-bean.xml into the META-INF folder inside the plugin and configured the build properties accordingly. For testing purposes I hardcoded the configuration values in the XML in order to not have to deal with the location of the sbt.properties file.
I also tried to add another META-INF folder inside the src folder and put the managed-bean.xml there.
Creating new Service
RuntimeFactory: com.ibm.commons.runtime.impl.app.RuntimeFactoryStandalone#68c268c2
Application: com.ibm.commons.runtime.impl.app.ApplicationStandalone#19361936
Context: com.ibm.commons.runtime.impl.app.ContextStandalone#3fd83fd8
true
Fetching endpoint 'connections'
com.ibm.sbt.util.SBTException: Cannot find Endpoint connections
at com.ibm.sbt.services.endpoints.EndpointFactory.getEndpoint(EndpointFactory.java:60)
at com.ibm.sbt.services.endpoints.EndpointFactory.getEndpoint(EndpointFactory.java:52)
at de.myapp.service.SbtConnectorService.<init>(SbtConnectorService.java:28)
at de.myapp.service.SbtProfileConnectorService.<init>(SbtProfileConnectorService.java:30)
at de.myapp.menu.handler.ToConnectionsBlogMenuHandler.execute(ToConnectionsBlogMenuHandler.java:90)
at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:281)
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.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:247)
at org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:247)
at org.eclipse.ui.menus.CommandContributionItem.handleWidgetSelection(CommandContributionItem.java:619)
at org.eclipse.ui.menus.CommandContributionItem.access$10(CommandContributionItem.java:605)
at org.eclipse.ui.menus.CommandContributionItem$4.handleEvent(CommandContributionItem.java:595)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4166)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3755)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2384)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2348)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2200)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:495)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:288)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:490)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at com.ibm.rcp.personality.framework.internal.RCPApplication.run(RCPApplication.java:67)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:611)
at org.eclipse.equinox.internal.app.EclipseAppContainer.callMethodWithException(EclipseAppContainer.java:574)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:195)
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:386)
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:60)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:611)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:549)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
at org.eclipse.equinox.launcher.Main.run(Main.java:1236)
at org.eclipse.equinox.launcher.Main.main(Main.java:1212)
Cannot find Endpoint connections
I wonder if I have to use other implementations for RuntimeFactory, Application and Context?
Any pointers / ideas are greatly appreciated.
Thanks in advance.

Categories

Resources