gFStu排错

一、配置排错

2、Tomcat7下报错,jetty不报错

 A child container failed during start
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: 

Failed to start component
Caused by: org.apache.catalina.LifecycleException: Failed to start component  

信息: validateJarFile(D:\danzhao\WEB-INF\lib\geronimo-servlet_2.5_spec-1.2.jar) - 
jar not loaded. See Servlet Spec 3.0, section 10.7.2. Offending class: 
javax/servlet/Servlet.class

</pre><p>su:将geronimo-servlet_2.5_spec-1.2.jar包去掉</p><p>2、配置文件报错</p><pre code_snippet_id="487912" snippet_file_name="blog_20150303_36_7864695" name="code" class="java">nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: 
IOException parsing XML document from class path resource 
[config/cszj/Cszj.service.xml]; nested exception is java.io.FileNotFoundException: 
clss path resource [config/cszj/Cszj.service.xml] cannot be opened because it does 
not exist

su:\WEB-INF\classes\config\global.config.xml,

	<!-- 导入业务处理对象.招生 -->
	<import resource="classpath:config/cszj/Cszj.service.xml" />	
	<!-- 导入业务处理对象.前台 -->
	<import resource="classpath:config/cszjf/Cszjf.service.xml" />

中的大写C改成小写

--------------原始Cszjf.service.xml物理文件名是小写,而配置文件中是大写。在jetty中正常,在tomcat中启动报错,如修改物理文件名为大写,tomcat运行时会包spring配置错误



二、JS排错

1、extjs表格里数据行不显示数据,但日志显示已查询数据库、firefox显示json数据传送正常

后台传json数据到浏览器时,把数据列名全部自动转成小写了

2、JS中使用了datetimefield,JSP中只引用了<G4Studio:ext.myux uxType="datatimefield"/>没有引用

<G4Studio:ext.myux uxType="monthpicker"/>
报错:不定期的提示ab没定义、构造方法没定义之类,窗口有时弹不出来


3、ViewPort应定义在其包含元素的后面

否则报错:TypeError: a is undefined

ViewPort中包含的元素应放在ViewPort之前


4、表格分组var group1中的colspan不对

报错:TypeError: this.mainBody is undefined


5、store中没有配置url

报错:Ext.data.DataProxy: DataProxy attempted to execute an API-action but found an undefined url / function. Please review your Proxy url/api-configuration.


6、管理页面,选择一条记录、点击修改后(修改页面未弹出),

报错:SyntaxError: syntax error()ext-all.js (第 1 行,第 1 列)

原因:SELECT 。。。  from csmwt_report WHERE applyID = '',未查到记录


7、使用系统自带的扩展datetime,修改显示时不显示数据

使用了format限制格式,不显示秒。

format: 'Y-m-d H:i',

填充时,数据库里的数据有秒,则extjs认为是错误的数据、不显示

Ext.getCmp('rdatetime1').setValue(dataModItem.rdatetime1.substr(0,16));



三、JSP排错

1、Tomcat7下JSP文件报错NullPoint,jetty不报错

<G4Studio:script>
   //var root_menuname = '<G4Studio:out key="rootMenuName" scope="request"/>';
   	var root_menuname = '2015单招计划';
</G4Studio:script>

su:将注释行去掉


2、PWC6305: The end tag "&lt;/G4Studio:html" is unbalanced

<G4Studio:html>内部某对 标签 没闭合


3、action跳转到jsp时报空指针错误

java.lang.NullPointerException
	at org.g4studio.core.mvc.xstruts.chain.commands.servlet.PerformForward.handleAsForward(PerformForward.java:91)
	at org.g4studio.core.mvc.xstruts.chain.commands.servlet.PerformForward.perform(PerformForward.java:72)
	at org.g4studio.core.mvc.xstruts.chain.commands.AbstractPerformForward.execute(AbstractPerformForward.java:39)
	at org.g4studio.core.mvc.xstruts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:34)
	at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
	at org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:304)
	at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)

struts-config-csar.xml里配置的JSP路径有问题,不能用..



四、SQL排错

1、如没有配置config\global.dao.xml,报错:

HTTP ERROR 500

Problem accessing /g4studio/tzxmydgz/tzxmydgz.do. Reason:

    There is no statement named Tzxmydgz.queryFiles in this SqlMap.

2、如tzxmydgz.service.xml中java类路径错误,报错:

HTTP ERROR 500

Problem accessing /g4studio/zq/tzxmydgz.do. Reason:

    com.sun.proxy.$Proxy49 cannot be cast to com.zhengqi.tzxmydgz.web.service.TzxmydgzService

3、如果config.tzxmydgz\tzxmydgz.service.xml 没有定义com.zhengqi.tzxmydgz.web.service.impl.TzxmydgzServiceImpl实现类,

在action类中调用impl类中的方法操作数据库时,会报错

java.lang.NullPointerException
	at xyafc.csmw.ar.web.AcaReportAction.saveXNXNSQ

如cszj.sqlmap.xml中,资源路径错误如

<sqlMap resource="sqlmap/cszj/Cszj.xml" />
会提示:

Error creating bean with name 'sqlMapClientG4' defined in class path resource [config/global.dao.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse config resource: class path resource [config/cszj/Cszj.sqlmap.xml];

4、实现类实现了错误的接口,如:

public class RGServiceImpl extends BaseServiceImpl implementsARService

报错:

java.lang.ClassCastException: com.sun.proxy.$Proxy53 cannot be cast to xyafc.cszj.web.service.RGService




五、ibats排错

1、查询单条记录时使用了queryForPage

报错:Cause: com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '%%     limit 0, 999999' at line 1

改为queryForList

2、sql语句中的参数为空

如:FROM csstu where stuid=$stuid$

报错:

You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1


3、sql语句的参数中的 $ 不匹配

<isNotEmpty prepend="AND" property="xbdm_q">
        xbdm = '$xbdm_q%'
</isNotEmpty>
多了个$

报错:

java.util.NoSuchElementException


4、报错:Parameter index out of range (1 > number of parameters, which is 0).

原因:参数加了引号

<insert id="insertKCBSXX" parameterClass="java.lang.String">
        INSERT into csexmhallbs(kch) values('#kchSt#')          //参数加了引号
</insert>


六、java
1、action里要跳转的view名字写错,页面空白、没有错误提示
2、导出pdf,java中输出的“数据”名称要和JS中获取的“数据”名称相同
getSessionContainer(request).setReportData("exportPDFRptPerXnw", reportData);
doExport('exportPDFRptPerXnw');
否则报错:
net.sf.jasperreports.engine.JRRuntimeException: 没有获取到报表数据对象[ReportData],请检查!




评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值