我正在开发一个相当复杂的模型来处理任何DTO / Entity类型。每个DTO都有自己的REST端点,但是将使用公共通用子资源从数据库读/写。但是,我遇到了类型擦除错误,我无法弄清楚如何解决它。
首先,这是一个示例实体和相应的DTO:
实体:
@Entity
public class MyEntity extends AbstractEntity implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@Basic(optional = false)
@Column(nullable = false)
@NotNull(message = "ID Required!")
private Integer id;
@Basic(optional = false)
@Column(nullable = false)
@NotNull(message = "Name Required!")
private String name;
}
DTO公用程序界面:
public interface DTO<Entity extends AbstractEntity, PrimaryKey> {
/* utility methods here */
}
DTO :
@XmlRootElement
public class MyEntityDTO implements DTO<MyEntity, Integer> {
private Integer id;
private String name;
}
好的,现在转到REST api。
API :
@Path("/stuff")
@RequestScoped
public class StuffFacade {
@Inject
EntityMappedManager entityMappedManager;
@Path("/my-items")
public StuffFacade.EntityFacade<MyEntity, Integer, MyEntityDTO> myEntityFacade() {
return new StuffFacade.EntityFacade<>(getAccessor(), MyEntityDTO::new);
}
@Path("/your-items")
public StuffFacade.EntityFacade<YourEntity, String, YourEntityDTO> yourEntityFacade() {
return new StuffFacade.EntityFacade<>(getAccessor(), YourEntityDTO::new);
}
@Produces
@Override
public <E extends AbstractEntity, P> DatastoreAccessor<E, P> getAccessor() {
return new DatastoreAccessor<E, P>() {
@Override
public List<E> findAll(QueryParams queryParams) {
return entityMappedManager.findAll(getEntityClass());
}
@Override
public Optional<E> findById(P id) {
return Optional.ofNullable(entityMappedManager.findById(getEntityClass(), id));
}
@Override
public E create(E entity) {
return entityMappedManager.save(entity);
}
@Override
public E update(E entity) {
return entityMappedManager.save(entity);
}
@Override
public E remove(E entity) {
return entityMappedManager.remove(entity);
}
};
}
public class EntityFacade<Entity extends AbstractEntity, PrimaryKey, DTOType extends DTO<Entity, PrimaryKey>> extends DTOFacade<Entity, PrimaryKey, DTOType> {
private final DatastoreAccessor<Entity, PrimaryKey> datastoreAccessor;
private final Function<Entity, DTOType> dtoMapper;
public EntityFacade(DatastoreAccessor<Entity, PrimaryKey> datastoreAccessor, Function<Entity, DTOType> dtoMapper) {
this.datastoreAccessor = datastoreAccessor;
this.dtoMapper = dtoMapper;
}
@Override
public DatastoreAccessor<Entity, PrimaryKey> getDatastoreAccessor() {
return this.datastoreAccessor;
}
@Override
public GenericEntity<ListMetadata<DTOType>> getGenericEntity(List<DTOType> list) {
return new GenericEntity<List<DTOType>>(list) {
};
}
@Override
public Function<Entity, DTOType> getDTOMapper() {
return this.dtoMapper;
}
}
}
DTOFacade :
public static abstract class DTOFacade<Entity extends AbstractEntity, PrimaryKey, DTOType extends DTO<Entity, PrimaryKey>> {
@GET
@Produces({MediaType.APPLICATION_JSON})
public Response findAll(@Context UriInfo uriInfo) {
QueryParams queryParams = new QueryParams(uriInfo.getQueryParameters());
List<Entity> results = getDatastoreAccessor().findAll(queryParams);
List<DTOType> converted = new ListMetadata<>(
results.getList().stream()
.map(getDTOMapper())
.collect(Collectors.toList()), results.getParentSize());
return Response.ok(getGenericEntity(converted)).build();
}
@GET
@Path("/{id}")
@Produces({MediaType.APPLICATION_JSON})
public Response findById(@PathParam("id") PrimaryKey id) {
Optional<Entity> optionalEntity = getDatastoreAccessor().findById(id);
if (!optionalEntity.isPresent()) {
return Response.status(Response.Status.NOT_FOUND).build();
}
return Response.ok(optionalEntity.map(getDTOMapper()).get()).build();
}
@POST
@Consumes({MediaType.APPLICATION_JSON})
@Produces({MediaType.APPLICATION_JSON})
public Response create(DTOType entity) {
DTOType created = getDTOMapper().apply(getDatastoreAccessor().create(toObjectModel(entity)));
return Response.ok(created).build();
}
@PUT
@Path("/{id}")
@Consumes({MediaType.APPLICATION_JSON})
@Produces({MediaType.APPLICATION_JSON})
public Response update(DTOType entity) {
DatastoreAccessor<Entity, PrimaryKey> datastoreAccessor = getDatastoreAccessor();
Optional<Entity> e = datastoreAccessor.findById(entity.getId());
if (!e.isPresent()) {
return Response.status(Response.Status.NOT_FOUND).build();
}
return Response.ok(getDTOMapper().apply(datastoreAccessor.update(toObjectModel(entity)))).build();
}
@DELETE
@Path("/{id}")
@Produces({MediaType.APPLICATION_JSON})
public Response delete(@PathParam("id") PrimaryKey id) {
DatastoreAccessor<Entity, PrimaryKey> datastoreAccessor = getDatastoreAccessor();
Optional<Entity> entity = datastoreAccessor.findById(id);
if (!entity.isPresent()) {
return Response.status(Response.Status.NOT_FOUND).build();
}
return Response.ok(getDTOMapper().apply(datastoreAccessor.remove(entity.get()))).build();
}
public abstract DatastoreAccessor<Entity, PrimaryKey> getDatastoreAccessor();
public abstract GenericEntity<List<DTOType>> getGenericEntity(List<DTOType> list);
public abstract Function<Entity, DTOType> getDTOMapper();
public Entity toObjectModel(DTOType e) {
return e.toObjectModel();
}
}
DatastoreAccessor :
public interface DatastoreAccessor<Entity extends AbstractEntity, PrimaryKey> {
List<Entity> findAll(QueryParams queryParams);
Optional<Entity> findById(PrimaryKey id);
Entity create(Entity entity);
Entity update(Entity entity);
Entity remove(Entity entity);
default Class<Entity> getEntityClass() {
return ((Class<Entity>) ((ParameterizedType) getClass().getGenericSuperclass()).getActualTypeArguments()[0]);
}
}
EntityMappedManager :
@Stateless
@LocalBean
public class EntityMappedManager {
@PersistenceContext
public EntityManager em;
public <T extends AbstractEntity, P> T findById(Class<T> clazz, P id){
return em.find(clazz, id);
}
public <T extends AbstractEntity> List<T> findAll(Class<T> clazz) {
CriteriaBuilder builder = em.getCriteriaBuilder();
CriteriaQuery<T> query = builder.createQuery(clazz);
Root<T> root = query.from(clazz);
query.select(root);
return em.createQuery(query).getResultList();
}
// OTHER METHODS REMOVED FOR BREVITY
}
错误
最后,在尝试GET
/stuff/my-items
时,我收到类型删除错误:
Severe: Following issues have been detected:
WARNING: No injection source found for a parameter of type public javax.ws.rs.core.Response com.mypackage.DTOFacade.findById(java.lang.Object) at index 0.
WARNING: No injection source found for a parameter of type public javax.ws.rs.core.Response com.mypackage.DTOFacade.delete(java.lang.Object) at index 0.
WARNING: Parameter 1 of type PrimaryKey from public javax.ws.rs.core.Response com.mypackage.DTOFacade.findById(PrimaryKey) is not resolvable to a concrete type.
WARNING: Parameter 2 of type com.mypackage.DatastoreAccessor<Entity, PrimaryKey> from public com.mypackage.rest.v1.StuffFacade$EntityFacade(com.mypackage.DatastoreAccessor<Entity, PrimaryKey>,java.util.function.Function<Entity, DTOType>) is not resolvable to a concrete type.
WARNING: Parameter 3 of type java.util.function.Function<Entity, DTOType> from public com.mypackage.rest.v1.StuffFacade$EntityFacade(com.mypackage.DatastoreAccessor<Entity, PrimaryKey>,java.util.function.Function<Entity, DTOType>) is not resolvable to a concrete type.
WARNING: Parameter 1 of type DTOType from public javax.ws.rs.core.Response com.mypackage.DTOFacade.update(DTOType) is not resolvable to a concrete type.
WARNING: Parameter 2 of type com.mypackage.DatastoreAccessor<Entity, PrimaryKey> from public com.mypackage.rest.v1.StuffFacade$EntityFacade(com.mypackage.DatastoreAccessor<Entity, PrimaryKey>,java.util.function.Function<Entity, DTOType>) is not resolvable to a concrete type.
WARNING: Parameter 3 of type java.util.function.Function<Entity, DTOType> from public com.mypackage.rest.v1.StuffFacade$EntityFacade(com.mypackage.DatastoreAccessor<Entity, PrimaryKey>,java.util.function.Function<Entity, DTOType>) is not resolvable to a concrete type.
WARNING: Parameter 1 of type PrimaryKey from public javax.ws.rs.core.Response com.mypackage.DTOFacade.delete(PrimaryKey) is not resolvable to a concrete type.
WARNING: Parameter 2 of type com.mypackage.DatastoreAccessor<Entity, PrimaryKey> from public com.mypackage.rest.v1.StuffFacade$EntityFacade(com.mypackage.DatastoreAccessor<Entity, PrimaryKey>,java.util.function.Function<Entity, DTOType>) is not resolvable to a concrete type.
WARNING: Parameter 3 of type java.util.function.Function<Entity, DTOType> from public com.mypackage.rest.v1.StuffFacade$EntityFacade(com.mypackage.DatastoreAccessor<Entity, PrimaryKey>,java.util.function.Function<Entity, DTOType>) is not resolvable to a concrete type.
WARNING: Parameter 1 of type DTOType from public javax.ws.rs.core.Response com.mypackage.DTOFacade.create(DTOType) is not resolvable to a concrete type.
WARNING: Parameter 2 of type com.mypackage.DatastoreAccessor<Entity, PrimaryKey> from public com.mypackage.rest.v1.StuffFacade$EntityFacade(com.mypackage.DatastoreAccessor<Entity, PrimaryKey>,java.util.function.Function<Entity, DTOType>) is not resolvable to a concrete type.
WARNING: Parameter 3 of type java.util.function.Function<Entity, DTOType> from public com.mypackage.rest.v1.StuffFacade$EntityFacade(com.mypackage.DatastoreAccessor<Entity, PrimaryKey>,java.util.function.Function<Entity, DTOType>) is not resolvable to a concrete type.
WARNING: Parameter 2 of type com.mypackage.DatastoreAccessor<Entity, PrimaryKey> from public com.mypackage.rest.v1.StuffFacade$EntityFacade(com.mypackage.DatastoreAccessor<Entity, PrimaryKey>,java.util.function.Function<Entity, DTOType>) is not resolvable to a concrete type.
WARNING: Parameter 3 of type java.util.function.Function<Entity, DTOType> from public com.mypackage.rest.v1.StuffFacade$EntityFacade(com.mypackage.DatastoreAccessor<Entity, PrimaryKey>,java.util.function.Function<Entity, DTOType>) is not resolvable to a concrete type.
Warning: StandardWrapperValve[com.mypackage.rest.v1.ApplicationV1]: Servlet.service() for servlet com.mypackage.rest.v1.ApplicationV1 threw exception
org.glassfish.jersey.server.model.ModelValidationException: Model validation error(s) found in sub resource returned by sub resource locator.
[[FATAL] No injection source found for a parameter of type public javax.ws.rs.core.Response com.mypackage.DTOFacade.findById(java.lang.Object) at index 0.; source='ResourceMethod{httpMethod=GET, consumedTypes=[], producedTypes=[application/json], suspended=false, suspendTimeout=0, suspendTimeoutUnit=MILLISECONDS, invocable=Invocable{handler=ClassBasedMethodHandler{handlerClass=class com.mypackage.rest.v1.StuffFacade$EntityFacade, handlerConstructors=[org.glassfish.jersey.server.model.HandlerConstructor@5ad223e4]}, definitionMethod=public javax.ws.rs.core.Response com.mypackage.DTOFacade.findById(java.lang.Object), parameters=[Parameter [type=class java.lang.Object, source=id, defaultValue=null]], responseType=class javax.ws.rs.core.Response}, nameBindings=[]}', [WARNING] Parameter 1 of type PrimaryKey from public javax.ws.rs.core.Response com.mypackage.DTOFacade.findById(PrimaryKey) is not resolvable to a concrete type.; source='public javax.ws.rs.core.Response com.mypackage.DTOFacade.findById(java.lang.Object)', [WARNING] Parameter 2 of type com.mypackage.DatastoreAccessor<Entity, PrimaryKey> from public com.mypackage.rest.v1.StuffFacade$EntityFacade(com.mypackage.DatastoreAccessor<Entity, PrimaryKey>,java.util.function.Function<Entity, DTOType>) is not resolvable to a concrete type.; source='public com.mypackage.rest.v1.StuffFacade$EntityFacade(com.mypackage.rest.v1.StuffFacade,com.mypackage.DatastoreAccessor,java.util.function.Function)', [WARNING] Parameter 3 of type java.util.function.Function<Entity, DTOType> from public com.mypackage.rest.v1.StuffFacade$EntityFacade(com.mypackage.DatastoreAccessor<Entity, PrimaryKey>,java.util.function.Function<Entity, DTOType>) is not resolvable to a concrete type.; source='public com.mypackage.rest.v1.StuffFacade$EntityFacade(com.mypackage.rest.v1.StuffFacade,com.mypackage.DatastoreAccessor,java.util.function.Function)', [WARNING] Parameter 1 of type DTOType from public javax.ws.rs.core.Response com.mypackage.DTOFacade.update(DTOType) is not resolvable to a concrete type.; source='public javax.ws.rs.core.Response com.mypackage.DTOFacade.update(com.mypackage.DTO)', [WARNING] Parameter 2 of type com.mypackage.DatastoreAccessor<Entity, PrimaryKey> from public com.mypackage.rest.v1.StuffFacade$EntityFacade(com.mypackage.DatastoreAccessor<Entity, PrimaryKey>,java.util.function.Function<Entity, DTOType>) is not resolvable to a concrete type.; source='public com.mypackage.rest.v1.StuffFacade$EntityFacade(com.mypackage.rest.v1.StuffFacade,com.mypackage.DatastoreAccessor,java.util.function.Function)', [WARNING] Parameter 3 of type java.util.function.Function<Entity, DTOType> from public com.mypackage.rest.v1.StuffFacade$EntityFacade(com.mypackage.DatastoreAccessor<Entity, PrimaryKey>,java.util.function.Function<Entity, DTOType>) is not resolvable to a concrete type.; source='public com.mypackage.rest.v1.StuffFacade$EntityFacade(com.mypackage.rest.v1.StuffFacade,com.mypackage.DatastoreAccessor,java.util.function.Function)', [FATAL] No injection source found for a parameter of type public javax.ws.rs.core.Response com.mypackage.DTOFacade.delete(java.lang.Object) at index 0.; source='ResourceMethod{httpMethod=DELETE, consumedTypes=[], producedTypes=[application/json], suspended=false, suspendTimeout=0, suspendTimeoutUnit=MILLISECONDS, invocable=Invocable{handler=ClassBasedMethodHandler{handlerClass=class com.mypackage.rest.v1.StuffFacade$EntityFacade, handlerConstructors=[org.glassfish.jersey.server.model.HandlerConstructor@51c006a5]}, definitionMethod=public javax.ws.rs.core.Response com.mypackage.DTOFacade.delete(java.lang.Object), parameters=[Parameter [type=class java.lang.Object, source=id, defaultValue=null]], responseType=class javax.ws.rs.core.Response}, nameBindings=[]}', [WARNING] Parameter 1 of type PrimaryKey from public javax.ws.rs.core.Response com.mypackage.DTOFacade.delete(PrimaryKey) is not resolvable to a concrete type.; source='public javax.ws.rs.core.Response com.mypackage.DTOFacade.delete(java.lang.Object)', [WARNING] Parameter 2 of type com.mypackage.DatastoreAccessor<Entity, PrimaryKey> from public com.mypackage.rest.v1.StuffFacade$EntityFacade(com.mypackage.DatastoreAccessor<Entity, PrimaryKey>,java.util.function.Function<Entity, DTOType>) is not resolvable to a concrete type.; source='public com.mypackage.rest.v1.StuffFacade$EntityFacade(com.mypackage.rest.v1.StuffFacade,com.mypackage.DatastoreAccessor,java.util.function.Function)', [WARNING] Parameter 3 of type java.util.function.Function<Entity, DTOType> from public com.mypackage.rest.v1.StuffFacade$EntityFacade(com.mypackage.DatastoreAccessor<Entity, PrimaryKey>,java.util.function.Function<Entity, DTOType>) is not resolvable to a concrete type.; source='public com.mypackage.rest.v1.StuffFacade$EntityFacade(com.mypackage.rest.v1.StuffFacade,com.mypackage.DatastoreAccessor,java.util.function.Function)', [WARNING] Parameter 1 of type DTOType from public javax.ws.rs.core.Response com.mypackage.DTOFacade.create(DTOType) is not resolvable to a concrete type.; source='public javax.ws.rs.core.Response com.mypackage.DTOFacade.create(com.mypackage.DTO)', [WARNING] Parameter 2 of type com.mypackage.DatastoreAccessor<Entity, PrimaryKey> from public com.mypackage.rest.v1.StuffFacade$EntityFacade(com.mypackage.DatastoreAccessor<Entity, PrimaryKey>,java.util.function.Function<Entity, DTOType>) is not resolvable to a concrete type.; source='public com.mypackage.rest.v1.StuffFacade$EntityFacade(com.mypackage.rest.v1.StuffFacade,com.mypackage.DatastoreAccessor,java.util.function.Function)', [WARNING] Parameter 3 of type java.util.function.Function<Entity, DTOType> from public com.mypackage.rest.v1.StuffFacade$EntityFacade(com.mypackage.DatastoreAccessor<Entity, PrimaryKey>,java.util.function.Function<Entity, DTOType>) is not resolvable to a concrete type.; source='public com.mypackage.rest.v1.StuffFacade$EntityFacade(com.mypackage.rest.v1.StuffFacade,com.mypackage.DatastoreAccessor,java.util.function.Function)', [WARNING] Parameter 2 of type com.mypackage.DatastoreAccessor<Entity, PrimaryKey> from public com.mypackage.rest.v1.StuffFacade$EntityFacade(com.mypackage.DatastoreAccessor<Entity, PrimaryKey>,java.util.function.Function<Entity, DTOType>) is not resolvable to a concrete type.; source='public com.mypackage.rest.v1.StuffFacade$EntityFacade(com.mypackage.rest.v1.StuffFacade,com.mypackage.DatastoreAccessor,java.util.function.Function)', [WARNING] Parameter 3 of type java.util.function.Function<Entity, DTOType> from public com.mypackage.rest.v1.StuffFacade$EntityFacade(com.mypackage.DatastoreAccessor<Entity, PrimaryKey>,java.util.function.Function<Entity, DTOType>) is not resolvable to a concrete type.; source='public com.mypackage.rest.v1.StuffFacade$EntityFacade(com.mypackage.rest.v1.StuffFacade,com.mypackage.DatastoreAccessor,java.util.function.Function)']
at org.glassfish.jersey.server.internal.routing.SubResourceLocatorRouter$1.run(SubResourceLocatorRouter.java:208)
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)
at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
at org.glassfish.jersey.internal.Errors.process(Errors.java:267)
at org.glassfish.jersey.server.internal.routing.SubResourceLocatorRouter.validate(SubResourceLocatorRouter.java:201)
at org.glassfish.jersey.server.internal.routing.SubResourceLocatorRouter.apply(SubResourceLocatorRouter.java:160)
at org.glassfish.jersey.server.internal.routing.RoutingStage._apply(RoutingStage.java:112)
at org.glassfish.jersey.server.internal.routing.RoutingStage._apply(RoutingStage.java:115)
at org.glassfish.jersey.server.internal.routing.RoutingStage._apply(RoutingStage.java:115)
at org.glassfish.jersey.server.internal.routing.RoutingStage._apply(RoutingStage.java:115)
at org.glassfish.jersey.server.internal.routing.RoutingStage._apply(RoutingStage.java:115)
at org.glassfish.jersey.server.internal.routing.RoutingStage.apply(RoutingStage.java:94)
at org.glassfish.jersey.server.internal.routing.RoutingStage.apply(RoutingStage.java:63)
at org.glassfish.jersey.process.internal.Stages.process(Stages.java:197)
at org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:263)
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)
at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
at org.glassfish.jersey.internal.Errors.process(Errors.java:267)
at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:297)
at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:254)
at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1028)
at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:372)
at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:381)
at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:344)
at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:221)
at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1682)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:344)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at org.glassfish.tyrus.servlet.TyrusServletFilter.doFilter(TyrusServletFilter.java:295)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at com.mypackage.servlet.filter.AuthenticationFilter.doFilter(AuthenticationFilter.java:49)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:316)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:160)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:734)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:673)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:99)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:174)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:415)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:282)
at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:459)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:167)
at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:201)
at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:175)
at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:235)
at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:561)
at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:565)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:545)
at java.lang.Thread.run(Thread.java:745)