how to upgrade primefaces version in eclipse by using maven? - eclipse

I want to upgrade my primefaces version from 3.1.1 to 4.0.4
I have tried writing 4.0.4 to pom.xml but it shows errors like Missing artifact org.primefaces:primefaces:jar:4
How can i do it?
org.primefaces
primefaces
3.1.1

As suggested, 4.0.4 version is only for elite registered users, but you might try to edit the pom.xml and write 4.0 instead of 4.0.4, wich is intended to general public.

Related

Class not found when using JAX-RS with Eclipse and Glassfish

I am using Eclipse Luna (versions 4.4.2) and Glassfish 4 to build a REST web-app using JAX-RS.
The following piece of code, which is just a very simple post to the REST api that was previously working just fine, has started throw a very strange error:
#POST
public Response addToWatchlist(WatchlistEntry watchlistentry)
{
return Response.ok(watchlist_service.addToWatchlist(watchlistentry).toString()).build();
}
The error is below:
Warning: StandardWrapperValve[Jersey Web Application]: Servlet.service() for servlet Jersey Web Application threw exception
java.lang.ClassNotFoundException: javax.xml.parsers.ParserConfigurationException not found by org.eclipse.persistence.moxy
All I have been able to find out about this is this webpage:
https://java.net/jira/browse/JERSEY-2888
One of the comments says this has been fixed in EclipseLink 2.6.1 and Jersey 2.19.
I am pretty new to using MAVEN and eclipse - assuming the above is correct, how do I get my Maven Project in Eclipse to update the Jersey version? Also how do I update the EclipseLink version? Their site only seems to have version 2.6.0 available: http://www.eclipse.org/eclipselink/#download
I assume all this can be done through eclipse itself?
All help appreciated!
EDIT 1: It seems like eclipselink 2.6.1 has been released on Oct 15th 2015, as you can see here: http://www.eclipse.org/eclipselink/releases/
However, as you can see here, it doesn't seem to have been incorporated into eclipse for "help -> update software": http://download.eclipse.org/rt/eclipselink/updates/
Which is highly annoying.
I am building my REST website, and no PUT or POST will work because of this error.
Does anybody know how to get 2.6.1 working? I am using a Maven jersey-quickstart-webapp Project.
This bug is a royal pain in the face.
EDIT 2: I've got a hack working today. When I check programmtically what version of eclipselink is being used at runtime like below, it tells me it is version 2.6.1, even though the bug remains:
Class<?> myClass = Class.forName("org.eclipse.persistence.Version");
Method myMethod = myClass.getMethod("getVersion");
String version = myMethod.invoke(null).toString();
System.out.println("version = " + version);
In a related question (How to find what version of EclipseLink my Eclipse Project is using?) I found out how to find the actual jar files glassfish is using for eclipse. They are in the glassfish/modules directory. Inside the org.eclipse.persistence.core.jar file has will be a readme.html which tells you the version of eclipselink that glassfish is using. For me it was 2.6.
I manually updated the org.eclipse.persistence.core.jar and the org.eclipse.persistence.moxy.jar file with the latest versions from the maven site. While this is quite hacky, as I don't know what else is effected by doing this, it does get over this problem. If I find out the correct way to do this, I will write an answer below, for all and sundry.
Going through the Jersey JIRA and eclipse link website it seems like Eclipse link 2.6.1 is still under development i.e. not yet released. That's why its not available for download.
To use an updated version of Jersey in maven you need to give depending to the newer version 2.19 in your pom.xml.
But, since eclipse link 2.6.1 is yet to be released, even if you use newer version of Jersey it might be of little use. But still you can give it a try.
To update version of jersey, find the following dependency and update the value of version tag in your pom.xml file
<dependency>
<groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-server</artifactId>
<version>2.22.1</version>
</dependency>
Which server are you deploying your project into? I've had A LOT of problems with Glassfish 4.1.1 (incluiding that error). I downgraded to 4.1 and everything runs fine. It may be due to a problem with 4.1.1 newest modules (jars incluided in the server). I hope it helps. Its not the best solution but for me was a temporary workaround 'till I find which modules are failing.
The problem was solved by updating the version of eclipselink that glassfish was using. Eclipse updated it's version, but glassfish needs it's own update. The list of jar files that need to be placed in the glassfish/modules directory is given in this answer: How to change EclipseLink in GlashFish 4.0?

