Skip to content
This repository has been archived by the owner on Nov 28, 2024. It is now read-only.

Commit

Permalink
OGM-1588 Disable MongoDBWildFlyNoSQLMemberRegistrationIT
Browse files Browse the repository at this point in the history
Wildfly 14 cannot create a mongo client with mongo client 4.

Error:
```
^[[0m^[[31m17:52:59,776 ERROR [org.jboss.as.controller.management-operation] (ServerService Thread Pool -- 67) WFLYCTL0013: Operation ("add") failed - address: ([
    ("subsystem" => "mongodb"),
    ("mongo" => "default")
]): java.lang.RuntimeException: Could not get constructor for com.mongodb.MongoClient
        at org.wildfly.nosql.common.MethodHandleBuilder.declaredConstructor(MethodHandleBuilder.java:105)
        at org.wildfly.extension.nosql.driver.mongodb.MongoInteraction.<init>(MongoInteraction.java:90)
        at org.wildfly.extension.nosql.driver.mongodb.MongoClientConnectionsService.<init>(MongoClientConnectionsService.java:62)
        at org.wildfly.extension.nosql.subsystem.mongodb.MongoDefinition$ProfileAdd.startMongoDriverService(MongoDefinition.java:231)
        at org.wildfly.extension.nosql.subsystem.mongodb.MongoDefinition$ProfileAdd.performRuntime(MongoDefinition.java:226)
        at org.jboss.as.controller.AbstractAddStepHandler.performRuntime(AbstractAddStepHandler.java:338)
        at org.jboss.as.controller.AbstractAddStepHandler$1.execute(AbstractAddStepHandler.java:159)
        at org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:999)
        at org.jboss.as.controller.AbstractOperationContext.processStages(AbstractOperationContext.java:743)
        at org.jboss.as.controller.AbstractOperationContext.executeOperation(AbstractOperationContext.java:467)
        at org.jboss.as.controller.ParallelBootOperationStepHandler$ParallelBootTask.run(ParallelBootOperationStepHandler.java:384)
        at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
        at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1985)
        at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1487)
        at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1349)
        at java.lang.Thread.run(Thread.java:748)
        at org.jboss.threads.JBossThread.run(JBossThread.java:485)
Caused by: java.lang.NoSuchMethodException: com.mongodb.MongoClient.<init>(java.util.List, java.util.List, com.mongodb.MongoClientOptions)
        at java.lang.Class.getConstructor0(Class.java:3082)
        at java.lang.Class.getDeclaredConstructor(Class.java:2178)
        at org.wildfly.nosql.common.MethodHandleBuilder.declaredConstructor(MethodHandleBuilder.java:102)
        ... 16 more

```
  • Loading branch information
DavideD authored and jyemin committed Aug 30, 2024
1 parent f643a2d commit f07cabf
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import org.hibernate.ogm.test.integration.mongodb.MongoDBModuleMemberRegistrationScenario;
import org.hibernate.ogm.test.integration.mongodb.errorhandler.TestErrorHandler;

import org.junit.Ignore;
import org.junit.runner.RunWith;

import org.jboss.arquillian.container.test.api.Deployment;
Expand All @@ -28,6 +29,9 @@
* @author Fabio Massimo Ercoli
*/
@RunWith(Arquillian.class)
// WildFly 14 mongo subsystem is not compatible with mongo client 4. To check this issue re-enable the subsystem
// in standalone-nosql.xml
@Ignore
public class MongoDBWildFlyNoSQLMemberRegistrationIT extends MongoDBModuleMemberRegistrationScenario {

@Deployment
Expand Down
18 changes: 9 additions & 9 deletions integrationtest/wildfly-server-testconfig/standalone-nosql.xml
Original file line number Diff line number Diff line change
Expand Up @@ -491,15 +491,15 @@
<client-config name="Standard-Client-Config"/>
</subsystem>
<subsystem xmlns="urn:jboss:domain:weld:4.0"/>
<subsystem xmlns="urn:jboss:domain:mongodb:1.0">
<mongo name="default" id="mongodb" jndi-name="java:jboss/mongodb/client" database="mongodb" module="org.hibernate.ogm.mongodb">
<host name="default" outbound-socket-binding-ref="mongodb"/>
<properties name="default">
<property name="writeConcern" value="ACKNOWLEDGED"/>
<property name="readConcern" value="LOCAL"/>
</properties>
</mongo>
</subsystem>
<!-- <subsystem xmlns="urn:jboss:domain:mongodb:1.0">-->
<!-- <mongo name="default" id="mongodb" jndi-name="java:jboss/mongodb/client" database="mongodb" module="org.hibernate.ogm.mongodb">-->
<!-- <host name="default" outbound-socket-binding-ref="mongodb"/>-->
<!-- <properties name="default">-->
<!-- <property name="writeConcern" value="ACKNOWLEDGED"/>-->
<!-- <property name="readConcern" value="LOCAL"/>-->
<!-- </properties>-->
<!-- </mongo>-->
<!-- </subsystem>-->
</profile>
<interfaces>
<interface name="management">
Expand Down

0 comments on commit f07cabf

Please sign in to comment.