从doc运行jax-ws示例的异常

时间:2011-12-21 16:02:58

标签: java web-services jax-ws

我正在尝试使用jax-ws,并在运行javaee 6教程(oracle javaee教程)中的示例时遇到以下异常

Exception in thread "main" java.lang.IllegalAccessError: tried to access class weblogic.wsee.jaxws.WLSContainer from class weblogic.wsee.jaxws.tubeline.standard.StandardTubelineDeploymentListener
    at weblogic.wsee.jaxws.tubeline.standard.StandardTubelineDeploymentListener.createServer(StandardTubelineDeploymentListener.java:117)
    at weblogic.wsee.jaxws.WLSTubelineAssemblerFactory$TubelineAssemblerImpl.createServer(WLSTubelineAssemblerFactory.java:74)
    at com.sun.xml.ws.server.WSEndpointImpl.<init>(WSEndpointImpl.java:121)
    at com.sun.xml.ws.server.EndpointFactory.createEndpoint(EndpointFactory.java:199)
    at com.sun.xml.ws.api.server.WSEndpoint.create(WSEndpoint.java:420)
    at com.sun.xml.ws.api.server.WSEndpoint.create(WSEndpoint.java:439)
    at com.sun.xml.ws.transport.http.server.EndpointImpl.createEndpoint(EndpointImpl.java:208)
    at com.sun.xml.ws.transport.http.server.EndpointImpl.publish(EndpointImpl.java:138)
    at com.sun.xml.ws.spi.ProviderImpl.createAndPublishEndpoint(ProviderImpl.java:91)
    at javax.xml.ws.Endpoint.publish(Endpoint.java:170)
    at ****.****.***.webservices.TimeServerPublisher.main(TimeServerPublisher.java:36) 

任何建议都将不胜感激。

1 个答案:

答案 0 :(得分:2)

当应用程序尝试反射创建实例(数组除外),设置或获取字段或调用方法时,抛出IllegalAccessException,但当前正在执行的方法无法访问定义指定的类,字段,方法或构造函数。

您似乎无权访问weblogic.wsee.jaxws.tubeline.standard.StandardTubelineDeploymentListener

检查班级是否是私人的。这可能是错误。