Hi,
I am using XE 1.3.2(stand alone) and i have to use Mysql 5.0. For that
I configured the hibernate.cfg and web.cfg but when i point my browser to
http://localhost:8080//xwiki/bin/view/main/webhome ,it shows error. Where
is my fault? can any one help?
Hibernate configuration
........................
[config]
<?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">
<!-- Template for hibernate configuration. processing by maven using
profiles.
Replace original src/main/webapp/WEB-INF/hibernate.cfg.xml -->
<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>
<!-- MySQL configuration.
Uncomment if you want to use MySQL and comment out other database
configurations.
Note that the database will be created automatically if it
doesn't already exist.
We need to set the sql_mode to a less strict value, see
XWIKI-1945 -->
<property
name="connection.url">jdbc:mysql://localhost/xwiki?useServerPrepStmts=false&sessionVariables=sql_mode=''</property>
<property name="connection.username">root</property>
<property name="connection.password">amma</property>
<property
name="connection.driver_class">com.mysql.jdbc.Driver</property>
<property
name="dialect">org.hibernate.dialect.MySQLDialect</property>
<property
name="connection.provider_class">com.xpn.xwiki.store.DBCPConnectionProvider</property>
<property name="connection.pool_size">2</property>
<property name="statement_cache.size">2</property>
<mapping resource="xwiki.hbm.xml"/>
<mapping resource="feeds.hbm.xml"/>
</session-factory>
</hibernate-configuration>
[/config]
Web configuration
...................
<!-- Uncomment if you wish to use a DataSource to define the Database
connection -->
<resource-ref>
<description>DB Connection</description>
<res-ref-name>jdbc/XWikiDS</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
ERROR
.................................................................
Wrapped Exception:
java.sql.BatchUpdateException: null, message from server: "Data too long
for co
lumn 'XWD_MINOREDIT' at row 1"
at
com.mysql.jdbc.PreparedStatement.executeBatch(PreparedStatement.java:
1404)
at
org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingSt
atement.java:294)
at
org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingSt
atement.java:294)
at
org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.jav
a:48)
at
org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:
246)
at
org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:237)
at
org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:141)
at
org.hibernate.event.def.AbstractFlushingEventListener.performExecutio
ns(AbstractFlushingEventListener.java:298)
at
org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlus
hEventListener.java:27)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000)
at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:338)
at
org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java
:106)
at
com.xpn.xwiki.store.XWikiHibernateBaseStore.endTransaction(XWikiHiber
nateBaseStore.java:783)
at
com.xpn.xwiki.store.XWikiHibernateBaseStore.endTransaction(XWikiHiber
nateBaseStore.java:754)
at
com.xpn.xwiki.store.XWikiHibernateStore.saveXWikiDoc(XWikiHibernateSt
ore.java:447)
at
com.xpn.xwiki.store.XWikiCacheStore.saveXWikiDoc(XWikiCacheStore.java
:97)
at
com.xpn.xwiki.store.XWikiCacheStore.saveXWikiDoc(XWikiCacheStore.java
:91)
at com.xpn.xwiki.XWiki.saveDocument(XWiki.java:1083)
at com.xpn.xwiki.XWiki.saveDocument(XWiki.java:1056)
at com.xpn.xwiki.XWiki.saveDocument(XWiki.java:1050)
at com.xpn.xwiki.XWiki.getPrefsClass(XWiki.java:2653)
at com.xpn.xwiki.XWiki.initXWiki(XWiki.java:797)
at com.xpn.xwiki.XWiki.<init>(XWiki.java:722)
at com.xpn.xwiki.XWiki.getMainXWiki(XWiki.java:293)
at com.xpn.xwiki.XWiki.getXWiki(XWiki.java:491)
at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:123)
at
org.apache.struts.action.RequestProcessor.processActionPerform(Reques
tProcessor.java:431)
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.ja
va:236)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:119
6)
at
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:596)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:428
)
at
org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(
WebApplicationHandler.java:830)
at
com.xpn.xwiki.web.SetCharacterEncodingFilter.doFilter(SetCharacterEnc
odingFilter.java:117)
at
org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(
WebApplicationHandler.java:821)
at
org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicati
onHandler.java:471)
at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:5
68)
at org.mortbay.http.HttpContext.handle(HttpContext.java:1565)
at
org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplication
Context.java:633)
at org.mortbay.http.HttpContext.handle(HttpContext.java:1517)
at org.mortbay.http.HttpServer.service(HttpServer.java:954)
at org.mortbay.http.HttpConnection.service(HttpConnection.java:816)
at
org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:983)
at org.mortbay.http.HttpConnection.handle(HttpConnection.java:833)
at
org.mortbay.http.SocketListener.handleConnection(SocketListener.java:
244)
at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357)
at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534)
getException():
com.xpn.xwiki.XWikiException: Error number 3201 in 3: Exception while
saving doc
ument XWiki.XWikiPreferences
Wrapped Exception: Could not execute JDBC batch update
at
com.xpn.xwiki.store.XWikiHibernateStore.saveXWikiDoc(XWikiHibernateSt
ore.java:457)
at
com.xpn.xwiki.store.XWikiCacheStore.saveXWikiDoc(XWikiCacheStore.java
:97)
at
com.xpn.xwiki.store.XWikiCacheStore.saveXWikiDoc(XWikiCacheStore.java
:91)
at com.xpn.xwiki.XWiki.saveDocument(XWiki.java:1083)
at com.xpn.xwiki.XWiki.saveDocument(XWiki.java:1056)
at com.xpn.xwiki.XWiki.saveDocument(XWiki.java:1050)
at com.xpn.xwiki.XWiki.getPrefsClass(XWiki.java:2653)
at com.xpn.xwiki.XWiki.initXWiki(XWiki.java:797)
at com.xpn.xwiki.XWiki.<init>(XWiki.java:722)
at com.xpn.xwiki.XWiki.getMainXWiki(XWiki.java:293)
at com.xpn.xwiki.XWiki.getXWiki(XWiki.java:491)
at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:123)
at
org.apache.struts.action.RequestProcessor.processActionPerform(Reques
tProcessor.java:431)
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.ja
va:236)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:119
6)
at
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:596)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:428
)
at
org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(
WebApplicationHandler.java:830)
at
com.xpn.xwiki.web.SetCharacterEncodingFilter.doFilter(SetCharacterEnc
odingFilter.java:117)
at
org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(
WebApplicationHandler.java:821)
at
org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicati
onHandler.java:471)
at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:5
68)
at org.mortbay.http.HttpContext.handle(HttpContext.java:1565)
at
org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplication
Context.java:633)
at org.mortbay.http.HttpContext.handle(HttpContext.java:1517)
at org.mortbay.http.HttpServer.service(HttpServer.java:954)
at org.mortbay.http.HttpConnection.service(HttpConnection.java:816)
at
org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:983)
at org.mortbay.http.HttpConnection.handle(HttpConnection.java:833)
at
org.mortbay.http.SocketListener.handleConnection(SocketListener.java:
244)
at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357)
at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534)
Wrapped Exception:
java.sql.BatchUpdateException: null, message from server: "Data too long
for co
lumn 'XWD_MINOREDIT' at row 1"
at
com.mysql.jdbc.PreparedStatement.executeBatch(PreparedStatement.java:
1404)
at
org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingSt
atement.java:294)
at
org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingSt
atement.java:294)
at
org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.jav
a:48)
at
org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:
246)
at
org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:237)
at
org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:141)
at
org.hibernate.event.def.AbstractFlushingEventListener.performExecutio
ns(AbstractFlushingEventListener.java:298)
at
org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlus
hEventListener.java:27)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000)
at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:338)
at
org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java
:106)
at
com.xpn.xwiki.store.XWikiHibernateBaseStore.endTransaction(XWikiHiber
nateBaseStore.java:783)
at
com.xpn.xwiki.store.XWikiHibernateBaseStore.endTransaction(XWikiHiber
nateBaseStore.java:754)
at
com.xpn.xwiki.store.XWikiHibernateStore.saveXWikiDoc(XWikiHibernateSt
ore.java:447)
at
com.xpn.xwiki.store.XWikiCacheStore.saveXWikiDoc(XWikiCacheStore.java
:97)
at
com.xpn.xwiki.store.XWikiCacheStore.saveXWikiDoc(XWikiCacheStore.java
:91)
at com.xpn.xwiki.XWiki.saveDocument(XWiki.java:1083)
at com.xpn.xwiki.XWiki.saveDocument(XWiki.java:1056)
at com.xpn.xwiki.XWiki.saveDocument(XWiki.java:1050)
at com.xpn.xwiki.XWiki.getPrefsClass(XWiki.java:2653)
at com.xpn.xwiki.XWiki.initXWiki(XWiki.java:797)
at com.xpn.xwiki.XWiki.<init>(XWiki.java:722)
at com.xpn.xwiki.XWiki.getMainXWiki(XWiki.java:293)
at com.xpn.xwiki.XWiki.getXWiki(XWiki.java:491)
at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:123)
at
org.apache.struts.action.RequestProcessor.processActionPerform(Reques
tProcessor.java:431)
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.ja
va:236)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:119
6)
at
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:596)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:428
)
at
org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(
WebApplicationHandler.java:830)
at
com.xpn.xwiki.web.SetCharacterEncodingFilter.doFilter(SetCharacterEnc
odingFilter.java:117)
at
org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(
WebApplicationHandler.java:821)
at
org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicati
onHandler.java:471)
at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:5
68)
at org.mortbay.http.HttpContext.handle(HttpContext.java:1565)
at
org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplication
Context.java:633)
at org.mortbay.http.HttpContext.handle(HttpContext.java:1517)
at org.mortbay.http.HttpServer.service(HttpServer.java:954)
at org.mortbay.http.HttpConnection.service(HttpConnection.java:816)
at
org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:983)
at org.mortbay.http.HttpConnection.handle(HttpConnection.java:833)
at
org.mortbay.http.SocketListener.handleConnection(SocketListener.java:
244)
at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357)
at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534)
getException():
org.hibernate.exception.DataException: Could not execute JDBC batch update
at
org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.j
ava:77)
at
org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelp
er.java:43)
at
org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:
253)
at
org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:237)
at
org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:141)
at
org.hibernate.event.def.AbstractFlushingEventListener.performExecutio
ns(AbstractFlushingEventListener.java:298)
at
org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlus
hEventListener.java:27)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000)
at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:338)
at
org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java
:106)
at
com.xpn.xwiki.store.XWikiHibernateBaseStore.endTransaction(XWikiHiber
nateBaseStore.java:783)
at
com.xpn.xwiki.store.XWikiHibernateBaseStore.endTransaction(XWikiHiber
nateBaseStore.java:754)
at
com.xpn.xwiki.store.XWikiHibernateStore.saveXWikiDoc(XWikiHibernateSt
ore.java:447)
at
com.xpn.xwiki.store.XWikiCacheStore.saveXWikiDoc(XWikiCacheStore.java
:97)
at
com.xpn.xwiki.store.XWikiCacheStore.saveXWikiDoc(XWikiCacheStore.java
:91)
at com.xpn.xwiki.XWiki.saveDocument(XWiki.java:1083)
at com.xpn.xwiki.XWiki.saveDocument(XWiki.java:1056)
at com.xpn.xwiki.XWiki.saveDocument(XWiki.java:1050)
at com.xpn.xwiki.XWiki.getPrefsClass(XWiki.java:2653)
at com.xpn.xwiki.XWiki.initXWiki(XWiki.java:797)
at com.xpn.xwiki.XWiki.<init>(XWiki.java:722)
at com.xpn.xwiki.XWiki.getMainXWiki(XWiki.java:293)
at com.xpn.xwiki.XWiki.getXWiki(XWiki.java:491)
at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:123)
at
org.apache.struts.action.RequestProcessor.processActionPerform(Reques
tProcessor.java:431)
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.ja
va:236)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:119
6)
at
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:596)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:428
)
at
org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(
WebApplicationHandler.java:830)
at
com.xpn.xwiki.web.SetCharacterEncodingFilter.doFilter(SetCharacterEnc
odingFilter.java:117)
at
org.mortbay.jetty.servlet.WebApplicationHandler$CachedChain.doFilter(
WebApplicationHandler.java:821)
at
org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicati
onHandler.java:471)
at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:5
68)
at org.mortbay.http.HttpContext.handle(HttpContext.java:1565)
at
org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplication
Context.java:633)
at org.mortbay.http.HttpContext.handle(HttpContext.java:1517)
at org.mortbay.http.HttpServer.service(HttpServer.java:954)
at org.mortbay.http.HttpConnection.service(HttpConnection.java:816)
at
org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:983)
at org.mortbay.http.HttpConnection.handle(HttpConnection.java:833)
at
org.mortbay.http.SocketListener.handleConnection(SocketListener.java:
244)
at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357)
at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534)
Caused by: java.sql.BatchUpdateException: null, message from server:
"Data too
long for column 'XWD_MINOREDIT' at row 1"
at
com.mysql.jdbc.PreparedStatement.executeBatch(PreparedStatement.java:
1404)
at
org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingSt
atement.java:294)
at
org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingSt
atement.java:294)
at
org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.jav
a:48)
at
org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:
246)
... 43 more
Regards,
Project trainees.