the type xxx can not be resolved .it is indirectly referenced from required .class files

zhf0021 2005-04-19 10:26:00
这是什么错误啊?
...全文
1123 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
  • 打赏
  • 举报
回复
举个例子吧,你的class需要import class A, class A 需要import class B, 但是你写的class 不需要直接import class B.这是你可能没有把class B 加到classpath中,就会出这种错误
zhf0021 2005-04-19
  • 打赏
  • 举报
回复
import org.apache.axis.client.Call;//此处出现提示:
//multiple markers in this line
//-the type xml.namespace.QName can not be resolved .it is indirectly referenced from required .class files
//-30 changed lines

import org.apache.axis.client.Service;
import javax.xml.namespace.QName;

public class TestClient
{
public static void main(String [] args) {
try {
String endpoint =
"http://nagoya.apache.org:5049/axis/services/echo";
Service service = new Service();
Call call = (Call) service.createCall();

call.setTargetEndpointAddress( new java.net.URL(endpoint) );
call.setOperationName(new QName("http://soapinterop.org/", "echoString") );

// Call to addParameter/setReturnType as described in user-guide.html
//call.addParameter("testParam",
// org.apache.axis.Constants.XSD_STRING,
// javax.xml.rpc.ParameterMode.IN);
//call.setReturnType(org.apache.axis.Constants.XSD_STRING);

String ret = (String) call.invoke( new Object[] { "Hello!" } );

System.out.println("Sent 'Hello!', got '" + ret + "'");
} catch (Exception e) {
System.err.println(e.toString());
}
}
}
程序是AXIS的例子,我用eclipse,
zrtl 2005-04-19
  • 打赏
  • 举报
回复
相关代码怎么不拿出来看看啊
zhf0021 2005-04-19
  • 打赏
  • 举报
回复
log4j:WARN No appenders could be found for logger (org.apache.axis.i18n.ProjectResourceBundle).
log4j:WARN Please initialize the log4j system properly.

没人碰到过这种错误么?
zhf0021 2005-04-19
  • 打赏
  • 举报
回复
up
zhf0021 2005-04-19
  • 打赏
  • 举报
回复
上面的问题解决了,现在运行这个程序却出现了新的问题:
log4j:WARN No appenders could be found for logger (org.apache.axis.i18n.ProjectResourceBundle).
log4j:WARN Please initialize the log4j system properly.

这是什么错误?怎么解决,谢谢

62,614

社区成员

发帖
与我相关
我的任务
社区描述
Java 2 Standard Edition
社区管理员
  • Java SE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