You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cxf.apache.org by hamidreza abroshan <ha...@gmail.com> on 2020/01/25 04:31:53 UTC

jaxws in apache cxf and glassfish 5 gets java.lang.IllegalStateException: The lifecycle method [finalizeConfig] must not throw a checked exception.

I'm running a soap web service and getting this error:
java.lang.IllegalStateException: The lifecycle method [finalizeConfig]
must not throw a checked exception. Related annotation information:
annotation [@javax.annotation.PostConstruct()] on annotated element
[public void org.apache.cxf.transport.http_jetty.spring.JettyHTTPServerEngineBeanDefinitionParser$SpringJettyHTTPServerEngine.finalizeConfig()
throws java.security.GeneralSecurityException,java.io.IOException] of
type [METHOD]
    at com.sun.enterprise.deployment.archivist.Archivist.readAnnotations(Archivist.java:503)
    at com.sun.enterprise.deployment.archivist.Archivist.readAnnotations(Archivist.java:423)
    at org.glassfish.web.deployment.archivist.WebArchivist.postAnnotationProcess(WebArchivist.java:317)
    at org.glassfish.web.deployment.archivist.WebArchivist.postAnnotationProcess(WebArchivist.java:68)
    at com.sun.enterprise.deployment.archivist.Archivist.readRestDeploymentDescriptors(Archivist.java:397)
    at com.sun.enterprise.deployment.archivist.Archivist.readDeploymentDescriptors(Archivist.java:372)
    at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:247)
    at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:256)
    at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:217)
    at com.sun.enterprise.deployment.archivist.ApplicationFactory.openArchive(ApplicationFactory.java:137)
    at org.glassfish.javaee.core.deployment.DolProvider.processDOL(DolProvider.java:183)
    at org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:207)
    at org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:73)
    at com.sun.enterprise.v3.server.ApplicationLifecycle.loadDeployer(ApplicationLifecycle.java:857)
    at com.sun.enterprise.v3.server.ApplicationLifecycle.setupContainerInfos(ApplicationLifecycle.java:797)
    at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:354)
    at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:195)
...
I'm using Glassfish 5.1.0 and using Apache cxf 3.3.5 and my IDE is
Eclipse EE Version: 2019-12 (4.14.0)
I downloaded Apache CXF binary distribution and added in to eclipse CXF runtime.
This is my web service class:
package com.web.service;

import javax.jws.WebMethod;
import javax.jws.WebService;

@WebService(targetNamespace = "localhost:8080")
public class Service {
    @WebMethod public String greet(String name) {
        return "Hi," + name;
    }
}
I also posted my problem in <a
href="https://stackoverflow.com/questions/59902450/jaxws-in-apache-cxf-and-glassfish-5-gets-java-lang-illegalstateexception-the-li">
StackOverFlow. </a>
I tried existing solutions, but they didn't work for me.
thanks in advance.

Re: jaxws in apache cxf and glassfish 5 gets java.lang.IllegalStateException: The lifecycle method [finalizeConfig] must not throw a checked exception.

Posted by Alexey Markevich <bu...@gmail.com>.
Hi Hamidreza,
Check the similar issue: https://issues.apache.org/jira/browse/CXF-5483

On 1/25/20, hamidreza abroshan <ha...@gmail.com> wrote:
> I'm running a soap web service and getting this error:
> java.lang.IllegalStateException: The lifecycle method [finalizeConfig]
> must not throw a checked exception. Related annotation information:
> annotation [@javax.annotation.PostConstruct()] on annotated element
> [public void
> org.apache.cxf.transport.http_jetty.spring.JettyHTTPServerEngineBeanDefinitionParser$SpringJettyHTTPServerEngine.finalizeConfig()
> throws java.security.GeneralSecurityException,java.io.IOException] of
> type [METHOD]
>     at
> com.sun.enterprise.deployment.archivist.Archivist.readAnnotations(Archivist.java:503)
>     at
> com.sun.enterprise.deployment.archivist.Archivist.readAnnotations(Archivist.java:423)
>     at
> org.glassfish.web.deployment.archivist.WebArchivist.postAnnotationProcess(WebArchivist.java:317)
>     at
> org.glassfish.web.deployment.archivist.WebArchivist.postAnnotationProcess(WebArchivist.java:68)
>     at
> com.sun.enterprise.deployment.archivist.Archivist.readRestDeploymentDescriptors(Archivist.java:397)
>     at
> com.sun.enterprise.deployment.archivist.Archivist.readDeploymentDescriptors(Archivist.java:372)
>     at
> com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:247)
>     at
> com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:256)
>     at
> com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:217)
>     at
> com.sun.enterprise.deployment.archivist.ApplicationFactory.openArchive(ApplicationFactory.java:137)
>     at
> org.glassfish.javaee.core.deployment.DolProvider.processDOL(DolProvider.java:183)
>     at
> org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:207)
>     at
> org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:73)
>     at
> com.sun.enterprise.v3.server.ApplicationLifecycle.loadDeployer(ApplicationLifecycle.java:857)
>     at
> com.sun.enterprise.v3.server.ApplicationLifecycle.setupContainerInfos(ApplicationLifecycle.java:797)
>     at
> com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:354)
>     at
> com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:195)
> ...
> I'm using Glassfish 5.1.0 and using Apache cxf 3.3.5 and my IDE is
> Eclipse EE Version: 2019-12 (4.14.0)
> I downloaded Apache CXF binary distribution and added in to eclipse CXF
> runtime.
> This is my web service class:
> package com.web.service;
>
> import javax.jws.WebMethod;
> import javax.jws.WebService;
>
> @WebService(targetNamespace = "localhost:8080")
> public class Service {
>     @WebMethod public String greet(String name) {
>         return "Hi," + name;
>     }
> }
> I also posted my problem in <a
> href="https://stackoverflow.com/questions/59902450/jaxws-in-apache-cxf-and-glassfish-5-gets-java-lang-illegalstateexception-the-li">
> StackOverFlow. </a>
> I tried existing solutions, but they didn't work for me.
> thanks in advance.
>