Using your own database

Hi there! I want to use my own POStgresql database , Is it possible to utilize the schema that XWIKI has and dump that schema to my own database ? Has anyone done that ? if so please share with me how to achieve that goal. Much appreciated

Hi. You’re in luck since this is actually how XWiki works :slight_smile:

See https://www.xwiki.org/xwiki/bin/view/Documentation/AdminGuide/Installation/#HInstallationMethods for details, depending on your install method.

1 Like

Honestly, I didn’t quite get on where to find the part where I can connect to my own standalone postgresql database. Could you be more specific pls ?

Could these URLs act as entry points?

Hope it helps!

1 Like

I’m trying to connect to my database on my localhost but it gives me a 500 error like this. I don’t know what is happening error

I run this cli command
docker run --net=xwiki-nw --name xwiki -p 80:8080 -v C:\Users\GAvetisyan\Desktop\xwiki:/usr/local/xwiki -e DB_USER=gigi -e DB_PASSWORD=XXXX -e DB_DATABASE=xwiki -e DB_HOST=localhost xwiki:lts-postgres-tomcat

If you are using docker to run XWiki, xwiki-docker/README.md at master · xwiki/xwiki-docker · GitHub can be of some help.

You’ll also find below a docker-compose snippet running XWiki with a PostgreSQL backend:

version: '2'
networks:
  bridge:
    driver: bridge
services:
  web:
    image: "xwiki:13.10-postgres-tomcat"
    container_name: xwiki-postgres-tomcat-web
    restart: always
    depends_on:
      - db
    ports:
      - "8080:8080"
    # The DB_USER/DB_PASSWORD/DB_HOST variables are used in the hibernate.cfg.xml file.
    environment:
      - DB_USER=xwiki
      - DB_PASSWORD=xwiki
      - DB_DATABASE=xwiki
      - DB_HOST=xwiki-postgres-db
    # Provide a name instead of an auto-generated id for the xwiki permanent directory configured in the Dockerfile,
    # to make it simpler to identify in 'docker volume ls'.
    volumes:
      - xwiki-data:/usr/local/xwiki
      - xwiki-tomcat-conf:/usr/local/tomcat/conf/
    networks:
      - bridge
  # The container that runs PostgreSQL
  db:
    image: "postgres:12-alpine"
    container_name: xwiki-postgres-db
    restart: always
    volumes:
      - postgres-data:/var/lib/postgresql/data
    environment:
      - POSTGRES_ROOT_PASSWORD=xwiki
      - POSTGRES_PASSWORD=xwiki
      - POSTGRES_USER=xwiki
      - POSTGRES_DB=xwiki
      - POSTGRES_INITDB_ARGS="--encoding=UTF8"
    networks:
      - bridge
volumes:
  postgres-data: {}
  xwiki-data: {}
  xwiki-tomcat-conf: {}

1 Like

If you can paste the full error then we could help you. The problem is that you sent a partial screenshot. BTW please don’t send screenshot when you can copy paste the text instead :wink:

1 Like

Just to be clear, using a direct docker command line if the recommended way. The docker compose snippet is just a helper.

This looks ok if:

  • you have created a network called xwiki-nw
  • your postgresql db is inside that network
  • docker accepts \ syntax for paths under windows (haven’t checked)
  • you’re using the right DB user and password

In any case the stack trace will help tell you what the problem is.

Everything you mentioned is correct except the 2 nd one. I don’t believe its inside the network I created. How do I add my local postgresql database to that network ? Also I will post the entire error message as you mentioned

<<<<PART 1 >>>>>>>>>>

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://localhost:80/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://localhost:80/bin/view/Main/]
org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:520)
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:427)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:228)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449)
javax.servlet.http.HttpServlet.service(HttpServlet.java:655)
javax.servlet.http.HttpServlet.service(HttpServlet.java:764)
com.xpn.xwiki.web.ActionFilter.doFilter(ActionFilter.java:122)
org.xwiki.wysiwyg.filter.ConversionFilter.doFilter(ConversionFilter.java:109)
org.xwiki.container.servlet.filters.internal.SetHTTPHeaderFilter.doFilter(SetHTTPHeaderFilter.java:63)
org.xwiki.container.servlet.filters.internal.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:208)
org.xwiki.container.servlet.filters.internal.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:111)
org.xwiki.resource.servlet.RoutingFilter.doFilter(RoutingFilter.java:132)
Root Cause

com.xpn.xwiki.XWikiException: Error number 11007 in 0: Failed to extract Entity Resource Reference from URL [http://localhost:80/bin/view/Main/]
com.xpn.xwiki.XWiki.initializeResourceFromURL(XWiki.java:1047)
com.xpn.xwiki.XWiki.getXWiki(XWiki.java:907)
com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:378)
com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:283)
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:425)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:228)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449)
javax.servlet.http.HttpServlet.service(HttpServlet.java:655)
javax.servlet.http.HttpServlet.service(HttpServlet.java:764)
com.xpn.xwiki.web.ActionFilter.doFilter(ActionFilter.java:122)
org.xwiki.wysiwyg.filter.ConversionFilter.doFilter(ConversionFilter.java:109)
org.xwiki.container.servlet.filters.internal.SetHTTPHeaderFilter.doFilter(SetHTTPHeaderFilter.java:63)
org.xwiki.container.servlet.filters.internal.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:208)
org.xwiki.container.servlet.filters.internal.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:111)
org.xwiki.resource.servlet.RoutingFilter.doFilter(RoutingFilter.java:132)
Root Cause

java.lang.RuntimeException: Failed to locate wiki descriptor for alias [localhost]
org.xwiki.url.internal.standard.AbstractWikiReferenceExtractor.getWikiDescriptorByAlias(AbstractWikiReferenceExtractor.java:80)
org.xwiki.url.internal.standard.DomainWikiReferenceExtractor.resolveDomainBasedWikiReference(DomainWikiReferenceExtractor.java:61)
org.xwiki.url.internal.standard.DomainWikiReferenceExtractor.extract(DomainWikiReferenceExtractor.java:47)
org.xwiki.url.internal.standard.entity.BinEntityResourceReferenceResolver.extractWikiReference(BinEntityResourceReferenceResolver.java:51)
org.xwiki.url.internal.standard.entity.AbstractEntityResourceReferenceResolver.resolve(AbstractEntityResourceReferenceResolver.java:87)
org.xwiki.url.internal.standard.entity.AbstractEntityResourceReferenceResolver.resolve(AbstractEntityResourceReferenceResolver.java:50)
org.xwiki.url.internal.GenericResourceReferenceResolver.resolve(GenericResourceReferenceResolver.java:61)
org.xwiki.url.internal.GenericResourceReferenceResolver.resolve(GenericResourceReferenceResolver.java:47)
org.xwiki.url.internal.standard.StandardExtendedURLResourceReferenceResolver.resolve(StandardExtendedURLResourceReferenceResolver.java:65)
org.xwiki.url.internal.standard.StandardExtendedURLResourceReferenceResolver.resolve(StandardExtendedURLResourceReferenceResolver.java:43)
org.xwiki.url.internal.DefaultResourceReferenceResolver.resolve(DefaultResourceReferenceResolver.java:93)
org.xwiki.url.internal.DefaultResourceReferenceResolver.resolve(DefaultResourceReferenceResolver.java:48)
com.xpn.xwiki.XWiki.initializeResourceFromURL(XWiki.java:1042)
com.xpn.xwiki.XWiki.getXWiki(XWiki.java:907)
com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:378)
com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:283)
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:425)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:228)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449)
javax.servlet.http.HttpServlet.service(HttpServlet.java:655)
javax.servlet.http.HttpServlet.service(HttpServlet.java:764)
com.xpn.xwiki.web.ActionFilter.doFilter(ActionFilter.java:122)
org.xwiki.wysiwyg.filter.ConversionFilter.doFilter(ConversionFilter.java:109)
org.xwiki.container.servlet.filters.internal.SetHTTPHeaderFilter.doFilter(SetHTTPHeaderFilter.java:63)
org.xwiki.container.servlet.filters.internal.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:208)
org.xwiki.container.servlet.filters.internal.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:111)
org.xwiki.resource.servlet.RoutingFilter.doFilter(RoutingFilter.java:132)
Root Cause

