Witam, miałem bardzo dziwny sposób tworzenia mojego parsera JAXB. Kiedy próbowałem do generowania klas JAXB z zaćmienia następnie w jednej klasie to pokazuje bardzo dziwny błąd, który jestOgraniczenia dostępu dla jdk1.7/jre/lib/rt.jar
Access restriction: The type QName is not accessible due to restriction on required library /usr/lib/jvm/jdk1.7.0_02/jre/lib/rt.jar
to moja klasa
package generated;
import javax.xml.bind.JAXBElement;
import javax.xml.bind.annotation.XmlElementDecl;
import javax.xml.bind.annotation.XmlRegistry;
//import javax.xml.namespace.QName;
import javax.xml.namespace.*;
@XmlRegistry
public class ObjectFactory {
a tu na tej linii otrzymuję komunikat o błędzie
prywatny ostateczny statyczny QName _ExpenseReport_QNAME = new QName ("", "expenseReport");
/**
* Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: generated
*
*/
public ObjectFactory() {
}
/**
* Create an instance of {@link ExpenseT }
*
*/
public ExpenseT createExpenseT() {
return new ExpenseT();
}
/**
* Create an instance of {@link UserT }
*
*/
public UserT createUserT() {
return new UserT();
}
/**
* Create an instance of {@link ItemT }
*
*/
public ItemT createItemT() {
return new ItemT();
}
/**
* Create an instance of {@link ItemListT }
*
*/
public ItemListT createItemListT() {
return new ItemListT();
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link ExpenseT }{@code >}}
*
*/
@XmlElementDecl(namespace = "", name = "expenseReport")
public JAXBElement<ExpenseT> createExpenseReport(ExpenseT value) {
return new JAXBElement<ExpenseT>(_ExpenseReport_QNAME, ExpenseT.class, null, value);
}
}
Prawdopodobnie powiązane: http://stackoverflow.com/questions/860187/access-restriction-on-clue-due-to-restriction-on-lub-library-rt-jar – assylias
Dzięki - byłoby to pomocne dla mnie :) – khan