<|endoftext|> to to
Table E
.5cm .5cm to to
Table E
.5cm .5cm to to
Table E
.5cm .5cm to to
Table E
.5cm .5cm to to
Table E
.5cm .5cm to to
Table E
.5cm .5cm to
<|endoftext|>Q:
Spring boot non-fatal errors ClassNotFoundException
I'm trying to create Spring Boot application for collaboration with Apache ActiveMQ.
During startup I receiving following "non-fatal" errors:
java.lang.ClassNotFoundException: org.springframework.data.web.config.EnableSpringDataWebSupport
at java.net.URLClassLoader$1.run(Unknown Source) ~[na:1.8.0_25]
at java.net.URLClassLoader$1.run(Unknown Source) ~[na:1.8.0_25]
at java.security.AccessController.doPrivileged(Native Method) ~[na:1.8.0_25]
at java.net.URLClassLoader.findClass(Unknown Source) ~[na:1.8.0_25]
at java.lang.ClassLoader.loadClass(Unknown Source) ~[na:1.8.0_25]
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) ~[na:1.8.0_25]
at java.lang.ClassLoader.loadClass(Unknown Source) ~[na:1.8.0_25]
java.lang.ClassNotFoundException: org.springframework.security.config.annotation.web.configuration.EnableWebSecurity
at java.net.URLClassLoader$1.run(Unknown Source) ~[na:1.8.0_25]
at java.net.URLClassLoader$1.run(Unknown Source) ~[na:1.8.0_25]
at java.security.AccessController.doPrivileged(Native Method) ~[na:1.8.0_25]
at java.net.URLClassLoader.findClass(Unknown Source) ~[na:1.8.0_25]
at java.lang.ClassLoader.loadClass(Unknown Source) ~[na:1.8.0_25]
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) ~[na:1.8.0_25]
at java.lang.ClassLoader.loadClass(Unknown Source) ~[na:1.8.0_25]
This is my files:
@Configuration
@EnableJms
public class ActiveMQTestConfig {
@Bean
// Strictly speaking this bean is not necessary as boot creates a default
JmsListenerContainerFactory> myJmsContainerFactory(ConnectionFactory connectionFactory) {
SimpleJmsListenerContainerFactory factory = new SimpleJmsListenerContainerFactory();
factory.setConnectionFactory(connectionFactory);
return factory;
}
}
@Configuration
@ComponentScan("com.example.messages")
@SpringBootApplication
public class TestConfig {
}
@Component
public class Receiver {
/**
* Get a copy of the application context
*/
@Autowired
ConfigurableApplicationContext context;
/**
* When you receive a message, print it out, then shut down the application.
* Finally, clean up any ActiveMQ server stuff.
*/
@JmsListener(destination = "mailbox-destination", containerFactory = "myJmsContainerFactory")
public void receiveMessage(String message) {
System.out.println("Received <" + message + ">");
context.close();
FileSystemUtils.deleteRecursively(new File("activemq-data"));
}
}
@SpringApplicationConfiguration(classes = { TestConfig.class, ActiveMQTestConfig.class })
@RunWith(SpringJUnit4ClassRunner.class)
public class ReceiverTest {
@Autowired
private JmsTemplate jmsTemplate;
@Test
public void testReceiver() {
// Clean out any ActiveMQ data from a previous run
FileSystemUtils.deleteRecursively(new File("activemq-data"));
// Send a message
MessageCreator messageCreator = new MessageCreator() {
@Override
public Message