The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

cac07 (1) [Avatar] Offline
#1
Currently looking at Chapter 18, Running code samples in Netbeans 6.9.1, using Maven, jdk1.6.0_14, Test Packages, com.manning.junitbook.ch18, ELContextImpl.java class.
I am getting an cannot find symbol error in the ELContextImpl.java class on the method call ExpressionFactory.newInstance(). I can switch the call to ExpressionFactory.class.newInstance() but this results in more thrown exceptions. This change results in InstantiationException during clean/build. Maybe I am missing something?
Sageniuz (1) [Avatar] Offline
#2
Re: chap 17 -18, Possible Sample Code Issue
I had the same problem and I changed the code to "factory = new org.apache.el.ExpressionFactoryImpl();". Now no test errors occur anymore. You can find the code under my github account: https://github.com/ClausPolanka/database-jpa-testing.
iapazmino (10) [Avatar] Offline
#3
Re: chap 17 -18, Possible Sample Code Issue
You may change the el-api artifact to

<dependency>
<groupId>javax.el</groupId>
<artifactId>javax.el-api</artifactId>
<version>2.2.1</version>
</dependency>