org.xwiki.wiki.manager.WikiManagerException: Failed to locate XWiki.XWikiServerClass document for wiki alias [localhost]
org.xwiki.wiki.internal.descriptor.document.DefaultWikiDescriptorDocumentHelper.findXWikiServerClassDocumentReference(DefaultWikiDescriptorDocumentHelper.java:128)
org.xwiki.wiki.internal.descriptor.document.DefaultWikiDescriptorDocumentHelper.findXWikiServerClassDocument(DefaultWikiDescriptorDocumentHelper.java:140)
org.xwiki.wiki.internal.descriptor.DefaultWikiDescriptorManager.getByAlias(DefaultWikiDescriptorManager.java:148)
org.xwiki.url.internal.standard.AbstractWikiReferenceExtractor.getWikiDescriptorByAlias(AbstractWikiReferenceExtractor.java:78)
org.xwiki.url.internal.standard.DomainWikiReferenceExtractor.resolveDomainBasedWikiReference(DomainWikiReferenceExtractor.java:61)
org.xwiki.url.internal.standard.DomainWikiReferenceExtractor.extract(DomainWikiReferenceExtractor.java:47)
org.xwiki.url.internal.standard.entity.BinEntityResourceReferenceResolver.extractWikiReference(BinEntityResourceReferenceResolver.java:51)
org.xwiki.url.internal.standard.entity.AbstractEntityResourceReferenceResolver.resolve(AbstractEntityResourceReferenceResolver.java:87)
org.xwiki.url.internal.standard.entity.AbstractEntityResourceReferenceResolver.resolve(AbstractEntityResourceReferenceResolver.java:50)
org.xwiki.url.internal.GenericResourceReferenceResolver.resolve(GenericResourceReferenceResolver.java:61)
org.xwiki.url.internal.GenericResourceReferenceResolver.resolve(GenericResourceReferenceResolver.java:47)
org.xwiki.url.internal.standard.StandardExtendedURLResourceReferenceResolver.resolve(StandardExtendedURLResourceReferenceResolver.java:65)
org.xwiki.url.internal.standard.StandardExtendedURLResourceReferenceResolver.resolve(StandardExtendedURLResourceReferenceResolver.java:43)
org.xwiki.url.internal.DefaultResourceReferenceResolver.resolve(DefaultResourceReferenceResolver.java:93)
org.xwiki.url.internal.DefaultResourceReferenceResolver.resolve(DefaultResourceReferenceResolver.java:48)
com.xpn.xwiki.XWiki.initializeResourceFromURL(XWiki.java:1042)
com.xpn.xwiki.XWiki.getXWiki(XWiki.java:907)
com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:378)
com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:283)
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:425)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:228)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449)
javax.servlet.http.HttpServlet.service(HttpServlet.java:655)
javax.servlet.http.HttpServlet.service(HttpServlet.java:764)
com.xpn.xwiki.web.ActionFilter.doFilter(ActionFilter.java:122)
org.xwiki.wysiwyg.filter.ConversionFilter.doFilter(ConversionFilter.java:109)
org.xwiki.container.servlet.filters.internal.SetHTTPHeaderFilter.doFilter(SetHTTPHeaderFilter.java:63)
org.xwiki.container.servlet.filters.internal.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:208)
org.xwiki.container.servlet.filters.internal.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:111)
org.xwiki.resource.servlet.RoutingFilter.doFilter(RoutingFilter.java:132)
Root Cause

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%’]
org.xwiki.query.xwql.internal.XWQLQueryExecutor.execute(XWQLQueryExecutor.java:122)
org.xwiki.query.internal.DefaultQueryExecutorManager.execute(DefaultQueryExecutorManager.java:72)
org.xwiki.query.internal.DefaultQuery.execute(DefaultQuery.java:306)
org.xwiki.wiki.internal.descriptor.document.DefaultWikiDescriptorDocumentHelper.findXWikiServerClassDocumentReference(DefaultWikiDescriptorDocumentHelper.java:121)
org.xwiki.wiki.internal.descriptor.document.DefaultWikiDescriptorDocumentHelper.findXWikiServerClassDocument(DefaultWikiDescriptorDocumentHelper.java:140)
org.xwiki.wiki.internal.descriptor.DefaultWikiDescriptorManager.getByAlias(DefaultWikiDescriptorManager.java:148)
org.xwiki.url.internal.standard.AbstractWikiReferenceExtractor.getWikiDescriptorByAlias(AbstractWikiReferenceExtractor.java:78)
org.xwiki.url.internal.standard.DomainWikiReferenceExtractor.resolveDomainBasedWikiReference(DomainWikiReferenceExtractor.java:61)
org.xwiki.url.internal.standard.DomainWikiReferenceExtractor.extract(DomainWikiReferenceExtractor.java:47)
org.xwiki.url.internal.standard.entity.BinEntityResourceReferenceResolver.extractWikiReference(BinEntityResourceReferenceResolver.java:51)
org.xwiki.url.internal.standard.entity.AbstractEntityResourceReferenceResolver.resolve(AbstractEntityResourceReferenceResolver.java:87)
org.xwiki.url.internal.standard.entity.AbstractEntityResourceReferenceResolver.resolve(AbstractEntityResourceReferenceResolver.java:50)
org.xwiki.url.internal.GenericResourceReferenceResolver.resolve(GenericResourceReferenceResolver.java:61)
org.xwiki.url.internal.GenericResourceReferenceResolver.resolve(GenericResourceReferenceResolver.java:47)
org.xwiki.url.internal.standard.StandardExtendedURLResourceReferenceResolver.resolve(StandardExtendedURLResourceReferenceResolver.java:65)
org.xwiki.url.internal.standard.StandardExtendedURLResourceReferenceResolver.resolve(StandardExtendedURLResourceReferenceResolver.java:43)
org.xwiki.url.internal.DefaultResourceReferenceResolver.resolve(DefaultResourceReferenceResolver.java:93)
org.xwiki.url.internal.DefaultResourceReferenceResolver.resolve(DefaultResourceReferenceResolver.java:48)
com.xpn.xwiki.XWiki.initializeResourceFromURL(XWiki.java:1042)
com.xpn.xwiki.XWiki.getXWiki(XWiki.java:907)
com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:378)
com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:283)
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:425)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:228)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449)
javax.servlet.http.HttpServlet.service(HttpServlet.java:655)
javax.servlet.http.HttpServlet.service(HttpServlet.java:764)
com.xpn.xwiki.web.ActionFilter.doFilter(ActionFilter.java:122)
org.xwiki.wysiwyg.filter.ConversionFilter.doFilter(ConversionFilter.java:109)
org.xwiki.container.servlet.filters.internal.SetHTTPHeaderFilter.doFilter(SetHTTPHeaderFilter.java:63)
org.xwiki.container.servlet.filters.internal.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:208)
org.xwiki.container.servlet.filters.internal.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:111)
org.xwiki.resource.servlet.RoutingFilter.doFilter(RoutingFilter.java:132)
Root Cause

