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

Deploy should not load content into memory #27

Closed
philwebb opened this issue Nov 3, 2018 · 2 comments
Closed

Deploy should not load content into memory #27

philwebb opened this issue Nov 3, 2018 · 2 comments
Milestone

Comments

@philwebb
Copy link
Contributor

philwebb commented Nov 3, 2018

See #18

Deploying 1 artifacts to https://repo.spring.io as build 2
Deploying /org/cloudfoundry/openjdk/org.cloudfoundry.openjdk/1.0.0-BUILD-SNAPSHOT/org.cloudfoundry.openjdk-1.0.0-BUILD-SNAPSHOT.tgz {build.name=OpenJDK Buildpack, build.number=2} (1d4298f61c7f0828c5fec660defba3e3e2c2d889/31998c5792b7b22e198e3299e2500e95)
2018-09-21 19:40:08.638 ERROR 15 --- [           main] o.s.boot.SpringApplication               : Application startup failed

java.lang.OutOfMemoryError: Java heap space
	at java.util.Arrays.copyOf(Arrays.java:3236) ~[na:1.8.0_151]
	at java.io.ByteArrayOutputStream.toByteArray(ByteArrayOutputStream.java:191) ~[na:1.8.0_151]
	at org.springframework.http.client.AbstractBufferingClientHttpRequest.executeInternal(AbstractBufferingClientHttpRequest.java:44) ~[spring-web-4.3.10.RELEASE.jar!/:4.3.10.RELEASE]
	at org.springframework.http.client.AbstractClientHttpRequest.execute(AbstractClientHttpRequest.java:53) ~[spring-web-4.3.10.RELEASE.jar!/:4.3.10.RELEASE]
	at org.springframework.http.client.InterceptingClientHttpRequest$InterceptingRequestExecution.execute(InterceptingClientHttpRequest.java:99) ~[spring-web-4.3.10.RELEASE.jar!/:4.3.10.RELEASE]
	at org.springframework.http.client.support.BasicAuthorizationInterceptor.intercept(BasicAuthorizationInterceptor.java:63) ~[spring-web-4.3.10.RELEASE.jar!/:4.3.10.RELEASE]
	at org.springframework.http.client.InterceptingClientHttpRequest$InterceptingRequestExecution.execute(InterceptingClientHttpRequest.java:86) ~[spring-web-4.3.10.RELEASE.jar!/:4.3.10.RELEASE]
	at org.springframework.http.client.InterceptingClientHttpRequest.executeInternal(InterceptingClientHttpRequest.java:70) ~[spring-web-4.3.10.RELEASE.jar!/:4.3.10.RELEASE]
	at org.springframework.http.client.AbstractBufferingClientHttpRequest.executeInternal(AbstractBufferingClientHttpRequest.java:48) ~[spring-web-4.3.10.RELEASE.jar!/:4.3.10.RELEASE]
	at org.springframework.http.client.AbstractClientHttpRequest.execute(AbstractClientHttpRequest.java:53) ~[spring-web-4.3.10.RELEASE.jar!/:4.3.10.RELEASE]
	at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:652) ~[spring-web-4.3.10.RELEASE.jar!/:4.3.10.RELEASE]
	at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:628) ~[spring-web-4.3.10.RELEASE.jar!/:4.3.10.RELEASE]
	at org.springframework.web.client.RestTemplate.exchange(RestTemplate.java:590) ~[spring-web-4.3.10.RELEASE.jar!/:4.3.10.RELEASE]
	at io.spring.concourse.artifactoryresource.artifactory.HttpArtifactoryRepository.deployUsingContent(HttpArtifactoryRepository.java:102) ~[classes!/:0.0.4]
	at io.spring.concourse.artifactoryresource.artifactory.HttpArtifactoryRepository.deploy(HttpArtifactoryRepository.java:84) ~[classes!/:0.0.4]
	at io.spring.concourse.artifactoryresource.command.OutHandler.deployArtifacts(OutHandler.java:192) ~[classes!/:0.0.4]
	at io.spring.concourse.artifactoryresource.command.OutHandler.handle(OutHandler.java:99) ~[classes!/:0.0.4]
	at io.spring.concourse.artifactoryresource.command.OutCommand.run(OutCommand.java:54) ~[classes!/:0.0.4]
	at io.spring.concourse.artifactoryresource.command.CommandProcessor.run(CommandProcessor.java:52) ~[classes!/:0.0.4]
	at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:723) ~[spring-boot-1.5.6.RELEASE.jar!/:1.5.6.RELEASE]
	at org.springframework.boot.SpringApplication.callRunners(SpringApplication.java:713) ~[spring-boot-1.5.6.RELEASE.jar!/:1.5.6.RELEASE]
	at org.springframework.boot.SpringApplication.afterRefresh(SpringApplication.java:703) ~[spring-boot-1.5.6.RELEASE.jar!/:1.5.6.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:304) ~[spring-boot-1.5.6.RELEASE.jar!/:1.5.6.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1118) ~[spring-boot-1.5.6.RELEASE.jar!/:1.5.6.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1107) ~[spring-boot-1.5.6.RELEASE.jar!/:1.5.6.RELEASE]
	at io.spring.concourse.artifactoryresource.Application.main(Application.java:40) ~[classes!/:0.0.4]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_151]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_151]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_151]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_151]
	at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48) ~[artifactory-resource.jar:0.0.4]
	at org.springframework.boot.loader.Launcher.launch(Launcher.java:87) ~[artifactory-resource.jar:0.0.4]
