Reputation: 337
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>
Upvotes: 5
Views: 4586
Reputation: 1038
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>
Upvotes: 4