Questions tagged [grizzly]

The Grizzly NIO and Web framework leverage Java™ NIO API capabilities. Grizzly's helps developers to build scalable and robust servers using NIO and we are also offering extended framework components: Web Framework (HTTP/S), Bayeux Protocol, Servlet, HttpService OSGi and Comet.

Filter by
Sorted by
Tagged with
0 votes
0 answers
50 views

Out of memory caused by TrimmableHeapBuffer

I am facing Out Of Memory issues on Glassfish 4.0 (Build 89) server. Version of grizzly from \glassfish\glassfish\modules\nucleus-grizzly-all.jar is version="2.3.1" Whenever I face this ...
0 votes
1 answer
138 views

Error marshalling JaxbXmlPart /word/document.xml

I have an issue with the saving of a docx4j document to an OutputStream and I´m not sure how I should debug it. I'm using 8.3.8 for both docx4j-ImportXHTML and docx4j for java 8. In general I´m ...
0 votes
0 answers
211 views

Separate Grizzly HTTPHandlers for different verbs on same URL

I would like to handle a variety of HTTP methods on the same URL. i.e GET http://localhost:8081/test POST http://localhost:8081/test I was originally thinking I could create a separate HTTPHandler ...
  • 2,375
1 vote
1 answer
22 views

Eclipse Grizzly servlet-deployer

Is there a replacement for the package grizzly-servlet-deployer for the recent versions of Eclipse Grizzly (2.0 / 3.0)? This package existed for older versions: https://mvnrepository.com/artifact/com....
  • 1,428
4 votes
0 answers
1k views

How to fix "org.glassfish.jersey.inject.hk2.RequestContext.RequestContext must be in the Singleton scope"

I'd like to implement a simple REST-API with Jersey and grizzly. After beeing stuck in dependency-hell for a while, I ended up with an exception and I have no idea how to handle/interpret: java.lang....
  • 445
0 votes
0 answers
61 views

Jax-rs WriterInterceptor/ ReaderInterceptor never get registered in grizzly connector

Created a super simple ReaderInceptor and registered it with my Jaxrs client using Grizzly as provider. Does not work. Interceptors never seem to get picked up, however Jaxrs filters do. jersey-...
  • 335
0 votes
1 answer
103 views

Load and share data-store cache with Grizzly HTTP Server threads

