Spring Framework Primeface Theme not working - java

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

Related

Maven aws-java-sdk and aws-android-sdk conflict

In my maven project, I need to use aws-java-sdk-athena which has aws-java-sdk-core as a dependency. However for authentication, I have no other choices but using a provided artifact which has aws-android-sdk-core as a dependency. The problem is both of them have the com.amazonaws.http.ExecutionContext class with that exact same name. But they have different methods, etc..
I tried excluding one of them but then one of them goes off which mean those classes were used. I'm very frustrated now as it is nearly impossible to repackage one of these artifacts to change the package name in it.
<dependencies>
<!-- This dependency requires aws-java-sdk-core 1.11.292 -->
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-athena</artifactId>
<version>1.11.292</version>
</dependency>
<!-- This dependency requires aws-android-sdk-core 2.6.16 -->
<dependency>
<groupId>work.commons</groupId>
<artifactId>work-commons-authentication</artifactId>
<version>${authz.version}</version>
</dependency>
<dependencies>
<repositories>
<repository>
<id>in.house</id>
<name>nexus</name>
<url>http://work.name.com/content/groups/public/</url>
<snapshots>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</snapshots>
</repository>
</repositories>
At runtime, I got that exception:
org.springframework.web.util.NestedServletException: Handler dispatch failed; nested exception is java.lang.NoSuchMethodError: com.amazonaws.http.ExecutionContext.setContextUserAgent(Ljava/lang/String;)
That because of both java-sdk and android-sdk have the exact class com.amazonaws.http.ExecutionContext but the class in java-sdk doesn't have setContextUserAgent method. If I change the order of dependencies, the Athena connection function broke.
Solved the problem by using a stand-alone JAR file of Athena JDBC driver. All the required classes are still there with different package name. So I didn't need to install the whole aws-java-sdk-core.

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.

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.

Vaadin addon ICEpush Error during maven install

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>

Where is Facelets?

I am trying to use Facelets with MyFaces 1.2. It appears as though the Facelets download at http://facelets.dev.java.net no longer exists.
Does anyone know 1) where I can download Facelets? 2) why has Facelets been removed from this site? e.g. has it been integrated into JSF 2.0 or something?
The https://*.dev.java.net sites have been migrated to http://*.java.net at December 2010. So the Facelets project home page is now available at http://facelets.java.net, liks as that the Mojarra home page is now available at http://javaserverfaces.java.net.
However, it's true that you can't download Facelets 1.x from there anymore. You can however still download it from several online code repositories such as Maven here or here. The last one has currently 1.1.15 which was the latest release of Facelets 1.x.
And yes, since JSF 2.0, Facelets has been integrated into the JSF API to replace JSP as default view technology. Facelets is now maintained as part of JSF specification. Endusers are encouraged to use the new JSF 2.x instead of the dead JSF 1.x.
I suggest you make use of Maven to fetch and maintain your dependencies.
You can add the following profile to your settings.xml (Note that this is nested xml):
....
<profile>
<id>java-net</id>
<repositories>
<repository>
<id>Repo ID</id>
<layout>default</layout>
<name>Java.net Maven repo</name>
<releases>
<enabled>true</enabled>
</releases>
<url>http://download.java.net/maven/2/</url>
</repository>
</repositories>
</profile>
...
and in your individual projects build file(s) (also nested):
...
<dependency>
<groupId>org.apache.myfaces.core</groupId>
<artifactId>myfaces-api</artifactId>
<version>2.1.7</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.myfaces.core</groupId>
<artifactId>myfaces-impl</artifactId>
<version>2.1.7</version>
<scope>compile</scope>
</dependency>
...
Maven not only makes it easy to locate and manage dependencies, but also abstracts your project from an IDE if using one.

Categories