5

While starting GlassFish 4.1.1 server (Grizzly Framework 2.3.23), below warning message is displayed: Instance could not be initialized. Class=interface org.glassfish.grizzly.http.server.AddOn

Do Grizzly Framework 2.3.23 to be separately installed on the computer? (As per details: "Class=interface org.glassfish.grizzly.http.server.AddOn" it seems like grizzly http server is part of glassfish) If grizzly http server seperately not needed to be installed, then which instance it is trying to be initialized and failing.

Do GlassFish Plugin for Eclipse is to be added in Spring Tool Suite IDE?

GlassFish 4 server stop and start using command prompt tested:

glassfish4\bin>asadmin stop-domain

Command stop-domain executed successfully.

glassfish4\bin>asadmin start-domain

Waiting for domain1 to start ;
Successfully started the domain : domain1;
domain Location: glassfish4\glassfish\domains\domain1;
Log File: glassfish4\glassfish\domains\domain1\logs\server.log;
Admin Port: 4848;
Command start-domain executed successfully.

Still the warning exist as given above.

If Grizzly Framework is inbuilt in GlassFish 4 then, does Grizzly dependency inclusion in the project pom.xml needed explicitly as given below? (code is from: Grizzly)

<dependencies>
<dependency>
    <groupId>org.glassfish.grizzly</groupId>
    <artifactId>grizzly-http-server</artifactId>
    <version>2.3.22</version>
</dependency>
</dependencies>
Vivaswan
  • 337
  • 4
  • 17
  • Do you see the same problem when running Glassfish standalone, without Eclipse? – alexey May 02 '16 at 18:52
  • @alexey GlassFish4 standalone starting results were included in the question itself by executing it through command prompt using command: >asadmin start-domain, and >asadmin stop-domain with successfully executed results. Only in STS while starting the GlassFish4 it is giving this warning. – Vivaswan May 03 '16 at 05:22
  • Did you ever figure it out? – Hack-R Oct 02 '16 at 15:04
  • It was happened to install new OS Windows 10 on my machine. I have installed fresh installation of updated STS-IDE and GlassFish4 (user: admin password: no password) and GlassFish4 started. – Vivaswan Oct 25 '16 at 04:53

1 Answers1

4

I had the same problem, with Glassfish embedded 4.1.2. Please notice that you wrote only a part of the errore message, full error message is:

Instance could not be initialized. Class=interface org.glassfish.grizzly.http.server.AddOn, name=http-listener-1, realClassName=org.glassfish.grizzly.http2.Http2AddOn

So, Glassfish is trying to instantiate a class in package http2, however this package is not included in embedded Glassfish! There is no such folder in glassfish-embedded-all-4.1.2.jar.

I don't know if this was fixed in 5.0.

My solution for 4.1.2 is to add dependencies that include this package (well, this is exactly the solution you propose):

<dependency>
    <groupId>org.glassfish.grizzly</groupId>
    <artifactId>grizzly-http2</artifactId>
    <version>2.3.28</version>
    <scope>provided</scope>
</dependency>
<dependency>
    <groupId>org.glassfish.grizzly</groupId>
    <artifactId>grizzly-npn-bootstrap</artifactId>
    <version>1.7</version>
    <scope>provided</scope>
</dependency>
luca.vercelli
  • 898
  • 7
  • 24