Note that there are some explanatory texts on larger screens.

plurals
  1. POOSGI expose An "ClassNotFoundException: org.w3c.dom.***" Error when release
    text
    copied!<p>I only wrote the following codes in Activator.start() function </p> <pre><code> public void start(BundleContext bundleContext) throws Exception { Activator.context = bundleContext; Node node = new Node() { @Override public Object setUserData(String arg0, Object arg1, UserDataHandler arg2) { // TODO Auto-generated method stub return null; } @Override public void setTextContent(String arg0) throws DOMException { // TODO Auto-generated method stub } @Override public void setPrefix(String arg0) throws DOMException { // TODO Auto-generated method stub } @Override public void setNodeValue(String arg0) throws DOMException { // TODO Auto-generated method stub } @Override public Node replaceChild(Node arg0, Node arg1) throws DOMException { // TODO Auto-generated method stub return null; } @Override public Node removeChild(Node arg0) throws DOMException { // TODO Auto-generated method stub return null; } @Override public void normalize() { // TODO Auto-generated method stub System.out.println("normalize 方法调用"); } @Override public String lookupPrefix(String arg0) { // TODO Auto-generated method stub return null; } @Override public String lookupNamespaceURI(String arg0) { // TODO Auto-generated method stub return null; } @Override public boolean isSupported(String arg0, String arg1) { // TODO Auto-generated method stub return false; } @Override public boolean isSameNode(Node arg0) { // TODO Auto-generated method stub return false; } @Override public boolean isEqualNode(Node arg0) { // TODO Auto-generated method stub return false; } @Override public boolean isDefaultNamespace(String arg0) { // TODO Auto-generated method stub return false; } @Override public Node insertBefore(Node arg0, Node arg1) throws DOMException { // TODO Auto-generated method stub return null; } @Override public boolean hasChildNodes() { // TODO Auto-generated method stub return false; } @Override public boolean hasAttributes() { // TODO Auto-generated method stub return false; } @Override public Object getUserData(String arg0) { // TODO Auto-generated method stub return null; } @Override public String getTextContent() throws DOMException { // TODO Auto-generated method stub return null; } @Override public Node getPreviousSibling() { // TODO Auto-generated method stub return null; } @Override public String getPrefix() { // TODO Auto-generated method stub return null; } @Override public Node getParentNode() { // TODO Auto-generated method stub return null; } @Override public Document getOwnerDocument() { // TODO Auto-generated method stub return null; } @Override public String getNodeValue() throws DOMException { // TODO Auto-generated method stub return null; } @Override public short getNodeType() { // TODO Auto-generated method stub return 0; } @Override public String getNodeName() { // TODO Auto-generated method stub return null; } @Override public Node getNextSibling() { // TODO Auto-generated method stub return null; } @Override public String getNamespaceURI() { // TODO Auto-generated method stub return null; } @Override public String getLocalName() { // TODO Auto-generated method stub return null; } @Override public Node getLastChild() { // TODO Auto-generated method stub return null; } @Override public Node getFirstChild() { // TODO Auto-generated method stub return null; } @Override public Object getFeature(String arg0, String arg1) { // TODO Auto-generated method stub return null; } @Override public NodeList getChildNodes() { // TODO Auto-generated method stub return null; } @Override public String getBaseURI() { // TODO Auto-generated method stub return null; } @Override public NamedNodeMap getAttributes() { // TODO Auto-generated method stub return null; } @Override public short compareDocumentPosition(Node arg0) throws DOMException { // TODO Auto-generated method stub return 0; } @Override public Node cloneNode(boolean arg0) { // TODO Auto-generated method stub return null; } @Override public Node appendChild(Node arg0) throws DOMException { // TODO Auto-generated method stub return null; } }; node.normalize(); } </code></pre> <p>Everything goes well when run in eclipse environment, but, when release the product, ERRORS in log when runs:</p> <p>Root exception: java.lang.NoClassDefFoundError: org/w3c/dom/Node</p> <p>Caused by: java.lang.ClassNotFoundException: org.w3c.dom.Node</p> <p>Anyone can give some help?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload