n828cl wrote:
>
>> Now here is what i know, the code that is calling the
>> Connection pool is correct
>
> All evidence to the contrary...
>
>> Is it incorrect to assume that tomcat can't find my
>> db.properties file
>
> Yes, it is incorrect to assume that, especially since Tomcat isn't looking
> for it - your code is.
>
> When you post, at a bare minimum, tell us the Tomcat version you're using,
> along with the JVM level and the platform you're running on. Since this
> particular problem appears to be related to the code in
> snaq.db.ConnectionPoolManager that's attempting to read the properties,
> you should provide that code as well.
>
> - Chuck
>
>
I am on Fedora 12 and using tomcat 6 along with java version 1.6 ******
Here is one more line of the stack trace.
[CODE]
java.lang.NullPointerException
at java.util.Properties$LineReader.readLine(Properties.java:418)
at java.util.Properties.load0(Properties.java:337)
at java.util.Properties.load(Properties.java:325)
at
snaq.db.ConnectionPoolManager.loadProperties(ConnectionPoolManager.java:278)
at
snaq.db.ConnectionPoolManager.getInstance(ConnectionPoolManager.java:167)
at
snaq.db.ConnectionPoolManager.getInstance(ConnectionPoolManager.java:221)
at com.******.<init>(*******.java:23)
[/CODE]
which correlates to this method
[CODE]
try
{
connMgr = ConnectionPoolManager.getInstance(); //THIS IS LINE
23
}
catch (Exception e)
{
e.printStackTrace();
}
[/CODE]
The init method is the following
[CODE]
InputStream is = getClass().getResourceAsStream("/db.properties");
Properties dbProps = null;
try {
dbProps = new Properties();
dbProps.load(is);
}
catch (Exception e) {
System.err.println("Can't read the properties file. " +
"Make sure db.properties is in the CLASSPATH");
return;
}
loadDrivers(dbProps);
createPools(dbProps);
[/CODE]
--
View this message in context:
http://old.nabble.com/Help-with-tomcat-configuration-tp29024672p29024973.html
Sent from the Tomcat - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]