<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[wangxinzhen的专栏]]></title><description><![CDATA[]]></description><link>https://blog.youkuaiyun.com/wangxinzhen</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; wangxinzhen]]></copyright><item><title><![CDATA[dubboMain启动报错 appletviewer ＜options＞ url]]></title><link>https://blog.youkuaiyun.com/wangxinzhen/article/details/127896739</link><guid>https://blog.youkuaiyun.com/wangxinzhen/article/details/127896739</guid><author>wangxinzhen</author><pubDate>Thu, 17 Nov 2022 07:50:29 +0800</pubDate><description><![CDATA[dubboMain启动报错 appletviewer  url]]></description><category></category></item><item><title><![CDATA[单元测试如何mock当前类的其他私有方法调用]]></title><link>https://blog.youkuaiyun.com/wangxinzhen/article/details/121162753</link><guid>https://blog.youkuaiyun.com/wangxinzhen/article/details/121162753</guid><author>wangxinzhen</author><pubDate>Fri, 05 Nov 2021 15:35:03 +0800</pubDate><description><![CDATA[在我们编写单元测试案例的过程中，如果存在mock当前类内其他私有方法的需求，该如何实现呢？

（1）mock有返回值的私有方法

a.首先需要在测试类上添加RunWith注解  

     @RunWith(PowerMockito.class)

b.其次需要在测试类添加PrepareForTest注解

     @PrepareForTest(待测试的类名称)

c.在测试方法中使用spy方法创建测试对象

d.对需要模拟的方法执行模拟

PowerMo...]]></description><category></category></item><item><title><![CDATA[获取IBM MQ队列消息失败 JMSWMQ2002 2080]]></title><link>https://blog.youkuaiyun.com/wangxinzhen/article/details/121157696</link><guid>https://blog.youkuaiyun.com/wangxinzhen/article/details/121157696</guid><author>wangxinzhen</author><pubDate>Fri, 05 Nov 2021 10:32:26 +0800</pubDate><description><![CDATA[1) 获取IBM MQ队列消息失败，报错 JMSWMQ2002, 错误码2080

2) 问题原因

   队列里消息过大，超过了服务器连接通道定义的MAXMSGL属性长度，导致JMS客户端或amqsget命令获取消息失败。

3）解决方案

   A.查询确认服务器连接通道的MAXMSGL属性，调整至大于消息长度。

   B.执行命令查询服务器连接通道的MAXMSGL属性配置：

     dis chl(SYSTEM.DEF.SVRCONN)

   C.执行命令...]]></description><category></category></item><item><title><![CDATA[Table space access is not allowed]]></title><link>https://blog.youkuaiyun.com/wangxinzhen/article/details/113608062</link><guid>https://blog.youkuaiyun.com/wangxinzhen/article/details/113608062</guid><author>wangxinzhen</author><pubDate>Wed, 03 Feb 2021 16:02:44 +0800</pubDate><description><![CDATA[访问数据库报错如下：

com.ibm.db2.jcc.am.SqlException: Table space access is not allowed.. SQLCODE=-290, SQLSTATE=55039，DRIVER=3.72.52;

解决方案：

根据错误描述确定问题原因为表空间不可访问，

1）首先查看表空间状态：

执行db2 list tablespaces命令，查看表空间状态。

查看各表空间的状态(State)，若表空间状态不为0x0000，表明该表空间有问题。

数据库的异常]]></description><category></category></item><item><title><![CDATA[如何实现多线程之间的交叉运行？]]></title><link>https://blog.youkuaiyun.com/wangxinzhen/article/details/105463975</link><guid>https://blog.youkuaiyun.com/wangxinzhen/article/details/105463975</guid><author>wangxinzhen</author><pubDate>Sun, 12 Apr 2020 06:44:51 +0800</pubDate><description><![CDATA[问题：创建20个线程，其中10个线程将数据备份到A数据库中，另外10个线程将数据备份到B数据库中，问如何做到备份A数据库和备份B数据库交叉进行？

解析：多线程的运行是杂乱无序的，如何将杂乱无序的多线程运行变成有序的执行呢。思路为首先要使20个线程共享操作数据库的资源，只有20个线程有共享资源了才能统一协调线程的运行，有了共享资源就能实现线程的交叉运行了吗？答案使否定的，还要使用线程的等待/通知(...]]></description><category></category></item><item><title><![CDATA[shell脚本获取select返回值]]></title><link>https://blog.youkuaiyun.com/wangxinzhen/article/details/105106471</link><guid>https://blog.youkuaiyun.com/wangxinzhen/article/details/105106471</guid><author>wangxinzhen</author><pubDate>Wed, 25 Mar 2020 22:35:15 +0800</pubDate><description><![CDATA[在shell脚本中，如果需要使用从DB2数据库中查询出来的数据，需要使用db2 -x命令：

1) 使用sql语句获取指定日期的下一日期

db2 connect to &lt;databse-name&gt;

db2 set schema &lt;schema-name&gt;

