users@jaxb.java.net

RE: Problem compiling the generated classes

From: Amit Bhatnagar <Amit_at_julysystems.com>
Date: Tue, 19 Aug 2003 10:59:40 +0530

You were right Ryan :)
I had the older version of javax.xml.namespace.QName in my classpath.

I'm using version 1.0.1 of JAXB.
However, the javadocs that are available (and what I referred) are for
version 1.0 and that does not reflect the getPrefix() method in
javax.xml.namespace.QName.

Thanks,
Amit

-----Original Message-----
From: Ryan Shoemaker - JavaSoft East [mailto:Ryan.Shoemaker_at_Sun.COM]
Sent: Monday, August 18, 2003 9:06 PM
To: users_at_jaxb.dev.java.net
Subject: Re: Problem compiling the generated classes

Amit Bhatnagar wrote:
>
> I'm having trouble compiling the generated classes. The ant output is
as
> follows. I'm attaching herewith the generated java file 'causing the
> problem (jaxb_test.impl.FaultcodeImpl) and related interfaces that
were
> generated.
>
> [..snip..]
>
> Apparently, the generated class makes a reference to the non-existent
> getPrefix() method of class javax.xml.namespace.QName. The same
problem
> is occurring for a few other classes as well.
>

It looks to me like you are picking up the wrong version of QName.
Can you tell me which version of JAXB you are using?

Also, run javap and compare your results - you should get this if
you're picking up the correct version of QName:

% javap javax.xml.namespace.QName
Compiled from QName.java
public class javax.xml.namespace.QName extends java.lang.Object
implements java.io.Serializable {
     public
javax.xml.namespace.QName(java.lang.String,java.lang.String);
     public
javax.xml.namespace.QName(java.lang.String,java.lang.String,java.lang.St
ring);
     public javax.xml.namespace.QName(java.lang.String);
     public java.lang.String getNamespaceURI();
     public java.lang.String getLocalPart();
     public java.lang.String getPrefix();
     public boolean equals(java.lang.Object);
     public int hashCode();
     public java.lang.String toString();
     public static javax.xml.namespace.QName valueOf(java.lang.String);
}

Thanks,

--Ryan



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
For additional commands, e-mail: users-help_at_jaxb.dev.java.net


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
For additional commands, e-mail: users-help_at_jaxb.dev.java.net