ITeye博客

Here I Am

kevin.wang · 共 149 篇文章

telnet 失败:temporary failure in name resolution:Illegal seek

在从别的机上 telnet 过去时出现如下错误: getnameinfo: localhost: Success Temporary failure in name resolution: Illegal seek 失去了跟主机的连接。 在在服务器的本地终端中上可正常使用 telnet 。 解决方法: 我也刚遇到这个问题,只要在你的red hat linux enterprise 5的 /etc/hosts文件中增加telnet客户端的地址,例如 XX.XX.XX.XX clientmachine 如你的本地IP为192.168.1.5 你可以增加一条记录 192.168.1.5 clent…

2011-07-13 21:38 · linux · 评论(0)

RHEL5 vsftpd 上传失败

C:\Documents and Setting Connected to 192.168.220 (vsFTPd 2.0.5) User (192.168.0.11:(nonymous 331 Please specify the password Password: 230 Login successful. ftp> put d:a.txt 200 PORT command successful. Consider using PASV. 550 Permission denied. 原因: SELinux模式问题, 运行setsebool -P ftp_home_dir on指令即可。

2011-07-13 20:59 · linux · 评论(0)

Eclipse Debug Source not found for

在Eclipse下调试Servlet出现了Source not found for XxxAction.execute(...)的问题,猜想是没有将Servlet代码加入到debug路径下,以致在调试的时候找不到Source, 路径是Window --> Preferences --> Tomcat --> Source Path,在Source Path 标签下有行文字:Add java projects to source path(Eclipse debugger will search for source files in these projects),将要调试的project选…

2011-07-01 16:52 · Web · 评论(3)

java.lang.UnsupportedClassVersionError: Bad version number in .class file

java.lang.UnsupportedClassVersionError: Bad version number in .class file 编译环境和运行环境的版本不一致 如:1.6编译,1.5运行,则会报错

2011-06-17 16:57 · SE · 评论(0) · Java

IBatis 井号、美元符号区别

在Ibatis中我们使用SqlMap进行Sql查询时需要引用参数,在参数引用中遇到的符号#和$之间的区分为,#可以进行与编译,进行类型匹配,而$不进行数据类型匹配,例如: select * from table where id = #id# ,其中如果字段id为字符型,那么#id#表示的就是'id'类型,如果id为整型,那么#id#就是id类型。 select * from table where id = $id$ ,如果字段id为整型,Sql语句就不会出错,但是如果字段id为字符型,那么Sql语句应该写成 select * from table where id = '$id$'

2011-06-13 10:37 · Web · 评论(0) · SQL · iBATIS

hibernate--Could not execute JDBC batch update

Could not execute JDBC batch update; nested exception is org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update 一般为Hibernate映射文件与实体类之间的映射错误 表字段,表关联,主键等错误!

2010-12-24 14:32 · Web · 评论(0) · JDBC · Hibernate

hibernate基本配置

先加载hibernate.properties,后加载hibernate.cfg.xml [code="java"] com.mysql.jdbc.Driver jdbc:mysql://localhost/spring_hibernate_1 root bjpowernode org.hibernate.dialect.MySQLDialect true update thread [/code] ============================ hibernate.hbm2ddl.auto 它包含4个属性: create : 会根据你的model类来生成表,但是每次运行都会删除上…

2010-12-24 11:38 · Web · 评论(0) · Spring · JDBC · MySQL · Hibernate · thread

strut2---Could not parse struts.locale setting, substituting default VM locale

在Struts2-core-2.0.14.jar的org.apache.struts2目录下有 default.properties中的配置为以下(设置语言环境): ### This can be used to set your default locale and encoding scheme # struts.locale=en_US 解决方法(有两种): 1、在WEB-INF/struts.properties或者src/struts.properties文件中如下配置: struts.locale=en_GB 或者是 #struts.locale=zh_CN 2、在struts.…

2010-12-24 10:20 · Summary · 评论(0) · Scheme · Spring · Struts · XML · 配置管理

ssh--Cannot proxy target class because CGLIB2 is not available

解决方法: 1.缺少CGlib,把CGLIB Jar包放入项目就可以了. 没有实现任何接口的时候也会报这个错误! 注:cglib不包含asm,cglib-nodep包含了asm,而asm是cglib必须的三方类库,出现两个版本的原因恐怕是要避免框架集成时的版本冲突吧。 ====================================================================== Cannot convert value of type [$Proxy0 implementing org.springframework.beans.factory.Initiali…

2010-12-24 09:37 · Summary · 评论(0) · DAO · Spring · AOP · SSH · 框架

Hibernate持久化对象三种状态(transient,persistent,detached)

Hibernate的对象有3种状态,分别为:瞬时态(Transient)、 持久态(Persistent)、脱管态(Detached)。处于持久态的对象也称为PO(Persistence Object),瞬时对象和脱管对象也称为VO(Value Object)。 瞬时态 由new命令开辟内存空间的java对象, eg. Person person = new Person("xxx", "xx"); 如果没有变量对该对象进行引用,它将被java虚拟机回收。 瞬时对象在内存孤立存在,它是携带信息的载体,不和数据库的数据有任何关联关系,在Hibernate中,可通过session的save()或…

2010-12-23 13:21 · Web · 评论(0) · SQL · Hibernate · JVM · 虚拟机

Spring ref三种属性bean local parent

ref元素是用在property中,来设置需要引用的容器管理的其它Bean。 它的用法:,这里主要分析一下这三个参数的作用。 这次先看实例,再进行讲解。 · 先建立一个包:javamxj.spring.basic.ref ,然后把以下5个文件放在这个包下。 HelloBean.java [code="java"] package javamxj.spring.basic.ref; public class HelloBean { private String hello; public String getHello() { return hello; } public void setHe…

2010-12-23 12:01 · Spring · 评论(0) · Java · Spring · XML · 配置管理 · Bean

c:if与s:if的基本使用

1.使用s:if判断字符串 [code="java"] table0 [/code] 2.s:if判断null [code="java"] table1 [/code] 3.c:if判断是否为null [code="java"] table2 ${sta.index} ${u.id} ${u.username } ${u.password} [/code]

2010-12-22 16:16 · Web · 评论(0) · C · Java · C++ · C#

Got minus one from a read call

Oracle错误: Got minus one from a read call 没有连接上数据库,一般为url错误

2010-12-22 11:34 · Summary · 评论(0) · Oracle

Ant入门

[b]java-only[/b] md build\classes javac -sourcepath src -d build\classes src\oata\HelloWorld.java echo Main-Class: oata.HelloWorld>mf md build\jar jar cfm build\jar\HelloWorld.jar mf -C build\classes . java -jar build\jar\HelloWorld.jar ======================================= [b] Ant[/b] Example: […

2010-12-15 17:50 · ant&maven · 评论(0) · C · Java · C++ · XML · Ant

java命令

1.com目录下class文件打包为test.jar===jar cvf test.jar com 2.build\classes目录下===jar cf Hello.jar -C build\classes . 1与2有区别,jar包中class目录结构不同 jar cfm build\jar\Hello.jar myManifest -C build\classes .

2010-12-15 17:47 · ant&maven · 评论(0) · C · Java · C++ · C#