Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » QVT-OML » Strange reference to UCharacter in RunnableQVTParser
Strange reference to UCharacter in RunnableQVTParser [message #910817] Mon, 10 September 2012 12:40 Go to next message
Eclipse UserFriend
Hello,

I'm somewhat confused by the following method:

org.eclipse.m2m.internal.qvt.oml.ast.parser.QvtOperationalParser.RunnableQVTParser.computeInputString(int,
int)

I accidentally reached this method due to a stupid syntax error and when
the line

if (!UCharacter.isWhitespace(chars[i-1])) {

was to be executed, "UCharacter" could not be found and I received a
NoClassDefFoundError exception. I don't know this class and I'm already
pretty confused by the fact that within this calling module it is
imported as "com.ibm.icu.lang.UCharacter", but when I select "Open
Declaration" I'm shown "sun.text.normalizer.UCharacter". So I suspect
some classpath trickery here. What do I need to do/declare to have this
properly working?

TIA
Marius
Re: Strange reference to UCharacter in RunnableQVTParser [message #910823 is a reply to message #910817] Mon, 10 September 2012 12:57 Go to previous messageGo to next message
Eclipse UserFriend
On 10.09.2012 14:40, Marius Gröger wrote:
> Hello,
>
> I'm somewhat confused by the following method:
>
> org.eclipse.m2m.internal.qvt.oml.ast.parser.QvtOperationalParser.RunnableQVTParser.computeInputString(int,
> int)
>
> I accidentally reached this method due to a stupid syntax error and when
> the line
>
> if (!UCharacter.isWhitespace(chars[i-1])) {
>
> was to be executed, "UCharacter" could not be found and I received a
> NoClassDefFoundError exception. I don't know this class and I'm already
> pretty confused by the fact that within this calling module it is
> imported as "com.ibm.icu.lang.UCharacter", but when I select "Open
> Declaration" I'm shown "sun.text.normalizer.UCharacter". So I suspect
> some classpath trickery here. What do I need to do/declare to have this
> properly working?

I think I found it. The method in question depends on
com.ibm.icu_XXX.jar. My classpath didn't include this jar, so eclipse
apparently tried to resolve on its own as best as possible and used the
version in rt.jar. When actually executing the code, the class loaded
just could not find UCharacter.

Marius
Re: Strange reference to UCharacter in RunnableQVTParser [message #910863 is a reply to message #910823] Mon, 10 September 2012 14:15 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 4186
Registered: July 2009
Senior Member
Hi

My workspace shows just com.ibm.icu.lang.UCharacter which is just one of
a number of standard classes extended by IBM.

Hopefully these enhancements will merge now that java is moving again.

I presume from your comments that your problem is fixed.

Regards

Ed Willink

On 10/09/2012 13:57, Marius Gröger wrote:
> On 10.09.2012 14:40, Marius Gröger wrote:
>> Hello,
>>
>> I'm somewhat confused by the following method:
>>
>> org.eclipse.m2m.internal.qvt.oml.ast.parser.QvtOperationalParser.RunnableQVTParser.computeInputString(int,
>> int)
>>
>> I accidentally reached this method due to a stupid syntax error and when
>> the line
>>
>> if (!UCharacter.isWhitespace(chars[i-1])) {
>>
>> was to be executed, "UCharacter" could not be found and I received a
>> NoClassDefFoundError exception. I don't know this class and I'm already
>> pretty confused by the fact that within this calling module it is
>> imported as "com.ibm.icu.lang.UCharacter", but when I select "Open
>> Declaration" I'm shown "sun.text.normalizer.UCharacter". So I suspect
>> some classpath trickery here. What do I need to do/declare to have this
>> properly working?
> I think I found it. The method in question depends on
> com.ibm.icu_XXX.jar. My classpath didn't include this jar, so eclipse
> apparently tried to resolve on its own as best as possible and used the
> version in rt.jar. When actually executing the code, the class loaded
> just could not find UCharacter.
>
> Marius
>
Previous Topic:EMF Generics and QVT-O
Next Topic:Exception when invoking a helper method
Goto Forum:
  


Current Time: Fri Dec 19 00:00:56 GMT 2014

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

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