Error While Installing JSF Facet in Eclipse Project - eclipse

Error While Installing JSF Facet in Eclipse Project
Detailed exception trace from .metadata/.log
!ENTRY org.eclipse.wst.common.project.facet.core 4 0 2018-10-04 18:48:27.943
!MESSAGE Failed while installing JavaServer Faces 2.2.
!STACK 0
java.lang.NullPointerException
at org.eclipse.jst.jsf.core.internal.project.facet.JSFFacetInstallDelegate.resolveConfigPath(JSFFacetInstallDelegate.java:313)
at org.eclipse.jst.jsf.core.internal.project.facet.JSFFacetInstallDelegate.createConfigFile(JSFFacetInstallDelegate.java:331)
at org.eclipse.jst.jsf.core.internal.project.facet.JSFFacetInstallDelegate.execute(JSFFacetInstallDelegate.java:130)
at org.eclipse.wst.common.project.facet.core.internal.FacetedProject.callDelegate(FacetedProject.java:1477)
at org.eclipse.wst.common.project.facet.core.internal.FacetedProject.modifyInternal(FacetedProject.java:441)
at org.eclipse.wst.common.project.facet.core.internal.FacetedProject.mergeChangesInternal(FacetedProject.java:1181)
at org.eclipse.wst.common.project.facet.core.internal.FacetedProject.access$2(FacetedProject.java:1117)
at org.eclipse.wst.common.project.facet.core.internal.FacetedProject$5.run(FacetedProject.java:1099)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2313)
at org.eclipse.wst.common.project.facet.core.internal.FacetedProject.mergeChanges(FacetedProject.java:1109)
at org.eclipse.wst.common.project.facet.core.internal.FacetedProjectWorkingCopy.commitChanges(FacetedProjectWorkingCopy.java:2020)
at org.eclipse.wst.common.project.facet.ui.internal.FacetsPropertyPage$4.run(FacetsPropertyPage.java:232)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2313)
at org.eclipse.wst.common.project.facet.ui.internal.FacetsPropertyPage$5.run(FacetsPropertyPage.java:246)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:122)
!SESSION 2018-10-05 10:56:32.004 -----------------------------------------------
eclipse.buildId=3.6.1.201408250818-RELEASE-e44
java.version=1.7.0_51
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
Framework arguments: -product org.springsource.sts.ide
Command-line arguments: -os win32 -ws win32 -arch x86 -product org.springsource.sts.ide

Is this project a "Dinamic Web Project"? If so, you have to select a "Dynamic web module version" 2.5 or higher, because JavaServer Faces 2.2 requires this version.
You can also try to delete the project (save to another location first, just to be safe) and import it as a maven project, adding the facets latter or adjusting your pom.xml example:
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-api</artifactId>
<version>2.1.13</version>
</dependency>
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-impl</artifactId>
<version>2.1.13</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.0.1</version>
</dependency>
You can also check your web.xml as picture below.
It should be like the code below, according to your "Dynamic Web Module" (see version 3.1 and web-app_3_1):
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
version="3.1">

Related

maven update in Eclipse: Could not update project

