Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Problem opening a file in the RCP application
Problem opening a file in the RCP application [message #460685] Thu, 28 December 2006 10:19 Go to next message
krishna is currently offline krishnaFriend
Messages: 48
Registered: July 2009
Member
I tried to open a file by adding my own action, SampleAction to a toolbar. I
used the OpenExternalFileAction.java
( http://www.koders.com/java/fid513463C78735A056B09498429C20BA FB6B4307AF.aspx)code.
This is the same code that Eclipse uses to perform the same action of
opening a file. When I run the application the SampleAction code seems to
stop running at

IFileStore fileStore= EFS.getLocalFileSystem().getStore(new
Path(fFilterPath));

Need any solution regarding this issue.

Thanks in advance!!

Regards,
Krishna
Re: Problem opening a file in the RCP application [message #460702 is a reply to message #460685] Thu, 28 December 2006 16:07 Go to previous messageGo to next message
Charlie Kelly is currently offline Charlie KellyFriend
Messages: 276
Registered: July 2009
Senior Member
Hi Krishna,

If your code does not throw an Exception, is there a message in the
Eclipse log file?

Are you including org.eclipse.core.filesystem (and its counter-part for
your operating system) with your application?

Charlie

krishna wrote:
> I tried to open a file by adding my own action, SampleAction to a toolbar. I
> used the OpenExternalFileAction.java
> ( http://www.koders.com/java/fid513463C78735A056B09498429C20BA FB6B4307AF.aspx)code.
> This is the same code that Eclipse uses to perform the same action of
> opening a file. When I run the application the SampleAction code seems to
> stop running at
>
> IFileStore fileStore= EFS.getLocalFileSystem().getStore(new
> Path(fFilterPath));
>
> Need any solution regarding this issue.
>
> Thanks in advance!!
>
> Regards,
> Krishna
>
>
Re: Problem opening a file in the RCP application [message #460704 is a reply to message #460702] Thu, 28 December 2006 17:30 Go to previous messageGo to next message
krishna is currently offline krishnaFriend
Messages: 48
Registered: July 2009
Member
Hi,

Thanks Charle!!

I tried including the following jars and runing the application.

1. org.eclipse.core.filesystem.win32.x86_1.0.0.v20060603.jar
2. org.eclipse.core.filesystem_1.0.0.v20060603.jar

But it still gives me the following error in the log file.

!SESSION 2006-12-28
22:52:35.855 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.5.0_08
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
Framework arguments: -application
com.cisco.nm.cmp.client.ui.workbench.app -pdelaunch
Command-line arguments: -application
com.cisco.nm.cmp.client.ui.workbench.app -data C:\Eclipse Workspaces\View
try out/../runtime-EclipseApplication -dev file:C:/Eclipse Workspaces/View
try out/.metadata/.plugins/org.eclipse.pde.core/Application with Config
Archive/dev.properties -pdelaunch -os win32 -ws win32 -arch x86

!ENTRY org.eclipse.ui 4 4 2006-12-28 22:52:40.621
!MESSAGE Invalid Menu Extension (Path is invalid):
convertToWebModuleTypeAction

!ENTRY org.eclipse.ui 4 4 2006-12-28 22:52:40.668
!MESSAGE Invalid Menu Extension (Path is invalid):
org.eclipse.ui.edit.text.gotoLastEditPosition

!ENTRY org.eclipse.ui 4 4 2006-12-28 22:52:40.933
!MESSAGE Invalid Menu Extension (Path is invalid):
org.jboss.ide.eclipse.packaging.ui.actions.PackagingRunActio n

!ENTRY org.eclipse.ui 4 4 2006-12-28 22:52:41.136
!MESSAGE Invalid Menu Extension (Path is invalid):
org.jboss.ide.eclipse.xdoclet.run.ui.actions.XDocletRunActio n

!ENTRY org.eclipse.osgi 2 1 2006-12-28 22:52:42.183
!MESSAGE NLS missing message: EventLogCategory in:
org.jboss.ide.eclipse.as.ui.Messages

!ENTRY org.eclipse.osgi 2 1 2006-12-28 22:52:42.183
!MESSAGE NLS missing message: HidePropertiesAction in:
org.jboss.ide.eclipse.as.ui.Messages

!ENTRY org.eclipse.osgi 2 1 2006-12-28 22:52:42.183
!MESSAGE NLS missing message: HideTextAction in:
org.jboss.ide.eclipse.as.ui.Messages

!ENTRY org.eclipse.osgi 2 1 2006-12-28 22:52:42.183
!MESSAGE NLS missing message: HideLowerFrameAction in:
org.jboss.ide.eclipse.as.ui.Messages

!ENTRY org.eclipse.ui 4 4 2006-12-28 22:52:55.027
!MESSAGE Unhandled event loop exception

!ENTRY org.eclipse.ui 4 0 2006-12-28 22:52:55.027
!MESSAGE org/eclipse/core/filesystem/EFS
!STACK 0
java.lang.NoClassDefFoundError: org/eclipse/core/filesystem/EFS
at
com.cisco.nm.cmp.ems.ems_configarchive_gui.actions.SampleAct ion.run(SampleAction.java:326)
at
com.cisco.nm.cmp.ems.ems_configarchive_gui.actions.SampleAct ion.run(SampleAction.java:299)
at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginActi on.java:254)
at
org.eclipse.ui.internal.WWinPluginAction.runWithEvent(WWinPl uginAction.java:229)
at
org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(ActionContributionItem.java:539)
at
org.eclipse.jface.action.ActionContributionItem.access$2(Act ionContributionItem.java:488)
at
org.eclipse.jface.action.ActionContributionItem$6.handleEven t(ActionContributionItem.java:441)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3348)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2968)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1914)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1878)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:419)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
at
com.cisco.nm.cmp.client.ui.workbench.rcp.CMPApplication.run( CMPApplication.java:49)
at
org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.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(EclipseS tarter.java:400)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.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)


