Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Scout » exe compiled with tycho => unexpected error(org.eclipse.scout.commons.StringUtility.isNullOrEmpty(Ljava/lang/CharSequence;)Z (NoSuchMethodError))
exe compiled with tycho => unexpected error [message #1445636] Wed, 15 October 2014 18:26 Go to next message
Jeremie Bresson is currently offline Jeremie BressonFriend
Messages: 1252
Registered: October 2011
Senior Member
I am working on the demo applications (more precisely on the minifigcreator.exe generated by the tycho build).

I got some wired error message:
 Error

The original message is:
Unexpected
org.eclipse.scout.commons.StringUtility.isNullOrEmpty(Ljava/lang/CharSequence;)Z (NoSuchMethodError)

ProcessingException[ProcessingStatus[ERROR code=0 DesktopForm / Unexpected java.lang.NoSuchMethodError: org.eclipse.scout.commons.StringUtility.isNullOrEmpty(Ljava/lang/CharSequence;)Z]]
	at org.eclipse.scout.rt.client.ui.form.AbstractFormHandler.onLoad(AbstractFormHandler.java:184)
	at org.eclipse.scout.rt.client.ui.form.AbstractForm.loadStateInternal(AbstractForm.java:1293)
	at org.eclipse.scout.rt.client.ui.form.AbstractForm.startInternal(AbstractForm.java:756)
	at org.eclipsescout.demo.minifigcreator.client.ui.forms.DesktopForm.startView(DesktopForm.java:424)
	at org.eclipsescout.demo.minifigcreator.client.ui.desktop.Desktop.execOpened(Desktop.java:47)
	at org.eclipse.scout.rt.client.ui.desktop.AbstractDesktop$P_LocalDesktopExtension.desktopOpenedDelegate(AbstractDesktop.java:1768)
	at org.eclipse.scout.rt.client.ui.desktop.AbstractDesktop$P_UIFacade.fireDesktopOpenedFromUI(AbstractDesktop.java:1856)
	at org.eclipse.scout.rt.ui.swing.AbstractSwingEnvironment$2.runVoid(AbstractSwingEnvironment.java:453)
	at org.eclipse.scout.rt.client.ClientJob.runStatus(ClientJob.java:189)
	at org.eclipse.scout.rt.client.ClientJob.runTransactionWrapper(ClientJob.java:172)
	at org.eclipse.scout.rt.client.ClientJob.run(ClientJob.java:159)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: java.lang.NoSuchMethodError: org.eclipse.scout.commons.StringUtility.isNullOrEmpty(Ljava/lang/CharSequence;)Z
	at org.eclipsescout.demo.minifigcreator.shared.minifig.part.PartUtility.calculateSummary(PartUtility.java:19)
	at org.eclipsescout.demo.minifigcreator.client.ui.forms.DesktopForm.updateSummary(DesktopForm.java:136)
	at org.eclipsescout.demo.minifigcreator.client.ui.forms.DesktopForm.reloadForm(DesktopForm.java:412)
	at org.eclipsescout.demo.minifigcreator.client.ui.forms.DesktopForm$ViewHandler.execLoad(DesktopForm.java:419)
	at org.eclipse.scout.rt.client.ui.form.AbstractFormHandler.onLoad(AbstractFormHandler.java:178)
	... 11 more


After some research it turns out that the StringUtility has changed in the version 4.1 from scout. (commit 4e8f7b9).

The signature of isNullOrEmpty has changed from:
public static boolean isNullOrEmpty(String s)

to:
public static boolean isNullOrEmpty(CharSequence s)


A closer look at the tycho build tells me that the plugin is compiled with the wrong org.eclipse.scout.commons version:
 {path_to_git_repo}\minifigcreator\org.eclipsescout.demo.minifigcreator.client>mvn clean install
[INFO] Scanning for projects...
[INFO] Computing target platform for MavenProject: org.eclipsescout.demo.minifigcreator:org.eclipsescout.demo.minifigcreator.client:4.0.100-SNAPSHOT @ {path_to_git_repo}\minifigcreator\org.eclipsescout.demo.minifigcreator.client\pom.xml
[INFO] Resolving dependencies of MavenProject: org.eclipsescout.demo.minifigcreator:org.eclipsescout.demo.minifigcreator.client:4.0.100-SNAPSHOT @ {path_to_git_repo}\minifigcreator\org.eclipsescout.demo.minifigcreator.client\pom.xml
[WARNING] The following locally built units have been used to resolve project dependencies:
[WARNING]   org.eclipse.scout.service/4.1.0.20140826-1122
[WARNING]   org.eclipse.scout.commons/4.1.0.20140828-1103
[WARNING]   org.eclipse.scout.rt.client/4.1.0.20140919-0940
[WARNING]   org.eclipse.scout.rt.shared/4.1.0.20140912-1513
[WARNING]   org.eclipsescout.demo.minifigcreator.shared/4.1.0.201410151241
[WARNING]   org.eclipse.scout.rt.servicetunnel/4.1.0.20140828-1103
[INFO] Resolving class path of MavenProject: org.eclipsescout.demo.minifigcreator:org.eclipsescout.demo.minifigcreator.client:4.0.100-SNAPSHOT @ {path_to_git_repo}\minifigcreator\org.eclipsescout.demo.minifigcreator.client\pom.xml 

I do not know why tycho takes the liberty of using a newer version of some of the plugins, those versions are not available on the update site defined in the target platform.

We need to understand why and to come up with a fix!

Some ideas:
* adding a version range in the MANIFEST:.
Like this on the 4.0 branch (in the Require-Bundle section of the MANIFEST.MF):
org.eclipse.scout.rt.client;bundle-version="[4.0.0,4.1.0)"


* fixing the version in the target platform:
(and generate it with a tool like the targetplatform DSL).
But for the moment the demo apps consume the nightly build update site. This means a lot of target platform updates. I am not sure we want this.

Re: exe compiled with tycho => unexpected error [message #1446278 is a reply to message #1445636] Thu, 16 October 2014 16:04 Go to previous messageGo to next message
Jeremie Bresson is currently offline Jeremie BressonFriend
Messages: 1252
Registered: October 2011
Senior Member
I am not sure the version range constraint in the MANIFEST will solve all the problems.
When Tycho transform the product into an exe, it again takes the liberty of selecting a newer version:

[INFO] ------------------------------------------------------------------------
[INFO] Building minifigcreator - ui.swt.product 4.0.100-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] ...
[INFO]
[INFO] --- tycho-p2-publisher-plugin:0.19.0:publish-products (default-publish-products) @ org.eclipsescout.demo.minifigcreator.ui.swt.product ---
[WARNING] The following locally built units have been used to resolve project dependencies:
[WARNING]   org.eclipse.scout.org.w3c.dom.svg.fragment/4.1.0.20140523-1423
[INFO] ...

The next problem is the version ranges are not supported in product files.

Re: exe compiled with tycho => unexpected error [message #1450572 is a reply to message #1446278] Wed, 22 October 2014 15:37 Go to previous message
Jeremie Bresson is currently offline Jeremie BressonFriend
Messages: 1252
Registered: October 2011
Senior Member
I got this input from Adrian Moser:

- It is the case when several builds work with the same shared local maven repository.
- He is using:
* "private maven repo" (in each workspace) in the IDE
* an empty Workspace for each build in Jenkins (Job configuration)

Option
-Dtycho.localArtifacts=ignore
can be usefull. (see Bug 355367)
Previous Topic:Setting the focus on the first row a a table
Next Topic:RAP theme bundle no longer resolved after docx4j integration
Goto Forum:
  


Current Time: Fri Apr 26 21:22:31 GMT 2024

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

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

Back to the top