Unable to run NoraUI mvn verify goal - java-17

We have taken back our test automations after a year leaving it unused.
Today, I Try to run them as usual (or at least as I remeber it)
mvn clean verify "-Dcucumber.options=--tags '#xxscenario'" -Dmaven.test.failure.ignore=true -P scenarioInitiator,dev,xxProject,postIC,preIC
It might be linked to the fact that today I have jdk 17 installed, but i cannot run them :
cucumber.runtime.CucumberException: Failed to instantiate public cucumber.runtime.java.JavaBackend(cucumber.runtime.io.ResourceLoader,io.cucumber.stepexpression.TypeRegistry) with [cucumber.runtime.io.MultiLoader#515ebef3, io.cucumb
er.stepexpression.TypeRegistry#545607f2]
Caused by: java.lang.reflect.InvocationTargetException
Caused by: java.util.ServiceConfigurationError: io.cucumber.core.backend.ObjectFactory: Provider cucumber.runtime.java.guice.impl.GuiceFactory could not be instantiated
Caused by: com.google.common.util.concurrent.ExecutionError: java.lang.ExceptionInInitializerError
Caused by: java.lang.ExceptionInInitializerError
Caused by: com.google.inject.internal.cglib.core.$CodeGenerationException: java.lang.reflect.InaccessibleObjectException-->Unable to make protected final java.lang.Class java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,
int,java.security.ProtectionDomain) throws java.lang.ClassFormatError accessible: module java.base does not "opens java.lang" to unnamed module #7225790e
Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make protected final java.lang.Class java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain) throws java.lang.ClassFormatE
rror accessible: module java.base does not "opens java.lang" to unnamed module #7225790e
I've read some subjects about this but I'm quite unsure about the workarround to set up.
Thanks a lot.
EDIT :
Rollbacked my JDK to 11 and I no longer have this error. Could we have an update in ordrer to make it runnable with a java 17 JDK ? Thanks in advance !

Related

jBPM Login Failed: Not Authorized: All of the pre-defined users dont work

