RE: worked under 0.9.4 broken under 0.9.6

2000-04-27 Thread Walker, Eric


Having another 0.9.4 vs 0.9.6 problem:

public ConfigDAO(Connection connection) throws SQLException
{
fConnection = connection;
try
{
vStatements.put("INSERT_PROPERTY",
fConnection.prepareStatement("INSERT INTO CONFIG (CONFIGKEY, VALUE,
CONFIGKEYNAME, DESCRIPTION, CONFIGGROUP) VALUES (?, ?, ?, ?, ?)"));

vStatements.put("UPDATE_PROPERTY",
fConnection.prepareStatement("UPDATE CONFIG SET VALUE = ?, CONFIGKEYNAME =
?, DESCRIPTION = ?, CONFIGGROUP = ? WHERE CONFIGKEY = ?"));
vStatements.put("UPDATE_PROPERTY_VALUE",
fConnection.prepareStatement("UPDATE CONFIG SET VALUE = ? WHERE CONFIGKEY =
?"));

vStatements.put("DELETE_PROPERTY",
fConnection.prepareStatement("DELETE FROM CONFIG WHERE CONFIGKEY = ?"));

vStatements.put("SELECT_PROPERTY_VALUE",
fConnection.prepareStatement("SELECT VALUE FROM CONFIG WHERE CONFIGKEY =
?"));
vStatements.put("SELECT_ALL_PROPERTIES",
fConnection.prepareStatement("SELECT VALUE, CONFIGKEYNAME, DESCRIPTION,
CONFIGGROUP FROM CONFIG"));
//   vStatements.put("SELECT_BY_GROUPS",
fConnection.prepareStatement("SELECT VALUE, CONFIGKEYNAME, DESCRIPTION FROM
CONFIG WHERE CONFIGGROUP = ?"));

}
catch (Exception e)
{
throw new ConfigException(e.getMessage(), e);
}
}

fConnection.prepareStatement works under 0.9.4 throws NullPointer Exception
under 0.9.6

Thanks

Eric

-Original Message-----
From: Walker, Eric [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 25, 2000 4:43 PM
To: Orion-Interest
Subject: worked under 0.9.4 broken under 0.9.6


the following code snippet worked under 0.9.4 but generates a
NullPointerException under 0.9.6. The offending line is the lookup:

private IConfig getConfigBean()
{
if( m_configBean != null )
{
return m_configBean;
}

try
{
InitialContext initialContext = new
InitialContext();
Object obj =
initialContext.lookup("java:comp/env/ejb/ssp/StashHome");
ConfigHome configHome =
(ConfigHome)PortableRemoteObject.narrow(obj,ConfigHome.class);
m_configBean = configHome.create();
}
catch (Exception e)
{
  e.printStackTrace();
System.out.println("Can't get Configuation bean. No
items will be available!");
}

return m_configBean;
}

Any ideas?

Thanks
Eric Walker




worked under 0.9.4 broken under 0.9.6

2000-04-25 Thread Walker, Eric

the following code snippet worked under 0.9.4 but generates a
NullPointerException under 0.9.6. The offending line is the lookup:

private IConfig getConfigBean()
{
if( m_configBean != null )
{
return m_configBean;
}

try
{
InitialContext initialContext = new
InitialContext();
Object obj =
initialContext.lookup("java:comp/env/ejb/ssp/StashHome");
ConfigHome configHome =
(ConfigHome)PortableRemoteObject.narrow(obj,ConfigHome.class);
m_configBean = configHome.create();
}
catch (Exception e)
{
  e.printStackTrace();
System.out.println("Can't get Configuation bean. No
items will be available!");
}

return m_configBean;
}

Any ideas?

Thanks
Eric Walker