users@glassfish.java.net

deployment error when using _at_webfault annotation

From: Legolas Woodland <legolas.w_at_gmail.com>
Date: Wed, 11 Jul 2007 11:08:02 +0330

thank you for reading my code,
I have a problem with using exception and soap fault with my web services. I
am using glassfish v2-b53.
here is what i have done:

1- a web service with a web method which throw an exception of type:
webException
2-create an exception class named webException which extends Exception class
and an schema for that exception class and annotate the class with
@webFault...


Now when i want to deploy the application i gent an exception like:


Exception occured in J2EEC Phase
java.lang.VerifyError: (class: wsp/faultTester, method: op1 signature:
(Ljava/lang/String;)Ljava/lang/String;) Can only throw Throwable objects
        at java.lang.Class.getDeclaredMethods0(Native Method)
        at java.lang.Class.privateGetDeclaredMethods(Class.java:2365)
        at java.lang.Class.privateGetPublicMethods(Class.java:2488)
        at java.lang.Class.getMethods(Class.java:1406)
        at com.sun.xml.ws.model.RuntimeModeler.determineWebMethodUse(
RuntimeModeler.java:288)
        at com.sun.xml.ws.model.RuntimeModeler.processClass(
RuntimeModeler.java:304)
        at com.sun.xml.ws.model.RuntimeModeler.buildRuntimeModel(
RuntimeModeler.java:241)
        at com.sun.tools.ws.wscompile.WsgenTool.buildModel(WsgenTool.java
:218)
        at com.sun.tools.ws.wscompile.WsgenTool.run(WsgenTool.java:119)
        at com.sun.tools.ws.util.WSToolsObjectFactoryImpl.wsgen(
WSToolsObjectFactoryImpl.java:61)
        at com.sun.tools.ws.spi.WSToolsObjectFactory.wsgen(
WSToolsObjectFactory.java:107)
        at com.sun.enterprise.webservice.WsUtil.runWsGen(WsUtil.java:3679)
        at com.sun.enterprise.webservice.WsUtil.genWSInfo(WsUtil.java:4473)
        at
com.sun.enterprise.deployment.backend.ModuleDeployer.loadDescriptors(
ModuleDeployer.java:424)
        at com.sun.enterprise.deployment.backend.WebModuleDeployer.deploy(
WebModuleDeployer.java:157)
        at
com.sun.enterprise.deployment.backend.ModuleDeployer.doRequestFinish(
ModuleDeployer.java:179)
        at com.sun.enterprise.deployment.phasing.J2EECPhase.runPhase(
J2EECPhase.java:191)
        at
com.sun.enterprise.deployment.phasing.DeploymentPhase.executePhase(
DeploymentPhase.java:108)
        at
com.sun.enterprise.deployment.phasing.PEDeploymentService.executePhases(
PEDeploymentService.java:905)
        at com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(
PEDeploymentService.java:279)
        at com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(
PEDeploymentService.java:774)
        at com.sun.enterprise.management.deploy.DeployThread.deploy(
DeployThread.java:187)
        at com.sun.enterprise.management.deploy.DeployThread.run(
DeployThread.java:223)