users@glassfish.java.net

Problem deploying EJB web service

From: Ryan de Laplante <ryan_at_ijws.com>
Date: Mon, 11 Dec 2006 17:26:48 -0500

Hi,

I'm using NetBeans 5.5 on XP Pro, Sun Application Server 9.0 PE. I
create a new EJB module in netbeans, add a new web service and let it
create a stateless session bean for me. I add a simple echo test method
and am able to deploy successfully.

Next I add a library to my project.. a jar containing a serializable
class called Reservation which I am able to use in an other web service
without any issues (a web application project, not ejb module project).
I add a simple getRes method that has a return type of Reservation.
Save and deploy. It fails to deploy. I have attached the dump from
the app server.

Below is the source code I was working with. I noticed the
EJBModule1.jar built by netbeans/ant has the jar file containing the
Reservation object. I also tried the same thing using a web
application instead of EJB Module, and the service deploys successfully.



package com.test.service;

import com.ijws.cicokiosk.client.model.Reservation;
import javax.ejb.Stateless;
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebService;

/**
 *
 * @author ryan
 */

@Stateless()
@WebService()
public class NewWebService {
    /**
     * Web service operation
     */
    @WebMethod
    public String echoTest(@WebParam(name = "echo") String echo) {
        // TODO implement operation
        return echo;
    }

    /**
     * Web service operation
     */
    @WebMethod
    public Reservation getRes() {
        // TODO implement operation
        return null;
    }
}



Thanks,
Ryan de Laplante



ADM1006:Uploading the file to:[C:\Documents and Settings\ryan\Local Settings\Temp\s1astempdomain1server-266373622\EJBModule1.jar]
Problem encountered during annotation processing;
see stacktrace below for more information.
java.lang.NullPointerException
        at com.sun.tools.ws.processor.modeler.annotation.WebServiceAP.isSubtype(WebServiceAP.java:418)
        at com.sun.tools.ws.processor.modeler.annotation.WebServiceAP.isRemote(WebServiceAP.java:413)
        at com.sun.tools.ws.processor.modeler.annotation.WebServiceVisitor.isLegalType(WebServiceVisitor.java:817)
        at com.sun.tools.ws.processor.modeler.annotation.WebServiceVisitor.isLegalMethod(WebServiceVisitor.java:648)
        at com.sun.tools.ws.processor.modeler.annotation.WebServiceVisitor.methodsAreLegal(WebServiceVisitor.java:624)
        at com.sun.tools.ws.processor.modeler.annotation.WebServiceVisitor.isLegalImplementation(WebServiceVisitor.java:542)
        at com.sun.tools.ws.processor.modeler.annotation.WebServiceVisitor.shouldProcessWebService(WebServiceVisitor.java:352)
        at com.sun.tools.ws.processor.modeler.annotation.WebServiceVisitor.visitClassDeclaration(WebServiceVisitor.java:145)
        at com.sun.tools.apt.mirror.declaration.ClassDeclarationImpl.accept(ClassDeclarationImpl.java:95)
        at com.sun.tools.ws.processor.modeler.annotation.WebServiceAP.buildModel(WebServiceAP.java:347)
        at com.sun.tools.ws.processor.modeler.annotation.WebServiceAP.process(WebServiceAP.java:232)
        at com.sun.mirror.apt.AnnotationProcessors$CompositeAnnotationProcessor.process(AnnotationProcessors.java:60)
        at com.sun.tools.apt.comp.Apt.main(Apt.java:454)
        at com.sun.tools.apt.main.JavaCompiler.compile(JavaCompiler.java:258)
        at com.sun.tools.apt.main.Main.compile(Main.java:1102)
        at com.sun.tools.apt.main.Main.compile(Main.java:964)
        at com.sun.tools.apt.Main.processing(Main.java:95)
        at com.sun.tools.apt.Main.process(Main.java:85)
        at com.sun.tools.apt.Main.process(Main.java:67)
        at com.sun.tools.ws.wscompile.CompileTool.buildModel(CompileTool.java:605)
        at com.sun.tools.ws.wscompile.CompileTool.run(CompileTool.java:538)
        at com.sun.tools.ws.util.ToolBase.run(ToolBase.java:56)
        at com.sun.tools.ws.util.WSToolsObjectFactoryImpl.wsgen(WSToolsObjectFactoryImpl.java:44)
        at com.sun.enterprise.webservice.WsUtil.runWsGen(WsUtil.java:1820)
        at com.sun.enterprise.webservice.WsUtil.genWSInfo(WsUtil.java:2089)
        at com.sun.enterprise.deployment.backend.ModuleDeployer.loadDescriptors(ModuleDeployer.java:396)
        at com.sun.enterprise.deployment.backend.EjbModuleDeployer.deploy(EjbModuleDeployer.java:138)
        at com.sun.enterprise.deployment.backend.ModuleDeployer.doRequestFinish(ModuleDeployer.java:160)
        at com.sun.enterprise.deployment.phasing.J2EECPhase.runPhase(J2EECPhase.java:169)
        at com.sun.enterprise.deployment.phasing.DeploymentPhase.executePhase(DeploymentPhase.java:95)
        at com.sun.enterprise.deployment.phasing.PEDeploymentService.executePhases(PEDeploymentService.java:871)
        at com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:266)
        at com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:739)
        at com.sun.enterprise.management.deploy.DeployThread.deploy(DeployThread.java:174)
        at com.sun.enterprise.management.deploy.DeployThread.run(DeployThread.java:210)
