Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » RCP plugin using Java Comm API doesn't find javax/comm classes
RCP plugin using Java Comm API doesn't find javax/comm classes [message #203139] Fri, 27 February 2004 12:50 Go to next message
Eclipse UserFriend
Hello,

I'm developing a rich client platform plugin using eclipse M7.

I'm trying to use the Java Comm API from within the plugin.
I installed the comm.jar, win32comm.dll and the corresponding property file
in all possible JRE locations
on my computer (j2sdk1.4.2_03).

The SerialDemo Java Application delivered with the Java Comm API runs
(compiled and started as "normal" Java application
from the eclipse workspace).

When I run my plugin and try to instantiate a class extending a javax/comm
class, I get the appended log message.

Any ideas?

Greetings,

Bernd Hofner

!SESSION Feb 27, 2004
18:17:40.455 ---------------------------------------------

java.version=1.4.2_03

java.vendor=Sun Microsystems Inc.

BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_GB

Command-line arguments: -application ssi.profilstrasse.RcpApplication -data
D:\Eclipse-Workspace\ssi.profilstrasse.runtime-workspace -dev bin -debug
file:D:\Eclipse-Workspace\.metadata\.plugins\org.eclipse.pde .core\D__Eclipse-Workspace_ssi.profilstrasse.runtime-workspa ce/.options

!ENTRY org.eclipse.core.runtime 4 2 Feb 27, 2004 18:17:40.465

!MESSAGE Problems occurred when invoking code from plug-in:
"org.eclipse.core.runtime".

!STACK 0

java.lang.NoClassDefFoundError: javax/comm/SerialPortEventListener

at java.lang.ClassLoader.defineClass0(Native Method)

at java.lang.ClassLoader.defineClass(ClassLoader.java:537)

at
org.eclipse.osgi.framework.internal.defaultadaptor.DefaultCl assLoader.define
Class(DefaultClassLoader.java:298)

at
org.eclipse.core.runtime.adaptor.EclipseClassLoader.defineCl ass(EclipseClass
Loader.java:99)

at
org.eclipse.osgi.framework.internal.defaultadaptor.DefaultCl assLoader.findCl
assImpl(DefaultClassLoader.java:287)

at
org.eclipse.osgi.framework.internal.defaultadaptor.DefaultCl assLoader.findCl
ass(DefaultClassLoader.java:176)

at
org.eclipse.osgi.framework.adaptor.BundleClassLoader.findLoc alClass(BundleCl
assLoader.java:261)

at
org.eclipse.core.runtime.adaptor.EclipseClassLoader.findLoca lClass(EclipseCl
assLoader.java:73)

at
org.eclipse.osgi.framework.internal.core.BundleLoader.findLo calClass(BundleL
oader.java:326)

at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader
..java:357)

at
org.eclipse.osgi.framework.adaptor.BundleClassLoader.loadCla ss(BundleClassLo
ader.java:115)

at java.lang.ClassLoader.loadClass(ClassLoader.java:235)

at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302 )

at ssi.profilstrasse.clm.Clm.<init>(Clm.java:48)

at ssi.profilstrasse.clm.Clm.getInstance(Clm.java:30)

at ssi.profilstrasse.clm.views.TestView.createPartControl(TestV iew.java:50)

at org.eclipse.ui.internal.PartPane$1.run(PartPane.java:121)

at
org.eclipse.core.internal.runtime.InternalPlatform.run(Inter nalPlatform.java
:819)

at org.eclipse.core.runtime.Platform.run(Platform.java:493)

at org.eclipse.ui.internal.PartPane.createChildControl(PartPane .java:117)

at org.eclipse.ui.internal.ViewPane.createChildControl(ViewPane .java:256)

at org.eclipse.ui.internal.ViewFactory$1.run(ViewFactory.java:2 45)

at
org.eclipse.core.internal.runtime.InternalPlatform.run(Inter nalPlatform.java
:819)

at org.eclipse.core.runtime.Platform.run(Platform.java:493)

at org.eclipse.ui.internal.ViewFactory.busyRestoreView(ViewFact ory.java:174)

at org.eclipse.ui.internal.ViewFactory$2.run(ViewFactory.java:4 19)

at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:84)

at org.eclipse.ui.internal.ViewFactory.restoreView(ViewFactory. java:417)

at
org.eclipse.ui.internal.ViewFactory$ViewReference.getPart(Vi ewFactory.java:9
3)

at
org.eclipse.ui.internal.WorkbenchPage$1.propertyChange(Workb enchPage.java:13
4)

at org.eclipse.ui.internal.LayoutPart.setVisible(LayoutPart.jav a:236)

at org.eclipse.ui.internal.PartPane.setVisible(PartPane.java:38 6)

at
org.eclipse.ui.internal.WorkbenchPage.updateVisibility(Workb enchPage.java:27
23)

