自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

chaplinlong的博客

每一次转身,只是不想错过。

  • 博客(19)
  • 资源 (3)
  • 收藏
  • 关注

原创 The file cannot be validated as the XML definition 异常解决办法

在struts2中配置验证框架时,回报上面的错误。这时候,要学会读懂英文意思。文件不能被验证的XML定义。下面看完整的错误提示。The file cannot be validated as the XML definition "http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd" that is specified as des

2016-07-30 22:14:13 7344

原创 ajax调用时,document.getElementById获取不到值

今天写ajax的一个小例子的时候,document.getElementById居然获取不到值,后来找到了,对自己很是无语。 先看jsp页面<body> <script type="text/javascript"> var req = null; function test() { var name = document.all.na

2016-07-29 16:24:06 2944

原创 struts2的下载及注意事项

先看action类。package actions;import java.io.BufferedInputStream;import java.io.FileInputStream;import java.io.FileNotFoundException;import java.io.InputStream;import java.io.UnsupportedEncodingExcepti

2016-07-28 15:15:25 417

原创 Address already in use: JVM_Bind解决办法

早上写的时候。突然myeclipse就报这个错误。Address already in use: JVM_Bind网上看到了很多解决办法。但多不靠谱。 比如。重新配个tomcat,或者换个tomcat版本…… 仔细分析英文提示:说明JVM已经被占用了。有其他程序在用,事实上你好像没有其他的程序。果断:ctrl+alt+delete.结束一个javaw.exe运行程序就好。 当然,发现还是报错,

2016-07-27 10:02:10 14448

原创 struts2中上传,及注意问题

先看简单的jsp页面 <form action="fileupload.action" method="post" enctype="multipart/form-data"> <input type="file" name="image" /> <input type="submit" /> </form> <img alt="" src="imag

2016-07-27 00:47:29 292

原创 struts的几个小异常

ERROR org.apache.struts2.dispatcher.DefaultDispatcherErrorHandler - Exception occurred during processing request: [org.hibernate.PropertyValueException: not-null property references a null or transient

2016-07-27 00:23:56 1344

原创 自定义struts2的mvc时几个异常

D:\myeclipse\my\Common\plugins\com.genuitec.eclipse.easie.tomcat.myeclipse_9.0.0.me201211011550\tomcat\bin\mystruts.dtd (系统找不到指定的文件。)1,解决方案,把你的dtd文件放那个路径下。或者dtd和xml文件不分开。See Servlet Spec 2.3, section 9

2016-07-25 23:50:17 273

原创 Myeclipse导出uml类图和导出javadoc时"错误: 编码GBK的不可映射字符"解决

1.Myeclipse导出uml类图很简单,项目-右键=new-UML2 mode-这时根据自己的需要添加就好了。 选择类图,右键export就可以导出,图片格式。 2。Myeclipse导出javadoc时,如果出现编码GBK的不可映射字符”。一般提示都很友好,你会看到那个页面出错。 第一种解决办法:导出时在VM设置行中加入以下代码 -encoding utf-8 -charset u

2016-07-24 20:01:08 511

原创 ERROR org.apache.struts2.dispatcher.DefaultDispatcherErrorHandler - Exception

出现这个错误的时候,异常后面跟着是我请求的路径。 解决办法1:检查你的Method方法配置<action name="release" class="actions.HouseAction" method="releaseHouse"> <result name="success">/page/fabu.jsp</result> <result na

2016-07-24 09:31:49 27198

原创 Caused by: java.sql.BatchUpdateException: ORA-01438: 值大于为此列指定的允许精度如何解决

Caused by: java.sql.BatchUpdateException: ORA-01438: 值大于为此列指定的允许精度 遇到这个问题时,从以下几点找原因 1.检查列所对应的实体的类型是否写错。 2.由于我用Oracle,主键是自增长,检查自增长的配置。若是用注解写的。看看有木有写错。@Id @GeneratedValue(strategy = GenerationType

2016-07-22 21:36:35 15510

原创 hibernate与struts2一起时的异常处理

今天项目刚将hibernate与struts2放一起。异常还不少。ERROR StatusLogger Log4j2 could not find a logging implementation. Please add log4j-core to the classpath. Using SimpleLogger to log to the console...log4j:WARN No app

2016-07-22 00:17:37 4783

原创 Javassist library is missing in classpath! Please add missed dependency!异常

看懂英语很简单。Javassist library 这个jar包丢了。javassist-3.20.0-GA.jar就好。 另外: struts2的核心控制器去掉了其中的.ngorg.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter

2016-07-20 08:38:20 1467

原创 java反射调用方法时,Class . can not access a member of class . with modifiers "private" 等异常解决

先看javabean类:目的使用反射调用私有方法:package com.imooc.reflect;public class Student { private void add(){ System.out.println("增加数据!"); } private int id; private String name; public int ge

2016-07-19 21:38:06 56787 2

原创 读取mystruts2的xml文件——dom4j读取

先看mystruts2的xml文件:这里写<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE mystruts SYSTEM "mystruts.dtd"><mystruts> <actions> <action name="register" class="RegisterAction">

2016-07-18 21:12:51 408

原创 编写xml文件时,The markup in the document preceding the root element must be well-formed.等bug

今天写dtd,xml文件时,连续报bug。 The markup in the document preceding the root element must be well-formed. 错误原因:ELEMENT 写成ElEMENT。 另外:xml区分大小写。<!DOCTYPE poem system "poem1.dtd" ><!doctype poem SYSTEM "poem1.

2016-07-17 18:21:10 20380

原创 Caused by: java.sql.SQLSyntaxErrorException: ORA-00942: 表或视图不存在,分页等关于hibernate测试的几个问题

今天的hibernate出现一个错误 1.异常。Caused by: java.sql.SQLSyntaxErrorException: ORA-00942: 表或视图不存在异常很明显。马上想到的是数据库连接是不是改了。我之前的用户名是htest,后面改成htest1。立刻改掉。<property name="connection.username">htest1</property>还是报错。

2016-07-16 09:15:53 20764

原创 not-null property references a null or transient value: 等关于cinema项目bug

今天改一个项目,遇到好多bug。以下一一说主要bug。 1.not-null property references a null or transient value: entity.Film.name很明显,意思是不能有一个空的属性引用。 解决:检查数据库,允许为空,发现还是报错。 在xml文件中,去掉属性中not-null即可。2.Could not execute JDBC batc

2016-07-14 23:31:22 753

原创 An AnnotationConfiguration instance is required to use...等几个异常

1.异常: An AnnotationConfiguration instance is required to use 意思是,用了注解了,自然要用注解类生成SessionFactory private static Configuration configuration = new AnnotationConfiguration();当然了,如果你用Hibernate4以上的版本,就没有这种

2016-07-13 21:42:42 3316

原创 Mapped Statements collection does not contain value for ......

这种问题,只要知道关键字Mapped 就表示是映射文件出错。在根据for后面指定的内容,就可以定位错误了。然后错误只可能是:namespace,id或者是resultType。

2016-07-13 01:21:14 371

android动画加载

android加载时,两个球交换刷新

2016-12-13

商品订购系统

hibernate,struts2,实现简单的商品订购。内含数据库。

2016-08-12

hibernate分页查询

hibernate分页查询,里面包含数据库。自己写的。能正常运行。

2016-08-12

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除