2 wangchengnan wangchengnan 于 2015.07.03 16:48 提问

web项目部署在tomcat6.0中,一运行就报这样的错,各路大神,帮帮小生

20150703 16:42:55 INFO org.springframework.web.struts.ContextLoaderPlugIn.init(ContextLoaderPlugIn.java:218)
ContextLoaderPlugIn for Struts ActionServlet 'action_tmp, module '': initialization started
七月 03, 2015 4:42:55 下午 org.apache.catalina.core.ApplicationContext log
信息: Initializing WebApplicationContext for Struts ActionServlet 'action_tmp', module ''
20150703 16:42:55 INFO org.springframework.context.support.AbstractApplicationContext.prepareRefresh(AbstractApplicationContext.java:383)
Refreshing org.springframework.web.context.support.XmlWebApplicationContext@17337d1: display name [WebApplicationContext for namespace 'action_tmp-servlet']; startup date [Fri Jul 03 16:42:55 CST 2015]; root of context hierarchy
20150703 16:42:56 INFO org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:303)
Loading XML bean definitions from ServletContext resource [/WEB-INF/applicationContext.xml]
20150703 16:42:58 INFO org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:398)
Bean factory for application context [org.springframework.web.context.support.XmlWebApplicationContext@17337d1]: org.springframework.beans.factory.support.DefaultListableBeanFactory@1595437
20150703 16:43:01 INFO org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:276)
Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@1595437: defining beans [UserServImpl,RoleServImpl,LoginServImpl,MenuServImpl,DutyServImpl,FuncServImpl,OrgServImpl,SysLogsServImpl,DataBackServImpl,SysChanCFGServImpl,SysBusiCFGServImpl,AgtBusiServImpl,AgtDictServImpl,PayTypeServImpl,CommHostServImpl,SecurityServImpl,SysParaCategoryServImpl,SysParaDictServImpl,LimitPayTypeServImpl,BusiSupportServImpl,CustServImpl,JyqddjServImpl,JydjkzServImpl,XmxxdjServImpl,SettleactServImpl,paraServiceImpl,payService,backService,perforService,pickService,signService,qdjdxxwhSerImpl,YwlsServiceImpl,TaskcfgSerImpl,YwLoanServImpl,YwBloanServImpl,YwFcntlServImpl]; root of factory hierarchy
20150703 16:43:07 INFO org.springframework.web.struts.ContextLoaderPlugIn.initWebApplicationContext(ContextLoaderPlugIn.java:297)
Using context class 'org.springframework.web.context.support.XmlWebApplicationContext' for servlet 'action_tmp'
20150703 16:43:07 INFO org.springframework.web.struts.ContextLoaderPlugIn.init(ContextLoaderPlugIn.java:235)
ContextLoaderPlugIn for Struts ActionServlet 'action_tmp', module '': initialization completed in 12450 ms
20150703 16:43:08 INFO org.springframework.web.struts.ContextLoaderPlugIn.init(ContextLoaderPlugIn.java:218)
ContextLoaderPlugIn for Struts ActionServlet 'action, module '': initialization started
七月 03, 2015 4:43:08 下午 org.apache.catalina.core.ApplicationContext log
信息: Initializing WebApplicationContext for Struts ActionServlet 'action', module ''
20150703 16:43:08 INFO org.springframework.context.support.AbstractApplicationContext.prepareRefresh(AbstractApplicationContext.java:383)
Refreshing org.springframework.web.context.support.XmlWebApplicationContext@1750345: display name [WebApplicationContext for namespace 'action-servlet']; startup date [Fri Jul 03 16:43:08 CST 2015]; root of context hierarchy
20150703 16:43:08 INFO org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:303)
Loading XML bean definitions from ServletContext resource [/WEB-INF/applicationContext.xml]
20150703 16:43:08 INFO org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:398)
Bean factory for application context [org.springframework.web.context.support.XmlWebApplicationContext@1750345]: org.springframework.beans.factory.support.DefaultListableBeanFactory@1a397b2
20150703 16:43:08 INFO org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:276)
Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@1a397b2: defining beans [UserServImpl,RoleServImpl,LoginServImpl,MenuServImpl,DutyServImpl,FuncServImpl,OrgServImpl,SysLogsServImpl,DataBackServImpl,SysChanCFGServImpl,SysBusiCFGServImpl,AgtBusiServImpl,AgtDictServImpl,PayTypeServImpl,CommHostServImpl,SecurityServImpl,SysParaCategoryServImpl,SysParaDictServImpl,LimitPayTypeServImpl,BusiSupportServImpl,CustServImpl,JyqddjServImpl,JydjkzServImpl,XmxxdjServImpl,SettleactServImpl,paraServiceImpl,payService,backService,perforService,pickService,signService,qdjdxxwhSerImpl,YwlsServiceImpl,TaskcfgSerImpl,YwLoanServImpl,YwBloanServImpl,YwFcntlServImpl]; root of factory hierarchy
20150703 16:43:08 INFO org.springframework.web.struts.ContextLoaderPlugIn.initWebApplicationContext(ContextLoaderPlugIn.java:297)
Using context class 'org.springframework.web.context.support.XmlWebApplicationContext' for servlet 'action'
20150703 16:43:08 INFO org.springframework.web.struts.ContextLoaderPlugIn.init(ContextLoaderPlugIn.java:235)
ContextLoaderPlugIn for Struts ActionServlet 'action', module '': initialization completed in 170 ms
20150703 16:43:08 INFO cn.com.zyx.manage.syspara.init.Log4JInit.init(Log4JInit.java:39)
load log4j file:d:/mbp/log/asmsysPure.log
20150703 16:43:08 ERROR cn.com.zyx.manage.dao.DBConn.getDBConn(DBConn.java:35)

