0

Hibernate, Tomcat5.5, ExceptionInInitializerEr

asked 2007-10-21 17:53:31 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=4580769

By: oberinspector

I tried to install ZK on a debian box with Tomcat5.5. I get an java.lang.ExceptionInInitializerError exception:

related log entries:
...
Oct 21, 2007 6:53:09 PM org.zkoss.zkplus.hibernate.HibernateUtil
initSessionFactory:86
SEVERE: Initial SessionFactory creation failed.java.security.AccessControlException:
access denied (java.lang.RuntimePermission accessDeclaredMembers) Oct 21, 2007 6:53:09 PM org.zkoss.zk.ui.util.Configuration
invokeExecutionCleanups:800
SEVERE: Failed to invoke class
org.zkoss.zkplus.hibernate.OpenSessionInViewListener
java.lang.ExceptionInInitializerError
at org.zkoss.zkplus.hibernate.HibernateUtil.initSessionFactory(HibernateUtil.ja
va:87)
...

Looks like a problem in my catalina.policy file. But after reading the related treads and some experiments i did not manage to bring up zk.

Here are my related lines in catalina.policy:
...
permission java.util.PropertyPermission "*", "read";
permission java.util.PropertyPermission "com.potix.*", "read, write";
permission java.util.logging.LoggingPermission "control";
permission java.io.FilePermission "${catalina.home}/conf/-", "read";
permission java.io.FilePermission "${catalina.home}/shared/-", "read";
permission java.io.FilePermission "${catalina.home}/webapps/-", "read";
permission java.io.FilePermission "${catalina.home}/temp/-", "read, write, delete";
permission java.lang.RuntimePermission
"accessClassInPackage.org.apache.catalina.loader";

permission java.lang.RuntimePermission "accessDeclaredMembers"; //added because of the exception but no success

};

// Permissens for ZK WEBAPP
grant codeBase "file:/usr/share/tomcat5.5-webapps/empego-web-zk/WEB-INF/-" {
permission java.lang.RuntimePermission "accessDeclaredMembers"; //added because of the exception but no success
permission java.security.AllPermission; }; ...


regards,
thomas

delete flag offensive retag edit

1 Reply

Sort by ยป oldest newest

answered 2007-10-23 06:41:03 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=4583556

By: oberinspector

also solved... i anyone has simular problems... i used the tomcat manager to deploy my webapp with a context configuration xml file. In the xml configuration my connection pool was configured. The application was deployed, but the config file was not used. the default context configuration of tomcat was used. Check whether the context xml configuration is in $(catalina.home)/conf/catalina/localhost.
After copy of the file to that location the connection pool was recognized.
Next thing... the mysql connector jar has to be in $(catalina.home)/common/lib.

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2007-10-21 17:53:31 +0800

Seen: 891 times

Last updated: Oct 23 '07

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More