Home » Eclipse Projects » Remote Application Platform (RAP) » java.lang.NoSuchMethodError: org.eclipse.swt.widgets.Display.sleep()Z
java.lang.NoSuchMethodError: org.eclipse.swt.widgets.Display.sleep()Z [message #76546] |
Tue, 04 March 2008 15:57  |
Eclipse User |
|
|
|
I'm attempting to deploy my application to Tomcat 6 and receiving the
following error when I hit the application:
osgi> [2008-03-04T14:31:47] [ERROR] [UIThread
[52537386199960BFD3A4F7311DEAB8F9]]
[com.cerner.system.preferences.explorer.platform.A
pplication]
+ Message: An application error has occurred.
+ Throwable: java.lang.NoSuchMethodError:
org.eclipse.swt.widgets.Display.sleep()Z
at
com.cerner.system.preferences.explorer.authentication.ml.Log inDialog.open(LoginDialog.java:184)
at
com.cerner.system.preferences.explorer.authentication.ml.Pre ferencesExplAuthenticator.authenticate(PreferencesExplAuthen t
icator.java:98)
at
com.cerner.system.preferences.explorer.platform.authenticati on.AuthenticatorManager.login(AuthenticatorManager.java:64)
at
com.cerner.system.preferences.explorer.platform.Application. createUI(Application.java:40)
at
org.eclipse.rwt.internal.lifecycle.EntryPointManager.createU I(EntryPointManager.java:92)
at
org.eclipse.rwt.internal.lifecycle.RWTLifeCycle.createUI(RWT LifeCycle.java:212)
at
org.eclipse.rwt.internal.lifecycle.RWTLifeCycle$UIThreadCont roller.run(RWTLifeCycle.java:109)
at java.lang.Thread.run(Unknown Source)
The code is attempting to open a login dialog. The application works just
great when running in the IDE, but the deployed version on Tomcat does not.
I'm using the M2 version which now supports the readAndDispatch. I believe
I'm packaging all the correct versions of rwt as shown in my osgi status:
64 ACTIVE org.eclipse.rap.rwt_1.1.0.20080220-1610
65 ACTIVE org.eclipse.rap.ui.forms_1.1.0.20080220-1610
66 <<LAZY>> org.eclipse.rap.ui.views_1.1.0.20080220-1610
67 ACTIVE org.eclipse.rap.ui.workbench_1.1.0.20080220-1610
68 RESOLVED org.eclipse.rap.ui_1.1.0.20080220-1610
70 RESOLVED org.restlet_1.0.0
Fragments=14
71 RESOLVED slf4j.api_1.4.3
72 RESOLVED slf4j.log4j12_1.4.3
73 ACTIVE com.cerner.system.preferences.explorer_1.0.0.SNAPSHOT
Fragments=74
74 RESOLVED
com.cerner.system.preferences.explorer.authentication.ml_1.0 .0.SNAPSHOT
Master=73
75 <<LAZY>>
com.cerner.system.preferences.explorer.biz_1.0.0.SNAPSHOT
Fragments=76
76 RESOLVED
com.cerner.system.preferences.explorer.biz.mock_1.0.0.SNAPSH OT
Master=75
77 INSTALLED
com.cerner.system.preferences.explorer.history_1.0.0.SNAPSHO T
78 <<LAZY>>
com.cerner.system.preferences.explorer.millenniumdomain_1.0. 0.SNAPSHOT
79 <<LAZY>>
com.cerner.system.preferences.explorer.ui.navigation_1.0.0.S NAPSHOT
80 <<LAZY>>
com.cerner.system.preferences.explorer.search.view_1.0.0.SNA PSHOT
81 <<LAZY>>
com.cerner.system.preferences.explorer.swt.utils_1.0.0.SNAPS HOT
Does anyone have ideas on where I might be going wrong.
Thanks!
|
|
| |
Re: java.lang.NoSuchMethodError: org.eclipse.swt.widgets.Display.sleep()Z [message #77184 is a reply to message #76931] |
Thu, 06 March 2008 16:40   |
Eclipse User |
|
|
|
Hi,
Coincidentally, I actually saw the same thing today (including the "Z",
which I don't understand). We have an application originally written
against SWT that we are porting to RWT. We are able to leave a majority
of our classes in their original projects, which have SWT in the project
compile-time classpath, and simply run against RWT (comment/criticism on
this strategy is welcome). As long as we don't use methods that are not
implemented in RWT this strategy generally works. However for some
classes, we need to compile against RWT as well. This was the case with
the class I was porting today with a read and dispatch loop:
if (!display.readAndDispatch())
display.sleep();
It is not clear to me why this caused the NoSuchMethodError where many
other similar cases don't. In fact, a call to Display.readAndDispatch()
in the same class, compiled against SWT but run against RWT, ran fine,
correctly entering into the RWT method, but the next line, the call to
Display.sleep(), gave the NoSuchMethodError.
Changing this class to compile against RWT solved this problem.
Frank, can you shed any light on this?
Thanks,
Ryan
Frank Appel wrote:
> Hi,
>
> really strange. Your using obviously the latest and greatest of RAP, but
> Display#sleep should be available. I'm wondering about the Z behind the
> message, any ideas? Did you have a previous version of the application
> deployed on the same tomcat? I mean maybe the working directory wasn't
> cleaned up properly or something like that - just a weak guess...
>
>
> Ciao
> Frank
>
> -----Ursprüngliche Nachricht-----
> Von: Dan Stocksick [mailto:dstocksick@cerner.com]
> Bereitgestellt: Dienstag, 4. März 2008 21:57
> Bereitgestellt in: eclipse.technology.rap
> Unterhaltung: java.lang.NoSuchMethodError:
> org.eclipse.swt.widgets.Display.sleep()Z
> Betreff: java.lang.NoSuchMethodError:
> org.eclipse.swt.widgets.Display.sleep()Z
>
>
> I'm attempting to deploy my application to Tomcat 6 and receiving the
> following error when I hit the application:
>
> osgi> [2008-03-04T14:31:47] [ERROR] [UIThread
> [52537386199960BFD3A4F7311DEAB8F9]]
> [com.cerner.system.preferences.explorer.platform.A
> pplication]
> + Message: An application error has occurred.
> + Throwable: java.lang.NoSuchMethodError:
> org.eclipse.swt.widgets.Display.sleep()Z
> at
> com.cerner.system.preferences.explorer.authentication.ml.Log inDialog.ope
> n(LoginDialog.java:184)
> at
> com.cerner.system.preferences.explorer.authentication.ml.Pre ferencesExpl
> Authenticator.authenticate(PreferencesExplAuthent
> icator.java:98)
> at
> com.cerner.system.preferences.explorer.platform.authenticati on.Authentic
> atorManager.login(AuthenticatorManager.java:64)
> at
> com.cerner.system.preferences.explorer.platform.Application. createUI(App
> lication.java:40)
> at
> org.eclipse.rwt.internal.lifecycle.EntryPointManager.createU I(EntryPoint
> Manager.java:92)
> at
> org.eclipse.rwt.internal.lifecycle.RWTLifeCycle.createUI(RWT LifeCycle.ja
> va:212)
> at
> org.eclipse.rwt.internal.lifecycle.RWTLifeCycle$UIThreadCont roller.run(R
> WTLifeCycle.java:109)
> at java.lang.Thread.run(Unknown Source)
>
> The code is attempting to open a login dialog. The application works
> just great when running in the IDE, but the deployed version on Tomcat
> does not.
> I'm using the M2 version which now supports the readAndDispatch. I
> believe I'm packaging all the correct versions of rwt as shown in my
> osgi status:
>
> 64 ACTIVE org.eclipse.rap.rwt_1.1.0.20080220-1610
> 65 ACTIVE org.eclipse.rap.ui.forms_1.1.0.20080220-1610
> 66 <<LAZY>> org.eclipse.rap.ui.views_1.1.0.20080220-1610
> 67 ACTIVE org.eclipse.rap.ui.workbench_1.1.0.20080220-1610
> 68 RESOLVED org.eclipse.rap.ui_1.1.0.20080220-1610
> 70 RESOLVED org.restlet_1.0.0
> Fragments=14
> 71 RESOLVED slf4j.api_1.4.3
> 72 RESOLVED slf4j.log4j12_1.4.3
> 73 ACTIVE
> com.cerner.system.preferences.explorer_1.0.0.SNAPSHOT
> Fragments=74
> 74 RESOLVED
> com.cerner.system.preferences.explorer.authentication.ml_1.0 .0.SNAPSHOT
> Master=73
> 75 <<LAZY>>
> com.cerner.system.preferences.explorer.biz_1.0.0.SNAPSHOT
> Fragments=76
> 76 RESOLVED
> com.cerner.system.preferences.explorer.biz.mock_1.0.0.SNAPSH OT
> Master=75
> 77 INSTALLED
> com.cerner.system.preferences.explorer.history_1.0.0.SNAPSHO T
> 78 <<LAZY>>
> com.cerner.system.preferences.explorer.millenniumdomain_1.0. 0.SNAPSHOT
> 79 <<LAZY>>
> com.cerner.system.preferences.explorer.ui.navigation_1.0.0.S NAPSHOT
> 80 <<LAZY>>
> com.cerner.system.preferences.explorer.search.view_1.0.0.SNA PSHOT
> 81 <<LAZY>>
> com.cerner.system.preferences.explorer.swt.utils_1.0.0.SNAPS HOT
>
> Does anyone have ideas on where I might be going wrong.
>
> Thanks!
>
|
|
|
Re: java.lang.NoSuchMethodError: org.eclipse.swt.widgets.Display.sleep()Z [message #77201 is a reply to message #77184] |
Thu, 06 March 2008 16:54   |
Eclipse User |
|
|
|
Originally posted by: b.muskalla.gmx.net
Hi,
the Z means "return type of type boolean" which is correct for SWT but
not for RWT. Without checking the return type of sleep the code is still
source compatible but not binary compatible as the return parameters are
different (void for RWT, boolean for SWT). Maybe Frank can clarify if we
we have time and way to be compatible. In the meantime you should
compile your code against RWT instead of SWT.
Greets
Benny
Ryan Donnelly wrote:
> Hi,
> Coincidentally, I actually saw the same thing today (including the
> "Z", which I don't understand). We have an application originally
> written against SWT that we are porting to RWT. We are able to leave a
> majority of our classes in their original projects, which have SWT in
> the project compile-time classpath, and simply run against RWT
> (comment/criticism on this strategy is welcome). As long as we don't
> use methods that are not implemented in RWT this strategy generally
> works. However for some classes, we need to compile against RWT as
> well. This was the case with the class I was porting today with a read
> and dispatch loop:
>
> if (!display.readAndDispatch())
> display.sleep();
>
> It is not clear to me why this caused the NoSuchMethodError where
> many other similar cases don't. In fact, a call to
> Display.readAndDispatch() in the same class, compiled against SWT but
> run against RWT, ran fine, correctly entering into the RWT method, but
> the next line, the call to Display.sleep(), gave the NoSuchMethodError.
>
> Changing this class to compile against RWT solved this problem.
>
> Frank, can you shed any light on this?
>
>
> Thanks,
>
> Ryan
>
>
> Frank Appel wrote:
>> Hi,
>>
>> really strange. Your using obviously the latest and greatest of RAP, but
>> Display#sleep should be available. I'm wondering about the Z behind the
>> message, any ideas? Did you have a previous version of the application
>> deployed on the same tomcat? I mean maybe the working directory wasn't
>> cleaned up properly or something like that - just a weak guess...
>>
>>
>> Ciao
>> Frank
>>
>> -----Ursprüngliche Nachricht-----
>> Von: Dan Stocksick [mailto:dstocksick@cerner.com]
>> Bereitgestellt: Dienstag, 4. März 2008 21:57
>> Bereitgestellt in: eclipse.technology.rap
>> Unterhaltung: java.lang.NoSuchMethodError:
>> org.eclipse.swt.widgets.Display.sleep()Z
>> Betreff: java.lang.NoSuchMethodError:
>> org.eclipse.swt.widgets.Display.sleep()Z
>>
>>
>> I'm attempting to deploy my application to Tomcat 6 and receiving the
>> following error when I hit the application:
>>
>> osgi> [2008-03-04T14:31:47] [ERROR] [UIThread
>> [52537386199960BFD3A4F7311DEAB8F9]]
>> [com.cerner.system.preferences.explorer.platform.A
>> pplication]
>> + Message: An application error has occurred.
>> + Throwable: java.lang.NoSuchMethodError:
>> org.eclipse.swt.widgets.Display.sleep()Z
>> at
>> com.cerner.system.preferences.explorer.authentication.ml.Log inDialog.ope
>> n(LoginDialog.java:184)
>> at
>> com.cerner.system.preferences.explorer.authentication.ml.Pre ferencesExpl
>> Authenticator.authenticate(PreferencesExplAuthent
>> icator.java:98)
>> at
>> com.cerner.system.preferences.explorer.platform.authenticati on.Authentic
>> atorManager.login(AuthenticatorManager.java:64)
>> at
>> com.cerner.system.preferences.explorer.platform.Application. createUI(App
>> lication.java:40)
>> at
>> org.eclipse.rwt.internal.lifecycle.EntryPointManager.createU I(EntryPoint
>> Manager.java:92)
>> at
>> org.eclipse.rwt.internal.lifecycle.RWTLifeCycle.createUI(RWT LifeCycle.ja
>> va:212)
>> at
>> org.eclipse.rwt.internal.lifecycle.RWTLifeCycle$UIThreadCont roller.run(R
>> WTLifeCycle.java:109)
>> at java.lang.Thread.run(Unknown Source)
>>
>> The code is attempting to open a login dialog. The application works
>> just great when running in the IDE, but the deployed version on Tomcat
>> does not.
>> I'm using the M2 version which now supports the readAndDispatch. I
>> believe I'm packaging all the correct versions of rwt as shown in my
>> osgi status:
>>
>> 64 ACTIVE org.eclipse.rap.rwt_1.1.0.20080220-1610
>> 65 ACTIVE org.eclipse.rap.ui.forms_1.1.0.20080220-1610
>> 66 <<LAZY>> org.eclipse.rap.ui.views_1.1.0.20080220-1610
>> 67 ACTIVE org.eclipse.rap.ui.workbench_1.1.0.20080220-1610
>> 68 RESOLVED org.eclipse.rap.ui_1.1.0.20080220-1610
>> 70 RESOLVED org.restlet_1.0.0
>> Fragments=14
>> 71 RESOLVED slf4j.api_1.4.3
>> 72 RESOLVED slf4j.log4j12_1.4.3
>> 73 ACTIVE
>> com.cerner.system.preferences.explorer_1.0.0.SNAPSHOT
>> Fragments=74
>> 74 RESOLVED
>> com.cerner.system.preferences.explorer.authentication.ml_1.0 .0.SNAPSHOT
>> Master=73
>> 75 <<LAZY>>
>> com.cerner.system.preferences.explorer.biz_1.0.0.SNAPSHOT
>> Fragments=76
>> 76 RESOLVED
>> com.cerner.system.preferences.explorer.biz.mock_1.0.0.SNAPSH OT
>> Master=75
>> 77 INSTALLED
>> com.cerner.system.preferences.explorer.history_1.0.0.SNAPSHO T
>> 78 <<LAZY>>
>> com.cerner.system.preferences.explorer.millenniumdomain_1.0. 0.SNAPSHOT
>> 79 <<LAZY>>
>> com.cerner.system.preferences.explorer.ui.navigation_1.0.0.S NAPSHOT
>> 80 <<LAZY>>
>> com.cerner.system.preferences.explorer.search.view_1.0.0.SNA PSHOT
>> 81 <<LAZY>>
>> com.cerner.system.preferences.explorer.swt.utils_1.0.0.SNAPS HOT
>>
>> Does anyone have ideas on where I might be going wrong.
>>
>> Thanks!
>>
|
|
|
Re: java.lang.NoSuchMethodError: org.eclipse.swt.widgets.Display.sleep()Z [message #77268 is a reply to message #77201] |
Fri, 07 March 2008 00:21   |
Eclipse User |
|
|
|
Originally posted by: fappel.innoopract.com
Hi,
thanks Benny. I added this to bug #219789 regarding the finalization of
the read and dispatch implementation.
Ciao
Frank
-----Ursprüngliche Nachricht-----
Von: Benjamin Muskalla [mailto:b.muskalla@gmx.net]
Bereitgestellt: Donnerstag, 6. März 2008 22:54
Bereitgestellt in: eclipse.technology.rap
Unterhaltung: java.lang.NoSuchMethodError:
org.eclipse.swt.widgets.Display.sleep()Z
Betreff: Re: java.lang.NoSuchMethodError:
org.eclipse.swt.widgets.Display.sleep()Z
Hi,
the Z means "return type of type boolean" which is correct for SWT but
not for RWT. Without checking the return type of sleep the code is still
source compatible but not binary compatible as the return parameters are
different (void for RWT, boolean for SWT). Maybe Frank can clarify if we
we have time and way to be compatible. In the meantime you should
compile your code against RWT instead of SWT.
Greets
Benny
Ryan Donnelly wrote:
> Hi,
> Coincidentally, I actually saw the same thing today (including the
> "Z", which I don't understand). We have an application originally
> written against SWT that we are porting to RWT. We are able to leave
> a majority of our classes in their original projects, which have SWT
> in the project compile-time classpath, and simply run against RWT
> (comment/criticism on this strategy is welcome). As long as we don't
> use methods that are not implemented in RWT this strategy generally
> works. However for some classes, we need to compile against RWT as
> well. This was the case with the class I was porting today with a
> read and dispatch loop:
>
> if (!display.readAndDispatch())
> display.sleep();
>
> It is not clear to me why this caused the NoSuchMethodError where
> many other similar cases don't. In fact, a call to
> Display.readAndDispatch() in the same class, compiled against SWT but
> run against RWT, ran fine, correctly entering into the RWT method, but
> the next line, the call to Display.sleep(), gave the
NoSuchMethodError.
>
> Changing this class to compile against RWT solved this problem.
>
> Frank, can you shed any light on this?
>
>
> Thanks,
>
> Ryan
>
>
> Frank Appel wrote:
>> Hi,
>>
>> really strange. Your using obviously the latest and greatest of RAP,
>> but Display#sleep should be available. I'm wondering about the Z
>> behind the message, any ideas? Did you have a previous version of the
>> application deployed on the same tomcat? I mean maybe the working
>> directory wasn't cleaned up properly or something like that - just a
weak guess...
>>
>>
>> Ciao
>> Frank
>>
>> -----Ursprüngliche Nachricht-----
>> Von: Dan Stocksick [mailto:dstocksick@cerner.com]
>> Bereitgestellt: Dienstag, 4. März 2008 21:57 Bereitgestellt in:
>> eclipse.technology.rap
>> Unterhaltung: java.lang.NoSuchMethodError:
>> org.eclipse.swt.widgets.Display.sleep()Z
>> Betreff: java.lang.NoSuchMethodError:
>> org.eclipse.swt.widgets.Display.sleep()Z
>>
>>
>> I'm attempting to deploy my application to Tomcat 6 and receiving the
>> following error when I hit the application:
>>
>> osgi> [2008-03-04T14:31:47] [ERROR] [UIThread
>> [52537386199960BFD3A4F7311DEAB8F9]]
>> [com.cerner.system.preferences.explorer.platform.A
>> pplication]
>> + Message: An application error has occurred.
>> + Throwable: java.lang.NoSuchMethodError:
>> org.eclipse.swt.widgets.Display.sleep()Z
>> at
>> com.cerner.system.preferences.explorer.authentication.ml.Log inDialog.
>> ope
>> n(LoginDialog.java:184)
>> at
>> com.cerner.system.preferences.explorer.authentication.ml.Pre ferencesE
>> xpl Authenticator.authenticate(PreferencesExplAuthent
>> icator.java:98)
>> at
>> com.cerner.system.preferences.explorer.platform.authenticati on.Authen
>> tic
>> atorManager.login(AuthenticatorManager.java:64)
>> at
>> com.cerner.system.preferences.explorer.platform.Application. createUI(
>> App
>> lication.java:40)
>> at
>> org.eclipse.rwt.internal.lifecycle.EntryPointManager.createU I(EntryPo
>> int
>> Manager.java:92)
>> at
>> org.eclipse.rwt.internal.lifecycle.RWTLifeCycle.createUI(RWT LifeCycle
>> .ja
>> va:212)
>> at
>> org.eclipse.rwt.internal.lifecycle.RWTLifeCycle$UIThreadCont roller.ru
>> n(R
>> WTLifeCycle.java:109)
>> at java.lang.Thread.run(Unknown Source)
>>
>> The code is attempting to open a login dialog. The application works
>> just great when running in the IDE, but the deployed version on
>> Tomcat does not.
>> I'm using the M2 version which now supports the readAndDispatch. I
>> believe I'm packaging all the correct versions of rwt as shown in my
>> osgi status:
>>
>> 64 ACTIVE org.eclipse.rap.rwt_1.1.0.20080220-1610
>> 65 ACTIVE org.eclipse.rap.ui.forms_1.1.0.20080220-1610
>> 66 <<LAZY>> org.eclipse.rap.ui.views_1.1.0.20080220-1610
>> 67 ACTIVE org.eclipse.rap.ui.workbench_1.1.0.20080220-1610
>> 68 RESOLVED org.eclipse.rap.ui_1.1.0.20080220-1610
>> 70 RESOLVED org.restlet_1.0.0
>> Fragments=14
>> 71 RESOLVED slf4j.api_1.4.3
>> 72 RESOLVED slf4j.log4j12_1.4.3
>> 73 ACTIVE
>> com.cerner.system.preferences.explorer_1.0.0.SNAPSHOT
>> Fragments=74
>> 74 RESOLVED
>>
com.cerner.system.preferences.explorer.authentication.ml_1.0 .0.SNAPSHOT
>> Master=73
>> 75 <<LAZY>>
>> com.cerner.system.preferences.explorer.biz_1.0.0.SNAPSHOT
>> Fragments=76
>> 76 RESOLVED
>> com.cerner.system.preferences.explorer.biz.mock_1.0.0.SNAPSH OT
>> Master=75
>> 77 INSTALLED
>> com.cerner.system.preferences.explorer.history_1.0.0.SNAPSHO T
>> 78 <<LAZY>>
>>
com.cerner.system.preferences.explorer.millenniumdomain_1.0. 0.SNAPSHOT
>> 79 <<LAZY>>
>> com.cerner.system.preferences.explorer.ui.navigation_1.0.0.S NAPSHOT
>> 80 <<LAZY>>
>> com.cerner.system.preferences.explorer.search.view_1.0.0.SNA PSHOT
>> 81 <<LAZY>>
>> com.cerner.system.preferences.explorer.swt.utils_1.0.0.SNAPS HOT
>>
>> Does anyone have ideas on where I might be going wrong.
>>
>> Thanks!
>>
|
|
| |
Goto Forum:
Current Time: Tue May 13 19:14:51 EDT 2025
Powered by FUDForum. Page generated in 0.03215 seconds
|