com.xpn.xwiki.XWikiException: Error number 3202 in 3: Exception while reading document [xwiki:XWiki.XWikiServerClass]
com.xpn.xwiki.store.XWikiHibernateStore.loadXWikiDoc(XWikiHibernateStore.java:1141)
com.xpn.xwiki.store.XWikiCacheStore.loadXWikiDoc(XWikiCacheStore.java:394)
com.xpn.xwiki.XWiki.getDocument(XWiki.java:2130)
com.xpn.xwiki.XWiki.getDocument(XWiki.java:2192)
com.xpn.xwiki.XWiki.getXClass(XWiki.java:7042)
com.xpn.xwiki.XWiki.getClass(XWiki.java:7055)
com.xpn.xwiki.doc.DefaultDocumentAccessBridge.isPropertyCustomMapped(DefaultDocumentAccessBridge.java:552)
org.xwiki.query.xwql.internal.QueryContext$PropertyInfo.isCustomMapped(QueryContext.java:153)
org.xwiki.query.xwql.internal.QueryContext$ObjectInfo.isCustomMapped(QueryContext.java:122)
org.xwiki.query.xwql.internal.hql.ObjectPrinter.print(ObjectPrinter.java:37)
org.xwiki.query.xwql.internal.hql.Printer.print(Printer.java:70)
org.xwiki.query.xwql.internal.hql.XWQLtoHQLTranslator.translate(XWQLtoHQLTranslator.java:61)
org.xwiki.query.xwql.internal.XWQLQueryExecutor.execute(XWQLQueryExecutor.java:90)
org.xwiki.query.internal.DefaultQueryExecutorManager.execute(DefaultQueryExecutorManager.java:72)
org.xwiki.query.internal.DefaultQuery.execute(DefaultQuery.java:306)
org.xwiki.wiki.internal.descriptor.document.DefaultWikiDescriptorDocumentHelper.findXWikiServerClassDocumentReference(DefaultWikiDescriptorDocumentHelper.java:121)
org.xwiki.wiki.internal.descriptor.document.DefaultWikiDescriptorDocumentHelper.findXWikiServerClassDocument(DefaultWikiDescriptorDocumentHelper.java:140)
org.xwiki.wiki.internal.descriptor.DefaultWikiDescriptorManager.getByAlias(DefaultWikiDescriptorManager.java:148)
org.xwiki.url.internal.standard.AbstractWikiReferenceExtractor.getWikiDescriptorByAlias(AbstractWikiReferenceExtractor.java:78)
org.xwiki.url.internal.standard.DomainWikiReferenceExtractor.resolveDomainBasedWikiReference(DomainWikiReferenceExtractor.java:61)
org.xwiki.url.internal.standard.DomainWikiReferenceExtractor.extract(DomainWikiReferenceExtractor.java:47)
org.xwiki.url.internal.standard.entity.BinEntityResourceReferenceResolver.extractWikiReference(BinEntityResourceReferenceResolver.java:51)
org.xwiki.url.internal.standard.entity.AbstractEntityResourceReferenceResolver.resolve(AbstractEntityResourceReferenceResolver.java:87)
org.xwiki.url.internal.standard.entity.AbstractEntityResourceReferenceResolver.resolve(AbstractEntityResourceReferenceResolver.java:50)
org.xwiki.url.internal.GenericResourceReferenceResolver.resolve(GenericResourceReferenceResolver.java:61)
org.xwiki.url.internal.GenericResourceReferenceResolver.resolve(GenericResourceReferenceResolver.java:47)
org.xwiki.url.internal.standard.StandardExtendedURLResourceReferenceResolver.resolve(StandardExtendedURLResourceReferenceResolver.java:65)
org.xwiki.url.internal.standard.StandardExtendedURLResourceReferenceResolver.resolve(StandardExtendedURLResourceReferenceResolver.java:43)
org.xwiki.url.internal.DefaultResourceReferenceResolver.resolve(DefaultResourceReferenceResolver.java:93)
org.xwiki.url.internal.DefaultResourceReferenceResolver.resolve(DefaultResourceReferenceResolver.java:48)
com.xpn.xwiki.XWiki.initializeResourceFromURL(XWiki.java:1042)
com.xpn.xwiki.XWiki.getXWiki(XWiki.java:907)
com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:378)
com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:283)
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:425)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:228)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449)
javax.servlet.http.HttpServlet.service(HttpServlet.java:655)
javax.servlet.http.HttpServlet.service(HttpServlet.java:764)
com.xpn.xwiki.web.ActionFilter.doFilter(ActionFilter.java:122)
org.xwiki.wysiwyg.filter.ConversionFilter.doFilter(ConversionFilter.java:109)
org.xwiki.container.servlet.filters.internal.SetHTTPHeaderFilter.doFilter(SetHTTPHeaderFilter.java:63)
org.xwiki.container.servlet.filters.internal.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:208)
org.xwiki.container.servlet.filters.internal.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:111)
org.xwiki.resource.servlet.RoutingFilter.doFilter(RoutingFilter.java:132)
Root Cause

