You are not logged in.

Dear visitor, welcome to Palo Community Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

tk2001

Intermediate

  • "tk2001" started this thread

Posts: 8

Date of registration: May 3rd 2007

  • Send private message

1

Tuesday, July 10th 2007, 2:25am

PaloClient - source code

Hello,

I'm trying to play around with the source code for the PaloClient and adjust it a little to my needs, eg. putting in some diagrams and table-grafics and adding an import dialog for my specific data.

So I imported the project into eclipse. One problem is that most sourcefiles in palo.palomodeler try to import stuff from com.tensegrity (like genereric, graph, gui,..) which is cannot be imported. Where can I get this library? I dont know, if I need the modeler anyway...can the client be run without it?

Also I don't really know how to get the client running from the source code...can it be activated through the eclipse run command?

Can someone give me a little hint, where to start? I don't want a complete tutorial for eclipse plugins (though that might be helpfull too ;) ) ..I just need some tips on how to get started.


regards
tk

This post has been edited 2 times, last edit by "tk2001" (Jul 10th 2007, 2:26am)


arnd

Master

Posts: 73

Date of registration: Sep 6th 2006

  • Send private message

2

Tuesday, July 10th 2007, 12:25pm

Hi tk,

yes, the palo modeler is optional. The client will work without it.


Regards,

arnd

tk2001

Intermediate

  • "tk2001" started this thread

Posts: 8

Date of registration: May 3rd 2007

  • Send private message

3

Saturday, July 14th 2007, 5:46pm

Ok...that is good to know =)

I still need some advice on how to get the plugin started from the source code..

Here's what I did:
I created a new project from the source code, deleted the palomodeller folder and converted the project to a plugin project. In the resulting plugin-manifest I put in PalorcpPlugin as the activator. But that don't seem to work, when I click "Launch an Eclipse application" it starts a new Eclipse window allright, but with no signs of the plugin.

Is this at least the right approach or am I totally wrong here?

I also tried to import the source code with "import" feature of eclipse or tried to create "Plugin from existing JARs" but that didn't work either :(

Any hint, where I'm wrong or how I could get started is highly appreciated!

regards
tk

philipp

Professional

Posts: 31

Date of registration: Jul 16th 2007

Location: Düren, Germany

Occupation: Software Developer

  • Send private message

4

Monday, July 16th 2007, 2:07pm

Hi,

in order to run the client as a plug-in, you will have to set-up a run configuration as follows:

Create a new Eclipse Application runtime (Run/Run..., right click on Eclipse Application, select new).
As running product, select org.eclipse.sdk.ide
leave the arguments blank (or optionally add anything you need, like i18n settings, a clean build or more heap space)
Select all required plug-ins in the Plug-Ins tab (click on com.tensegrity.palobrowser then on add required plug-ins; click on Validate Plug-in Set to be on the safe side and add all missing plug-ins if there are any).

This should do the trick.
Be sure to open the "Palo Perspective" in the spawned Eclipse environment.

Hth,
Philipp

This post has been edited 1 times, last edit by "philipp" (Jul 16th 2007, 2:08pm)


tk2001

Intermediate

  • "tk2001" started this thread

Posts: 8

Date of registration: May 3rd 2007

  • Send private message

5

Tuesday, July 17th 2007, 12:39am

Hello Philipp,

thank you for your answer! I'm afraid it won't help me much with my problem though.

As far as I understand this will start the client from the existing plugin.

