DX NetOps

Expand all | Collapse all

Jaspersoft - Failed to start component - java.lang.NoClassDefFoundError

Jump to Best Answer
  • 1.  Jaspersoft - Failed to start component - java.lang.NoClassDefFoundError

    Posted 04-12-2016 10:57 AM

    Hello,

     

    I tried to set up CABI Jaspersoft on a Windows 7 machine with Java 7 (JDK 1.7.0.79) and apache-tomcat-7.0.68 as it is mentioned in the Certification Matrix - CA Business Intelligence JasperReports® Server - 6.1.0 - CA Technologies Documentation.

     

    Once I finished the configuration of everything, that is mentioned within the prerequisites page I started the CABI installation as it is described in Installing CABI - CA Business Intelligence JasperReports® Server - 6.1.0 - CA Technologies Documentation resp. Install CABI JasperReports Server - CA Spectrum - 10.1 and 10.1.1 - CA Technologies Documentation.

     

    After the installation completed successful about 8 minutes later without any error messages I started the tomcat server and received the following exception:

     

    Apr 12, 2016 3:06:12 PM org.apache.catalina.startup.HostConfig deployDirectory
    INFORMATION: Deploying web application directory E:\apache-tomcat-7.0.68\webapps\jasperserver-pro
    Apr 12, 2016 3:06:28 PM org.apache.catalina.core.ContainerBase addChildInternal
    SCHWERWIEGEND: ContainerBase.addChild: start: 
    org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/jasperserver-pro]]
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:153)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:899)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:875)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652)
        at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1259)
        at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1998)
        at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
        at java.util.concurrent.FutureTask.run(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)
    Caused by: java.lang.NoClassDefFoundError: com/jaspersoft/jasperserver/api/engine/jasperreports/service/impl/EngineServiceImpl
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(Unknown Source)
        at java.security.SecureClassLoader.defineClass(Unknown Source)
        at org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:3118)
        at org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:1340)
        at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1827)
        at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1701)
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(Unknown Source)
        at java.security.SecureClassLoader.defineClass(Unknown Source)
        at org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:3118)
        at org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:1340)
        at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1827)
        at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1701)
        at java.lang.Class.getDeclaredMethods0(Native Method)
        at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
        at java.lang.Class.getDeclaredMethods(Unknown Source)
        at org.apache.catalina.util.Introspection.getDeclaredMethods(Introspection.java:127)
        at org.apache.catalina.startup.WebAnnotationSet.loadMethodsAnnotation(WebAnnotationSet.java:287)
        at org.apache.catalina.startup.WebAnnotationSet.loadApplicationListenerAnnotations(WebAnnotationSet.java:90)
        at org.apache.catalina.startup.WebAnnotationSet.loadApplicationAnnotations(WebAnnotationSet.java:63)
        at org.apache.catalina.startup.ContextConfig.applicationAnnotationsConfig(ContextConfig.java:415)
        at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:892)
        at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:386)
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
        at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5472)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
        ... 10 more
    Caused by: java.lang.ClassNotFoundException: com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl
        at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1858)
        at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1701)
        ... 38 more
    
    Apr 12, 2016 3:06:28 PM org.apache.catalina.startup.HostConfig deployDirectory
    SCHWERWIEGEND: Error deploying web application directory E:\apache-tomcat-7.0.68\webapps\jasperserver-pro
    java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/jasperserver-pro]]
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:903)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:875)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652)
        at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1259)
        at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1998)
        at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
        at java.util.concurrent.FutureTask.run(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)
    

     

    Due to this exception (missing java class -> com/jaspersoft/jasperserver/api/engine/jasperreports/service/impl/EngineServiceImpl), the tomcat server was not able to start the JasperServer UI application as you can see in the following screenshot:

     

     

    When I tried to start the application via the Start button of the Web Application Manager, I just got another exception:

     

    Apr 12, 2016 3:15:12 PM org.apache.catalina.deploy.NamingResources cleanUp
    WARNUNG: Failed to retrieve JNDI naming context for container [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/jasperserver-pro]] so no cleanup was performed for that container
    javax.naming.NameNotFoundException: Name [comp/env] is not bound in this Context. Unable to find [comp].
        at org.apache.naming.NamingContext.lookup(NamingContext.java:819)
        at org.apache.naming.NamingContext.lookup(NamingContext.java:167)
        at org.apache.catalina.deploy.NamingResources.cleanUp(NamingResources.java:986)
        at org.apache.catalina.deploy.NamingResources.stopInternal(NamingResources.java:968)
        at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:224)
        at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5796)
        at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:224)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:138)
        at org.apache.catalina.manager.ManagerServlet.start(ManagerServlet.java:1312)
        at org.apache.catalina.manager.HTMLManagerServlet.start(HTMLManagerServlet.java:690)
        at org.apache.catalina.manager.HTMLManagerServlet.doPost(HTMLManagerServlet.java:216)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:650)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
        at org.apache.catalina.filters.CsrfPreventionFilter.doFilter(CsrfPreventionFilter.java:136)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
        at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
        at org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:614)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
        at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:956)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:436)
        at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1078)
        at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:625)
        at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2517)
        at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2506)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
        at java.lang.Thread.run(Unknown Source)
    

     

    So my question would be, if someone else did see this behavior and / or how it can be resolved?

     

    Any ideas?

     

    Thanks,

    René



  • 2.  Re: Jaspersoft - Failed to start component - java.lang.NoClassDefFoundError

    Posted 04-12-2016 01:18 PM


    Hi Rene and Andre,

     

    Did you guys configure Tomcat properly after the installation of Jasper?

    Can you send screen shots of the Tomcat Java Tab?

    Also, take a look at the JasperSoft install log you created - see if any errors stick out during the deployment.

     

    Thanks!

    Matt



  • 3.  Re: Jaspersoft - Failed to start component - java.lang.NoClassDefFoundError

    Posted 04-12-2016 11:01 AM

    I do see the same issue in Win2k8 with Tomcat7(exe) or Tomcat8(exe), JDK1.8.77. Any one else? Are there any solutions for this issue?



  • 4.  Re: Jaspersoft - Failed to start component - java.lang.NoClassDefFoundError

    Broadcom Employee
    Posted 04-14-2016 02:37 PM

    We are working on documenting this in a knowledge doc for this now. I will make sure the KD is posted to the communities as well.

     

    -Roger



  • 5.  Re: Jaspersoft - Failed to start component - java.lang.NoClassDefFoundError
    Best Answer

    Broadcom Employee
    Posted 04-13-2016 12:10 PM

    What tool did you use to extract Jaspersoft? I found that when I used WinZip it extracted it incorrectly (placed files in top-level directory). However, my Jaspersoft install succeeded but it would not start...same exceptions in the tomcat log. I uninstalled and used 7-zip (WinRAR will work too) and Jaspersoft extracted everything into the proper locations - the install succeeded and everything started up.

     

    I hope this helps

     

    -Roger



  • 6.  Re: Jaspersoft - Failed to start component - java.lang.NoClassDefFoundError

    Posted 04-13-2016 04:15 AM

    Hi Matt,

     

    as André assumed, I used the ZIP version of tomcat and therefore I did no further configurations to tomcat as mentioned in step 5 of Installing CABI - CA Business Intelligence JasperReports® Server - 6.1.0 - CA Technologies Documentation.

     

    Are there any steps related to the tomcat configuration that need to be performed in case the ZIP version is used?

     

    Furthermore I did not see any errors within the log file.

    Received a similar message like '[echo] CABI JasperReports Server 6.1.0 Installation Completed Successfully.' at the end of the installation.

    ([echo] CA JasperSoft erfolgreich installiert -> That means the installation was successful.)

     

    Regards,

    René



  • 7.  Re: Jaspersoft - Failed to start component - java.lang.NoClassDefFoundError

    Posted 04-13-2016 02:54 AM
      |   view attached

    Hi Matt,

     

    I have attached my install log. I cannot see any errors regarding the deployment.

    Furthermore I have added the settings in the Tomcat Java tab as described in documentation. Or does the documentation miss any setting? As far as I know Rene used the ZIP Version of the tomcat. But the documentation asks for the following steps in case of the EXE Version only.

    • If you are using tomcat exe version, additional steps are performed before starting tomcat to start jasperserver. They are:

                  i. Search for "Configure tomcat" from run window and select the java tab.
                  ii. Set the values for Initial memory pool to 4096. Set the Maximum memory pool to 6144 and Thread Stack size to 6144, in the Java tab.
                  iii. Append the settings in Java Options section.

                          -XX:PermSize=32m(For JDK1.8 no need to specify this property)

                          -XX:+UseConcMarkSweepGC

                          -XX:+CMSClassUnloadingEnabled

                          -XX:MaxPermSize=512m(For JDK1.8 no need to specify this property)

                          -Djs.license.directory=<Tomcatfolder>\webapps\<webappname>(Replace Tomcatfolder and webappname with the actual values).

                          If you are using Encryption=Yes we need to set -Duser.home=C:\Users\Administrator(If user is Administrator)

     

    Thanks!

    André

    Attachment(s)



  • 8.  Re: Jaspersoft - Failed to start component - java.lang.NoClassDefFoundError

    Broadcom Employee
    Posted 05-25-2016 06:38 AM

    Additional Info: I extracted Jaspersoft with 7-zip and run into error:

    [exec] C:\Software\Spectrum\Jaspersoft\JasperSoft_6.1_Windows\buildomatic\bin\db-common.xml:564: java.io.IOException: Cannot run program "C:\Program Files\Java\jdk1.8.0_92\jre\bin\java.exe": CreateProcess error=206, The filename or extension is too long

    After moving JasperSoft_6.1_Windows to C:\Software installation of Jasperserver was successful

    Regards, Ulrich.



  • 9.  Re: Jaspersoft - Failed to start component - java.lang.NoClassDefFoundError

    Posted 04-14-2016 07:46 AM

    Hi Roger,

     

    interesting fact. Yes, I had extracted the Jaspersoft package by WinZip. Now I have extracted it by 7zip and the folder and file structure is much different in comparison to the WinZip result.

    As by this the installation was again successfully and the Jasperserver-pro instance starts without any issues. Thanks a lot for your hint. A root cause which I would never think of.

    Maybe it would be good to enhance the official Jaspersoft and Spectrum CABI Jaspersoft documentation by this hint.

     

    Thanks for your quick help!
    André



  • 10.  Re: Jaspersoft - Failed to start component - java.lang.NoClassDefFoundError

    Posted 04-14-2016 10:37 AM

    Hi Roger,

     

    just like André, I was able to get Jasperserver running.

    It really looks like that extracting with WinZip caused the problem.

    Thanks a lot for your hint.

     

    Anyway a reference to this behavior would be very helpful.

    Maybe you can enhance the current documentation as André already mentioned or provide a technical document for this.

     

    René



  • 11.  Re: Jaspersoft - Failed to start component - java.lang.NoClassDefFoundError

    Posted 11-18-2016 10:34 AM

    Hi Ulrich,

    Yes  we now use short paths (almost straight off the top level) for everything involved with this... e.g. - D:\jdk,  D:\jre, D:\Tomcat8, even the folder where Jasper is installed from -  D:\media\js61 ! I think I also saw that on the Utube video that we found.



  • 12.  Re: Jaspersoft - Failed to start component - java.lang.NoClassDefFoundError

    Posted 04-14-2016 07:49 AM

    But it is strange as well that the install log did not contain any error or fail message although the extracted file structure does not fit.