org.hibernate.service.spi.ServiceException: Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment]
org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:275)
org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:237)
org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:214)
org.hibernate.id.factory.internal.DefaultIdentifierGeneratorFactory.injectServices(DefaultIdentifierGeneratorFactory.java:152)
org.hibernate.service.internal.AbstractServiceRegistryImpl.injectDependencies(AbstractServiceRegistryImpl.java:286)
org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:243)
org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:214)
org.hibernate.boot.internal.InFlightMetadataCollectorImpl.(InFlightMetadataCollectorImpl.java:176)
org.hibernate.boot.model.process.spi.MetadataBuildingProcess.complete(MetadataBuildingProcess.java:118)
org.hibernate.boot.model.process.spi.MetadataBuildingProcess.build(MetadataBuildingProcess.java:83)
org.hibernate.boot.internal.MetadataBuilderImpl.build(MetadataBuilderImpl.java:473)
org.hibernate.boot.internal.MetadataBuilderImpl.build(MetadataBuilderImpl.java:84)
org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:689)
com.xpn.xwiki.internal.store.hibernate.HibernateStore.build(HibernateStore.java:303)
com.xpn.xwiki.internal.store.hibernate.HibernateStore.initHibernate(HibernateStore.java:236)
com.xpn.xwiki.store.XWikiHibernateBaseStore.initHibernate(XWikiHibernateBaseStore.java:193)
com.xpn.xwiki.store.XWikiHibernateBaseStore.checkHibernate(XWikiHibernateBaseStore.java:482)
com.xpn.xwiki.store.XWikiHibernateStore.loadXWikiDoc(XWikiHibernateStore.java:1008)
com.xpn.xwiki.store.XWikiCacheStore.loadXWikiDoc(XWikiCacheStore.java:394)
com.xpn.xwiki.XWiki.getDocument(XWiki.java:2130)
com.xpn.xwiki.XWiki.getDocument(XWiki.java:2192)
com.xpn.xwiki.XWiki.getXClass(XWiki.java:7042)
com.xpn.xwiki.XWiki.getClass(XWiki.java:7055)
com.xpn.xwiki.doc.DefaultDocumentAccessBridge.isPropertyCustomMapped(DefaultDocumentAccessBridge.java:552)
org.xwiki.query.xwql.internal.QueryContext$PropertyInfo.isCustomMapped(QueryContext.java:153)
org.xwiki.query.xwql.internal.QueryContext$ObjectInfo.isCustomMapped(QueryContext.java:122)
org.xwiki.query.xwql.internal.hql.ObjectPrinter.print(ObjectPrinter.java:37)
org.xwiki.query.xwql.internal.hql.Printer.print(Printer.java:70)
org.xwiki.query.xwql.internal.hql.XWQLtoHQLTranslator.translate(XWQLtoHQLTranslator.java:61)
org.xwiki.query.xwql.internal.XWQLQueryExecutor.execute(XWQLQueryExecutor.java:90)
org.xwiki.query.internal.DefaultQueryExecutorManager.execute(DefaultQueryExecutorManager.java:72)
org.xwiki.query.internal.DefaultQuery.execute(DefaultQuery.java:306)
org.xwiki.wiki.internal.descriptor.document.DefaultWikiDescriptorDocumentHelper.findXWikiServerClassDocumentReference(DefaultWikiDescriptorDocumentHelper.java:121)
org.xwiki.wiki.internal.descriptor.document.DefaultWikiDescriptorDocumentHelper.findXWikiServerClassDocument(DefaultWikiDescriptorDocumentHelper.java:140)
org.xwiki.wiki.internal.descriptor.DefaultWikiDescriptorManager.getByAlias(DefaultWikiDescriptorManager.java:148)
org.xwiki.url.internal.standard.AbstractWikiReferenceExtractor.getWikiDescriptorByAlias(AbstractWikiReferenceExtractor.java:78)
org.xwiki.url.internal.standard.DomainWikiReferenceExtractor.resolveDomainBasedWikiReference(DomainWikiReferenceExtractor.java:61)
org.xwiki.url.internal.standard.DomainWikiReferenceExtractor.extract(DomainWikiReferenceExtractor.java:47)
org.xwiki.url.internal.standard.entity.BinEntityResourceReferenceResolver.extractWikiReference(BinEntityResourceReferenceResolver.java:51)
org.xwiki.url.internal.standard.entity.AbstractEntityResourceReferenceResolver.resolve(AbstractEntityResourceReferenceResolver.java:87)
org.xwiki.url.internal.standard.entity.AbstractEntityResourceReferenceResolver.resolve(AbstractEntityResourceReferenceResolver.java:50)
org.xwiki.url.internal.GenericResourceReferenceResolver.resolve(GenericResourceReferenceResolver.java:61)
org.xwiki.url.internal.GenericResourceReferenceResolver.resolve(GenericResourceReferenceResolver.java:47)
org.xwiki.url.internal.standard.StandardExtendedURLResourceReferenceResolver.resolve(StandardExtendedURLResourceReferenceResolver.java:65)
org.xwiki.url.internal.standard.StandardExtendedURLResourceReferenceResolver.resolve(StandardExtendedURLResourceReferenceResolver.java:43)
org.xwiki.url.internal.DefaultResourceReferenceResolver.resolve(DefaultResourceReferenceResolver.java:93)
org.xwiki.url.internal.DefaultResourceReferenceResolver.resolve(DefaultResourceReferenceResolver.java:48)
com.xpn.xwiki.XWiki.initializeResourceFromURL(XWiki.java:1042)
com.xpn.xwiki.XWiki.getXWiki(XWiki.java:907)
com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:378)
com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:283)
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:425)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:228)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449)
javax.servlet.http.HttpServlet.service(HttpServlet.java:655)
javax.servlet.http.HttpServlet.service(HttpServlet.java:764)
com.xpn.xwiki.web.ActionFilter.doFilter(ActionFilter.java:122)
org.xwiki.wysiwyg.filter.ConversionFilter.doFilter(ConversionFilter.java:109)
org.xwiki.container.servlet.filters.internal.SetHTTPHeaderFilter.doFilter(SetHTTPHeaderFilter.java:63)
org.xwiki.container.servlet.filters.internal.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:208)
org.xwiki.container.servlet.filters.internal.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:111)
org.xwiki.resource.servlet.RoutingFilter.doFilter(RoutingFilter.java:132)
Root Cause