error: compilation failed, errors should have been reported
wsgen successful
Error parsing WSDLC:\java\Sun\AppServer\domains\domain1\generated\xml\j2ee-modules\EJBModule1\META-INF\wsdl\NewWebServiceService.wsdl (The system cannot find the file specified)
DPL5035:Error while running ejbc
com.sun.enterprise.deployment.backend.IASDeploymentException: Fatal Error from EJB Compiler -- C:\java\Sun\AppServer\domains\domain1\generated\xml\j2ee-modules\EJBModule1\META-INF\wsdl\NewWebServiceService.wsdl (The system cannot find the file specified)
        at java.io.FileInputStream.open(Native Method)
        at java.io.FileInputStream.<init>(FileInputStream.java:106)
        at java.io.FileInputStream.<init>(FileInputStream.java:66)
        at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:70)
        at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:161)
        at java.net.URL.openStream(URL.java:1009)
        at com.sun.enterprise.webservice.WsUtil.generateFinalWsdl(WsUtil.java:699)
        at com.sun.enterprise.webservice.WsUtil.generateFinalWsdl(WsUtil.java:643)
        at com.sun.enterprise.deployment.backend.WebServiceDeployer.doWebServiceDeployment(WebServiceDeployer.java:165)
        at com.sun.ejb.codegen.IASEJBC.doCompile(IASEJBC.java:855)
        at com.sun.ejb.codegen.IASEJBC.ejbc(IASEJBC.java:580)
        at com.sun.enterprise.deployment.backend.EJBCompiler.preDeployModule(EJBCompiler.java:413)
        at com.sun.enterprise.deployment.backend.EJBCompiler.compile(EJBCompiler.java:226)
        at com.sun.enterprise.deployment.backend.ModuleDeployer.runEJBC(ModuleDeployer.java:1189)
        at com.sun.enterprise.deployment.backend.EjbModuleDeployer.deploy(EjbModuleDeployer.java:142)
        at com.sun.enterprise.deployment.backend.ModuleDeployer.doRequestFinish(ModuleDeployer.java:160)
        at com.sun.enterprise.deployment.phasing.J2EECPhase.runPhase(J2EECPhase.java:169)
        at com.sun.enterprise.deployment.phasing.DeploymentPhase.executePhase(DeploymentPhase.java:95)
        at com.sun.enterprise.deployment.phasing.PEDeploymentService.executePhases(PEDeploymentService.java:871)
        at com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:266)
        at com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:739)
        at com.sun.enterprise.management.deploy.DeployThread.deploy(DeployThread.java:174)
        at com.sun.enterprise.management.deploy.DeployThread.run(DeployThread.java:210)