@philwebb philwebb changed the title deploy should not load content into memory Deploy should not load content into memory Nov 3, 2018
@philwebb
Copy link
Contributor Author

philwebb commented Nov 3, 2018

With latest

Thread [main] (Suspended (breakpoint at line 44 in AbstractBufferingClientHttpRequest))	
	InterceptingClientHttpRequest(AbstractBufferingClientHttpRequest).executeInternal(HttpHeaders) line: 44	
	InterceptingClientHttpRequest(AbstractClientHttpRequest).execute() line: 53	
	RestTemplate.doExecute(URI, HttpMethod, RequestCallback, ResponseExtractor<T>) line: 734	
	RestTemplate.exchange(RequestEntity<?>, Class<T>) line: 636	
	HttpArtifactoryRepository.deployUsingContent(DeployableArtifact) line: 105	
	HttpArtifactoryRepository.deploy(DeployableArtifact, DeployOption...) line: 79	
	HttpArtifactoryRepositoryTests.deployWhenSmallFileShouldNotUseChecksum() line: 142	
	NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method]	
	NativeMethodAccessorImpl.invoke(Object, Object[]) line: 62	
	DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 43	
	Method.invoke(Object, Object...) line: 498	
	FrameworkMethod$1.runReflectiveCall() line: 50	
	FrameworkMethod$1(ReflectiveCallable).run() line: 12	
	FrameworkMethod.invokeExplosively(Object, Object...) line: 47	
	InvokeMethod.evaluate() line: 17	
	RunBeforeTestExecutionCallbacks.evaluate() line: 74	
	RunAfterTestExecutionCallbacks.evaluate() line: 84	
	RunBefores.evaluate() line: 26	
	RunBeforeTestMethodCallbacks.evaluate() line: 75	
	RunAfters.evaluate() line: 27	
	RunAfterTestMethodCallbacks.evaluate() line: 86	
	ExternalResource$1.evaluate() line: 48	
	RunRules.evaluate() line: 20	
	SpringRepeat.evaluate() line: 84	
	SpringRunner(ParentRunner<T>).runLeaf(Statement, Description, RunNotifier) line: 325	
	SpringRunner(SpringJUnit4ClassRunner).runChild(FrameworkMethod, RunNotifier) line: 251	
	SpringRunner(SpringJUnit4ClassRunner).runChild(Object, RunNotifier) line: 97	
	ParentRunner$3.run() line: 290	
	ParentRunner$1.schedule(Runnable) line: 71	
	SpringRunner(ParentRunner<T>).runChildren(RunNotifier) line: 288	
	ParentRunner<T>.access$000(ParentRunner, RunNotifier) line: 58	
	ParentRunner$2.evaluate() line: 268	
	RunBeforeTestClassCallbacks.evaluate() line: 61	
	RunAfterTestClassCallbacks.evaluate() line: 70	
	SpringRunner(ParentRunner<T>).run(RunNotifier) line: 363	
	SpringRunner(SpringJUnit4ClassRunner).run(RunNotifier) line: 190	
	JUnit4TestReference.run(TestExecution) line: 86	
	TestExecution.run(ITestReference[]) line: 38	
	RemoteTestRunner.runTests(String[], String, TestExecution) line: 538	
	RemoteTestRunner.runTests(TestExecution) line: 760	
	RemoteTestRunner.run() line: 460	
	RemoteTestRunner.main(String[]) line: 206	

@philwebb
Copy link
Contributor Author

philwebb commented Nov 3, 2018

Seems like the org.springframework.http.client.support.BasicAuthenticationInterceptor is causing the InterceptingClientHttpRequestFactory to be used.

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

No branches or pull requests

1 participant