Issue Details (XML | Word | Printable)

Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Blocker Blocker
Assignee: vijaysr
Reporter: mkuchtiak
Votes: 0
Watchers: 0

If you were logged in you would be able to see more operations.

Handlers don't work.

Created: 16/Mar/06 05:49 AM   Updated: 30/Nov/10 05:20 PM   Resolved: 06/Apr/06 06:45 PM
Component/s: web_services
Affects Version/s: 9.0pe
Fix Version/s: 9.0pe_dev

Time Tracking:
Not Specified

File Attachments: 1. Text File exc.txt (3 kB) 16/Mar/06 05:54 AM - mkuchtiak
2. Text File exc.txt (5 kB) 16/Mar/06 05:53 AM - mkuchtiak
3. Microsoft Word WebApplication9.tar (170 kB) 16/Mar/06 05:50 AM - mkuchtiak


Operating System: All
Platform: Linux

Issuezilla Id: 424
Participants: mkuchtiak, tomo_ikeda and vijaysr

 Description  « Hide

GlassFish builds #40, #41

1.I specified a handlers.xml file (in WEB-INF directory in my web application) :
<?xml version="1.0" encoding="UTF-8"?>
<jws:handler-config xmlns:jws="">

I created an implementation class that references this handler file :

When I test the WS Operation, I get the error message in Server.log :
Could not find handler chain file WEB-INF/handlers.xml for class a.A

I used the Tester capability :

mkuchtiak added a comment - 16/Mar/06 05:50 AM

Created an attachment (id=138)
Web Application

mkuchtiak added a comment - 16/Mar/06 05:53 AM

Created an attachment (id=139)
Exception in Browser window (from Tester application)

mkuchtiak added a comment - 16/Mar/06 05:54 AM

Created an attachment (id=140)
Exception in Server.log

mkuchtiak added a comment - 16/Mar/06 05:59 AM

Increasing priority to P1 as the whole feature doesn't work.
I tried to change the handlers.xml location (to the same package where is the
implementation class) - this didn't help

vijaysr added a comment - 16/Mar/06 08:13 AM

changing owner

vijaysr added a comment - 16/Mar/06 08:15 AM


vijaysr added a comment - 16/Mar/06 08:34 AM

The WAR file is a doc - please attach a proper WAR file

mkuchtiak added a comment - 16/Mar/06 09:01 AM

I don't understand.
The war file is included in
WebApplication9/dist directory.
You'll get it when you unpack the .tar file.
Should I send the zip file ?

vijaysr added a comment - 16/Mar/06 02:52 PM

I am reducing the priority since there is a workaround - the workaround is to
package the handler file in the same package as the endpoint that uses the
handler (refer to

Also note that the handler.xml file should not have the handler-config thing
that you have

Please use this workaround for now while resolve the problem when you package
the file under WEB-INF

vijaysr added a comment - 16/Mar/06 03:25 PM

As per JSR109 :

The handler chain file in the javax.jws.HandlerChain annotation is required to
be packaged in the module. It must follow the requirements for location as
specified in section 4.6.1 of JSR-181 specification (Web Services Metadata for
the Java Platform). Additionally, the handler chain file can also be packaged
and specified in the annotation such that, it is accessible as a resource from
the ClassPath. At runtime, container providers must first try to access the
handler chain file as per the locations specified in JSR-181 specification.
Failing that, they must try to access it as a resource from the ClassPath. If
more than one resources are returned from the ClassPath, then the first one is used.

And section 4.6.1 of 181 says :

Location of the handler chain file. The location supports 2 formats.
1. An absolute in externalForm.
2. A relative path from the source file or class file.
(ex: bar/handlerfile1.xml)

since WEB-INF is not a loadable resource, handler.xml cannot be packaged under
WEB-INF. Sorry for the confusion

mkuchtiak added a comment - 17/Mar/06 01:45 AM

Sorry, I have to reopen this bug again. Tested in GlassFish build #41.

Even when I move handlers.xml file to the same package where's the
implementation class, I get no responses from handler.

1. I moved handlers.xml to "a" package
2. I changed the annotation to :

What only changed is that server is not complaining any more
("Could not find handler chain ...")

Look at the LoggingHandler class. Is that something I miss ?

vijaysr added a comment - 18/Mar/06 09:19 AM


tomo_ikeda added a comment - 06/Apr/06 09:05 AM

Is this problem really resolved ?
I am trying with 9.0pe_b43 but it still seemed to occur.
It is true that container seemed to recognize @HandlerChain annotation and find
the handler configuration file such as handlers.xml and find handler class, but
still handler does not work.
I get no responses from handler.
Are there any samples which work well ?

vijaysr added a comment - 06/Apr/06 10:47 AM

The bug was : GlassFish was not recognizing namespace aware tags while
processing the handler.xml files;

This was fixed and a test case was also added mimicking this issue. As of now
all handlers tests pass. Here are the references for you :

Servlet Endpoints with handler :

glassfish\appserv-tests\devtests\webservice\annotations\svchandler-4 (this test
case was written specifically for this issue 424)

EJB endpoints with handlers :

Clients with handlers :

If these samples are not helpful, please reopen this issue and give us more info
about your handler.xml file, your endpoint impl, descriptors (if any). Attching
your WAR (if possible) will be really helpful


tomo_ikeda added a comment - 06/Apr/06 06:45 PM

Thank you and sorry.
It is my mistake.
It works well.