XWiki installation in a restricted environment

Hi all

  • edit: found the section with offline installation instructions - will give it a try now, although I thought that copying the repo from the other machine would be enough…
  • edit 2: didn’t work either, see below.

I’m trying to set up XWiki 10.7 behind a firewall on a secured machine. This means: no access to 3rd party tools, no access to the internet. The backend DB is oracle 12.2 which works fine on other boxes. The connection string works fine, too, so that can’t be the reason for the issues I have:

javax.servlet.ServletException: com.xpn.xwiki.XWikiException: Error number 11007 in 0: Failed to extract Entity Resource Reference from URL [http://swi-ncap-db1.internal.vodafone.com:1158/XC_144P1_WIKI/bin/view/Main/]

I already knew that one, it’s the same that happens if you forget to put the ojdbc.jar into an accessible directory :wink: , which is not the case here. The logs first start with lines similar to this:

2018-09-17 15:20:46,746 [Core extension repository updater] ERROR aultExtensionRepositoryManager - Unexpected error when trying to find extension [net.sf.json-lib:json-lib:jdk15/2.4] in repository [maven-xwiki:maven:http://nexus.xwiki.org/nexus/content/groups/public]
....
Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: Could not transfer artifact net.sf.json-lib:json-lib:pom:2.4 from/to maven-xwiki (http://nexus.xwiki.org/nexus/content/groups/public): nexus.xwiki.org: Name or service not known

Name or service not known. As I said, behind the firewall, no internet.

A bit further down the log, it says:

17-Sep-2018 14:22:29.899 INFORMATION [ContainerBackgroundProcessor[StandardEngine[Catalina]]] org.apache.catalina.core.StandardContext.reload Reloading Context with name [/XC_144P1_WIKI] is completed
2018-09-17 15:23:09,989 [http://xyz-db1.internal.xyz.com:1158/XC_144P1_WIKI/bin/view/Main/] WARN  m.i.DefaultJMXBeanRegistration - Failed to register resource with name [type=Velocity,domain=Engines,name=default]. Reason = [InstanceAlreadyExistsException: org.xwiki:type=Velocity,domain=Engines,name=default]
2018-09-17 15:23:12,778 [XWiki initialization] WARN  o.h.u.JDBCExceptionReporter    - SQL Error: 1435,     SQLState: 72000
2018-09-17 15:23:12,779 [XWiki initialization] ERROR o.h.u.JDBCExceptionReporter    - ORA-01435: Benutzer ist nicht vorhanden.

The ORA-01435 keeps showing up in the following log.

I don’t even know whether the two issues are related, so I tried to fix the ORA thing first, to no avail. The permissions are granted, the user can log in, even from trusted remote sources; the JDBC URL is fine, all tested. So I went on to the transfer problem and copied over the runtime directory of another 10.7 installation (our installations all look the same) and started up again. It’s still trying to download stuff from the internet.

After my first edit, I extracted the XAR with the 10.7 flavour in the permanent directory, as described in the docs. Still, it’s complaining about net.sf.json-lib not being found (it’s really not there). Missing are:

  • net.sf.json-lib:json-lib:pom:2.4
  • com.google.inject:guice:pom:4.1.0
  • com.google.code.findbugs:annotations:pom:api
  • commons-daemon:commons-daemon:pom:1.1.0

Any hint and/or pointer highly appreciated, thanks a ton in advance!

Cheers

André

Then you should disable the extension repositories to make sure nothing try to use them. See https://www.xwiki.org/xwiki/bin/view/Documentation/AdminGuide/Installation/InstallationWAR/#HExtensionRepositories.

Hi Thomas

That solved the org.eclipse.aether.resolution.ArtifactResolutionException issues, thanks. I was actually looking into that part when you replied :slight_smile:

I found this in the logs, at the bottom (regarding the DB problem):

Caused by: com.xpn.xwiki.XWikiException: Error number 3301 in 3: Exception while switching to database xwiki

What causes that? There’s no such database as xwiki, we have some naming convention here…

Cheers

André

Those are part of the WAR but indeed when I checked 10.7 WAR and there is a problem: these jars don’t have an exactly matching xed file and they also don’t seems to embbed any Maven pom so impossible to know what they are exactly. The workaround is to renamed the xed files you can find next to them in WEB-INF/lib/, for example rename json-lib-2.4.xed to json-lib-2.4-jdk15.xed because the jar name is json-lib-2.4-jdk15.jar.

Just found something searching for that “exception while switching” thing …

When you don’t use xwiki as database name (the default) you have to indicate it in xwiki.cfg (property xwiki.db).

1 Like

Missed that one, thanks a lot. It’s still not loading, but the errors look different now - which is at least something :wink: