[英]method does not override or implement a method from a supertype
I am trying to override the abstract method of the class "NamespacePrefixMapper" to provide my custom name space for the xml attribute . 我试图覆盖类“ NamespacePrefixMapper”的抽象方法,以提供xml属性的自定义名称空间。 But it keeps giving the following error message .
但是它一直给出以下错误消息。
.c.compile:
[javac] Compiling 1 source file to C:\isp_development\target\dmc_ac_efulfilment\release\lib
[javac] C:\isp_development\source\dmc_ac_efulfilment\javasource\de\dmc\enfinity\adapter\efulfilment\client\JustForTest.java:3: error: package com.sun.xml.internal.bind.marshaller does not exist
[javac] import com.sun.xml.internal.bind.marshaller.NamespacePrefixMapper;
[javac] ^
[javac] C:\isp_development\source\dmc_ac_efulfilment\javasource\de\dmc\enfinity\adapter\efulfilment\client\JustForTest.java:5: error: cannot find symbol
[javac] public class JustForTest extends NamespacePrefixMapper {
[javac] ^
[javac] symbol: class NamespacePrefixMapper
[javac] C:\isp_development\source\dmc_ac_efulfilment\javasource\de\dmc\enfinity\adapter\efulfilment\client\JustForTest.java:7: error: method does not override or implement a method from a supertype
[javac] @Override
[javac] ^
[javac] 3 errors
Below is the method code i am trying to overide. 以下是我尝试覆盖的方法代码。
@Override
public String getPreferredPrefix(String namespaceUri, String suggestion, boolean requirePrefix) {
namespaceUri = "http://base.google.com/ns/1.0";
suggestion="g";
requirePrefix=true;
return suggestion;
}
What cloud be the reason. 是什么原因造成的。 Help will be greatly appreciated.
帮助将不胜感激。
package com.sun.xml.internal.bind.marshaller does not exist
should be your key. package com.sun.xml.internal.bind.marshaller does not exist
应该是您的关键。 Check your classpath. 检查您的类路径。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.