Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker compose up vtn20b occurred: java.lang.ClassNotFoundException: com.rabbitmq.jms.admin.RMQConnectionFactory #29

Open
nacoc01leh opened this issue Oct 21, 2024 · 0 comments

Comments

@nacoc01leh
Copy link

vtn20b-1           | Caused by: java.lang.ClassNotFoundException: com.rabbitmq.jms.admin.RMQConnectionFactory
vtn20b-1           |    at java.net.URLClassLoader.findClass(Unknown Source) ~[?:?]
vtn20b-1           |    at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:?]
vtn20b-1           |    at org.springframework.boot.loader.LaunchedURLClassLoader.loadClass(LaunchedURLClassLoader.java:151) ~[oadr-vtn20b.jar:0.1.0-SNAPSHOT]
vtn20b-1           |    at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:?]
vtn20b-1           |    at com.avob.openadr.server.common.vtn.VtnConfigRabbitmqBroker.externalConnectionFactory(VtnConfigRabbitmqBroker.java:22) ~[OpenADRServerVTNCommon-0.1.0-SNAPSHOT.jar!/:0.1.0-SNAPSHOT]
vtn20b-1           |    at com.avob.openadr.server.common.vtn.VtnConfigRabbitmqBroker$$EnhancerBySpringCGLIB$$3d4719e9.CGLIB$externalConnectionFactory$0(<generated>) ~[OpenADRServerVTNCommon-0.1.0-SNAPSHOT.jar!/:0.1.0-SNAPSHOT]
vtn20b-1           |    at com.avob.openadr.server.common.vtn.VtnConfigRabbitmqBroker$$EnhancerBySpringCGLIB$$3d4719e9$$FastClassBySpringCGLIB$$20078e58.invoke(<generated>) ~[OpenADRServerVTNCommon-0.1.0-SNAPSHOT.jar!/:0.1.0-SNAPSHOT]
vtn20b-1           |    at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:244) ~[spring-core-5.2.10.RELEASE.jar!/:5.2.10.RELEASE]
vtn20b-1           |    at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:331) ~[spring-context-5.2.10.RELEASE.jar!/:5.2.10.RELEASE]
vtn20b-1           |    at com.avob.openadr.server.common.vtn.VtnConfigRabbitmqBroker$$EnhancerBySpringCGLIB$$3d4719e9.externalConnectionFactory(<generated>) ~[OpenADRServerVTNCommon-0.1.0-SNAPSHOT.jar!/:0.1.0-SNAPSHOT]
vtn20b-1           |    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
vtn20b-1           |    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:?]
vtn20b-1           |    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:?]
vtn20b-1           |    at java.lang.reflect.Method.invoke(Unknown Source) ~[?:?]
@Profile("external")
@Configuration
public class VtnConfigRabbitmqBroker {

	@Resource
	private VtnConfig vtnConfig;

	@Bean
	public ConnectionFactory externalConnectionFactory() {
                // Occurred Exception:  java.lang.ClassNotFoundException: com.rabbitmq.jms.admin.RMQConnectionFactory
		RMQConnectionFactory rmqConnectionFactory = new RMQConnectionFactory();
		rmqConnectionFactory.setHost(vtnConfig.getBrokerHost());
		rmqConnectionFactory.setPort(vtnConfig.getBrokerPort());
		rmqConnectionFactory.setUsername(vtnConfig.getBrokerUser());
		rmqConnectionFactory.setPassword(vtnConfig.getBrokerPass());
		return rmqConnectionFactory;
	}

	@Bean
	public JmsTemplate externalJmsTemplate() throws Exception {
		return new JmsTemplate(externalConnectionFactory());
	}

}

But i did not find any dependency conflict about rabbitmq-jms...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant