Vaadin addon ICEpush Error during maven install - java

I am trying to use Vaadin Addon ICEpush. I have added the following maven snippet to my pom.xml
<!-- vaadin icepush add-ons -->
<dependency>
<groupId>org.vaadin.addons</groupId>
<artifactId>icepush</artifactId>
<version>0.5.5</version>
</dependency>
<dependency>
<groupId>org.icepush</groupId>
<artifactId>icepush</artifactId>
<version>2.0-Beta1</version>
</dependency>
I have also added the following to pom.xml
<repository>
<id>ICEFaces</id>
<url>http://anonsvn.icefaces.org/repo/maven2/snapshots/</url>
</repository>
But when I maven install from eclipse I am getting the following error:
[ERROR] Failed to execute goal org.codehaus.mojo:gwt-maven-plugin:2.5.1:compile
(default-cli) on project sudo: GWT Module org.icepush.gwt.ICEpush not found
in project sources or resources. -> [Help 1]
any suggestions on how to solve this is greatly appreciated

Since Vaadin 7.1 is released, you get the push function from the framework(#Push Annotation). See here. This mean you dont need the plugin ICEPush anymore.
If you want implement ICEPush for a Vaadin version below 7.1, you should take a look on this site.
The Maven Implementation should looks like this:
<dependency>
<groupId>org.vaadin.addons</groupId>
<artifactId>icepush</artifactId>
<version>0.5.5</version>
</dependency>
<repository>
<id>vaadin-addons</id>
<url>http://maven.vaadin.com/vaadin-addons</url>
</repository>
And you have to add to your web.xml file the following lines
<servlet>
<servlet-name>ICEPush for Portlets</servlet-name>
<servlet-class>org.vaadin.artur.icepush.ICEPushServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>ICEPush for Portlets</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>

Related

Spring Framework Primeface Theme not working

I want to set the bootstrap theme and have followed the steps describe here
https://www.primefaces.org/showcase/getstarted.xhtml
I use maven and added the repository
<repository>
<id>prime-repo</id>
<name>PrimeFaces Maven Repository</name>
<url>http://repository.primefaces.org</url>
<layout>default</layout>
</repository>
and added the dependency
<dependency>
<groupId>org.primefaces.themes</groupId>
<artifactId>all-themes</artifactId>
<version>1.0.10</version>
</dependency>
I can clearly see the all-themes.jar in the maven dependencies so I guess the steps above work as expected. After that, I added the following to web.xml
<context-param>
<param-name>primefaces.THEME</param-name>
<param-value>bootstrap</param-value>
</context-param>
Unfortunately, nothing changed since then. I still get the default theme without any error (neither in the eclipse output nor in the web console) indicating what is wrong.
In the end I did not find the issue.
There was no theme specified ANYWHERE ELSE.
I downloaded the jar manually, extracted the css, importet it into the ressources folder and linked it manually in the main html

Jersey error java.lang.ClassNotFoundException: com.sun.jersey.spi.container.servlet.ServletContainer

My Node.JS API (localhost) call a Jersey API on the Tomcat server (localhost) worked really well previously, but I don't know why it accidentally failed today. I have checked that all files have not modified since last week. Once I tried to GET http://localhost:8080/graybox/rest/analytic
It will fail and show these message in the eclipse console.
SEVERE: Allocate exception for servlet [Jersey Web Application]
java.lang.ClassNotFoundException: com.sun.jersey.spi.container.servlet.ServletContainer
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1291)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1119)
at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:544)
...
I have surveyed a lot but I still can't find a way to solve my problem. The following is what I have done previously try to resolve this issue, which also attaches dev environment, web.xml and pom.xml. Thanks.
Install maven (brew), m2eclipse (Eclipse install new software), m2e-wtp (Eclipse install new software) Eclipse install new software: Help -> Install New Software -> copy paste the url into "Work with" -> Choose all and Next and Finish m2eclipsem2e-wtp
Eclipse: Import -> Existing Maven project -> choose "graybox" project folder
Rebuild Maven global index in Eclipse: Detail
Add dependencies in Maven to make sure all jersey dependencies in the same version e.g. all 1.19 version jersey-server, jersey-bundle, jersey-core, jersey-json Reasons
Clean Maven dependencies
Project -> Clean -> Clean
Right click project -> Maven -> Update Project
Right click project -> Run as -> 4 (or 5) Maven build -> Goals: clean install -> Apply -> Run Detail
If there are more than one Tomcat servers running, remove unrelated Tomcat servers, make sure choose the right one in runtime: Window -> Preferences -> Server -> Runtime Environments -> Remove all unrelated servers
Add server Tomcat Detail Before running the server, double-click the server -> Server Locations: Use Tomcat installation … Detail
Right click project -> Properties -> Project facets -> Choose: Dynamic Web Module, Java, JavaScript, JAX-RS (REST Web Services) -> Runtimes -> Choose the right server -> Apply -> Apply and Choose
Start server -> Run project -> browser http://localhost:8080/ -> show welcome page of Tomcat
Environment
Mac os x 10.13.2, x86_64
Eclipse Oxygen.2 Release (4.7.2)
Back-end
Java jdk1.8.0_151-b12
Tomcat 8.5
Maven 3.5.2
Default locale: en_AU, platform encoding: UTF-8
Jersey 1.19
Node 8.9.4
NPM 5.6.0
Bower 1.8.2
Nodemon 1.14.11
This is web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" version="3.1">
<display-name>Graybox</display-name>
<servlet>
<servlet-name>Jersey Web Application</servlet-name>
<servlet-class>com.sun.jersey.spi.container.servlet.ServletContainer</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>Jersey Web Application</servlet-name>
<url-pattern>/rest/*</url-pattern>
</servlet-mapping>
</web-app>
This is 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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>graybox</groupId>
<artifactId>graybox</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
<build>
<finalName>graybox</finalName>
<sourceDirectory>src</sourceDirectory>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.6.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>3.0.0</version>
<configuration>
<warSourceDirectory>WebContent</warSourceDirectory>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.3.4</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.0</version>
</dependency>
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-server</artifactId>
<version>1.19</version>
</dependency>
<dependency>
<groupId>net.sourceforge.jexcelapi</groupId>
<artifactId>jxl</artifactId>
<version>2.6.10</version>
</dependency>
<dependency>
<groupId>asm</groupId>
<artifactId>asm</artifactId>
<version>3.3.1</version>
</dependency>
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-bundle</artifactId>
<version>1.19</version>
</dependency>
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20170516</version>
</dependency>
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-core</artifactId>
<version>1.19</version>
</dependency>
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-json</artifactId>
<version>1.19</version>
</dependency>
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-servlet</artifactId>
<version>1.19</version>
</dependency>
</dependencies>
</project>
Due to accidentally shut down my Eclipse, it seems that the Java Build Path doesn't save Maven. It is the same as one of the answers answered by Adi
java.lang.ClassNotFoundException: com.sun.jersey.spi.container.servlet.ServletContainer
Right click your eclipse project Properties -> Deployment Assembly -> Add -> Java Build Path Entries -> Gradle Dependencies -> Finish.

How include MapDB in a GWT project

I'm using this Guide for adding MapDb to my project.
i'm trying to make a simple user registration but i don't understand where and how i can put the lib inside my project!
Where include this code
<dependency>
<groupId>org.mapdb</groupId>
<artifactId>mapdb</artifactId>
<version>VERSION</version>
</dependency>
and this code
<repositories>
<repository>
<id>sonatype-snapshots</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.mapdb</groupId>
<artifactId>mapdb</artifactId>
<version>VERSION</version>
</dependency>
</dependencies>
i'm new with GWT and MapDB and if someone can tell me how put the libraries of MapDB with all steps it's can be very grateful!
After that i manage the data store/retrieve in the server gwt application?
While this is a very old question, I'll reply in case it's still helpful to you.
The XML configuration code you've quoted above should be inserted in a Maven POM file. Maven is a configuration management tool for Java-based projects.
If you aren't using or don't want to start using Maven, you can download the jar from Maven central and add it manually to your project.

JBOSS not finding my project's Maven Dependency

I am running a MAVEN app inside JBOSS AS 5.1 that has a jersey-server dependency. This is my pom.xml entry for the dependency.
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-server</artifactId>
<version>1.8</version>
<scope>runtime</scope>
</dependency>
Simple, right? Here is my web.xml for the project which points to the Servlet Container that exists within this jar.
<servlet>
<servlet-name>JerseyAPI</servlet-name>
<servlet-class>com.sun.jersey.spi.container.servlet.ServletContainer</servlet-class>
<init-param>
<param-name>com.sun.jersey.config.property.packages</param-name>
<param-value>edu.emory.clinical.trials.api</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>JerseyAPI</servlet-name>
<url-pattern>/api/*</url-pattern>
</servlet-mapping>
Although the server starts up fine, I get a ClassNotFoundException for com.sun.jersey.spi.container.servlet.ServletContainer when I attempt to hit the configured #Path. I'm using Eclipse as my IDE, and I can clearly see the class is generated in the maven repository dependency structure (.m2/repository/com/sun/jersey/...).
I'm a bit new to Maven, so I'm sure there must be something basic I am missing, but it doesn't appear that JBOSS is recognizing my project's runtime dependencies that I've declared in the POM. Any advice would be appreciated.
I believe <scope>runtime</scope> is going to be your problem. Look into the <scope> tags.

Vaadin Maven Repo and Artifactory

I developed an java web-app application with spring and vaadin, in this application, I used some addons like easyuploads and wizards-for-vaadin. Then i added the following configuration in my pom.xml.
<dependency>
<groupId>org.vaadin.addon</groupId>
<artifactId>easyuploads</artifactId>
<version>7.0.1</version>
</dependency>
<dependency>
<groupId>org.vaadin.addons</groupId>
<artifactId>wizards-for-vaadin</artifactId>
<version>1.1.0</version>
</dependency>
<!-- Add-On Repository -->
<repositories>
<repository>
<id>vaadin-addons</id>
<url>http://maven.vaadin.com/vaadin-addons</url>
</repository>
</repositories>
Now I'm installing artifactory (for the first time) like tool of repository managment and I thought to add a remote repository for the vaadin-addons. But this not work:
How can I solve it ?
Is this the correct way?
Their repository is not browsable, that's why you get the 404 on testing. You can disregard the error, if should resolve the artifacts just fine (assuming the coordinates are correct).
We found out by accident that there seems to exist a browsable Nexus repository now: http://vaadin.com/nexus/content/repositories/vaadin-addons/
We have successfully included it as a proxy repository in our local Nexus installation.

Categories