4

I have a strange behavior of Glassfish 3.1.2.2 (build 5) running on OpenIndiana 151.a3 Using oracle jdk 1.7.0_5.

When i deploy my web application which has a spring web dispatcher and stripes servlet I get them initialized twice in a row e.g.

 PWC1412: WebModule[null] ServletContext.log():Initializing Spring root WebApplicationContext|#]

 INFO  StripesFilter                  - Stripes Initialization Complete. Version: 1.5.6, Build: 1.5.6

 PWC1412: WebModule[null] ServletContext.log():Initializing Spring root WebApplicationContext|#]

 INFO  StripesFilter                  - Stripes Initialization Complete. Version: 1.5.6, 
Build: 1.5.6

 WEB0671: Loading application [my-web] at [/my-web]|#]

That wouldn't be a much problem if not for an blazeds servlet that i initialize from spring which fails completely on second initialization. I tried disabling blazeds servlet but that doesn't solve double initialization problem because i still get messages of initialization twice in a log. And my application wouldn't work without blazeds so i'm in a pinch here.

UPDATE: I've confirmed it only happens on OpenIndiana host, same configuration on linux works without issues

Troydm
  • 2,642
  • 3
  • 24
  • 35

2 Answers2

5

We had a similar problem. We also tried to deploy to a particular virtual server, which did not work. To fix the issue I ended up having to manually delete the extra virtual-server from the domain.xml:

<virtual-server id="admin-server" network-listeners="http-listener-2"></virtual-server>
Chris Ritchie
  • 4,749
  • 2
  • 36
  • 33
2

If you have more than one virtual server:

"If you deploy a web application and don't specify any assigned virtual servers, the web application is assigned to all currently defined virtual servers"

http://docs.oracle.com/cd/E18930_01/html/821-2416/ggncs.html

But this did not solve our problem.

We had to delete the extra virtual server for it to work. This also happens on 3.1.2 and it is not just a windows problem. We replicated the issue on Linux too.

Rian
  • 1,243
  • 2
  • 17
  • 22