0

I downloaded the latest version (4.1.1) of GlassFish, unzipped to a local folder, started the domain with command asadmin start-domain from the bin directory.

I Opened the admin console of the server on web browser and clicked the new button on resources-> jms resources -> connection factories which resulted in a runtimeexception.

I then clicked the new button on resources->JDBC Resources which also resulted in a runtimexception. In short, clicking on any 'new' button results in a runtimexception.

I didn't find any answer to this problem online. If anybody know the reason, please let me know.

Here is the log:

2015-12-10T23:03:25.558-0500] [glassfish 4.1] [INFO] [] [org.glassfish.admingui] [tid: _ThreadID=51 _ThreadName=admin-listener(1)] [timeMillis: 1449806605558] [levelValue: 800] [[
  Redirecting to /index.jsf]]

[2015-12-10T23:03:26.392-0500] [glassfish 4.1] [INFO] [] [org.glassfish.admingui] [tid: _ThreadID=53 _ThreadName=admin-listener(3)] [timeMillis: 1449806606392] [levelValue: 800] [[
  Admin Console: Initializing Session Attributes...]]

[2015-12-10T23:03:36.527-0500] [glassfish 4.1] [INFO] [] [javax.enterprise.resource.webcontainer.jsf.context] [tid: _ThreadID=53 _ThreadName=admin-listener(3)] [timeMillis: 1449806616527] [levelValue: 800] [[
  Exception when handling error trying to reset the response.
java.io.IOException: Connection is closed
    at org.glassfish.grizzly.nio.NIOConnection.assertOpen(NIOConnection.java:432)
    at org.glassfish.grizzly.http.io.OutputBuffer.write(OutputBuffer.java:653)
    at org.apache.catalina.connector.OutputBuffer.writeBytes(OutputBuffer.java:355)
    at org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:342)
    at org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:161)
    at sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:221)
    at sun.nio.cs.StreamEncoder.implWrite(StreamEncoder.java:282)
    at sun.nio.cs.StreamEncoder.write(StreamEncoder.java:125)
    at java.io.OutputStreamWriter.write(OutputStreamWriter.java:207)
    at com.sun.faces.renderkit.html_basic.HtmlResponseWriter.flushAttributes(HtmlResponseWriter.java:1211)
    at com.sun.faces.renderkit.html_basic.HtmlResponseWriter.endElement(HtmlResponseWriter.java:582)
Mike
  • 4,852
  • 1
  • 29
  • 48
Johnyzhub
  • 382
  • 2
  • 4
  • 18
  • Does this happen every time? Even after you restart the domain or even after you download a new version? – Mike Dec 11 '15 at 08:47
  • Yes Everytime. I repeatedly downloaded v4.1.1 from https://glassfish.java.net/download.html. and followed the steps mentioned on that page from step 0 till step 4 and clicked on 'new' button on jms connection factories, jdbc resources etc. Everytime, I got the above runtimeexception as pasted. You can try the same as described on the page https://glassfish.java.net/download.html – Johnyzhub Dec 11 '15 at 23:04

1 Answers1

1

Glassfish allowes creation of Resources only through asadmin console for v4.1.1

   Eg : 
     asadmin> create-jms-resource --restype javax.jms.ConnectionFactory              
     --description "connection factory for durable subscriptions" --property   
     ClientId=MyID jms/DurableConnectionFactory

     asadmin> create-jms-resource --restype javax.jms.Queue --property 
              Name=MyQueue jms/MyQueue

Though updating and deleting is allowed through admin web console, creation is disabled. Alternatively, these resources can also be created by adding them manually in domain.xml file under glassfish/domain-name/config

<resources><connector-connection-pool max-pool-size="250" resource-adapter-name="jmsra" steady-pool-size="1" name="jms/MyConnectionFactory-Connection-Pool" description="MyConnectionFactory" connection-definition-name="javax.jms.ConnectionFactory" transaction-support=""></connector-connection-pool>
<connector-resource pool-name="jms/MyConnectionFactory-Connection-Pool" jndi-name="jms/MyConnectionFactory"></connector-resource>
<admin-object-resource res-adapter="jmsra" description="myQueue" res-type="javax.jms.Queue" jndi-name="jms/myQueue">
  <property name="Name" value="myQueue"></property>
</admin-object-resource>  </resources>
Johnyzhub
  • 382
  • 2
  • 4
  • 18
  • GlassFish should still work on JDK 7 with no issue, the recommendation of JDK 8 is due to the fact that Java 7 reached "end of life" in April this year, so is no longer supported by Oracle. Having mentioned this to the Payara guys, this looks like a bug in GF 4.1.1 which is fixed in the latest Payara. I can't find any Github issue to back that up at the moment, though. – Mike Dec 16 '15 at 08:22
  • Could you please let me know whether you are getting the same issue or am I the only one with this issue? – Johnyzhub Dec 18 '15 at 00:56
  • Faced same problem on Mac OS El Capitan with NetBean. Glassfish version 4.1.1. Had to go with terminal to /Applications/NetBeans/glassfish-4.1.1/bin and execute ./asadmin – Setrino Mar 19 '17 at 13:12