I am doing first steps in REST with Jersey following here using m2e.
It works fine deployed on tomcat 10.1, after a few adaptions to tomcat 10 and Java-17.
Now, I'd like to do a next step and put something new to the pom.xml. But doing Maven / Update Project ... leads to the failure message:
Could not update project HelloREST configuration
Cannot invoke "org.eclipse.wst.common.componentcore.internal.WorkbenchComponent.findResourcesByRuntimePath(org.eclipse.core.runtime.IPath)"
because "aComponent" is null
Further, the Error Log also shows
eclipse.buildId=4.26.0.20221201-1200
java.version=17.0.5
java.vendor=Eclipse Adoptium
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
Framework arguments: -product org.eclipse.epp.package.jee.product
Command-line arguments: -os linux -ws gtk -arch x86_64 -product org.eclipse.epp.package.jee.product
org.eclipse.m2e.logback.appender
Error
Tue Feb 07 13:19:45 CET 2023
HelloREST/.settings/org.eclipse.wst.common.component is missing or invalid. Skipping module dependency configuration. Deployment issues may arise.
and
eclipse.buildId=4.26.0.20221201-1200
java.version=17.0.5
java.vendor=Eclipse Adoptium
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
Framework arguments: -product org.eclipse.epp.package.jee.product
Command-line arguments: -os linux -ws gtk -arch x86_64 -product org.eclipse.epp.package.jee.product
org.eclipse.wst.common.frameworks
Error
Tue Feb 07 13:19:45 CET 2023
Cannot invoke "org.eclipse.wst.common.componentcore.internal.WorkbenchComponent.getProperties()" because "component" is null
java.lang.NullPointerException: Cannot invoke "org.eclipse.wst.common.componentcore.internal.WorkbenchComponent.getProperties()" because "component" is null
at org.eclipse.wst.common.componentcore.internal.resources.VirtualComponent.setMetaProperty(VirtualComponent.java:285)
at org.eclipse.wst.common.componentcore.internal.operation.ServerContextRootUpdateOperation.execute(ServerContextRootUpdateOperation.java:40)
at org.eclipse.wst.common.frameworks.internal.datamodel.DataModelPausibleOperationImpl$1.run(DataModelPausibleOperationImpl.java:385)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2380)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2405)
at org.eclipse.wst.common.frameworks.internal.datamodel.DataModelPausibleOperationImpl.runOperation(DataModelPausibleOperationImpl.java:410)
at org.eclipse.wst.common.frameworks.internal.datamodel.DataModelPausibleOperationImpl.runOperation(DataModelPausibleOperationImpl.java:360)
at org.eclipse.wst.common.frameworks.internal.datamodel.DataModelPausibleOperationImpl.doExecute(DataModelPausibleOperationImpl.java:247)
at org.eclipse.wst.common.frameworks.internal.datamodel.DataModelPausibleOperationImpl.executeImpl(DataModelPausibleOperationImpl.java:219)
at org.eclipse.wst.common.frameworks.internal.datamodel.DataModelPausibleOperationImpl.cacheThreadAndContinue(DataModelPausibleOperationImpl.java:89)
at org.eclipse.wst.common.frameworks.internal.datamodel.DataModelPausibleOperationImpl.execute(DataModelPausibleOperationImpl.java:207)
at org.eclipse.wst.common.componentcore.internal.util.ComponentUtilities.setServerContextRoot(ComponentUtilities.java:337)
at org.eclipse.jst.j2ee.internal.project.J2EEProjectUtilities.setServerContextRoot(J2EEProjectUtilities.java:948)
at org.eclipse.m2e.wtp.WebProjectConfiguratorDelegate.configure(WebProjectConfiguratorDelegate.java:157)
at org.eclipse.m2e.wtp.AbstractProjectConfiguratorDelegate.configureProject(AbstractProjectConfiguratorDelegate.java:88)
at org.eclipse.m2e.wtp.WTPProjectConfigurator.configure(WTPProjectConfigurator.java:70)
at org.eclipse.m2e.core.project.configurator.AbstractLifecycleMapping.configure(AbstractLifecycleMapping.java:123)
at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager.lambda$6(ProjectConfigurationManager.java:494)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:364)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:274)
at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager.updateProjectConfiguration(ProjectConfigurationManager.java:488)
at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager.lambda$4(ProjectConfigurationManager.java:416)
at java.base/java.util.Collection.removeIf(Collection.java:576)
at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager.updateProjectConfiguration0(ProjectConfigurationManager.java:410)
at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager.lambda$3(ProjectConfigurationManager.java:340)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:364)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:274)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:213)
at org.eclipse.m2e.core.internal.embedder.MavenImpl.execute(MavenImpl.java:1102)
at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager.updateProjectConfiguration(ProjectConfigurationManager.java:339)
at org.eclipse.m2e.core.ui.internal.UpdateMavenProjectJob.runInWorkspace(UpdateMavenProjectJob.java:80)
at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:43)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
I do not see any other problem yet, but they may come. Any idea what could be the reason?
The failure messages does not disappear, when I try to reduce the project, even not if I delete .metadata and restart Eclipse.
The pom.xml:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>net.codejava</groupId>
<artifactId>HelloREST</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
<name>HelloREST</name>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<release>17</release>
</configuration>
</plugin>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>3.2.3</version>
<configuration>
<warName>HelloREST</warName>
<outputDirectory>/opt/tomcat/webapps/</outputDirectory>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.glassfish.jersey.containers</groupId>
<artifactId>jersey-container-servlet</artifactId>
<version>3.1.1</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.inject</groupId>
<artifactId>jersey-hk2</artifactId>
<version>3.1.1</version>
</dependency>
<dependency>
<groupId>jakarta.ws.rs</groupId>
<artifactId>jakarta.ws.rs-api</artifactId>
<version>3.1.0</version>
</dependency>
<dependency>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
<version>4.0.0</version>
</dependency>
<dependency>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
<version>4.0.1</version>
<scope>runtime</scope>
</dependency>
</dependencies>
</project>
The following steps solved my problem:
Deleting the project from Eclipse Project Explorer, but not from the file system.
Deleting the .settings folder in the file system
Import the project again as Existing Maven Project
=====
I investigated a bit deeper. I found a reason with 2 file in the .settings folder:
org.eclipse.wst.common.component
org.eclipse.wst.common.project.facet.core.xml
The fist one was nearly empty. Just
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId"/>
The second contained a line
<installed facet="jst.web" version="5.0"/>
Deleting that line and re-import the project replaced it by
<installed facet="jst.web" version="2.5"/>
and filled the first file with
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
<wb-module deploy-name="HelloREST">
<wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/>
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
<property name="context-root" value="HelloREST"/>
<property name="java-output-path" value="/HelloREST/target/classes"/>
</wb-module>
</project-modules>
I have no clue about this, but two question are still unanswered (currently not very important to me):
How did the .settings files got garbled?
Why does Eclipse Import Existing Maven Project look at .settings files, while it works in the same way, when .settings files are deleted?
#nitind: From https://github.com/rolfschumacher/RoS-HelloREST.git you may git clone the erroneous project.

