[Yanel-dev] More graceful handling of realm misconfiguration
Michael Wechner
michael.wechner at wyona.com
Wed Jun 6 20:48:40 CEST 2007
Hi
I did some realm re-configuration (of the from scratch realm) and made a mistake and receive the error below.
Whereas all other realms are fine. I think it would make sense to handle such cases more gracefully, instead of throwing an error within every realm, I think it would be sufficient to throw
an error only for the misconfigured realm.
WDYT?
Cheers
Michi
javax.servlet.ServletException: Error setting up realms from file /home/michi/src/wyona/public/yanel/trunk/local/apache-tomcat-5.5.20/webapps/yanel/WEB-INF/classes/realms.xml: org.wyona.yanel.core.ConfigurationException: Error setting up realm [from-scratch-realm-template]: /home/michi/src/wyona/public/yanel/trunk/src/realms/from-scratch-realm-template/realm.xml: java.lang.Exception: Could not configure realm [from-scratch-realm-template] with config file: /home/michi/src/wyona/public/yanel/trunk/src/realms/from-scratch-realm-template/realm.xml: org.wyona.yarep.core.RepositoryException: Could not create repository: from-scratch-realm-template /home/michi/src/wyona/public/yanel/trunk/src/realms/from-scratch-realm-template/data-repository.xml /home/michi/src/wyona/public/yanel/trunk/src/realms/from-scratch-realm-template/data-repository.xml (No such file or directory)
org.wyona.yanel.servlet.YanelServlet.init(YanelServlet.java:154)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
java.lang.Thread.run(Thread.java:534)
*root cause*
org.wyona.yanel.core.ConfigurationException: Error setting up realms from file /home/michi/src/wyona/public/yanel/trunk/local/apache-tomcat-5.5.20/webapps/yanel/WEB-INF/classes/realms.xml: org.wyona.yanel.core.ConfigurationException: Error setting up realm [from-scratch-realm-template]: /home/michi/src/wyona/public/yanel/trunk/src/realms/from-scratch-realm-template/realm.xml: java.lang.Exception: Could not configure realm [from-scratch-realm-template] with config file: /home/michi/src/wyona/public/yanel/trunk/src/realms/from-scratch-realm-template/realm.xml: org.wyona.yarep.core.RepositoryException: Could not create repository: from-scratch-realm-template /home/michi/src/wyona/public/yanel/trunk/src/realms/from-scratch-realm-template/data-repository.xml /home/michi/src/wyona/public/yanel/trunk/src/realms/from-scratch-realm-template/data-repository.xml (No such file or directory)
org.wyona.yanel.core.map.RealmManager.readRealms(RealmManager.java:242)
org.wyona.yanel.core.map.RealmManager.<init>(RealmManager.java:118)
org.wyona.yanel.core.map.RealmManager.<init>(RealmManager.java:76)
org.wyona.yanel.core.Yanel.init(Yanel.java:79)
org.wyona.yanel.servlet.YanelServlet.init(YanelServlet.java:141)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
java.lang.Thread.run(Thread.java:534)
*note*
--
Michael Wechner
Wyona - Open Source Content Management - Apache Lenya
http://www.wyona.com http://lenya.apache.org
michael.wechner at wyona.com michi at apache.org
+41 44 272 91 61
More information about the Yanel-development
mailing list