users@jaxb.java.net

Re: Problem compiling the generated classes

From: Ryan Shoemaker - JavaSoft East <Ryan.Shoemaker_at_Sun.COM>
Date: Mon, 18 Aug 2003 11:35:49 -0400

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.String);
     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