Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » ClassNotFound SWTError on deployed Startup(A deployed product fails to find a native SWT class)
icon5.gif  ClassNotFound SWTError on deployed Startup [message #538241] Mon, 07 June 2010 01:10 Go to next message
Jörn Guy  Süß is currently offline Jörn Guy Süß
Messages: 83
Registered: July 2009
Location: Germany
Member

I have an Eclipse product based on features which

  • validates ok
  • runs ok from a launch configuration
  • exports ok from export wizard


When I start the native launcher, the application fails to load. Reading the attached dump, I believe that the root cause is a ClassNotFoundError for SWTError, as shown below.

Caused by: java.lang.ClassNotFoundException: org.eclipse.swt.SWTError
	at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:494)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:410)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:398)
	at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:105)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	... 41 more



I have verified that both the plugin
org.eclipse.swt_3.5.2.v3557f.jar

and platform fragment
org.eclipse.swt.win32.win32.x86_3.5.2.v3557f.jar

are in the plugins directory.


  • Does anyone have an idea as to the cause of this issue?
  • Can anybody point me to a debugging strategy?


Re: ClassNotFound SWTError on deployed Startup [message #538281 is a reply to message #538241] Mon, 07 June 2010 04:13 Go to previous messageGo to next message
Ankur Sharma is currently offline Ankur Sharma
Messages: 68
Registered: July 2009
Member
On 6/7/2010 10:40 AM, Joerr Guy Suess wrote:
> I have an Eclipse product based on features which
>
> validates ok
> runs ok from a launch configuration
> exports ok from export wizard
>
>
> When I start the native launcher, the application fails to load. Reading
> the attached dump, I believe that the root cause is a ClassNotFoundError
> for SWTError, as shown below.
>
> Caused by: java.lang.ClassNotFoundException: org.eclipse.swt.SWTError
> at
> org.eclipse.osgi.internal.loader.BundleLoader.findClassInter nal(BundleLoader.java:494)
>
> at
> org.eclipse.osgi.internal.loader.BundleLoader.findClass(Bund leLoader.java:410)
>
> at
> org.eclipse.osgi.internal.loader.BundleLoader.findClass(Bund leLoader.java:398)
>
> at
> org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loa dClass(DefaultClassLoader.java:105)
>
> at java.lang.ClassLoader.loadClass(Unknown Source)
> ... 41 more
>
>
>
> I have verified that both the plugin org.eclipse.swt_3.5.2.v3557f.jar
> and platform fragment
> org.eclipse.swt.win32.win32.x86_3.5.2.v3557f.jar
> are in the plugins directory.
>
>
> Does anyone have an idea as to the cause of this issue?
> Can anybody point me to a debugging strategy?
>
>
>



See if the solution at http://dev.eclipse.org/newslists/news.eclipse.platform.rcp/m sg32879.html
help fix problem too.

Ankur..
icon2.gif  Re: ClassNotFound SWTError on deployed Startup [message #538975 is a reply to message #538281] Wed, 09 June 2010 05:08 Go to previous messageGo to next message
Jörn Guy  Süß is currently offline Jörn Guy Süß
Messages: 83
Registered: July 2009
Location: Germany
Member

I have found the issue, but I am still no closer to the solution. My problem is that the
product .ini
file, usually called
eclipse.ini
to correspond with the launcher
eclipse.exe
contains the following:

-os
${target.os}
-ws
${target.ws}
-arch
${target.arch}
-nl
${target.nl}
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms40m
-Xmx512m


If I replace
${target.os}
with
win32

${target.ws}
with
win32

${target.arch}
with
x86

${target.nl}
with
en_AU

my product runs immediately.

These are the values specified in my current target definition. I believe that the replacement process does not update the file correctly.

Maybe this is due to the fact that my launcher is called
mint
, not
eclipse
.

My problem is that I cannot see what the product export wizard does, when it runs. I will post this as a new thread.
Re: ClassNotFound SWTError on deployed Startup [message #539082 is a reply to message #538975] Wed, 09 June 2010 11:12 Go to previous messageGo to next message
Andrew Niefer is currently offline Andrew Niefer
Messages: 990
Registered: July 2009
Senior Member
You don't need -os, -ws, -arch in your launcher .ini file. The fact that
those are there is this bug:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=278598

The eclipse executable automatically adds -os, -ws and -arch to the command
line for you, the values it gives will be based on whatever platform the
launcher was compiled for.

-Andrwe
Joerr Guy Suess wrote:

> I have found the issue, but I am still no closer to the solution. My
> problem is that the product .ini file, usually called eclipse.ini to
> correspond with the launcher eclipse.exe contains the following:
>
>
> -os
> ${target.os}
> -ws
> ${target.ws}
> -arch
> ${target.arch}
> -nl
> ${target.nl}
> -vmargs
> -Dosgi.requiredJavaVersion=1.5
> -Xms40m
> -Xmx512m
>
>
> If I replace
> ${target.os} with win32
> ${target.ws} with win32
> ${target.arch} with x86
> ${target.nl} with en_AU
> my product runs immediately.
>
> These are the values specified in my current target definition. I believe
> that the replacement process does not update the file correctly.
>
> Maybe this is due to the fact that my launcher is called mint, not
> eclipse.
>
> My problem is that I cannot see what the product export wizard does, when
> it runs. I will post this as a new thread.
Re: ClassNotFound SWTError on deployed Startup [message #550398 is a reply to message #538241] Fri, 30 July 2010 05:28 Go to previous message
Juergen Weber is currently offline Juergen Weber
Messages: 54
Registered: July 2009
Member
See http://www.eclipse.org/forums/index.php?t=msg&goto=53908 2&

Amazing, what a misleading Exception this bug provokes.
Re: ClassNotFound SWTError on deployed Startup [message #605956 is a reply to message #538281] Wed, 09 June 2010 05:08 Go to previous message
Jörn Guy  Süß is currently offline Jörn Guy Süß
Messages: 83
Registered: July 2009
Location: Germany
Member

I have found the issue, but I am still no closer to the solution. My problem is that the product .ini file, usually called eclipse.ini to correspond with the launcher eclipse.exe contains the following:


-os
${target.os}
-ws
${target.ws}
-arch
${target.arch}
-nl
${target.nl}
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms40m
-Xmx512m


If I replace
${target.os} with win32
${target.ws} with win32
${target.arch} with x86
${target.nl} with en_AU
my product runs immediately.

These are the values specified in my current target definition. I believe that the replacement process does not update the file correctly.

Maybe this is due to the fact that my launcher is called mint, not eclipse.

My problem is that I cannot see what the product export wizard does, when it runs. I will post this as a new thread.
Re: ClassNotFound SWTError on deployed Startup [message #605960 is a reply to message #605956] Wed, 09 June 2010 11:12 Go to previous message
Andrew Niefer is currently offline Andrew Niefer
Messages: 990
Registered: July 2009
Senior Member
You don't need -os, -ws, -arch in your launcher .ini file. The fact that
those are there is this bug:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=278598

The eclipse executable automatically adds -os, -ws and -arch to the command
line for you, the values it gives will be based on whatever platform the
launcher was compiled for.

-Andrwe
Joerr Guy Suess wrote:

> I have found the issue, but I am still no closer to the solution. My
> problem is that the product .ini file, usually called eclipse.ini to
> correspond with the launcher eclipse.exe contains the following:
>
>
> -os
> ${target.os}
> -ws
> ${target.ws}
> -arch
> ${target.arch}
> -nl
> ${target.nl}
> -vmargs
> -Dosgi.requiredJavaVersion=1.5
> -Xms40m
> -Xmx512m
>
>
> If I replace
> ${target.os} with win32
> ${target.ws} with win32
> ${target.arch} with x86
> ${target.nl} with en_AU
> my product runs immediately.
>
> These are the values specified in my current target definition. I believe
> that the replacement process does not update the file correctly.
>
> Maybe this is due to the fact that my launcher is called mint, not
> eclipse.
>
> My problem is that I cannot see what the product export wizard does, when
> it runs. I will post this as a new thread.
Previous Topic:How does JUnit find the eclipse plug-in being tested?
Next Topic:ClassNotFound SWTError on deployed Startup
Goto Forum:
  


Current Time: Fri Jul 25 10:01:55 EDT 2014

Powered by FUDForum. Page generated in 0.02347 seconds