Announcement

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

    Problems upgrading SmartGWT

    I upgraded smartgwt from this version:
    6.0-p20161005 power
    to
    6.1-p20171105 power.
    Everything compiles, but, with the exact code, which works with the old version, I get this errors with the new version:

    Code:
    7-Nov-2017 14:49:20.479 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /Users/eduardo/Library/Java/Extensions:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java:.
    07-Nov-2017 14:49:20.570 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"]
    07-Nov-2017 14:49:20.592 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
    07-Nov-2017 14:49:20.595 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-nio-8009"]
    07-Nov-2017 14:49:20.597 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
    07-Nov-2017 14:49:20.598 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 383 ms
    07-Nov-2017 14:49:20.612 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service Catalina
    07-Nov-2017 14:49:20.612 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.0.27
    07-Nov-2017 14:49:20.827 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDescriptor Deploying configuration descriptor /usr/local/apache-tomcat-8.0.27/conf/Catalina/localhost/kids-dev.xml
    07-Nov-2017 14:49:20.974 SEVERE [localhost-startStop-1] org.apache.catalina.core.ContainerBase.addChildInternal ContainerBase.addChild: start: 
     org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/kids-dev]]
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:725)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
        at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:586)
        at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1780)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
    Caused by: org.apache.catalina.LifecycleException: Failed to start component [org.apache.catalina.webresources.StandardRoot@37914f69]
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
        at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:4854)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:4984)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        ... 10 more
    Caused by: org.apache.catalina.LifecycleException: Failed to initialize component [org.apache.catalina.webresources.JarResourceSet@68d26e31]
        at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:106)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:139)
        at org.apache.catalina.webresources.StandardRoot.startInternal(StandardRoot.java:699)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        ... 13 more
    Caused by: java.lang.IllegalArgumentException: java.util.zip.ZipException: invalid LOC header (bad signature)
        at org.apache.catalina.webresources.JarResourceSet.initInternal(JarResourceSet.java:96)
        at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
        ... 16 more
    Caused by: java.util.zip.ZipException: invalid LOC header (bad signature)
        at java.util.zip.ZipFile.read(Native Method)
        at java.util.zip.ZipFile.access$1400(ZipFile.java:60)
        at java.util.zip.ZipFile$ZipFileInputStream.read(ZipFile.java:716)
        at java.util.zip.ZipFile$ZipFileInflaterInputStream.fill(ZipFile.java:419)
        at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:158)
        at sun.misc.IOUtils.readFully(IOUtils.java:65)
        at java.util.jar.JarFile.getBytes(JarFile.java:425)
        at java.util.jar.JarFile.getManifestFromReference(JarFile.java:193)
        at java.util.jar.JarFile.getManifest(JarFile.java:180)
        at org.apache.catalina.webresources.JarResourceSet.initInternal(JarResourceSet.java:94)
        ... 17 more
    
    07-Nov-2017 14:49:20.976 SEVERE [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDescriptor Error deploying configuration descriptor /usr/local/apache-tomcat-8.0.27/conf/Catalina/localhost/kids-dev.xml
     java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/kids-dev]]
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:729)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
        at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:586)
        at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1780)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
    
    07-Nov-2017 14:49:20.977 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDescriptor Deployment of configuration descriptor /usr/local/apache-tomcat-8.0.27/conf/Catalina/localhost/kids-dev.xml has finished in 149 ms
    07-Nov-2017 14:49:20.977 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory /usr/local/apache-tomcat-8.0.27/webapps/docs
    07-Nov-2017 14:49:21.208 INFO [localhost-startStop-1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
    07-Nov-2017 14:49:21.249 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory /usr/local/apache-tomcat-8.0.27/webapps/docs has finished in 272 ms
    07-Nov-2017 14:49:21.250 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory /usr/local/apache-tomcat-8.0.27/webapps/examples
    07-Nov-2017 14:49:21.504 INFO [localhost-startStop-1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
    07-Nov-2017 14:49:21.531 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory /usr/local/apache-tomcat-8.0.27/webapps/examples has finished in 282 ms
    07-Nov-2017 14:49:21.531 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory /usr/local/apache-tomcat-8.0.27/webapps/host-manager
    07-Nov-2017 14:49:21.628 INFO [localhost-startStop-1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
    07-Nov-2017 14:49:21.630 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory /usr/local/apache-tomcat-8.0.27/webapps/host-manager has finished in 99 ms
    07-Nov-2017 14:49:21.630 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory /usr/local/apache-tomcat-8.0.27/webapps/manager
    07-Nov-2017 14:49:21.747 INFO [localhost-startStop-1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
    07-Nov-2017 14:49:21.748 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory /usr/local/apache-tomcat-8.0.27/webapps/manager has finished in 118 ms
    07-Nov-2017 14:49:21.750 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]
    07-Nov-2017 14:49:21.754 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-nio-8009"]
    07-Nov-2017 14:49:21.754 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 1156 ms
    What could be the problem?

    #2
    Hi @eduilid,

    please compare the war/WEB-INF/lib directories before and after.
    If you have some ant-lib-copy-task to copy only the jars you depend on from your smartgwt/lib to yourproj/war/WEB-INF/lib, you might want to to check the filenames you are using.
    There were many versions bumped between the releases. A missing jar might be the reason for Tomcat not starting up.

    Best regard
    Blama

    Comment


      #3
      Hi Blama,

      thanks for your answer.

      I compared file for file the libs and I see the following differences:

      -commons-cli-1.3.1.jar -> commons-cli-1.4.jar
      -new file appeared in new version: commons-collections4-4.1.jar
      -commons-fileupload-1.3.1.jar -> commons-fileupload-1.3.3.jar
      -commons-io-2.4.jar -> commons-io-2.5.jar
      -httpclient-4.5.2.jar -> httpclient-4.5.3.jar
      -httpcore-4.4.4.jar -> httpcore-4.4.6.jar
      -isc-jakarta-oro-6.0-020161005.jar this file disappeared in the new version
      -the following files changed from version 6.0-p20161005 to 6.1-p20171105:
      isomorphic-assembly
      isomorphic-compression
      isomorphic-content-export
      isomorphic-core-rpc
      isomorphic-js-parser
      isomorphic-messaging
      isomorphic-sql
      smartgwt-messaging
      smartgwt-power

      all other files are the same. Everything seems to be correct. I attach the complete list of jar files in the new version. Maybe there is some library conflict? But this did not happen with the old version.
      Thanks.

      List of jar files in the new version:
      activation-1.1.jar
      aopalliance-1.0.jar
      batik-anim-1.7.jar
      batik-awt-util-1.7.jar
      batik-bridge-1.7.jar
      batik-css-1.7.jar
      batik-dom-1.7.jar
      batik-ext-1.7.jar
      batik-gvt-1.7.jar
      batik-js-1.7.jar
      batik-parser-1.7.jar
      batik-script-1.7.jar
      batik-svg-dom-1.7.jar
      batik-util-1.7.jar
      batik-xml-1.7.jar
      bcmail-jdk14-1.38.jar
      bcmail-jdk14-138.jar
      bcprov-jdk14-1.38.jar
      bcprov-jdk14-138.jar
      bctsp-jdk14-1.38.jar
      c3p0-0.9.1.1.jar
      calibri.jar
      castor-core-1.3.3.jar
      castor-xml-1.3.3.jar
      commons-beanutils-1.9.0.jar
      commons-cli-1.4.jar
      commons-codec-1.5.jar
      commons-collections-3.2.1.jar
      commons-collections4-4.1.jar
      commons-compress-1.9.jar
      commons-dbcp-1.4.jar
      commons-digester-2.1.jar
      commons-fileupload-1.3.3.jar
      commons-io-2.5.jar
      commons-jexl-2.0.1.jar
      commons-jxpath-1.3.jar
      commons-lang-2.6.jar
      commons-logging-1.1.1.jar
      commons-pool-1.5.4.jar
      core-2.3.0.jar
      core-renderer-R8.jar
      dom4j-1.6.1.jar
      dslogging.jar
      ecj-4.3.1.jar
      gin-2.1.2.jar
      guava-18.0.jar
      guava-gwt-18.0.jar
      guice-3.0.jar
      guice-assistedinject-3.0.jar
      guice-servlet-3.0.jar
      gwt-servlet-2.7.0.jar
      gwtp-dispatch-server-1.0.1.jar
      gwtp-dispatch-server-guice-1.0.1.jar
      gwtp-dispatch-shared-1.0.1.jar
      gwtquery-1.4.2.jar
      httpclient-4.5.3.jar
      httpcore-4.4.6.jar
      imgscalr-lib-4.2.jar
      isomorphic-assembly-6.1-p20171105.jar
      isomorphic-compression-6.1-p20171105.jar
      isomorphic-content-export-6.1-p20171105.jar
      isomorphic-core-rpc-6.1-p20171105.jar
      isomorphic-js-parser-6.1-p20171105.jar
      isomorphic-messaging-6.1-p20171105.jar
      isomorphic-sql-6.1-p20171105.jar
      itext-2.1.7.js5-20160118.162824-1.jar
      jackson-annotations-2.1.4.jar
      jackson-core-2.1.4.jar
      jackson-databind-2.1.4.jar
      jakarta-regexp-1.4.jar
      jasperreports-6.2.1.jar
      jasperreports-fonts-6.2.1.jar
      javax.inject-1.jar
      javax.servlet-api-3.0.1.jar
      jcommon-1.0.23.jar
      jfreechart-1.0.19.jar
      joda-time-2.3.jar
      jsp-api-2.2.jar
      jsr305-1.3.9.jar
      jstl-1.2.jar
      jtidy-r938.jar
      jxls-core-1.0.6.jar
      log4j-1.2.17.jar
      lucene-analyzers-common-4.5.1.jar
      lucene-core-4.5.1.jar
      lucene-queries-4.5.1.jar
      lucene-queryparser-4.5.1.jar
      lucene-sandbox-4.5.1.jar
      mail-1.4.7.jar
      olap4j-0.9.7.309-JS-3.jar
      poi-3.9.jar
      poi-ooxml-3.9.jar
      poi-ooxml-schemas-3.9.jar
      quartz-2.2.1.jar
      quartz-jobs-2.2.1.jar
      reportsUtils.jar
      saxdomix.jar
      slf4j-api-1.6.6.jar
      smartgwt-messaging-6.1-p20171105.jar
      smartgwt-power-6.1-p20171105.jar
      spring-aop-3.0.6.RELEASE.jar
      spring-asm-3.0.6.RELEASE.jar
      spring-beans-3.0.6.RELEASE.jar
      spring-context-3.0.6.RELEASE.jar
      spring-core-3.0.6.RELEASE.jar
      spring-expression-3.0.6.RELEASE.jar
      standard-1.1.2.jar
      stax-1.2.0.jar
      stax-api-1.0-2.jar
      stax-api-1.0.1.jar
      velocity-1.7.jar
      xalan-2.6.0.jar
      xml-apis-1.3.04.jar
      xml-apis-ext-1.3.04.jar
      xmlbeans-2.3.0.jar
      xmltaglib.jar

      Comment


        #4
        Hi,

        if you have the same libs before and after in your Tomcat app/WEB-INF/lib directory (this is how I understand your post, some 3rd party libs versions bumped, some SmartGWT libs new without file name change, commons-collections4-4.1.jar new), I don't understand the issue you are seeing, either.

        Generally speaking:
        Are all the files you list in the end in that directory? If so, having e.g. stax-api-1.0-1.jar and stax-api-1.0-2.jar both in the folder can definitely cause problems - both files will define the same classes. How should the JVM decide which to use on a new ...? Same for bcmail-jdk14-1.38.jar and bcmail-jdk14-138.jar without the dot.
        It is always a good idea to keep the list of libs as short as possible in order to safe space and deployment time, but also to prevent the "JAR hell". For SmartGWT, here is the list of mandatory JARs depending on the features you use.

        Best regards
        Blama

        Comment


          #5
          Actually....see this line in the logs:
          Code:
          Caused by: java.lang.IllegalArgumentException: java.util.zip.ZipException: invalid LOC header (bad signature)
          Perhaps some JAR is broken? Can you open all the jars in e.g. WinRAR (a JAR is just a renamed ZIP file).

          Best regards
          Blama

          Comment


            #6
            Hi Blama,

            you are right, yes, I will clean the files / file versions. But, since exactly these jars were in use in the previous version and are working, this should not cause any problems with the new version, or am I missing something ?

            Comment


              #7
              I successfully opened all .jars manually with winrar. So they seem not to be corrupt.

              Comment


                #8
                After investigating by replacing the jars one by one from the old version to the new version , I found out that as soon as I replace this jar: httpclient-4.5.2.jar with httpclient-4.5.3.jar the problem happened.
                So I downloaded this file again (manually), then manually replaced it, and everything works. I don't really understand it, I am able to open the file with winrar, so it seems not to be corrupt.

                I will delete the file from my m2 repository and will try again with maven.

                Comment


                  #9
                  Ok, after letting maven download the file again the problem is gone ... I am not sure how this can happen.. maven to download a corrupt file and this file to be able to be opened with winrar...

                  Comment


                    #10
                    Originally posted by edulid View Post
                    Ok, after letting maven download the file again the problem is gone ... I am not sure how this can happen.. maven to download a corrupt file and this file to be able to be opened with winrar...
                    Glad you got it working.
                    Only thing I can think of is that opening is not extracting. Perhaps WinRar would have had a problem when you tried to extract the file.

                    Best regards
                    Blama

                    Comment


                      #11
                      This is correct, when trying to extract the files winrar complains... but with the new file everything is fine :-)

                      Thanks!

                      Comment

                      Working...
                      X