Daniel Kopyc
Unregistered
|
|
Note that since this app was apparently developed on a case-insensitive O/S (e.g. Window$), if you try to run this demo "out of the box" on Linux (RH9/Tomcat 5.0.x/MySQL) you will probably see the following error:
javax.servlet.ServletException: javax.servlet.jsp.JspException: Can't instantiate class: 'Can't get value from value binding expression: '#{serviceLocatorBean}'
...which is a little cryptic -- but basically it can't instantiate the first application-scoped managed bean, ServiceLocatorBean. But if you dig further into the app log in <tomcat_home>/logs/catalog.log for more details, you will probably see that the problem is a SQL problem, e.g.:
java.sql.SQLException: General error, message from server: "Table 'catalog.CATEGORY' doesn't exist"
Problem is that MySQL on Unix is case-sensitive (since O/S is). Quick fix (to avoid editing all the SQL table names in the Hibernate xml configs) is to add the following line to your /etc/my.cnf, restart mysqld, and then of course HUP your app-server:
[mysqld] set-variable=lower_case_table_names=1
Other than this caveat, this appears to be one of the better "real world" examples on JSF that I could find... definitely can make immediate use of the "admin auth" filter stuff and I'm sure also get some ideas about how to partition various logic, views, etc. Thanks for contributing this, Derek!
|
colin
Unregistered
|
|
hi,but i just use the windos,it appeared that error "'Can't get value from value binding expression: '#{serviceLocatorBean}'.'." why? i can't solve this problem!
|
Anonymous
Unregistered
|
|
me too,please help me,thank you!
|
Anonymous
Unregistered
|
|
it's the same on windows as long as your mysql runs on linux. rename the table or change the hibernate xml
|
Stenly
stranger
Reged: 08/03/08
Posts: 1
|
|
Just get the new mysql-connector-java-5.1.6.tar.gz. then it works
|