Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Unable to deploy a JSF project with Eclipse Mars  RSS feed

 
Christopher Sharp
Ranch Hand
Posts: 158
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I've been using Eclipse Kepler with Java 1.7, Glassfish 4 and JSF 2.2 successfully for a while. I've just installed Eclipse Mars, the latest version, and installed Java 1.8_66, and got a simple "Hello World" test to run in the console mode. After downloading Glassfish 4.1.1, the latest version, I set up a simple "Hello World JSF" project, but I'm unable to associate it with the server. On right clicking on the Glassfish server in the server window and selecting "Add and Remove", I keep getting the message:

"There are no resources that can be added or removed from the server."

On right clicking on the project then selecting Properties > Project Facets, everything appears to be in order, and have the following selected:

Dynamic Web Module 3.1
Glassfish Web Extensions 4.0
Java 1.8
JavaScript 1.0
JavaServer Faces 2.2

which is identical to the setup I had with Eclipse Kepler, except for the version of Java, and as far as I know, there is no Glassfish Web Extensions 4.1. What is going wrong, and how to I associate the project with the server?

Glassfish is running normally, and get the greeting page at localhost:8080 when I start it manually using asadmin start-domain in the console. However, if I start it from Eclipse, I get the following text in the Eclipse console:

Starting preview server on port 8080

2015-12-25 19:01:41.539:INFO::main: Logging initialized @1285ms
2015-12-25 19:01:41.793:INFO:oejs.Server:main: jetty-9.2.13.v20150730
2015-12-25 19:01:42.173:INFO:oejs.ServerConnector:main: Started ServerConnector@3bcacab5{HTTP/1.1}{0.0.0.0:8080}
2015-12-25 19:01:42.177:INFO:oejs.Server:main: Started @1931ms

with the last four lines in red. When I go to localhost:8080 I get the message:

Error 404 - Not Found
No context on this server matched or handled this request.
Contexts known to this server are:

so the server is obviously running, but doesn't pick up the HTML in the default page. This is presumably related in some way to why I cannot get anything linked with Glassfish in Eclipse.

Some ideas on what is happening and how to fix this would be very welcomed indeed, as I really want to upgrade to the latest version of Eclipse, Java and Glassfish.
 
Christopher Sharp
Ranch Hand
Posts: 158
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, I got no replies, but eventually after a lot of time messing around, I just discovered that Eclipse had not been configured properly with Glassfish.

I'm happy that now I've got Eclipse Mars working with Java 1.8 and Glassfish 4.1.1.

Christopher Sharp
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!