我正在使用 ActiveMQ PooledConnectionFactory
PooledConnectionFactory connectionFactory = new PooledConnectionFactory(Constants.AAMQ_MESSAGE_BROKER_URI);
Connection tempConnection = connectionFactory.createConnection(queueUName, queuePwd);
它产生以下异常
引起:java.lang.NoSuchMethodError: org.apache.commons.pool.impl.GenericKeyedObjectPool.setLifo(Z)V at org.apache.activemq.pool.PooledConnectionFactory.createConnection(PooledConnectionFactory.java:213) at com.model。 util.MyJMSClient.createNewConnection(MyJMSClient.java:393) 在 com.model.util.MyJMSClient.getConnection(MyJMSClient.java:386) 在 com.model.util.MyJMSClient.executeCommandASync(MyJMSClient.java:179) 在 com.model .util.MyJMSClient.executeCommand(MyJMSClient.java:104) 在 com.model.util.WinCommandRunner.executeCommand(WinCommandRunner.java:99)
我在类路径中有 common-pool 和其他库