I am trying to use the Business-Central/Workbench module. Followed the instructions as provided in the [Getting Started][1] of jBPM. I tried with all the pre-defined logins. Nothing works.
It throws
I also tried to look into the application-roles.properties and application-users.properties files. Both seems to be empty (only comments).
The error is something like:
ERROR [io.undertow.request] (default task-5) UT005023: Exception handling request to /business-central/rest/controller/server/sample-server: java.lang.NoClassDefFoundError: java/security/acl/Group
...
...
...
Caused by: java.lang.ClassNotFoundException: java.security.acl.Group from [Module "org.picketbox" from local module loader #2c07545f (finder: local module finder #e57b96d (roots: /Users/abcd/EclipseProjects/Drools_Workbench/jbpm-server-7.43.1.Final-dist/modules,/Users/abcd/EclipseProjects/Drools_Workbench/jbpm-server-7.43.1.Final-dist/modules/system/layers/base))]
Finally figured out the issue. It is:
java.lang.NoClassDefFoundError: java/security/acl/Group
This pointed to an incompatible JDK. I downgraded from JDK14 to JDK11.

EAP 7.X ClassNotFoundException during migration

I am migrating an application to EAP 7.x, My project structure is
-Ear
-War
-Ejb Jar
I am getting ClassNotFoundException, those classes are in the jar. The below is the stack trace. All exception showing in the classes that are in the ejb jar.
Caused by: java.lang.RuntimeException: WFLYSRV0177: Error getting reflective information for class com.ttt.xxx.ejb.sessionbeans.messagebroker.MessageHandlerSessionBeanCHI with ClassLoader ModuleClassLoader for Module "deployment.xxx-dev-3.3.0-SNAPSHOT.ear.ejbModule-3.3.0-SNAPSHOT.jar" from Service Module Loader
at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:78)
at org.jboss.as.ee.metadata.MethodAnnotationAggregator.runtimeAnnotationInformation(MethodAnnotationAggregator.java:57)
at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.handleAnnotations(InterceptorAnnotationProcessor.java:106)
at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.processComponentConfig(InterceptorAnnotationProcessor.java:91)
at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.deploy(InterceptorAnnotationProcessor.java:76)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:143)
... 8 more
Caused by: java.lang.NoClassDefFoundError: com/ttt/xxx/ejb/sessionbeans/messagebroker/MessageHandlerSessionBeanCHI$xmlException
at java.lang.Class.getDeclaredFields0(Native Method)
at java.lang.Class.privateGetDeclaredFields(Unknown Source)
at java.lang.Class.getDeclaredFields(Unknown Source)
at org.jboss.as.server.deployment.reflect.ClassReflectionIndex.<init>(ClassReflectionIndex.java:72)
at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:70)
... 13 more
Caused by: java.lang.ClassNotFoundException: com.ttt.xxx.ejb.sessionbeans.messagebroker.MessageHandlerSessionBeanCHI$xmlException from [Module "deployment.xxx-dev-3.3.0-SNAPSHOT.ear.ejbModule-3.3.0-SNAPSHOT.jar" from Service Module Loader]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:255)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:410)
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:116)
... 18 more
The jar packing with ear is.
META-INF/
META-INF/MANIFEST.MF
aopalliance-1.0.jar
axiom-api-1.2.12.jar
axiom-impl-1.2.12.jar
axis2-adb-1.6.1.jar
axis2-adb-codegen-1.6.1.jar
axis2-codegen-1.6.1.jar
axis2-kernel-1.6.1.jar
axis2-transport-http-1.6.1.jar
axis2-transport-local-1.6.1.jar
commons-beanutils-1.7.0.jar
commons-cli-1.2.jar
commons-codec-1.3.jar
commons-collections-3.1.jar
commons-fileupload-1.2.jar
commons-httpclient-3.1.jar
commons-lang-2.3.jar
commons-logging-1.1.1.jar
commons-pool-1.5.5.jar
displaytag-1.2.jar
displaytag-export-poi-1.2.jar
displaytag-portlet-1.2.jar
ejbModule-3.3.0-SNAPSHOT.jar
geronimo-activation_1.1_spec-1.0.2.jar
geronimo-javamail_1.4_spec-1.6.jar
geronimo-jta_1.1_spec-1.1.jar
geronimo-stax-api_1.0_spec-1.0.1.jar
geronimo-ws-metadata_2.0_spec-1.1.2.jar
httpcore-4.0.jar
itext-1.3.jar
jaxen-1.1.1.jar
jcl104-over-slf4j-1.4.2.jar
jsr311-api-1.0.jar
jstl-1.1.2.jar
log4j.xml
META-INF/application.xml
META-INF/jboss-app.xml
META-INF/jboss-deployment-struture.xml
xxx-dev-3.3.0-SNAPSHOT.war
neethi-3.0.1.jar
poi-3.2-FINAL.jar
slf4j-api-1.4.2.jar
slf4j-log4j12-1.4.2.jar
spring-asm-3.0.0.RELEASE.jar
spring-beans-3.0.0.RELEASE.jar
spring-context-3.0.0.RELEASE.jar
spring-core-3.0.0.RELEASE.jar
spring-expression-3.0.0.RELEASE.jar
spring-web-3.0.0.RELEASE.jar
spring-webmvc-3.0.0.RELEASE.jar
standard-1.1.2.jar
woden-api-1.0M9.jar
woden-impl-commons-1.0M9.jar
woden-impl-dom-1.0M9.jar
wsdl4j-1.6.2.jar
wstx-asl-3.2.9.jar
XmlSchema-1.4.7.jar
META-INF/maven/
xMETA-INF/maven/com.ttt.xxx/ear/
META-INF/maven/com.ttt.xxx/ear/pom.xml
META-INF/maven/com.ttt.xxx/ear/pom.properties
Please help to solve, I am suspecting issue is coming due to wrong class loading. But i am not able to fix it.

