NutzCN Logo
问答 wzflow 启动获取CLOB字段值
发布于 2941天前 作者 wx_dc1uhcoqb670vfspa24d 3909 次浏览 复制 上一个帖子 下一个帖子
标签:
/**
 * @author Wizzer.cn
 * @time   2012-9-13 下午6:13:55
 *
 */
public class DBObject {
	private static final Log log = Logs.get();
	/*
	 * 获取CLOB字段值
	 */
	public static String getClobBody(ResultSet rs, String colnumName)
	{
		String result = "";
		try
		{
			String str_Clob = "";
			StringBuffer strBuffer_CLob = new StringBuffer();
			strBuffer_CLob.append("");
			oracle.sql.CLOB clob = (oracle.sql.CLOB) rs.getClob(colnumName);
			BufferedReader in = new BufferedReader(clob.getCharacterStream());
			while ((str_Clob = in.readLine()) != null)
			{
				strBuffer_CLob.append(str_Clob + "\n");
			}
			in.close();
			result = strBuffer_CLob.toString();
		}
		catch (Exception e)
		{
			log.debug(e.getMessage());
		}
		return result;
	}
}

这是什么类提供的方法,没有注意到
oracle.sql.CLOB clob = (oracle.sql.CLOB) rs.getClob(colnumName);

9 回复

oracle特有的吧

是wzflow项目中的,我下载学习

index.html
index.htm
index.jsp

http://10.0.0.111:6666/index.html
看不到启动页面
也没有接受请求的日志

2017-11-15 16:29:56,200 [DEBUG][org.springframework.core.env.PropertySourcesPropertyResolver] - Searching for key 'spring.liveBeansView.mbeanDomain' in [servletConfigInitParams]
2017-11-15 16:29:56,201 [DEBUG][org.springframework.core.env.PropertySourcesPropertyResolver] - Searching for key 'spring.liveBeansView.mbeanDomain' in [servletContextInitParams]
2017-11-15 16:29:56,201 [DEBUG][org.springframework.core.env.PropertySourcesPropertyResolver] - Searching for key 'spring.liveBeansView.mbeanDomain' in [jndiProperties]
2017-11-15 16:29:56,201 [DEBUG][org.springframework.jndi.JndiTemplate] - Looking up JNDI object with name [java:comp/env/spring.liveBeansView.mbeanDomain]
2017-11-15 16:29:56,203 [DEBUG][org.springframework.jndi.JndiLocatorDelegate] - Converted JNDI name [java:comp/env/spring.liveBeansView.mbeanDomain] not found - trying original name [spring.liveBeansView.mbeanDomain]. javax.naming.NameNotFoundException: Name [spring.liveBeansView.mbeanDomain] is not bound in this Context. Unable to find [spring.liveBeansView.mbeanDomain].
2017-11-15 16:29:56,203 [DEBUG][org.springframework.jndi.JndiTemplate] - Looking up JNDI object with name [spring.liveBeansView.mbeanDomain]
2017-11-15 16:29:56,203 [DEBUG][org.springframework.jndi.JndiPropertySource] - JNDI lookup for name [spring.liveBeansView.mbeanDomain] threw NamingException with message: Name [spring.liveBeansView.mbeanDomain] is not bound in this Context. Unable to find [spring.liveBeansView.mbeanDomain].. Returning null.
2017-11-15 16:29:56,204 [DEBUG][org.springframework.core.env.PropertySourcesPropertyResolver] - Searching for key 'spring.liveBeansView.mbeanDomain' in [systemProperties]
2017-11-15 16:29:56,204 [DEBUG][org.springframework.core.env.PropertySourcesPropertyResolver] - Searching for key 'spring.liveBeansView.mbeanDomain' in [systemEnvironment]
2017-11-15 16:29:56,204 [DEBUG][org.springframework.core.env.PropertySourcesPropertyResolver] - Could not find key 'spring.liveBeansView.mbeanDomain' in any property source. Returning [null]
2017-11-15 16:29:56,205 [DEBUG][org.springframework.beans.factory.support.DefaultListableBeanFactory] - Returning cached instance of singleton bean 'cxf'
2017-11-15 16:29:56,209 [DEBUG][org.apache.cxf.resource.DefaultResourceManager] - resolving resource </WEB-INF/cxfServletStaticResourcesMap.txt> type <class java.io.InputStream>
2017-11-15 16:29:56,209 [DEBUG][org.apache.cxf.resource.DefaultResourceManager] - resolving resource </cxfServletStaticResourcesMap.txt> type <class java.io.InputStream>
[2017-11-15 04:29:56,494] Artifact wzflow:war exploded: Artifact is deployed successfully
[2017-11-15 04:29:56,494] Artifact wzflow:war exploded: Deploy took 9,420 milliseconds

是什么地方的问题吗 ,刚挡下来的代码

完整启动日志

mysql 数据库 这个类可以删掉

没有让他强制转换
Clob clob = rs.getClob(colnumName);
我这样修改了一下

web.xml中

index.html
index.htm
index.jsp

这样对应的是tomcat下的webapp下的index.jsp
但是
http://localhost:6666/index.jsp 手动拼接地址都访问不到项目
大神们,知道原因吗

添加回复
请先登陆
回到顶部