Any chance both XWiki instances are writing to the same database?
If you want the second XWiki instance writes to another database, you must not only update
the value in the hibernate.hbm,xml
but also the property "xwiki.db" (and probably xwiki.db.prefix) in
WEB-INF/xwiki.cfg too
Aside of that you can add a line like
<logger name="com.xpn.xwiki.store.XWikiHibernateBaseStore"
level="debug"/>
to the WEB-INF/classes/logback.xml
and see if more information shows up in the log file.
Hi all,
my next request is regarding to let xwiki initialize a new, empty SQL Server database to
use the xwiki with this empty database. The problem is that the table
activitystream_events seems to be created twice:
com.microsoft.sqlserver.jdbc.SQLServerException: There is already an object named
'activitystream_events' in the database.
Has somebody an idea of how I can solve that issue? There are some interesting logs that
looks like access problems with the database, but if there are problems accessing the
database it might not be possible to create any table, isn't it?
So here is the tomcat log, maybe it is helpful to solve the issue.
Kind regards,
Sebastian.
Hibernate: select this_.XWV_VERSION as XWV1_26_0_ from xwikidbversion this_
Hibernate: select count(*) as y0_ from xwikidoc this_
2016-05-04 15:19:37,334 [
http://pippin:8080/xwiki2/bin/view/Main/] INFO
.HibernateDataMigrationManager - Checking Hibernate mapping and updating schema if needed
for wiki [xwiki]
2016-05-04 15:19:37,570 [
http://pippin:8080/xwiki2/bin/view/Main/] ERROR
.HibernateDataMigrationManager - The empty database xwiki seems to be not writable, please
check your configuration!
com.xpn.xwiki.store.migration.DataMigrationException: Unable to update schema of wiki
[xwiki]
at
com.xpn.xwiki.store.migration.hibernate.HibernateDataMigrationManager.updateSchema(HibernateDataMigrationManager.java:182)
~[xwiki-platform-legacy-oldcore-7.4.2.jar:na]
at
com.xpn.xwiki.store.migration.hibernate.HibernateDataMigrationManager.initializeEmptyDB(HibernateDataMigrationManager.java:142)
~[xwiki-platform-legacy-oldcore-7.4.2.jar:na]
at
com.xpn.xwiki.store.migration.AbstractDataMigrationManager.initNewDB(AbstractDataMigrationManager.java:445)
[xwiki-platform-legacy-oldcore-7.4.2.jar:na]
at
com.xpn.xwiki.store.migration.AbstractDataMigrationManager.initializeCurrentDatabase(AbstractDataMigrationManager.java:550)
[xwiki-platform-legacy-oldcore-7.4.2.jar:na]
at
com.xpn.xwiki.store.migration.AbstractDataMigrationManager.checkDatabase(AbstractDataMigrationManager.java:533)
[xwiki-platform-legacy-oldcore-7.4.2.jar:na]
at
com.xpn.xwiki.store.XWikiHibernateBaseStore.setDatabase(XWikiHibernateBaseStore.java:734)
[xwiki-platform-legacy-oldcore-7.4.2.jar:na]
at
com.xpn.xwiki.store.XWikiHibernateBaseStore.beginTransaction(XWikiHibernateBaseStore.java:911)
[xwiki-platform-legacy-oldcore-7.4.2.jar:na]
at
com.xpn.xwiki.store.XWikiHibernateBaseStore.beginTransaction(XWikiHibernateBaseStore.java:843)
[xwiki-platform-legacy-oldcore-7.4.2.jar:na]
at com.xpn.xwiki.store.XWikiHibernateStore.loadXWikiDoc(XWikiHibernateStore.java:856)
[xwiki-platform-legacy-oldcore-7.4.2.jar:na]
at com.xpn.xwiki.store.XWikiCacheStore.loadXWikiDoc(XWikiCacheStore.java:299)
[xwiki-platform-legacy-oldcore-7.4.2.jar:na]
at com.xpn.xwiki.XWiki.getDocument(XWiki.java:1634)
[xwiki-platform-legacy-oldcore-7.4.2.jar:na]
at com.xpn.xwiki.XWiki.getDocument(XWiki.java:1680)
[xwiki-platform-legacy-oldcore-7.4.2.jar:na]
Caused by: org.hibernate.HibernateException: Failed updating schema while executing query
[create table activitystream_events (ase_eventid varchar(48) not null, ase_requestid
varchar(48) null, ase_stream varchar(255) null, ase_date datetime null, ase_priority int
null, ase_type varchar(255) null, ase_application varchar(255) null, ase_user varchar(255)
null, ase_wiki varchar(255) null, ase_space varchar(255) null, ase_page varchar(255) null,
ase_hidden tinyint null, ase_url varchar(2000) null, ase_title varchar(2000) null,
ase_body varchar(2000) null, ase_version varchar(30) null, ase_param1 varchar(2000) null,
ase_param2 varchar(2000) null, ase_param3 varchar(2000) null, ase_param4 varchar(2000)
null, ase_param5 varchar(2000) null, primary key (ase_eventid))]
at
com.xpn.xwiki.store.XWikiHibernateBaseStore.updateSchema(XWikiHibernateBaseStore.java:625)
[xwiki-platform-legacy-oldcore-7.4.2.jar:na]
at
com.xpn.xwiki.store.XWikiHibernateBaseStore.updateSchema(XWikiHibernateBaseStore.java:371)
[xwiki-platform-legacy-oldcore-7.4.2.jar:na]
at
com.xpn.xwiki.store.migration.hibernate.HibernateDataMigrationManager.hibernateShemaUpdate(HibernateDataMigrationManager.java:198)
~[xwiki-platform-legacy-oldcore-7.4.2.jar:na]
at
com.xpn.xwiki.store.migration.hibernate.HibernateDataMigrationManager.updateSchema(HibernateDataMigrationManager.java:179)
~[xwiki-platform-legacy-oldcore-7.4.2.jar:na]
... 77 common frames omitted
Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: There is already an object
named 'activitystream_events' in the database.
2016-05-04 15:19:37,570 [
http://pippin:8080/xwiki2/bin/view/Main/] ERROR
PreferencesConfigurationSource - Failed to access configuration property
com.xpn.xwiki.XWikiException: Error number 3202 in 3: Exception while reading document
[xwiki:XWiki.XWikiPreferences]
at com.xpn.xwiki.store.XWikiHibernateStore.loadXWikiDoc(XWikiHibernateStore.java:989)
~[xwiki-platform-legacy-oldcore-7.4.2.jar:na]
at com.xpn.xwiki.store.XWikiCacheStore.loadXWikiDoc(XWikiCacheStore.java:299)
~[xwiki-platform-legacy-oldcore-7.4.2.jar:na]
at com.xpn.xwiki.XWiki.getDocument(XWiki.java:1634)
[xwiki-platform-legacy-oldcore-7.4.2.jar:na]
at com.xpn.xwiki.XWiki.getDocument(XWiki.java:1680)
[xwiki-platform-legacy-oldcore-7.4.2.jar:na]
at
org.xwiki.configuration.internal.AbstractXWikiPreferencesConfigurationSource.getBaseObject(AbstractXWikiPreferencesConfigurationSource.java:86)
~[xwiki-platform-configuration-default-7.4.2.jar:na]
at
org.xwiki.configuration.internal.AbstractXWikiPreferencesConfigurationSource.getBaseProperty(AbstractXWikiPreferencesConfigurationSource.java:139)
~[xwiki-platform-configuration-default-7.4.2.jar:na]
at
org.xwiki.configuration.internal.AbstractXWikiPreferencesConfigurationSource.getBaseProperty(AbstractXWikiPreferencesConfigurationSource.java:156)
~[xwiki-platform-configuration-default-7.4.2.jar:na]
at
org.xwiki.configuration.internal.AbstractDocumentConfigurationSource.getPropertyValue(AbstractDocumentConfigurationSource.java:315)
[xwiki-platform-configuration-default-7.4.2.jar:na]
Caused by: com.xpn.xwiki.XWikiException: Error number 3301 in 3: Exception while
switching to database xwiki
at
com.xpn.xwiki.store.XWikiHibernateBaseStore.setDatabase(XWikiHibernateBaseStore.java:738)
~[xwiki-platform-legacy-oldcore-7.4.2.jar:na]
at
com.xpn.xwiki.store.XWikiHibernateBaseStore.beginTransaction(XWikiHibernateBaseStore.java:911)
~[xwiki-platform-legacy-oldcore-7.4.2.jar:na]
at
com.xpn.xwiki.store.XWikiHibernateBaseStore.beginTransaction(XWikiHibernateBaseStore.java:843)
~[xwiki-platform-legacy-oldcore-7.4.2.jar:na]
at com.xpn.xwiki.store.XWikiHibernateStore.loadXWikiDoc(XWikiHibernateStore.java:856)
~[xwiki-platform-legacy-oldcore-7.4.2.jar:na]
... 69 common frames omitted
Caused by: com.xpn.xwiki.store.migration.DataMigrationException: The empty database xwiki
seems to be not writable, please check your configuration!
at
com.xpn.xwiki.store.migration.AbstractDataMigrationManager.initializeCurrentDatabase(AbstractDataMigrationManager.java:556)
~[xwiki-platform-legacy-oldcore-7.4.2.jar:na]
at
com.xpn.xwiki.store.migration.AbstractDataMigrationManager.checkDatabase(AbstractDataMigrationManager.java:533)
~[xwiki-platform-legacy-oldcore-7.4.2.jar:na]
at
com.xpn.xwiki.store.XWikiHibernateBaseStore.setDatabase(XWikiHibernateBaseStore.java:734)
~[xwiki-platform-legacy-oldcore-7.4.2.jar:na]
... 72 common frames omitted
Caused by: com.xpn.xwiki.store.migration.DataMigrationException: Unable to update schema
of wiki [xwiki]
at
com.xpn.xwiki.store.migration.hibernate.HibernateDataMigrationManager.updateSchema(HibernateDataMigrationManager.java:182)
~[xwiki-platform-legacy-oldcore-7.4.2.jar:na]
at
com.xpn.xwiki.store.migration.hibernate.HibernateDataMigrationManager.initializeEmptyDB(HibernateDataMigrationManager.java:142)
~[xwiki-platform-legacy-oldcore-7.4.2.jar:na]
at
com.xpn.xwiki.store.migration.AbstractDataMigrationManager.initNewDB(AbstractDataMigrationManager.java:445)
~[xwiki-platform-legacy-oldcore-7.4.2.jar:na]
at
com.xpn.xwiki.store.migration.AbstractDataMigrationManager.initializeCurrentDatabase(AbstractDataMigrationManager.java:550)
~[xwiki-platform-legacy-oldcore-7.4.2.jar:na]
... 74 common frames omitted
_______________________________________________
users mailing list
users(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/users