org.hibernate.HibernateException: Could not create a DBCP pool. There is an error in the Hibernate configuration file, please review it.
com.xpn.xwiki.store.DBCPConnectionProvider.configure(DBCPConnectionProvider.java:242)
org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:107)
org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:246)
org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:214)
org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.buildJdbcConnectionAccess(JdbcEnvironmentInitiator.java:145)
org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:66)
org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:35)
org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.initiateService(StandardServiceRegistryImpl.java:101)
org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:263)
org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:237)
org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:214)
org.hibernate.id.factory.internal.DefaultIdentifierGeneratorFactory.injectServices(DefaultIdentifierGeneratorFactory.java:152)
org.hibernate.service.internal.AbstractServiceRegistryImpl.injectDependencies(AbstractServiceRegistryImpl.java:286)
org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:243)
org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:214)
org.hibernate.boot.internal.InFlightMetadataCollectorImpl.(InFlightMetadataCollectorImpl.java:176)
org.hibernate.boot.model.process.spi.MetadataBuildingProcess.complete(MetadataBuildingProcess.java:118)
org.hibernate.boot.model.process.spi.MetadataBuildingProcess.build(MetadataBuildingProcess.java:83)
org.hibernate.boot.internal.MetadataBuilderImpl.build(MetadataBuilderImpl.java:473)
org.hibernate.boot.internal.MetadataBuilderImpl.build(MetadataBuilderImpl.java:84)
org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:689)
com.xpn.xwiki.internal.store.hibernate.HibernateStore.build(HibernateStore.java:303)
com.xpn.xwiki.internal.store.hibernate.HibernateStore.initHibernate(HibernateStore.java:236)
com.xpn.xwiki.store.XWikiHibernateBaseStore.initHibernate(XWikiHibernateBaseStore.java:193)
com.xpn.xwiki.store.XWikiHibernateBaseStore.checkHibernate(XWikiHibernateBaseStore.java:482)
com.xpn.xwiki.store.XWikiHibernateStore.loadXWikiDoc(XWikiHibernateStore.java:1008)
com.xpn.xwiki.store.XWikiCacheStore.loadXWikiDoc(XWikiCacheStore.java:394)
com.xpn.xwiki.XWiki.getDocument(XWiki.java:2130)
com.xpn.xwiki.XWiki.getDocument(XWiki.java:2192)
com.xpn.xwiki.XWiki.getXClass(XWiki.java:7042)
com.xpn.xwiki.XWiki.getClass(XWiki.java:7055)
com.xpn.xwiki.doc.DefaultDocumentAccessBridge.isPropertyCustomMapped(DefaultDocumentAccessBridge.java:552)
org.xwiki.query.xwql.internal.QueryContext$PropertyInfo.isCustomMapped(QueryContext.java:153)
org.xwiki.query.xwql.internal.QueryContext$ObjectInfo.isCustomMapped(QueryContext.java:122)
org.xwiki.query.xwql.internal.hql.ObjectPrinter.print(ObjectPrinter.java:37)
org.xwiki.query.xwql.internal.hql.Printer.print(Printer.java:70)
org.xwiki.query.xwql.internal.hql.XWQLtoHQLTranslator.translate(XWQLtoHQLTranslator.java:61)
org.xwiki.query.xwql.internal.XWQLQueryExecutor.execute(XWQLQueryExecutor.java:90)
org.xwiki.query.internal.DefaultQueryExecutorManager.execute(DefaultQueryExecutorManager.java:72)
org.xwiki.query.internal.DefaultQuery.execute(DefaultQuery.java:306)
org.xwiki.wiki.internal.descriptor.document.DefaultWikiDescriptorDocumentHelper.findXWikiServerClassDocumentReference(DefaultWikiDescriptorDocumentHelper.java:121)
org.xwiki.wiki.internal.descriptor.document.DefaultWikiDescriptorDocumentHelper.findXWikiServerClassDocument(DefaultWikiDescriptorDocumentHelper.java:140)
org.xwiki.wiki.internal.descriptor.DefaultWikiDescriptorManager.getByAlias(DefaultWikiDescriptorManager.java:148)
org.xwiki.url.internal.standard.AbstractWikiReferenceExtractor.getWikiDescriptorByAlias(AbstractWikiReferenceExtractor.java:78)
org.xwiki.url.internal.standard.DomainWikiReferenceExtractor.resolveDomainBasedWikiReference(DomainWikiReferenceExtractor.java:61)
org.xwiki.url.internal.standard.DomainWikiReferenceExtractor.extract(DomainWikiReferenceExtractor.java:47)
org.xwiki.url.internal.standard.entity.BinEntityResourceReferenceResolver.extractWikiReference(BinEntityResourceReferenceResolver.java:51)
org.xwiki.url.internal.standard.entity.AbstractEntityResourceReferenceResolver.resolve(AbstractEntityResourceReferenceResolver.java:87)
org.xwiki.url.internal.standard.entity.AbstractEntityResourceReferenceResolver.resolve(AbstractEntityResourceReferenceResolver.java:50)
org.xwiki.url.internal.GenericResourceReferenceResolver.resolve(GenericResourceReferenceResolver.java:61)
org.xwiki.url.internal.GenericResourceReferenceResolver.resolve(GenericResourceReferenceResolver.java:47)
org.xwiki.url.internal.standard.StandardExtendedURLResourceReferenceResolver.resolve(StandardExtendedURLResourceReferenceResolver.java:65)
org.xwiki.url.internal.standard.StandardExtendedURLResourceReferenceResolver.resolve(StandardExtendedURLResourceReferenceResolver.java:43)
org.xwiki.url.internal.DefaultResourceReferenceResolver.resolve(DefaultResourceReferenceResolver.java:93)
org.xwiki.url.internal.DefaultResourceReferenceResolver.resolve(DefaultResourceReferenceResolver.java:48)
com.xpn.xwiki.XWiki.initializeResourceFromURL(XWiki.java:1042)
com.xpn.xwiki.XWiki.getXWiki(XWiki.java:907)
com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:378)
com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:283)
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:425)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:228)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449)
javax.servlet.http.HttpServlet.service(HttpServlet.java:655)
javax.servlet.http.HttpServlet.service(HttpServlet.java:764)
com.xpn.xwiki.web.ActionFilter.doFilter(ActionFilter.java:122)
org.xwiki.wysiwyg.filter.ConversionFilter.doFilter(ConversionFilter.java:109)
org.xwiki.container.servlet.filters.internal.SetHTTPHeaderFilter.doFilter(SetHTTPHeaderFilter.java:63)
org.xwiki.container.servlet.filters.internal.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:208)
org.xwiki.container.servlet.filters.internal.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:111)
org.xwiki.resource.servlet.RoutingFilter.doFilter(RoutingFilter.java:132)
Root Cause

<<<<PART 2 >>> CONTINUATION

