Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Question / Feature Request : Oracle DB Support #541

Closed
andye2004 opened this issue May 11, 2021 · 8 comments
Closed

Question / Feature Request : Oracle DB Support #541

andye2004 opened this issue May 11, 2021 · 8 comments

Comments

@andye2004
Copy link
Contributor

Hi @paulcwarren, I'm wondering if you, or anyone else, has attempted to add support for Oracle DB at any point? If so, were there any issues that prevented the functionality from being added?

If not, this is something I may be interested in providing a PR for. Please let me know.

Cheers, Andy.

@paulcwarren
Copy link
Owner

paulcwarren commented May 12, 2021

Hi @andye2004,

From an implementation POV I don't imagine this is too much of a big deal. I am sure Oracle has a good blob api.

At the time I originally implemented the code in the Spring Content JPA module and was considering which DBs to support and which not to. I actually wanted to do Oracle - why wouldn't you - but for testing I was relying on freely available hosted things and a freely available hosted Oracle thing wasn't a thing! At least, not that I could find.

Now-a-days I have a slightly more sane container-based testing strategy and there seems to be plenty of oracle containers out there.

So, if you have the bandwidth to implement Oracle support then yeah please do. I'd love a contribution like that. That would be awesome.

@andye2004
Copy link
Contributor Author

andye2004 commented May 13, 2021

Hi @paulcwarren, just forked the 1.2.x branch and checked it out and when I try to run clean install I'm getting various test failures that are S3 and Azure related. I'm obviously missing something really fundamental but it isn't obvious to me what it can be and I don't have a huge amount of time at hand to dig too deeply, I was wondering, or hoping really, that you might have an idea what it could be?

@paulcwarren
Copy link
Owner

paulcwarren commented May 13, 2021

Are you running mvn clean install that should just run units, or mvn -P tests clean install that will run units and integration tests in which case you need to set up your containers?

@andye2004
Copy link
Contributor Author