Thanks in advance!!

Regards,
Krishna



"Charle Kelly" <Eclipse@CharlieKelly.com> wrote in message
news:en0q3t$2iq$1@utils.eclipse.org...
> Hi Krishna,
>
> If your code does not throw an Exception, is there a message in the
> Eclipse log file?
>
> Are you including org.eclipse.core.filesystem (and its counter-part for
> your operating system) with your application?
>
> Charlie
>
> krishna wrote:
>> I tried to open a file by adding my own action, SampleAction to a
>> toolbar. I used the OpenExternalFileAction.java
>> ( http://www.koders.com/java/fid513463C78735A056B09498429C20BA FB6B4307AF.aspx)code.
>> This is the same code that Eclipse uses to perform the same action of
>> opening a file. When I run the application the SampleAction code seems to
>> stop running at
>>
>> IFileStore fileStore= EFS.getLocalFileSystem().getStore(new
>> Path(fFilterPath));
>>
>> Need any solution regarding this issue.
>>
>> Thanks in advance!!
>>
>> Regards,
>> Krishna
Re: Problem opening a file in the RCP application [message #460705 is a reply to message #460704] Thu, 28 December 2006 18:02 Go to previous messageGo to next message
Charlie Kelly is currently offline Charlie KellyFriend
Messages: 276
Registered: July 2009
Senior Member
Hi Krishna,

Are you using JBossIDE version 1.6 or 2.0 (1.6 uses Eclipse 3.1 libraries).

You might try inserting Class.forName (...) for
org/eclipse/core/filesystem/EFS
in the SampleAction.run() method.

This would distinguish between a ClassDef error and a "path" error.

Charlie


krishna wrote:
> Hi,
>
> Thanks Charle!!
>
> I tried including the following jars and runing the application.
>
> 1. org.eclipse.core.filesystem.win32.x86_1.0.0.v20060603.jar
> 2. org.eclipse.core.filesystem_1.0.0.v20060603.jar
>
> But it still gives me the following error in the log file.
>
> !SESSION 2006-12-28
> 22:52:35.855 -----------------------------------------------
> eclipse.buildId=unknown
> java.version=1.5.0_08
> java.vendor=Sun Microsystems Inc.
> BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
> Framework arguments: -application
> com.cisco.nm.cmp.client.ui.workbench.app -pdelaunch
> Command-line arguments: -application
> com.cisco.nm.cmp.client.ui.workbench.app -data C:\Eclipse Workspaces\View
> try out/../runtime-EclipseApplication -dev file:C:/Eclipse Workspaces/View
> try out/.metadata/.plugins/org.eclipse.pde.core/Application with Config
> Archive/dev.properties -pdelaunch -os win32 -ws win32 -arch x86
>
> !ENTRY org.eclipse.ui 4 4 2006-12-28 22:52:40.621
> !MESSAGE Invalid Menu Extension (Path is invalid):
> convertToWebModuleTypeAction
>
> !ENTRY org.eclipse.ui 4 4 2006-12-28 22:52:40.668
> !MESSAGE Invalid Menu Extension (Path is invalid):
> org.eclipse.ui.edit.text.gotoLastEditPosition
>
> !ENTRY org.eclipse.ui 4 4 2006-12-28 22:52:40.933
> !MESSAGE Invalid Menu Extension (Path is invalid):
> org.jboss.ide.eclipse.packaging.ui.actions.PackagingRunActio n
>
> !ENTRY org.eclipse.ui 4 4 2006-12-28 22:52:41.136
> !MESSAGE Invalid Menu Extension (Path is invalid):
> org.jboss.ide.eclipse.xdoclet.run.ui.actions.XDocletRunActio n
>
> !ENTRY org.eclipse.osgi 2 1 2006-12-28 22:52:42.183
> !MESSAGE NLS missing message: EventLogCategory in:
> org.jboss.ide.eclipse.as.ui.Messages
>
> !ENTRY org.eclipse.osgi 2 1 2006-12-28 22:52:42.183
> !MESSAGE NLS missing message: HidePropertiesAction in:
> org.jboss.ide.eclipse.as.ui.Messages
>
> !ENTRY org.eclipse.osgi 2 1 2006-12-28 22:52:42.183
> !MESSAGE NLS missing message: HideTextAction in:
> org.jboss.ide.eclipse.as.ui.Messages
>
> !ENTRY org.eclipse.osgi 2 1 2006-12-28 22:52:42.183
> !MESSAGE NLS missing message: HideLowerFrameAction in:
> org.jboss.ide.eclipse.as.ui.Messages
>
> !ENTRY org.eclipse.ui 4 4 2006-12-28 22:52:55.027
> !MESSAGE Unhandled event loop exception
>
> !ENTRY org.eclipse.ui 4 0 2006-12-28 22:52:55.027
> !MESSAGE org/eclipse/core/filesystem/EFS
> !STACK 0
> java.lang.NoClassDefFoundError: org/eclipse/core/filesystem/EFS
> at
> com.cisco.nm.cmp.ems.ems_configarchive_gui.actions.SampleAct ion.run(SampleAction.java:326)
> at
> com.cisco.nm.cmp.ems.ems_configarchive_gui.actions.SampleAct ion.run(SampleAction.java:299)
> at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginActi on.java:254)
> at
> org.eclipse.ui.internal.WWinPluginAction.runWithEvent(WWinPl uginAction.java:229)
> at
> org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(ActionContributionItem.java:539)
> at
> org.eclipse.jface.action.ActionContributionItem.access$2(Act ionContributionItem.java:488)
> at
> org.eclipse.jface.action.ActionContributionItem$6.handleEven t(ActionContributionItem.java:441)
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928)
> at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3348)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2968)
> at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1914)
> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1878)
> at
> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:419)
> at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
> at
> com.cisco.nm.cmp.client.ui.workbench.rcp.CMPApplication.run( CMPApplication.java:49)
> at
> org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.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(EclipseS tarter.java:400)
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.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)
>
>
> Thanks in advance!!
>
> Regards,
> Krishna
>
>
>
> "Charle Kelly" <Eclipse@CharlieKelly.com> wrote in message
> news:en0q3t$2iq$1@utils.eclipse.org...
>
>>Hi Krishna,
>>
>>If your code does not throw an Exception, is there a message in the
>>Eclipse log file?
>>
>>Are you including org.eclipse.core.filesystem (and its counter-part for
>>your operating system) with your application?
>>
>>Charlie
>>
>>krishna wrote:
>>
>>>I tried to open a file by adding my own action, SampleAction to a
>>>toolbar. I used the OpenExternalFileAction.java
>>>( http://www.koders.com/java/fid513463C78735A056B09498429C20BA FB6B4307AF.aspx)code.
>>>This is the same code that Eclipse uses to perform the same action of
>>>opening a file. When I run the application the SampleAction code seems to
>>>stop running at
>>>
>>>IFileStore fileStore= EFS.getLocalFileSystem().getStore(new
>>>Path(fFilterPath));
>>>
>>>Need any solution regarding this issue.
>>>
>>>Thanks in advance!!
>>>
>>>Regards,
>>>Krishna
>
>
>
Re: Problem opening a file in the RCP application [message #460715 is a reply to message #460704] Thu, 28 December 2006 22:59 Go to previous messageGo to next message
Alex Blewitt is currently offline Alex BlewittFriend
Messages: 946
Registered: July 2009
Senior Member
And, of course, you have also included org.eclipse.core.runtime, upon which some of these things depend?

Alex.
Re: Problem opening a file in the RCP application [message #460770 is a reply to message #460715] Fri, 29 December 2006 06:07 Go to previous messageGo to next message
krishna is currently offline krishnaFriend
Messages: 48
Registered: July 2009
Member
Hi Alex,

Yes I have included org.eclipse.core.runtime .

Thanks,
Krishna
Re: Problem opening a file in the RCP application [message #460772 is a reply to message #460705] Fri, 29 December 2006 06:20 Go to previous messageGo to next message
krishna is currently offline krishnaFriend
Messages: 48
Registered: July 2009
Member
Hi Charle,

Thanks for replying!!

I am using JBoss IDE Version 2.0 (Build Id 2.0.0.Beta2)

I tried using Class.forName().

Class efs = null;
try {
efs = Class.forName("EFS");

} catch (ClassNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}

try {
ifile = (IFile)((EFS)
efs.newInstance()).getLocalFileSystem().getStore(new Path(path));

} catch (InstantiationException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IllegalAccessException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}


When I try to run the app now it gives me an chosen operation not
currently available dialog. The following exception is thrown in the log
file.

!ENTRY org.eclipse.ui 4 4 2006-12-29 11:19:02.125
!MESSAGE Internal plug-in action delegate error on creation.
!STACK 0
java.lang.NoClassDefFoundError: org/eclipse/core/filesystem/EFS
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
at java.lang.Class.getConstructor0(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at
org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI .createExecutableExtension(RegistryStrategyOSGI.java:157)
at
org.eclipse.core.internal.registry.ExtensionRegistry.createE xecutableExtension(ExtensionRegistry.java:759)
at
org.eclipse.core.internal.registry.ConfigurationElement.crea teExecutableExtension(ConfigurationElement.java:243)
at
org.eclipse.core.internal.registry.ConfigurationElementHandl e.createExecutableExtension(ConfigurationElementHandle.java: 51)
at org.eclipse.ui.internal.WorkbenchPlugin$1.run(WorkbenchPlugi n.java:242)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:67)
at
org.eclipse.ui.internal.WorkbenchPlugin.createExtension(Work benchPlugin.java:238)
at
org.eclipse.ui.internal.PluginAction.createDelegate(PluginAc tion.java:120)
at
org.eclipse.ui.internal.PluginAction.runWithEvent(PluginActi on.java:225)
at
org.eclipse.ui.internal.WWinPluginAction.runWithEvent(WWinPl uginAction.java:229)
at
org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(ActionContributionItem.java:539)
at
org.eclipse.jface.action.ActionContributionItem.access$2(Act ionContributionItem.java:488)
at
org.eclipse.jface.action.ActionContributionItem$6.handleEven t(ActionContributionItem.java:441)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3348)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2968)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1914)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1878)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:419)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
at
com.cisco.nm.cmp.client.ui.workbench.rcp.CMPApplication.run( CMPApplication.java:49)
at
org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.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(EclipseS tarter.java:400)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.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)

Thanks in advance!!

Regards,
Krishna
Re: Problem opening a file in the RCP application [message #460819 is a reply to message #460704] Fri, 29 December 2006 19:10 Go to previous message
Eclipse UserFriend
Originally posted by: krishna.kamath.gmail.com

Hi,

I had added the required files in my build path rather than in
dependencies.

I am now able to solve the problem.

Thanks Charle and Alex... :)

Regards,
Krishna
Previous Topic:Activator stop(): call super first or last?
Next Topic:MessageConsole NoClassDefFoundError
Goto Forum:
  


Current Time: Tue Apr 23 09:27:56 GMT 2024

Powered by FUDForum. Page generated in 0.04580 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top