Some problem to install XWiki to Glassfish

Hello! today i decided to install new XWiki, after my 8.1 version to PC with clear Windows 8.1 x64. I use OracleXE 11g + GlassFish 5.0.1 + Java 8 update 121 x64. After tune the programs and deploying the wiki like 2 years before i’ve got the problems with installation:

  1. Flavor, too much time i spent to sturt the installation the wiki, idk how, but i did this. System showed the message: “Connection error. Failed to get the list of flavors”
  2. After installation i’ve got the new problems:
    2.1 Annotation does not work. Message is: “Failed: Internal server error”. Log writes:
[2018-06-17T22:25:59.758+0400] [glassfish 5.0] [INFO] [] [] [tid: _ThreadID=43 _ThreadName=Thread-9] [timeMillis: 1529259959758] [levelValue: 800] [[
  2018-06-17 22:25:59,758 [admin-listener(4)] WARN  .x.e.m.i.MavenExtensionScanner - Collision between core extension [javax.annotation:javax.annotation-api/1.3 (jar:file:/C:/glassfish51/glassfish/modules/endorsed/javax.annotation-api.jar!/META-INF/maven/javax.annotation/javax.annotation-api/pom.xml)] and [javax.annotation:javax.annotation-api/1.3.2 (file:/C:/glassfish51/glassfish/domains/domain1/applications/xwiki/WEB-INF/lib/javax.annotation-api-1.3.2.xed)] 
]]
[2018-06-17T23:09:01.920+0400] [glassfish 5.0] [INFO] [] [javax.enterprise.web] [tid: _ThreadID=25 _ThreadName=http://_windows_8_virt:8008/xwiki/rest/wikis/xwiki/spaces/%5BMain%5D/pages/WebHome/annotations?media=json] [timeMillis: 1529262541920] [levelValue: 800] [[
  WebModule[/xwiki] ServletContext.log():RestletServlet: [Restlet] ServerServlet: component class is null]]

2.2 From time to times i've got the messages with new page creation, like this:
"Filed to save the page. Reason: Internal server Error"

2.3 Syntaxes. then i mark off the positions of The list of markup syntaxes, i can use only XWiki 2.0 and XWiki 2.1... Then i make the import text block from Word with CHKEditor it does not put the macros {{html}}, but it works then put this