I keep getting this error in eclipse when i try to run my javafx program [duplicate]

I have this classical issue: Using JavaFX 11 with OpenJDK 11 together with Eclipse IDE.
Error: JavaFX runtime components are missing, and are required to run this application
I have OpenJDK 11.0.2
dell#dell-pc:~$ java -version
openjdk version "11.0.2" 2019-01-15
OpenJDK Runtime Environment 18.9 (build 11.0.2+9)
OpenJDK 64-Bit Server VM 18.9 (build 11.0.2+9, mixed mode)
dell#dell-pc:~$
And I also have JavaFX 11 SDK. By the way! I'm using Lubuntu Linux 18.10 if you wonder.
Then I have included the .jar files from the JavaFX 11 SDK in Eclipse IDE into a library package.
Then I have included this library package into my JAdaptiveMPC project.
I get no error in my code syntax, but still, I cannot compile my project.
Do you know why? I got the same error if I import all those .jar files from Maven instead of download the JavaFX SDK and import it into a library.
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>Control</groupId>
<artifactId>JAdaptiveMPC</artifactId>
<version>0.0.1-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx</artifactId>
<version>13-ea+5</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-base</artifactId>
<version>13-ea+5</version>
</dependency>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-controls</artifactId>
<version>13-ea+5</version>
</dependency>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-graphics</artifactId>
<version>13-ea+5</version>
</dependency>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-swing</artifactId>
<version>13-ea+5</version>
</dependency>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-web</artifactId>
<version>13-ea+5</version>
</dependency>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-media</artifactId>
<version>13-ea+5</version>
</dependency>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-fxml</artifactId>
<version>13-ea+5</version>
</dependency>
</dependencies>
</project>
Continue
I have added this in the Run Configuration
And then I try to run
Still errors.
Your problem is not compiling the project, but running it.
Since your main is defined in your Application-extension, running the project will require JavaFX in your module path on startup.
So either outsource your main into a class different from your Application or add the JavaFX modules with VM arguments:
--module-path="<javafx-root>\lib" --add-modules="javafx.base,javafx.controls,javafx.media,…"
See this for some more info.
The question is old but this how it did work for me in intellij(linux) :
1- go to run -> edit configurations
2- add the path in VM Options :
--module-path yourpath/lib --add-modules javafx.controls,javafx.fxml
In eclipse I selected this MODULE PATH option from the dropdown and it worked for me - I didnt need the vm agruments. Make sure the JavaFx Jars are added in the ModulePath under Dependencies Tab (Eclipse >> Project >> Configurations)
I was working on Eclipse. For me, running the class with the below VM arguments worked:
-p C:\<your_path>\javafx-sdk-11\lib --add-modules javafx.controls,javafx.base,javafx.fxml,javafx.graphics,javafx.media,javafx.web --add-opens=javafx.graphics/javafx.scene=ALL-UNNAMED --add-exports javafx.base/com.sun.javafx.event=ALL-UNNAMED
-Djava.library.path="C:\<your_path>\javafx-sdk-11\bin"

