unlockha / beanio

Automatically exported from code.google.com/p/beanio
Apache License 2.0
1 stars 0 forks source link

org.beanio.BeanIOException: Failed to load stream factory implementation class 'org.beanio.parser.DefaultStreamFactory #28

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Good morning,

I have a thread that should be write java bean in a CSV file.

When the thread invokes the write method java throw the following exception 
when instances the StreamFactory:

StreamFactory factory = StreamFactory.newInstance();

org.beanio.BeanIOException: Failed to load stream factory implementation class 
'org.beanio.parser.DefaultStreamFactory
'
        at org.beanio.StreamFactory.newInstance(StreamFactory.java:240)

Do you suggest a way to avoid this problem?

Extract of the method:
....
StreamFactory factory = StreamFactory.newInstance();
factory.load(mappingFileName);
....

BeanIO version: 1.2.2
JDK version: 1.6.0_11

There is a method that returns the String delimited by separator using the 
mapping and the java bean?

Thanks in advance for your support.

Best Regards.

Original issue reported on code.google.com by mtardi...@gmail.com on 16 Feb 2012 at 9:26

GoogleCodeExporter commented 8 years ago
Hi,

Please desconsider the error, StreamFactory work correctly. There was an error 
in the classpath libreries.

There is a method that returns the String delimited by separator using the 
mapping and the java bean?

Thanks and sorry for the mistake.

Original comment by mtardi...@gmail.com on 16 Feb 2012 at 1:56

GoogleCodeExporter commented 8 years ago
There is currently no method for marshaling a single bean object to a String, 
although this is being considered for a future release.  For now, you'll have 
create a new BeanWriter using a StringWriter to capture the formatted String 
result.  As long as you are using the same StreamFactory instance, there is not 
too much overhead creating new BeanWriters.

Original comment by kevin.s...@gmail.com on 16 Feb 2012 at 5:16