java.io.FileNotFoundException: /target/test.log

Posted by sword101 on Stack Overflow See other posts from Stack Overflow or by sword101
Published on 2011-01-05T10:36:59Z Indexed on 2011/01/05 10:53 UTC
Read the original article Hit count: 589

Filed under:
|
|
|

Greetings all I am using Apache Camel and Apache CXF in this example:

http://camel.apache.org/better-jms-transport-for-cxf-webservice-using-apache-camel.data/cxfcamelexample.zip

I followed the readme and when tried to run the client & server classes i got this exception:

log4j:ERROR setFile(null,true) call failed.
java.io.FileNotFoundException: /target/test.log (No such file or directory)
    at java.io.FileOutputStream.openAppend(Native Method)
    at java.io.FileOutputStream.<init>(FileOutputStream.java:177)
    at java.io.FileOutputStream.<init>(FileOutputStream.java:102)
    at org.apache.log4j.FileAppender.setFile(FileAppender.java:289)
    at org.apache.log4j.FileAppender.activateOptions(FileAppender.java:163)
    at org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:256)
    at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:132)
    at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:96)
    at org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:654)
    at org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:612)
    at org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyConfigurator.java:509)
    at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:415)
    at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:441)
    at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:470)
    at org.apache.log4j.LogManager.<clinit>(LogManager.java:122)
    at org.apache.log4j.Logger.getLogger(Logger.java:104)
    at org.apache.commons.logging.impl.Log4JLogger.getLogger(Log4JLogger.java:283)
    at org.apache.commons.logging.impl.Log4JLogger.<init>(Log4JLogger.java:108)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
    at org.apache.commons.logging.impl.LogFactoryImpl.createLogFromClass(LogFactoryImpl.java:1040)
    at org.apache.commons.logging.impl.LogFactoryImpl.discoverLogImplementation(LogFactoryImpl.java:838)
    at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:601)
    at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:333)
    at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:307)
    at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:645)
    at org.springframework.context.support.AbstractApplicationContext.<init>(AbstractApplicationContext.java:146)
    at org.springframework.context.support.AbstractRefreshableApplicationContext.<init>(AbstractRefreshableApplicationContext.java:84)
    at org.springframework.context.support.AbstractRefreshableConfigApplicationContext.<init>(AbstractRefreshableConfigApplicationContext.java:59)
    at org.springframework.context.support.AbstractXmlApplicationContext.<init>(AbstractXmlApplicationContext.java:58)
    at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:136)
    at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:93)
    at com.example.customerservice.impl.CustomerServiceClient.main(CustomerServiceClient.java:34)

so any ideas, how to solve this exception ?

© Stack Overflow or respective owner

Related posts about spring

Related posts about java-ee