Grails 3.0.1 add in Eclipse show error Specified directory does not appear to be a Grails installation

When I try to install/import Grails 3.0.1 in Eclipse I get error message
"Specified directory does not appear to be a Grails installation".
I already have installed Groovy Compiler 2.4.3. but still get same error message.
How I can install Grails 3.0.1 in Eclipse 4.4?
At grails folder you can put a file "build.properties",
/grails-3.0.1/build.properties
/install
/license
/.......
the content of this file is a single line "grails.version=3.0.1", without quotes. :-)
Now eclipse will recognize it as Grails installation.
Regards
Grails 3 is very different from earlier versions of Grails, in particular being based on Spring Boot. It will be a while before the IDEs have support for Grails 3. Eclipse will probably not have support for Grails 3 as 3.6.4 has been announced as the last release of GGTS and the Grails and Groovy tooling now that Pivotal has abandoned Grails and Groovy.
I use the lattest ggts from sping (3.6.4) the gradle plugin (installed over the spring dashboard) and the latest snapshot release of the groovy plugin for eclipse to get a groovy 2.4 compiler.
With this setup import your grails3 application as gradle application works for me.
Here are the steps for working with Grails 3 in Eclipse.
1) Get latest grails 3.X version and setup in the system.
2) Now create grails app using command line.
3) Install Gradle plugin in eclipse if not already there.
4) Import project as Gradle in eclipse, Gradle will download all required dependencies.

Version of the mongodb gorm plugin for grails 2.3.0?

I am using grails 2.3.0 and wanted to know which version of mongodb GORM is compatible with it.
The latest version of mongodb GORM requires 2.3.2 > http://grails.org/plugin/mongodb
My mongodb version currently is 2.6.0 but that should not matter I suppose.
It would be great If I could also know the gorm datastore dependencies version for grails 2.3.0 and mongodb gorm. Below are the ones for the latest mongo gorm.
dependencies {
…
compile 'org.grails:grails-datastore-gorm:3.1.0.RELEASE'
compile 'org.grails:grails-datastore-core:3.1.0.RELEASE'
test 'org.grails:grails-datastore-simple:3.1.0.RELEASE'
}
I also tried to go thru all the releases for mongodb gorm here: https://github.com/grails/grails-data-mapping/releases but did not get much of help.
In my Grails 2.3.11 app I'm using
compile ':mongodb:3.0.2'
before upgrade from 2.2.x to 2.3.x I was using :mongodb:3.0.1.
In another Grails 1.3.7 app I'm using :mongodb:1.0.0.RC4 with some hacks to enable aggregation.
I tried to find a version of plugin in between to match my Grails version best, but it's not trivial. The branch names in github have nothing to do with released plugin versions.
BTW,
early versions of Grails 2.3.0 has severe problems (don't remember which ones exactly, but they made the upgrade from 2.2.x impossible). So, I'd recommend to upgrade your Grails to the most recent 2.3.11

converting JPA 1.0 to JPA 2.0

In eclipse ,I am trying to upgrade my JPA from 1.0 to 2.0 (EJB project). I have made changes in the library and using eclipselink also but when I am again creating a project it is not giving an option of JPA 2 in faclets to select
any one have some idea whats the problem
It will depend on the version of Eclipse, and the weblogic plugin (OEPE) you are using. Without the correct connectors Eclipse is only aware that WebLogic server can run JPA1.0.
Perhaps try the latest version of OEPE pack here and point it at your workspace.
You also need to make sure the version of WebLogic you are using supports JPA2- you have tagged the question as weblogic 10.x which only supports JPA2.0 in 10.3.4 and later, and may require you to patch weblogic to enable the support.

Integration of GWT 2.5 to GWT 2.4

I am using GWT 2.4 with Hibernate 3.0. I wanted to know what changes I need to make in my application for integrating GWT 2.5 in my application ?
Nothing special.
Replace 2.4.0 dependencies with 2.5.0-rc1 ones (depending on how you manage dependencies, either download the SDK and drop the new JARs to replace the previous ones, or bump the version number in your POM –if using Maven– or similar build file).
If you're using Maven and the gwt-maven-plugin, make sure you re-define the plugin dependencies too (note gwt-maven-plugin 2.4.0 also needs gwt-servlet to be overridden); or you can test the gwt-maven-plugin 2.5.0-rc1.
Check the list of breaking changes though; chances are small that they affect you, but there's still a risk.