users@glassfish.java.net

GF V3.1 - Handler class defined on JAXWS Binding descriptor gives always ClassNotFoundException

From: CasMeiron <casmeiron_at_gmail.com>
Date: Fri, 3 Sep 2010 10:13:50 -0300

Hi guys,

I'm trying to apply some SOAP Handlers on my WS but I always get
"ClassNotFoundException" (and the class is correctly defined, i
double-checked it!).

Follow the gf server output log:
INFO: No timers to be deleted for id: 84116253997006848
SEVERE: component referenced from annotation symbol cannot be found
 symbol: javax.jws.HandlerChain
 location: class example.HelloWorldWS
WARNING: handler class example.handler.WSAuthenticationHandler
 specified in handler file /META-INF/handlers.xml cannot be loaded
SEVERE: Annotations processing failed for
file:/D:/Developer/web-containers/glassfish-v3.1/glassfish/domains/domain1/eclipseApps/javaee6-jaxws/

SEVERE: WS00034: Two web services are being deployed with the same endpoint
URL HelloWorldWSService/HelloWorldWS; The service that gets loaded last will
always be the one that is active for this URL
SEVERE: Unable to load handler class example.handler.WSAuthenticationHandler
java.lang.ClassNotFoundException: example.handler.WSAuthenticationHandler
 at
org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1518)
 at
org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1368)
at java.lang.Class.forName0(Native Method)
 at java.lang.Class.forName(Class.java:247)
at
org.glassfish.webservices.WsUtil.processConfiguredHandlers(WsUtil.java:2144)
 at
org.glassfish.webservices.WsUtil.configureJAXWSServiceHandlers(WsUtil.java:2196)
at
org.glassfish.webservices.EjbRuntimeEndpointInfo.prepareInvocation(EjbRuntimeEndpointInfo.java:278)
 at
org.glassfish.webservices.EjbRuntimeEndpointInfo.initRuntimeInfo(EjbRuntimeEndpointInfo.java:363)
at
org.glassfish.webservices.WebServiceEjbEndpointRegistry.registerEndpoint(WebServiceEjbEndpointRegistry.java:141)
 at
com.sun.ejb.containers.BaseContainer.initializeHome(BaseContainer.java:1170)
at
com.sun.ejb.containers.StatelessSessionContainer.initializeHome(StatelessSessionContainer.java:202)
 at
com.sun.ejb.containers.ContainerFactoryImpl.createContainer(ContainerFactoryImpl.java:167)
at
org.glassfish.ejb.startup.EjbApplication.loadContainers(EjbApplication.java:224)
 at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:255)
at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:97)
 at org.glassfish.internal.data.ModuleInfo.load(ModuleInfo.java:176)
at
org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:238)
 at
com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:385)
at
com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:220)
 at
org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:351)
at
com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:359)
 at
com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:374)
at
com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1071)
 at
com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:100)
at
com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1205)
 at
com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1194)
at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:375)
 at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:209)
at
com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:166)
 at
com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:117)
at
com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:234)
 at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:824)
at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:721)
 at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1014)
at
com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:220)
 at
com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135)
at
com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)
 at
com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)
at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
 at
com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)
at
com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
 at com.sun.grizzly.ContextTask.run(ContextTask.java:69)
at
com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:530)
 at
com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:511)
at java.lang.Thread.run(Thread.java:619)


INFO: Metro monitoring rootname successfully set to:
amx:pp=/mon/server-mon[server],type=WSEndpoint,name=HelloWorldWSService-HelloWorldWSPort
WARNING: "GMBAL901: JMX exception on registration of MBean
MBeanImpl[type=WSEndpoint,name=HelloWorldWSService-HelloWorldWSPort,oname=amx:pp=/mon/server-mon[server],type=WSEndpoint,name=HelloWorldWSService-HelloWorldWSPort]"
WARNING: Container org.glassfish.webservices.JAXWSContainer_at_63a892 doesn't
support class com.sun.xml.ws.api.server.Module
INFO: Portable JNDI names for EJB HelloWorldWS :
[java:global/javaee6-jaxws/HelloWorldWS!example.HelloWorldWS,
java:global/javaee6-jaxws/HelloWorldWS]
INFO: WS00019: EJB Endpoint deployed
 javaee6-jaxws listening at address at
http://note-pc:8080/HelloWorldWSService/HelloWorldWS
INFO: PersistenceStrategyBuilderFactory>>createPersistenceStrategyBuilder:
CandidateBuilderClassName = class
com.sun.enterprise.web.MemoryStrategyBuilder
INFO: WEB0671: Loading application [javaee6-jaxws] at [/javaee6-jaxws]
WARNING: Unable to get Application config for: javaee6-jaxws
SEVERE: component referenced from annotation symbol cannot be found
 symbol: javax.jws.HandlerChain
 location: class example.HelloWorldWS