at org.eclipse.ui.internal.WorkbenchPage.onActivate(WorkbenchPa ge.java:1937)

at org.eclipse.ui.internal.WorkbenchWindow$6.run(WorkbenchWindo w.java:1824)

at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:84)

at
org.eclipse.ui.internal.WorkbenchWindow.setActivePage(Workbe nchWindow.java:1
811)

at
org.eclipse.ui.internal.WorkbenchWindow.busyOpenPage(Workben chWindow.java:58
9)

at org.eclipse.ui.internal.WorkbenchWindow$5.run(WorkbenchWindo w.java:1123)

at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:84)

at
org.eclipse.ui.internal.WorkbenchWindow.openPage(WorkbenchWi ndow.java:1120)

at
org.eclipse.ui.internal.Workbench.openFirstTimeWindow(Workbe nch.java:1186)

at org.eclipse.ui.internal.Workbench.init(Workbench.java:899)

at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1503)

at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:265)

at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:139)

at ssi.profilstrasse.RcpApplication.run(RcpApplication.java:31)

at
org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.
java:257)

at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:104)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39
)

at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl
..java:25)

at java.lang.reflect.Method.invoke(Method.java:324)

at org.eclipse.core.launcher.Main.basicRun(Main.java:279)

at org.eclipse.core.launcher.Main.run(Main.java:742)

at org.eclipse.core.launcher.Main.main(Main.java:581)
Re: RCP plugin using Java Comm API doesn't find javax/comm classes [message #203373 is a reply to message #203139] Sat, 28 February 2004 05:51 Go to previous message
Eclipse UserFriend
Hmm, it seems I kind of helped myself:

instead of the placement as a java extension lib:

C:\Java\j2sdk1.4.2_03\jre\lib\ext\comm.jar
C:\Java\j2sdk1.4.2_03\jre\bin\win32com.dll
C:\Java\j2sdk1.4.2_03\jre\lib\javax.comm.properties

as recommended by the Java Comm API documentation,
I placed the three files in my plugin directory (next to the plugin.xml).
In the plugin.xml, I added comm.jar to the run-time libraries.
Now the plugin just runs fine.

Note that an absolute reference like:
//C:/Java/j2sdk1.4.2_03/jre/lib/ext/comm.jar
or
C:\Java\j2sdk1.4.2_03\jre\lib\ext\comm.jar
as a run-time library entry in the plugin.xml seems not to work
(i.e. the classes in the jar are still not found at runtime).

Nevertheless the question remains:

Why does the eclipse class loader mechanism doesn't find
extension libraries installed in the JRE directories of the VM?

So long,

Bernd



