本文介绍了我们需要对iBatis到MyBatis转换工具进行设置更改吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人像 https://code.google一样使用iBatis到MyBatis转换工具.com/p/mybatis/wiki/DocUpgrade3 ?您是否需要更改设置才能使用该工具?我尝试使用此工具的2-3个版本,但始终收到此错误:

Has anyone used the iBatis to MyBatis conversion tool like in https://code.google.com/p/mybatis/wiki/DocUpgrade3? Did you need to make a setting change for the tool to work?I've tried 2-3 versions of this tool, but I keep getting this error:

     [xslt] Loading stylesheet C:\<some-path>\migrate.xslt
     [xslt] : Error! Connection timed out: connect
     [xslt] : Error! com.sun.org.apache.xml.internal.utils.WrappedRuntimeExcepti
on: Connection timed out: connect
     [xslt] Failed to process null

BUILD FAILED
C:\<some-path>\build.xml:2
4: javax.xml.transform.TransformerException: javax.xml.transform.TransformerExce
ption: com.sun.org.apache.xml.internal.utils.WrappedRuntimeException: Connection
 timed out: connect

此外,我尝试运行它的方式如下:在命令提示符下,我转到提取zip文件的目录.然后,将其中一个SQL映射文件放入Source文件夹中.然后我回到命令提示符,并运行命令"ant".我也尝试了2-3个选项,但是没有一个起作用.他们都给了同样的错误.从到目前为止我发现的情况来看,这似乎是某种代理设置问题.但是我不完全知道错误是什么,解决方案是什么,除此之外.知道如何解决这个问题吗?

Also, the way I tried to run it is as follows:In a command prompt, I changed to the directory where the zip file was extracted. Then I put in one of the SQL map files into the Source folder. Then I went back to the command prompt, and ran the command "ant". I tried this command with 2-3 options too, but none of them worked. All of them gave the same error. It seems like some kind of a proxy setting kind of issue, from what I've found so far. But I don't exactly know what the error is and what the solution is, beyond this. Any idea how to resolve this?

推荐答案

我找到了解决方案:

  1. 首先,我尝试通过在命令提示符下设置此属性来运行Ant任务:设置ANT_OPTS =-Dhttp.proxyHost = proxy -Dhttp.proxyPort = 8080"
  1. At first, I tried to run the Ant task by setting this property via the command prompt:set ANT_OPTS="-Dhttp.proxyHost=proxy -Dhttp.proxyPort=8080"

然后在同一会话中运行:蚂蚁

And then ran in the same session: ant

但这继续给我同样的错误.

But this continued to give me the same error.

  1. 因此,我从源文件中删除了<!DOCTYPE..>行,然后执行了上述步骤.就像魔术一样!
  1. So, I took out the <!DOCTYPE..> line from the source file, and then did the above steps. It worked like magic!

这篇关于我们需要对iBatis到MyBatis转换工具进行设置更改吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-22 09:29