• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

SEVERE: Failed to destroy end point associated with ProtocolHandler ["ajp-nio-8009"]

 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am trying to run a pretty simple web service and i keep getting this error:

SEVERE: Failed to destroy end point associated with ProtocolHandler ["ajp-nio-8009"]
java.lang.NullPointerException
at org.apache.tomcat.util.net.NioEndpoint.releaseCaches(NioEndpoint.java:307)
at org.apache.tomcat.util.net.NioEndpoint.unbind(NioEndpoint.java:482)
at org.apache.tomcat.util.net.AbstractEndpoint.destroy(AbstractEndpoint.java:795)
at org.apache.coyote.AbstractProtocol.destroy(AbstractProtocol.java:532)
at org.apache.catalina.connector.Connector.destroyInternal(Connector.java:1023)
at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:305)
at org.apache.catalina.core.StandardService.destroyInternal(StandardService.java:588)
at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:305)
at org.apache.catalina.core.StandardServer.destroyInternal(StandardServer.java:859)
at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:305)
at org.apache.catalina.startup.Catalina.start(Catalina.java:629)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:351)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:485)

Does anyone know what this means and how i can fix it? I tried launching through Eclipse Luna and got the error. Then i tried just deploying it to Tomcat then running it from there and got the same error.

thanks
 
Saloon Keeper
Posts: 27763
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
At a rough guess, you are explicitly closing an Http Response outputstream in a webapp and thus closing its underlying connection.
 
jawann jefferson
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Tim for your reply. These are the only 2 classes that are in the web app.

UserServices.java:
package com.service.user;

import javax.ws.rs.*;

//Resource class because the class is annotated with "PATH"
@Path("/user/service")
public class UserServices {
@PUT
@Path("/create")
public void createUser(){
System.out.println("Inside createUser method");

}
//Normal resource methods
@GET
public void getUser(){
System.out.println("Inside getUser method");
}


@POST
public void updateUser(){

}
@DELETE
public void deleteUser(){

}

//Sub resource locator method
//No annotations but can have direct path annotation
//Returns instance of another resource class
@Path("/special")
public SpecialUser getSpecialUser(){
return new SpecialUser();
}
}


and SpeciaUser.java:
package com.service.user;

import javax.ws.rs.GET;
import javax.ws.rs.PUT;

public class SpecialUser {

@PUT
public void createSepcialUser()
{

}

@GET
public void getSpecialUser() {

}

}


I am trying to run it in Eclipse Luna from a Dynamic Web Application project. Should I maybe change it to a different type of project?
 
Tim Holloway
Saloon Keeper
Posts: 27763
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What IDE you use - if any - should not have any effect on how your webapp runs. For one thing, you cannot use the IDE when the webapp runs in production (at least in any sane IT shop!)

Nor should how any IDE you might happen to use organizes projects have any bearing on how the app runs. All that stuff is for building. To run, a webapp must be a WAR and a WAR shouldn't vary in configuration even if you built it entirely by hand.

Your stack trace doesn't indicate any application code being run. That doesn't rule out an application error, since applications can poison downstream processes sometimes, but it's also therefore more likely that theres an issue unrelated to your application.

Normally, I'd blame that horrible WTP framework in Eclipse, since it warps Tomcat's operations so badly, but if you are having the same problem running under Tomcat stand-alone, I'll let it off the hook.

You might try using a different version of Java. If that doesn't help. there's not much I can offer. I'd have to actually debug Tomcat itself, which isn't something I can do in the limited environment of the Ranch forums.
 
So you made a portal in time and started grabbing people. This tiny ad thinks that's rude:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic