首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >xwiki错误:重复查询映射getSpaceDocsName

xwiki错误:重复查询映射getSpaceDocsName
EN

Stack Overflow用户
提问于 2019-04-01 20:59:41
回答 1查看 392关注 0票数 0

我终于得到了nginx设置,为我代理到tomcat,而在ALB…后面。但现在,当我访问xwiki的url时,我看到了多个错误。底部的错误..。

这是一个干净的实例,数据库是空的,所以我觉得这与/xwiki的重定向是如何发生的,但是我不确定还有什么应该或者不应该在那里。有人看到什么能帮到我吗?xwiki-11.2 nginx-1.14

下面是我的nginx.conf中的内容的副本:

代码语言:javascript
复制
upstream xwiki {
server localhost:8080;
}
server {
listen       80;
server_name  xwiki.domain.net;

# Normally root should not be accessed, however, root should not serve files that might compromise the security of your server.
root /var/www/html;

location / {
    # All "root" requests will have /xwiki appended AND redirected to mydomain.com
    rewrite ^ $scheme://$server_name/xwiki$request_uri? permanent;
}

location ^~ /xwiki {
   # If path starts with /xwiki - then redirect to backend: XWiki application in Tomcat
   # Read more about proxy_pass: http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_pass
   proxy_pass http://xwiki;
   proxy_set_header        X-Real-IP $remote_addr;
   proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
   proxy_set_header        Host $http_host;
   proxy_set_header        X-Forwarded-Proto $scheme;
}
}

这是我的hibernate.cfg.xml…

代码语言:javascript
复制
<hibernate-configuration>
<session-factory>

<property name="show_sql">false</property>

<property name="use_outer_join">true</property>

<property name="jdbc.use_scrollable_resultset">false</property>

<property name="dbcp.defaultAutoCommit">false</property>
<property name="dbcp.maxTotal">50</property>
<property name="dbcp.maxIdle">5</property>
<property name="dbcp.maxWaitMillis">30000</property>
<property name="connection.provider_class">com.xpn.xwiki.store.DBCPConnectionProvider</property>

<property name="connection.url">jdbc:mysql://xwiki.endpoint.rds.amazonaws.com/xwiki</property>
<property name="connection.username">MYUSERNAME</property>
<property name="connection.password">MYPASSWORD</property>
<property name="connection.driver_class">com.mysql.jdbc.Driver</property>
<property name="dialect">org.hibernate.dialect.MySQL5InnoDBDialect</property>
<property name="connection.useUnicode">true</property>
<property name="connection.characterEncoding">UTF-8</property>
<property name="dbcp.poolPreparedStatements">true</property>
<property name="dbcp.maxOpenPreparedStatements">20</property>
<property name="hibernate.connection.charSet">UTF-8</property>
<property name="hibernate.connection.useUnicode">true</property>
<property name="hibernate.connection.characterEncoding">utf8</property>
<mapping resource="xwiki.hbm.xml"/>
<mapping resource="feeds.hbm.xml"/>
<mapping resource="eventstream.hbm.xml"/>
<mapping resource="instance.hbm.xml"/>
<mapping resource="notification-filter-preferences.hbm.xml"/>
<mapping resource="mailsender.hbm.xml"/>
</session-factory>
</hibernate-configuration>

错误:(必须去掉填充物bc炭限制)

代码语言:javascript
复制
    HTTP Status 500 – Internal Server Error
Type Exception Report

Message com.xpn.xwiki.XWikiException: Error number 11007 in 0: Failed to extract Entity Resource Reference from URL [http://xwiki.mydomain.net/xwiki/bin/view/Main/]

Description The server encountered an unexpected condition that prevented it from fulfilling the request.

Exception

javax.servlet.ServletException: com.xpn.xwiki.XWikiException: Error number 11007 in 0: Failed to extract Entity Resource Reference from URL [http://xwiki.mydomain.net/xwiki/bin/view/Main/]

com.xpn.xwiki.XWikiException: Error number 11007 in 0: Failed to extract Entity Resource Reference from URL [http://xwiki.mydomain.net/xwiki/bin/view/Main/]

java.lang.RuntimeException: Failed to locate wiki descriptor for alias [xwiki.mydomain.net]

org.xwiki.wiki.manager.WikiManagerException: Failed to locate XWiki.XWikiServerClass document for wiki alias [xwiki.mydomain.net]

org.xwiki.query.QueryException: Exception while translating [where doc.object(XWiki.XWikiServerClass).server = :wikiAlias and doc.name like 'XWikiServer%'] XWQL query to the [hql] language. Query statement = [where doc.object(XWiki.XWikiServerClass).server = :wikiAlias and doc.name like 'XWikiServer%']

com.xpn.xwiki.XWikiException: Error number 3202 in 3: Exception while reading document [xwiki:XWiki.XWikiServerClass]

org.hibernate.InvalidMappingException: Could not parse mapping document from input stream

org.hibernate.DuplicateMappingException: Duplicate query mapping getSpaceDocsName

Note The full stack trace of the  is available in the server logs.

Apache Tomcat/8.5.30 (Ubuntu)
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2019-04-02 07:24:46

代码语言:javascript
复制
<mapping resource="eventstream.hbm.xml"/>

这就是导致DuplicateMappingException的原因,它不是标准11.2 hibernate.cfg.xml的一部分,所以看起来您保留了一个旧的。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/55463501

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档