Completely fresh checkout of the source to a newly created directory. Running just standard mvn clean install and get same result from both in-built IntelliJ Maven plugin using OpenJDK jdk1.8.0_131, maven v3.6.3 and also from command line using Corretto JDK8 and maven v3.5.3. Also running command line `./mvnw clean install' gets exactly the same result.

TLDR; Attached output from two different runs, second one has S3 test disabled to highlight Azure failures.
run1.txt
run2.txt

Error from first test run:-

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running internal.org.springframework.content.s3.config.S3StoreFactoryBeanTest
07:54:26,461 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback-test.xml]
07:54:26,461 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback.groovy]
07:54:26,461 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [logback.xml] at [file:/Users/andye/Dev/projects/paulcwarrenspring-content/spring-content-s3/target/test-classes/logback.xml]
07:54:26,509 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - debug attribute not set
07:54:26,510 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender]
07:54:26,516 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [STDOUT]
07:54:26,555 |-WARN in ch.qos.logback.core.ConsoleAppender[STDOUT] - This appender no longer admits a layout as a sub-component, set an encoder instead.
07:54:26,555 |-WARN in ch.qos.logback.core.ConsoleAppender[STDOUT] - To ensure compatibility, wrapping your layout in LayoutWrappingEncoder.
07:54:26,555 |-WARN in ch.qos.logback.core.ConsoleAppender[STDOUT] - See also http://logback.qos.ch/codes.html#layoutInsteadOfEncoder for details
07:54:26,556 |-INFO in ch.qos.logback.classic.joran.action.RootLoggerAction - Setting level of ROOT logger to INFO
07:54:26,556 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [STDOUT] to Logger[ROOT]
07:54:26,556 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - End of configuration.
07:54:26,557 |-INFO in ch.qos.logback.classic.joran.JoranConfigurator@cd2dae5 - Registering current configuration as safe fallback point
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.845 sec
Running internal.org.springframework.content.s3.config.EnableS3StoresTest
Tests run: 8, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 1.366 sec <<< FAILURE!
should use the correct client(It)  Time elapsed: 0.063 sec  <<< ERROR!
java.lang.reflect.UndeclaredThrowableException
	at com.sun.proxy.$Proxy35.getResource(Unknown Source)
	at internal.org.springframework.content.s3.config.EnableS3StoresTest.lambda$null$15(EnableS3StoresTest.java:117)
	at impl.com.github.paulcwarren.ginkgo4j.chains.ExecutableChain.execute(ExecutableChain.java:85)
	at impl.com.github.paulcwarren.ginkgo4j.runner.SpecRunner.run(SpecRunner.java:33)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at internal.org.springframework.content.commons.repository.factory.StoreMethodInterceptor.invoke(StoreMethodInterceptor.java:66)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:215)
	... 7 more
Caused by: org.springframework.core.convert.ConversionFailedException: Failed to convert from type [internal.org.springframework.content.s3.config.EnableS3StoresTest$TestEntity] to type [com.amazonaws.services.s3.model.S3ObjectId] for value 'EnableS3StoresTest.TestEntity(contentId=12345)'; nested exception is org.springframework.content.commons.repository.StoreAccessException: Bucket not set
	at org.springframework.core.convert.support.ConversionUtils.invokeConverter(ConversionUtils.java:47)
	at org.springframework.core.convert.support.GenericConversionService.convert(GenericConversionService.java:192)
	at org.springframework.core.convert.support.GenericConversionService.convert(GenericConversionService.java:175)
	at internal.org.springframework.content.s3.store.DefaultS3StoreImpl.getResource(DefaultS3StoreImpl.java:92)
	at internal.org.springframework.content.commons.repository.factory.StoreImpl.getResource(StoreImpl.java:164)
	... 14 more
Caused by: org.springframework.content.commons.repository.StoreAccessException: Bucket not set
	at internal.org.springframework.content.s3.config.DefaultAssociativeStoreS3ObjectIdResolver.getBucket(DefaultAssociativeStoreS3ObjectIdResolver.java:26)
	at internal.org.springframework.content.s3.config.S3ObjectIdResolverConverter.convert(S3ObjectIdResolverConverter.java:40)
	at org.springframework.core.convert.support.ConversionUtils.invokeConverter(ConversionUtils.java:41)
	... 18 more
Running internal.org.springframework.content.s3.store.DefaultS3StoreImplTest
2021-05-14 07:54:28 [pool-3-thread-2] ERROR i.o.s.c.s3.store.DefaultS3StoreImpl - Unexpected error setting content for entity internal.org.springframework.content.s3.store.DefaultS3StoreImplTest$TestEntity@a0ce5ee
java.io.IOException: set-ioexception
	at internal.org.springframework.content.s3.io.S3StoreResource.getOutputStream(S3StoreResource.java:110)
	at internal.org.springframework.content.s3.store.DefaultS3StoreImpl.setContent(DefaultS3StoreImpl.java:185)
	at internal.org.springframework.content.s3.store.DefaultS3StoreImplTest.lambda$null$83(DefaultS3StoreImplTest.java:504)
	at impl.com.github.paulcwarren.ginkgo4j.chains.ExecutableChain.execute(ExecutableChain.java:74)
	at impl.com.github.paulcwarren.ginkgo4j.runner.SpecRunner.run(SpecRunner.java:33)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:748)
2021-05-14 07:54:28 [pool-3-thread-3] ERROR i.o.s.c.s3.store.DefaultS3StoreImpl - Unexpected error setting content for entity internal.org.springframework.content.s3.store.DefaultS3StoreImplTest$TestEntity@38e41231
java.io.IOException: setContent badness
	at internal.org.springframework.content.s3.store.DefaultS3StoreImpl.setContent(DefaultS3StoreImpl.java:206)
	at internal.org.springframework.content.s3.store.DefaultS3StoreImplTest.lambda$null$103(DefaultS3StoreImplTest.java:598)
	at impl.com.github.paulcwarren.ginkgo4j.chains.ExecutableChain.execute(ExecutableChain.java:74)
	at impl.com.github.paulcwarren.ginkgo4j.runner.SpecRunner.run(SpecRunner.java:33)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:748)
2021-05-14 07:54:28 [pool-3-thread-1] ERROR i.o.s.c.s3.store.DefaultS3StoreImpl - Unexpected error getting content for entity internal.org.springframework.content.s3.store.DefaultS3StoreImplTest$TestEntity@37e800e4
java.io.IOException: get-ioexception
	at internal.org.springframework.content.s3.io.S3StoreResource.getInputStream(S3StoreResource.java:93)
	at internal.org.springframework.content.s3.store.DefaultS3StoreImpl.getContent(DefaultS3StoreImpl.java:223)
	at internal.org.springframework.content.s3.store.DefaultS3StoreImplTest.lambda$null$109(DefaultS3StoreImplTest.java:623)
	at impl.com.github.paulcwarren.ginkgo4j.chains.ExecutableChain.execute(ExecutableChain.java:74)
	at impl.com.github.paulcwarren.ginkgo4j.runner.SpecRunner.run(SpecRunner.java:33)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:748)
2021-05-14 07:54:28 [pool-3-thread-1] ERROR i.o.s.c.s3.store.DefaultS3StoreImpl - Unexpected error unsetting content for entity internal.org.springframework.content.s3.store.DefaultS3StoreImplTest$TestEntity@4cf8f50d
Tests run: 36, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.344 sec
Results :
Tests in error: 
  should use the correct client(It)
Tests run: 47, Failures: 0, Errors: 1, Skipped: 0

Disabling that particular test I then get:-

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running internal.org.springframework.content.azure.config.EnableAzureStorageTest
08:05:29,910 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback-test.xml]
08:05:29,910 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback.groovy]
08:05:29,910 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [logback.xml] at [file:/Users/andye/Dev/projects/paulcwarrenspring-content/spring-content-azure-storage/target/test-classes/logback.xml]
08:05:29,969 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - debug attribute not set
08:05:29,970 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender]
08:05:29,977 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [STDOUT]
08:05:30,035 |-WARN in ch.qos.logback.core.ConsoleAppender[STDOUT] - This appender no longer admits a layout as a sub-component, set an encoder instead.
08:05:30,035 |-WARN in ch.qos.logback.core.ConsoleAppender[STDOUT] - To ensure compatibility, wrapping your layout in LayoutWrappingEncoder.
08:05:30,035 |-WARN in ch.qos.logback.core.ConsoleAppender[STDOUT] - See also http://logback.qos.ch/codes.html#layoutInsteadOfEncoder for details
08:05:30,036 |-INFO in ch.qos.logback.classic.joran.action.RootLoggerAction - Setting level of ROOT logger to INFO
08:05:30,036 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [STDOUT] to Logger[ROOT]
08:05:30,036 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - End of configuration.
08:05:30,037 |-INFO in ch.qos.logback.classic.joran.JoranConfigurator@6600beb1 - Registering current configuration as safe fallback point
SLF4J: A number (4) of logging calls during the initialization phase have been intercepted and are
SLF4J: now being replayed. These are subject to the filtering rules of the underlying logging system.
SLF4J: See also http://www.slf4j.org/codes.html#replay
2021-05-14 08:05:30 [pool-1-thread-1] ERROR c.a.s.blob.BlobServiceClientBuilder - The Azure Storage endpoint url is malformed.
2021-05-14 08:05:30 [pool-1-thread-4] ERROR c.a.s.blob.BlobServiceClientBuilder - The Azure Storage endpoint url is malformed.
2021-05-14 08:05:30 [pool-1-thread-2] ERROR c.a.s.blob.BlobServiceClientBuilder - The Azure Storage endpoint url is malformed.
2021-05-14 08:05:30 [pool-1-thread-3] ERROR c.a.s.blob.BlobServiceClientBuilder - The Azure Storage endpoint url is malformed.
2021-05-14 08:05:30 [pool-1-thread-1] WARN  o.s.c.a.AnnotationConfigApplicationContext - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'storage' defined in internal.org.springframework.content.azure.config.EnableAzureStorageTest$InfrastructureConfig: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.azure.storage.blob.BlobServiceClientBuilder]: Factory method 'storage' threw exception; nested exception is java.lang.IllegalArgumentException: The Azure Storage endpoint url is malformed.
2021-05-14 08:05:30 [pool-1-thread-3] WARN  o.s.c.a.AnnotationConfigApplicationContext - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'storage' defined in internal.org.springframework.content.azure.config.EnableAzureStorageTest$InfrastructureConfig: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.azure.storage.blob.BlobServiceClientBuilder]: Factory method 'storage' threw exception; nested exception is java.lang.IllegalArgumentException: The Azure Storage endpoint url is malformed.
2021-05-14 08:05:30 [pool-1-thread-4] WARN  o.s.c.a.AnnotationConfigApplicationContext - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'storage' defined in internal.org.springframework.content.azure.config.EnableAzureStorageTest$InfrastructureConfig: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.azure.storage.blob.BlobServiceClientBuilder]: Factory method 'storage' threw exception; nested exception is java.lang.IllegalArgumentException: The Azure Storage endpoint url is malformed.
2021-05-14 08:05:30 [pool-1-thread-2] WARN  o.s.c.a.AnnotationConfigApplicationContext - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'storage' defined in internal.org.springframework.content.azure.config.EnableAzureStorageTest$InfrastructureConfig: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.azure.storage.blob.BlobServiceClientBuilder]: Factory method 'storage' threw exception; nested exception is java.lang.IllegalArgumentException: The Azure Storage endpoint url is malformed.
Tests run: 5, Failures: 0, Errors: 4, Skipped: 0, Time elapsed: 0.795 sec <<< FAILURE!
should have a ContentStore bean(It)  Time elapsed: 0.649 sec  <<< ERROR!
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'storage' defined in internal.org.springframework.content.azure.config.EnableAzureStorageTest$InfrastructureConfig: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.azure.storage.blob.BlobServiceClientBuilder]: Factory method 'storage' threw exception; nested exception is java.lang.IllegalArgumentException: The Azure Storage endpoint url is malformed.
	at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:658)
	at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:486)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1334)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1177)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:564)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:524)
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:944)
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:918)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583)
	at internal.org.springframework.content.azure.config.EnableAzureStorageTest.lambda$null$0(EnableAzureStorageTest.java:55)
	at impl.com.github.paulcwarren.ginkgo4j.chains.ExecutableChain.execute(ExecutableChain.java:61)
	at impl.com.github.paulcwarren.ginkgo4j.runner.SpecRunner.run(SpecRunner.java:33)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:748)
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.azure.storage.blob.BlobServiceClientBuilder]: Factory method 'storage' threw exception; nested exception is java.lang.IllegalArgumentException: The Azure Storage endpoint url is malformed.
	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185)
	at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:653)
	... 18 more
Caused by: java.lang.IllegalArgumentException: The Azure Storage endpoint url is malformed.
	at com.azure.storage.blob.BlobServiceClientBuilder.endpoint(BlobServiceClientBuilder.java:141)
	at internal.org.springframework.content.azure.config.EnableAzureStorageTest$InfrastructureConfig.storage(EnableAzureStorageTest.java:171)
	at internal.org.springframework.content.azure.config.EnableAzureStorageTest$InfrastructureConfig$$EnhancerBySpringCGLIB$$e80dc41.CGLIB$storage$0(<generated>)
	at internal.org.springframework.content.azure.config.EnableAzureStorageTest$InfrastructureConfig$$EnhancerBySpringCGLIB$$e80dc41$$FastClassBySpringCGLIB$$4d66a0c8.invoke(<generated>)
	at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:244)
	at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:331)
	at internal.org.springframework.content.azure.config.EnableAzureStorageTest$InfrastructureConfig$$EnhancerBySpringCGLIB$$e80dc41.storage(<generated>)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154)
	... 19 more
should have an Placement Service(It)  Time elapsed: 0.65 sec  <<< ERROR!
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'storage' defined in internal.org.springframework.content.azure.config.EnableAzureStorageTest$InfrastructureConfig: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.azure.storage.blob.BlobServiceClientBuilder]: Factory method 'storage' threw exception; nested exception is java.lang.IllegalArgumentException: The Azure Storage endpoint url is malformed.
	at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:658)
	at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:486)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1334)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1177)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:564)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:524)
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:944)
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:918)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583)
	at internal.org.springframework.content.azure.config.EnableAzureStorageTest.lambda$null$0(EnableAzureStorageTest.java:55)
	at impl.com.github.paulcwarren.ginkgo4j.chains.ExecutableChain.execute(ExecutableChain.java:61)
	at impl.com.github.paulcwarren.ginkgo4j.runner.SpecRunner.run(SpecRunner.java:33)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:748)
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.azure.storage.blob.BlobServiceClientBuilder]: Factory method 'storage' threw exception; nested exception is java.lang.IllegalArgumentException: The Azure Storage endpoint url is malformed.
	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185)
	at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:653)
	... 18 more
Caused by: java.lang.IllegalArgumentException: The Azure Storage endpoint url is malformed.
	at com.azure.storage.blob.BlobServiceClientBuilder.endpoint(BlobServiceClientBuilder.java:141)
	at internal.org.springframework.content.azure.config.EnableAzureStorageTest$InfrastructureConfig.storage(EnableAzureStorageTest.java:171)
	at internal.org.springframework.content.azure.config.EnableAzureStorageTest$InfrastructureConfig$$EnhancerBySpringCGLIB$$e80dc41.CGLIB$storage$0(<generated>)
	at internal.org.springframework.content.azure.config.EnableAzureStorageTest$InfrastructureConfig$$EnhancerBySpringCGLIB$$e80dc41$$FastClassBySpringCGLIB$$4d66a0c8.invoke(<generated>)
	at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:244)
	at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:331)
	at internal.org.springframework.content.azure.config.EnableAzureStorageTest$InfrastructureConfig$$EnhancerBySpringCGLIB$$e80dc41.storage(<generated>)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154)
	... 19 more
should call that configurer to help setup the store(It)  Time elapsed: 0.65 sec  <<< ERROR!
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'storage' defined in internal.org.springframework.content.azure.config.EnableAzureStorageTest$InfrastructureConfig: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.azure.storage.blob.BlobServiceClientBuilder]: Factory method 'storage' threw exception; nested exception is java.lang.IllegalArgumentException: The Azure Storage endpoint url is malformed.
	at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:658)
	at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:486)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1334)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1177)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:564)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:524)
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:944)
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:918)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583)
	at internal.org.springframework.content.azure.config.EnableAzureStorageTest.lambda$null$5(EnableAzureStorageTest.java:78)
	at impl.com.github.paulcwarren.ginkgo4j.chains.ExecutableChain.execute(ExecutableChain.java:61)
	at impl.com.github.paulcwarren.ginkgo4j.runner.SpecRunner.run(SpecRunner.java:33)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:748)
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.azure.storage.blob.BlobServiceClientBuilder]: Factory method 'storage' threw exception; nested exception is java.lang.IllegalArgumentException: The Azure Storage endpoint url is malformed.
	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185)
	at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:653)
	... 18 more
Caused by: java.lang.IllegalArgumentException: The Azure Storage endpoint url is malformed.
	at com.azure.storage.blob.BlobServiceClientBuilder.endpoint(BlobServiceClientBuilder.java:141)
	at internal.org.springframework.content.azure.config.EnableAzureStorageTest$InfrastructureConfig.storage(EnableAzureStorageTest.java:171)
	at internal.org.springframework.content.azure.config.EnableAzureStorageTest$InfrastructureConfig$$EnhancerBySpringCGLIB$$e80dc41.CGLIB$storage$0(<generated>)
	at internal.org.springframework.content.azure.config.EnableAzureStorageTest$InfrastructureConfig$$EnhancerBySpringCGLIB$$e80dc41$$FastClassBySpringCGLIB$$4d66a0c8.invoke(<generated>)
	at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:244)
	at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:331)
	at internal.org.springframework.content.azure.config.EnableAzureStorageTest$InfrastructureConfig$$EnhancerBySpringCGLIB$$e80dc41.storage(<generated>)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154)
	... 19 more
should not contains any Azure Storage beans(It)  Time elapsed: 0.651 sec  <<< ERROR!
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'storage' defined in internal.org.springframework.content.azure.config.EnableAzureStorageTest$InfrastructureConfig: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.azure.storage.blob.BlobServiceClientBuilder]: Factory method 'storage' threw exception; nested exception is java.lang.IllegalArgumentException: The Azure Storage endpoint url is malformed.
	at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:658)
	at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:486)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1334)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1177)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:564)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:524)
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:944)
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:918)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583)
	at internal.org.springframework.content.azure.config.EnableAzureStorageTest.lambda$null$9(EnableAzureStorageTest.java:95)
	at impl.com.github.paulcwarren.ginkgo4j.chains.ExecutableChain.execute(ExecutableChain.java:61)
	at impl.com.github.paulcwarren.ginkgo4j.runner.SpecRunner.run(SpecRunner.java:33)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:748)
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.azure.storage.blob.BlobServiceClientBuilder]: Factory method 'storage' threw exception; nested exception is java.lang.IllegalArgumentException: The Azure Storage endpoint url is malformed.
	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185)
	at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:653)
	... 18 more
Caused by: java.lang.IllegalArgumentException: The Azure Storage endpoint url is malformed.
	at com.azure.storage.blob.BlobServiceClientBuilder.endpoint(BlobServiceClientBuilder.java:141)
	at internal.org.springframework.content.azure.config.EnableAzureStorageTest$InfrastructureConfig.storage(EnableAzureStorageTest.java:171)
	at internal.org.springframework.content.azure.config.EnableAzureStorageTest$InfrastructureConfig$$EnhancerBySpringCGLIB$$e80dc41.CGLIB$storage$0(<generated>)
	at internal.org.springframework.content.azure.config.EnableAzureStorageTest$InfrastructureConfig$$EnhancerBySpringCGLIB$$e80dc41$$FastClassBySpringCGLIB$$4d66a0c8.invoke(<generated>)
	at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:244)
	at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:331)
	at internal.org.springframework.content.azure.config.EnableAzureStorageTest$InfrastructureConfig$$EnhancerBySpringCGLIB$$e80dc41.storage(<generated>)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154)
	... 19 more
Results :
Tests in error: 
  should have a ContentStore bean(It): Error creating bean with name 'storage' defined in internal.org.springframework.content.azure.config.EnableAzureStorageTest$InfrastructureConfig: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.azure.storage.blob.BlobServiceClientBuilder]: Factory method 'storage' threw exception; nested exception is java.lang.IllegalArgumentException: The Azure Storage endpoint url is malformed.
  should have an Placement Service(It): Error creating bean with name 'storage' defined in internal.org.springframework.content.azure.config.EnableAzureStorageTest$InfrastructureConfig: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.azure.storage.blob.BlobServiceClientBuilder]: Factory method 'storage' threw exception; nested exception is java.lang.IllegalArgumentException: The Azure Storage endpoint url is malformed.
  should call that configurer to help setup the store(It): Error creating bean with name 'storage' defined in internal.org.springframework.content.azure.config.EnableAzureStorageTest$InfrastructureConfig: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.azure.storage.blob.BlobServiceClientBuilder]: Factory method 'storage' threw exception; nested exception is java.lang.IllegalArgumentException: The Azure Storage endpoint url is malformed.
  should not contains any Azure Storage beans(It): Error creating bean with name 'storage' defined in internal.org.springframework.content.azure.config.EnableAzureStorageTest$InfrastructureConfig: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.azure.storage.blob.BlobServiceClientBuilder]: Factory method 'storage' threw exception; nested exception is java.lang.IllegalArgumentException: The Azure Storage endpoint url is malformed.
Tests run: 5, Failures: 0, Errors: 4, Skipped: 0

I stopped at this point and just skipped tests to build what I needed for the Oracle changes.

@paulcwarren
Copy link
Owner

Apologies for the inconvenience.

I see the problem. Some of these tests require environment variables to be set . Setting AWS_BUCKET will make the S3 tests pass. But the azure tests require proper endpoint URLs and connection strings. And you don't want to start messing with that.

Probably these tests should be classed as integration tests so I will see if I can move them tomorrow.

In the meantime I would suggest just commenting them out of the modules section in spring-content/pom.xml. You could also create a branch, push it and submit a prospective PR as that will trigger all of the tests to run in CI but, I guess, you probably don't want to do that just yet as you are just getting up and running.

@andye2004
Copy link
Contributor Author

No worries my friend! The joys of software development :)

@andye2004
Copy link
Contributor Author

Sorry Paul, question for you. Do you have any objections to me using TestContainers for the Oracle integration tests as opposed to having to run containers externally?

@paulcwarren
Copy link
Owner

No, not at all. I am not too familiar with github actions and test containers so I would be interested to see it.

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

No branches or pull requests

2 participants