Jetty + Guice + Jersey gives 404 on accessing the resource - java
I have seen similar issues and solutions to those, but still cannot figure out the solution to mine.
I start Jetty server programmatically and hook Jersey using Guice into it. When I try to access my Jersey resource, I get 404.
public class TestService {
public static void main(String[] args) throws Exception {
Server server = new Server(8080);
ServletContextHandler context = new ServletContextHandler();
context.setContextPath("/");
server.setHandler(context);
final Injector injector = Guice.createInjector(new MyServletModule());
FilterHolder guiceFilter = new FilterHolder(injector.getInstance(GuiceFilter.class));
context.addFilter(guiceFilter, "/*", EnumSet.allOf(DispatcherType.class));
context.addEventListener(new GuiceServletContextListener() {
#Override
protected Injector getInjector() {
return injector;
}
});
server.start();
server.join();
}
}
class MyServletModule extends ServletModule {
#Override
protected void configureServlets() {
bind(GuiceContainer.class);
Map<String, String> parameters = Maps.newHashMap();
parameters.put(PackagesResourceConfig.PROPERTY_PACKAGES, "com.test");
parameters.put(JSONConfiguration.FEATURE_POJO_MAPPING, "true");
serve("/*").with(GuiceContainer.class, parameters);
}
}
My resource:
#Singleton
#Path("/")
public class MyResource {
#GET
public String sayhello() {
return "hello";
}
}
I can see that the resource is being loaded in the log:
INFO: Root resource classes found:
class com.test.MyResource
But I get 404 on loading http://localhost:8080/. I have also tried mapping the resource to other urls, fx /web, but it was still 404.
And complete log:
2013-07-23 11:06:07,993 [main] DEBUG org.eclipse.jetty.util.log - Logging to org.slf4j.impl.Log4jLoggerAdapter(org.eclipse.jetty.util.log) via org.eclipse.jetty.util.log.Slf4jLog
2013-07-23 11:06:08,114 [main] DEBUG org.eclipse.jetty.util.component.Container - Container org.eclipse.jetty.server.Server#18fef3d + SelectChannelConnector#0.0.0.0:8080 as connector
2013-07-23 11:06:08,131 [main] DEBUG org.eclipse.jetty.util.component.Container - Container org.eclipse.jetty.server.Server#18fef3d + o.e.j.s.ServletContextHandler{/,null} as handler
2013-07-23 11:06:08,425 [main] DEBUG org.eclipse.jetty.servlet.ServletHandler - filterNameMap={com.google.inject.servlet.GuiceFilter-1346515=com.google.inject.servlet.GuiceFilter-1346515}
2013-07-23 11:06:08,426 [main] DEBUG org.eclipse.jetty.servlet.ServletHandler - pathFilters=[[/*]/[]==31=>com.google.inject.servlet.GuiceFilter-1346515]
2013-07-23 11:06:08,426 [main] DEBUG org.eclipse.jetty.servlet.ServletHandler - servletFilterMap={}
2013-07-23 11:06:08,426 [main] DEBUG org.eclipse.jetty.servlet.ServletHandler - servletPathMap=null
2013-07-23 11:06:08,427 [main] DEBUG org.eclipse.jetty.servlet.ServletHandler - servletNameMap={}
2013-07-23 11:06:08,429 [main] DEBUG org.eclipse.jetty.util.component.AbstractLifeCycle - starting org.eclipse.jetty.server.Server#18fef3d
2013-07-23 11:06:08,429 [main] INFO org.eclipse.jetty.server.Server - jetty-8.1.0.RC5
2013-07-23 11:06:08,443 [main] DEBUG org.eclipse.jetty.util.component.Container - Container org.eclipse.jetty.server.Server#18fef3d + qtp22355327{8<=0<=0/254,-1} as threadpool
2013-07-23 11:06:08,444 [main] DEBUG org.eclipse.jetty.util.component.AbstractLifeCycle - starting o.e.j.s.ServletContextHandler{/,null}
2013-07-23 11:06:08,453 [main] DEBUG org.eclipse.jetty.util.component.Container - Container org.eclipse.jetty.servlet.ServletHandler#128f6ee + com.google.inject.servlet.GuiceFilter-1346515 as filter
2013-07-23 11:06:08,453 [main] DEBUG org.eclipse.jetty.util.component.Container - Container org.eclipse.jetty.servlet.ServletHandler#128f6ee + [/*]/[]==31=>com.google.inject.servlet.GuiceFilter-1346515 as filterMapping
2013-07-23 11:06:08,454 [main] DEBUG org.eclipse.jetty.util.component.Container - Container o.e.j.s.ServletContextHandler{/,null} + org.eclipse.jetty.servlet.ServletHandler#128f6ee as handler
2013-07-23 11:06:08,454 [main] DEBUG org.eclipse.jetty.util.component.AbstractLifeCycle - starting org.eclipse.jetty.servlet.ServletHandler#128f6ee
2013-07-23 11:06:08,454 [main] DEBUG org.eclipse.jetty.servlet.ServletHandler - filterNameMap={com.google.inject.servlet.GuiceFilter-1346515=com.google.inject.servlet.GuiceFilter-1346515}
2013-07-23 11:06:08,454 [main] DEBUG org.eclipse.jetty.servlet.ServletHandler - pathFilters=[[/*]/[]==31=>com.google.inject.servlet.GuiceFilter-1346515]
2013-07-23 11:06:08,454 [main] DEBUG org.eclipse.jetty.servlet.ServletHandler - servletFilterMap={}
2013-07-23 11:06:08,454 [main] DEBUG org.eclipse.jetty.servlet.ServletHandler - servletPathMap=null
2013-07-23 11:06:08,454 [main] DEBUG org.eclipse.jetty.servlet.ServletHandler - servletNameMap={}
2013-07-23 11:06:08,454 [main] DEBUG org.eclipse.jetty.server.handler.AbstractHandler - starting org.eclipse.jetty.servlet.ServletHandler#128f6ee
2013-07-23 11:06:08,454 [main] DEBUG org.eclipse.jetty.util.component.AbstractLifeCycle - STARTED org.eclipse.jetty.servlet.ServletHandler#128f6ee
2013-07-23 11:06:08,455 [main] DEBUG org.eclipse.jetty.server.handler.AbstractHandler - starting o.e.j.s.ServletContextHandler{/,null}
2013-07-23 11:06:08,455 [main] INFO org.eclipse.jetty.server.handler.ContextHandler - started o.e.j.s.ServletContextHandler{/,null}
2013-07-23 11:06:08,455 [main] DEBUG org.eclipse.jetty.util.component.AbstractLifeCycle - starting com.google.inject.servlet.GuiceFilter-1346515
2013-jul-23 11:06:08 com.sun.jersey.api.core.PackagesResourceConfig init
INFO: Scanning for root resource and provider classes in the packages:
com.test
2013-jul-23 11:06:08 com.sun.jersey.api.core.ScanningResourceConfig logClasses
INFO: Root resource classes found:
class com.test.MyResource
2013-jul-23 11:06:08 com.sun.jersey.api.core.ScanningResourceConfig init
INFO: No provider classes found.
2013-jul-23 11:06:08 com.sun.jersey.server.impl.application.WebApplicationImpl _initiate
INFO: Initiating Jersey application, version 'Jersey: 1.12 02/15/2012 04:51 PM'
2013-07-23 11:06:09,219 [main] DEBUG org.eclipse.jetty.util.component.AbstractLifeCycle - STARTED com.google.inject.servlet.GuiceFilter-1346515
2013-07-23 11:06:09,219 [main] DEBUG org.eclipse.jetty.util.component.AbstractLifeCycle - STARTED o.e.j.s.ServletContextHandler{/,null}
2013-07-23 11:06:09,219 [main] DEBUG org.eclipse.jetty.server.handler.AbstractHandler - starting org.eclipse.jetty.server.Server#18fef3d
2013-07-23 11:06:09,219 [main] DEBUG org.eclipse.jetty.util.component.AbstractLifeCycle - starting qtp22355327{8<=0<=0/254,-1}
2013-07-23 11:06:09,221 [main] DEBUG org.eclipse.jetty.util.component.AbstractLifeCycle - STARTED qtp22355327{8<=1<=8/254,0}
2013-07-23 11:06:09,222 [main] DEBUG org.eclipse.jetty.util.component.AbstractLifeCycle - starting SelectChannelConnector#0.0.0.0:8080
2013-07-23 11:06:09,258 [main] DEBUG org.eclipse.jetty.util.component.AbstractLifeCycle - starting null/null
2013-07-23 11:06:09,260 [main] DEBUG org.eclipse.jetty.util.component.AbstractLifeCycle - STARTED PooledBuffers [0/1024#6144,0/1024#16384,0/1024#-]/PooledBuffers [0/1024#6144,0/1024#32768,0/1024#-]
2013-07-23 11:06:09,260 [main] DEBUG org.eclipse.jetty.util.component.AbstractLifeCycle - starting org.eclipse.jetty.server.nio.SelectChannelConnector$ConnectorSelectorManager#20c906
2013-07-23 11:06:09,279 [main] DEBUG org.eclipse.jetty.util.component.AbstractLifeCycle - STARTED org.eclipse.jetty.server.nio.SelectChannelConnector$ConnectorSelectorManager#20c906
2013-07-23 11:06:09,279 [qtp22355327-10 Selector0] DEBUG org.eclipse.jetty.io.nio - Starting Thread[qtp22355327-10 Selector0,5,main] on org.eclipse.jetty.io.nio.SelectorManager$1#10c3a08
2013-07-23 11:06:09,280 [main] INFO org.eclipse.jetty.server.AbstractConnector - Started SelectChannelConnector#0.0.0.0:8080
2013-07-23 11:06:09,280 [main] DEBUG org.eclipse.jetty.util.component.AbstractLifeCycle - STARTED SelectChannelConnector#0.0.0.0:8080
2013-07-23 11:06:09,280 [main] DEBUG org.eclipse.jetty.util.component.AbstractLifeCycle - STARTED org.eclipse.jetty.server.Server#18fef3d
2013-07-23 11:06:16,602 [qtp22355327-10 Selector0] DEBUG org.eclipse.jetty.io.nio - created SCEP#cc7439{l(/127.0.0.1:61292)<->r(/127.0.0.1:8080),d=false,open=true,ishut=false,oshut=false,rb=false,wb=false,w=true,i=0}-{AsyncHttpConnection#e2892b,g=HttpGenerator{s=0,h=-1,b=-1,c=-1},p=HttpParser{s=-14,l=0,c=0},r=0}
2013-07-23 11:06:16,604 [qtp22355327-16] DEBUG org.eclipse.jetty.http.HttpParser - filled 0/0
2013-07-23 11:06:16,604 [qtp22355327-10 Selector0] DEBUG org.eclipse.jetty.io.nio - created SCEP#1dd9891{l(/127.0.0.1:61293)<->r(/127.0.0.1:8080),d=false,open=true,ishut=false,oshut=false,rb=false,wb=false,w=true,i=0}-{AsyncHttpConnection#14b6b02,g=HttpGenerator{s=0,h=-1,b=-1,c=-1},p=HttpParser{s=-14,l=0,c=0},r=0}
2013-07-23 11:06:16,604 [qtp22355327-14] DEBUG org.eclipse.jetty.http.HttpParser - filled 0/0
2013-07-23 11:06:16,634 [qtp22355327-17] DEBUG org.eclipse.jetty.http.HttpParser - filled 328/328
2013-07-23 11:06:16,641 [qtp22355327-17 - /] DEBUG org.eclipse.jetty.server.Server - REQUEST / on AsyncHttpConnection#e2892b,g=HttpGenerator{s=0,h=-1,b=-1,c=-1},p=HttpParser{s=-5,l=14,c=0},r=1
2013-07-23 11:06:16,641 [qtp22355327-17 - /] DEBUG org.eclipse.jetty.server.handler.ContextHandler - scope null||/ # o.e.j.s.ServletContextHandler{/,null}
2013-07-23 11:06:16,641 [qtp22355327-17 - /] DEBUG org.eclipse.jetty.server.handler.ContextHandler - context=||/ # o.e.j.s.ServletContextHandler{/,null}
2013-07-23 11:06:16,641 [qtp22355327-17 - /] DEBUG org.eclipse.jetty.servlet.ServletHandler - servlet ||/ -> null
2013-07-23 11:06:16,641 [qtp22355327-17 - /] DEBUG org.eclipse.jetty.servlet.ServletHandler - chain=null
2013-07-23 11:06:16,641 [qtp22355327-17 - /] DEBUG org.eclipse.jetty.servlet.ServletHandler - Not Found /
2013-07-23 11:06:16,647 [qtp22355327-17 - /] DEBUG org.eclipse.jetty.server.Server - RESPONSE / 404
2013-07-23 11:06:16,651 [qtp22355327-17] DEBUG org.eclipse.jetty.http.HttpParser - filled 0/0
2013-07-23 11:06:16,769 [qtp22355327-11] DEBUG org.eclipse.jetty.http.HttpParser - filled 279/279
2013-07-23 11:06:16,770 [qtp22355327-11 - /favicon.ico] DEBUG org.eclipse.jetty.server.Server - REQUEST /favicon.ico on AsyncHttpConnection#e2892b,g=HttpGenerator{s=0,h=-1,b=-1,c=-1},p=HttpParser{s=-5,l=14,c=0},r=2
2013-07-23 11:06:16,770 [qtp22355327-11 - /favicon.ico] DEBUG org.eclipse.jetty.server.handler.ContextHandler - scope null||/favicon.ico # o.e.j.s.ServletContextHandler{/,null}
2013-07-23 11:06:16,771 [qtp22355327-11 - /favicon.ico] DEBUG org.eclipse.jetty.server.handler.ContextHandler - context=||/favicon.ico # o.e.j.s.ServletContextHandler{/,null}
2013-07-23 11:06:16,771 [qtp22355327-11 - /favicon.ico] DEBUG org.eclipse.jetty.servlet.ServletHandler - servlet ||/favicon.ico -> null
2013-07-23 11:06:16,771 [qtp22355327-11 - /favicon.ico] DEBUG org.eclipse.jetty.servlet.ServletHandler - chain=null
2013-07-23 11:06:16,772 [qtp22355327-11 - /favicon.ico] DEBUG org.eclipse.jetty.servlet.ServletHandler - Not Found /favicon.ico
2013-07-23 11:06:16,774 [qtp22355327-11 - /favicon.ico] DEBUG org.eclipse.jetty.server.Server - RESPONSE /favicon.ico 404
2013-07-23 11:06:16,775 [qtp22355327-11] DEBUG org.eclipse.jetty.http.HttpParser - filled 0/0
2013-07-23 11:06:26,564 [qtp22355327-15] DEBUG org.eclipse.jetty.io.nio.ChannelEndPoint - ishut SCEP#1dd9891{l(/127.0.0.1:61293)<->r(/127.0.0.1:8080),d=true,open=true,ishut=false,oshut=false,rb=false,wb=false,w=true,i=1r}-{AsyncHttpConnection#14b6b02,g=HttpGenerator{s=0,h=-1,b=-1,c=-1},p=HttpParser{s=-14,l=0,c=0},r=0}
2013-07-23 11:06:26,564 [qtp22355327-15] DEBUG org.eclipse.jetty.http.HttpParser - filled -1/0
2013-07-23 11:06:26,566 [qtp22355327-15] DEBUG org.eclipse.jetty.io.nio.ChannelEndPoint - close SCEP#1dd9891{l(/127.0.0.1:61293)<->r(/127.0.0.1:8080),d=true,open=true,ishut=true,oshut=false,rb=false,wb=false,w=true,i=1r}-{AsyncHttpConnection#14b6b02,g=HttpGenerator{s=0,h=-1,b=-1,c=-1},p=HttpParser{s=0,l=0,c=0},r=0}
2013-07-23 11:06:26,568 [qtp22355327-10 Selector0] DEBUG org.eclipse.jetty.io.nio - destroyEndPoint SCEP#1dd9891{l(/127.0.0.1:61293)<->r(/127.0.0.1:8080),d=true,open=false,ishut=true,oshut=true,rb=false,wb=false,w=true,i=1!}-{AsyncHttpConnection#14b6b02,g=HttpGenerator{s=0,h=-1,b=-1,c=-1},p=HttpParser{s=0,l=0,c=0},r=0}
2013-07-23 11:06:26,572 [qtp22355327-10 Selector0] DEBUG org.eclipse.jetty.server.AbstractHttpConnection - closed AsyncHttpConnection#14b6b02,g=HttpGenerator{s=0,h=-1,b=-1,c=-1},p=HttpParser{s=0,l=0,c=0},r=0
You need a default servlet. Try adding
context.addServlet(DefaultServlet.class, "/");
after adding your Guice Filter.
Related
HikariPool-1 - Cannot acquire connection from data source in mockito
I am performing unit tests using mockito to return a dataSource using HikariDataSource, but inform that you cannot get the connection to the network. I understand that being a mock it is not necessary to hit the correct URL 07:24:50.913 [main] DEBUG com.zaxxer.hikari.HikariConfig - Driver class oracle.jdbc.driver.OracleDriver found in Thread context class loader sun.misc.Launcher$AppClassLoader#7106e68e 07:24:50.982 [main] WARN com.zaxxer.hikari.HikariConfig - HikariPool-1 - maxLifetime is less than 30000ms, setting to default 1800000ms. 07:24:50.982 [main] WARN com.zaxxer.hikari.HikariConfig - HikariPool-1 - idleTimeout has been set but has no effect because the pool is operating as a fixed size pool. 07:24:50.982 [main] DEBUG com.zaxxer.hikari.HikariConfig - HikariPool-1 - configuration: 07:24:50.987 [main] DEBUG com.zaxxer.hikari.HikariConfig - allowPoolSuspension.............false 07:24:50.988 [main] DEBUG com.zaxxer.hikari.HikariConfig - autoCommit......................true 07:24:50.988 [main] DEBUG com.zaxxer.hikari.HikariConfig - catalog.........................none 07:24:50.988 [main] DEBUG com.zaxxer.hikari.HikariConfig - connectionInitSql...............none 07:24:50.988 [main] DEBUG com.zaxxer.hikari.HikariConfig - connectionTestQuery.............none 07:24:50.988 [main] DEBUG com.zaxxer.hikari.HikariConfig - connectionTimeout...............20000 07:24:50.988 [main] DEBUG com.zaxxer.hikari.HikariConfig - dataSource......................none 07:24:50.988 [main] DEBUG com.zaxxer.hikari.HikariConfig - dataSourceClassName.............none 07:24:50.988 [main] DEBUG com.zaxxer.hikari.HikariConfig - dataSourceJNDI..................none 07:24:50.989 [main] DEBUG com.zaxxer.hikari.HikariConfig - dataSourceProperties............{password=<masked>} 07:24:50.989 [main] DEBUG com.zaxxer.hikari.HikariConfig - driverClassName................."oracle.jdbc.driver.OracleDriver" 07:24:50.989 [main] DEBUG com.zaxxer.hikari.HikariConfig - exceptionOverrideClassName......none 07:24:50.989 [main] DEBUG com.zaxxer.hikari.HikariConfig - healthCheckProperties...........{} 07:24:50.989 [main] DEBUG com.zaxxer.hikari.HikariConfig - healthCheckRegistry.............none 07:24:50.989 [main] DEBUG com.zaxxer.hikari.HikariConfig - idleTimeout.....................10000 07:24:50.989 [main] DEBUG com.zaxxer.hikari.HikariConfig - initializationFailTimeout.......1 07:24:50.990 [main] DEBUG com.zaxxer.hikari.HikariConfig - isolateInternalQueries..........false 07:24:50.990 [main] DEBUG com.zaxxer.hikari.HikariConfig - jdbcUrl.........................jdbc:oracle:thin:#192.168.55.147:1522:swd126 07:24:50.990 [main] DEBUG com.zaxxer.hikari.HikariConfig - leakDetectionThreshold..........0 07:24:50.990 [main] DEBUG com.zaxxer.hikari.HikariConfig - maxLifetime.....................1800000 07:24:50.990 [main] DEBUG com.zaxxer.hikari.HikariConfig - maximumPoolSize.................10 07:24:50.990 [main] DEBUG com.zaxxer.hikari.HikariConfig - metricRegistry..................none 07:24:50.990 [main] DEBUG com.zaxxer.hikari.HikariConfig - metricsTrackerFactory...........none 07:24:50.990 [main] DEBUG com.zaxxer.hikari.HikariConfig - minimumIdle.....................10 07:24:50.990 [main] DEBUG com.zaxxer.hikari.HikariConfig - password........................<masked> 07:24:50.990 [main] DEBUG com.zaxxer.hikari.HikariConfig - poolName........................"HikariPool-1" 07:24:50.990 [main] DEBUG com.zaxxer.hikari.HikariConfig - readOnly........................false 07:24:50.991 [main] DEBUG com.zaxxer.hikari.HikariConfig - registerMbeans..................false 07:24:50.991 [main] DEBUG com.zaxxer.hikari.HikariConfig - scheduledExecutor...............none 07:24:50.991 [main] DEBUG com.zaxxer.hikari.HikariConfig - schema..........................none 07:24:50.991 [main] DEBUG com.zaxxer.hikari.HikariConfig - threadFactory...................internal 07:24:50.991 [main] DEBUG com.zaxxer.hikari.HikariConfig - transactionIsolation............default 07:24:50.991 [main] DEBUG com.zaxxer.hikari.HikariConfig - username........................"teste" 07:24:50.991 [main] DEBUG com.zaxxer.hikari.HikariConfig - validationTimeout...............5000 07:24:50.992 [main] INFO com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Starting... 07:24:50.998 [main] WARN com.zaxxer.hikari.util.DriverDataSource - Registered driver with driverClassName=oracle.jdbc.driver.OracleDriver was not found, trying direct instantiation. 07:24:50.999 [main] DEBUG com.zaxxer.hikari.util.DriverDataSource - Driver class oracle.jdbc.driver.OracleDriver found in Thread context class loader sun.misc.Launcher$AppClassLoader#7106e68e 07:24:54.084 [main] DEBUG com.zaxxer.hikari.pool.PoolBase - HikariPool-1 - Failed to create/setup connection: IO Error: The Network Adapter could not establish the connection 07:24:54.086 [main] DEBUG com.zaxxer.hikari.pool.HikariPool - HikariPool-1 - Cannot acquire connection from data source java.sql.SQLRecoverableException: IO Error: The Network Adapter could not establish the connection Caused by: oracle.net.ns.NetException: The Network Adapter could not establish the connection at oracle.net.nt.ConnStrategy.execute(ConnStrategy.java:445) at oracle.net.resolver.AddrResolution.resolveAndExecute(AddrResolution.java:464) at oracle.net.ns.NSProtocol.establishConnection(NSProtocol.java:594) at oracle.net.ns.NSProtocol.connect(NSProtocol.java:229) at oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:1360) at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:486) ... 78 common frames omitted #Component public class ConfigDataSource { #Autowired private Properties properties; public DataSource getDataSource(String url, String username, String password) { DataSource dataSource = null; try { HikariConfig ds = new HikariConfig(); ds.setJdbcUrl(url); ds.setUsername(username); ds.setPassword(password); ds.setDriverClassName(properties.getDriveClassName()); ds.setConnectionTimeout(properties.getConnectionTimeout()); ds.setMinimumIdle(properties.getMinimumIdle()); ds.setMaximumPoolSize(properties.getMaximumPoolSize()); ds.setIdleTimeout(properties.getIdleTimeout()); ds.setMaxLifetime(properties.getMaxLifetime()); dataSource = new HikariDataSource(ds); } catch (Exception e) { System.err.println("Error connecting to the database: " + e.getMessage()); } return dataSource; } } Mockito: #ExtendWith(MockitoExtension.class) public class ConfigDataSourceTest { #Mock private Properties properties; #InjectMocks private ConfigDataSource configDataSource; #Test public void configDataSourceTest() { String jdbcUrl = "jdbc:oracle:thin:teste:swd001"; String userName = "teste"; String password = "teste"; String divreClassName = "oracle.jdbc.driver.OracleDriver"; Integer connectionTimeout = 20000; Integer minimumIdle = 100; Integer maximumPoolSize = 10; Integer idleTimeout = 10000; Integer maxLifetime = 1000; when(properties.getDriveClassName()).thenReturn(divreClassName); when(properties.getConnectionTimeout()).thenReturn(connectionTimeout); when(properties.getMinimumIdle()).thenReturn(minimumIdle); when(properties.getMaximumPoolSize()).thenReturn(maximumPoolSize); when(properties.getIdleTimeout()).thenReturn(idleTimeout); when(properties.getMaxLifetime()).thenReturn(maxLifetime); DataSource result = configDataSource.getDataSource(jdbcUrl, userName, password); assertNotNull(result); } }
TestContainers - Can't connect to MySQLContainer Docker - Integration Test
I'm Trying to run my Integration Test using MySQLContainer in Docker, however when i run the tests, the application gets caught in a loop trying to establish a JDBC Connection, find bellow my integration Test class and the log of the Spring Boot Application. Integration Test Class package com.recargaslda.multiplatform.repositorios; import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertThat; import java.time.LocalDate; import org.junit.Rule; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.util.TestPropertyValues; import org.springframework.context.ApplicationContextInitializer; import org.springframework.context.ConfigurableApplicationContext; import org.springframework.test.context.ContextConfiguration; import org.testcontainers.containers.MySQLContainer; import com.recargaslda.multiplatform.entidades.Album; #SpringBootTest #ContextConfiguration(initializers = { AlbumRepositorioTesteIntegracao.Initializer.class }) public class AlbumRepositorioTesteIntegracao { // Even When i change the image version to 5.5 it still fails to connect #Rule private static MySQLContainer sqlContainer = new MySQLContainer<>("mysql:8.0"); static { sqlContainer.withDatabaseName("teste-integração-album-repositorio").withUsername("root").withPassword("root"); sqlContainer.start(); } static class Initializer implements ApplicationContextInitializer<ConfigurableApplicationContext> { #Override public void initialize(ConfigurableApplicationContext applicationContext) { TestPropertyValues.of("spring.datasource.url=" + sqlContainer.getJdbcUrl(), "spring.datasource.username=" + sqlContainer.getUsername(), "spring.datasource.password=" + sqlContainer.getPassword()).applyTo(applicationContext); } } #Autowired AlbumRepositorio albumRepositorio; #Test public void DevePersistirUmNovoAlbumSemImagens() { Album album = new Album("album", LocalDate.now(), "Capa"); albumRepositorio.save(album); Album albumEncontrado = albumRepositorio.findByNome("album"); assertThat(album.getNome(), is(albumEncontrado.getNome())); } } The Console Log During the loop: 13:48:00.676 [main] INFO org.springframework.test.context.support.AbstractContextLoader - Could not detect default resource locations for test class [com.recargaslda.multiplatform.repositorios.AlbumRepositorioTesteIntegracao]: no resource found for suffixes {-context.xml, Context.groovy}. 13:48:00.678 [main] DEBUG org.springframework.test.context.support.AnnotationConfigContextLoaderUtils - Ignoring class [com.recargaslda.multiplatform.repositorios.AlbumRepositorioTesteIntegracao$Initializer]; it must be static, non-private, non-final, and annotated with #Configuration to be considered a default configuration class. 13:48:00.678 [main] INFO org.springframework.test.context.support.AnnotationConfigContextLoaderUtils - Could not detect default configuration classes for test class [com.recargaslda.multiplatform.repositorios.AlbumRepositorioTesteIntegracao]: AlbumRepositorioTesteIntegracao does not declare any static, non-private, non-final, nested classes annotated with #Configuration. 13:48:00.770 [main] DEBUG org.springframework.test.context.support.ActiveProfilesUtils - Could not find an 'annotation declaring class' for annotation type [org.springframework.test.context.ActiveProfiles] and class [com.recargaslda.multiplatform.repositorios.AlbumRepositorioTesteIntegracao] 13:48:00.990 [main] DEBUG org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider - Identified candidate component class: file [C:\Users\Pete\Documents\Workspace\MultiPlatformAplicacao\target\classes\com\recargaslda\multiplatform\MultiPlatformApplication.class] 13:48:00.993 [main] INFO org.springframework.boot.test.context.SpringBootTestContextBootstrapper - Found #SpringBootConfiguration com.recargaslda.multiplatform.MultiPlatformApplication for test class com.recargaslda.multiplatform.repositorios.AlbumRepositorioTesteIntegracao 13:48:01.216 [main] DEBUG org.springframework.boot.test.context.SpringBootTestContextBootstrapper - #TestExecutionListeners is not present for class [com.recargaslda.multiplatform.repositorios.AlbumRepositorioTesteIntegracao]: using defaults. 13:48:01.217 [main] INFO org.springframework.boot.test.context.SpringBootTestContextBootstrapper - Loaded default TestExecutionListener class names from location [META-INF/spring.factories]: [org.springframework.boot.test.mock.mockito.MockitoTestExecutionListener, org.springframework.boot.test.mock.mockito.ResetMocksTestExecutionListener, org.springframework.boot.test.autoconfigure.restdocs.RestDocsTestExecutionListener, org.springframework.boot.test.autoconfigure.web.client.MockRestServiceServerResetTestExecutionListener, org.springframework.boot.test.autoconfigure.web.servlet.MockMvcPrintOnlyOnFailureTestExecutionListener, org.springframework.boot.test.autoconfigure.web.servlet.WebDriverTestExecutionListener, org.springframework.test.context.web.ServletTestExecutionListener, org.springframework.test.context.support.DirtiesContextBeforeModesTestExecutionListener, org.springframework.test.context.support.DependencyInjectionTestExecutionListener, org.springframework.test.context.support.DirtiesContextTestExecutionListener, org.springframework.test.context.transaction.TransactionalTestExecutionListener, org.springframework.test.context.jdbc.SqlScriptsTestExecutionListener, org.springframework.test.context.event.EventPublishingTestExecutionListener, org.springframework.security.test.context.support.WithSecurityContextTestExecutionListener, org.springframework.security.test.context.support.ReactorContextTestExecutionListener] 13:48:01.269 [main] INFO org.springframework.boot.test.context.SpringBootTestContextBootstrapper - Using TestExecutionListeners: [org.springframework.test.context.web.ServletTestExecutionListener#2eae8e6e, org.springframework.test.context.support.DirtiesContextBeforeModesTestExecutionListener#8f2ef19, org.springframework.boot.test.mock.mockito.MockitoTestExecutionListener#470734c3, org.springframework.boot.test.autoconfigure.SpringBootDependencyInjectionTestExecutionListener#2cf3d63b, org.springframework.test.context.support.DirtiesContextTestExecutionListener#7674f035, org.springframework.test.context.transaction.TransactionalTestExecutionListener#69e153c5, org.springframework.test.context.jdbc.SqlScriptsTestExecutionListener#173ed316, org.springframework.test.context.event.EventPublishingTestExecutionListener#25ce9dc4, org.springframework.security.test.context.support.WithSecurityContextTestExecutionListener#74ea2410, org.springframework.security.test.context.support.ReactorContextTestExecutionListener#17f62e33, org.springframework.boot.test.mock.mockito.ResetMocksTestExecutionListener#76b1e9b8, org.springframework.boot.test.autoconfigure.restdocs.RestDocsTestExecutionListener#27406a17, org.springframework.boot.test.autoconfigure.web.client.MockRestServiceServerResetTestExecutionListener#2af004b, org.springframework.boot.test.autoconfigure.web.servlet.MockMvcPrintOnlyOnFailureTestExecutionListener#248e319b, org.springframework.boot.test.autoconfigure.web.servlet.WebDriverTestExecutionListener#5d0bf09b] 13:48:01.737 [main] INFO org.testcontainers.dockerclient.DockerClientProviderStrategy - Loaded org.testcontainers.dockerclient.NpipeSocketClientProviderStrategy from ~/.testcontainers.properties, will try it first 13:48:02.995 [ducttape-0] DEBUG org.testcontainers.dockerclient.DockerClientProviderStrategy - Pinging docker daemon... 13:48:03.311 [ducttape-0] DEBUG com.github.dockerjava.core.command.AbstrDockerCmd - Cmd: org.testcontainers.dockerclient.transport.okhttp.OkHttpDockerCmdExecFactory$1#298aadd0 13:48:03.418 [main] INFO org.testcontainers.dockerclient.NpipeSocketClientProviderStrategy - Accessing docker with local Npipe socket (npipe:////./pipe/docker_engine) 13:48:03.419 [main] INFO org.testcontainers.dockerclient.DockerClientProviderStrategy - Found Docker environment with local Npipe socket (npipe:////./pipe/docker_engine) 13:48:03.419 [main] DEBUG org.testcontainers.dockerclient.DockerClientProviderStrategy - Checking Docker OS type for local Npipe socket (npipe:////./pipe/docker_engine) 13:48:03.421 [main] DEBUG com.github.dockerjava.core.command.AbstrDockerCmd - Cmd: com.github.dockerjava.core.exec.InfoCmdExec#1115ec15 13:48:03.715 [main] INFO org.testcontainers.DockerClientFactory - Docker host IP address is localhost 13:48:03.717 [main] DEBUG com.github.dockerjava.core.command.AbstrDockerCmd - Cmd: com.github.dockerjava.core.exec.InfoCmdExec#6155d082 13:48:03.738 [main] DEBUG com.github.dockerjava.core.command.AbstrDockerCmd - Cmd: com.github.dockerjava.core.exec.VersionCmdExec#7803bfd 13:48:03.770 [main] INFO org.testcontainers.DockerClientFactory - Connected to docker: Server Version: 19.03.8 API Version: 1.40 Operating System: Docker Desktop Total Memory: 1989 MB 13:48:03.770 [main] DEBUG org.testcontainers.DockerClientFactory - Ryuk is enabled 13:48:03.776 [main] DEBUG com.github.dockerjava.core.command.AbstrDockerCmd - Cmd: ListImagesCmdImpl[imageNameFilter=quay.io/testcontainers/ryuk:0.2.3,showAll=false,filters=com.github.dockerjava.core.util.FiltersBuilder#0,execution=com.github.dockerjava.core.exec.ListImagesCmdExec#4f25b795] 13:48:03.851 [main] DEBUG org.testcontainers.utility.RegistryAuthLocator - Looking up auth config for image: quay.io/testcontainers/ryuk:0.2.3 13:48:03.851 [main] DEBUG org.testcontainers.utility.RegistryAuthLocator - RegistryAuthLocator has configFile: C:\Users\Pete\.docker\config.json (exists) and commandPathPrefix: 13:48:03.860 [main] DEBUG org.testcontainers.utility.RegistryAuthLocator - registryName [quay.io] for dockerImageName [quay.io/testcontainers/ryuk:0.2.3] 13:48:03.861 [main] DEBUG org.testcontainers.utility.RegistryAuthLocator - Executing docker credential provider: docker-credential-desktop to locate auth config for: quay.io 13:48:03.878 [main] DEBUG org.testcontainers.shaded.org.zeroturnaround.exec.ProcessExecutor - Executing [docker-credential-desktop, get]. 13:48:03.885 [main] DEBUG org.testcontainers.shaded.org.zeroturnaround.exec.ProcessExecutor - Started java.lang.ProcessImpl#3212a8d7 13:48:04.044 [WaitForProcess-java.lang.ProcessImpl#3212a8d7] DEBUG org.testcontainers.shaded.org.zeroturnaround.exec.WaitForProcess - java.lang.ProcessImpl#3212a8d7 stopped with exit code 1 13:48:04.048 [main] DEBUG org.testcontainers.shaded.org.zeroturnaround.exec.ProcessExecutor - Executing [docker-credential-desktop, get]. 13:48:04.053 [main] DEBUG org.testcontainers.shaded.org.zeroturnaround.exec.ProcessExecutor - Started java.lang.ProcessImpl#71454b9d 13:48:04.188 [WaitForProcess-java.lang.ProcessImpl#71454b9d] DEBUG org.testcontainers.shaded.org.zeroturnaround.exec.WaitForProcess - java.lang.ProcessImpl#71454b9d stopped with exit code 1 13:48:04.190 [main] DEBUG org.testcontainers.utility.RegistryAuthLocator - Got credentials not found error message from docker credential helper - credentials not found in native keychain 13:48:04.192 [main] INFO org.testcontainers.utility.RegistryAuthLocator - Credential helper/store (docker-credential-desktop) does not have credentials for quay.io 13:48:04.195 [main] DEBUG org.testcontainers.utility.RegistryAuthLocator - no matching Auth Configs - falling back to defaultAuthConfig [null] 13:48:04.195 [main] DEBUG org.testcontainers.dockerclient.auth.AuthDelegatingDockerClientConfig - Effective auth config [null] 13:48:04.239 [main] DEBUG com.github.dockerjava.core.command.AbstrDockerCmd - Cmd: com.github.dockerjava.core.command.CreateContainerCmdImpl#584f54e6[name=testcontainers-ryuk-c9db393d-d0ec-4740-848a-134abfe549c5,hostName=<null>,domainName=<null>,user=<null>,attachStdin=<null>,attachStdout=<null>,attachStderr=<null>,portSpecs=<null>,tty=<null>,stdinOpen=<null>,stdInOnce=<null>,env=<null>,cmd=<null>,healthcheck=<null>,argsEscaped=<null>,entrypoint=<null>,image=quay.io/testcontainers/ryuk:0.2.3,volumes=com.github.dockerjava.api.model.Volumes#23aa363a,workingDir=<null>,macAddress=<null>,onBuild=<null>,networkDisabled=<null>,exposedPorts=com.github.dockerjava.api.model.ExposedPorts#5ef6ae06,stopSignal=<null>,stopTimeout=<null>,hostConfig=com.github.dockerjava.api.model.HostConfig#55dfebeb[binds=com.github.dockerjava.api.model.Binds#604f2bd2,blkioWeight=<null>,blkioWeightDevice=<null>,blkioDeviceReadBps=<null>,blkioDeviceWriteBps=<null>,blkioDeviceReadIOps=<null>,blkioDeviceWriteIOps=<null>,memorySwappiness=<null>,nanoCPUs=<null>,capAdd=<null>,capDrop=<null>,containerIDFile=<null>,cpuPeriod=<null>,cpuRealtimePeriod=<null>,cpuRealtimeRuntime=<null>,cpuShares=<null>,cpuQuota=<null>,cpusetCpus=<null>,cpusetMems=<null>,devices=<null>,deviceCgroupRules=<null>,diskQuota=<null>,dns=<null>,dnsOptions=<null>,dnsSearch=<null>,extraHosts=<null>,groupAdd=<null>,ipcMode=<null>,cgroup=<null>,links=<null>,logConfig=<null>,lxcConf=<null>,memory=<null>,memorySwap=<null>,memoryReservation=<null>,kernelMemory=<null>,networkMode=<null>,oomKillDisable=<null>,init=<null>,autoRemove=true,oomScoreAdj=<null>,portBindings=<null>,privileged=false,publishAllPorts=true,readonlyRootfs=<null>,restartPolicy=<null>,ulimits=<null>,cpuCount=<null>,cpuPercent=<null>,ioMaximumIOps=<null>,ioMaximumBandwidth=<null>,volumesFrom=<null>,mounts=<null>,pidMode=<null>,isolation=<null>,securityOpts=<null>,storageOpt=<null>,cgroupParent=<null>,volumeDriver=<null>,shmSize=<null>,pidsLimit=<null>,runtime=<null>,tmpFs=<null>,utSMode=<null>,usernsMode=<null>,sysctls=<null>,consoleSize=<null>],labels={org.testcontainers=true},shell=<null>,networkingConfig=<null>,ipv4Address=<null>,ipv6Address=<null>,aliases=<null>,authConfig=<null>,execution=com.github.dockerjava.core.exec.CreateContainerCmdExec#1d3ac898] 13:48:05.184 [main] DEBUG com.github.dockerjava.core.command.AbstrDockerCmd - Cmd: 63eb180f9f28ccc0ef8215d62d80d404de21b3841411a9ba29492c5dab3e42e0,com.github.dockerjava.core.exec.StartContainerCmdExec#56e8b606 13:48:06.714 [main] DEBUG com.github.dockerjava.core.command.AbstrDockerCmd - Cmd: 63eb180f9f28ccc0ef8215d62d80d404de21b3841411a9ba29492c5dab3e42e0,false,com.github.dockerjava.core.exec.InspectContainerCmdExec#366c4480 13:48:06.718 [main] DEBUG com.github.dockerjava.core.exec.InspectContainerCmdExec - GET: OkHttpWebTarget(okHttpClient=org.testcontainers.shaded.okhttp3.OkHttpClient#2c7b5824, baseUrl=http://docker.socket/, path=[/containers/63eb180f9f28ccc0ef8215d62d80d404de21b3841411a9ba29492c5dab3e42e0/json], queryParams={}) 13:48:06.892 [testcontainers-ryuk] DEBUG org.testcontainers.utility.ResourceReaper - Sending 'label=org.testcontainers%3Dtrue&label=org.testcontainers.sessionId%3Dc9db393d-d0ec-4740-848a-134abfe549c5' to Ryuk 13:48:06.895 [testcontainers-ryuk] DEBUG org.testcontainers.utility.ResourceReaper - Received 'ACK' from Ryuk 13:48:06.895 [main] INFO org.testcontainers.DockerClientFactory - Ryuk started - will monitor and terminate Testcontainers containers on JVM exit 13:48:06.895 [main] DEBUG org.testcontainers.DockerClientFactory - Checks are enabled 13:48:06.895 [main] INFO org.testcontainers.DockerClientFactory - Checking the system... 13:48:06.896 [main] INFO org.testcontainers.DockerClientFactory - ✔︎ Docker server version should be at least 1.6.0 13:48:06.899 [main] DEBUG com.github.dockerjava.core.command.AbstrDockerCmd - Cmd: 63eb180f9f28ccc0ef8215d62d80d404de21b3841411a9ba29492c5dab3e42e0,<null>,true,<null>,<null>,<null>,<null>,{df,-P},<null>,<null>,com.github.dockerjava.core.exec.ExecCreateCmdExec#2a79d4b1 13:48:07.015 [tc-okhttp-stream-1130346421] DEBUG com.github.dockerjava.core.command.ExecStartResultCallback - STDOUT: Filesystem 1024-blocks Used Available Capacity Mounted on overlay 61255652 3271272 54843048 6% / tmpfs 65536 0 65536 0% /dev tmpfs 1018508 0 1018508 0% /sys/fs/cgroup shm 65536 0 65536 0% /dev/shm /dev/sda1 61255652 3271272 54843048 6% /etc/resolv.conf /dev/sda1 61255652 3271272 54843048 6% /etc/hostname /dev/sda1 61255652 3271272 54843048 6% /etc/hosts overlay 1018508 400 1018108 0% /run/docker.sock tmpfs 1018508 0 1018508 0% /proc/acpi tmpfs 65536 0 65536 0% /proc/kcore tmpfs 65536 0 65536 0% /proc/keys tmpfs 65536 0 65536 0% /proc/timer_list tmpfs 65536 0 65536 0% /proc/sched_debug tmpfs 1018508 0 1018508 0% /sys/firmware 13:48:07.045 [main] INFO org.testcontainers.DockerClientFactory - ✔︎ Docker environment should have more than 2GB free disk space 13:48:07.046 [main] DEBUG com.github.dockerjava.core.command.AbstrDockerCmd - Cmd: ListImagesCmdImpl[imageNameFilter=<null>,showAll=false,filters=com.github.dockerjava.core.util.FiltersBuilder#0,execution=com.github.dockerjava.core.exec.ListImagesCmdExec#56c698e3] 13:48:07.091 [main] DEBUG org.testcontainers.images.AbstractImagePullPolicy - Using locally available and not pulling image: mysql:8.0 13:48:07.091 [main] DEBUG 🐳 [mysql:8.0] - Starting container: mysql:8.0 13:48:07.092 [main] DEBUG 🐳 [mysql:8.0] - Trying to start container: mysql:8.0 13:48:07.092 [main] DEBUG 🐳 [mysql:8.0] - Trying to start container: mysql:8.0 (attempt 1/3) 13:48:07.092 [main] DEBUG 🐳 [mysql:8.0] - Starting container: mysql:8.0 13:48:07.092 [main] INFO 🐳 [mysql:8.0] - Creating container for image: mysql:8.0 13:48:07.093 [main] DEBUG org.testcontainers.utility.RegistryAuthLocator - Looking up auth config for image: mysql:8.0 13:48:07.093 [main] DEBUG org.testcontainers.utility.RegistryAuthLocator - RegistryAuthLocator has configFile: C:\Users\Pete\.docker\config.json (exists) and commandPathPrefix: 13:48:07.093 [main] DEBUG org.testcontainers.utility.RegistryAuthLocator - registryName [index.docker.io] for dockerImageName [mysql:8.0] 13:48:07.093 [main] DEBUG org.testcontainers.utility.RegistryAuthLocator - Executing docker credential provider: docker-credential-desktop to locate auth config for: index.docker.io 13:48:07.093 [main] DEBUG org.testcontainers.shaded.org.zeroturnaround.exec.ProcessExecutor - Executing [docker-credential-desktop, get]. 13:48:07.097 [main] DEBUG org.testcontainers.shaded.org.zeroturnaround.exec.ProcessExecutor - Started java.lang.ProcessImpl#5c8504fd 13:48:07.224 [WaitForProcess-java.lang.ProcessImpl#5c8504fd] DEBUG org.testcontainers.shaded.org.zeroturnaround.exec.WaitForProcess - java.lang.ProcessImpl#5c8504fd stopped with exit code 0 13:48:07.225 [main] DEBUG org.testcontainers.utility.RegistryAuthLocator - Credential helper/store provided auth config for: index.docker.io 13:48:07.232 [main] DEBUG org.testcontainers.utility.RegistryAuthLocator - found creds store auth config [AuthConfig{username=petechiboleca, password=hidden non-blank value, auth=blank, email=null, registryAddress=index.docker.io, registryToken=blank}] 13:48:07.232 [main] DEBUG org.testcontainers.dockerclient.auth.AuthDelegatingDockerClientConfig - Effective auth config [AuthConfig{username=petechiboleca, password=hidden non-blank value, auth=blank, email=null, registryAddress=index.docker.io, registryToken=blank}] 13:48:07.243 [main] DEBUG com.github.dockerjava.core.command.AbstrDockerCmd - Cmd: com.github.dockerjava.core.command.CreateContainerCmdImpl#5c153b9e[name=<null>,hostName=<null>,domainName=<null>,user=<null>,attachStdin=<null>,attachStdout=<null>,attachStderr=<null>,portSpecs=<null>,tty=<null>,stdinOpen=<null>,stdInOnce=<null>,env={MYSQL_DATABASE=teste-integração-album-repositorio,MYSQL_PASSWORD=root,MYSQL_USER=root,MYSQL_ROOT_PASSWORD=root},cmd={},healthcheck=<null>,argsEscaped=<null>,entrypoint=<null>,image=mysql:8.0,volumes=com.github.dockerjava.api.model.Volumes#2a7686a7,workingDir=<null>,macAddress=<null>,onBuild=<null>,networkDisabled=<null>,exposedPorts=com.github.dockerjava.api.model.ExposedPorts#758a34ce,stopSignal=<null>,stopTimeout=<null>,hostConfig=com.github.dockerjava.api.model.HostConfig#7ec3394b[binds=com.github.dockerjava.api.model.Binds#bff34c6,blkioWeight=<null>,blkioWeightDevice=<null>,blkioDeviceReadBps=<null>,blkioDeviceWriteBps=<null>,blkioDeviceReadIOps=<null>,blkioDeviceWriteIOps=<null>,memorySwappiness=<null>,nanoCPUs=<null>,capAdd=<null>,capDrop=<null>,containerIDFile=<null>,cpuPeriod=<null>,cpuRealtimePeriod=<null>,cpuRealtimeRuntime=<null>,cpuShares=<null>,cpuQuota=<null>,cpusetCpus=<null>,cpusetMems=<null>,devices=<null>,deviceCgroupRules=<null>,diskQuota=<null>,dns=<null>,dnsOptions=<null>,dnsSearch=<null>,extraHosts={},groupAdd=<null>,ipcMode=<null>,cgroup=<null>,links=com.github.dockerjava.api.model.Links#1522d8a0,logConfig=<null>,lxcConf=<null>,memory=<null>,memorySwap=<null>,memoryReservation=<null>,kernelMemory=<null>,networkMode=<null>,oomKillDisable=<null>,init=<null>,autoRemove=<null>,oomScoreAdj=<null>,portBindings={},privileged=<null>,publishAllPorts=true,readonlyRootfs=<null>,restartPolicy=<null>,ulimits=<null>,cpuCount=<null>,cpuPercent=<null>,ioMaximumIOps=<null>,ioMaximumBandwidth=<null>,volumesFrom={},mounts=<null>,pidMode=<null>,isolation=<null>,securityOpts=<null>,storageOpt=<null>,cgroupParent=<null>,volumeDriver=<null>,shmSize=<null>,pidsLimit=<null>,runtime=<null>,tmpFs=<null>,utSMode=<null>,usernsMode=<null>,sysctls=<null>,consoleSize=<null>],labels={org.testcontainers=true, org.testcontainers.sessionId=c9db393d-d0ec-4740-848a-134abfe549c5},shell=<null>,networkingConfig=<null>,ipv4Address=<null>,ipv6Address=<null>,aliases=<null>,authConfig=AuthConfig[username=petechiboleca,password=tWindrifter12345,email=<null>,registryAddress=index.docker.io,auth=<null>,registrytoken=<null>,identitytoken=<null>,stackOrchestrator=<null>],execution=com.github.dockerjava.core.exec.CreateContainerCmdExec#5644dc81] 13:48:08.194 [main] DEBUG org.testcontainers.utility.MountableFile - Copying classpath resource(s) from jar:file:/C:/Users/Pete/.m2/repository/org/testcontainers/mysql/1.13.0/mysql-1.13.0.jar!/mysql-default-conf to C:\Users\Pete\AppData\Local\Temp\.testcontainers-tmp-5095191207689237918 to permit Docker to bind 13:48:08.194 [main] DEBUG org.testcontainers.utility.MountableFile - Copying resource mysql-default-conf from JAR file C:\Users\Pete\.m2\repository\org\testcontainers\mysql\1.13.0\mysql-1.13.0.jar 13:48:08.194 [main] DEBUG org.testcontainers.utility.MountableFile - Copying classpath resource(s) from jar:file:/C:/Users/Pete/.m2/repository/org/testcontainers/mysql/1.13.0/mysql-1.13.0.jar!/mysql-default-conf to C:\Users\Pete\AppData\Local\Temp\.testcontainers-tmp-5095191207689237918 to permit Docker to bind 13:48:08.195 [main] DEBUG org.testcontainers.utility.MountableFile - Copying resource mysql-default-conf from JAR file C:\Users\Pete\.m2\repository\org\testcontainers\mysql\1.13.0\mysql-1.13.0.jar 13:48:08.202 [main] DEBUG com.github.dockerjava.core.command.AbstrDockerCmd - Cmd: ce913f5a3ea48d499b6882d31da0c9c37bb004b8036e321f6420ef5d2bd5b73d,false,com.github.dockerjava.core.exec.InspectContainerCmdExec#57fd91c9 13:48:08.203 [main] DEBUG com.github.dockerjava.core.exec.InspectContainerCmdExec - GET: OkHttpWebTarget(okHttpClient=org.testcontainers.shaded.okhttp3.OkHttpClient#2c7b5824, baseUrl=http://docker.socket/, path=[/containers/ce913f5a3ea48d499b6882d31da0c9c37bb004b8036e321f6420ef5d2bd5b73d/json], queryParams={}) 13:48:08.234 [main] DEBUG com.github.dockerjava.core.command.AbstrDockerCmd - Cmd: com.github.dockerjava.core.command.CopyArchiveToContainerCmdImpl#25e2a451[cp ,<null>, ,ce913f5a3ea48d499b6882d31da0c9c37bb004b8036e321f6420ef5d2bd5b73d,:,/] 13:48:08.379 [main] INFO 🐳 [mysql:8.0] - Starting container with ID: ce913f5a3ea48d499b6882d31da0c9c37bb004b8036e321f6420ef5d2bd5b73d 13:48:08.379 [main] DEBUG com.github.dockerjava.core.command.AbstrDockerCmd - Cmd: ce913f5a3ea48d499b6882d31da0c9c37bb004b8036e321f6420ef5d2bd5b73d,com.github.dockerjava.core.exec.StartContainerCmdExec#63b1d4fa 13:48:09.716 [main] INFO 🐳 [mysql:8.0] - Container mysql:8.0 is starting: ce913f5a3ea48d499b6882d31da0c9c37bb004b8036e321f6420ef5d2bd5b73d 13:48:09.718 [main] DEBUG com.github.dockerjava.core.command.AbstrDockerCmd - Cmd: ce913f5a3ea48d499b6882d31da0c9c37bb004b8036e321f6420ef5d2bd5b73d,false,com.github.dockerjava.core.exec.InspectContainerCmdExec#75459c75 13:48:09.718 [main] DEBUG com.github.dockerjava.core.exec.InspectContainerCmdExec - GET: OkHttpWebTarget(okHttpClient=org.testcontainers.shaded.okhttp3.OkHttpClient#2c7b5824, baseUrl=http://docker.socket/, path=[/containers/ce913f5a3ea48d499b6882d31da0c9c37bb004b8036e321f6420ef5d2bd5b73d/json], queryParams={}) 13:48:09.735 [ducttape-0] DEBUG com.github.dockerjava.core.command.AbstrDockerCmd - Cmd: ce913f5a3ea48d499b6882d31da0c9c37bb004b8036e321f6420ef5d2bd5b73d,false,com.github.dockerjava.core.exec.InspectContainerCmdExec#410298f0 13:48:09.737 [ducttape-0] DEBUG com.github.dockerjava.core.exec.InspectContainerCmdExec - GET: OkHttpWebTarget(okHttpClient=org.testcontainers.shaded.okhttp3.OkHttpClient#2c7b5824, baseUrl=http://docker.socket/, path=[/containers/ce913f5a3ea48d499b6882d31da0c9c37bb004b8036e321f6420ef5d2bd5b73d/json], queryParams={}) 13:48:09.753 [main] INFO 🐳 [mysql:8.0] - Waiting for database connection to become available at jdbc:mysql://localhost:32851/teste-integração-album-repositorio using query 'SELECT 1' 13:48:09.753 [main] DEBUG com.github.dockerjava.core.command.AbstrDockerCmd - Cmd: ce913f5a3ea48d499b6882d31da0c9c37bb004b8036e321f6420ef5d2bd5b73d,false,com.github.dockerjava.core.exec.InspectContainerCmdExec#2a3c96e3 13:48:09.753 [main] DEBUG com.github.dockerjava.core.exec.InspectContainerCmdExec - GET: OkHttpWebTarget(okHttpClient=org.testcontainers.shaded.okhttp3.OkHttpClient#2c7b5824, baseUrl=http://docker.socket/, path=[/containers/ce913f5a3ea48d499b6882d31da0c9c37bb004b8036e321f6420ef5d2bd5b73d/json], queryParams={}) 13:48:09.792 [main] DEBUG com.github.dockerjava.core.command.AbstrDockerCmd - Cmd: ce913f5a3ea48d499b6882d31da0c9c37bb004b8036e321f6420ef5d2bd5b73d,false,com.github.dockerjava.core.exec.InspectContainerCmdExec#a8e6492 13:48:09.792 [main] DEBUG com.github.dockerjava.core.exec.InspectContainerCmdExec - GET: OkHttpWebTarget(okHttpClient=org.testcontainers.shaded.okhttp3.OkHttpClient#2c7b5824, baseUrl=http://docker.socket/, path=[/containers/ce913f5a3ea48d499b6882d31da0c9c37bb004b8036e321f6420ef5d2bd5b73d/json], queryParams={}) 13:48:09.799 [main] DEBUG 🐳 [mysql:8.0] - Trying to create JDBC connection using com.mysql.cj.jdbc.Driver to jdbc:mysql://localhost:32851/teste-integração-album-repositorio?useSSL=false&allowPublicKeyRetrieval=true with properties: {user=root, password=root} 13:48:10.233 [main] DEBUG com.github.dockerjava.core.command.AbstrDockerCmd - Cmd: ce913f5a3ea48d499b6882d31da0c9c37bb004b8036e321f6420ef5d2bd5b73d,false,com.github.dockerjava.core.exec.InspectContainerCmdExec#1e5f4170 13:48:10.233 [main] DEBUG com.github.dockerjava.core.exec.InspectContainerCmdExec - GET: OkHttpWebTarget(okHttpClient=org.testcontainers.shaded.okhttp3.OkHttpClient#2c7b5824, baseUrl=http://docker.socket/, path=[/containers/ce913f5a3ea48d499b6882d31da0c9c37bb004b8036e321f6420ef5d2bd5b73d/json], queryParams={}) 13:48:10.240 [main] DEBUG 🐳 [mysql:8.0] - Trying to create JDBC connection using com.mysql.cj.jdbc.Driver to jdbc:mysql://localhost:32851/teste-integração-album-repositorio?useSSL=false&allowPublicKeyRetrieval=true with properties: {user=root, password=root} 13:48:09.799 [main] DEBUG 🐳 [mysql:8.0] - Trying to create JDBC connection using com.mysql.cj.jdbc.Driver to jdbc:mysql://localhost:32851/teste-integração-album-repositorio?useSSL=false&allowPublicKeyRetrieval=true with properties: {user=root, password=root} 13:48:10.233 [main] DEBUG com.github.dockerjava.core.command.AbstrDockerCmd - Cmd: ce913f5a3ea48d499b6882d31da0c9c37bb004b8036e321f6420ef5d2bd5b73d,false,com.github.dockerjava.core.exec.InspectContainerCmdExec#1e5f4170 13:48:10.233 [main] DEBUG com.github.dockerjava.core.exec.InspectContainerCmdExec - GET: OkHttpWebTarget(okHttpClient=org.testcontainers.shaded.okhttp3.OkHttpClient#2c7b5824, baseUrl=http://docker.socket/, path=[/containers/ce913f5a3ea48d499b6882d31da0c9c37bb004b8036e321f6420ef5d2bd5b73d/json], queryParams={}) 13:48:10.240 [main] DEBUG 🐳 [mysql:8.0] - Trying to create JDBC connection using com.mysql.cj.jdbc.Driver to jdbc:mysql://localhost:32851/teste-integração-album-repositorio?useSSL=false&allowPublicKeyRetrieval=true with properties: {user=root, password=root} MySQL Container Docker Dependency and MySQL Connector 8.0 Dependency (Spring Boot is managing my connector) <groupId>org.testcontainers</groupId> <artifactId>mysql</artifactId> version>1.13.0</version> <scope>test</scope> </dependency> <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <scope>runtime</scope> </dependency> Note: When i use PostgreSQLContainer, The test passes succesfully Note 2: When the loop breaks it Says *Communications link failure
You cannot create a user called "root" in mysql, since it already exists. Remove this part, and see if it helps: .withUsername("root")
Cannot deploy JAX-RS application in TomEE from IntelliJ
I cannot deploy JAX-RS application to TomEE from IntelliJ. Actually, web application is deployed and works as expected, but IntelliJ reports: Artifact is not deployed. Press 'Deploy' to start deployment which makes redeploy impossible. There are no errors on console: Connected to server [2018-05-22 10:57:19,570] Artifact adjunkto-web:war exploded: Artifact is being deployed, please wait... 22-May-2018 10:57:19.726 INFO [http-nio-8080-exec-4] org.apache.tomee.catalina.TomcatWebAppBuilder.deployWebApps using default host: localhost 22-May-2018 10:57:19.727 INFO [http-nio-8080-exec-4] org.apache.tomee.catalina.TomcatWebAppBuilder.init ------------------------- localhost -> / 22-May-2018 10:57:20.317 INFO [http-nio-8080-exec-4] org.apache.openejb.config.ConfigurationFactory.configureApplication Configuring enterprise application: C:\software\apache-tomee-webprofile-7.0.4-adjunkto\temp\0-ROOT 22-May-2018 10:57:20.499 INFO [http-nio-8080-exec-4] org.apache.openejb.config.ConfigurationFactory.configureService Configuring Service(id=Default Managed Container, type=Container, provider-id=Default Managed Container) 22-May-2018 10:57:20.500 INFO [http-nio-8080-exec-4] org.apache.openejb.config.AutoConfig.createContainer Auto-creating a container for bean .Comp2064284523: Container(type=MANAGED, id=Default Managed Container) 22-May-2018 10:57:20.502 INFO [http-nio-8080-exec-4] org.apache.openejb.assembler.classic.Assembler.createRecipe Creating Container(id=Default Managed Container) 22-May-2018 10:57:20.520 INFO [http-nio-8080-exec-4] org.apache.openejb.core.managed.SimplePassivater.init Using directory C:\software\apache-tomee-webprofile-7.0.4-adjunkto\temp for stateful session passivation 22-May-2018 10:57:20.569 INFO [http-nio-8080-exec-4] org.apache.openejb.config.AppInfoBuilder.build Enterprise application "C:\software\apache-tomee-webprofile-7.0.4-adjunkto\temp\0-ROOT" loaded. 22-May-2018 10:57:20.569 INFO [http-nio-8080-exec-4] org.apache.openejb.assembler.classic.Assembler.createApplication Assembling app: C:\software\apache-tomee-webprofile-7.0.4-adjunkto\temp\0-ROOT 22-May-2018 10:57:20.627 INFO [http-nio-8080-exec-4] org.apache.openejb.cdi.CdiBuilder.initSingleton Existing thread singleton service in SystemInstance(): org.apache.openejb.cdi.ThreadSingletonServiceImpl#7776ab 22-May-2018 10:57:20.804 INFO [http-nio-8080-exec-4] org.apache.openejb.cdi.OpenEJBLifecycle.startApplication OpenWebBeans Container is starting... 22-May-2018 10:57:20.815 INFO [http-nio-8080-exec-4] org.apache.webbeans.plugins.PluginLoader.startUp Adding OpenWebBeansPlugin : [CdiPlugin] 22-May-2018 10:57:20.828 INFO [http-nio-8080-exec-4] org.apache.openejb.cdi.CdiScanner.handleBda Using annotated mode for jar:file:/C:/software/apache-tomee-webprofile-7.0.4-adjunkto/temp/0-ROOT/WEB-INF/lib/adjunkto-domain-1.0-SNAPSHOT.jar!/META-INF/beans.xml looking all classes to find CDI beans, maybe think to add a beans.xml if not there or add the jar to exclusions.list 22-May-2018 10:57:21.329 INFO [http-nio-8080-exec-4] org.apache.webbeans.config.BeansDeployer.validateInjectionPoints All injection points were validated successfully. 22-May-2018 10:57:21.333 INFO [http-nio-8080-exec-4] org.apache.openejb.cdi.OpenEJBLifecycle.startApplication OpenWebBeans Container has started, it took 528 ms. 22-May-2018 10:57:21.340 INFO [http-nio-8080-exec-4] org.apache.openejb.assembler.classic.Assembler.createApplication Deployed Application(path=C:\software\apache-tomee-webprofile-7.0.4-adjunkto\temp\0-ROOT) 22-May-2018 10:57:21.492 INFO [http-nio-8080-exec-4] sun.reflect.DelegatingMethodAccessorImpl.invoke At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time. 22-May-2018 10:57:21.848 INFO [http-nio-8080-exec-4] org.apache.openejb.server.cxf.rs.CxfRsHttpListener.deployApplication Using readers: 22-May-2018 10:57:21.849 INFO [http-nio-8080-exec-4] org.apache.openejb.server.cxf.rs.CxfRsHttpListener.deployApplication org.apache.cxf.jaxrs.provider.PrimitiveTextProvider#71670710 22-May-2018 10:57:21.849 INFO [http-nio-8080-exec-4] org.apache.openejb.server.cxf.rs.CxfRsHttpListener.deployApplication org.apache.cxf.jaxrs.provider.FormEncodingProvider#143be198 22-May-2018 10:57:21.849 INFO [http-nio-8080-exec-4] org.apache.openejb.server.cxf.rs.CxfRsHttpListener.deployApplication org.apache.cxf.jaxrs.provider.MultipartProvider#657973c7 22-May-2018 10:57:21.849 INFO [http-nio-8080-exec-4] org.apache.openejb.server.cxf.rs.CxfRsHttpListener.deployApplication org.apache.cxf.jaxrs.provider.SourceProvider#46e83b9c 22-May-2018 10:57:21.850 INFO [http-nio-8080-exec-4] org.apache.openejb.server.cxf.rs.CxfRsHttpListener.deployApplication org.apache.cxf.jaxrs.provider.JAXBElementTypedProvider#c685959 22-May-2018 10:57:21.850 INFO [http-nio-8080-exec-4] org.apache.openejb.server.cxf.rs.CxfRsHttpListener.deployApplication org.apache.cxf.jaxrs.provider.JAXBElementProvider#47145e6d 22-May-2018 10:57:21.850 INFO [http-nio-8080-exec-4] org.apache.openejb.server.cxf.rs.CxfRsHttpListener.deployApplication org.apache.openejb.server.cxf.rs.johnzon.TomEEJohnzonProvider#457c1eac 22-May-2018 10:57:21.850 INFO [http-nio-8080-exec-4] org.apache.openejb.server.cxf.rs.CxfRsHttpListener.deployApplication org.apache.openejb.server.cxf.rs.johnzon.TomEEJsonpProvider#66a30e49 22-May-2018 10:57:21.851 INFO [http-nio-8080-exec-4] org.apache.openejb.server.cxf.rs.CxfRsHttpListener.deployApplication org.apache.cxf.jaxrs.provider.StringTextProvider#74a4930b 22-May-2018 10:57:21.851 INFO [http-nio-8080-exec-4] org.apache.openejb.server.cxf.rs.CxfRsHttpListener.deployApplication org.apache.cxf.jaxrs.provider.BinaryDataProvider#3db25508 22-May-2018 10:57:21.851 INFO [http-nio-8080-exec-4] org.apache.openejb.server.cxf.rs.CxfRsHttpListener.deployApplication org.apache.cxf.jaxrs.provider.DataSourceProvider#181eb56c 22-May-2018 10:57:21.851 INFO [http-nio-8080-exec-4] org.apache.openejb.server.cxf.rs.CxfRsHttpListener.deployApplication Using writers: 22-May-2018 10:57:21.851 INFO [http-nio-8080-exec-4] org.apache.openejb.server.cxf.rs.CxfRsHttpListener.deployApplication org.apache.johnzon.jaxrs.WadlDocumentMessageBodyWriter#66313160 22-May-2018 10:57:21.852 INFO [http-nio-8080-exec-4] org.apache.openejb.server.cxf.rs.CxfRsHttpListener.deployApplication org.apache.cxf.jaxrs.provider.StringTextProvider#74a4930b 22-May-2018 10:57:21.852 INFO [http-nio-8080-exec-4] org.apache.openejb.server.cxf.rs.CxfRsHttpListener.deployApplication org.apache.cxf.jaxrs.provider.JAXBElementTypedProvider#c685959 22-May-2018 10:57:21.852 INFO [http-nio-8080-exec-4] org.apache.openejb.server.cxf.rs.CxfRsHttpListener.deployApplication org.apache.cxf.jaxrs.provider.PrimitiveTextProvider#71670710 22-May-2018 10:57:21.853 INFO [http-nio-8080-exec-4] org.apache.openejb.server.cxf.rs.CxfRsHttpListener.deployApplication org.apache.cxf.jaxrs.provider.FormEncodingProvider#143be198 22-May-2018 10:57:21.853 INFO [http-nio-8080-exec-4] org.apache.openejb.server.cxf.rs.CxfRsHttpListener.deployApplication org.apache.cxf.jaxrs.provider.MultipartProvider#657973c7 22-May-2018 10:57:21.853 INFO [http-nio-8080-exec-4] org.apache.openejb.server.cxf.rs.CxfRsHttpListener.deployApplication org.apache.cxf.jaxrs.provider.SourceProvider#46e83b9c 22-May-2018 10:57:21.853 INFO [http-nio-8080-exec-4] org.apache.openejb.server.cxf.rs.CxfRsHttpListener.deployApplication org.apache.cxf.jaxrs.provider.JAXBElementProvider#47145e6d 22-May-2018 10:57:21.853 INFO [http-nio-8080-exec-4] org.apache.openejb.server.cxf.rs.CxfRsHttpListener.deployApplication org.apache.openejb.server.cxf.rs.johnzon.TomEEJohnzonProvider#457c1eac 22-May-2018 10:57:21.854 INFO [http-nio-8080-exec-4] org.apache.openejb.server.cxf.rs.CxfRsHttpListener.deployApplication org.apache.openejb.server.cxf.rs.johnzon.TomEEJsonpProvider#66a30e49 22-May-2018 10:57:21.854 INFO [http-nio-8080-exec-4] org.apache.openejb.server.cxf.rs.CxfRsHttpListener.deployApplication org.apache.cxf.jaxrs.provider.BinaryDataProvider#3db25508 22-May-2018 10:57:21.854 INFO [http-nio-8080-exec-4] org.apache.openejb.server.cxf.rs.CxfRsHttpListener.deployApplication org.apache.cxf.jaxrs.provider.DataSourceProvider#181eb56c 22-May-2018 10:57:21.854 INFO [http-nio-8080-exec-4] org.apache.openejb.server.cxf.rs.CxfRsHttpListener.deployApplication Using exception mappers: 22-May-2018 10:57:21.854 INFO [http-nio-8080-exec-4] org.apache.openejb.server.cxf.rs.CxfRsHttpListener.deployApplication org.apache.cxf.jaxrs.impl.WebApplicationExceptionMapper#487a3473 22-May-2018 10:57:21.855 INFO [http-nio-8080-exec-4] org.apache.openejb.server.cxf.rs.CxfRsHttpListener.deployApplication org.apache.openejb.server.cxf.rs.EJBExceptionMapper#5093e1dd 22-May-2018 10:57:21.855 INFO [http-nio-8080-exec-4] org.apache.openejb.server.cxf.rs.CxfRsHttpListener.deployApplication org.apache.cxf.jaxrs.validation.ValidationExceptionMapper#6618867 22-May-2018 10:57:21.857 INFO [http-nio-8080-exec-4] org.apache.openejb.server.cxf.rs.CxfRsHttpListener.logEndpoints REST Application: http://localhost:8080/ -> cz.valvera.adjunkto.web.AdjunktoApplication#70a52015 22-May-2018 10:57:21.860 INFO [http-nio-8080-exec-4] org.apache.openejb.server.cxf.rs.CxfRsHttpListener.logEndpoints Service URI: http://localhost:8080/ -> Pojo cz.valvera.adjunkto.web.RootResource 22-May-2018 10:57:21.860 INFO [http-nio-8080-exec-4] org.apache.openejb.server.cxf.rs.CxfRsHttpListener.logEndpoints GET http://localhost:8080/ -> String index() 22-May-2018 10:57:21.860 INFO [http-nio-8080-exec-4] org.apache.openejb.server.cxf.rs.CxfRsHttpListener.logEndpoints POST http://localhost:8080/ -> String post(JsonObject) [2018-05-22 10:57:21,936] Artifact adjunkto-web:war exploded: Artifact is not deployed. Press 'Deploy' to start deployment 22-May-2018 10:57:28.566 INFO [localhost-startStop-1] sun.reflect.DelegatingMethodAccessorImpl.invoke Deploying web application directory [C:\software\apache-tomee-webprofile-7.0.4-adjunkto\webapps\manager] 22-May-2018 10:57:28.571 INFO [localhost-startStop-1] org.apache.tomee.catalina.TomcatWebAppBuilder.init ------------------------- localhost -> /manager 22-May-2018 10:57:28.654 INFO [localhost-startStop-1] org.apache.openejb.config.ConfigurationFactory.configureApplication Configuring enterprise application: C:\software\apache-tomee-webprofile-7.0.4-adjunkto\webapps\manager 22-May-2018 10:57:28.658 INFO [localhost-startStop-1] org.apache.openejb.config.AppInfoBuilder.build Enterprise application "C:\software\apache-tomee-webprofile-7.0.4-adjunkto\webapps\manager" loaded. 22-May-2018 10:57:28.658 INFO [localhost-startStop-1] org.apache.openejb.assembler.classic.Assembler.createApplication Assembling app: C:\software\apache-tomee-webprofile-7.0.4-adjunkto\webapps\manager 22-May-2018 10:57:28.664 INFO [localhost-startStop-1] org.apache.tomee.catalina.TomcatWebAppBuilder.deployWebApps using context file C:\software\apache-tomee-webprofile-7.0.4-adjunkto\webapps\manager\META-INF\context.xml 22-May-2018 10:57:28.664 INFO [localhost-startStop-1] org.apache.openejb.assembler.classic.Assembler.createApplication Deployed Application(path=C:\software\apache-tomee-webprofile-7.0.4-adjunkto\webapps\manager) 22-May-2018 10:57:28.688 INFO [localhost-startStop-1] sun.reflect.DelegatingMethodAccessorImpl.invoke At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time. 22-May-2018 10:57:28.708 INFO [localhost-startStop-1] sun.reflect.DelegatingMethodAccessorImpl.invoke Deployment of web application directory [C:\software\apache-tomee-webprofile-7.0.4-adjunkto\webapps\manager] has finished in [142] ms I found these messages in IDE logs: 2018-05-22 17:16:07,549 [ 428383] INFO - ij.compiler.impl.CompileDriver - COMPILATION STARTED (BUILD PROCESS) 2018-05-22 17:16:07,550 [ 428384] INFO - j.compiler.server.BuildManager - Using preloaded build process to compile C:\vyvoj\adjunkto 2018-05-22 17:16:07,719 [ 428553] INFO - lij.compiler.impl.CompilerUtil - COMPILATION FINISHED (BUILD PROCESS); Errors: 0; warnings: 0 took 174 ms: 0 min 0sec 2018-05-22 17:16:07,720 [ 428554] INFO - CompilerBackwardReferenceIndex - backward reference index version differ due to: class java.io.FileNotFoundException 2018-05-22 17:16:07,720 [ 428554] INFO - s.CompilerReferenceServiceImpl - backward reference index reader doesn't exist 2018-05-22 17:16:07,916 [ 428750] INFO - j.compiler.server.BuildManager - BUILDER_PROCESS [stdout]: Build process started. Classpath: C:/Program Files/JetBrains/IntelliJ IDEA 2018.1.4/lib/jps-launcher.jar;C:/Program Files/Java/jdk1.8.0_162/lib/tools.jar;C:/Program Files/JetBrains/IntelliJ IDEA 2018.1.4/lib/optimizedFileManager.jar 2018-05-22 17:16:07,937 [ 428771] INFO - j.compiler.server.BuildManager - BUILDER_PROCESS [stderr]: SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". 2018-05-22 17:16:07,937 [ 428771] INFO - j.compiler.server.BuildManager - BUILDER_PROCESS [stderr]: SLF4J: Defaulting to no-operation (NOP) logger implementation 2018-05-22 17:16:07,937 [ 428771] INFO - j.compiler.server.BuildManager - BUILDER_PROCESS [stderr]: SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details. I deleted ~/.IntelliJIdea2018.1 directory and reinstalled IntelliJ, but it didn't change anything. Maybe these messages are not even related to my problem. Using /manager application, I see that there are three applications deployed: / /manager /tomee In IntelliJ, I have "Application context" set to "/". I tried changing "Application context" and it changed context path in deployed application, but original problem remained. I'm using IntelliJ 2018.1.4 and TomEE 7.0.4. What can be wrong?
Error Handler java.lang.ClassNotFoundException
I have an error to start tomcat-7.0.64 on my VM Red-Hat 6.5 64bit Using CATALINA_BASE: /opt/OSSM/3pps/tomcat Using CATALINA_HOME: /opt/OSSM/3pps/tomcat Using CATALINA_TMPDIR: /opt/OSSM/3pps/tomcat/temp Using JRE_HOME:/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.91-2.6.2.3.el7.x86_64/jre Using CLASSPATH:/opt/OSSM/3pps/tomcat/bin/jdk_logging.jar:/opt/OSSM/3pps/tomcat/bin/bootstrap.jar:/opt/OSSM/3pps/tomcat/bin/tomcat-juli.jar The tomcat_start.log have this logs: Handler error java.lang.ClassNotFoundException: org.apache.juli.FileHandler at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1858) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1709) at org.apache.juli.ClassLoaderLogManager.readConfiguration(ClassLoaderLogManager.java:560) at org.apache.juli.ClassLoaderLogManager.readConfiguration(ClassLoaderLogManager.java:503) at org.apache.juli.ClassLoaderLogManager$2.run(ClassLoaderLogManager.java:400) at org.apache.juli.ClassLoaderLogManager$2.run(ClassLoaderLogManager.java:396) at java.security.AccessController.doPrivileged(Native Method) at org.apache.juli.ClassLoaderLogManager.getClassLoaderInfo(ClassLoaderLogManager.java:396) at org.apache.juli.ClassLoaderLogManager.findProperty(ClassLoaderLogManager.java:280) at org.apache.juli.ClassLoaderLogManager.getProperty(ClassLoaderLogManager.java:266) at java.util.logging.LogManager.getLevelProperty(LogManager.java:1341) at java.util.logging.LogManager$LoggerContext.addLocalLogger(LogManager.java:651) at java.util.logging.LogManager$LoggerContext.addLocalLogger(LogManager.java:608) at java.util.logging.LogManager$SystemLoggerContext.demandLogger(LogManager.java:771) at java.util.logging.LogManager.demandSystemLogger(LogManager.java:460) at java.util.logging.Logger.getPlatformLogger(Logger.java:473) at java.util.logging.LoggingProxyImpl.getLogger(LoggingProxyImpl.java:41) at sun.util.logging.LoggingSupport.getLogger(LoggingSupport.java:100) at sun.util.logging.PlatformLogger$JavaLoggerProxy.<init>(PlatformLogger.java:639) at sun.util.logging.PlatformLogger$JavaLoggerProxy.<init>(PlatformLogger.java:634) at sun.util.logging.PlatformLogger.<init>(PlatformLogger.java:243) at sun.util.logging.PlatformLogger.getLogger(PlatformLogger.java:202) at sun.awt.X11GraphicsEnvironment.<clinit>(X11GraphicsEnvironment.java:68) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:195) at java.awt.GraphicsEnvironment.createGE(GraphicsEnvironment.java:102) at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:81) at java.awt.image.BufferedImage.createGraphics(BufferedImage.java:1182) at com.tomsawyer.graphicaldrawing.ui.composite.evaluator.TSServerGraphObjectEvaluator.<clinit>(SourceFile:866) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:195) at com.tomsawyer.util.evaluator.TSFunctionsLoader.readFunctionDefinitions(SourceFile:200) at com.tomsawyer.util.evaluator.TSFunctionsLoader.readExtensions(SourceFile:93) at com.tomsawyer.util.evaluator.TSFunctionsLoader.loadFunctions(SourceFile:67) at com.tomsawyer.graphicaldrawing.ui.composite.evaluator.TSServerEvaluatorSetup.setup(SourceFile:53) at com.tomsawyer.visualization.gwt.server.bootstrap.TSServletContainerBootstrap.evaluatorSetup(SourceFile:120) at com.tomsawyer.visualization.gwt.server.bootstrap.TSServletContainerBootstrap.<init>(SourceFile:37) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:526) at java.lang.Class.newInstance(Class.java:383) at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:116) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4919) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5517) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652) at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1095) at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1930) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding in [jar:file:/opt/OSSM/lib/logback-classic-1.1.9.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: Found binding in [jar:file:/opt/OSSM/3pps/apache-tomcat-7.0.64/webapps/topology_maps/WEB-INF/lib/logback-classic-1.1.2.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation. SLF4J: Actual binding is of type [ch.qos.logback.classic.util.ContextSelectorStaticBinder] 15:18:26.539 [localhost-startStop-1] DEBUG c.h.n.o.t.ui.licensing.LicenseUtil - Initializing TS License Manager 15:18:26.542 [localhost-startStop-1] DEBUG c.h.n.o.t.ui.licensing.LicenseUtil - Licensing user.name=root 15:18:26.547 [localhost-startStop-1] INFO c.h.n.o.t.ui.dao.DataUtil - DataUtil - OSSM_DATA=/var/opt/OSSM 15:18:26.548 [localhost-startStop-1] INFO c.h.n.o.t.ui.dao.DataUtil - DataUtil - OSSM_HOME=/opt/OSSM 15:18:26.548 [localhost-startStop-1] INFO c.h.n.o.t.ui.dao.DataUtil - DataUtil - Image Library=/var/opt/OSSM/topology_maps/images/ 15:18:26.548 [localhost-startStop-1] INFO c.h.n.o.t.ui.dao.DataUtil - DataUtil - Image Library=/var/opt/OSSM/topology_maps/backgrounds/ 15:18:26.548 [localhost-startStop-1] INFO c.h.n.o.t.ui.dao.DataUtil - DataUtil - Default Image=_default_ 15:18:26.548 [localhost-startStop-1] INFO c.h.n.o.t.ui.dao.DataUtil - DataUtil - WebApps Dir=/opt/OSSM/3pps/tomcat/webapps/ 15:18:26.548 [localhost-startStop-1] INFO c.h.n.o.t.ui.dao.DataUtil - DataUtil - Tsp Dir=/opt/OSSM/3pps/tomcat/webapps/topology_maps/project/ 15:18:26.548 [localhost-startStop-1] INFO c.h.n.o.t.ui.dao.DataUtil - DataUtil - Tsp file =/opt/OSSM/3pps/tomcat/webapps/topology_maps/project/topology_map.tsp 15:18:26.548 [localhost-startStop-1] INFO c.h.n.o.t.ui.dao.DataUtil - DataUtil - Color tree =false 15:18:26.548 [localhost-startStop-1] INFO c.h.n.o.t.ui.dao.DataUtil - DataUtil - Link decoration =false 15:18:26.548 [localhost-startStop-1] INFO c.h.n.o.t.ui.dao.DataUtil - DataUtil - Server refresh time =60 15:18:26.548 [localhost-startStop-1] INFO c.h.n.o.t.ui.dao.DataUtil - DataUtil - Relate link =false 15:18:26.548 [localhost-startStop-1] INFO c.h.n.o.t.ui.dao.DataUtil - DataUtil - Relate link color =000 000 204 15:18:26.549 [localhost-startStop-1] INFO c.h.n.o.t.ui.dao.DataUtil - DataUtil - Source Object =managed_object 15:18:26.551 [localhost-startStop-1] INFO c.h.n.o.t.ui.dao.DataSourceUtil - initDataSource - DataSource=jdbc/uoc_datasource 15:18:26.551 [localhost-startStop-1] INFO c.h.n.o.t.ui.dao.DataSourceUtil - initDataSource - driver=org.h2.Driver 15:18:26.551 [localhost-startStop-1] INFO c.h.n.o.t.ui.dao.DataSourceUtil - initDataSource - login=sa 15:18:26.552 [localhost-startStop-1] INFO c.h.n.o.t.ui.dao.DataSourceUtil - initDataSource - password= 15:18:26.552 [localhost-startStop-1] INFO c.h.n.o.t.ui.dao.DataSourceUtil - initDataSource - url=jdbc:h2:tcp://localhost:9093/mem:uocCenterPool;DB_CLOSE_DELAY=-1;MULTI_THREADED=1;LOCK_MODE=3;LOG=0;UNDO_LOG=0 15:18:26.552 [localhost-startStop-1] INFO c.h.n.o.t.ui.dao.DataSourceUtil - initDataSource - maxActive=100 15:18:26.552 [localhost-startStop-1] INFO c.h.n.o.t.ui.dao.DataSourceUtil - initDataSource - DataSource_dimension=jdbc/dimension_datasource 15:18:26.552 [localhost-startStop-1] INFO c.h.n.o.t.ui.dao.DataSourceUtil - initDataSource - driver_dim=org.h2.Driver 15:18:26.552 [localhost-startStop-1] INFO c.h.n.o.t.ui.dao.DataSourceUtil - initDataSource - login_dim=sa 15:18:26.552 [localhost-startStop-1] INFO c.h.n.o.t.ui.dao.DataSourceUtil - initDataSource - password_dim= 15:18:26.552 [localhost-startStop-1] INFO c.h.n.o.t.ui.dao.DataSourceUtil - initDataSource - url_dim=jdbc:h2:tcp://localhost:9093/mem:uocCenterPool;DB_CLOSE_DELAY=-1;MULTI_THREADED=1;LOCK_MODE=3;LOG=0;UNDO_LOG=0 15:18:26.552 [localhost-startStop-1] INFO c.h.n.o.t.ui.dao.DataSourceUtil - initDataSource - maxActive_dim=100 15:18:26.552 [localhost-startStop-1] INFO c.h.n.o.t.ui.dao.SqlFileExecutor - Database is using H2 for dimension, skip create tables. 15:18:26.552 [localhost-startStop-1] INFO c.h.n.o.t.ui.service.InitService - Start init... 15:18:26.554 [localhost-startStop-1] INFO c.h.n.o.t.u.s.AutoGetDimensionService - com.hp.ngoss.owd.topology_maps.ui.service.AutoGetDimensionService started. 15:18:26.554 [localhost-startStop-1] INFO c.h.n.o.t.ui.service.InitService - Dimension data refresh thread started. 15:18:26.554 [Thread-2] INFO c.h.n.o.t.u.s.AutoGetDimensionService - refresh dimension from db to cache every 60 seconds ... 15:18:26.556 [Thread-2] INFO c.h.n.o.t.u.s.AutoGetDimensionService - [2017-07-17 15:18:26] get dimension data from view... I modify the logging.properties file under /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.91-2.6.2.3.el7.x86_64/jre/lib/logging.properties according to http://tomcat.apache.org/tomcat-7.0-doc/logging.html and now it looks as follow ############################################################ # Default Logging Configuration File # # You can use a different file by specifying a filename # with the java.util.logging.config.file system property. # For example java -Djava.util.logging.config.file=myfile ############################################################ ############################################################ # Global properties ############################################################ # "handlers" specifies a comma separated list of log Handler # classes. These handlers will be installed during VM startup. # Note that these classes must be on the system classpath. # By default we only configure a ConsoleHandler, which will only # show messages at the INFO and above levels. handlers = org.apache.juli.FileHandler, java.util.logging.ConsoleHandler ############################################################ # Handler specific properties. # Describes specific configuration info for Handlers. ############################################################ org.apache.juli.FileHandler.level = FINE org.apache.juli.FileHandler.directory = ${catalina.base}/logs org.apache.juli.FileHandler.prefix = OSSM java.util.logging.ConsoleHandler.level = FINE java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter I also created a logging.properties, with the same content as above, in $CATALINA_HOME/conf I already tried this Handler error in SLF4JBridgeHandler in tomcat logs but nothing changed.
"Unknown error" with cypher query on all relations
Using neo4j 2.0.1 I frequently observe Java heap space problems. For example when trying to delete all relations of one type I only get an "unknown error". I'm running neo4j server on my local machine (kubuntu 13.10) with 8 gig ram, 6gig java heap space. the same happens when performing the query on a virtual ubuntu server. did not observe these issues with previous versions. I also attached the neo4j output from the console. I'm not a java developer, so it does not really help me. thanks for suggestions Starting Neo4j Server console-mode... Using additional JVM arguments: -server -XX:+DisableExplicitGC -Dorg.neo4j.server.properties=conf/neo4j-server.properties -Djava.util.logging.config.file=conf/logging.properties -Dlog4j.configuration=file:conf/log4j.properties -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled -Xms512m -Xmx6196m Detected incorrectly shut down database, performing recovery.. 13:50:00.431 [main] WARN o.e.j.server.handler.ContextHandler - o.e.j.s.ServletContextHandler#35f6002a{/,null,null} contextPath ends with / 13:50:00.431 [main] WARN o.e.j.server.handler.ContextHandler - Empty contextPath 13:50:00.433 [main] INFO org.eclipse.jetty.server.Server - jetty-9.0.5.v20130815 13:50:00.458 [main] INFO o.e.j.server.handler.ContextHandler - Started o.e.j.s.h.MovedContextHandler#453831c{/,null,AVAILABLE} 13:50:00.534 [main] INFO o.e.j.w.StandardDescriptorProcessor - NO JSP Support for /webadmin, did not find org.apache.jasper.servlet.JspServlet 13:50:00.546 [main] INFO o.e.j.server.handler.ContextHandler - Started o.e.j.w.WebAppContext#3c3aea35{/webadmin,jar:file:/media/data/software/Neo4j/system/lib/neo4j-server-2.0.1-static-web.jar!/webadmin-html,AVAILABLE} 13:50:00.950 [main] INFO o.e.j.server.handler.ContextHandler - Started o.e.j.s.ServletContextHandler#2078afe{/db/manage,null,AVAILABLE} 13:50:01.206 [main] INFO o.e.j.server.handler.ContextHandler - Started o.e.j.s.ServletContextHandler#216e21b4{/db/data,null,AVAILABLE} 13:50:01.224 [main] INFO o.e.j.w.StandardDescriptorProcessor - NO JSP Support for /browser, did not find org.apache.jasper.servlet.JspServlet 13:50:01.225 [main] INFO o.e.j.server.handler.ContextHandler - Started o.e.j.w.WebAppContext#513f27b6{/browser,jar:file:/media/data/software/Neo4j/system/lib/neo4j-browser-2.0.1.jar!/browser,AVAILABLE} 13:50:01.314 [main] INFO o.e.j.server.handler.ContextHandler - Started o.e.j.s.ServletContextHandler#35f6002a{/,null,AVAILABLE} 13:50:01.327 [main] INFO o.e.jetty.server.ServerConnector - Started ServerConnector#42f400c3{HTTP/1.1}{localhost:7474} 13:50:01.756 [main] INFO o.e.jetty.server.ServerConnector - Started ServerConnector#40671ba6{SSL-HTTP/1.1}{localhost:7473} 13:50:02.380 [Thread-24] INFO o.e.jetty.server.ServerConnector - Stopped ServerConnector#42f400c3{HTTP/1.1}{localhost:7474} 13:50:02.384 [Thread-24] INFO o.e.jetty.server.ServerConnector - Stopped ServerConnector#40671ba6{SSL-HTTP/1.1}{localhost:7473} 13:50:02.385 [Thread-24] INFO o.e.j.server.handler.ContextHandler - Stopped o.e.j.s.ServletContextHandler#35f6002a{/,null,UNAVAILABLE} 13:50:02.386 [Thread-24] INFO o.e.j.server.handler.ContextHandler - Stopped o.e.j.w.WebAppContext#513f27b6{/browser,jar:file:/media/data/software/Neo4j/system/lib/neo4j-browser-2.0.1.jar!/browser,UNAVAILABLE} 13:50:02.387 [Thread-24] INFO o.e.j.server.handler.ContextHandler - Stopped o.e.j.s.ServletContextHandler#216e21b4{/db/data,null,UNAVAILABLE} 13:50:02.387 [Thread-24] INFO o.e.j.server.handler.ContextHandler - Stopped o.e.j.s.ServletContextHandler#2078afe{/db/manage,null,UNAVAILABLE} 13:50:02.388 [Thread-24] INFO o.e.j.server.handler.ContextHandler - Stopped o.e.j.w.WebAppContext#3c3aea35{/webadmin,jar:file:/media/data/software/Neo4j/system/lib/neo4j-server-2.0.1-static-web.jar!/webadmin-html,UNAVAILABLE} 13:50:02.388 [Thread-24] INFO o.e.j.server.handler.ContextHandler - Stopped o.e.j.s.h.MovedContextHandler#453831c{/,null,UNAVAILABLE} Starting Neo4j Server console-mode... Using additional JVM arguments: -server -XX:+DisableExplicitGC -Dorg.neo4j.server.properties=conf/neo4j-server.properties -Djava.util.logging.config.file=conf/logging.properties -Dlog4j.configuration=file:conf/log4j.properties -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled -Xms512m -Xmx6196m 13:50:11.228 [main] WARN o.e.j.server.handler.ContextHandler - o.e.j.s.ServletContextHandler#21b4406c{/,null,null} contextPath ends with / 13:50:11.228 [main] WARN o.e.j.server.handler.ContextHandler - Empty contextPath 13:50:11.230 [main] INFO org.eclipse.jetty.server.Server - jetty-9.0.5.v20130815 13:50:11.256 [main] INFO o.e.j.server.handler.ContextHandler - Started o.e.j.s.h.MovedContextHandler#13b357fd{/,null,AVAILABLE} 13:50:11.346 [main] INFO o.e.j.w.StandardDescriptorProcessor - NO JSP Support for /webadmin, did not find org.apache.jasper.servlet.JspServlet 13:50:11.358 [main] INFO o.e.j.server.handler.ContextHandler - Started o.e.j.w.WebAppContext#24c13894{/webadmin,jar:file:/media/data/software/Neo4j/system/lib/neo4j-server-2.0.1-static-web.jar!/webadmin-html,AVAILABLE} 13:50:11.813 [main] INFO o.e.j.server.handler.ContextHandler - Started o.e.j.s.ServletContextHandler#66d51e79{/db/manage,null,AVAILABLE} 13:50:12.108 [main] INFO o.e.j.server.handler.ContextHandler - Started o.e.j.s.ServletContextHandler#4984bbd4{/db/data,null,AVAILABLE} 13:50:12.129 [main] INFO o.e.j.w.StandardDescriptorProcessor - NO JSP Support for /browser, did not find org.apache.jasper.servlet.JspServlet 13:50:12.131 [main] INFO o.e.j.server.handler.ContextHandler - Started o.e.j.w.WebAppContext#3f30e292{/browser,jar:file:/media/data/software/Neo4j/system/lib/neo4j-browser-2.0.1.jar!/browser,AVAILABLE} 13:50:12.241 [main] INFO o.e.j.server.handler.ContextHandler - Started o.e.j.s.ServletContextHandler#21b4406c{/,null,AVAILABLE} 13:50:12.258 [main] INFO o.e.jetty.server.ServerConnector - Started ServerConnector#7ad78ab8{HTTP/1.1}{localhost:7474} 13:50:12.708 [main] INFO o.e.jetty.server.ServerConnector - Started ServerConnector#3f9c4b9a{SSL-HTTP/1.1}{localhost:7473} 13:54:42.617 [qtp808144526-41] WARN o.e.jetty.servlet.ServletHandler - /db/manage/server/monitor/fetch javax.ws.rs.WebApplicationException: javax.ws.rs.WebApplicationException: org.eclipse.jetty.io.EofException at org.neo4j.server.rest.repr.OutputFormat$1.write(OutputFormat.java:174) ~[neo4j-server-2.0.1.jar:2.0.1] at com.sun.jersey.core.impl.provider.entity.StreamingOutputProvider.writeTo(StreamingOutputProvider.java:71) ~[jersey-core-1.9.jar:1.9] at com.sun.jersey.core.impl.provider.entity.StreamingOutputProvider.writeTo(StreamingOutputProvider.java:57) ~[jersey-core-1.9.jar:1.9] at com.sun.jersey.spi.container.ContainerResponse.write(ContainerResponse.java:306) ~[jersey-server-1.9.jar:1.9] at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1437) ~[jersey-server-1.9.jar:1.9] at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1349) ~[jersey-server-1.9.jar:1.9] at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1339) ~[jersey-server-1.9.jar:1.9] at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416) ~[jersey-server-1.9.jar:1.9] at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:537) ~[jersey-server-1.9.jar:1.9] at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:699) ~[jersey-server-1.9.jar:1.9] at javax.servlet.http.HttpServlet.service(HttpServlet.java:848) ~[javax.servlet-3.0.0.v201112011016.jar:na] at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:698) ~[jetty-servlet-9.0.5.v20130815.jar:9.0.5.v20130815] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1506) ~[jetty-servlet-9.0.5.v20130815.jar:9.0.5.v20130815] at org.neo4j.server.rest.security.SecurityFilter.doFilter(SecurityFilter.java:112) ~[neo4j-server-2.0.1.jar:2.0.1] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1477) ~[jetty-servlet-9.0.5.v20130815.jar:9.0.5.v20130815] at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:503) [jetty-servlet-9.0.5.v20130815.jar:9.0.5.v20130815] at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:211) [jetty-server-9.0.5.v20130815.jar:9.0.5.v20130815] at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1096) [jetty-server-9.0.5.v20130815.jar:9.0.5.v20130815] at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:432) [jetty-servlet-9.0.5.v20130815.jar:9.0.5.v20130815] at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:175) [jetty-server-9.0.5.v20130815.jar:9.0.5.v20130815] at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1030) [jetty-server-9.0.5.v20130815.jar:9.0.5.v20130815] at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:136) [jetty-server-9.0.5.v20130815.jar:9.0.5.v20130815] at org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:52) [jetty-server-9.0.5.v20130815.jar:9.0.5.v20130815] at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.0.5.v20130815.jar:9.0.5.v20130815] at org.eclipse.jetty.server.Server.handle(Server.java:445) [jetty-server-9.0.5.v20130815.jar:9.0.5.v20130815] at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:268) [jetty-server-9.0.5.v20130815.jar:9.0.5.v20130815] at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:229) [jetty-server-9.0.5.v20130815.jar:9.0.5.v20130815] at org.eclipse.jetty.io.AbstractConnection$ReadCallback.run(AbstractConnection.java:358) [jetty-io-9.0.5.v20130815.jar:9.0.5.v20130815] at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:601) [jetty-util-9.0.5.v20130815.jar:9.0.5.v20130815] at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:532) [jetty-util-9.0.5.v20130815.jar:9.0.5.v20130815] at java.lang.Thread.run(Thread.java:744) [na:1.7.0_51] Caused by: javax.ws.rs.WebApplicationException: org.eclipse.jetty.io.EofException at org.neo4j.server.rest.repr.formats.StreamingJsonFormat$StreamingRepresentationFormat.flush(StreamingJsonFormat.java:401) ~[neo4j-server-2.0.1.jar:2.0.1] at org.neo4j.server.rest.repr.formats.StreamingJsonFormat$StreamingRepresentationFormat.complete(StreamingJsonFormat.java:389) ~[neo4j-server-2.0.1.jar:2.0.1] at org.neo4j.server.rest.repr.MappingRepresentation.serialize(MappingRepresentation.java:43) ~[server-api-2.0.1.jar:2.0.1] at org.neo4j.server.rest.repr.OutputFormat$1.write(OutputFormat.java:160) ~[neo4j-server-2.0.1.jar:2.0.1] ... 30 common frames omitted Caused by: org.eclipse.jetty.io.EofException: null at org.eclipse.jetty.io.ChannelEndPoint.flush(ChannelEndPoint.java:186) ~[jetty-io-9.0.5.v20130815.jar:9.0.5.v20130815] at org.eclipse.jetty.io.WriteFlusher.write(WriteFlusher.java:335) ~[jetty-io-9.0.5.v20130815.jar:9.0.5.v20130815] at org.eclipse.jetty.io.AbstractEndPoint.write(AbstractEndPoint.java:125) ~[jetty-io-9.0.5.v20130815.jar:9.0.5.v20130815] at org.eclipse.jetty.server.HttpConnection$ContentCallback.process(HttpConnection.java:784) ~[jetty-server-9.0.5.v20130815.jar:9.0.5.v20130815] at org.eclipse.jetty.util.IteratingCallback.iterate(IteratingCallback.java:79) ~[jetty-util-9.0.5.v20130815.jar:9.0.5.v20130815] at org.eclipse.jetty.server.HttpConnection.send(HttpConnection.java:356) [jetty-server-9.0.5.v20130815.jar:9.0.5.v20130815] at org.eclipse.jetty.server.HttpChannel.sendResponse(HttpChannel.java:631) [jetty-server-9.0.5.v20130815.jar:9.0.5.v20130815] at org.eclipse.jetty.server.HttpChannel.write(HttpChannel.java:661) [jetty-server-9.0.5.v20130815.jar:9.0.5.v20130815] at org.eclipse.jetty.server.HttpOutput.flush(HttpOutput.java:151) ~[jetty-server-9.0.5.v20130815.jar:9.0.5.v20130815] at com.sun.jersey.spi.container.servlet.WebComponent$Writer.flush(WebComponent.java:315) ~[jersey-server-1.9.jar:1.9] at com.sun.jersey.spi.container.ContainerResponse$CommittingOutputStream.flush(ContainerResponse.java:145) ~[jersey-server-1.9.jar:1.9] at org.codehaus.jackson.impl.Utf8Generator.flush(Utf8Generator.java:1091) ~[jackson-core-asl-1.9.7.jar:1.9.7] at org.neo4j.server.rest.repr.formats.StreamingJsonFormat$StreamingRepresentationFormat.flush(StreamingJsonFormat.java:397) ~[neo4j-server-2.0.1.jar:2.0.1] ... 33 common frames omitted
That is unrelated to your config, the transaction size just gets too big. If you want to delete elements in a batched way use something like this: match (a) with a limit 10000 optional match (a)-[r]-() delete a,r return count(*) run until the result is 0 Which will find at most 10000 nodes then find all their rels and then delete both.