My problem is to start the plugin (or RCP, I don't mind) from the source code (which is provided with the download)...I want to try and add some little features to the existing client.

When I take the steps you described above, the plugin is loaded into eclipse, but not from the sources. Or did I possibly miss some step?

regards
tk

philipp

Professional

Posts: 31

Date of registration: Jul 16th 2007

Location: Düren, Germany

Occupation: Software Developer

  • Send private message

6

Tuesday, July 17th 2007, 9:10am

Hello tk,

I followed your description and imported the projects "palobrowser", "paloadmin", and "palorcp" into a new workspace -- and when I started it, the plug-in did not appear.

Why? Because the plugin.xml files are missing... They should be in the src-folder to begin with, but you can help yourself by extracting the plugin.xml file (and the meta-inf directory and the icons directory) from the jar-files in the plugin-directory that came with the download.

In order to extract the files, copy the "com.tensegrity.palobrowser_1.5.0.0352.jar" to "com.tensegrity.palobrowser.zip" and extract the needed files into your source-directory of the palobrowser.
Do the same for the admin and rcp plugins and you are good.
Note that you might need to alter the manifest file a little, because it references the palo.api source. Simply remove the offending line (it will be marked as erroneous in eclipse) and add the paloapi.jar as an external jar file.

When you now fire up your run configuration, the plug-in is visible.

Regards,
Philipp

nick

Trainee

Posts: 2

Date of registration: Aug 3rd 2007

  • Send private message

7

Wednesday, August 8th 2007, 1:12am

I can not get the client-plugin to work from source. Please can you help me to get client run?

I try steps in this thread:

I take /src/ folder from palo-client, delete /src/palomodeler, copy everything but /com/ from the jars (now zip) to /src/paloadim/, /src/palobrowser/ and to /src/palorcp/.

Now I make new workspace in eclipse, make new->javaproject, select "create project from existing source" and select /src/paloadmin, do same for palobrowser and palorcp. Then do PDETools-> convert projects to plug-in-project for the three.

Next add paloapi.jar for external jar to all three projects. Remove entry for paloapi from manifest.mf for paloadmin and palobrowser (no such entry in palorcp). Still problems in paloadmin, can not find plug-in palobrowser?! Hm, palobroser is good now, no problems here.

Go Run->open Run Dialog..., make new eclipse-application, in arguments is line "-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl}"?! Leave it there. Select "pug-ins selected below only" and take palobrowser, do add required plug-ins and validate...no problems.

Run. New Eclipse starts, gives error:

Source code

1
2
Error creating the view.
An error occurred while automatically activating bundle com.tensegrity.palobrowser (4).


When I try to open a paloview (Palo Database Explorer maybe) I get a looong error:

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter$TerminatingClassNotFoundException: An error occurred while automatically activating bundle com.tensegrity.palobrowser (4).
	at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:125)
	at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:417)
	at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:189)
	at org.eclipse.osgi.framework.internal.core.BundleLoader.findLocalClass(BundleLoader.java:340)
	at org.eclipse.osgi.framework.internal.core.BundleLoader.findClassInternal(BundleLoader.java:408)
	at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:369)
	at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:357)
	at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:83)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at org.eclipse.osgi.framework.internal.core.BundleLoader.loadClass(BundleLoader.java:289)
	at org.eclipse.osgi.framework.internal.core.BundleHost.loadClass(BundleHost.java:227)
	at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadClass(AbstractBundle.java:1269)
	at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:160)
	at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:788)
	at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243)
	at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:51)
	at org.eclipse.ui.internal.WorkbenchPlugin$1.run(WorkbenchPlugin.java:243)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:67)
	at org.eclipse.ui.internal.WorkbenchPlugin.createExtension(WorkbenchPlugin.java:239)
	at org.eclipse.ui.internal.registry.ViewDescriptor.createView(ViewDescriptor.java:69)
	at org.eclipse.ui.internal.ViewReference.createPartHelper(ViewReference.java:327)
	at org.eclipse.ui.internal.ViewReference.createPart(ViewReference.java:227)
	at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:592)
	at org.eclipse.ui.internal.Perspective.showView(Perspective.java:2077)
	at org.eclipse.ui.internal.WorkbenchPage.busyShowView(WorkbenchPage.java:1018)
	at org.eclipse.ui.internal.WorkbenchPage.access$18(WorkbenchPage.java:999)
	at org.eclipse.ui.internal.WorkbenchPage$19.run(WorkbenchPage.java:3666)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:67)
	at org.eclipse.ui.internal.WorkbenchPage.showView(WorkbenchPage.java:3663)
	at org.eclipse.ui.internal.WorkbenchPage.showView(WorkbenchPage.java:3639)
	at org.eclipse.ui.handlers.ShowViewHandler.openView(ShowViewHandler.java:165)
	at org.eclipse.ui.handlers.ShowViewHandler.openOther(ShowViewHandler.java:109)
	at org.eclipse.ui.handlers.ShowViewHandler.execute(ShowViewHandler.java:77)
	at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:239)
	at org.eclipse.core.commands.Command.executeWithChecks(Command.java:475)
	at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:429)
	at org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:165)
	at org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:247)
	at org.eclipse.ui.internal.ShowViewMenu$3.run(ShowViewMenu.java:128)
	at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:545)
	at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:490)
	at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:402)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3682)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3293)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2389)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2219)
	at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:461)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:106)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:153)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176)
	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:504)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:443)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1169)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1144)