java.sql.SQLException: Cannot create PoolableConnectionFactory (Connection to localhost:5432 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.)
org.apache.commons.dbcp2.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:656)
org.apache.commons.dbcp2.BasicDataSource.createDataSource(BasicDataSource.java:534)
org.apache.commons.dbcp2.BasicDataSource.getConnection(BasicDataSource.java:734)
com.xpn.xwiki.store.DBCPConnectionProvider.configure(DBCPConnectionProvider.java:225)
org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:107)
org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:246)
org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:214)
org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.buildJdbcConnectionAccess(JdbcEnvironmentInitiator.java:145)
org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:66)
org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:35)
org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.initiateService(StandardServiceRegistryImpl.java:101)
org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:263)
org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:237)
org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:214)
org.hibernate.id.factory.internal.DefaultIdentifierGeneratorFactory.injectServices(DefaultIdentifierGeneratorFactory.java:152)
org.hibernate.service.internal.AbstractServiceRegistryImpl.injectDependencies(AbstractServiceRegistryImpl.java:286)
org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:243)
org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:214)
org.hibernate.boot.internal.InFlightMetadataCollectorImpl.(InFlightMetadataCollectorImpl.java:176)
org.hibernate.boot.model.process.spi.MetadataBuildingProcess.complete(MetadataBuildingProcess.java:118)
org.hibernate.boot.model.process.spi.MetadataBuildingProcess.build(MetadataBuildingProcess.java:83)
org.hibernate.boot.internal.MetadataBuilderImpl.build(MetadataBuilderImpl.java:473)
org.hibernate.boot.internal.MetadataBuilderImpl.build(MetadataBuilderImpl.java:84)
org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:689)
com.xpn.xwiki.internal.store.hibernate.HibernateStore.build(HibernateStore.java:303)
com.xpn.xwiki.internal.store.hibernate.HibernateStore.initHibernate(HibernateStore.java:236)
com.xpn.xwiki.store.XWikiHibernateBaseStore.initHibernate(XWikiHibernateBaseStore.java:193)
com.xpn.xwiki.store.XWikiHibernateBaseStore.checkHibernate(XWikiHibernateBaseStore.java:482)
com.xpn.xwiki.store.XWikiHibernateStore.loadXWikiDoc(XWikiHibernateStore.java:1008)
com.xpn.xwiki.store.XWikiCacheStore.loadXWikiDoc(XWikiCacheStore.java:394)
com.xpn.xwiki.XWiki.getDocument(XWiki.java:2130)
com.xpn.xwiki.XWiki.getDocument(XWiki.java:2192)
com.xpn.xwiki.XWiki.getXClass(XWiki.java:7042)
com.xpn.xwiki.XWiki.getClass(XWiki.java:7055)
com.xpn.xwiki.doc.DefaultDocumentAccessBridge.isPropertyCustomMapped(DefaultDocumentAccessBridge.java:552)
org.xwiki.query.xwql.internal.QueryContext$PropertyInfo.isCustomMapped(QueryContext.java:153)
org.xwiki.query.xwql.internal.QueryContext$ObjectInfo.isCustomMapped(QueryContext.java:122)
org.xwiki.query.xwql.internal.hql.ObjectPrinter.print(ObjectPrinter.java:37)
org.xwiki.query.xwql.internal.hql.Printer.print(Printer.java:70)
org.xwiki.query.xwql.internal.hql.XWQLtoHQLTranslator.translate(XWQLtoHQLTranslator.java:61)
org.xwiki.query.xwql.internal.XWQLQueryExecutor.execute(XWQLQueryExecutor.java:90)
org.xwiki.query.internal.DefaultQueryExecutorManager.execute(DefaultQueryExecutorManager.java:72)
org.xwiki.query.internal.DefaultQuery.execute(DefaultQuery.java:306)
org.xwiki.wiki.internal.descriptor.document.DefaultWikiDescriptorDocumentHelper.findXWikiServerClassDocumentReference(DefaultWikiDescriptorDocumentHelper.java:121)
org.xwiki.wiki.internal.descriptor.document.DefaultWikiDescriptorDocumentHelper.findXWikiServerClassDocument(DefaultWikiDescriptorDocumentHelper.java:140)
org.xwiki.wiki.internal.descriptor.DefaultWikiDescriptorManager.getByAlias(DefaultWikiDescriptorManager.java:148)
org.xwiki.url.internal.standard.AbstractWikiReferenceExtractor.getWikiDescriptorByAlias(AbstractWikiReferenceExtractor.java:78)
org.xwiki.url.internal.standard.DomainWikiReferenceExtractor.resolveDomainBasedWikiReference(DomainWikiReferenceExtractor.java:61)
org.xwiki.url.internal.standard.DomainWikiReferenceExtractor.extract(DomainWikiReferenceExtractor.java:47)
org.xwiki.url.internal.standard.entity.BinEntityResourceReferenceResolver.extractWikiReference(BinEntityResourceReferenceResolver.java:51)
org.xwiki.url.internal.standard.entity.AbstractEntityResourceReferenceResolver.resolve(AbstractEntityResourceReferenceResolver.java:87)
org.xwiki.url.internal.standard.entity.AbstractEntityResourceReferenceResolver.resolve(AbstractEntityResourceReferenceResolver.java:50)
org.xwiki.url.internal.GenericResourceReferenceResolver.resolve(GenericResourceReferenceResolver.java:61)
org.xwiki.url.internal.GenericResourceReferenceResolver.resolve(GenericResourceReferenceResolver.java:47)
org.xwiki.url.internal.standard.StandardExtendedURLResourceReferenceResolver.resolve(StandardExtendedURLResourceReferenceResolver.java:65)
org.xwiki.url.internal.standard.StandardExtendedURLResourceReferenceResolver.resolve(StandardExtendedURLResourceReferenceResolver.java:43)
org.xwiki.url.internal.DefaultResourceReferenceResolver.resolve(DefaultResourceReferenceResolver.java:93)
org.xwiki.url.internal.DefaultResourceReferenceResolver.resolve(DefaultResourceReferenceResolver.java:48)
com.xpn.xwiki.XWiki.initializeResourceFromURL(XWiki.java:1042)
com.xpn.xwiki.XWiki.getXWiki(XWiki.java:907)
com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:378)
com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:283)
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:425)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:228)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449)
javax.servlet.http.HttpServlet.service(HttpServlet.java:655)
javax.servlet.http.HttpServlet.service(HttpServlet.java:764)
com.xpn.xwiki.web.ActionFilter.doFilter(ActionFilter.java:122)
org.xwiki.wysiwyg.filter.ConversionFilter.doFilter(ConversionFilter.java:109)
org.xwiki.container.servlet.filters.internal.SetHTTPHeaderFilter.doFilter(SetHTTPHeaderFilter.java:63)
org.xwiki.container.servlet.filters.internal.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:208)
org.xwiki.container.servlet.filters.internal.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:111)
org.xwiki.resource.servlet.RoutingFilter.doFilter(RoutingFilter.java:132)
Root Cause