Eclipse 2020-03: java.lang.StackOverflowError on validating Maven project

When eclipse start validating my Maven project I receive a java.lang.StackOverflowError. I use the maven version 3.3 external.
This is my pom from my project:
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt</artifactId>
<version>${gwt.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<!-- GWT -->
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-servlet</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-user</artifactId>
<!-- "provided" so that we don't deploy -->
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-dev</artifactId>
<!-- "provided" so that we don't deploy -->
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.googlecode.gwtupload</groupId>
<artifactId>gwtupload</artifactId>
<version>1.0.3</version>
</dependency>
<dependency>
<groupId>com.smartgwt</groupId>
<artifactId>smartgwt</artifactId>
<version>2.4</version>
</dependency>
<dependency>
<groupId>gwt-dev-calendar</groupId>
<artifactId>gwt-dev-calendar</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>1.4</version>
</dependency>
<dependency>
<groupId>javax.mail</groupId>
<artifactId>javax.mail-api</artifactId>
<version>1.6.2</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.8.6</version>
</dependency>
<dependency>
<groupId>commons-validator</groupId>
<artifactId>commons-validator</artifactId>
<version>1.7</version>
</dependency>
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-api</artifactId>
<version>2.2.20</version>
</dependency>
<dependency>
<groupId>org.richfaces.ui</groupId>
<artifactId>richfaces-components-ui</artifactId>
<version>4.3.7.Final</version>
</dependency>
<dependency>
<groupId>net.sf.advanced-gwt</groupId>
<artifactId>advanced-gwt</artifactId>
<version>2.0.9</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>de.knightsoft-net</groupId>
<artifactId>gwt-commons-validator</artifactId>
<version>1.7-0</version>
</dependency>
<dependency>
<groupId>org.xhtmlrenderer</groupId>
<artifactId>flying-saucer-pdf</artifactId>
<version>9.1.20</version>
<exclusions>
<exclusion>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk14</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.lowagie</groupId>
<artifactId>itext</artifactId>
<version>2.1.7</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.glassfish.web</groupId>
<artifactId>el-impl</artifactId>
<version>2.2</version>
</dependency>
This is the eclipse log where the stack overflow occures:
!ENTRY org.eclipse.core.jobs 4 2 2021-03-18 09:25:11.725
!MESSAGE An internal error occurred during: "Validating project_MAVEN".
!STACK 0
java.lang.StackOverflowError
at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:178)
at java.io.InputStreamReader.read(InputStreamReader.java:184)
at org.eclipse.json.provisonnal.com.eclipsesource.json.JsonParser.read(JsonParser.java:326)
at org.eclipse.json.provisonnal.com.eclipsesource.json.JsonParser.readStringInternal(JsonParser.java:206)
at org.eclipse.json.provisonnal.com.eclipsesource.json.JsonParser.readString(JsonParser.java:192)
at org.eclipse.json.provisonnal.com.eclipsesource.json.JsonParser.readValue(JsonParser.java:83)
at org.eclipse.json.provisonnal.com.eclipsesource.json.JsonParser.readObject(JsonParser.java:144)
I tried already with another eclipse version without success. Could it be a dependency issue in my pom?
> at org.eclipse.json.provisonnal.com.eclipsesource.json.JsonParser.readObject(JsonParser.java:144)
at org.eclipse.json.provisonnal.com.eclipsesource.json.JsonParser.readValue(JsonParser.java:87)
!SESSION 2021-03-18 10:14:24.966 -----------------------------------------------
eclipse.buildId=4.15.0.I20200305-0155
java.version=1.8.0_282
java.vendor=Red Hat, Inc.
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
Framework arguments: -product org.eclipse.epp.package.jee.product
Command-line arguments: -os linux -ws gtk -arch x86_64 -product org.eclipse.epp.package.jee.product -clean
!ENTRY org.eclipse.jface 2 0 2021-03-18 10:28:19.469
!MESSAGE Keybinding conflicts occurred. They may interfere with normal accelerator operation.
!SUBENTRY 1 org.eclipse.jface 2 0 2021-03-18 10:28:19.469
!MESSAGE A conflict occurred for CTRL+SHIFT+T:
Binding(CTRL+SHIFT+T,
ParameterizedCommand(Command(org.eclipse.jdt.ui.navigate.open.type,Open Type,
Open a type in a Java editor,
Category(org.eclipse.ui.category.navigate,Navigate,null,true),
org.eclipse.ui.internal.WorkbenchHandlerServiceHandler#4bd39edc,
,,true),null),
org.eclipse.ui.defaultAcceleratorConfiguration,
org.eclipse.ui.contexts.window,,,system)
Binding(CTRL+SHIFT+T,
ParameterizedCommand(Command(org.eclipse.lsp4e.symbolinworkspace,Go to Symbol in Workspace,
,
Category(org.eclipse.lsp4e.category,Language Servers,null,true),
org.eclipse.ui.internal.WorkbenchHandlerServiceHandler#3ba50851,
,,true),null),
org.eclipse.ui.defaultAcceleratorConfiguration,
org.eclipse.ui.contexts.window,,,system)
!ENTRY org.eclipse.core.net 1 0 2021-03-18 10:28:25.383
!MESSAGE System property http.proxyHost is set to but should not be set.
!ENTRY org.eclipse.core.net 1 0 2021-03-18 10:28:25.384
!MESSAGE System property http.proxyPort is set to but should not be set.
!ENTRY org.eclipse.core.net 1 0 2021-03-18 10:28:25.385
!MESSAGE System property https.proxyHost is set to but should not be set.
!ENTRY org.eclipse.core.net 1 0 2021-03-18 10:28:25.385
!MESSAGE System property https.proxyPort is set to but should not be set.
!ENTRY com.gwtplugins.gwt.eclipse.wtp 1 1 2021-03-18 10:28:27.117
!MESSAGE GWT: GWT Facet startup
!ENTRY org.eclipse.m2e.logback.appender 2 0 2021-03-18 10:28:32.550
!MESSAGE The POM for cob.plugins.maven:schema-packager-plugin:jar:0.0.1-SNAPSHOT is missing, no dependency information available
!ENTRY org.eclipse.m2e.logback.appender 2 0 2021-03-18 10:28:32.553
!MESSAGE The POM for cob.plugins.maven:schema-packager-plugin:jar:0.0.1-SNAPSHOT is missing, no dependency information available
!ENTRY org.eclipse.m2e.logback.appender 2 0 2021-03-18 10:28:32.554
!MESSAGE The POM for cob.plugins.maven:schema-packager-plugin:jar:0.0.1-SNAPSHOT is missing, no dependency information available
!ENTRY com.gwtplugins.gdt.eclipse.suite.update 1 0 2021-03-18 10:28:35.441
!MESSAGE Sending POST request to Analytics: {cd1=org.eclipse.epp.package.jee.product, cd4=com.gwtplugins.eclipse.suite.v3.feature_0.0.0.0, cd3=3.13.700.v20200209-1624, t=event, cd6=GWT 2.8.1, v=1, ea=GWT_COMPILATION, an=GWT Eclipse Plugin, tid=UA-62291716-1, ec=com.gwtplugins.gdt.eclipse.suite.update, cd10=1599469239045, cid=1599469239045}
!ENTRY com.gwtplugins.gdt.eclipse.suite.update 1 0 2021-03-18 10:28:35.441
!MESSAGE Sending POST request to Analytics: {cd1=org.eclipse.epp.package.jee.product, cd4=com.gwtplugins.eclipse.suite.v3.feature_0.0.0.0, cd3=3.13.700.v20200209-1624, t=event, cd6=GWT 2.8.1, v=1, ea=GWT_COMPILATION, an=GWT Eclipse Plugin, tid=UA-62291716-1, ec=com.gwtplugins.gdt.eclipse.suite.update, cd10=1599469239045, cid=1599469239045}
!ENTRY com.gwtplugins.gdt.eclipse.suite.update 1 0 2021-03-18 10:28:35.444
!MESSAGE Analytics ping request parameters: cd1=org.eclipse.epp.package.jee.product&cd4=com.gwtplugins.eclipse.suite.v3.feature_0.0.0.0&cd3=3.13.700.v20200209-1624&t=event&cd6=GWT%202.8.1&v=1&ea=GWT_COMPILATION&an=GWT%20Eclipse%20Plugin&tid=UA-62291716-1&ec=com.gwtplugins.gdt.eclipse.suite.update&cd10=1599469239045&cid=1599469239045
!ENTRY com.gwtplugins.gdt.eclipse.suite.update 1 0 2021-03-18 10:28:35.444
!MESSAGE Analytics ping request parameters: cd1=org.eclipse.epp.package.jee.product&cd4=com.gwtplugins.eclipse.suite.v3.feature_0.0.0.0&cd3=3.13.700.v20200209-1624&t=event&cd6=GWT%202.8.1&v=1&ea=GWT_COMPILATION&an=GWT%20Eclipse%20Plugin&tid=UA-62291716-1&ec=com.gwtplugins.gdt.eclipse.suite.update&cd10=1599469239045&cid=1599469239045
!ENTRY com.gwtplugins.gdt.eclipse.suite.update 1 0 2021-03-18 10:28:35.490
!MESSAGE Analytics ping response: 200: OK
GIF89a �� ��� , D ;
!ENTRY com.gwtplugins.gdt.eclipse.suite.update 1 0 2021-03-18 10:28:35.491
!MESSAGE Analytics ping response: 200: OK
GIF89a �� ��� , D ;