WFLYNAM0027 : ClassNotFoundException: org.jboss.naming.remote.client.InitialContextFactory

Enviornment- wildfly-9.0.2.Final, EJB 3.0
Following error occurred while trying to connect Test.java class(deployed as module at wildfly-9.0.2.Final#machine-A) to EJB whilch is deployed on jboss at machine-B(291.861.301.732).
17:02:46,666 ERROR [stderr] (default task-1) javax.naming.NamingException: WFLYNAM0027: Failed instantiate InitialContextFactory org.jboss.naming.remote.client.InitialContextFactory from classloader ModuleClassLoader for Module "deployment.test.ear.test.war:main" from Service Module Loader [Root exception is java.lang.ClassNotFoundException: org.jboss.naming.remote.client.InitialContextFactory from [Module "deployment.test.ear.test.war:main" from Service Module Loader]]
17:02:46,667 ERROR [stderr] (default task-1) at org.jboss.as.naming.InitialContext.getDefaultInitCtx(InitialContext.java:118)
17:02:46,667 ERROR [stderr] (default task-1) at org.jboss.as.naming.InitialContext.init(InitialContext.java:99)
17:02:46,670 ERROR [stderr] (default task-1) at javax.naming.ldap.InitialLdapContext.<init>(InitialLdapContext.java:154)
17:02:46,670 ERROR [stderr] (default task-1) at org.jboss.as.naming.InitialContext.<init>(InitialContext.java:89)
17:02:46,670 ERROR [stderr] (default task-1) at org.jboss.as.naming.InitialContextFactory.getInitialContext(InitialContextFactory.java:43)
17:02:46,687 ERROR [stderr] (default task-1) Caused by: java.lang.ClassNotFoundException: org.jboss.naming.remote.client.InitialContextFactory from [Module "deployment.test.ear.test.war:main" from Service Module Loader]
17:02:46,688 ERROR [stderr] (default task-1) at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:205)
17:02:46,688 ERROR [stderr] (default task-1) at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:455)
17:02:46,688 ERROR [stderr] (default task-1) at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:404)
17:02:46,688 ERROR [stderr] (default task-1) at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:385)
17:02:46,688 ERROR [stderr] (default task-1) at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:130)
Test.java class is present in testclient.jar & testclient.jar has been deplyed as a module using command
module add --name=testclient --resources=/Downloads/lib/test/client/testclient.jar --dependencies=javax.api
Test.java class
package com.testmodule.pojo;
import java.util.Properties;
import javax.naming.Context;
import javax.naming.InitialContext;
public class Test {
public void getDbConnection(){
try{
Properties jndiProps = new Properties();
jndiProps.put(Context.INITIAL_CONTEXT_FACTORY,"org.jboss.naming.remote.client.InitialContextFactory");
jndiProps.put(Context.PROVIDER_URL,"remote://291.861.301.732:4447");
jndiProps.put(Context.SECURITY_PRINCIPAL, "testuser");
jndiProps.put(Context.SECURITY_CREDENTIALS, "testpassword");
jndiProps.put("jboss.naming.client.ejb.context", true);
Context context = new InitialContext(jndiProps);
}
catch(Exception e){e.printStackTrace();}
}}
why this error has been occurred, For visiblity of 'org.jboss.naming.remote.client.InitialContextFactory' to testclient.jar, should i have to add more dependencies(currently only javax.api) while deploying testclient.jar as a module? or any other issue which is causing error? Class 'org.jboss.naming.remote.client.InitialContextFactory' is also present in $WILDFLY_HOME/bin/client/jboss-client.jar
Note - 291.861.301.732 is the remote system ip, on which ejb is deployed at jboss. ,This ejb is invoking from Test.java(remote client) using JNDI.
There is no jnp in wildfly-9.0.2.Final(which was in JBOSS 5.x), so i replaced property "org.jnp.interfaces.NamingContextFactory" to value org.jboss.naming.remote.client.InitialContextFactory". why still error is occurred?
Following has been added after receving comment 'Try putting jboss-client.jar in the runtime path, as part of WEB-INF/lib maybe' by 'Sampada Wagde'
I am not able to understand, In this scenarion test.jsp (present in test.ear-->test.war-->test.jsp) file is calling function getDbConnection of Test.java file. Test.java file is present in testclient.jar and this testclient.jar has been deployed as a module.
As per your suggestion, when i put 'jboss-client.jar' in test.ear-->test.war-->WEB-INF-->lib, problem was solved, now while accessing
application 'org.jboss.naming.remote.client.InitialContextFactory' ClassNotFound exception was not occurred...But my problem is that there are multiple war's files(Eg..test.war,test1.war,test2.war) and each war file is accessing Test.java file(present in testclient.jar), so i have to put 'jboss-client.jar' file in WEB-INF/lib of each war archive. which will be very complex for me, is there any other approach available? and secondly how this problem is solved by putting 'jboss-client.jar' into WEB-INF/lib direcory as 'org.jboss.naming.remote.client.InitialContextFactory' is present in testclient.jar(Not in test.ear-->test.war).
Following has been added after receving reply 'jboss-client.jar is required by the server at runtime...' by 'Sampada Wagde'
I also tried following steps
1. By putting 'jboss-deployment-structure.xml' in test.ear-->META-INF-->jboss-deployment-structure.xml
<?xml version="1.0"?>
<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.1">
<deployment>
<dependencies>
<module name="testclient" export="true" />
<module name="jboss-client" export="true" />
</dependencies>
</deployment>
Deploying module name as
module add --name=jboss-client --resources=/Downloads/wildfly-9.0.2.Final/bin/client/jboss-client.jar
but still the following error occurred.
14:14:34,376 WARN [org.jboss.modules] (default task-1) Failed to define class org.jboss.naming.remote.client.InitialContextFactory in Module "jboss-client:main" from local module loader #707f7052 (finder: local module finder #11028347 (roots: /Downloads/wildfly-9.0.2.Final/modules,/Downloads/wildfly-9.0.2.Final/modules/system/layers/base)): java.lang.LinkageError: Failed to link org/jboss/naming/remote/client/InitialContextFactory (Module "jboss-client:main" from local module loader #707f7052 (finder: local module finder #11028347 (roots: /Downloads/wildfly-9.0.2.Final/modules,/Downloads/wildfly-9.0.2.Final/modules/system/layers/base)))
at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:437)
at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:269)
at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:77)
at org.jboss.modules.Module.loadModuleClass(Module.java:560)
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:197)
Caused by: java.lang.NoClassDefFoundError: javax/naming/spi/InitialContextFactory
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:760)
at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:353)
at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:432)
Caused by: java.lang.ClassNotFoundException: javax.naming.spi.InitialContextFactory from [Module "jboss-client:main" from local module loader #707f7052 (finder: local module finder #11028347 (roots: /Downloads/wildfly-9.0.2.Final/modules,/Downloads/wildfly-9.0.2.Final/modules/system/layers/base))]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:205)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:455)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:404)
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:385)
14:14:34,391 ERROR [io.undertow.request] (default task-1) UT005023: Exception handling request to /test/test.jsp: javax.servlet.ServletException: java.lang.LinkageError: Failed to link org/jboss/naming/remote/client/InitialContextFactory (Module "jboss-client:main" from local module loader #707f7052 (finder: local module finder #11028347 (roots: /Downloads/wildfly-9.0.2.Final/modules,/Downloads/wildfly-9.0.2.Final/modules/system/layers/base)))
at org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:848)
at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:777)
at org.apache.jsp.test_jsp._jspService(test_jsp.java:85)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:69)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
Caused by: java.lang.LinkageError: Failed to link org/jboss/naming/remote/client/InitialContextFactory (Module "jboss-client:main" from local module loader #707f7052 (finder: local module finder #11028347 (roots: /Downloads/wildfly-9.0.2.Final/modules,/Downloads/wildfly-9.0.2.Final/modules/system/layers/base)))
at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:437)
at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:269)
at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:77)
at org.jboss.modules.Module.loadModuleClass(Module.java:560)
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:197)
Caused by: java.lang.NoClassDefFoundError: javax/naming/spi/InitialContextFactory
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:760)
at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:353)
at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:432)
Caused by: java.lang.ClassNotFoundException: javax.naming.spi.InitialContextFactory from [Module "jboss-client:main" from local module loader #707f7052 (finder: local module finder #11028347 (roots: /Downloads/wildfly-9.0.2.Final/modules,/Downloads/wildfly-9.0.2.Final/modules/system/layers/base))]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:205)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:455)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:404)
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:385)
jboss-client.jar is required by the server at runtime. There are several ways of providing jars to a JBoss server -
include jars in MANIFEST.MF (this is generally used for your own application jars)
include jars in WEB-INF/lib - if the jar is specific to the given web project or WAR
include jars in a module class loader and provide it to the web project via jboss-deploymet-structure.xml . This is done when there are multiple WARS and some of them (not all) need the jars.
include jars in a module class loader and provide it to the server via global modules in standalone.xml . This is done when the jars are being referenced by all applications deployed on the server.
For details on modules in JBoss, please refer to this link -
https://docs.jboss.org/author/display/AS7/Class+Loading+in+AS7
As to your question on how putting the jboss-client.jar in a WAR instead of testclient.jar is resolving the issue, the answer is the same - this is how class loading works.
You need to make your own module depend on a module that contains not only the jboss-client jar, but also all the dependencies of jboss-client, this might just be other modules or possibly other jars too. The first class it's moaning about being missing is javax/naming/spi/InitialContextFactory so edit the module.xml for the jboss-client module to depend on javax.api

