[xwiki-users] A exception about Table 'xwiki.xwikidoc' doesn't exist when install xwiki.
I use tomcat and mysql to install xwiki. I choose war file to deploy. But after I finish the configure and visit the link(http://localhost:8080/xwiki/ ). The error occur. I think maybe because I do not import the database schema. But I can't find it in the war file. Below is trace. please help me, thank you very much. using driver: com.mysql.jdbc.Driver at URL: jdbc:mysql://localhost:3306/xwiki connection properties: {user=xwiki, password=****} RDBMS: MySQL, version: 5.0.18 JDBC driver: MySQL-AB JDBC Driver, version: mysql-connector-java-5.1.6 ( Revision: ${svn.Revision} ) Using dialect: org.hibernate.dialect.MySQLDialect Using default transaction strategy (direct JDBC transactions) No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended) Automatic flush during beforeCompletion(): disabled Automatic session close at end of transaction: disabled JDBC batch size: 15 JDBC batch updates for versioned data: disabled Scrollable result sets: enabled JDBC3 getGeneratedKeys(): enabled Connection release mode: auto Maximum outer join fetch depth: 2 Default batch fetch size: 1 Generate SQL with comments: disabled Order SQL updates by primary key: disabled Order SQL inserts for batching: disabled Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory Using ASTQueryTranslatorFactory Query language substitutions: {} JPA-QL strict compliance: disabled Second-level cache: enabled Query cache: disabled Cache provider: org.hibernate.cache.NoCacheProvider Optimize cache for minimal puts: disabled Structured second-level cache entries: disabled Statistics: disabled Deleted entity synthetic identifier rollback: disabled Default entity-mode: pojo Named query checking : enabled building session factory Not binding factory to JNDI, no JNDI name configured Updating schema update for wiki [xwiki]... Using dialect: org.hibernate.dialect.MySQLDialect Failed updating schema while executing query [update xwikidoc set xwd_translation=0 where xwd_translation is null] com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Table 'xwiki.xwikidoc' doesn't exist at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1026) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3491) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3423) at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1936) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2060) at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2536) at com.mysql.jdbc.StatementImpl.executeUpdate(StatementImpl.java:1564) at com.mysql.jdbc.StatementImpl.executeUpdate(StatementImpl.java:1485) at com.xpn.xwiki.store.XWikiHibernateBaseStore.updateSchema(XWikiHibernateBaseStore.java:451) at com.xpn.xwiki.store.XWikiHibernateBaseStore.updateSchema(XWikiHibernateBaseStore.java:310) at com.xpn.xwiki.store.XWikiHibernateBaseStore.updateSchema(XWikiHibernateBaseStore.java:258) at com.xpn.xwiki.store.XWikiHibernateBaseStore.checkHibernate(XWikiHibernateBaseStore.java:520) at com.xpn.xwiki.store.XWikiHibernateBaseStore.execute(XWikiHibernateBaseStore.java:995) at com.xpn.xwiki.store.XWikiHibernateBaseStore.executeRead(XWikiHibernateBaseStore.java:1038) at com.xpn.xwiki.store.migration.hibernate.XWikiHibernateMigrationManager.getDBVersion(XWikiHibernateMigrationManager.java:63) at com.xpn.xwiki.store.migration.AbstractXWikiMigrationManager.<init>(AbstractXWikiMigrationManager.java:68) at com.xpn.xwiki.store.migration.hibernate.XWikiHibernateMigrationManager.<init>(XWikiHibernateMigrationManager.java:50) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:494) at com.xpn.xwiki.XWiki.createClassFromConfig(XWiki.java:855) at com.xpn.xwiki.XWiki.initXWiki(XWiki.java:794) at com.xpn.xwiki.XWiki.<init>(XWiki.java:731) at com.xpn.xwiki.XWiki.getMainXWiki(XWiki.java:318) at com.xpn.xwiki.XWiki.getXWiki(XWiki.java:514) at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:126) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414) at javax.servlet.http.HttpServlet.service(HttpServlet.java:690) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at com.xpn.xwiki.web.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:112) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689) at java.lang.Thread.run(Thread.java:595) Schema update for wiki [xwiki] done Current storage version = [0] List of migrations that will be executed: R4340XWIKI883 - See http://jira.xwiki.org/jira/browse/XWIKI-883 R4359XWIKI1459 - See http://jira.xwiki.org/jira/browse/XWIKI-1459 R7345XWIKI2079 - See http://jira.xwiki.org/jira/browse/XWIKI-2079 Running migration [R4340XWIKI883] with version [4340] Failed to migrate main database... com.xpn.xwiki.XWikiException: Error number 3005 in 3: Migration failed Wrapped Exception: Error number 0 in 3: Exception while hibernate execute Wrapped Exception: BaseObject is not mapped [select s from BaseObject o, StringProperty s where o.className like 'XWiki.XWiki%Rights' and o.id=s.idand ( s.name='users' or s.name='groups')] at com.xpn.xwiki.store.migration.AbstractXWikiMigrationManager.startMigrationsForDatabase(AbstractXWikiMigrationManager.java:198) at com.xpn.xwiki.store.migration.AbstractXWikiMigrationManager.startMigrations(AbstractXWikiMigrationManager.java:140) at com.xpn.xwiki.XWiki.initXWiki(XWiki.java:798) at com.xpn.xwiki.XWiki.<init>(XWiki.java:731) at com.xpn.xwiki.XWiki.getMainXWiki(XWiki.java:318) at com.xpn.xwiki.XWiki.getXWiki(XWiki.java:514) at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:126) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414) at javax.servlet.http.HttpServlet.service(HttpServlet.java:690) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at com.xpn.xwiki.web.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:112) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689) at java.lang.Thread.run(Thread.java:595) Wrapped Exception: com.xpn.xwiki.XWikiException: Error number 0 in 3: Exception while hibernate execute Wrapped Exception: BaseObject is not mapped [select s from BaseObject o, StringProperty s where o.className like 'XWiki.XWiki%Rights' and o.id=s.idand ( s.name='users' or s.name='groups')] at com.xpn.xwiki.store.XWikiHibernateBaseStore.execute(XWikiHibernateBaseStore.java:1005) at com.xpn.xwiki.store.XWikiHibernateBaseStore.executeWrite(XWikiHibernateBaseStore.java:1055) at com.xpn.xwiki.store.migration.hibernate.R4340XWIKI883Migrator.migrate(R4340XWIKI883Migrator.java:71) at com.xpn.xwiki.store.migration.hibernate.AbstractXWikiHibernateMigrator.migrate(AbstractXWikiHibernateMigrator.java:39) at com.xpn.xwiki.store.migration.AbstractXWikiMigrationManager.startMigrations(AbstractXWikiMigrationManager.java:288) at com.xpn.xwiki.store.migration.AbstractXWikiMigrationManager.startMigrationsForDatabase(AbstractXWikiMigrationManager.java:196) at com.xpn.xwiki.store.migration.AbstractXWikiMigrationManager.startMigrations(AbstractXWikiMigrationManager.java:140) at com.xpn.xwiki.XWiki.initXWiki(XWiki.java:798) at com.xpn.xwiki.XWiki.<init>(XWiki.java:731) at com.xpn.xwiki.XWiki.getMainXWiki(XWiki.java:318) at com.xpn.xwiki.XWiki.getXWiki(XWiki.java:514) at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:126) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414) at javax.servlet.http.HttpServlet.service(HttpServlet.java:690) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at com.xpn.xwiki.web.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:112) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689) at java.lang.Thread.run(Thread.java:595) Wrapped Exception: org.hibernate.hql.ast.QuerySyntaxException: BaseObject is not mapped [select s from BaseObject o, StringProperty s where o.className like 'XWiki.XWiki%Rights' and o.id=s.id and (s.name='users' or s.name='groups')] at org.hibernate.hql.ast.util.SessionFactoryHelper.requireClassPersister(SessionFactoryHelper.java:158) at org.hibernate.hql.ast.tree.FromElementFactory.addFromElement(FromElementFactory.java:87) at org.hibernate.hql.ast.tree.FromClause.addFromElement(FromClause.java:70) at org.hibernate.hql.ast.HqlSqlWalker.createFromElement(HqlSqlWalker.java:255) at org.hibernate.hql.antlr.HqlSqlBaseWalker.fromElement(HqlSqlBaseWalker.java:3056) at org.hibernate.hql.antlr.HqlSqlBaseWalker.fromElementList(HqlSqlBaseWalker.java:2945) at org.hibernate.hql.antlr.HqlSqlBaseWalker.fromClause(HqlSqlBaseWalker.java:688)
jing shen wrote:
I use tomcat and mysql to install xwiki. I choose war file to deploy. But after I finish the configure and visit the link(http://localhost:8080/xwiki/ ).
The error occur. I think maybe because I do not import the database schema. But I can't find it in the war file.
As stated on http://platform.xwiki.org/xwiki/bin/view/AdminGuide/InstallationMySQL you should run: create database xwiki grant all privileges on xwiki.* to [email protected] identified by 'xwiki' XWiki creates its tables when started, there's no need to import any schema. It just needs the right to do that. -- Sergiu Dumitriu http://purl.org/net/sergiu/
Hi Sergiu Dumitriu, Thank you for you reply. But I still can't resolve my problem. Others Importing SQL commands into your MySQL database Execute the following: mysql -u xwiki -p xwiki -h 127.0.0.1 < mycommands.sql I have creat a database which name is xwiki. and I also create a xwiki/xwiki and grant all priviledge to it. except the top script. In fact, I don't know why I need it. maybe it's just addition. I also guess the xwiki will import database when it start. but in mu trace, there are nothing about this. Deleted entity synthetic identifier rollback: disabled Default entity-mode: pojo Named query checking : enabled building session factory Not binding factory to JNDI, no JNDI name configured Updating schema update for wiki [xwiki]... Using dialect: org.hibernate.dialect.MySQLDialect Failed updating schema while executing query [update xwikidoc set xwd_translation=0 where xwd_translation is null] com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Table 'xwiki.xwikidoc' doesn't exist at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1026) I think the green background is the hibernate init, and then, the error occur. Why there are no action for import database between the two script? thanks Jing Shen 2008/5/30, Sergiu Dumitriu <[email protected]>:
jing shen wrote:
I use tomcat and mysql to install xwiki. I choose war file to deploy. But after I finish the configure and visit the link( http://localhost:8080/xwiki/ ).
The error occur. I think maybe because I do not import the database schema. But I can't find it in the war file.
As stated on http://platform.xwiki.org/xwiki/bin/view/AdminGuide/InstallationMySQL you should run:
create database xwiki grant all privileges on xwiki.* to [email protected] identified by 'xwiki'
XWiki creates its tables when started, there's no need to import any schema. It just needs the right to do that.
-- Sergiu Dumitriu http://purl.org/net/sergiu/ _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
jing shen wrote:
Hi Sergiu Dumitriu,
Thank you for you reply. But I still can't resolve my problem.
Others
Importing SQL commands into your MySQL database
Execute the following:
mysql -u xwiki -p xwiki -h 127.0.0.1 < mycommands.sql
^^^ Where did you get this from?
I have creat a database which name is xwiki. and I also create a xwiki/xwiki and grant all priviledge to it. except the top script. In fact, I don't know why I need it. maybe it's just addition. I also guess the xwiki will import database when it start. but in mu trace, there are nothing about this.
No, it doesn't import anything. It creates the tables it needs, but without any data. You will have to import the wiki pages later.
Deleted entity synthetic identifier rollback: disabled Default entity-mode: pojo Named query checking : enabled building session factory Not binding factory to JNDI, no JNDI name configured Updating schema update for wiki [xwiki]... Using dialect: org.hibernate.dialect.MySQLDialect Failed updating schema while executing query [update xwikidoc set xwd_translation=0 where xwd_translation is null] com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Table 'xwiki.xwikidoc' doesn't exist at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1026)
Where is this log from?
I think the green background is the hibernate init, and then, the error occur. Why there are no action for import database between the two script?
Step by step: 1. Create the mysql database: create database xwiki; 2. Grant privileges to the user named 'xwiki': grant all privileges on xwiki.* to xwiki@localhost identified by 'xwiki'; 3. Make sure that hibernate.cfg.xml contains the proper connection string and username/password: <property name="connection.url">jdbc:mysql://localhost/xwiki?useServerPrepStmts=false&sessionVariables=sql_mode=''</property> 4. Restart the container and open a page. This assumes that the container and the database server are on the same machine; if that isn't the case, then update points 2 and 3 accordingly: grant all privileges on xwiki.* to xwiki@'your.server.name' identified by 'your_password'; <property name="connection.url">jdbc:mysql://your.server.name/xwiki?useServerPrepStmts=false&sessionVariables=sql_mode=''</property> <property name="connection.password">your_password</property>
2008/5/30, Sergiu Dumitriu <[email protected]>:
jing shen wrote:
I use tomcat and mysql to install xwiki. I choose war file to deploy. But after I finish the configure and visit the link( http://localhost:8080/xwiki/ ).
The error occur. I think maybe because I do not import the database schema. But I can't find it in the war file.
As stated on http://platform.xwiki.org/xwiki/bin/view/AdminGuide/InstallationMySQL you should run:
create database xwiki grant all privileges on xwiki.* to [email protected] identified by 'xwiki'
XWiki creates its tables when started, there's no need to import any schema. It just needs the right to do that.
-- Sergiu Dumitriu http://purl.org/net/sergiu/
Hi Sergiu, thank you for you reply, and I will check again on monday. please see my comments which is below. 2008/5/30, Sergiu Dumitriu <[email protected]>:
jing shen wrote:
Hi Sergiu Dumitriu,
Thank you for you reply. But I still can't resolve my problem.
Others
Importing SQL commands into your MySQL database
Execute the following:
mysql -u xwiki -p xwiki -h 127.0.0.1 < mycommands.sql
^^^ Where did you get this from?
*I get this frome xwiki install guide.
http://platform.xwiki.org/xwiki/bin/view/AdminGuide/InstallationMySQL below of this page.*
I have creat a database which name is xwiki. and I also create a xwiki/xwiki
and grant all priviledge to it. except the top script. In fact, I don't know why I need it. maybe it's just addition. I also guess the xwiki will import database when it start. but in mu trace, there are nothing about this.
No, it doesn't import anything. It creates the tables it needs, but without any data. You will have to import the wiki pages later.
Deleted entity synthetic identifier rollback: disabled Default entity-mode: pojo Named query checking : enabled building session factory Not binding factory to JNDI, no JNDI name configured Updating schema update for wiki [xwiki]... Using dialect: org.hibernate.dialect.MySQLDialect Failed updating schema while executing query [update xwikidoc set xwd_translation=0 where xwd_translation is null] com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Table 'xwiki.xwikidoc' doesn't exist at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1026)
Where is this log from?
*this log is output by log4j. I visite the **http://localhost:8080/xwiki*<http://localhost:8080/xwiki>
*, and the log will display.*
I think the green background is the hibernate init, and then, the error
occur. Why there are no action for import database between the two script?
Step by step:
1. Create the mysql database: create database xwiki; 2. Grant privileges to the user named 'xwiki': grant all privileges on xwiki.* to xwiki@localhost identified by 'xwiki'; 3. Make sure that hibernate.cfg.xml contains the proper connection string and username/password: <property
name="connection.url">jdbc:mysql://localhost/xwiki?useServerPrepStmts=false&sessionVariables=sql_mode=''</property> 4. Restart the container and open a page.
This assumes that the container and the database server are on the same machine; if that isn't the case, then update points 2 and 3 accordingly:
grant all privileges on xwiki.* to xwiki@'your.server.name' identified by 'your_password';
<property name="connection.url">jdbc:mysql:// your.server.name/xwiki?useServerPrepStmts=false&sessionVariables=sql_mode=' '</property> <property name="connection.password">your_password</property>
2008/5/30, Sergiu Dumitriu <[email protected]>:
jing shen wrote:
I use tomcat and mysql to install xwiki. I choose war file to deploy.
But
after I finish the configure and visit the link( http://localhost:8080/xwiki/ ).
The error occur. I think maybe because I do not import the database schema. But I can't find it in the war file.
As stated on http://platform.xwiki.org/xwiki/bin/view/AdminGuide/InstallationMySQL you should run:
create database xwiki grant all privileges on xwiki.* to [email protected] identified by 'xwiki'
XWiki creates its tables when started, there's no need to import any schema. It just needs the right to do that.
-- Sergiu Dumitriu http://purl.org/net/sergiu/ _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
participants (2)
-
jing shen -
Sergiu Dumitriu