Configuration of glassfish results in 500 - Internal Server Error

Its a new installation. unzip of
JAVA_HOME points to /usr/lib64/jvm/java.
Version: OpenJDK Runtime Environment (build 1.8.0_72-b15)
admin password is set.
Server starts to console without any strange message.
login is OK.
Nothing is changed from original default domain1 configuration. (apart password for admin)
First Error:
On trying to change to secure Administration results in internal Server Error 500.
Second Error:
JDBC mySql-connector is installed in the lib directory.
On trying to create a database connection pool to mySql, same Problem Error 500
HTTP Status 500 - Internal Server Error

type Exception report
messageInternal Server Error
descriptionThe server encountered an internal error that prevented it from fulfilling this request.
java.lang.IllegalStateException: getOutputStream() has already been called for this response

note The full stack traces of the exception and its root causes are available in the GlassFish Server Open Source Edition 4.1.1 logs:
[2016-02-10T14:37:05.625+0100] [glassfish 4.1] [WARNING] ] [javax.enterprise.web] [tid: _ThreadID=44 _ThreadName=admin-listener(3)] [timeMillis: 1455111425625] [levelValue: 900]
StandardWrapperValve[FacesServlet]: Servlet.service() for servlet FacesServlet threw exception
java.lang.IllegalStateException: getOutputStream() has already been called for this response
at org.apache.catalina.connector.Response.getWriter(
at org.apache.catalina.connector.ResponseFacade.getWriter(
at com.sun.faces.context.ExternalContextImpl.getResponseOutputWriter(
at com.sun.faces.context.PartialViewContextImpl.createPartialResponseWriter(
at com.sun.faces.context.PartialViewContextImpl.access$300(
at com.sun.faces.context.PartialViewContextImpl$DelayedInitPartialResponseWriter.getWrapped(
at javax.faces.context.PartialResponseWriter.startDocument(
at com.sun.faces.context.AjaxExceptionHandlerImpl.handlePartialResponseError(
at com.sun.faces.context.AjaxExceptionHandlerImpl.handle(
at javax.faces.context.ExceptionHandlerWrapper.handle(
at com.sun.faces.lifecycle.Phase.doPhase(
at com.sun.faces.lifecycle.LifecycleImpl.render(
at javax.faces.webapp.FacesServlet.service(
at org.apache.catalina.core.StandardWrapper.service(
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
at org.apache.catalina.core.ApplicationFilterChain.doFilter(
at com.sun.webui.jsf.util.UploadFilter.doFilter(
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
at org.apache.catalina.core.ApplicationFilterChain.doFilter(
at org.apache.catalina.core.StandardWrapperValve.invoke(
at org.apache.catalina.core.StandardContextValve.invoke(
at org.apache.catalina.core.StandardPipeline.doInvoke(
at org.apache.catalina.core.StandardPipeline.doChainInvoke(
at com.sun.enterprise.web.WebPipeline.invoke(
at org.apache.catalina.core.StandardHostValve.invoke(
at org.apache.catalina.connector.CoyoteAdapter.doService(
at org.apache.catalina.connector.CoyoteAdapter.service(
at org.glassfish.grizzly.http.server.HttpHandler.runService(
at org.glassfish.grizzly.http.server.HttpHandler.doHandle(
at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(
at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(
at org.glassfish.grizzly.ProcessorExecutor.execute(
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(
at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(
at org.glassfish.grizzly.threadpool.AbstractThreadPool$

Is anybody out there being able to run glassfish on openSuse leap?
Beside: I have glassfish running without problems on an other server with SELS 11-sp2!

On Wed 10 Feb 2016 02:16:01 PM CST, juerg wrote:


Is anybody out there being able to run glassfish on openSuse leap?
Beside: I have glassfish running without problems on an other server
with SELS 11-sp2!

Whilst I can’t help you with the error, there is at least one other
person running it on Leap;

Cheers Malcolm °¿° LFCS, SUSE Knowledge Partner (Linux Counter #276890)
SUSE Linux Enterprise Desktop 12 SP1|GNOME 3.10.4|3.12.51-60.25-default
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below… Thanks!

Just have it running is not the point. It should be useful in some kind. For this it should be possible to configure, i.e. change to secure Administration and setup jdbc-pools etc. If this doesn’t work, it’s a show stopper, even if you can start or stop the naked glassfish server!
You see my case?

Since this appears to be a new install, need basics…

  1. Did you update your system <prior> to installing Glassfish? Is a next indispensible, critical requirement when building a “platform.”
zypper up
  1. I don’t know if Glassfish requires Oracle Java. Is openJDK acceptable? If it requires JDK components (my guess there is a high likelihood) then you’ll need to either install “openjdk-devel” or install Oracle SE 8 JDK.

  2. Where is your Glassfish install source coming from? How did you install it? You need to provide description of the package or link to downloads and any guides you’re following.

  3. What version of Apache are you running?

The above is just a start, listing some basic missing information.


First of all, thanks to every contribution.
The system was updated. That is not the problem, but the hint an indication of a Bad System!
Installation of glassfish limits to unzip the Oracle distribution the the directory of choice, in this case to /opt/oracle/glassfish4. Hence very difficult do do any thing wrong. Beside the server starts and can be accessed. The problems starts on trying to do the most basic configurations.
Next point is the hint with regard to jdk version. Up to now, I never could observe a difference between OpenJDK or Oracle JDK, so finding a problem here is very unlikely. IBM-JDK is different, but fortunately they integrate it within the websphere- server. The latter may be the reason why websphere was the only SW to be installed and ran on OpenSuse Leap without struggling from one bug to the next.
Nevertheless the hint with the JDK was good. I have observed alredy before strange problems running glassfish with jdk8. Remember both coming from the same owner and Oracle Not giving anymore access to jdk7 unless you pay!
Nevertheless I installed jdk7 from oracle in the place used in the older versions in /usr/java. To switch to this JDK, I had to dig deeper into the Yast-installed Java configuration. O my god! Which mad, confused mind could ever invent such a devils kitchen like /etc/alternate? No mean to change whatever in this mess! So, I uninstalled with yast all kind of java jdk. The vertex of the exercise was the fact, the uninstall did NOT clean-up the mess! This is a bad bug! This is real BS-Software. I mean real Bad System-Software! No wonder it’s a sack of bugs. Such a thing can never work well!
Fortunately, finally with JAVA_HOME exports and PATH pointing to /usr/java/latest, which allows to switch from one jdk to an other with one rm and a ln -s, I could be sure to have glassfish pointing to jdk7! But this neither changed anything. Error 500 with indications to missing JSF-libraries and Constants! Please remember, all jee related jars are included in the zip or the unzipped directory! Hence some ill configured mess from Leap or I guess SLES 12 must be the cause!
Conclusion: OpenSuse leap found the place where it belongs, the waste bucket! Instead of having up a new server in a day or two, I wasted immeasurably time and just missed to put the tomato seeds in earth to have plants to bring outside, as soon it’s warm enough.
Remember I started the exercise, because Apache 2.2 on SLES 11 is not able to do ssl with TLS 1.2. IBM HTTP server can do it and was quickly installed. Unfortunately the latter does not support php! With openssl 0.9.8 no actual certificates can be generated and updated to an actual version is almost impossible on SLES 11, because if you touch a card in this card-house every thing falls apart!
I did a lot of development and projects in my life. Very few of them ended in the waste bucket. When this happened, I was victim of bad practices like the mentioned ones. In the early 1980s we have never heard of Object Oriented Programming, much less of Functional Programming. Nevertheless we did it. We called it encapsulation and don’t wash your dirty clothes in public! Where are the good old principles as KISS (keep it simple stupid) and the principle of locality, do things belonging together in one place! Look at the opposite like /etc/alternate, or the configuration of apache by SuSE! Just horrible and completely silly!
I’m sorry for those bad comments. My hope is to wake one or the other up, to start to do things as they must be done. Don’t mess around!

I understand your move to just trash your existing install.

In the future be aware that planning and asking questions in a timely manner (Before you move forward on your own!) can save time/effort and be the difference between success/failure.

You should know that openSUSE is one of the relatively few distros that supports multiple concurrently installed versions of a number of apps, including Java if they’re installed from the openSUSE repos. We have a utility that allows displaying and switching between versions called “update-alternatives.” So, a considerable amount of your effort was wasted over getting Java to work when the following command would have done what you wanted in a second

update-alternatives --config java

When you post what you have done or attempt to do, simply recounting your steps is inadequate.
You need to provide a link to the Guide or reference you are following. Without that, no one can evaluate whether you’re following the Guide correctly, or if any steps should be modified to take advantage of openSUSE features (like the Java setup).

If you decide to have another go at this on openSUSE, provide the info I requested and ask your questions <before> you dive in.

Good Luck,

Thanks for your intend. But you must know, I worked with so much unix flavors 10 years before I saw for the first time Windows 3.11, I can say, I know pretty well what I’m doing. Second, I started with SuSE 1.0 around 1996 and I installed SLES 1.0 on my server as soon as it was available. Though I’m a developer, and only by accident an Admin, I know what I want and how to achieve it. I am also very tough in finishing things I started. It may take the time, if progress is visible from step to step. But wasting my time repeating the same things and expecting an other result, or expecting a result from a well known action, but getting some random result is not may thing. Definitively not!
I become aware, it’s the Gamer-Generation working now. The outcome is not a pleasure. Maybe my generation was not brilliant in fantasy. But we were used to get the most out from the very limited hardware at the time. This required straight thinking and keeping things as simple as possible. The new generation is trained to find odd paths to get at the end of the game. For gaming it’s certainly a good tactic and develops the fantasy, for developing solid working SW it’s not!
You know, being frustrated from the bad experience with the new SuSE, I installed FreeBSD in my VMPlayer. You would be surprised how smooth it works and if you get always the expected result when you do a command, you get confidence in the system. Unfortunately I still don’t know if DB2, WebSphere and Lotus Domino also work well on BSD. If it’s the case, SuSE will be left behind for ever!

You should be aware that your long experience may actually be an obstacle running newer versions of Linux, and openSUSE should not be considered something that unique.

There have been a multitude of radical improvements working their way into both the Linux core and what is built around the Linux core in the last 5 years or so.

So, for example the Linux kernel underwent a radical re-invention approx v 26.29 (I don’t remember the exact version) changing from monolithic to modular. The result has been accelerated contributions and today almost all I/O and graphical drivers are distributed through the kernel and implemented as a kernel-space process instead of user-space.

systemd has either already replaced or is on the roadmap for most major distros, and openSUSE is one of the leading implementers. This means that although there are still some some legacy sysVinit, udev and other subsystems, they’re all in the process of being replaced for a variety of reasons including security, performance, efficiency and standardization (You don’t have to learn a new language to manage every subsystem). So, all the sysVinit methods you’ve used since the beginning to script and manage your system will be obsolete eventually and some won’t work today.

As I’ve described in openSUSE, some distros will have special features that greatly ease how things might have been done in the past, and this also means that if you force what you’ve done before you could break parts of your system without realizing the consequences. So, it’s worth looking around and asking questions before diving head first when things aren’t working at first as expected.


TSU, I still owe you an answer. W.r.t. Glassfish the mentioned problem has nothing to due with OpenSuSE LEAP. it must be said!
The problem was found at Oracle. In fact I got 3 different files of glassfish 4.1.1 from Oracle. For all of them broken with the same problem. This is weired. The issue had to be on the OS side. But no, it’s not! Fortunatley I still had the previous version of glassfish V4.1. On installing this file every thing worked fine as expected. Even better on applying the updater, I got a working copy of 4.1.1!
So this issue is resolved. But Leap 42 is dead for me anyway. To much troubles with systemd!
I’m back to SLES 11 SP4. On this server, at least start and stop of the applications on starting the server, but even more important, on the running server but configuring applications works! Systemd is simply broken and not yet mature for a production system. Beside: When a server is up for a year and more, the starting or stopping time just doesn’t matter!
And even more important. While SLES 11 is very hard to bring up actual applications as Apache 2.4, php, perl, Openssl 1.0.2.e, etc. A lot of helpers must be downloaded, compiled and installed. But with the experience of systemd on Leap, SLES 12 is taboo. The openSuse should convince customers for the SLES products, but, as shown, the opposite can happen!

Recommend you play around with LEAP in your spare time.

I’d expect that eventually many major parts of LEAP will make its way eventually into SLES, especially systemd. It’s not just SUSE, systemd is on the roadmap for all major distros, for example although RHEL floated the change and then pulled back, Debian seems to be taking concrete steps. In fact, I discovered only these past couple weeks that Debian adopted and integrated two longtime openSUSE ways of doing things, a rolling release (Their Development release now is like our Tumbleweed) and they now also use update-alternatives.

It won’t be too long until systemd will replace sysVinit everywhere except minor distros, there are too many improvements practically every way imaginable. Distros that don’t change to systemd will be seen as significantly slower, less secure, poorer container support, and eventually not mainstream enough that people will find that what you find natural ways of doing things to be forgotten and uncommon.

Right now, the User experience is not too different between a system running sysVinit and systemd, the main difference probably is boot times… but as more components and subsystems are re-written in C replacing bash scripts and systemd process management is applied to more subsystems, the improvements will likely be more noticeable all the time.