You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by "Morearty, Brian" <Br...@intuit.com> on 2010/03/26 01:41:21 UTC
Eclipse error when running Ibator
Hi,
My team has 3 developers. One of us is having the following problem. The
other two of us are not. Does anyone have ideas for how to fix this? We
are using Ibator 1.2.2.
Right-click on IbatorConfig.xml and choose "Generate iBATIS Artifacts."
Progress bar goes part-way, then shows this error:
Severity: Error
Message: Unexpected error while running Ibator.
Exception Stack Trace:
java.lang.ArrayIndexOutOfBoundsException: 247
at
org.eclipse.jdt.internal.formatter.CodeFormatterVisitor.visit(CodeFormat
terVisitor.java:3239)
at
org.eclipse.jdt.internal.compiler.ast.ConstructorDeclaration.traverse(Co
nstructorDeclaration.java:497)
at
org.eclipse.jdt.internal.formatter.CodeFormatterVisitor.format(CodeForma
tterVisitor.java:542)
at
org.eclipse.jdt.internal.formatter.CodeFormatterVisitor.formatClassBodyD
eclarations(CodeFormatterVisitor.java:1528)
at
org.eclipse.jdt.internal.formatter.CodeFormatterVisitor.format(CodeForma
tterVisitor.java:772)
at
org.eclipse.jdt.internal.formatter.DefaultCodeFormatter.internalFormatCl
assBodyDeclarations(DefaultCodeFormatter.java:452)
at
org.eclipse.jdt.internal.formatter.DefaultCodeFormatter.formatClassBodyD
eclarations(DefaultCodeFormatter.java:229)
at
org.eclipse.jdt.internal.formatter.DefaultCodeFormatter.format(DefaultCo
deFormatter.java:202)
at
org.eclipse.jdt.internal.formatter.DefaultCodeFormatter.format(DefaultCo
deFormatter.java:188)
at
org.eclipse.jdt.internal.core.dom.rewrite.ASTRewriteFormatter.formatStri
ng(ASTRewriteFormatter.java:238)
at
org.eclipse.jdt.internal.core.dom.rewrite.ASTRewriteFormatter.formatNode
(ASTRewriteFormatter.java:363)
at
org.eclipse.jdt.internal.core.dom.rewrite.ASTRewriteFormatter.getFormatt
edResult(ASTRewriteFormatter.java:179)
at
org.eclipse.jdt.internal.core.dom.rewrite.ASTRewriteAnalyzer.doTextInser
t(ASTRewriteAnalyzer.java:1152)
at
org.eclipse.jdt.internal.core.dom.rewrite.ASTRewriteAnalyzer$ListRewrite
r.rewriteList(ASTRewriteAnalyzer.java:569)
at
org.eclipse.jdt.internal.core.dom.rewrite.ASTRewriteAnalyzer.rewritePara
graphList(ASTRewriteAnalyzer.java:997)
at
org.eclipse.jdt.internal.core.dom.rewrite.ASTRewriteAnalyzer.visit(ASTRe
writeAnalyzer.java:1575)
at
org.eclipse.jdt.core.dom.TypeDeclaration.accept0(TypeDeclaration.java:46
7)
at
org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2480)
at
org.eclipse.jdt.core.dom.rewrite.ASTRewrite.internalRewriteAST(ASTRewrit
e.java:271)
at
org.eclipse.jdt.core.dom.rewrite.ASTRewrite.rewriteAST(ASTRewrite.java:2
02)
at
org.apache.ibatis.ibator.eclipse.core.merge.JavaFileMerger.getMergedSour
ce(Unknown Source)
at
org.apache.ibatis.ibator.eclipse.core.callback.EclipseShellCallback.merg
eJavaFile(Unknown Source)
at org.apache.ibatis.ibator.api.Ibator.generate(Unknown
Source)
at org.apache.ibatis.ibator.api.Ibator.generate(Unknown
Source)
at
org.apache.ibatis.ibator.eclipse.ui.actions.RunIbatorThread.run(Unknown
Source)
at
org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1800)
at
org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1782)
at
org.apache.ibatis.ibator.eclipse.ui.actions.RunIbatorAction$IbatorRunner
.run(Unknown Source)
at
org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalCon
text.java:121)
Session Data:
eclipse.buildId=
java.version=1.6.0_18
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
Framework arguments: -product org.eclipse.epp.package.jee.product
Command-line arguments: -os win32 -ws win32 -arch x86 -product
org.eclipse.epp.package.jee.product
WORKAROUND: deleting the previously-generated "XyzExample.java" file
before the code-gen eliminates this error. But it's kind of annoying to
have to do that.
Since the stack mentions that Eclipse JDT is parsing a constructor we
tried an experiment: delete all the constructors from XyzExample.java
and then re-generate the artifacts. We still got the same error.
Brian Morearty | Grow Your Business Division, Intuit | Staff Software
Engineer | direct 650-944-6852
RE: Eclipse error when running Ibator
Posted by "Morearty, Brian" <Br...@intuit.com>.
Good questions, Jeff.
1. We've tried to identify what's different about the failing machine. We can't identify any differences. Same version of Eclipse (or at least same datestamp and build number on the About box), same JRE, same Eclipse distribution, same version and build of Ibator (1.2.2). Or at least I think it's the same JRE--it might be one minor build different. I will check that when that engineer gets back to her desk.
2. Interesting idea. Ok, we'll take a look at the Java code formatting options.
Brian
-----Original Message-----
From: Jeff Butler [mailto:jeffgbutler@gmail.com]
Sent: Friday, March 26, 2010 12:49 PM
To: user-java@ibatis.apache.org
Subject: Re: Eclipse error when running Ibator
Two questions - one obvious, one not so obvious :)
1. (Obvious) What's different in the failing environment? (Different
Eclipse version? Different JRE? Different Eclipse distribution?
etc.)
2. (not so obvious) This looks to be failing in the code formatter.
I'd take a close look at the Java code formatting options on the
failing machine - what's different there?
Jeff Butler
On Thu, Mar 25, 2010 at 7:41 PM, Morearty, Brian
<Br...@intuit.com> wrote:
> Hi,
>
>
>
> My team has 3 developers. One of us is having the following problem. The
> other two of us are not. Does anyone have ideas for how to fix this? We are
> using Ibator 1.2.2.
>
>
>
> Right-click on IbatorConfig.xml and choose "Generate iBATIS Artifacts."
> Progress bar goes part-way, then shows this error:
>
>
>
> Severity: Error
>
> Message: Unexpected error while running Ibator.
>
> Exception Stack Trace:
>
> java.lang.ArrayIndexOutOfBoundsException: 247
>
> at
> org.eclipse.jdt.internal.formatter.CodeFormatterVisitor.visit(CodeFormatterVisitor.java:3239)
>
> at
> org.eclipse.jdt.internal.compiler.ast.ConstructorDeclaration.traverse(ConstructorDeclaration.java:497)
>
> at
> org.eclipse.jdt.internal.formatter.CodeFormatterVisitor.format(CodeFormatterVisitor.java:542)
>
> at
> org.eclipse.jdt.internal.formatter.CodeFormatterVisitor.formatClassBodyDeclarations(CodeFormatterVisitor.java:1528)
>
> at
> org.eclipse.jdt.internal.formatter.CodeFormatterVisitor.format(CodeFormatterVisitor.java:772)
>
> at
> org.eclipse.jdt.internal.formatter.DefaultCodeFormatter.internalFormatClassBodyDeclarations(DefaultCodeFormatter.java:452)
>
> at
> org.eclipse.jdt.internal.formatter.DefaultCodeFormatter.formatClassBodyDeclarations(DefaultCodeFormatter.java:229)
>
> at
> org.eclipse.jdt.internal.formatter.DefaultCodeFormatter.format(DefaultCodeFormatter.java:202)
>
> at
> org.eclipse.jdt.internal.formatter.DefaultCodeFormatter.format(DefaultCodeFormatter.java:188)
>
> at
> org.eclipse.jdt.internal.core.dom.rewrite.ASTRewriteFormatter.formatString(ASTRewriteFormatter.java:238)
>
> at
> org.eclipse.jdt.internal.core.dom.rewrite.ASTRewriteFormatter.formatNode(ASTRewriteFormatter.java:363)
>
> at
> org.eclipse.jdt.internal.core.dom.rewrite.ASTRewriteFormatter.getFormattedResult(ASTRewriteFormatter.java:179)
>
> at
> org.eclipse.jdt.internal.core.dom.rewrite.ASTRewriteAnalyzer.doTextInsert(ASTRewriteAnalyzer.java:1152)
>
> at
> org.eclipse.jdt.internal.core.dom.rewrite.ASTRewriteAnalyzer$ListRewriter.rewriteList(ASTRewriteAnalyzer.java:569)
>
> at
> org.eclipse.jdt.internal.core.dom.rewrite.ASTRewriteAnalyzer.rewriteParagraphList(ASTRewriteAnalyzer.java:997)
>
> at
> org.eclipse.jdt.internal.core.dom.rewrite.ASTRewriteAnalyzer.visit(ASTRewriteAnalyzer.java:1575)
>
> at
> org.eclipse.jdt.core.dom.TypeDeclaration.accept0(TypeDeclaration.java:467)
>
> at
> org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2480)
>
> at
> org.eclipse.jdt.core.dom.rewrite.ASTRewrite.internalRewriteAST(ASTRewrite.java:271)
>
> at
> org.eclipse.jdt.core.dom.rewrite.ASTRewrite.rewriteAST(ASTRewrite.java:202)
>
> at
> org.apache.ibatis.ibator.eclipse.core.merge.JavaFileMerger.getMergedSource(Unknown
> Source)
>
> at
> org.apache.ibatis.ibator.eclipse.core.callback.EclipseShellCallback.mergeJavaFile(Unknown
> Source)
>
> at org.apache.ibatis.ibator.api.Ibator.generate(Unknown
> Source)
>
> at org.apache.ibatis.ibator.api.Ibator.generate(Unknown
> Source)
>
> at
> org.apache.ibatis.ibator.eclipse.ui.actions.RunIbatorThread.run(Unknown
> Source)
>
> at
> org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1800)
>
> at
> org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1782)
>
> at
> org.apache.ibatis.ibator.eclipse.ui.actions.RunIbatorAction$IbatorRunner.run(Unknown
> Source)
>
> at
> org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
>
> Session Data:
>
> eclipse.buildId=
>
> java.version=1.6.0_18
>
> java.vendor=Sun Microsystems Inc.
>
> BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
>
> Framework arguments: -product org.eclipse.epp.package.jee.product
>
> Command-line arguments: -os win32 -ws win32 -arch x86 -product
> org.eclipse.epp.package.jee.product
>
>
>
>
>
>
>
> WORKAROUND: deleting the previously-generated "XyzExample.java" file before
> the code-gen eliminates this error. But it's kind of annoying to have to do
> that.
>
>
>
> Since the stack mentions that Eclipse JDT is parsing a constructor we tried
> an experiment: delete all the constructors from XyzExample.java and then
> re-generate the artifacts. We still got the same error.
>
>
>
>
>
> Brian Morearty | Grow Your Business Division, Intuit | Staff Software
> Engineer | direct 650-944-6852
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
For additional commands, e-mail: user-java-help@ibatis.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
For additional commands, e-mail: user-java-help@ibatis.apache.org
Re: Eclipse error when running Ibator
Posted by Jeff Butler <je...@gmail.com>.
Two questions - one obvious, one not so obvious :)
1. (Obvious) What's different in the failing environment? (Different
Eclipse version? Different JRE? Different Eclipse distribution?
etc.)
2. (not so obvious) This looks to be failing in the code formatter.
I'd take a close look at the Java code formatting options on the
failing machine - what's different there?
Jeff Butler
On Thu, Mar 25, 2010 at 7:41 PM, Morearty, Brian
<Br...@intuit.com> wrote:
> Hi,
>
>
>
> My team has 3 developers. One of us is having the following problem. The
> other two of us are not. Does anyone have ideas for how to fix this? We are
> using Ibator 1.2.2.
>
>
>
> Right-click on IbatorConfig.xml and choose “Generate iBATIS Artifacts.”
> Progress bar goes part-way, then shows this error:
>
>
>
> Severity: Error
>
> Message: Unexpected error while running Ibator.
>
> Exception Stack Trace:
>
> java.lang.ArrayIndexOutOfBoundsException: 247
>
> at
> org.eclipse.jdt.internal.formatter.CodeFormatterVisitor.visit(CodeFormatterVisitor.java:3239)
>
> at
> org.eclipse.jdt.internal.compiler.ast.ConstructorDeclaration.traverse(ConstructorDeclaration.java:497)
>
> at
> org.eclipse.jdt.internal.formatter.CodeFormatterVisitor.format(CodeFormatterVisitor.java:542)
>
> at
> org.eclipse.jdt.internal.formatter.CodeFormatterVisitor.formatClassBodyDeclarations(CodeFormatterVisitor.java:1528)
>
> at
> org.eclipse.jdt.internal.formatter.CodeFormatterVisitor.format(CodeFormatterVisitor.java:772)
>
> at
> org.eclipse.jdt.internal.formatter.DefaultCodeFormatter.internalFormatClassBodyDeclarations(DefaultCodeFormatter.java:452)
>
> at
> org.eclipse.jdt.internal.formatter.DefaultCodeFormatter.formatClassBodyDeclarations(DefaultCodeFormatter.java:229)
>
> at
> org.eclipse.jdt.internal.formatter.DefaultCodeFormatter.format(DefaultCodeFormatter.java:202)
>
> at
> org.eclipse.jdt.internal.formatter.DefaultCodeFormatter.format(DefaultCodeFormatter.java:188)
>
> at
> org.eclipse.jdt.internal.core.dom.rewrite.ASTRewriteFormatter.formatString(ASTRewriteFormatter.java:238)
>
> at
> org.eclipse.jdt.internal.core.dom.rewrite.ASTRewriteFormatter.formatNode(ASTRewriteFormatter.java:363)
>
> at
> org.eclipse.jdt.internal.core.dom.rewrite.ASTRewriteFormatter.getFormattedResult(ASTRewriteFormatter.java:179)
>
> at
> org.eclipse.jdt.internal.core.dom.rewrite.ASTRewriteAnalyzer.doTextInsert(ASTRewriteAnalyzer.java:1152)
>
> at
> org.eclipse.jdt.internal.core.dom.rewrite.ASTRewriteAnalyzer$ListRewriter.rewriteList(ASTRewriteAnalyzer.java:569)
>
> at
> org.eclipse.jdt.internal.core.dom.rewrite.ASTRewriteAnalyzer.rewriteParagraphList(ASTRewriteAnalyzer.java:997)
>
> at
> org.eclipse.jdt.internal.core.dom.rewrite.ASTRewriteAnalyzer.visit(ASTRewriteAnalyzer.java:1575)
>
> at
> org.eclipse.jdt.core.dom.TypeDeclaration.accept0(TypeDeclaration.java:467)
>
> at
> org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2480)
>
> at
> org.eclipse.jdt.core.dom.rewrite.ASTRewrite.internalRewriteAST(ASTRewrite.java:271)
>
> at
> org.eclipse.jdt.core.dom.rewrite.ASTRewrite.rewriteAST(ASTRewrite.java:202)
>
> at
> org.apache.ibatis.ibator.eclipse.core.merge.JavaFileMerger.getMergedSource(Unknown
> Source)
>
> at
> org.apache.ibatis.ibator.eclipse.core.callback.EclipseShellCallback.mergeJavaFile(Unknown
> Source)
>
> at org.apache.ibatis.ibator.api.Ibator.generate(Unknown
> Source)
>
> at org.apache.ibatis.ibator.api.Ibator.generate(Unknown
> Source)
>
> at
> org.apache.ibatis.ibator.eclipse.ui.actions.RunIbatorThread.run(Unknown
> Source)
>
> at
> org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1800)
>
> at
> org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1782)
>
> at
> org.apache.ibatis.ibator.eclipse.ui.actions.RunIbatorAction$IbatorRunner.run(Unknown
> Source)
>
> at
> org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
>
> Session Data:
>
> eclipse.buildId=
>
> java.version=1.6.0_18
>
> java.vendor=Sun Microsystems Inc.
>
> BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
>
> Framework arguments: -product org.eclipse.epp.package.jee.product
>
> Command-line arguments: -os win32 -ws win32 -arch x86 -product
> org.eclipse.epp.package.jee.product
>
>
>
>
>
>
>
> WORKAROUND: deleting the previously-generated “XyzExample.java” file before
> the code-gen eliminates this error. But it’s kind of annoying to have to do
> that.
>
>
>
> Since the stack mentions that Eclipse JDT is parsing a constructor we tried
> an experiment: delete all the constructors from XyzExample.java and then
> re-generate the artifacts. We still got the same error.
>
>
>
>
>
> Brian Morearty | Grow Your Business Division, Intuit | Staff Software
> Engineer | direct 650-944-6852
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
For additional commands, e-mail: user-java-help@ibatis.apache.org