6个回答

xl009
xl009   2015.07.03 16:58

你的DBConn.java报错了

wangchengnan
wangchengnan 不是我写的DBConn.java,他这样写也没有告诉我是什么意思,这个项目是本地从svn弄下来,然后important倒入myeclipse中,在用远程的数据库,
2 年多之前 回复
wangchengnan
wangchengnan SystemConfig SysConfig = new SystemConfig(); String ds_jndi = "java:comp/env/pro_jndi"; if (jndiName == null) jndiName = ""; if (!"".equals(jndiName.trim())) ds_jndi = jndiName.trim(); try { InitialContext ctx = new InitialContext(); DataSource ds = (DataSource) ctx.lookup(ds_jndi); con = ds.getConnection(); String jndiName = SysConfig.getProperty("JNDI_SERVER")
2 年多之前 回复
qq12020306
qq12020306   2015.07.03 17:16

ERROR cn.com.zyx.manage.dao.DBConn.getDBConn(DBConn.java:35)

wangchengnan
wangchengnan 看不懂DBConn.java类是哪里有错误,我要连接远程的Oracle,String ds_jndi = "java:comp/env/pro_jndi";String jndiName = SysConfig.getProperty("JNDI_SERVER");InitialContext ctx = new InitialContext();DataSource ds = (DataSource) ctx.lookup(ds_jndi);con = ds.getConnection();他就这样写,我看不明白,麻烦帮帮忙
2 年多之前 回复
miracle_yao
miracle_yao   2015.07.03 17:21

同楼上,看看是不是数据库连接的类写错了什么

yuke198907
yuke198907   2015.07.03 17:46

配置文件不对哦,建议好好检查一下配置文件,spring、strtus等等

wangchengnan
wangchengnan 配置?我们用Struts1的,配置看过了,没什么错误
2 年多之前 回复
cuiwei1026522829
cuiwei1026522829   Ds   Rxr 2015.07.03 19:07

链接文件配置有问题了ERROR cn.com.zyx.manage.dao.DBConn.getDBConn(DBConn.java:35),数据库链接怎么配置的!?

wangchengnan
wangchengnan 这个怎么看?String ds_jndi = "java:comp/env/pro_jndi";String jndiName = SysConfig.getProperty("JNDI_SERVER");InitialContext ctx = new InitialContext();DataSource ds = (DataSource) ctx.lookup(ds_jndi);con = ds.getConnection()他就这样配置的,帮忙看一下
2 年多之前 回复
frank_20080215
frank_20080215   2015.07.04 11:52

Spring的配置文件没有设置好

wangchengnan
wangchengnan spring里面我就加了一句<bean id="SettleactServImpl" class="cn.com.zyx.manage.system.impl.SettleactServImpl"></bean>这样的话
2 年多之前 回复
Csdn user default icon
上传中...
上传图片
插入图片