I have a old xwiki deploied with tomcat + postgresql:
tomcat 5.5.20-r7
postgresql 8.0.9-r1
and I did a migrate from 0.9.840 to 1.0b3 using war package and I have
meet following exception when load the page:
exception
javax.servlet.ServletException: Error number 3 in 0: Could not
initialize main XWiki context
Wrapped Exception: Error number 3202 in 3: Exception while reading
document XWiki.XWikiPreferences
Wrapped Exception: Could not parse configuration:
jndi:/localhost/xwiki/WEB-INF/hibernate.cfg.xml
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:689)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
com.xpn.xwiki.web.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:121)
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.XWikiPreferences
Wrapped Exception: Could not parse configuration:
jndi:/localhost/xwiki/WEB-INF/hibernate.cfg.xml
com.xpn.xwiki.XWiki.getMainXWiki(XWiki.java:266)
com.xpn.xwiki.XWiki.getXWiki(XWiki.java:346)
com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:96)
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:689)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
com.xpn.xwiki.web.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:121)
here is the hibernate.cfg.xml
<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate
Configuration DTD//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<property name="show_sql">false</property>
<property name="use_outer_join">true</property>
<property name="dbcp.defaultAutoCommit">false</property>
<property name="dbcp.maxActive">50</property>
<property name="dbcp.maxIdle">5</property>
<property name="dbcp.maxWait">30000</property>
<property name="dbcp.whenExhaustedAction">1</property>
<property name="dbcp.ps.whenExhaustedAction">1</property>
<property name="dbcp.ps.maxActive">20</property>
<property name="dbcp.ps.maxWait">120000</property>
<property name="dbcp.ps.maxIdle">20</property>
<!-- Uncomment if you want to use HSQLDB.
Note that the database will be created automatically if it doesn't
already exist.
<property
name="connection.url">jdbc:hsqldb:file:/some/path/xwiki_db;shutdown=true</property>
<property name="connection.username">sa</property>
<property name="connection.password"></property>
<property
name="connection.driver_class">org.hsqldb.jdbcDriver</property>
<property
name="dialect">org.hibernate.dialect.HSQLDialect</property>
-->
<!-- Default MySQL configuration
<property
name="connection.url">jdbc:mysql://localhost/xwiki</property>
<property name="connection.username">xwiki</property>
<property name="connection.password">xwiki</property>
<property
name="connection.driver_class">com.mysql.jdbc.Driver</property>
<property
name="dialect">org.hibernate.dialect.MySQLDialect</property>
-->
<!-- Default MySQL configuration -->
<property
name="connection.url">jdbc:postgresql://localhost/xwiki</property>
<property name="connection.username">xwiki</property>
<property name="connection.password">xwiki</property>
<property
name="connection.driver_class">org.postgresql.Driver</property>
<property
name="dialect">org.hibernate.dialect.PostgreSQLDialect</property>
<property
name="connection.provider_class">com.xpn.xwiki.store.DBCPConnecti$
<property name="connection.pool_size">2</property>
<property name="statement_cache.size">2</property>
<!-- Mapping files -->
<mapping resource="xwiki.hbm.xml"/>
<mapping resource="feeds.hbm.xml"/>
</session-factory>
</hibernate-configuration>
I see that it cannot parse the hibernate.cfg.xml through jndi, where I
did wrong? how to let it parse the configuration file through jndi.
kind regards,
- Muzi
Show replies by date