Error when starting JBoss

Get the below error when starting the JBoss. Tried reuploading the jars, wars and the modules. Wasn't of much help.
Starting jboss-as: Exception in thread "main" java.lang.ExceptionInInitializerError
at java.lang.Class.initializeClass(libgcj.so.10)
at __redirected.__JAXPRedirected.initAll(__JAXPRedirected.java:87)
at org.jboss.modules.Module$1.run(Module.java:85)
at org.jboss.modules.Module$1.run(Module.java:72)
at java.security.AccessController.doPrivileged(libgcj.so.10)
at org.jboss.modules.Module.<clinit>(Module.java:72)
at java.lang.Class.initializeClass(libgcj.so.10)
at org.jboss.modules.Main.main(Main.java:255)
Caused by: java.lang.IllegalArgumentException: Problem configuring DatatypeFactory
at __redirected.__DatatypeFactory.<clinit>(__DatatypeFactory.java:70)
at java.lang.Class.initializeClass(libgcj.so.10)
...7 more
Caused by: javax.xml.datatype.DatatypeConfigurationException: java.lang.ClassNotFoundException: gnu.xml.datatype.JAXPDatatypeFactory
at javax.xml.datatype.DatatypeFactory.newInstance(libgcj.so.10)
at __redirected.__DatatypeFactory.<clinit>(__DatatypeFactory.java:62)
...8 more
Caused by: java.lang.ClassNotFoundException: gnu.xml.datatype.JAXPDatatypeFactory
at java.lang.Class.forName(libgcj.so.10)
at javax.xml.datatype.DatatypeFactory.newInstance(libgcj.so.10)
...9 more
I solved the above issue by updating Java. I was using java 1.5 I updated to java 1.7.xx. I am not getting the Error any more, also my application works fine.
I am curious to know what causes this issue, If anyone could answer this it will be helpful

