Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    org.apache.catalina.LifecycleException: java.lang.IllegalArgumentException: java.lang.ClassNotFoundException: com.isomorphic.base.InitListener

    Some background first: Our main objective is to have a reduced development environment in SmartGWT integrated with Maven, to be able to test some of the components and validate if we can use them in our software.

    I set the environment, and update the Maven dependencies, but when I deploy the aplication into the Glassfish server, an exception is thrown.

    TL;DR: In order to deploy the application, I ran this goal clean compile gwt:compile war:war, after that, I tried to deploy the project in Glassfish (using "Add/Remove") but it failed and threw the exception below (complete server log is attached)

    Code:
    [INDENT][2021-03-16T17:07:59.614-0500] [glassfish 4.1] [SEVERE] [AS-WEB-CORE-00108] [javax.enterprise.web.core] [tid: _ThreadID=221 _ThreadName=admin-listener(6)] [timeMillis: 1615932479614] [levelValue: 1000] [[[/INDENT][INDENT=2]ContainerBase.addChild: start:
    org.apache.catalina.LifecycleException: java.lang.IllegalArgumentException: java.lang.ClassNotFoundException: com.isomorphic.base.InitListener
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:5898)
    at com.sun.enterprise.web.WebModule.start(WebModule.java:691)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:1041)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:1024)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:747)
    at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:2286)
    at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1932)
    at com.sun.enterprise.web.WebApplication.start(WebApplication.java:139)
    at org.glassfish.internal.data.EngineRef.start(EngineRef.java:122)
    at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:291)
    at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:352)
    at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:500)
    at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:219)
    at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:491)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:539)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:535)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.Subject.doAs(Subject.java:360)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:534)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:565)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:557)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.Subject.doAs(Subject.java:360)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:556)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1464)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1300(CommandRunnerImpl.java:109)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1846)
    at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1722)
    at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:534)
    at com.sun.enterprise.v3.admin.AdminAdapter.onMissingResource(AdminAdapter.java:224)
    at org.glassfish.grizzly.http.server.StaticHttpHandlerBase.service(StaticHttpHandlerBase.java:189)
    at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:459)
    at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:167)
    at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:201)
    at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:175)
    at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:235)
    at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
    at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:283)
    at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:200)
    at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:132)
    at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:111)
    at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
    at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:561)
    at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112)
    at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117)
    at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56)
    at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137)
    at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:565)
    at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:545)
    at java.lang.Thread.run(Thread.java:748)
    Caused by: java.lang.IllegalArgumentException: java.lang.ClassNotFoundException: com.isomorphic.base.InitListener
    at org.apache.catalina.core.StandardContext.addListener(StandardContext.java:3302)
    at org.apache.catalina.core.StandardContext.addApplicationListener(StandardContext.java:2508)
    at com.sun.enterprise.web.TomcatDeploymentConfig.configureApplicationListener(TomcatDeploymentConfig.java:251)
    at com.sun.enterprise.web.TomcatDeploymentConfig.configureWebModule(TomcatDeploymentConfig.java:110)
    at com.sun.enterprise.web.WebModuleContextConfig.start(WebModuleContextConfig.java:264)
    at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:486)
    at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:163)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:5895)
    ... 49 more[/INDENT][INDENT]Caused by: java.lang.ClassNotFoundException: com.isomorphic.base.InitListener[/INDENT][INDENT=2]at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1783)
    at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1633)
    at org.apache.catalina.core.StandardContext.loadListener(StandardContext.java:5446)
    at com.sun.enterprise.web.WebModule.loadListener(WebModule.java:1788)
    at org.apache.catalina.core.StandardContext.addListener(StandardContext.java:3300)
    ... 56 more[/INDENT][INDENT]]][/INDENT]
    I have tried some of the solutions related to this exception, but none of them have worked at my end.
    1. I'm working with:
      • SmartGWT 6.0 Pro (6.0-p20170526)
      • Project based on built-in-ds sample (from SGWT)
      • JDK 1.8.0_241
      • GWT Libraries 2.8.1
      • Eclipse 2020-03 (4.15.0) Build id: 20200313-1211
      • Glassfish 4.1
      • Apache Maven 3.6.3
    2. Attached to this post are the files I used for setting the reduced environment:
      • pom.xml
      • SamplesSGWT.gwt.xml
      • SamplesSGWT.html
      • SamplesSGWT.java
      • server.properties
      • server_(glassfish_domain).log
      • user.ds.xml


    Would you please help me with to find out what is causing this error and how could I solve it.

    If you need anything else to review this case, just let me know.

    I thank you in advance for all the help you can provide!
    Attached Files

    #2
    The problem you seem to have is that the server JARs are not present in your WAR. It's difficult to say why without more information. Let's have you start by showing the output of
    Code:
    mvn package

    Comment


      #3
      Note also, you seem to be starting to develop something new on a very obsolete version - that's not something we support, so if this is new development, please update to 12.1.

      Comment


        #4
        Dear Isomorphic, thanks for the quick answer!

        I run that command and this is what I get:

        Code:
        D:\Development\Repos\Git\Java\Samples\SamplesSGWT>mvn package
        [INFO] Scanning for projects...
        [INFO]
        [INFO] -----------------------< co.focuss:SamplesSGWT >------------------------
        [INFO] Building SamplesSGWT 0.0.1-SNAPSHOT
        [INFO] --------------------------------[ war ]---------------------------------
        [INFO]
        [INFO] --- gwt-maven-plugin:2.8.0:generateAsync (default) @ SamplesSGWT ---
        [INFO]
        [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ SamplesSGWT ---
        [INFO] Using 'UTF-8' encoding to copy filtered resources.
        [INFO] Copying 7 resources
        [INFO]
        [INFO] --- maven-compiler-plugin:3.3:compile (default-compile) @ SamplesSGWT ---
        [INFO] Nothing to compile - all classes are up to date
        [INFO]
        [INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ SamplesSGWT ---
        [INFO] Using 'UTF-8' encoding to copy filtered resources.
        [INFO] skip non existing resourceDirectory D:\Development\Repos\Git\Java\Samples\SamplesSGWT\src\test\resources
        [INFO]
        [INFO] --- maven-compiler-plugin:3.3:testCompile (default-testCompile) @ SamplesSGWT ---
        [INFO] Nothing to compile - all classes are up to date
        [INFO]
        [INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ SamplesSGWT ---
        [INFO]
        [INFO] --- gwt-maven-plugin:2.8.0:compile (default) @ SamplesSGWT ---
        [INFO] auto discovered modules [co.focuss.SamplesSGWT.SamplesSGWT]
        [INFO] co.focuss.SamplesSGWT.SamplesSGWT is up to date. GWT compilation skipped
        [INFO]
        [INFO] --- maven-war-plugin:2.6:war (default-war) @ SamplesSGWT ---
        [INFO] Packaging webapp
        [INFO] Assembling webapp [SamplesSGWT] in [D:\Development\Repos\Git\Java\Samples\SamplesSGWT\target\SamplesSGWT]
        [INFO] Processing war project
        [INFO] Copying webapp resources [D:\Development\Repos\Git\Java\Samples\SamplesSGWT\src\main\webapp]
        [INFO] Webapp assembled in [1109 msecs]
        [INFO] Building war: D:\Development\Repos\Git\Java\Samples\SamplesSGWT\target\SamplesSGWT.war
        [INFO] ------------------------------------------------------------------------
        [INFO] BUILD SUCCESS
        [INFO] ------------------------------------------------------------------------
        [INFO] Total time:  49.785 s
        [INFO] Finished at: 2021-03-16T20:16:05-05:00
        [INFO] ------------------------------------------------------------------------
        
        D:\Development\Repos\Git\Java\Samples\SamplesSGWT>

        Comment


          #5
          There are a few problems with this POM, but none that are obviously the root cause given what information we currently have. Do you see isomorphic-core-rpc.jar and isomorphic-sql.jar in your target's WEB-INF/lib directory? It looks like that would be at D:\Development\Repos\Git\Java\Samples\SamplesSGWT\target\SamplesSGWT\WEB-INF\lib.

          The easiest thing to do by far would be to get a current version of the framework and create your sample project using an archetype, as described in the mavenSupport documentation topic. This will save you a lot of trouble, and as previously stated, you are using an obsolete version of the framework anyway.

          Otherwise, our best suggestion at this time is to remove all unnecessary elements from your POM until `mvn package` creates a WAR with the correct content. In your case, you can probably replace the entire build section with a simple gwt compile step.

          Code:
          <build>
                  <plugins>
                      <plugin>
                          <groupId>org.codehaus.mojo</groupId>
                          <artifactId>gwt-maven-plugin</artifactId>
                          <version>${gwt.version}</version>
                          <executions>
                              <execution>
                                  <goals>
                                      <goal>compile</goal>
                                  </goals>
                              </execution>
                          </executions>
                      </plugin>
                  </plugins>
              </build>
          Do note that the codehaus plugin is also obsolete though. Consider migrating to its replacement.

          Comment

          Working...
          X