2.4 i've got a lot of errora st the log file like this:
[2018-06-17T22:25:56.758+0400] [glassfish 5.0] [INFO] [] [] [tid: _ThreadID=43 _ThreadName=Thread-9] [timeMillis: 1529259956758] [levelValue: 800] [[
  2018-06-17 22:25:56,758 [admin-listener(4)] ERROR .c.DefaultCoreExtensionScanner - Failed to convert to extension URL 
java.io.IOException: Resource does not exist: bundle://16.0:1/
	at org.apache.felix.framework.URLHandlersBundleURLConnection.<init>(URLHandlersBundleURLConnection.java:60)
	at org.apache.felix.framework.URLHandlersBundleStreamHandler.openConnection(URLHandlersBundleStreamHandler.java:55)
	at java.net.URL.openConnection(Unknown Source)

[2018-06-17T22:26:18.476+0400] [glassfish 5.0] [INFO] [] [] [tid: _ThreadID=106 _ThreadName=Thread-9] [timeMillis: 1529259978476] [levelValue: 800] [[
  2018-06-17 22:26:18,476 [Core extension repository updater] ERROR aultExtensionRepositoryManager - Unexpected error when trying to find extension [org.glassfish.mq:fscontext/1.0-SNAPSHOT] in repository [store.xwiki.com:xwiki:https://store.xwiki.com/xwiki/rest] 
org.xwiki.extension.ResolveException: Failed to create extension object for extension [org.glassfish.mq:fscontext/1.0-SNAPSHOT]
	at org.xwiki.extension.repository.xwiki.internal.XWikiExtensionRepository.resolve(XWikiExtensionRepository.java:344)
	at org.xwiki.extension.repository.internal.DefaultExtensionRepositoryManager.resolve(DefaultExtensionRepositoryManager.java:286)

[2018-06-17T23:08:43.878+0400] [glassfish 5.0] [INFO] [] [] [tid: _ThreadID=136 _ThreadName=Thread-9] [timeMillis: 1529262523878] [levelValue: 800] [[
  2018-06-17 23:08:43,878 [XWiki initialization] ERROR c.x.x.p.XWikiPluginManager     - Cannot initialize plugin [com.xpn.xwiki.plugin.applicationmanager.ApplicationManagerPlugin]. This plugin will not be available. 
java.lang.ClassNotFoundException: com.xpn.xwiki.plugin.applicationmanager.ApplicationManagerPlugin
	at org.xwiki.classloader.URIClassLoader$1.run(URIClassLoader.java:193)
	at org.xwiki.classloader.URIClassLoader$1.run(URIClassLoader.java:180)
	at java.security.AccessController.doPrivileged(Native Method)

2.5 after installation 10.4 flavor my xwiki got the number at the each page 8.0. idk why.

The same version of xwiki at jetty works perfectly. The last installation of 8.1 2 years before with the same way works perfectly. what should i do, or read, or tune to make this work better? Thank u

Hi, the issue Glassfish’s configuration which is trying to use Felix (OSGi) to do stuff it shouldn’t. So it needs to be configured to not do that. However I’m not a Glassfish user myself. Ideally someone knowing Glassfish should update http://www.xwiki.org/xwiki/bin/view/Documentation/AdminGuide/Installation/InstallationWAR/InstallationGlassFish/ with the proper instructions.

This is because you’ve kept your old xwiki.cfg file instead of doing a merge. The ApplicationManagerPlugin doesn’t exist anymore. Just remove it from your plugins config.

I installed the latest stable version of XWiki (*.war) at clear system installed JAVA sdk + OracleXE 11g. I’ve got the same problems with:
10.4, 10.5-RC-1, 9.11.5 (10.5 and 10.6 from snapsorts Repository - Sonatype Nexus Repository)
today i am going to install 9.2 or something like this, low then 9.5

Hi Denis,

3 things:

  1. Your problem is GlassFish. It’s not configured properly for XWiki deployment and I don’t know how to do that (I’m not a GlassFish expert, see the warning I’ve added today at http://www.xwiki.org/xwiki/bin/view/Documentation/AdminGuide/Installation/InstallationWAR/InstallationGlassFish/). So you can try to install any version of XWiki you wish, if you’re still trying with GlassFish it won’t help at all!

  2. The problem about the invalid plugin is not a big deal; it’s not a blocker but you should still edit your xwiki.cfg to remove it.

  3. “today i am going to install 9.2 or something like this, low then 9.5” I have no idea why you would do that! That doesn’t seem a good idea. In XWiki there’s no need to stage the installs by using older versions, you can directly upgrade to a new version. You should really use 9.11.6 since it’s the LTS and supported.

  1. XWiki 8.x and 9.0 work perfectly at the glassfish4 (5.0) + Oracle 11g. And i liked it. But something gone wrone. I am going to check the versions before flavors. Maybe this is mistake

  2. yes, i’ll do this today

  3. ok, i’ll do this

Thank u

Interesting. So this means we have some new third party jars somewhere (I doubt it’s coming from xwiki) that require GF to be configured in some specific way now.

1st. Windows 8.1 x64, OracleXE 11g, Jave 8 Update 121 x64 ( + Java SE Development Kit 8 Update 121 x64)
+Portable Glassfish server 4.1 (5.0 build 1) + XWiki 9.2-RC-1
U can download the log file. Everything works perfectly, but u can see a few errors at log file

GF_log_xwiki_9.2_rc-1.txt (208.2 KB)

after reinstalling the programs:

Windows 8.1 x64, OracleXE 11.2g, Jave 8 Update 121 x64 ( + Java SE Development Kit 8 Update 121 x64) +Portable Glassfish server 4.1 (5.0 build 1) + XWiki 9.11.6
U can download the log file. Everything works perfectly, but u can see a few errors at log file. XWiki 10.6 works perfectly too!

GF_log_xwiki_9.11.6.txt (386.6 KB)

+Portable Glassfish server 5.0.1 + XWiki 9.11.6
The Falvor does not want to install. Connection error. If u deploy and tune the 9.11.6 at glassfish 4.0, stop GF4, run Glassfish5, deploy 9.11.6, and start with the same settings, like databaseName, user, password, it works… better then install modern Xwiki to GF5

it seems like XWiki do not work correctly at the last versions of Glasfish. XWiki works correctly with Glassfish v3+ and 4+. the lot of problems with GF5+

Thank u. I did this! and have find the desigion - use GF4