tycho surefire with windowtester pro does not open correct window

I'm trying to set up a UI testing system with windowtester pro. I want to link those tests into the maven build process by using the Tycho plugin. For practising purpose I'm currently using an example project.
Now, when I build my project everything seems to compile fine, but when the test starts I get the following message and a default eclipse window pops up. The test is then executed on that window and -suprise- fails.
Framework arguments:
-application org.eclipse.tycho.surefire.osgibooter.uitest
-testproperties C:\Users\jla\workspace\com.example.addressbook.test\target
\surefire.properties
-product com.example.addressbook.bundle.product
Command-line arguments:
-debug
-consolelog
-data C:\Users\jla\workspace\com.example.addressbook.test\target\work\data
-dev file:/C:/Users/jla/workspace/com.example.addressbook.test/target/dev.properties
-application org.eclipse.tycho.surefire.osgibooter.uitest
-testproperties C:\Users\jla\workspace\com.example.addressbook.test\target
\surefire.properties
-product com.example.addressbook.bundle.product
!ENTRY org.eclipse.ui 4 4 2012-10-12 16:00:36.984
!MESSAGE Exception in org.eclipse.ui.internal.FolderLayout.addView(String):
org.eclipse.ui.PartInitException: View descriptor not found:
org.eclipse.ui.navigator.ProjectExplorer
!ENTRY org.eclipse.ui 4 4 2012-10-12 16:00:36.990
!MESSAGE Exception in org.eclipse.ui.internal.FolderLayout.addView(String):
org.eclipse.ui.PartInitException: View descriptor not found:
org.eclipse.ui.navigator.ProjectExplorer
!STACK 1
org.eclipse.ui.PartInitException: View descriptor not found: org.eclipse.ui.navigator.ProjectExplorer
This is the Pom.xml I have for my test project:
<?xml version="1.0" encoding="UTF-8"?>
<project
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.example.addressbook</groupId>
<artifactId>com.example.addressbook.build</artifactId>
<version>1.0.0-SNAPSHOT</version>
<relativePath>../com.example.addressbook.build</relativePath>
</parent>
<artifactId>com.example.addressbook.test</artifactId>
<packaging>eclipse-test-plugin</packaging>
<build>
<plugins>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-surefire-plugin</artifactId>
<version>${tycho-version}</version>
<configuration>
<testSuite>com.example.addressbook.test</testSuite>
<testClass>com.example.addressbook.test.AppTest001</testClass>
<useUIHarness>true</useUIHarness>
<useUIThread>true</useUIThread>
<!-- use our product and application to launch the tests -->
<product>com.example.addressbook.bundle.product</product>
<!-- <application>org.eclipse.ui.ide.workbench</application>-->
<dependencies>
<dependency>
<type>p2-installable-unit</type>
<artifactId>com.windowtester.runtime.feature.group</artifactId>
<version>0.0.0</version>
</dependency>
</dependencies>
</configuration>
</plugin>
</plugins>
</build>
</project>
I finally found a way to make it work. Since tycho is using the project informations created by eclipse it is necessary to reference the project that is supposed to be tested in the MANIFEST.MF file.
This is my MANIFEST.MF file:
Bundle-Name: Test Bundle
Bundle-Version: 1.0.0.qualifier
Bundle-SymbolicName: com.example.addressbook.test
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Require-Bundle: org.junit,
com.windowtester.runtime,
com.windowtester.swt.runtime,
com.windowtester.swing.runtime,
org.eclipse.jface,
org.eclipse.core.runtime,
org.eclipse.swt,
com.example.addressbook.bundle,
com.example.addressbook.services
And this is what my pom.xml looks like. Note: I just added an application tag right under the product tag.
<?xml version="1.0" encoding="UTF-8"?>
<project
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.example.addressbook</groupId>
<artifactId>com.example.addressbook.build</artifactId>
<version>1.0.0-SNAPSHOT</version>
<relativePath>../com.example.addressbook.build</relativePath>
</parent>
<artifactId>com.example.addressbook.test</artifactId>
<packaging>eclipse-test-plugin</packaging>
<build>
<plugins>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-surefire-plugin</artifactId>
<version>${tycho-version}</version>
<configuration>
<testSuite>com.example.addressbook.test</testSuite>
<testClass>com.example.addressbook.test.AppTest01</testClass>
<useUIHarness>true</useUIHarness>
<useUIThread>true</useUIThread>
<!-- use our product and application to launch the tests -->
<product>com.example.addressbook.bundle.product</product>
<application>com.example.addressbook.bundle.application</application>
<dependencies>
<dependency>
<type>p2-installable-unit</type>
<artifactId>com.windowtester.runtime.feature.group</artifactId>
<version>0.0.0</version>
</dependency>
</dependencies>
</configuration>
</plugin>
</plugins>
</build>
</project>