org.postgresql.util.PSQLException: Connection to localhost:5432 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.
org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:303)
org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:51)
org.postgresql.jdbc.PgConnection.(PgConnection.java:225)
org.postgresql.Driver.makeConnection(Driver.java:465)
org.postgresql.Driver.connect(Driver.java:264)
org.apache.commons.dbcp2.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:52)
org.apache.commons.dbcp2.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:357)
org.apache.commons.dbcp2.BasicDataSource.validateConnectionFactory(BasicDataSource.java:103)
org.apache.commons.dbcp2.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:652)
org.apache.commons.dbcp2.BasicDataSource.createDataSource(BasicDataSource.java:534)
org.apache.commons.dbcp2.BasicDataSource.getConnection(BasicDataSource.java:734)
com.xpn.xwiki.store.DBCPConnectionProvider.configure(DBCPConnectionProvider.java:225)
org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:107)
org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:246)
org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:214)
org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.buildJdbcConnectionAccess(JdbcEnvironmentInitiator.java:145)
org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:66)
org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:35)
org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.initiateService(StandardServiceRegistryImpl.java:101)
org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:263)
org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:237)
org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:214)
org.hibernate.id.factory.internal.DefaultIdentifierGeneratorFactory.injectServices(DefaultIdentifierGeneratorFactory.java:152)
org.hibernate.service.internal.AbstractServiceRegistryImpl.injectDependencies(AbstractServiceRegistryImpl.java:286)
org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:243)
org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:214)
org.hibernate.boot.internal.InFlightMetadataCollectorImpl.(InFlightMetadataCollectorImpl.java:176)
org.hibernate.boot.model.process.spi.MetadataBuildingProcess.complete(MetadataBuildingProcess.java:118)
org.hibernate.boot.model.process.spi.MetadataBuildingProcess.build(MetadataBuildingProcess.java:83)
org.hibernate.boot.internal.MetadataBuilderImpl.build(MetadataBuilderImpl.java:473)
org.hibernate.boot.internal.MetadataBuilderImpl.build(MetadataBuilderImpl.java:84)
org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:689)
com.xpn.xwiki.internal.store.hibernate.HibernateStore.build(HibernateStore.java:303)
com.xpn.xwiki.internal.store.hibernate.HibernateStore.initHibernate(HibernateStore.java:236)
com.xpn.xwiki.store.XWikiHibernateBaseStore.initHibernate(XWikiHibernateBaseStore.java:193)
com.xpn.xwiki.store.XWikiHibernateBaseStore.checkHibernate(XWikiHibernateBaseStore.java:482)
com.xpn.xwiki.store.XWikiHibernateStore.loadXWikiDoc(XWikiHibernateStore.java:1008)
com.xpn.xwiki.store.XWikiCacheStore.loadXWikiDoc(XWikiCacheStore.java:394)
com.xpn.xwiki.XWiki.getDocument(XWiki.java:2130)
com.xpn.xwiki.XWiki.getDocument(XWiki.java:2192)
com.xpn.xwiki.XWiki.getXClass(XWiki.java:7042)
com.xpn.xwiki.XWiki.getClass(XWiki.java:7055)
com.xpn.xwiki.doc.DefaultDocumentAccessBridge.isPropertyCustomMapped(DefaultDocumentAccessBridge.java:552)
org.xwiki.query.xwql.internal.QueryContext$PropertyInfo.isCustomMapped(QueryContext.java:153)
org.xwiki.query.xwql.internal.QueryContext$ObjectInfo.isCustomMapped(QueryContext.java:122)
org.xwiki.query.xwql.internal.hql.ObjectPrinter.print(ObjectPrinter.java:37)
org.xwiki.query.xwql.internal.hql.Printer.print(Printer.java:70)
org.xwiki.query.xwql.internal.hql.XWQLtoHQLTranslator.translate(XWQLtoHQLTranslator.java:61)
org.xwiki.query.xwql.internal.XWQLQueryExecutor.execute(XWQLQueryExecutor.java:90)
org.xwiki.query.internal.DefaultQueryExecutorManager.execute(DefaultQueryExecutorManager.java:72)
org.xwiki.query.internal.DefaultQuery.execute(DefaultQuery.java:306)
org.xwiki.wiki.internal.descriptor.document.DefaultWikiDescriptorDocumentHelper.findXWikiServerClassDocumentReference(DefaultWikiDescriptorDocumentHelper.java:121)
org.xwiki.wiki.internal.descriptor.document.DefaultWikiDescriptorDocumentHelper.findXWikiServerClassDocument(DefaultWikiDescriptorDocumentHelper.java:140)
org.xwiki.wiki.internal.descriptor.DefaultWikiDescriptorManager.getByAlias(DefaultWikiDescriptorManager.java:148)
org.xwiki.url.internal.standard.AbstractWikiReferenceExtractor.getWikiDescriptorByAlias(AbstractWikiReferenceExtractor.java:78)
org.xwiki.url.internal.standard.DomainWikiReferenceExtractor.resolveDomainBasedWikiReference(DomainWikiReferenceExtractor.java:61)
org.xwiki.url.internal.standard.DomainWikiReferenceExtractor.extract(DomainWikiReferenceExtractor.java:47)
org.xwiki.url.internal.standard.entity.BinEntityResourceReferenceResolver.extractWikiReference(BinEntityResourceReferenceResolver.java:51)
org.xwiki.url.internal.standard.entity.AbstractEntityResourceReferenceResolver.resolve(AbstractEntityResourceReferenceResolver.java:87)
org.xwiki.url.internal.standard.entity.AbstractEntityResourceReferenceResolver.resolve(AbstractEntityResourceReferenceResolver.java:50)
org.xwiki.url.internal.GenericResourceReferenceResolver.resolve(GenericResourceReferenceResolver.java:61)
org.xwiki.url.internal.GenericResourceReferenceResolver.resolve(GenericResourceReferenceResolver.java:47)
org.xwiki.url.internal.standard.StandardExtendedURLResourceReferenceResolver.resolve(StandardExtendedURLResourceReferenceResolver.java:65)
org.xwiki.url.internal.standard.StandardExtendedURLResourceReferenceResolver.resolve(StandardExtendedURLResourceReferenceResolver.java:43)
org.xwiki.url.internal.DefaultResourceReferenceResolver.resolve(DefaultResourceReferenceResolver.java:93)
org.xwiki.url.internal.DefaultResourceReferenceResolver.resolve(DefaultResourceReferenceResolver.java:48)
com.xpn.xwiki.XWiki.initializeResourceFromURL(XWiki.java:1042)
com.xpn.xwiki.XWiki.getXWiki(XWiki.java:907)
com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:378)
com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:283)
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:425)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:228)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449)
javax.servlet.http.HttpServlet.service(HttpServlet.java:655)
javax.servlet.http.HttpServlet.service(HttpServlet.java:764)
com.xpn.xwiki.web.ActionFilter.doFilter(ActionFilter.java:122)
org.xwiki.wysiwyg.filter.ConversionFilter.doFilter(ConversionFilter.java:109)
org.xwiki.container.servlet.filters.internal.SetHTTPHeaderFilter.doFilter(SetHTTPHeaderFilter.java:63)
org.xwiki.container.servlet.filters.internal.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:208)
org.xwiki.container.servlet.filters.internal.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:111)
org.xwiki.resource.servlet.RoutingFilter.doFilter(RoutingFilter.java:132)
Root Cause