"Bernd Hofner" <bernd.hofner@gmx.net> wrote in message
news:c1nvo0$tu4$1@eclipse.org...
> Hello,
>
> I'm developing a rich client platform plugin using eclipse M7.
>
> I'm trying to use the Java Comm API from within the plugin.
> I installed the comm.jar, win32comm.dll and the corresponding property
file
> in all possible JRE locations
> on my computer (j2sdk1.4.2_03).
>
> The SerialDemo Java Application delivered with the Java Comm API runs
> (compiled and started as "normal" Java application
> from the eclipse workspace).
>
> When I run my plugin and try to instantiate a class extending a javax/comm
> class, I get the appended log message.
>
> Any ideas?
>
> Greetings,
>
> Bernd Hofner
>
> !SESSION Feb 27, 2004
> 18:17:40.455 ---------------------------------------------
>
> java.version=1.4.2_03
>
> java.vendor=Sun Microsystems Inc.
>
> BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_GB
>
> Command-line arguments: -application
ssi.profilstrasse.RcpApplication -data
> D:\Eclipse-Workspace\ssi.profilstrasse.runtime-workspace -dev bin -debug
>
file:D:\Eclipse-Workspace\.metadata\.plugins\org.eclipse.pde .core\D__Eclipse-Workspace_ssi.profilstrasse.runtime-workspa ce/.options
>
> !ENTRY org.eclipse.core.runtime 4 2 Feb 27, 2004 18:17:40.465
>
> !MESSAGE Problems occurred when invoking code from plug-in:
> "org.eclipse.core.runtime".
>
> !STACK 0
>
> java.lang.NoClassDefFoundError: javax/comm/SerialPortEventListener
>
> at java.lang.ClassLoader.defineClass0(Native Method)
>
> at java.lang.ClassLoader.defineClass(ClassLoader.java:537)
>
> at
>
org.eclipse.osgi.framework.internal.defaultadaptor.DefaultCl assLoader.define
> Class(DefaultClassLoader.java:298)
>
> at
>
org.eclipse.core.runtime.adaptor.EclipseClassLoader.defineCl ass(EclipseClass
> Loader.java:99)
>
> at
>
org.eclipse.osgi.framework.internal.defaultadaptor.DefaultCl assLoader.findCl
> assImpl(DefaultClassLoader.java:287)
>
> at
>
org.eclipse.osgi.framework.internal.defaultadaptor.DefaultCl assLoader.findCl
> ass(DefaultClassLoader.java:176)
>
> at
>
org.eclipse.osgi.framework.adaptor.BundleClassLoader.findLoc alClass(BundleCl
> assLoader.java:261)
>
> at
>
org.eclipse.core.runtime.adaptor.EclipseClassLoader.findLoca lClass(EclipseCl
> assLoader.java:73)
>
> at
>
org.eclipse.osgi.framework.internal.core.BundleLoader.findLo calClass(BundleL
> oader.java:326)
>
> at
>
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader
> .java:357)
>
> at
>
org.eclipse.osgi.framework.adaptor.BundleClassLoader.loadCla ss(BundleClassLo
> ader.java:115)
>
> at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
>
> at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302 )
>
> at ssi.profilstrasse.clm.Clm.<init>(Clm.java:48)
>
> at ssi.profilstrasse.clm.Clm.getInstance(Clm.java:30)
>
> at
ssi.profilstrasse.clm.views.TestView.createPartControl(TestV iew.java:50)
>
> at org.eclipse.ui.internal.PartPane$1.run(PartPane.java:121)
>
> at
> org.eclipse.core.internal.runtime.InternalPlatform.run(Inter nalPlatform.ja
va
> :819)
>
> at org.eclipse.core.runtime.Platform.run(Platform.java:493)
>
> at org.eclipse.ui.internal.PartPane.createChildControl(PartPane .java:117)
>
> at org.eclipse.ui.internal.ViewPane.createChildControl(ViewPane .java:256)
>
> at org.eclipse.ui.internal.ViewFactory$1.run(ViewFactory.java:2 45)
>
> at
>
org.eclipse.core.internal.runtime.InternalPlatform.run(Inter nalPlatform.java
> :819)
>
> at org.eclipse.core.runtime.Platform.run(Platform.java:493)
>
> at
org.eclipse.ui.internal.ViewFactory.busyRestoreView(ViewFact ory.java:174)
>
> at org.eclipse.ui.internal.ViewFactory$2.run(ViewFactory.java:4 19)
>
> at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:84)
>
> at org.eclipse.ui.internal.ViewFactory.restoreView(ViewFactory. java:417)
>
> at
>
org.eclipse.ui.internal.ViewFactory$ViewReference.getPart(Vi ewFactory.java:9
> 3)
>
> at
>
org.eclipse.ui.internal.WorkbenchPage$1.propertyChange(Workb enchPage.java:13
> 4)
>
> at org.eclipse.ui.internal.LayoutPart.setVisible(LayoutPart.jav a:236)
>
> at org.eclipse.ui.internal.PartPane.setVisible(PartPane.java:38 6)
>
> at
>
org.eclipse.ui.internal.WorkbenchPage.updateVisibility(Workb enchPage.java:27
> 23)
>
> at
org.eclipse.ui.internal.WorkbenchPage.onActivate(WorkbenchPa ge.java:1937)
>
> at
org.eclipse.ui.internal.WorkbenchWindow$6.run(WorkbenchWindo w.java:1824)
>
> at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:84)
>
> at
>
org.eclipse.ui.internal.WorkbenchWindow.setActivePage(Workbe nchWindow.java:1
> 811)
>
> at
>
org.eclipse.ui.internal.WorkbenchWindow.busyOpenPage(Workben chWindow.java:58
> 9)
>
> at
org.eclipse.ui.internal.WorkbenchWindow$5.run(WorkbenchWindo w.java:1123)
>
> at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:84)
>
> at
>
org.eclipse.ui.internal.WorkbenchWindow.openPage(WorkbenchWi ndow.java:1120)
>
> at
> org.eclipse.ui.internal.Workbench.openFirstTimeWindow(Workbe nch.java:1186)
>
> at org.eclipse.ui.internal.Workbench.init(Workbench.java:899)
>
> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1503)
>
> at
>
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:265)
>
> at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:139)
>
> at ssi.profilstrasse.RcpApplication.run(RcpApplication.java:31)
>
> at
>
org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.
> java:257)
>
> at
>
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:104)
>
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>
> at
>
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39
> )
>
> at
>
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl
> .java:25)
>
> at java.lang.reflect.Method.invoke(Method.java:324)
>
> at org.eclipse.core.launcher.Main.basicRun(Main.java:279)
>
> at org.eclipse.core.launcher.Main.run(Main.java:742)
>
> at org.eclipse.core.launcher.Main.main(Main.java:581)
>
>
>
>
>
>
Previous Topic:Plug-in dependencies
Next Topic:Installing Eclipse Updates on WinXP
Goto Forum:
  


Current Time: Sun May 11 09:50:41 EDT 2025

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

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

Back to the top