Maven + Spring + Dynamic Web Module ( Eclipse ) = java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener

My problem is that even set the "Deployment Assembly" to include the maven dependencies, this giving that my class is not being found, I do not know what else to do.
And I'm just noticing that with the ContextLoaderListener class since other classes seem to be included in my package.
My file pom.xml
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.mkyong.common</groupId>
<artifactId>SpringMVC</artifactId>
<packaging>war</packaging>
<version>1.0-SNAPSHOT</version>
<name>SpringMVC Maven Webapp</name>
<url>http://maven.apache.org</url>
<dependencies>
<!-- <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId>
<version>3.8.1</version> <scope>test</scope> </dependency> -->
<!-- Spring framework -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring</artifactId>
<version>2.5.6</version>
</dependency>
<!-- Spring MVC framework -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>2.5.6</version>
</dependency>
<!-- JSTL -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<version>1.1.2</version>
</dependency>
<dependency>
<groupId>taglibs</groupId>
<artifactId>standard</artifactId>
<version>1.1.2</version>
</dependency>
<!-- for compile only, your container should have this -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.5</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<finalName>SpringMVC</finalName>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>tomcat-maven-plugin</artifactId>
<version>1.0-beta-1</version>
<configuration></configuration>
</plugin>
</plugins>
</build>
</project>
My file web.xml
<web-app id="WebApp_ID" version="2.4"
xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<display-name>Spring Web MVC Application</display-name>
<servlet>
<servlet-name>mvc-dispatcher</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>mvc-dispatcher</servlet-name>
<url-pattern>*.htm</url-pattern>
</servlet-mapping>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/mvc-dispatcher-servlet.xml</param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
</web-app>
This problem seems to be either due to:
Some library version mismatch (ie. java version to compile != java
version on web app server).
Required Spring library not included during deployment.
Maven archetypes used to setup the project
Perform these steps to try fix this issue:
In pom.xml > if you use maven-compiler-plugin, double check this is matching the version of the library used, if not change it (ie. 1.7 NOT 1.6).
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
If you changed the library version in the above step, you then must do: Right Click on Project > Maven > Update Project... If an error is thrown during this step, you may find yourself stuck for good. I had this issue and could not resolve it. I ended up giving up creating my "Spring MVC with Maven" in Eclipse using archetypes. I believe using archetypes messed things up..in my case.
Right Click on Project > Properties > Java Build Path > JRE System Library > Edit > choose correct library version
Right Click on Project > Properties > Project Facets > Dynamic Web module (should be checked) > Runtimes tab on the right side of the panel > choose the server created (you must have added a server previously).
Right Click on Project > Properties > Deployment Assembly > Add > Java Build Path Entries > select the Spring dependencies. This is from ClassNotFoundException while loading ContextLoaderListener Note: You must perform this step every time after doing a "Maven > Update Project" in eclipse
Remember to clean your project before to deploy it: Project > Clean
... > select project > clean
Deploy your project and see it NOT break... hopefully
In my case, I had to restart a new project without using maven archetypes to get going. I used these guidelines http://gkokkinos.wordpress.com/2012/01/02/setting-up-a-spring-mvc-project-with-maven-in-eclipse/ . I still had an error thrown, but adding the Spring dependencies via Deployment Assembly (as described above) fixed things up.
I had this same problem. Simple solution is to right click the top level project -> Properties -> Deployment Assembly and include the 'Maven Dependencies'. In my case this is where my problem was. The class DispatcherServlet was not being included in the war file, therefore it was not found by Tomcat when I deployed it to that server.
I had similar issue and followed these steps to fix it.
Open Server tab in eclipse. Right click on your server.
Clean (Tomcat) Work directory
Clean (this is different than Work directory clean up which you could see in right click context)