Caused by: org.osgi.framework.BundleException: Exception in com.tensegrity.palobrowser.PalobrowserPlugin.start() of bundle com.tensegrity.palobrowser.
	at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:1018)
	at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:974)
	at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:346)
	at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:260)
	at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:400)
	at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:111)
	... 67 more
Caused by: java.lang.ExceptionInInitializerError
	at com.tensegrity.palobrowser.PalobrowserPlugin.start(PalobrowserPlugin.java:64)
	at org.eclipse.osgi.framework.internal.core.BundleContextImpl$2.run(BundleContextImpl.java:999)
	at java.security.AccessController.doPrivileged(Native Method)
	at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:993)
	... 72 more
Caused by: java.util.MissingResourceException: Can't find bundle for base name com.tensegrity.palobrowser.PaloBrowserMessages, locale de_DE
	at java.util.ResourceBundle.throwMissingResourceException(Unknown Source)
	at java.util.ResourceBundle.getBundleImpl(Unknown Source)
	at java.util.ResourceBundle.getBundle(Unknown Source)
	at com.tensegrity.palobrowser.PaloBrowserMessages.<clinit>(PaloBrowserMessages.java:25)
	... 76 more
Caused by: java.lang.ClassCastException: com.tensegrity.palobrowser.PaloBrowserMessages cannot be cast to ResourceBundle
	at java.util.ResourceBundle$Control.newBundle(Unknown Source)
	at java.util.ResourceBundle.loadBundle(Unknown Source)
	at java.util.ResourceBundle.findBundle(Unknown Source)
	at java.util.ResourceBundle.findBundle(Unknown Source)
	at java.util.ResourceBundle.findBundle(Unknown Source)
	... 79 more


Similar errors for other palo-views. What am I doing wrong?

Maybe someone can describe steps again, and say what to do different, please.

regards
Nick

This post has been edited 1 times, last edit by "nick" (Aug 8th 2007, 1:15am)


arnd

Master

Posts: 73

Date of registration: Sep 6th 2006

  • Send private message

8

Wednesday, August 8th 2007, 2:46pm

Hi Nick,

here are my settings for running palo-plugin from source using eclipse3.2.
I assume you have all required palo projects with source, namely palo, paloapi and palobrowser (at least). In the run-target I use following setting:
on tab Main choose run a product (org.eclipse.sdk.ui)
on tab Plug-Ins select "choose plung ins and fragments...". Select palobrowser only and press button "add required plugins". I think you have to add org.eclipse.sdk and org.eclipse.ui.ide(.workbench) manually and don't forget to press button "add required plugins" again. To check that you have all required plugins press "Validate Plugin Set"...
The settings on the other tabs should remain as they are.
Now hit run or debug button and it should start up.


Regards,

arnd

nick

Trainee

Posts: 2

Date of registration: Aug 3rd 2007

  • Send private message

9

Wednesday, August 8th 2007, 7:33pm

Hello,

thank you for responding!

I try your description. I use also eclipse 3.2 (now), I don't take sources for palo and paloapi, only for palobrowser but I add paloapi as external jar into the buildpath for the browser.

I try every step form your answer,but when the new eclipse launches, it gives (new) error

Source code

