[xwiki-users] Could not initialize main XWiki context on Ubuntu
Hi all, I have installed XWiki on a fresh Ubuntu 12.04 server followed this guide http://platform.xwiki.org/xwiki/bin/view/AdminGuide/InstallationViaAPT My installation: XWiki 4.3, Postgres 9.1, tomcat6. When I tried to navigate to XWiki from other LAN desktop, this error is displayed: HTTP Status 500 - ------------------------------------------------------------------------ *type* Exception report *message* *description* _The server encountered an internal error () that prevented it from fulfilling this request._ *exception* javax.servlet.ServletException: com.xpn.xwiki.XWikiException: Error number 3 in 0: Could not initialize main XWiki context Wrapped Exception: Error number 3202 in 3: Exception while reading document [xwiki:XWiki.TagClass] Wrapped Exception: Can't find [/WEB-INF/hibernate.cfg.xml] for hibernate configuration org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:535) org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:433) org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236) org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196) org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414) javax.servlet.http.HttpServlet.service(HttpServlet.java:617) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) com.xpn.xwiki.web.ActionFilter.doFilter(ActionFilter.java:120) org.xwiki.wysiwyg.server.filter.ConversionFilter.doFilter(ConversionFilter.java:144) com.xpn.xwiki.plugin.webdav.XWikiDavFilter.doFilter(XWikiDavFilter.java:66) org.xwiki.container.servlet.filters.internal.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:208) org.xwiki.container.servlet.filters.internal.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:111) *root cause* com.xpn.xwiki.XWikiException: Error number 3 in 0: Could not initialize main XWiki context Wrapped Exception: Error number 3202 in 3: Exception while reading document [xwiki:XWiki.TagClass] Wrapped Exception: Can't find [/WEB-INF/hibernate.cfg.xml] for hibernate configuration com.xpn.xwiki.XWiki.getMainXWiki(XWiki.java:414) com.xpn.xwiki.XWiki.getXWiki(XWiki.java:483) com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:136) com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:116) org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431) org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236) org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196) org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414) javax.servlet.http.HttpServlet.service(HttpServlet.java:617) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) com.xpn.xwiki.web.ActionFilter.doFilter(ActionFilter.java:120) org.xwiki.wysiwyg.server.filter.ConversionFilter.doFilter(ConversionFilter.java:144) com.xpn.xwiki.plugin.webdav.XWikiDavFilter.doFilter(XWikiDavFilter.java:66) org.xwiki.container.servlet.filters.internal.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:208) org.xwiki.container.servlet.filters.internal.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:111) *root cause* com.xpn.xwiki.XWikiException: Error number 3202 in 3: Exception while reading document [xwiki:XWiki.TagClass] Wrapped Exception: Can't find [/WEB-INF/hibernate.cfg.xml] for hibernate configuration com.xpn.xwiki.store.XWikiHibernateStore.loadXWikiDoc(XWikiHibernateStore.java:870) com.xpn.xwiki.store.XWikiCacheStore.loadXWikiDoc(XWikiCacheStore.java:290) com.xpn.xwiki.XWiki.getDocument(XWiki.java:1404) com.xpn.xwiki.XWiki.getDocument(XWiki.java:1447) com.xpn.xwiki.XWiki.initializeMandatoryClasses(XWiki.java:824) com.xpn.xwiki.XWiki.initXWiki(XWiki.java:794) com.xpn.xwiki.XWiki.<init>(XWiki.java:735) com.xpn.xwiki.XWiki.getMainXWiki(XWiki.java:394) com.xpn.xwiki.XWiki.getXWiki(XWiki.java:483) com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:136) com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:116) org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431) org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236) org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196) org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414) javax.servlet.http.HttpServlet.service(HttpServlet.java:617) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) com.xpn.xwiki.web.ActionFilter.doFilter(ActionFilter.java:120) org.xwiki.wysiwyg.server.filter.ConversionFilter.doFilter(ConversionFilter.java:144) com.xpn.xwiki.plugin.webdav.XWikiDavFilter.doFilter(XWikiDavFilter.java:66) org.xwiki.container.servlet.filters.internal.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:208) org.xwiki.container.servlet.filters.internal.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:111) *root cause* org.hibernate.HibernateException: Can't find [/WEB-INF/hibernate.cfg.xml] for hibernate configuration com.xpn.xwiki.store.hibernate.DefaultHibernateSessionFactory$1.getConfigurationInputStream(DefaultHibernateSessionFactory.java:143) org.hibernate.cfg.Configuration.configure(Configuration.java:2157) com.xpn.xwiki.store.hibernate.DefaultHibernateSessionFactory$1.configure(DefaultHibernateSessionFactory.java:102) com.xpn.xwiki.store.XWikiHibernateBaseStore.initHibernate(XWikiHibernateBaseStore.java:228) com.xpn.xwiki.store.XWikiHibernateBaseStore.checkHibernate(XWikiHibernateBaseStore.java:622) com.xpn.xwiki.store.XWikiHibernateStore.loadXWikiDoc(XWikiHibernateStore.java:746) com.xpn.xwiki.store.XWikiCacheStore.loadXWikiDoc(XWikiCacheStore.java:290) com.xpn.xwiki.XWiki.getDocument(XWiki.java:1404) com.xpn.xwiki.XWiki.getDocument(XWiki.java:1447) com.xpn.xwiki.XWiki.initializeMandatoryClasses(XWiki.java:824) com.xpn.xwiki.XWiki.initXWiki(XWiki.java:794) com.xpn.xwiki.XWiki.<init>(XWiki.java:735) com.xpn.xwiki.XWiki.getMainXWiki(XWiki.java:394) com.xpn.xwiki.XWiki.getXWiki(XWiki.java:483) com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:136) com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:116) org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431) org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236) org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196) org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414) javax.servlet.http.HttpServlet.service(HttpServlet.java:617) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) com.xpn.xwiki.web.ActionFilter.doFilter(ActionFilter.java:120) org.xwiki.wysiwyg.server.filter.ConversionFilter.doFilter(ConversionFilter.java:144) com.xpn.xwiki.plugin.webdav.XWikiDavFilter.doFilter(XWikiDavFilter.java:66) org.xwiki.container.servlet.filters.internal.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:208) org.xwiki.container.servlet.filters.internal.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:111) *note* _The full stack trace of the root cause is available in the Apache Tomcat/6.0.35 logs._ ------------------------------------------------------------------------ Apache Tomcat/6.0.35 I tried: - Check the installation followed http://platform.xwiki.org/xwiki/bin/view/AdminGuide/InstallationPostgreSQL xwiki database is created already by dbconfig - Connect to Postgres DB as xwiki user successfully. I see that there are no relations (I think it is correct). Do you have any idea? -- Viet Hoang
Hi, On Dec 13, 2012, at 5:52 AM, Hoang Tuan Viet <[email protected]> wrote:
Hi all,
I have installed XWiki on a fresh Ubuntu 12.04 server followed this guide http://platform.xwiki.org/xwiki/bin/view/AdminGuide/InstallationViaAPT
My installation: XWiki 4.3, Postgres 9.1, tomcat6.
When I tried to navigate to XWiki from other LAN desktop, this error is displayed:
HTTP Status 500 -
------------------------------------------------------------------------
*type* Exception report
[snip]
org.hibernate.HibernateException: Can't find [/WEB-INF/hibernate.cfg.xml] for hibernate configuration com.xpn.xwiki.store.hibernate.DefaultHibernateSessionFactory$1.getConfigurationInputStream(DefaultHibernateSessionFactory.java:143) org.hibernate.cfg.Configuration.configure(Configuration.java:2157)
The error is pretty clear: XWiki (Hibernate) cannot find the Hibernate configuration file. If you can't figure out why you'll need to show us how you start xwiki and where you've setup the files. Thanks -Vincent
I tried:
- Check the installation followed http://platform.xwiki.org/xwiki/bin/view/AdminGuide/InstallationPostgreSQL xwiki database is created already by dbconfig - Connect to Postgres DB as xwiki user successfully. I see that there are no relations (I think it is correct).
Do you have any idea?
-- Viet Hoang
Hi, I have checked hibernate file's content before and did not find any problem. The problem is the file's permission: root@ubuntu:~# ll /etc/xwiki/ total 144 drwxr-xr-x 6 vietht vietht 4096 Dec 12 18:23 ./ drwxr-xr-x 94 root root 4096 Dec 12 15:19 ../ drwxr-xr-x 5 vietht vietht 4096 Dec 12 11:01 cache/ drwxr-xr-x 3 vietht vietht 4096 Dec 12 11:01 classes/ drwxr-xr-x 2 vietht vietht 4096 Dec 12 11:01 fonts/ -rw-r----- 1 root root 8804 Dec 12 18:23 hibernate.cfg.xml -rw-r--r-- 1 vietht vietht 2022 Nov 26 22:12 jboss-deployment-structure.xml drwxr-xr-x 3 vietht vietht 4096 Dec 12 11:01 observation/ -rw-r--r-- 1 vietht vietht 1181 Nov 26 22:12 portlet.xml -rw-r--r-- 1 vietht vietht 14720 Nov 26 22:12 struts-config.xml -rw-r--r-- 1 vietht vietht 435 Nov 26 22:12 sun-web.xml -rw-r--r-- 1 vietht vietht 12 Nov 26 22:12 version.properties -rw-r--r-- 1 vietht vietht 13793 Nov 26 22:12 web.xml -rw-r--r-- 1 vietht vietht 30532 Nov 26 22:12 xwiki.cfg -rw-r--r-- 1 vietht vietht 22514 Nov 26 22:12 xwiki.properties -rw-r--r-- 1 root root 1257 Nov 26 22:13 xwiki-tomcat.xml I chmod 644 hibernate.cfg.xml file and the problem is solved. I installed XWiki from deb http://maven.xwiki.org stable/ on a fresh Ubuntu server so that there is a mistake on that repository. Thank you for your support, Viet On 12/13/2012 02:07 PM, Vincent Massol wrote:
Hi,
On Dec 13, 2012, at 5:52 AM, Hoang Tuan Viet <[email protected]> wrote:
Hi all,
I have installed XWiki on a fresh Ubuntu 12.04 server followed this guide http://platform.xwiki.org/xwiki/bin/view/AdminGuide/InstallationViaAPT
My installation: XWiki 4.3, Postgres 9.1, tomcat6.
When I tried to navigate to XWiki from other LAN desktop, this error is displayed:
HTTP Status 500 -
------------------------------------------------------------------------
*type* Exception report [snip]
org.hibernate.HibernateException: Can't find [/WEB-INF/hibernate.cfg.xml] for hibernate configuration com.xpn.xwiki.store.hibernate.DefaultHibernateSessionFactory$1.getConfigurationInputStream(DefaultHibernateSessionFactory.java:143) org.hibernate.cfg.Configuration.configure(Configuration.java:2157) The error is pretty clear: XWiki (Hibernate) cannot find the Hibernate configuration file.
If you can't figure out why you'll need to show us how you start xwiki and where you've setup the files.
Thanks -Vincent
I tried:
- Check the installation followed http://platform.xwiki.org/xwiki/bin/view/AdminGuide/InstallationPostgreSQL xwiki database is created already by dbconfig - Connect to Postgres DB as xwiki user successfully. I see that there are no relations (I think it is correct).
Do you have any idea?
-- Viet Hoang
users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
On Thu, Dec 13, 2012 at 9:49 AM, Hoang Tuan Viet <[email protected]> wrote:
Hi,
I have checked hibernate file's content before and did not find any problem.
The problem is the file's permission:
root@ubuntu:~# ll /etc/xwiki/ total 144 drwxr-xr-x 6 vietht vietht 4096 Dec 12 18:23 ./ drwxr-xr-x 94 root root 4096 Dec 12 15:19 ../ drwxr-xr-x 5 vietht vietht 4096 Dec 12 11:01 cache/ drwxr-xr-x 3 vietht vietht 4096 Dec 12 11:01 classes/ drwxr-xr-x 2 vietht vietht 4096 Dec 12 11:01 fonts/ -rw-r----- 1 root root 8804 Dec 12 18:23 hibernate.cfg.xml -rw-r--r-- 1 vietht vietht 2022 Nov 26 22:12 jboss-deployment-structure.xml drwxr-xr-x 3 vietht vietht 4096 Dec 12 11:01 observation/ -rw-r--r-- 1 vietht vietht 1181 Nov 26 22:12 portlet.xml -rw-r--r-- 1 vietht vietht 14720 Nov 26 22:12 struts-config.xml -rw-r--r-- 1 vietht vietht 435 Nov 26 22:12 sun-web.xml -rw-r--r-- 1 vietht vietht 12 Nov 26 22:12 version.properties -rw-r--r-- 1 vietht vietht 13793 Nov 26 22:12 web.xml -rw-r--r-- 1 vietht vietht 30532 Nov 26 22:12 xwiki.cfg -rw-r--r-- 1 vietht vietht 22514 Nov 26 22:12 xwiki.properties -rw-r--r-- 1 root root 1257 Nov 26 22:13 xwiki-tomcat.xml
I chmod 644 hibernate.cfg.xml file and the problem is solved.
I installed XWiki from deb http://maven.xwiki.org stable/ on a fresh Ubuntu server so that there is a mistake on that repository.
See http://jira.xwiki.org/browse/XE-1255.
Thank you for your support,
Viet
On 12/13/2012 02:07 PM, Vincent Massol wrote:
Hi,
On Dec 13, 2012, at 5:52 AM, Hoang Tuan Viet <[email protected]> wrote:
Hi all,
I have installed XWiki on a fresh Ubuntu 12.04 server followed this guide http://platform.xwiki.org/**xwiki/bin/view/AdminGuide/** InstallationViaAPT<http://platform.xwiki.org/xwiki/bin/view/AdminGuide/InstallationViaAPT>
My installation: XWiki 4.3, Postgres 9.1, tomcat6.
When I tried to navigate to XWiki from other LAN desktop, this error is displayed:
HTTP Status 500 -
------------------------------**------------------------------** ------------
*type* Exception report
[snip]
org.hibernate.**HibernateException: Can't find
[/WEB-INF/hibernate.cfg.xml] for hibernate configuration com.xpn.xwiki.store.hibernate.**DefaultHibernateSessionFactory** $1.**getConfigurationInputStream(**DefaultHibernateSessionFactory** .java:143) org.hibernate.cfg.**Configuration.configure(** Configuration.java:2157)
The error is pretty clear: XWiki (Hibernate) cannot find the Hibernate configuration file.
If you can't figure out why you'll need to show us how you start xwiki and where you've setup the files.
Thanks -Vincent
I tried:
- Check the installation followed http://platform.xwiki.org/** xwiki/bin/view/AdminGuide/**InstallationPostgreSQL<http://platform.xwiki.org/xwiki/bin/view/AdminGuide/InstallationPostgreSQL> xwiki database is created already by dbconfig - Connect to Postgres DB as xwiki user successfully. I see that there are no relations (I think it is correct).
Do you have any idea?
-- Viet Hoang
______________________________**_________________ users mailing list [email protected] http://lists.xwiki.org/**mailman/listinfo/users<http://lists.xwiki.org/mailman/listinfo/users>
______________________________**_________________ users mailing list [email protected] http://lists.xwiki.org/**mailman/listinfo/users<http://lists.xwiki.org/mailman/listinfo/users>
-- Thomas Mortagne
participants (3)
-
Hoang Tuan Viet -
Thomas Mortagne -
Vincent Massol