//上面代码省略
Connection connection = null;
try {
CallableStatement proc = null;
connection = getConnection(dataSource); proc = connection.prepareCall(sql);//编译时候无错误,部署到tomcat中提示空指针异常
}
如果这样写就没有
Connection connection = null;
CallableStatement proc = null;
try {
connection = getConnection(dataSource); proc = connection.prepareCall(sql);//无错误
}
Connection connection = null;
try {
CallableStatement proc = null;
connection = getConnection(dataSource); proc = connection.prepareCall(sql);//编译时候无错误,部署到tomcat中提示空指针异常
}
如果这样写就没有
Connection connection = null;
CallableStatement proc = null;
try {
connection = getConnection(dataSource); proc = connection.prepareCall(sql);//无错误
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货