• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

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

 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
If you settle for what they are giving you, you deserve what you get. Fight for this tiny ad!
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic