Forums Register Login

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

+Pie Number of slices to send: Send
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:

+Pie Number of slices to send: Send
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 ...
+Pie Number of slices to send: Send
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.

+Pie Number of slices to send: Send
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?
+Pie Number of slices to send: Send
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
Do not meddle in the affairs of dragons - for you are crunchy and good with ketchup. Crunchy tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 2057 times.
Similar Threads
JSF 2.0 cannot rech out-come page
Custom input validator
Validation for ensuring that entered value contains alphabet only
JSF validation not validating
Could not navigate from one page to another !!!
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 02:55:03.