glassfish-2.x

NullPointerException while deploying app on GlassFish Server 2.1


I am getting a NullPointerException when deploying an app on my GlassFish Server 2.1. It doesn't affect anything in my app, as it runs smoothly, but I would like to resolve this error during deployment.

Here is the stacktrace of the exception:

java.lang.NullPointerException
    at org.apache.catalina.loader.WebappClassLoader.findResources(WebappClassLoader.java:1100)
    at org.apache.catalina.loader.WebappClassLoader.getResources(WebappClassLoader.java:1349)
    at com.sun.xml.ws.util.ServiceFinder$LazyIterator.hasNext(ServiceFinder.java:351)
    at com.sun.xml.ws.api.pipe.TubelineAssemblerFactory.create(TubelineAssemblerFactory.java:104)
    at com.sun.xml.ws.api.pipe.TubelineAssemblerFactory.create(TubelineAssemblerFactory.java:78)
    at com.sun.xml.ws.client.WSServiceDelegate.createPipeline(WSServiceDelegate.java:419)
    at com.sun.xml.ws.client.WSServiceDelegate.createEndpointIFBaseProxy(WSServiceDelegate.java:589)
    at com.sun.xml.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:329)
    at com.sun.xml.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:311)
    at com.sun.xml.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:304)
    at javax.xml.ws.Service.getPort(Service.java:92)

Solution

  • yes.you should not maintain commons-discovery.jar in glassfish\lib folder.Put it in the WEB-INF/lib folder of your project and not the C:\GlassFishESBv22\glassfish\lib folder, this should resolve your issue.

    This problem occur when including commons-discovery.jar in your C:\GlassFishESBv22\glassfish\lib folder.