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.

grizzly
Filter by
Sorted by
Tagged with
1 vote
2 answers
4k views

REST call to ip does not work, but localhost works

i have a implemented a http server (glassfish grizzly) in java. If i submit a REST GET to localhost:3000/api/... i receive my response as expected. If i sumbit that REST GET with my ip (192.168.0....
0 votes
0 answers
60 views

Starting a Grizzly HTTP server on a fargate container

String baseUri = http://127.0.0.1:8080/abc HttpServer grizzlyServer = startServer(baseUri); while (grizzlyServer.isStarted()) { TimeUnit.SECONDS.sleep(1); loopCount++; loopCount = ...
1 vote
0 answers
50 views

Cannot add SSL certificate with Grizzly and Glassfish tyrus on WebSocket server

Currently, I am running a WS (unsecure websocket) server using Grizzly and Tyrus for my messaging app. I have been trying for a while to switch to WSS (websocket secure) but I haven't seen anything ...
124 votes
9 answers
513k views

Can not deserialize instance of java.lang.String out of START_OBJECT token

I'm running into an issue where my deployable jar hits an exception that doesn't happen when I run this locally in IntelliJ. Exception: Receiving an event {id=2, socket=0c317829-69bf-43d6-b598-...
0 votes
0 answers
14 views

Internal server error Maven web service (jersey-quickstart-grizzly template)

I have the following pom.xml file configuration. I'm new in Java and try to run a basic restful web service using Maven. <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="...
0 votes
0 answers
178 views

How to correctly create a web socket connection client in Java?

I can't establish a correct connection to the topic. The server has a spring boot running and a web socket is configured in it: @Configuration @EnableWebSocketMessageBroker public class ...
1 vote
1 answer
93 views

In Jersey test (with Grizzly), how to use Spring Java-based configuration to set up the test context?

I am using JAX-RS, Jersey and Spring. I have this integration test for my JAX-RS resource. public class MyResourceIT extends JerseyTest { @Override protected Application configure() { ...
4 votes
1 answer
2k 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....
11 votes
5 answers
13k views

SSL with Grizzly and Jersey

I'm trying to get grizzly to use SSL encryption and still work fine with Jersey. I've looked all over the Internet, and I find all kinds of different attempts at SSL with Grizzly and Jersey. Seems ...
3 votes
3 answers
2k views

How to setup basic Jersey/Grizzly 2.21 SSL startup configuration

I'm trying to get a very basic Grizzly server up and running to allow for one-way SSL (HTTPS) connections to access jax-rs REST services. Eventually I want two-way SSL security. I've gone through ...
5 votes
2 answers
2k views

Bean Validation 400 errors are returning default error page (html) instead of Response entity (json)

I have a JUnit testsuite: GrizzlyHttpServerFactory + Jersey + Bean Validation (jersey-container-grizzly2-servlet/jersey-bean-validation ver 2.12, grizzly-http-server ver 2.3.16, hibernate-validator ...
14 votes
4 answers
7k views

grizzly http server should keep running

Below is the code to start Grizzly Http Server. If I press any key the server stops. Is there any way to keep it alive. Jetty has join() method, which will not exit the main program. Is there ...
3 votes
2 answers
3k views

Static content in Grizzly jersey

I want to serve static html pages in / and /index.html final HttpServer server = GrizzlyHttpServerFactory.createHttpServer(URI.create(BASE_URI), rc); BASE_URL = http://locahost:8080/api/ ...
6 votes
1 answer
4k views

Glassfish 4 Grizzly Threads Heavy CPU usage

I have a Jersey application running on Glassfish 4 (4.1 build 13), JDK 1.7 update 67 and AWS Linux AMI and I'm noticing that after some hours running it, CPU usage goes up and stays up even though ...
0 votes
1 answer
402 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 ...
1 vote
1 answer
32 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....
2 votes
1 answer
4k views

How can I get the stack trace when 500 server error happens in Jersey?

When in jersey server I have server 500 error: In server response don´t have stack trace or some info. In Eclipse console don´t have exception stack trace I try to catch exception in server and ...
0 votes
0 answers
5k 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 ...
0 votes
1 answer
114 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 ...
2 votes
2 answers
7k views

NoSuchMethodError: com.sun.jersey.core.reflection.ReflectionHelper.getOsgiRegistryInstance()Lcom/sun/jersey/core/osgi/OsgiRegistry;

It seems I have a dependency conflict that I'm unsure how to resolve. I'm attempting to implement Swagger into my application. I've included my pom as well as the stack trace. If I can include ...
10 votes
3 answers
27k views

java.lang.NoSuchMethodError: org.glassfish.jersey.server.ApplicationHandler.<init>

I've been trying to debug this issue for a bit now, and searching SO and other websites I haven't been able to find a solution. I've checked all versions of the dependencies in my pom.xml and made ...
0 votes
0 answers
258 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 ...
11 votes
4 answers
16k views

GRIZZLY0023 Glassfish warning

I have deployed 2 web application in java on GlassFish server. I am using Glassfish Server 3.1.2.2. They both have java servlet pages from where they receive http requests, also the code is identical, ...
0 votes
2 answers
365 views

View Engine for Grizzly, Jersey, and Ozark MVC

I'm trying to create an MVC app using Java EE MVC API implementation - Ozark. I'm using Grizzly as embedded web server. Of course, with Ozark is a JAX-RS implementaion - Jersey. This is my server ...
0 votes
0 answers
82 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-...
0 votes
1 answer
164 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
44 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, ...
1 vote
3 answers
2k views

WebSocket frame fragmentation in an API

Would exposing a WebSocket fragmentation have any value in a client-side API? Reading the RFC 6455 I became convinced a non-continuation frame doesn't guarantee you anything in terms of its semantics....
4 votes
4 answers
14k views

how to deploy jar file to azure?

I've created a RESTFul service using grizzly and google guice. I am able to access it running on the command line: c:\Java\src\options\console>java -jar target\ServerConsole-V1.jar Nov 28, 2017 ...
1 vote
0 answers
81 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
45 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?
7 votes
1 answer
672 views

Is it possible to setup Grizzly for graceful shutdown?

I have a Jersey application running on embedded Grizzly, that is initialized like the following: HttpServer httpServer = GrizzlyServerFactory.createHttpServer(BASE_URI, rc); What i want to achieve ...
0 votes
1 answer
142 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
306 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 votes
1 answer
321 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 ...
1 vote
1 answer
553 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
131 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
179 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 ...
0 votes
0 answers
1k views

Jersey and EJB stateless example, EJB instance is null

I am making a simple RESTful service using JAVAX RS and EJB in order to create a singleton object as a global variable. I initiated the service as follows: import org.glassfish.grizzly.http....
1 vote
0 answers
173 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 vote
0 answers
175 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 ...
1 vote
2 answers
2k views

Unable to start Grizzly http server

I am getting below error when I try starting Grizzly server from Java code. Please help. javax.ws.rs.ProcessingException: Failed to start Grizzly HTTP server: Cannot assign requested address: bind ...
0 votes
2 answers
549 views

Is there a way to remove a header in Grizzly server?

Currently Grizzly server sends a header to client side, which we don't want to send. Header which we want to hide is: WWW-Authenticate: Basic I see org.glassfish.grizzly.http.server.Response class ...
8 votes
4 answers
13k views

Grizzly and ServletContainerContext

I'm trying to get hold of some injected context (for example Session or HttpServletRequest) in a Servlet I've written, running on Grizzly, but nothing I do seems to work. The whole process seems to ...
0 votes
1 answer
367 views

Grizzly FilterChain vs. HttpHandler

I am trying to learn Grizzly. My background is in .NET. When I read through Grizzly's tutorials, a few things confused me. My confusion is related to the basic difference between HttpHandler and ...
5 votes
1 answer
4k views

Get client ip in Jersey 2.22.2

I am trying to access the clients IP that are calling my rest server but I only get null as a response. The web-server is running and I can access it from the web browser. I have tried with @...
0 votes
3 answers
2k views

Embed Grizzly (glassfish) Servlet Container with Spring Boot Java

Spring boot by default uses Tomcat as an Internal Embedded Servlet Container . It has also got support for Jetty and UnderTow. I have build a Restful Application using spring boot . But now i need to ...
1 vote
0 answers
159 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 ...
0 votes
1 answer
135 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
476 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
2 3 4 5
10