Skip to main content



      Home
Home » Modeling » M2T (model-to-text transformation) » NullPointer
NullPointer [message #37002] Wed, 28 November 2007 12:23 Go to next message
Eclipse UserFriend
Originally posted by: thiru.anugu.summit.fiserv.com

Hi,

I'm getting

"Error: Error executing tag handler:java.lang.NullPointerException"

at

<c:if test="upper-case(local-name($currCol/foreignKey))='FOREIGNKEY' ">
..........
..........
</c:if>

But the output is generating as expected.

I’m using

Eclipse 3.3.1.1
EMF 2.3.0
JET 0.8.1.

Am I missing something?
Re: NullPointer [message #37035 is a reply to message #37002] Wed, 28 November 2007 13:10 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

Thiru,

Probably it will help a lot if you show the full stack trace. It's
likely available from the Error log view...


Thiru wrote:
> Hi,
>
> I'm getting
> "Error: Error executing tag handler:java.lang.NullPointerException"
>
> at
> <c:if test="upper-case(local-name($currCol/foreignKey))='FOREIGNKEY' ">
> .......... .......... </c:if>
> But the output is generating as expected.
> I?m using
> Eclipse 3.3.1.1 EMF 2.3.0 JET 0.8.1.
> Am I missing something?
>
Re: NullPointer [message #37068 is a reply to message #37002] Thu, 29 November 2007 08:51 Go to previous messageGo to next message
Eclipse UserFriend
Thiru:

Even without the stack trace, I'm a little confused by the XPath expression.
The function local-name returns the name of the element, with any namespace
prefix removed. So...

local-name($currCol/foreignKey)

should always return 'foreignKey' so long as $currCol/foreignKey matches at
least on element. (Otherwise, it should return '').

To me, your test looks to be equivalent to testing whether $currCol has any
foreignKey elements. There are a number of ways you could do this more
clearly:

<c:if test="count($currCol/foreignKey) > 0">

or

<c:if test="$currCol/foreignKey)" >

are both equivalent.

But, please do send that stack trace. I want to eliminate that NPE.

Paul


"Thiru" <thiru.anugu@summit.fiserv.com> wrote in message
news:ff91c418389ff974c8a7aef8095a5e26$1@www.eclipse.org...
> Hi,
>
> I'm getting
> "Error: Error executing tag handler:java.lang.NullPointerException"
> at
> <c:if test="upper-case(local-name($currCol/foreignKey))='FOREIGNKEY' ">
> .......... .......... </c:if> But the output is generating as expected.
> I
Re: NullPointer [message #37134 is a reply to message #37068] Thu, 29 November 2007 20:05 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: Thiru.Anugu.Summit.Fiserv.com

Paul,

Thanks for the answer. What you told was correct. Thats what I was doing.
Where can I find the log files to send the stack trace? I couldn't find in
my JET project.

-Thiru
Re: NullPointer [message #37169 is a reply to message #37134] Thu, 29 November 2007 20:18 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

Thiru,

Window->Show View->Error Log. Typically all errors (exceptions) end up
being logged and from that you can find the stack trace. When reporting
problems, these stack traces are like gold...

Thiru wrote:
> Paul,
>
> Thanks for the answer. What you told was correct. Thats what I was
> doing.
> Where can I find the log files to send the stack trace? I couldn't
> find in my JET project.
>
> -Thiru
>
Re: NullPointer [message #37236 is a reply to message #37169] Thu, 29 November 2007 22:08 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: Thiru.Anugu.Summit.Fiserv.com

Here is the gold (stack trace) :)



java.lang.NullPointerException
at
org.eclipse.jet.internal.xpath.functions.LocalNameFunction.e valuate(LocalNameFunction.java:73)
at
org.eclipse.jet.internal.xpath.ast.Function.evalAsObject(Fun ction.java:73)
at
org.eclipse.jet.internal.xpath.ast.Function.evalAsObject(Fun ction.java:71)
at org.eclipse.jet.internal.xpath.ast.RelOp.evalAsBoolean(RelOp .java:239)
at
org.eclipse.jet.internal.xpath.ast.BooleanExpr.evalAsObject( BooleanExpr.java:43)
at
org.eclipse.jet.internal.xpath.XPathExpressionImpl.evaluate( XPathExpressionImpl.java:59)
at
org.eclipse.jet.XPathContextExtender.resolveAsObject(XPathCo ntextExtender.java:444)
at
org.eclipse.jet.internal.taglib.control.IfTag.doEvalConditio n(IfTag.java:60)
at
org.eclipse.jet.internal.runtime.SafeConditionalRuntimeTag$1 .doRun(SafeConditionalRuntimeTag.java:69)
at
org.eclipse.jet.internal.runtime.SafeCustomRuntimeTag$TagSaf eRunnable.run(SafeCustomRuntimeTag.java:72)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
at org.eclipse.core.runtime.Platform.run(Platform.java:857)
at
org.eclipse.jet.internal.runtime.SafeConditionalRuntimeTag.o kToProcessBody(SafeConditionalRuntimeTag.java:64)
at org.eclipse.jet.compiled._jet_FCM.generate(_jet_FCM.java:72)
at
org.eclipse.jet.transform.TransformContextExtender.execute(T ransformContextExtender.java:146)
at
org.eclipse.jet.transform.TransformContextExtender.execute(T ransformContextExtender.java:119)
at
org.eclipse.jet.internal.taglib.workspace.FileTag.doAction(F ileTag.java:101)
at
org.eclipse.jet.internal.runtime.SafeEmptyRuntimeTag$1.doRun (SafeEmptyRuntimeTag.java:49)
at
org.eclipse.jet.internal.runtime.SafeCustomRuntimeTag$TagSaf eRunnable.run(SafeCustomRuntimeTag.java:72)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
at org.eclipse.core.runtime.Platform.run(Platform.java:857)
at
org.eclipse.jet.internal.runtime.SafeEmptyRuntimeTag.doStart (SafeEmptyRuntimeTag.java:43)
at org.eclipse.jet.compiled._jet_main.generate(_jet_main.java:4 98)
at
org.eclipse.jet.transform.TransformContextExtender.execute(T ransformContextExtender.java:146)
at
org.eclipse.jet.transform.TransformContextExtender.execute(T ransformContextExtender.java:119)
at org.eclipse.jet.JET2Platform$5.run(JET2Platform.java:458)
at
org.eclipse.jet.internal.runtime.JETBundleManager.run(JETBun dleManager.java:331)
at org.eclipse.jet.JET2Platform.runTransform(JET2Platform.java: 426)
at org.eclipse.jet.internal.launch.JETProcess.run(JETProcess.ja va:156)
at
org.eclipse.jet.internal.launch.JET2TransformationDelegate.l aunch(JET2TransformationDelegate.java:59)
at
org.eclipse.debug.internal.core.LaunchConfiguration.launch(L aunchConfiguration.java:766)
at
org.eclipse.debug.internal.core.LaunchConfiguration.launch(L aunchConfiguration.java:608)
at
org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(D ebugUIPlugin.java:899)
at
org.eclipse.debug.internal.ui.DebugUIPlugin$7.run(DebugUIPlu gin.java:1102)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)


-Thiru
Re: NullPointer [message #37407 is a reply to message #37236] Fri, 30 November 2007 08:59 Go to previous message
Eclipse UserFriend
Thiru:

Thanks for the stack trace. I've created bug:

https://bugs.eclipse.org/211591

You can add yourself to the CC list to track it.

Paul

"Thiru" <Thiru.Anugu@Summit.Fiserv.com> wrote in message
news:ce05edee9896d259d5260e56cdaecd9f$1@www.eclipse.org...
>
> Here is the gold (stack trace) :)
>
>
>
> java.lang.NullPointerException
> at
> org.eclipse.jet.internal.xpath.functions.LocalNameFunction.e valuate(LocalNameFunction.java:73)
> at
> org.eclipse.jet.internal.xpath.ast.Function.evalAsObject(Fun ction.java:73)
> at
> org.eclipse.jet.internal.xpath.ast.Function.evalAsObject(Fun ction.java:71)
> at org.eclipse.jet.internal.xpath.ast.RelOp.evalAsBoolean(RelOp .java:239)
> at
> org.eclipse.jet.internal.xpath.ast.BooleanExpr.evalAsObject( BooleanExpr.java:43)
> at
> org.eclipse.jet.internal.xpath.XPathExpressionImpl.evaluate( XPathExpressionImpl.java:59)
> at
> org.eclipse.jet.XPathContextExtender.resolveAsObject(XPathCo ntextExtender.java:444)
> at
> org.eclipse.jet.internal.taglib.control.IfTag.doEvalConditio n(IfTag.java:60)
> at
> org.eclipse.jet.internal.runtime.SafeConditionalRuntimeTag$1 .doRun(SafeConditionalRuntimeTag.java:69)
> at
> org.eclipse.jet.internal.runtime.SafeCustomRuntimeTag$TagSaf eRunnable.run(SafeCustomRuntimeTag.java:72)
> at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
> at org.eclipse.core.runtime.Platform.run(Platform.java:857)
> at
> org.eclipse.jet.internal.runtime.SafeConditionalRuntimeTag.o kToProcessBody(SafeConditionalRuntimeTag.java:64)
> at org.eclipse.jet.compiled._jet_FCM.generate(_jet_FCM.java:72)
> at
> org.eclipse.jet.transform.TransformContextExtender.execute(T ransformContextExtender.java:146)
> at
> org.eclipse.jet.transform.TransformContextExtender.execute(T ransformContextExtender.java:119)
> at
> org.eclipse.jet.internal.taglib.workspace.FileTag.doAction(F ileTag.java:101)
> at
> org.eclipse.jet.internal.runtime.SafeEmptyRuntimeTag$1.doRun (SafeEmptyRuntimeTag.java:49)
> at
> org.eclipse.jet.internal.runtime.SafeCustomRuntimeTag$TagSaf eRunnable.run(SafeCustomRuntimeTag.java:72)
> at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
> at org.eclipse.core.runtime.Platform.run(Platform.java:857)
> at
> org.eclipse.jet.internal.runtime.SafeEmptyRuntimeTag.doStart (SafeEmptyRuntimeTag.java:43)
> at org.eclipse.jet.compiled._jet_main.generate(_jet_main.java:4 98)
> at
> org.eclipse.jet.transform.TransformContextExtender.execute(T ransformContextExtender.java:146)
> at
> org.eclipse.jet.transform.TransformContextExtender.execute(T ransformContextExtender.java:119)
> at org.eclipse.jet.JET2Platform$5.run(JET2Platform.java:458)
> at
> org.eclipse.jet.internal.runtime.JETBundleManager.run(JETBun dleManager.java:331)
> at org.eclipse.jet.JET2Platform.runTransform(JET2Platform.java: 426)
> at org.eclipse.jet.internal.launch.JETProcess.run(JETProcess.ja va:156)
> at
> org.eclipse.jet.internal.launch.JET2TransformationDelegate.l aunch(JET2TransformationDelegate.java:59)
> at
> org.eclipse.debug.internal.core.LaunchConfiguration.launch(L aunchConfiguration.java:766)
> at
> org.eclipse.debug.internal.core.LaunchConfiguration.launch(L aunchConfiguration.java:608)
> at
> org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(D ebugUIPlugin.java:899)
> at
> org.eclipse.debug.internal.ui.DebugUIPlugin$7.run(DebugUIPlu gin.java:1102)
> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
>
>
> -Thiru
>
Previous Topic:Could be bug in JET
Next Topic:Lost in JET to JET2 migration
Goto Forum:
  


Current Time: Fri Apr 25 00:20:39 EDT 2025

Powered by FUDForum. Page generated in 0.03859 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top