I am creating a Grizzly http server in a Java SE application, pointing to a Resource package with a class that processes the @GET calls from the browser. By default, Grizzly starts up to 16 threads (0-...
0 votes
0 answers
38 views

Jar upload test strange behaviour on OSX platform ( Junit / glass fish / grizzly)

I am currently testing a maven composite project, and some REST-API upload test are failing on a Mac platform (Big Sur latest) while the same tests are succeeding on windows and Linux platforms. FYI, ...
  • 21
1 vote
0 answers
65 views

backpressure support in grizzly websocket

Does the grizzly web socket library support flow control/back pressure ? If so, which version of grizzly web socket library supports the back pressure ? please share the library /documentation links. ...
1 vote
0 answers
30 views

How do I redirect any invalid links to index.html?

I am using grizzly glassfish to start my server. However, I cannot find a way to redirect invalid links. Any ideas?
  • 2,191
0 votes
1 answer
97 views

How can I access the client certificate in a Grizzly server resource without a servlet context?

I'm using a Grizzly server to serve up my secure jersey resource. The resource expects client authentication and that the client certificate's subjectDN CN portion contains a username I can use for ...
0 votes
1 answer
203 views

Intercept SSL/TLS requests in HTTPS Grizzly server

I have set up an HTTPS server using grizzly 2.3.30 and jersey 2.25.1, which can be found here. The server works well and I can curl to it with certificate-authority, certificate and key: curl -v --...
  • 2,840
1 vote
1 answer
447 views

run java server from python and wait until it is up

So I run java server from terminal calling it with: java =Xmx12G - jar jar.jar --build ../foo --inMemory then it takes some time for the server to step up, sometimes a minute sometime more. I want ...
1 vote
1 answer
69 views

Sent many requests asynchonized to http server but it only serves a few request at a time

I'm facing to this issue: I have a grizzly embedded http server running. By sending 200 asynchronous requests to the server (using ExecutorService in java), I thought it would serve all these request ...
1 vote
0 answers
157 views

how to prevent Heroku H12 "request timeout" for long-running process on Java REST server

We have a Jersey/Grizzly server which serves as our REST backend. Certain requests can easily take longer than 30s to process, which is perfectly normal. Sadly, Heroku terminates the connection ...
  • 1,773
1 vote
0 answers
140 views

Java Grizzly HTTP Server working to capacity 100% CPU usage on some threads

Im using the Grizzly Http Server on my webserver to serve a REST API. After some time the server is working more and more to full capacity even there are no more users online. In htop i can see that ...
  • 1,022
0 votes
0 answers
4k views

Jersey endpoint with SEVERE: An I/O error has occurred while writing a response message entity to the container output stream

I have a jersey v2.30 application using jersey-container-grizzly2-http and jersey-grizzly-connector. I have an endpoint which returns a pdf file, the endpoint seems to work which means the client gets ...
  • 2,795
1 vote
0 answers
137 views

Grizzly 2.4.4 Closed WebSockets Memory Leak

I was asked to analyze heap dump that caused out of memory on environment. The project is using grizzly 2.4.4 websockets module. The issue is that under high load (websocket connections) - when ...
  • 613
0 votes
1 answer
94 views

How to deploy Jersey+Grizzly jar to AWS

I was wondering how can you deploy a Jar file that contains a self-contained app (grizzly) with Jersey framework to AWS Elestic Bean, I've been trying to deploying it by choosing the genereated jar ...
1 vote
0 answers
139 views

Will Servlet be better than reactive-bssed web framework when Fibers arrive?

It looks like new frameworks are being written on top of reactive-based libraries and framworks, ditching Servlet. I'm writing ny own web framework on top of Grizzly HTTP framework (I could have ...
  • 1,000
0 votes
1 answer
113 views

Mulesoft - cloudhub runtime update issues - HTTP connector

I am updating the runtime version of an application in cloudhub(anypoint platform - mulesoft). In detail, updated the runtime 3.9.0 -2018 release to runtime 3.9.0 - 2019 latest version. I am able to ...
1 vote
1 answer
410 views

Jersey POST parameter values always null, but works fine with curl command

Jersey server code: import javax.ws.rs.FormParam; import javax.ws.rs.POST; import javax.ws.rs.Path; import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; @Path("test") public class ...
  • 1,773
0 votes
1 answer
408 views

How to deploy a Jersey REST server to Heroku

The "getting started" example for Jersey uses Grizzly, so we went with that. This allowed us to configure authentication in a fairly straightforward manner, thusly: private static final String ...
  • 1,773
0 votes
1 answer
242 views

Grizzly PRESERVE_HEADER_CASE

I need to make Grizzly not alter the headers keys. I found this property PRESERVE_HEADER_CASE but no idea where to configure Any idea? Regards
  • 12.5k
0 votes
1 answer
671 views

HTTP POST Angular to Java. Cannot send multiple parameters with different types

I am trying to send an uploaded file (FormData from Angular) and a string in the same HTTP POST request to backend (Java using Grizzly server and Ajax for REST services). The problem is that I receive ...
  • 181
1 vote
0 answers
134 views

Always the same warnings while trying to get a basic sse grizzly/jersey server running

I'm trying to get better at java with a project that i wanted to try with SSE but while trying to implement the examples of jersey they always give the same 'warnings'. I first tried to research it ...
  • 26
0 votes
1 answer
105 views

How to execute async calculation and handle other http requests at the same time?

I want to handle several http request simultaneously. What means that I want the thread that get the http request will move the handle of the request to another thread and will be available for ...
  • 107
2 votes
0 answers
143 views

SSE in Jersey: Could not find a suitable constructor in javax.ws.rs.sse.Sse class

I am implementing Server Sent Events with Jersey 2.28 and I can't get the basic examples to work. Other answers mention a dependency problem, I've added all the necessary dependencies to no avail: &...
1 vote
2 answers
766 views

Recovering/ retrying in case of failed or stucked HTTP requests

I have a Java-based server managed by the kubernetes cluster. It's a distributed environment where the number of the instance is set to 4 to handle millions of request per minute. The issue that I am ...
  • 14.9k
-1 votes
1 answer
235 views

do I need to restart the server every time i change a resource?

I want to know if every time I make any changes to a resource, do I need to restart the server? I am inexperienced in the area, I would like content for best practice to build an API.
0 votes
1 answer
869 views

JWT.decode(token) Fails Silently

I have written a JAX-RS ContainerRequestFilter to implement JWT-based access controls on a set of REST services but the application fails to decode the JWT id_token. My web client successfully ...
  • 670
0 votes
2 answers
118 views

Sporadic 502 errors from java web application running on Grizzly

We are getting sporadic 502 errors from our web application; we can reproduce this by repeating the same call multiple times: at the 8th-12th time it hangs for ~30 seconds and then returns a "502 ...
  • 750
0 votes
0 answers
35 views

Unsupported media type exception while running simple rest service using grizzly HttpServer [duplicate]

I am trying to run a simple HttpService using grizzly HttpServer and jax-rs But my post call to the service returns Unsupported Mediatype Error(Status code 415) when I try to run the service by ...
  • 697
1 vote
1 answer
204 views

What are advantages of using servlets when building rest api in java

I have been working on several projects (and some of them were quite big) where we always used grizzly2-http server + jersey for building rest api and we never had any problems. Now, I have been ...
  • 779
1 vote
0 answers
118 views

How test HttpservletRequest with@Context parameter in JerseyTest? [duplicate]

I have a broken unit test after trying do get the HttpServletRequest that is passed as a parameter in a Jersey Web Service post call: @RequestScoped @Path("/por/req") @Produces({ MediaType....
2 votes
1 answer
286 views

Jersey resource @PreDestroy not getting called when Grizzley server is shut down

I'm running a simple Jersey/Grizzly HTTP server with a resource to handle server-sent events. That resource needs to manually take care of a Timer instance to send some keep-alive data to all ...
2 votes
1 answer
488 views

How to Turn off Grizzly Logging?

How can I turn off the Logging of Grizzly? I'd like to turn off following Loggings: Okt 18, 2018 8:42:24 AM org.glassfish.grizzly.http.server.NetworkListener start INFORMATION: Started listener ...
  • 37
0 votes
0 answers
528 views

grizzly tutorial java.net.ConnectException

I followed this tutorial : https://javaee.github.io/grizzly/quickstart.html (it contains 4 files: ClientFilter,EchoClient, EchoFilter, EchoServer) The aim of this tuto is First that the server echo ...
  • 1
3 votes
0 answers
527 views

How do I get HTTP request logs on grizzly server console?

Following the tutorial on Jersey's user guide, I created a small jax-rs based REST web application. This is the main class that starts the server. public class Main { // Base URI the Grizzly HTTP ...
3 votes
1 answer
3k views

"NoClassDefFoundError: javax/inject/Provider" even with javax.inject dependency included

After upgrading some Glassfish/Grizzly dependencies (in order to be compatible with the latest version of Azure's SDK IOT device client), I started getting an error because com.google.common.EventBus ...
0 votes
1 answer
356 views

Jersey + Grizzly behind Apache reverse proxy - Resource not found

I am having a jersey based REST Application which is running on grizzly and configured it as follows behind an apache reverse proxy e.g. www.example.com/base/json/helloworld/get should redirect to my ...
0 votes
1 answer
217 views

How to add ServletContainerInitializer to Grizzly WebappContext?

I create Grizzly WebappContext this way: WebappContext webContext = new WebappContext("WebappContext", ""); And I have MyInitializer that implements ServletContainerInitializer. How can I add this ...
  • 10.4k
2 votes
3 answers
3k views

How to return a string in response that have @Produces(MediaType.APPLICATION_JSON)?

@GET @Path("/paises/{id}") @Produces(MediaType.APPLICATION_JSON) public Response findCuntryList(@PathParam("id")int id){ try{ ArrayList<Country> lista = new ArrayList<>(); for(...
0 votes
2 answers
1k views

Drools Guided Decision Table throws null pointer exception

When i create a guided decision table in kie workbench i get null pointer exception on execution of a stateless or statefull kie session. To be more specific i use drools 7 and i expose a simple rest ...
1 vote
0 answers
252 views

Grizzly KeepAlive issue with filterchain

I've added a Filter to the filterchain in grizzly just before the httpserver filter to limit the amount of http requests that the server has to handle. This works fine until the user adds a Connection:...
  • 1,151
1 vote
1 answer
497 views

Allow DELETE requests with message body, using Grizzly servlet container

I was testing my REST API through Postman, with some dummy requests and I noticed when a DELETE request accidently had a message body, the server always returned with status code 400 (and no message). ...
1 vote
1 answer
467 views

Making standalone grizzly2 JAX-RS accept an encoded URL in the URL?

I am experimenting with enclosing a possibly leaky library in its own standalone JVM and invoke it using REST. I have a Java EE 7 web app which does this, but I would like a stand alone version. To ...
0 votes
1 answer
133 views

Why isn't Docker opening a port? (using Maven Grizzly Jenkins Blue-Ocean )

Modifying one of the tutorials in the jenkins/blue-ocean tutorial for java to create a webapp. Jenkinsfile contains: docker { image 'maven:3-alpine' args '-v /root/.m2:/root/.m2 -p 8050:8050' } ...
1 vote
0 answers
692 views

Netty vs Grizzly detailed differences

Looking for differences between these two. The most information i was able to find is about performance. Netty has much better community for sure they also a little differentiate in transport protcols....
  • 653
0 votes
2 answers
340 views

Rest API SSL With certs signed by ca

I have a problem with Secure Grizzly HttpServer, my method load the keystore file and truststore file and she works for the certs self-signed. private static SSLContextConfigurator ...

1
2 3 4 5
10