Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » SWTBot » [solved] Eclipse-Plugin-Test: Log4J Error by using SWTBot(WidgetNotFoundException caused by Initialize Error in Log4J)
[solved] Eclipse-Plugin-Test: Log4J Error by using SWTBot [message #1744063] Thu, 22 September 2016 05:42
Corrado Parisi is currently offline Corrado ParisiFriend
Messages: 32
Registered: September 2016
Member
I'm trying to run an Eclipse-Plugin-Test which tries to create a Project.

When running the test-class the console-error-output is the following: (especially the first and the last three lines seem to be relevant)

  java.lang.ExceptionInInitializerError
    at org.eclipse.oomph.setup.internal.core.util.ECFURIHandlerImpl.getETag(ECFURIHandlerImpl.java:816)
    at org.eclipse.oomph.setup.internal.core.util.ECFURIHandlerImpl.createInputStream(ECFURIHandlerImpl.java:471)
    at org.eclipse.emf.ecore.resource.impl.ExtensibleURIConverterImpl.createInputStream(ExtensibleURIConverterImpl.java:360)
    at org.eclipse.oomph.setup.internal.core.util.SetupCoreUtil.handleArchiveRedirection(SetupCoreUtil.java:383)
    at org.eclipse.oomph.setup.internal.core.util.SetupCoreUtil.configureResourceSet(SetupCoreUtil.java:365)
    at org.eclipse.oomph.setup.internal.core.util.SetupCoreUtil.createResourceSet(SetupCoreUtil.java:133)
    at org.eclipse.oomph.setup.ui.recorder.RecorderManager.<clinit>(RecorderManager.java:119)
    at org.eclipse.oomph.setup.ui.SetupUIPlugin.performStartup(SetupUIPlugin.java:200)
    at org.eclipse.oomph.setup.ui.EarlyStartup.earlyStartup(EarlyStartup.java:22)
    at org.eclipse.ui.internal.EarlyStartupRunnable.runEarlyStartup(EarlyStartupRunnable.java:77)
    at org.eclipse.ui.internal.EarlyStartupRunnable.run(EarlyStartupRunnable.java:53)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
    at org.eclipse.ui.internal.Workbench$55.run(Workbench.java:2829)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Caused by: java.lang.IllegalArgumentException: invalid opaquePart: 
    at org.eclipse.emf.common.util.URI.validateURI(URI.java:2759)
    at org.eclipse.emf.common.util.URI$Opaque.<init>(URI.java:4419)
    at org.eclipse.emf.common.util.URI$URIPool$URIComponentsAccessUnit.getInternalizedValue(URI.java:1879)
    at org.eclipse.emf.common.util.URI$URIPool$URIComponentsAccessUnit.getInternalizedValue(URI.java:1)
    at org.eclipse.emf.common.util.Pool.doIntern(Pool.java:932)
    at org.eclipse.emf.common.util.URI$URIPool.intern(URI.java:1979)
    at org.eclipse.emf.common.util.URI$URIPool$StringAccessUnit.parseIntoURI(URI.java:565)
    at org.eclipse.emf.common.util.URI$URIPool$StringAccessUnit.getInternalizedValue(URI.java:400)
    at org.eclipse.emf.common.util.URI$URIPool.intern(URI.java:1931)
    at org.eclipse.emf.common.util.URI.createURIWithCache(URI.java:2570)
    at org.eclipse.emf.common.util.URI.createURI(URI.java:2445)
    at org.eclipse.oomph.base.util.BaseUtil.<clinit>(BaseUtil.java:55)
    ... 14 more

    log4j:WARN No appenders could be found for logger (org.eclipse.swtbot.swt.finder.matchers.AbstractMatcher).
    log4j:WARN Please initialize the log4j system properly. 


The test itself throws a WidgetNotFoundException, even though it is correct.

It looks like this:

@Test
public void createProject() {
    SWTWorkbenchBot bot = new SWTWorkbenchBot();
    bot.menu("File").menu("Project...").click();
    SWTBotShell shell = bot.shell("New Project");
    shell.activate();
    bot.tree().expandNode("General").select("Project");
    bot.button("Next >").click();
    bot.textWithLabel("Project name:").setText("SWTBot Test Project");
    bot.button("Finish").click();
}


This person here had a similiar issue: https://www.eclipse.org/forums/index.php/t/152426/


I don't know what to do concretly.

Any help is appreciated.

Update:
My Unit test was in fact wrong. So this question is meaningless now and can be deleted by a moderator.

[Updated on: Fri, 23 September 2016 06:46]

Report message to a moderator

Previous Topic:Flaky Tests
Next Topic:GEF / Draw2D unit tests
Goto Forum:
  


Current Time: Fri Apr 26 09:24:57 GMT 2024

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

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

Back to the top