Hello,

I am a total newbie at Java in general, but I do think I discovered a bug in the "Overview" section of the API docs for DBCP. In both example code blocks, this line appears:

DriverManagerConnectionFactory connectionFactory = new DriverConnectionFactory("jdbc:some:connect:string",null);

(Note the "new" class name does not match the declared type at the beginning of the line.)

Tomcat 4 barfs up an error on this line:

java:59: cannot resolve symbol
symbol : constructor DriverConnectionFactory (java.lang.String,)
location: class org.apache.commons.dbcp.DriverConnectionFactory

However changing the code to be like this works:

DriverManagerConnectionFactory connectionFactory = new DriverManagerConnectionFactory("jdbc:some:connect:string",null);

Note that the class name after the " = new" matches the declaration at the front of the line.

If I've made a mistake here, I'd appreciate knowing. Thank you!

-joe


--
To unsubscribe, e-mail: <mailto:commons-dev-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@;jakarta.apache.org>

Reply via email to