1.Unknown initial character set index ‘192‘ received from server. Initial client character set can be forced via the ‘characterEncoding‘ property.
Exception in thread "main" 姓名如下:
java.lang.NullPointerException
at com.ctgusec.zhupan.ExampleMain.main(ExampleMain.java:77)
这个异常解决方法为:在jdbc路径上加上?autoReconnect=true&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true。
2.org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘transactionInterceptor‘ defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property ‘hibernateProperties‘ of bean class [org.springframework.transaction.interceptor.TransactionInterceptor]: Bean property ‘hibernateProperties‘ is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?
这个异常说的很明白就是hibernateProperties引起的,原因是在applicationcontext.xml的事务拦截器中定义了这段代码
注释之后就好用。