next_date=`db2 -x "select date('YYYY-MM-DD‘）+ 1 days from...]]></description><category></category></item><item><title><![CDATA[DB2分区表数据迁移步骤]]></title><link>https://blog.youkuaiyun.com/wangxinzhen/article/details/104840298</link><guid>https://blog.youkuaiyun.com/wangxinzhen/article/details/104840298</guid><author>wangxinzhen</author><pubDate>Fri, 13 Mar 2020 15:10:41 +0800</pubDate><description><![CDATA[1.业务背景

 交易表存储了3个月交易数据，单表数据量达到了2亿条左右。此前为解决交易表数据量过大问题，已将联机交易表创建为分区

表，但随着交易量的增长，分区表也不能完全解决单表数据量过大的问题。为进一步解决交易表数据量过大，提升联机交易处理性

能，为当前表创建了历史表（也创建为分区表），且设定当前表仅保留15天数据，历史表保留2.5个月的数据。

2. 分区表数据移植步骤

在...]]></description><category></category></item><item><title><![CDATA[DB2将DETACH下来的临时表ATTACH到分区表报错SQL20307N SQLSTATE=428GE]]></title><link>https://blog.youkuaiyun.com/wangxinzhen/article/details/104837290</link><guid>https://blog.youkuaiyun.com/wangxinzhen/article/details/104837290</guid><author>wangxinzhen</author><pubDate>Fri, 13 Mar 2020 12:09:37 +0800</pubDate><description><![CDATA[1.报错信息

DB21034E The command was processedd as an SQL statement because it was not a valid Command Line Processor command.

During SQL processing it returned:

SQL20307N Table "TEST.TABLE_PART202003...]]></description><category></category></item><item><title><![CDATA[db2操作从分区表DETACH下来的临时表报错]]></title><link>https://blog.youkuaiyun.com/wangxinzhen/article/details/104836426</link><guid>https://blog.youkuaiyun.com/wangxinzhen/article/details/104836426</guid><author>wangxinzhen</author><pubDate>Fri, 13 Mar 2020 11:03:52 +0800</pubDate><description><![CDATA[DB21034E The command was processed as an SQL statement because it was not a valid Command Line Processor.

During SQL processing it returned:

SQL20285N The statement or command was not processed ei...]]></description><category></category></item><item><title><![CDATA[spring boot配置JDBC数据源连接DB2数据库]]></title><link>https://blog.youkuaiyun.com/wangxinzhen/article/details/97491914</link><guid>https://blog.youkuaiyun.com/wangxinzhen/article/details/97491914</guid><author>wangxinzhen</author><pubDate>Sat, 27 Jul 2019 10:30:18 +0800</pubDate><description><![CDATA[1.POM文件中添加JDBC依赖和DB2驱动依赖


&lt;!--引入JDBC依赖 --&gt;
&lt;dependency&gt;
    &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
    &lt;artifactId&gt;spring-boot-starter-jdbc&lt;/artifactId&gt;
&lt;/...]]></description><category></category></item><item><title><![CDATA[DB2执行load命令导入数据时报SQL2036N错误]]></title><link>https://blog.youkuaiyun.com/wangxinzhen/article/details/90476803</link><guid>https://blog.youkuaiyun.com/wangxinzhen/article/details/90476803</guid><author>wangxinzhen</author><pubDate>Thu, 23 May 2019 11:21:21 +0800</pubDate><description><![CDATA[错误描述：

执行load命令: load from bsnBook.ixf of ixf insert into cls_ibps_bsn_book

报错信息如下：

SQL2036N The path for the file,named pipe,or device "/home/upsdb/bsnBook.ixf" is not valid.

解决方案：

该错误是因为没有读取到导入文...]]></description><category></category></item><item><title><![CDATA[MAVEN学习笔记]]></title><link>https://blog.youkuaiyun.com/wangxinzhen/article/details/89819251</link><guid>https://blog.youkuaiyun.com/wangxinzhen/article/details/89819251</guid><author>wangxinzhen</author><pubDate>Sun, 05 May 2019 00:15:45 +0800</pubDate><description><![CDATA[在以前的项目中，jar包一般放在工程的WEB-INF/lib目录下。随着科技的发展，很多的生成力工具被创造了出来，而Maven就是一种为了解放我们程序员的生产力工具。

Maven是一套软件工程管理和整合工具。他有很多的功能包括但不限于以下几点：

工程的创建、构建、测试
	依赖的管理
	仓库的管理
	自动化部署
Maven中常用的一些术语介绍：

仓库（repository...]]></description><category></category></item><item><title><![CDATA[java创建进程的方法]]></title><link>https://blog.youkuaiyun.com/wangxinzhen/article/details/89736143</link><guid>https://blog.youkuaiyun.com/wangxinzhen/article/details/89736143</guid><author>wangxinzhen</author><pubDate>Wed, 01 May 2019 11:04:21 +0800</pubDate><description><![CDATA[java创建进程有两种方法：

1.使用Runtime的exec(String cmdarray[])方法创建进程

代码如下:


String [] cmd={"cmd","/c","start dir"};
Runtime rt = Runtime.getRuntime();
Process proc=rt.exec(cmd);

执行结果如下:



2.使用ProcessBuilder的...]]></description><category></category></item><item><title><![CDATA[spring boot启动报错: Failed to bind properties under 'spring.datasource']]></title><link>https://blog.youkuaiyun.com/wangxinzhen/article/details/89006623</link><guid>https://blog.youkuaiyun.com/wangxinzhen/article/details/89006623</guid><author>wangxinzhen</author><pubDate>Wed, 03 Apr 2019 22:45:24 +0800</pubDate><description><![CDATA[spring boot服务启动时，如果报出如下错误：

Failed to bind properties under 'server' to org.springframework.boot.autoconfigure.web.ServerProperties或

Failed to bind properties under 'spring.datasource' to org.springf...]]></description><category></category></item><item><title><![CDATA[spring boot 服务启动报错：Failed to determine a suitable driver class]]></title><link>https://blog.youkuaiyun.com/wangxinzhen/article/details/88983016</link><guid>https://blog.youkuaiyun.com/wangxinzhen/article/details/88983016</guid><author>wangxinzhen</author><pubDate>Tue, 02 Apr 2019 22:33:23 +0800</pubDate><description><![CDATA[spring boot配置DB2数据源，服务启动时报错，错误信息如下：

Failed to determine a suitable driver class

出现该问题的原因为spring boot服务启动时找不到db2驱动类的jar包或db2数据源的配置文件。

解决方案如下：

(1) 确认POM中是否已依赖db2驱动包: db2jcc4和db2jcc_license_cu


&lt;...]]></description><category></category></item><item><title><![CDATA[设计模式-代理模式]]></title><link>https://blog.youkuaiyun.com/wangxinzhen/article/details/88729742</link><guid>https://blog.youkuaiyun.com/wangxinzhen/article/details/88729742</guid><author>wangxinzhen</author><pubDate>Fri, 22 Mar 2019 00:37:34 +0800</pubDate><description><![CDATA[代理模式是一种结构型模式，分为静态代理和动态代理。

静态代理是指由程序员手工创建代理对象；
	动态代理是指代理对象是程序在运行过程中采用反射机制动态创建的。
代理模式能够解决哪些问题？

控制客户端对真实对象的访问
	对被代理对象添加额外的功能，即功能增强。
代理模式使用场景有哪些？

远程代理
	虚拟代理
	保护代理
静态代理的示例代码如下：


public interface Subjec...]]></description><category></category></item><item><title><![CDATA[单例模式-注册式单例]]></title><link>https://blog.youkuaiyun.com/wangxinzhen/article/details/88653536</link><guid>https://blog.youkuaiyun.com/wangxinzhen/article/details/88653536</guid><author>wangxinzhen</author><pubDate>Tue, 19 Mar 2019 00:47:07 +0800</pubDate><description><![CDATA[注册式单例又称为登记式单例，就是将每一个实例都登记到某一个地方，使用唯一的标识获取实例。

注册式单例有两种：一种式枚举登记，一种是容器缓存。

1) 枚举式单例代码如下：


public enum EnumSingleton {
    INSTANCE;
    private Object data;

    public Object getData() {
        retur...]]></description><category></category></item><item><title><![CDATA[单例模式-序列化破坏单例模式及解决办法]]></title><link>https://blog.youkuaiyun.com/wangxinzhen/article/details/88652884</link><guid>https://blog.youkuaiyun.com/wangxinzhen/article/details/88652884</guid><author>wangxinzhen</author><pubDate>Mon, 18 Mar 2019 23:47:49 +0800</pubDate><description><![CDATA[序列化破环单例模式，实例代码如下：

(1) 饿汉式单例模式，实现了序列化接口


public class SeriableSingleton implements Serializable{
    private static final SeriableSingleton instance=new SeriableSingleton();
    private SeriableSingl...]]></description><category></category></item><item><title><![CDATA[单例模式-高性能单例模式]]></title><link>https://blog.youkuaiyun.com/wangxinzhen/article/details/88650894</link><guid>https://blog.youkuaiyun.com/wangxinzhen/article/details/88650894</guid><author>wangxinzhen</author><pubDate>Mon, 18 Mar 2019 21:43:19 +0800</pubDate><description><![CDATA[使用volatile+双重检查实现高性能单例模式


public class Singleton {
 //此处使用volatile关键字避免过多线程进入synchronized同步方法
 private static volatile Singleton instance= null;
 private Singleton(){
 }
 //该方法使用了双重检查
...]]></description><category></category></item><item><title><![CDATA[设计模式-工厂模式]]></title><link>https://blog.youkuaiyun.com/wangxinzhen/article/details/88630088</link><guid>https://blog.youkuaiyun.com/wangxinzhen/article/details/88630088</guid><author>wangxinzhen</author><pubDate>Sun, 17 Mar 2019 23:56:59 +0800</pubDate><description><![CDATA[工厂模式共分为到3类，分别是简单工厂模式、工厂方法模式和抽象工厂模式。

简单工厂模式是指原来由程序中创建对象改为由工厂创建对象，代码如下：


public interface Animal {
    public void sound();
}

public class Cat implements Animal {
    public Cat(){
        System.out...]]></description><category></category></item></channel></rss>