WARNING: handler class example.handler.WSAuthenticationHandler
 specified in handler file /META-INF/handlers.xml cannot be loaded
SEVERE: Annotations processing failed for
file:/D:/Developer/web-containers/glassfish-v3.1/glassfish/domains/domain1/eclipseApps/javaee6-jaxws/

SEVERE: WS00034: Two web services are being deployed with the same endpoint
URL HelloWorldWSService/HelloWorldWS; The service that gets loaded last will
always be the one that is active for this URL

SEVERE: Unable to load handler class example.handler.WSAuthenticationHandler
java.lang.ClassNotFoundException: example.handler.WSAuthenticationHandler
 at
org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1518)
 at
org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1368)
at java.lang.Class.forName0(Native Method)
 at java.lang.Class.forName(Class.java:247)
at
org.glassfish.webservices.WsUtil.processConfiguredHandlers(WsUtil.java:2144)
 at
org.glassfish.webservices.WsUtil.configureJAXWSServiceHandlers(WsUtil.java:2196)
at
org.glassfish.webservices.EjbRuntimeEndpointInfo.prepareInvocation(EjbRuntimeEndpointInfo.java:278)
 at
org.glassfish.webservices.EjbRuntimeEndpointInfo.initRuntimeInfo(EjbRuntimeEndpointInfo.java:363)
at
org.glassfish.webservices.WebServiceEjbEndpointRegistry.registerEndpoint(WebServiceEjbEndpointRegistry.java:141)
 at
com.sun.ejb.containers.BaseContainer.initializeHome(BaseContainer.java:1170)
at
com.sun.ejb.containers.StatelessSessionContainer.initializeHome(StatelessSessionContainer.java:202)
 at
com.sun.ejb.containers.ContainerFactoryImpl.createContainer(ContainerFactoryImpl.java:167)
at
org.glassfish.ejb.startup.EjbApplication.loadContainers(EjbApplication.java:224)
 at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:255)
at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:97)
 at org.glassfish.internal.data.ModuleInfo.load(ModuleInfo.java:176)
at
org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:238)
 at
com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:385)
at
com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:220)
 at
com.sun.enterprise.v3.server.ApplicationLifecycle.enable(ApplicationLifecycle.java:1791)
at
com.sun.enterprise.v3.server.ApplicationConfigListener.enableApplication(ApplicationConfigListener.java:223)
 at
com.sun.enterprise.v3.server.ApplicationConfigListener.handleOtherAppConfigChanges(ApplicationConfigListener.java:169)
at
com.sun.enterprise.v3.server.ApplicationConfigListener.transactionCommited(ApplicationConfigListener.java:133)
 at
org.jvnet.hk2.config.Transactions$TransactionListenerJob.process(Transactions.java:335)
at
org.jvnet.hk2.config.Transactions$TransactionListenerJob.process(Transactions.java:326)
 at
org.jvnet.hk2.config.Transactions$ListenerNotifier$1.call(Transactions.java:202)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
 at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at org.jvnet.hk2.config.Transactions$Notifier$1.run(Transactions.java:158)
 at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
 at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
 at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)


INFO: Metro monitoring rootname successfully set to:
amx:pp=/mon/server-mon[server],type=WSEndpoint,name=HelloWorldWSService-HelloWorldWSPort
WARNING: "GMBAL901: JMX exception on registration of MBean
MBeanImpl[type=WSEndpoint,name=HelloWorldWSService-HelloWorldWSPort,oname=amx:pp=/mon/server-mon[server],type=WSEndpoint,name=HelloWorldWSService-HelloWorldWSPort]"
WARNING: Container org.glassfish.webservices.JAXWSContainer_at_189ba90 doesn't
support class com.sun.xml.ws.api.server.Module
INFO: Portable JNDI names for EJB HelloWorldWS :
[java:global/javaee6-jaxws/HelloWorldWS!example.HelloWorldWS,
java:global/javaee6-jaxws/HelloWorldWS]
INFO: WS00019: EJB Endpoint deployed
 javaee6-jaxws listening at address at
http://note-pc:8080/HelloWorldWSService/HelloWorldWS
INFO: PersistenceStrategyBuilderFactory>>createPersistenceStrategyBuilder:
CandidateBuilderClassName = class
com.sun.enterprise.web.MemoryStrategyBuilder
INFO: WEB0671: Loading application [javaee6-jaxws] at [/javaee6-jaxws]
INFO: loading.application.time
INFO: javaee6-jaxws was successfully deployed in 6,551 milliseconds.



Follow the attached test case, hope someone can help me.

Thanks in advance.

-------------------------------
Paulo Reis