Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » Error while trying to create JavaServer Faces project
Error while trying to create JavaServer Faces project [message #832206] Thu, 29 March 2012 22:45 Go to next message
Alex Averbuch is currently offline Alex AverbuchFriend
Messages: 13
Registered: March 2012
Junior Member
Hi,
I'm currently learning how to develop JavaServer Faces web applications, using Eclipse. To do so I'm following a tutorial (as I've posted less than 25 comments, I can't share the link to the tutorial in this thread).

However, Eclipse gives me an error when I try to create a JavaServer Faces project.
Any/all help in resolving this is greatly appreciated!

Here's what I did:

(1) File->New->Dynamic Web Project

(2) On "Dynamic Web Project" page
Project name: "JSFProject"
Configuration: JavaServer Faces V2.0 Project
<press> Next

(3) On "Java" page
<press> Next

(4) On "Web Module" page
<select> "Generate web.xml deployment descriptor"
<press> Next

(5) On "JSF Capabilities" page
Because this is the first time I'm creating a JSF project, I need to install/download a JSF implementation.
<press> "Download library..."

(6) After pressing the "Download library..." button I get this error:

Unhandled event loop exception
No more handles [MOZILLA_FIVE_HOME='/usr/lib64/xulrunner-addons'] (java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons:
Can't load /opt/eclipse/eclipse_v3.6.2/configuration/org.eclipse.osgi/bundles/151/1/.cp/libswt-mozilla-gtk-3659.so
no swt-mozilla-gtk in java.library.path
Can't load library: /tmp/swtlib-64/libswt-mozilla-gtk-3659.so
Can't load library: /tmp/swtlib-64/libswt-mozilla-gtk.so
)


Any ideas?

Regards,
Alex
Re: Error while trying to create JavaServer Faces project [message #832347 is a reply to message #832206] Fri, 30 March 2012 03:32 Go to previous messageGo to next message
Bob Sadarka is currently offline Bob SadarkaFriend
Messages: 40
Registered: February 2012
Member
Looks like it is the problem of Eclipse SWT library, not JSF or WTP plugin. Looks like the libswt-mozilla-gtk files are missing. Try to update Eclipse.
Re: Error while trying to create JavaServer Faces project [message #832523 is a reply to message #832347] Fri, 30 March 2012 08:42 Go to previous messageGo to next message
Alex Averbuch is currently offline Alex AverbuchFriend
Messages: 13
Registered: March 2012
Junior Member
Bob Sadarka wrote on Thu, 29 March 2012 23:32
Looks like it is the problem of Eclipse SWT library, not JSF or WTP plugin. Looks like the libswt-mozilla-gtk files are missing. Try to update Eclipse.

Thanks for the tip, but I tried updating Eclipse and it didn't help.

I also installed all "libswt-*" packages through Synaptic Package Manager, but that didn't help either. It seems as though "libswt-mozilla-gtk" is no longer distributed.

Still looking for a solution...
Re: Error while trying to create JavaServer Faces project [message #832538 is a reply to message #832523] Fri, 30 March 2012 08:54 Go to previous messageGo to next message
Alex Averbuch is currently offline Alex AverbuchFriend
Messages: 13
Registered: March 2012
Junior Member
I've now created a duplicate thread in the SWT forum.
Is it possible to delete this thread somehow?
Re: Error while trying to create JavaServer Faces project [message #832684 is a reply to message #832206] Fri, 30 March 2012 12:52 Go to previous messageGo to next message
Russell Bateman is currently offline Russell BatemanFriend
Messages: 3798
Registered: July 2009
Location: Provo, Utah, USA
Senior Member

On 3/29/2012 4:45 PM, Alex Averbuch wrote:
> Hi,
> I'm currently learning how to develop JavaServer Faces web applications,
> using Eclipse. To do so I'm following a tutorial (as I've posted less
> than 25 comments, I can't share the link to the tutorial in this thread).
>
> However, Eclipse gives me an error when I try to create a JavaServer
> Faces project. Any/all help in resolving this is greatly appreciated!
>
> [snip]
>
> no swt-mozilla-gtk in java.library.path
> Can't load library: /tmp/swtlib-64/libswt-mozilla-gtk-3659.so
> Can't load library: /tmp/swtlib-64/libswt-mozilla-gtk.so
> )
>
>
> Any ideas?
>
> Regards,
> Alex

You might have SWT set up for another project, but understand that it's
not going to be helpful with JSF. I have some notes on JSF if you'd like
them. Ask me for them off-line, especially if you're pulling your hair
out over JAR nightmares. Also, I think http://www.vogella.de has got a
good JSF tutorial that may still work.
Re: Error while trying to create JavaServer Faces project [message #832699 is a reply to message #832684] Fri, 30 March 2012 13:27 Go to previous messageGo to next message
Alex Averbuch is currently offline Alex AverbuchFriend
Messages: 13
Registered: March 2012
Junior Member
Quote:
You might have SWT set up for another project, but understand that it's
not going to be helpful with JSF. I have some notes on JSF if you'd like
them. Ask me for them off-line, especially if you're pulling your hair
out over JAR nightmares. Also, I think vogella has got a
good JSF tutorial that may still work.

Thanks Russel,
I'm actually working my way through the Vogella JSF tutorial right now.

I've solved this issue now. The solution is posted in the SWT forum, but in short I just had to install the necessary package in Ubuntu (xulrunner-1.9.2).

Another thing, I *am* having JAR nightmares right now and I've created a thread about it in another forum: "Eclipse Projects -> JavaServer Faces -> Maven + JSF = ClassNotFoundException - javax.servlet.jsp.jstl.core.Config"
(I can't link to it as forum members with fewer than 25 posts are not able to put links in posts).

If you think you could help, please visit that thread and let me know what you think.

Thanks again,
Alex
Re: Error while trying to create JavaServer Faces project [message #832743 is a reply to message #832699] Fri, 30 March 2012 14:21 Go to previous messageGo to next message
Russell Bateman is currently offline Russell BatemanFriend
Messages: 3798
Registered: July 2009
Location: Provo, Utah, USA
Senior Member

On 3/30/2012 7:27 AM, Alex Averbuch wrote:
> Quote:
>> You might have SWT set up for another project, but understand that
>> it's not going to be helpful with JSF. I have some notes on JSF if
>> you'd like them. Ask me for them off-line, especially if you're
>> pulling your hair out over JAR nightmares. Also, I think vogella has
>> got a good JSF tutorial that may still work.
>
> Thanks Russel,
> I'm actually working my way through the Vogella JSF tutorial right now.
>
> I've solved this issue now. The solution is posted in the SWT forum, but
> in short I just had to install the necessary package in Ubuntu
> (xulrunner-1.9.2).
>
> Another thing, I *am* having JAR nightmares right now and I've created a
> thread about it in another forum: "Eclipse Projects -> JavaServer Faces
> -> Maven + JSF = ClassNotFoundException -
> javax.servlet.jsp.jstl.core.Config"
> (I can't link to it as forum members with fewer than 25 posts are not
> able to put links in posts).
>
> If you think you could help, please visit that thread and let me know
> what you think.
>
> Thanks again,
> Alex

If you're using Maven, my work is of little help. I don't like any of
the existing archetypes and what it forces me to live with in terms of
project organization. (I prefer, for instance, the default layout of the
Eclipse Dynamic Web Project without all that extra subdirectory overhead
Maven archetypes insist on adding in imitation of old, traditional
Java.) I use Ivy + ant and am much happier with them.

Best of luck.
Re: Error while trying to create JavaServer Faces project [message #832751 is a reply to message #832743] Fri, 30 March 2012 14:39 Go to previous messageGo to next message
Alex Averbuch is currently offline Alex AverbuchFriend
Messages: 13
Registered: March 2012
Junior Member
My question is not really Maven specific, it is more:
"How can I tell Eclipse to look for libraries in the Ivy/Ant/Maven libraries?"

The problem I have right now is that all of my dependencies are in fact in the Maven library, but my .jsp files can not see them for some reason. For example, in my .jsp file I get the error: "Unknown tag (f:view)."
Re: Error while trying to create JavaServer Faces project [message #832763 is a reply to message #832751] Fri, 30 March 2012 14:55 Go to previous messageGo to next message
Russell Bateman is currently offline Russell BatemanFriend
Messages: 3798
Registered: July 2009
Location: Provo, Utah, USA
Senior Member

On 3/30/2012 8:39 AM, Alex Averbuch wrote:
> My question is not really Maven specific, it is more:
> "How can I tell Eclipse to look for libraries in the Ivy/Ant/Maven
> libraries?"
>
> The problem I have right now is that all of my dependencies are in fact
> in the Maven library, but my .jsp files can not see them for some
> reason. For example, in my .jsp file I get the error: "Unknown tag
> (f:view)."

At the risk of wasting your time and/or boring you, go to
http://www.javahotchocolate.com and quickly peruse the four articles on
RichFaces and faceletes under the heading "Other tutorials". It was when
I began to write these that I was in the throes of abandoning Maven for
good.
Re: Error while trying to create JavaServer Faces project [message #832785 is a reply to message #832763] Fri, 30 March 2012 15:36 Go to previous message
Alex Averbuch is currently offline Alex AverbuchFriend
Messages: 13
Registered: March 2012
Junior Member
Thanks, but at this stage it's not a Maven/Ant/Ivy/??? problem.
It's that I'm a complete noob with this stuff Smile so I have no idea which dependencies/versions/etc I need to make the project happy.

Despite not being the biggest fan of Maven, do you know if these dependencies are all I need, in order to start a JavaServer Face v1.2 project=


		<dependency>
			<groupId>org.apache.myfaces.core</groupId>
			<artifactId>myfaces-api</artifactId>
			<version>2.1.6</version>
		</dependency>
		<dependency>
			<groupId>org.apache.myfaces.core</groupId>
			<artifactId>myfaces-impl</artifactId>
			<version>2.1.6</version>
		</dependency>
		<dependency>
			<groupId>org.glassfish.web</groupId>
			<artifactId>javax.servlet.jsp.jstl</artifactId>
			<version>1.2.1</version>
		</dependency>
		<dependency>
			<groupId>javax.servlet.jsp.jstl</groupId>
			<artifactId>javax.servlet.jsp.jstl-api</artifactId>
			<version>1.2.1</version>
		</dependency>
Previous Topic:Stop Eclipse from automatically relaunching application
Next Topic:javascript ide
Goto Forum:
  


Current Time: Sat Apr 20 00:30:26 GMT 2024

Powered by FUDForum. Page generated in 0.03330 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top