java.net.ConnectException: Connection refused (Connection refused)
java.base/java.net.PlainSocketImpl.socketConnect(Native Method)
java.base/java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:399)
java.base/java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:242)
java.base/java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:224)
java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
java.base/java.net.Socket.connect(Socket.java:609)
org.postgresql.core.PGStream.createSocket(PGStream.java:231)
org.postgresql.core.PGStream.(PGStream.java:95)
org.postgresql.core.v3.ConnectionFactoryImpl.tryConnect(ConnectionFactoryImpl.java:98)
org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:213)
org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:51)
org.postgresql.jdbc.PgConnection.(PgConnection.java:225)
org.postgresql.Driver.makeConnection(Driver.java:465)
org.postgresql.Driver.connect(Driver.java:264)
org.apache.commons.dbcp2.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:52)
org.apache.commons.dbcp2.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:357)
org.apache.commons.dbcp2.BasicDataSource.validateConnectionFactory(BasicDataSource.java:103)
org.apache.commons.dbcp2.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:652)
org.apache.commons.dbcp2.BasicDataSource.createDataSource(BasicDataSource.java:534)
org.apache.commons.dbcp2.BasicDataSource.getConnection(BasicDataSource.java:734)
com.xpn.xwiki.store.DBCPConnectionProvider.configure(DBCPConnectionProvider.java:225)
org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:107)
org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:246)
org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:214)
org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.buildJdbcConnectionAccess(JdbcEnvironmentInitiator.java:145)
org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:66)
org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:35)
org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.initiateService(StandardServiceRegistryImpl.java:101)
org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:263)
org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:237)
org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:214)
org.hibernate.id.factory.internal.DefaultIdentifierGeneratorFactory.injectServices(DefaultIdentifierGeneratorFactory.java:152)
org.hibernate.service.internal.AbstractServiceRegistryImpl.injectDependencies(AbstractServiceRegistryImpl.java:286)
org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:243)
org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:214)
org.hibernate.boot.internal.InFlightMetadataCollectorImpl.(InFlightMetadataCollectorImpl.java:176)
org.hibernate.boot.model.process.spi.MetadataBuildingProcess.complete(MetadataBuildingProcess.java:118)
org.hibernate.boot.model.process.spi.MetadataBuildingProcess.build(MetadataBuildingProcess.java:83)
org.hibernate.boot.internal.MetadataBuilderImpl.build(MetadataBuilderImpl.java:473)
org.hibernate.boot.internal.MetadataBuilderImpl.build(MetadataBuilderImpl.java:84)
org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:689)
com.xpn.xwiki.internal.store.hibernate.HibernateStore.build(HibernateStore.java:303)
com.xpn.xwiki.internal.store.hibernate.HibernateStore.initHibernate(HibernateStore.java:236)
com.xpn.xwiki.store.XWikiHibernateBaseStore.initHibernate(XWikiHibernateBaseStore.java:193)
com.xpn.xwiki.store.XWikiHibernateBaseStore.checkHibernate(XWikiHibernateBaseStore.java:482)
com.xpn.xwiki.store.XWikiHibernateStore.loadXWikiDoc(XWikiHibernateStore.java:1008)
com.xpn.xwiki.store.XWikiCacheStore.loadXWikiDoc(XWikiCacheStore.java:394)
com.xpn.xwiki.XWiki.getDocument(XWiki.java:2130)
com.xpn.xwiki.XWiki.getDocument(XWiki.java:2192)
com.xpn.xwiki.XWiki.getXClass(XWiki.java:7042)
com.xpn.xwiki.XWiki.getClass(XWiki.java:7055)
com.xpn.xwiki.doc.DefaultDocumentAccessBridge.isPropertyCustomMapped(DefaultDocumentAccessBridge.java:552)
org.xwiki.query.xwql.internal.QueryContext$PropertyInfo.isCustomMapped(QueryContext.java:153)
org.xwiki.query.xwql.internal.QueryContext$ObjectInfo.isCustomMapped(QueryContext.java:122)
org.xwiki.query.xwql.internal.hql.ObjectPrinter.print(ObjectPrinter.java:37)
org.xwiki.query.xwql.internal.hql.Printer.print(Printer.java:70)
org.xwiki.query.xwql.internal.hql.XWQLtoHQLTranslator.translate(XWQLtoHQLTranslator.java:61)
org.xwiki.query.xwql.internal.XWQLQueryExecutor.execute(XWQLQueryExecutor.java:90)
org.xwiki.query.internal.DefaultQueryExecutorManager.execute(DefaultQueryExecutorManager.java:72)
org.xwiki.query.internal.DefaultQuery.execute(DefaultQuery.java:306)
org.xwiki.wiki.internal.descriptor.document.DefaultWikiDescriptorDocumentHelper.findXWikiServerClassDocumentReference(DefaultWikiDescriptorDocumentHelper.java:121)
org.xwiki.wiki.internal.descriptor.document.DefaultWikiDescriptorDocumentHelper.findXWikiServerClassDocument(DefaultWikiDescriptorDocumentHelper.java:140)
org.xwiki.wiki.internal.descriptor.DefaultWikiDescriptorManager.getByAlias(DefaultWikiDescriptorManager.java:148)
org.xwiki.url.internal.standard.AbstractWikiReferenceExtractor.getWikiDescriptorByAlias(AbstractWikiReferenceExtractor.java:78)
org.xwiki.url.internal.standard.DomainWikiReferenceExtractor.resolveDomainBasedWikiReference(DomainWikiReferenceExtractor.java:61)
org.xwiki.url.internal.standard.DomainWikiReferenceExtractor.extract(DomainWikiReferenceExtractor.java:47)
org.xwiki.url.internal.standard.entity.BinEntityResourceReferenceResolver.extractWikiReference(BinEntityResourceReferenceResolver.java:51)
org.xwiki.url.internal.standard.entity.AbstractEntityResourceReferenceResolver.resolve(AbstractEntityResourceReferenceResolver.java:87)
org.xwiki.url.internal.standard.entity.AbstractEntityResourceReferenceResolver.resolve(AbstractEntityResourceReferenceResolver.java:50)
org.xwiki.url.internal.GenericResourceReferenceResolver.resolve(GenericResourceReferenceResolver.java:61)
org.xwiki.url.internal.GenericResourceReferenceResolver.resolve(GenericResourceReferenceResolver.java:47)
org.xwiki.url.internal.standard.StandardExtendedURLResourceReferenceResolver.resolve(StandardExtendedURLResourceReferenceResolver.java:65)
org.xwiki.url.internal.standard.StandardExtendedURLResourceReferenceResolver.resolve(StandardExtendedURLResourceReferenceResolver.java:43)
org.xwiki.url.internal.DefaultResourceReferenceResolver.resolve(DefaultResourceReferenceResolver.java:93)
org.xwiki.url.internal.DefaultResourceReferenceResolver.resolve(DefaultResourceReferenceResolver.java:48)
com.xpn.xwiki.XWiki.initializeResourceFromURL(XWiki.java:1042)
com.xpn.xwiki.XWiki.getXWiki(XWiki.java:907)
com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:378)
com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:283)
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:425)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:228)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449)
javax.servlet.http.HttpServlet.service(HttpServlet.java:655)
javax.servlet.http.HttpServlet.service(HttpServlet.java:764)
com.xpn.xwiki.web.ActionFilter.doFilter(ActionFilter.java:122)
org.xwiki.wysiwyg.filter.ConversionFilter.doFilter(ConversionFilter.java:109)
org.xwiki.container.servlet.filters.internal.SetHTTPHeaderFilter.doFilter(SetHTTPHeaderFilter.java:63)
org.xwiki.container.servlet.filters.internal.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:208)
org.xwiki.container.servlet.filters.internal.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:111)
org.xwiki.resource.servlet.RoutingFilter.doFilter(RoutingFilter.java:132)
Note The full stack trace of the root cause is available in the server logs.

Please use the proper syntax for code, that makes it so much easier to read!

Note that all this is not related to XWiki but to docker. I don’t know the answer, and it depends. If your DB is running side a docker container, make it use the same docker network. If not, then make sure to use the proper docker parameters so that the xwiki docker image can see your host or whatever machine is hosting the DB. See Networking overview | Docker Docs

1 Like

This is the important part. It just means that the postgreSQL JDBC driver cannot connect to the database on the host where it is. So you need to configure your docker network to allow for this.

1 Like

I got this, my friend . Thanks for your help. I needed to substitute localhost with host.docker.internal. IT worked