UTIL6040: Error attempting to delete C:\java\Sun\AppServer\domains\domain1\applications\j2ee-modules\EJBModule1\CicoKioskClientModel.jar
UTIL6041: Performing gc to try to force file closures
UTIL6043: Attempt to delete C:\java\Sun\AppServer\domains\domain1\applications\j2ee-modules\EJBModule1\CicoKioskClientModel.jar failed after 4 retries
UTIL6048: Attempt to delete C:\java\Sun\AppServer\domains\domain1\applications\j2ee-modules\EJBModule1\CicoKioskClientModel.jar failed; now marked for delete-on-exit
UTIL6040: Error attempting to delete C:\java\Sun\AppServer\domains\domain1\applications\j2ee-modules\EJBModule1
UTIL6041: Performing gc to try to force file closures
UTIL6043: Attempt to delete C:\java\Sun\AppServer\domains\domain1\applications\j2ee-modules\EJBModule1 failed after 4 retries
UTIL6048: Attempt to delete C:\java\Sun\AppServer\domains\domain1\applications\j2ee-modules\EJBModule1 failed; now marked for delete-on-exit
Exception occured in J2EEC Phase
com.sun.enterprise.deployment.backend.IASDeploymentException: Error while running ejbc -- Fatal Error from EJB Compiler -- C:\java\Sun\AppServer\domains\domain1\generated\xml\j2ee-modules\EJBModule1\META-INF\wsdl\NewWebServiceService.wsdl (The system cannot find the file specified)
        at java.io.FileInputStream.open(Native Method)
        at java.io.FileInputStream.<init>(FileInputStream.java:106)
        at java.io.FileInputStream.<init>(FileInputStream.java:66)
        at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:70)
        at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:161)
        at java.net.URL.openStream(URL.java:1009)
        at com.sun.enterprise.webservice.WsUtil.generateFinalWsdl(WsUtil.java:699)
        at com.sun.enterprise.webservice.WsUtil.generateFinalWsdl(WsUtil.java:643)
        at com.sun.enterprise.deployment.backend.WebServiceDeployer.doWebServiceDeployment(WebServiceDeployer.java:165)
        at com.sun.ejb.codegen.IASEJBC.doCompile(IASEJBC.java:855)
        at com.sun.ejb.codegen.IASEJBC.ejbc(IASEJBC.java:580)
        at com.sun.enterprise.deployment.backend.EJBCompiler.preDeployModule(EJBCompiler.java:413)
        at com.sun.enterprise.deployment.backend.EJBCompiler.compile(EJBCompiler.java:226)
        at com.sun.enterprise.deployment.backend.ModuleDeployer.runEJBC(ModuleDeployer.java:1189)
        at com.sun.enterprise.deployment.backend.EjbModuleDeployer.deploy(EjbModuleDeployer.java:142)
        at com.sun.enterprise.deployment.backend.ModuleDeployer.doRequestFinish(ModuleDeployer.java:160)
        at com.sun.enterprise.deployment.phasing.J2EECPhase.runPhase(J2EECPhase.java:169)
        at com.sun.enterprise.deployment.phasing.DeploymentPhase.executePhase(DeploymentPhase.java:95)
        at com.sun.enterprise.deployment.phasing.PEDeploymentService.executePhases(PEDeploymentService.java:871)
        at com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:266)
        at com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:739)
        at com.sun.enterprise.management.deploy.DeployThread.deploy(DeployThread.java:174)
        at com.sun.enterprise.management.deploy.DeployThread.run(DeployThread.java:210)