Upgrade xwiki (2.5 to 4.4)

Im using XWIKI ENTERPRISE 2.5 and want to upgrade it to 4.4 or 4.3 (stable)
I found this upgrade documentation for XWiki. Following the guide, I backed up the important files in WEB-INF.
After that, I copied all the files from the new .war to my wiki directory (/var/lib/tomcat6/webapps/xwiki). Then, I moved back the important files and overwrote the new files.
I get this error message, when I visit my wiki page:
HTTP Status 404 - type Status report
message description
The requested resource () is not available.
Apache Tomcat/6.0.28
Here is the logfile:
SCHWERWIEGEND: Exception sending context initialized event to listener instance of class org.xwiki.container.servlet.XWikiServletContextListener
java.lang.RuntimeException: Failed to find the Observation Manager component
at org.xwiki.container.servlet.XWikiServletContextListener.contextInitialized(XWikiServletContextListener.java:101)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4135)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4630)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:546)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1041)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:964)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:502)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:785)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:445)
at org.apache.catalina.core.StandardService.start(StandardService.java:519)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:581)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: org.xwiki.component.manager.ComponentLookupException: Failed to lookup component [org.xwiki.observation.internal.DefaultObservationManager] identifier by [role = [interface org.xwiki.observation.ObservationManager] hint = [default]]
at org.xwiki.component.embed.EmbeddableComponentManager.getComponentInstance(EmbeddableComponentManager.java:348)
at org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:155)
at org.xwiki.container.servlet.XWikiServletContextListener.contextInitialized(XWikiServletContextListener.java:99)
... 24 more
Caused by: org.xwiki.component.phase.InitializationException: Failed to lookup Event Listeners
at org.xwiki.observation.internal.DefaultObservationManager.initialize(DefaultObservationManager.java:139)
at org.xwiki.component.embed.InitializableLifecycleHandler.handle(InitializableLifecycleHandler.java:39)
at org.xwiki.component.embed.EmbeddableComponentManager.createInstance(EmbeddableComponentManager.java:323)
at org.xwiki.component.embed.EmbeddableComponentManager.getComponentInstance(EmbeddableComponentManager.java:378)
at org.xwiki.component.embed.EmbeddableComponentManager.getComponentInstance(EmbeddableComponentManager.java:346)
... 26 more
Caused by: org.xwiki.component.manager.ComponentLookupException: Failed to lookup component [role = [interface org.xwiki.observation.EventListener] hint = [default]]
at org.xwiki.component.embed.EmbeddableComponentManager.getInstanceMap(EmbeddableComponentManager.java:187)
at org.xwiki.component.embed.EmbeddableComponentManager.getInstanceList(EmbeddableComponentManager.java:169)
at org.xwiki.observation.internal.DefaultObservationManager.initialize(DefaultObservationManager.java:135)
... 30 more
Caused by: org.xwiki.component.manager.ComponentLookupException: Failed to lookup component [org.xwiki.security.authorization.cache.internal.DefaultSecurityCache] identifier by [role = [interface org.xwiki.security.authorization.cache.SecurityCache] hint = [default]]
at org.xwiki.component.embed.EmbeddableComponentManager.getComponentInstance(EmbeddableComponentManager.java:348)
at org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:161)
at org.xwiki.component.embed.EmbeddableComponentManager.createInstance(EmbeddableComponentManager.java:312)
at org.xwiki.component.embed.EmbeddableComponentManager.getComponentInstance(EmbeddableComponentManager.java:378)
at org.xwiki.component.embed.EmbeddableComponentManager.getInstanceMap(EmbeddableComponentManager.java:185)
... 32 more
Caused by: org.xwiki.component.phase.InitializationException: Unable to create the security cache with a capacity of 500
at org.xwiki.security.authorization.cache.internal.DefaultSecurityCache.newCache(DefaultSecurityCache.java:104)
at org.xwiki.security.authorization.cache.internal.DefaultSecurityCache.initialize(DefaultSecurityCache.java:112)
at org.xwiki.component.embed.InitializableLifecycleHandler.handle(InitializableLifecycleHandler.java:39)
at org.xwiki.component.embed.EmbeddableComponentManager.createInstance(EmbeddableComponentManager.java:323)
at org.xwiki.component.embed.EmbeddableComponentManager.getComponentInstance(EmbeddableComponentManager.java:378)
at org.xwiki.component.embed.EmbeddableComponentManager.getComponentInstance(EmbeddableComponentManager.java:346)
... 36 more
Caused by: org.xwiki.cache.CacheException: Failed to get cache factory for role hint [infinispan]
at org.xwiki.cache.internal.DefaultCacheManager.createNewCache(DefaultCacheManager.java:109)
at org.xwiki.cache.internal.DefaultCacheManager.createNewCache(DefaultCacheManager.java:85)
at org.xwiki.security.authorization.cache.internal.DefaultSecurityCache.newCache(DefaultSecurityCache.java:102)
... 41 more
Caused by: org.xwiki.component.manager.ComponentLookupException: Failed to lookup component [org.xwiki.cache.infinispan.internal.InfinispanCacheFactory] identifier by [role = [interface org.xwiki.cache.CacheFactory] hint = [infinispan]]
at org.xwiki.component.embed.EmbeddableComponentManager.getComponentInstance(EmbeddableComponentManager.java:348)
at org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:161)
at org.xwiki.cache.internal.DefaultCacheManager.createNewCache(DefaultCacheManager.java:107)
... 43 more
Caused by: org.infinispan.jmx.JmxDomainConflictException: Domain already registered org.xwiki.infinispan
at org.infinispan.jmx.JmxUtil.buildJmxDomain(JmxUtil.java:73)
at org.infinispan.jmx.CacheManagerJmxRegistration.updateDomain(CacheManagerJmxRegistration.java:92)
at org.infinispan.jmx.CacheManagerJmxRegistration.buildRegistrar(CacheManagerJmxRegistration.java:86)
at org.infinispan.jmx.AbstractJmxRegistration.registerMBeans(AbstractJmxRegistration.java:46)
at org.infinispan.jmx.CacheManagerJmxRegistration.start(CacheManagerJmxRegistration.java:62)
at org.infinispan.manager.DefaultCacheManager.start(DefaultCacheManager.java:720)
at org.infinispan.manager.DefaultCacheManager.<init>(DefaultCacheManager.java:388)
at org.infinispan.manager.DefaultCacheManager.<init>(DefaultCacheManager.java:353)
at org.xwiki.cache.infinispan.internal.InfinispanCacheFactory.initialize(InfinispanCacheFactory.java:104)
at org.xwiki.component.embed.InitializableLifecycleHandler.handle(InitializableLifecycleHandler.java:39)
at org.xwiki.component.embed.EmbeddableComponentManager.createInstance(EmbeddableComponentManager.java:323)
at org.xwiki.component.embed.EmbeddableComponentManager.getComponentInstance(EmbeddableComponentManager.java:378)
at org.xwiki.component.embed.EmbeddableComponentManager.getComponentInstance(EmbeddableComponentManager.java:346)
... 45 more
When you say that
I copied all the files from the new .war to my wiki directory
Did you copy the new files over the existing directory? You're supposed to delete everything from the old version and use only the files from the new version, and only copy from the backup the essential configuration files. Also, note that you're not supposed to just copy the old configuration, but merge your custom settings into the default new configuration.
The root error in the stack trace:
Caused by: org.infinispan.jmx.JmxDomainConflictException: Domain already registered org.xwiki.infinispan
suggest a duplicate jar. The other case when this could occur is when you have more than one instance of XWiki in the same container, in which case you should edit WEB-INF/cache/infinispan/config.xml, and replace the line jmxDomain="org.xwiki.infinispan" with a unique value, like jmxDomain="org.xwiki.infinispan.wiki1" and jmxDomain="org.xwiki.infinispan.wiki2" for the two instances.
I've been having the same problem when upgrading from 4.0-rc-1 to 4.4 or 4.5. I have no duplicate jars nor am I running several instances of XWiki. It may be there is an issue either in infinispan or in XWiki's cache implementation.
A temporary workaround is to allow duplicate domains explicitly in config.xml :
<globalJmxStatistics
[...]
allowDuplicateDomains="true" />