Comments (4)
I just realized that if I use a name other than 'application' as my external file i.e. -Dconfig.file=app.conf -- everything works as expected.
from config.
Are you really using single quotes like that or is that just a typo? It has to be double quotes just as in JSON.
However, if that's the problem, I have NO idea why it works on Linux.
If there's a chance you could cut this down to a test case I could run myself that might be helpful. I don't have a Windows setup but I could at least examine the behavior on Linux and we could discuss things to try on Windows.
Posting the exact exceptions on Windows with stack trace may (or may not) reveal some hints, too.
from config.
The single quotes was a typo, I am using double quotes. The exceptions that are being thrown are shown below...
Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'printDao' defined in class silbersoft.uprint.app.AppContext: Instantiation of bean fa
iled; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public silbersoft.uprint.dao.PrinterDao silbersoft.uprint.app.AppContext.printDao()] threw exc
eption; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'config' defined in class silbersoft.uprint.app.AppContext: Instantiation of bean fai
led; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public com.typesafe.config.Config silbersoft.uprint.app.AppContext.config()] threw exception; n
ested exception is com.typesafe.config.ConfigException$Parse: application.conf: include statements nested more than 50 times, you probably have a cycle in your includes. Trace: [ParseableResources(app
lication.conf), ParseableResources(application.conf), ParseableResources(application.conf), ParseableResources(application.conf), ParseableResources(application.conf), ParseableResources(application.c
onf), ParseableResources(application.conf), ParseableResources(application.conf), ParseableResources(application.conf), ParseableResources(application.conf), ParseableResources(application.conf), Pars
eableResources(application.conf), ParseableResources(application.conf), ParseableResources(application.conf), ParseableResources(application.conf), ParseableResources(application.conf), ParseableResou
rces(application.conf), ParseableResources(application.conf), ParseableResources(application.conf), ParseableResources(application.conf), ParseableResources(application.conf), ParseableResources(appli
cation.conf), ParseableResources(application.conf), ParseableResources(application.conf), ParseableResources(application.conf), ParseableResources(application.conf), ParseableResources(application.con
f), ParseableResources(application.conf), ParseableResources(application.conf), ParseableResources(application.conf), ParseableResources(application.conf), ParseableResources(application.conf), Parsea
bleResources(application.conf), ParseableResources(application.conf), ParseableResources(application.conf), ParseableResources(application.conf), ParseableResources(application.conf), ParseableResourc
es(application.conf), ParseableResources(application.conf), ParseableResources(application.conf), ParseableResources(application.conf), ParseableResources(application.conf), ParseableResources(applica
tion.conf), ParseableResources(application.conf), ParseableResources(application.conf), ParseableResources(application.conf), ParseableResources(application.conf), ParseableResources(application.conf)
, ParseableResources(application.conf), ParseableResources(application.conf)]
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:581)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1015)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:911)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:485)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:585)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:913)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:464)
at org.springframework.context.annotation.AnnotationConfigApplicationContext.(AnnotationConfigApplicationContext.java:73)
at silbersoft.uprint.app.Main.main(Main.java:36)
As you can see I am using spring as well. I will try to test this without using spring if you feel that may be a problem. But as I said this works perfectly on my linux box (using Java 6 Update 24) , just throws this exception on Windows. Very strange...
from config.
The problem looks like "include statements nested more than 50 times, you probably have a cycle in your includes."
If you name your file application then include a file called application from there, that would cause it for example
from config.
Related Issues (20)
- Find a StackOverflowError in config
- Find a StackOverflowError in config
- Find a StackOverflowError in config HOT 1
- underscore characters HOT 2
- Problems with com.typesafe/config and maven-dependency-plugin
- introduce method accepting a list of Objects to add a value
- Should this project be explicitly considered as deprecated/not supported? HOT 29
- Community fork? HOT 7
- Resolving Variable Substitutions Between Multiple Config HOT 1
- Something error when use com.typesafe.config API convert conf file to scala bean class
- withFallBack is not adding value if not present
- how to load the config with substitution details HOT 3
- Add info about which signing keys will be used for published artifacts.
- Cannot provide environment variables programmatically
- Rendering partially resolved appended array results in invalid configuration HOT 1
- Inconsistent behavior with Overflow/Underflow and Exceptions
- Regression in environment variable reading behavior HOT 2
- Add a module info HOT 6
- Question about `ConfigFactory.systemProperties()` on windows HOT 1
- When rendering unresolved ConfigConcatenation, whitespaces are erroneously included
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from config.