Please join us at the new JavaWorld Q&A Forums. Your existing login will work there. The discussions here are now read-only.


JavaWorld Talkback >> 959163

Pages: 1
Daniel Kopyc
Unregistered




Caveat when running JCatalog on Tomcat/Linux
      #15092 - 01/26/05 11:00 PM

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!


Post Extras: Print Post   Remind Me!   Notify Moderator  
colin
Unregistered




Re: Caveat when running JCatalog on Tomcat/Linux [Re: Daniel Kopyc]
      #18400 - 06/03/05 03:02 PM

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!


Post Extras: Print Post   Remind Me!   Notify Moderator  
Anonymous
Unregistered




Re: Caveat when running JCatalog on Tomcat/Linux [Re: colin]
      #27559 - 02/27/06 09:03 PM

me too,please help me,thank you!

Post Extras: Print Post   Remind Me!   Notify Moderator  
Anonymous
Unregistered




Re: Caveat when running JCatalog on Tomcat/Linux [Re: Anonymous]
      #30397 - 04/01/06 09:26 AM

it's the same on windows as long as your mysql runs on linux.
rename the table or change the hibernate xml


Post Extras: Print Post   Remind Me!   Notify Moderator  
Stenly
stranger


Reged: 08/03/08
Posts: 1
Re: Caveat when running JCatalog on Tomcat/Linux [Re: Anonymous]
      #177696 - 08/03/08 05:11 PM

Just get the new mysql-connector-java-5.1.6.tar.gz. then it works

Post Extras: Print Post   Remind Me!   Notify Moderator  
Pages: 1



Extra information
0 registered and 1 anonymous users are browsing this forum.

Moderator:   

Print Topic

Forum Permissions
      You cannot start new topics
      You cannot reply to topics
      HTML is disabled
      UBBCode is enabled

Rating:
Topic views: 8493

Rate this topic

Jump to

Contact us JavaWorld

Powered by UBB.threads™ 6.5.5