wood burning stoves*
The moose likes JSF and the fly likes Has anybody successfully run the Virtual Trainer application in Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Has anybody successfully run the Virtual Trainer application in "JSF Complete Reference"?" Watch "Has anybody successfully run the Virtual Trainer application in "JSF Complete Reference"?" New topic
Author

Has anybody successfully run the Virtual Trainer application in "JSF Complete Reference"?

William Asher
Greenhorn

Joined: Jul 23, 2009
Posts: 25
I'm trying to compile the Virtual Trainer application that is described starting in chapter 10 of "JavaServer Faces 2.0: The Complete Reference", by Ed Burns, and get these errors when doing so:



The problem is that there is no invoke() method of the resolver object. That object is an instance of ELResolver. I have looked at the documentation for that abstract class and can't find an invoke() method. My java compiler couldn't find one either!

If you have succeeded in compiling this application, please let me know what to do! Thanks.

The code for the unit in error is reproduced below:

William Asher
Greenhorn

Joined: Jul 23, 2009
Posts: 25
I think I have figured out part of the answer... It appears that invoke() is a valid method of ELResolver in Java EE 6, but not in Java EE 5. I must have version 5 on my work station. Investigating ...
William Asher
Greenhorn

Joined: Jul 23, 2009
Posts: 25
I give up! As I said, I did figure out that invoke() is a valid ELResolver method in Java EE 6. But I don't see what I need to do to get my compile to use the EE 6 version of ELResolver.

I did try downloading and installing Java EE 6 (java_ee_sdk-6-windows.exe) just now, thinking maybe I didn't already have it. All it appeared to do was reinstall my Glassfish V3 installation.

I am using Maven 2, as recommended by the book, and I'm using the pom.xml provided in the book example code. The pom.xml files have worked out of the box so far in all the previous chapters. I have no clue if the contents of pom.xml are relevant, but I have included it below.

If you have any idea what I'm doing wrong, I would appreciate finding that out! If you need any more code posted, let me know.

William Asher
Greenhorn

Joined: Jul 23, 2009
Posts: 25
I went on vacation for a week and took a rest from this problem. Am back now. I thought maybe that the system PATH variable might be the problem, and found that two different JDK folders (jdk1.6.0_10 and jdk1.6.0_17) were in the PATH, in that order. I removed the former, but that didn't help. It didn't matter, because jdk1.6.0_10 was no longer on my system anyway!

The following are the only java-related folders in my PATH, in the order in which they appear:

I checked my %JAVA_HOME% variable also just now, and its value is C:\Program Files\Java\jdk1.6.0_17.

Anybody have any idea why I'm getting the wrong version of ELResolver when compiling this program?
William Asher
Greenhorn

Joined: Jul 23, 2009
Posts: 25
I have a little more information about my problem. I tried running the Maven command with a -X option (as in mvn -X clean install) to get a ream of debug information. One of the things reported was the classpath, which was shown in the Maven output as follows:


The ELResolver abstract class resizes in the el-api-2.1.2-b05.jar file, which is the last element of the classpath. I looked at http://download.java.net/maven/2/javax/el/el-api/2.1.2-b05/el-api-2.1.2-b05-sources.jar to find the source code, and the invoke() method is present with the method parameters matching how the method is invoked in the sample loginPanel.java source code. If I understand it correctly, the repository folders listed in the classpath above are a local cache version of the downloaded jar files, all of which were refreshed as necessary by the Maven script.

I am pretty sure that none of the jar files above el-api-2.1.2-b05.jar have an ELResolver class, and I know that the D:\Documents and Settings\user\My Documents\Java\JSF\ch10\trainer-secondEdition\trainer\target\classes folder has no such class.

So what ELResolver class is Maven (and therefore javac.exe) using? The one it is using has no invoke() method (or if it does have such a method it doesn't have the expected method signature).

What am I missing and why can't I compile this application? Has anybody else successfully worked through chapter 10 of this book?

Thanks.
William Asher
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Has anybody successfully run the Virtual Trainer application in "JSF Complete Reference"?
 
Similar Threads
ch10 q11
ch10 q2
JSF 2.0 cannot rech out-come page
Custom input validator
Validation for ensuring that entered value contains alphabet only