1
Unable to create view: Plug-in com.tensegrity.palobrowser was unable to load class com.tensegrity.palobrowser.views.DbExplorer.
under"details" it says:

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
java.lang.ClassNotFoundException: com.tensegrity.palobrowser.views.DbExplorer
	at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:402)
	at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:347)
	at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:83)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at org.eclipse.osgi.framework.internal.core.BundleLoader.loadClass(BundleLoader.java:278)
	at org.eclipse.osgi.framework.internal.core.BundleHost.loadClass(BundleHost.java:227)
	at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadClass(AbstractBundle.java:1245)
	at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:147)
	at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:759)
	at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243)
	at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:51)
	at org.eclipse.ui.internal.WorkbenchPlugin$1.run(WorkbenchPlugin.java:242)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:67)
	at org.eclipse.ui.internal.WorkbenchPlugin.createExtension(WorkbenchPlugin.java:238)
	at org.eclipse.ui.internal.registry.ViewDescriptor.createView(ViewDescriptor.java:69)
	at org.eclipse.ui.internal.ViewReference.createPartHelper(ViewReference.java:292)
	at org.eclipse.ui.internal.ViewReference.createPart(ViewReference.java:197)
	at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:566)
	at org.eclipse.ui.internal.WorkbenchPage$ActivationList.setActive(WorkbenchPage.java:3915)
	at org.eclipse.ui.internal.WorkbenchPage.restoreState(WorkbenchPage.java:2929)
	at org.eclipse.ui.internal.WorkbenchWindow.restoreState(WorkbenchWindow.java:1936)
	at org.eclipse.ui.internal.Workbench.doRestoreState(Workbench.java:2873)
	at org.eclipse.ui.internal.Workbench.restoreState(Workbench.java:1681)
	at org.eclipse.ui.internal.Workbench.access$12(Workbench.java:1666)
	at org.eclipse.ui.internal.Workbench$18.run(Workbench.java:1545)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
	at org.eclipse.ui.internal.Workbench.restoreState(Workbench.java:1489)
	at org.eclipse.ui.internal.WorkbenchConfigurer.restoreState(WorkbenchConfigurer.java:183)
	at org.eclipse.ui.application.WorkbenchAdvisor.openWindows(WorkbenchAdvisor.java:702)
	at org.eclipse.ui.internal.Workbench.init(Workbench.java:1101)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1863)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:422)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:95)
	at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177)
	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.core.launcher.Main.invokeFramework(Main.java:336)
	at org.eclipse.core.launcher.Main.basicRun(Main.java:280)
	at org.eclipse.core.launcher.Main.run(Main.java:977)
	at org.eclipse.core.launcher.Main.main(Main.java:952)


What can this be? Thanks for helping!

regards
Nick

This post has been edited 1 times, last edit by "nick" (Aug 8th 2007, 7:34pm)


arnd

Master

Posts: 73

Date of registration: Sep 6th 2006

  • Send private message

10

Friday, August 10th 2007, 9:27am

Hi Nick,

the exception tells you that eclipse wasn't able to load class com.tensegrity.palobrowser.views.DbExplorer ;)
This class is part of the palo database explorer view. However, there could be many reasons which cause this exception. So please check:
- do you have complete source
- can you compile
- do you have resource files like plugin.xml
- do you have properly set your project settings (plugin-dependencies)
- ...

Regards,

arnd

tk2001

Intermediate

  • "tk2001" started this thread

Posts: 8

Date of registration: May 3rd 2007

  • Send private message

11

Monday, August 13th 2007, 12:48am

Hello,

@nick: I can't help you here since I didn't manage to get the plugin running from the sources yet myself. I didn't really have time to try because I had to do some other work recently.

I will go through the new descriptions in this thread (thanks to arnd and philipp ;) ) soon and see if it works for me. I will post an update then.

Concerning your last error-message: it seems like there's a problem with the bundleloader...but what do I know? Hint: little :( (arnd, philipp? :tongue: )

regards
tk

This post has been edited 2 times, last edit by "tk2001" (Aug 13th 2007, 12:51am)


Rate this thread