Main Content

Magnolia Community Forums: Get help with Magnolia: Install Blossom 3.1.3 module on Magnolia 5.5


  • razvanv01
    razvanv01
    Full name: Razvan
    Posts: 9
    Last post: Jan 13, 2017 6:22:00 PM
    Registered on: Dec 25, 2016
    Install Blossom 3.1.3 module on Magnolia 5.5
    #1 by razvanv01 on Dec 31, 2016 1:20:25 PM

    Hi,

    Followed instructions here https://documentation.magnolia-cms.com/display/DOCS45/List+of+modules#Listofmodules-Installingamodule

    Copied the jar to both author and public WEB-INF. Continued installation in the UI and I get:


    SEVERE: Servlet.service() for servlet [default] in context with path [/magnoliaAuthor] threw exception [Filter execution threw an exception] with root cause
    java.lang.ClassNotFoundException: org.springframework.core.NestedIOException
    at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1285)
    at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1119)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:264)
    at info.magnolia.objectfactory.DefaultClassFactory.forName(DefaultClassFactory.java:50)
    at info.magnolia.module.groovy.support.classes.GroovyClassFactory.forName(GroovyClassFactory.java:105)
    at info.magnolia.jcr.node2bean.impl.Node2BeanTransformerImpl.resolveType(Node2BeanTransformerImpl.java:148)
    at info.magnolia.jcr.node2bean.impl.Node2BeanProcessorImpl.toBean(Node2BeanProcessorImpl.java:176)
    at info.magnolia.jcr.node2bean.impl.Node2BeanProcessorImpl.toMap(Node2BeanProcessorImpl.java:296)
    at info.magnolia.jcr.node2bean.impl.Node2BeanProcessorImpl.toBean(Node2BeanProcessorImpl.java:192)
    at info.magnolia.jcr.node2bean.impl.Node2BeanProcessorImpl.toMap(Node2BeanProcessorImpl.java:296)
    at info.magnolia.jcr.node2bean.impl.Node2BeanProcessorImpl.toBean(Node2BeanProcessorImpl.java:192)
    at info.magnolia.jcr.node2bean.impl.Node2BeanProcessorImpl.transformAndLogProblems(Node2BeanProcessorImpl.java:150)
    at info.magnolia.jcr.node2bean.impl.Node2BeanProcessorImpl.toBean(Node2BeanProcessorImpl.java:125)
    at info.magnolia.cms.filters.FilterManagerImpl.createConfiguredFilters(FilterManagerImpl.java:189)
    at info.magnolia.cms.filters.FilterManagerImpl.createRootFilter(FilterManagerImpl.java:167)
    at info.magnolia.cms.filters.FilterManagerImpl.resetRootFilter(FilterManagerImpl.java:144)
    at info.magnolia.cms.filters.FilterManagerImpl.startUsingConfiguredFilters(FilterManagerImpl.java:135)
    at info.magnolia.module.ui.InstallationFilter.doFilter(InstallationFilter.java:102)
    at info.magnolia.cms.filters.AbstractMgnlFilter.doFilter(AbstractMgnlFilter.java:85)
    at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:79)
    at info.magnolia.cms.filters.MgnlFilterChain.doFilter(MgnlFilterChain.java:81)
    at info.magnolia.cms.filters.CompositeFilter.doFilter(CompositeFilter.java:65)
    at info.magnolia.cms.filters.AbstractMgnlFilter.doFilter(AbstractMgnlFilter.java:85)
    at info.magnolia.cms.filters.SafeDestroyMgnlFilterWrapper.doFilter(SafeDestroyMgnlFilterWrapper.java:107)
    at info.magnolia.cms.filters.MgnlFilterDispatcher.doDispatch(MgnlFilterDispatcher.java:67)
    at info.magnolia.cms.filters.MgnlMainFilter.doFilter(MgnlMainFilter.java:108)
    at info.magnolia.cms.filters.MgnlMainFilter.doFilter(MgnlMainFilter.java:94)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:108)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
    at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:620)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:349)
    at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:784)
    at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
    at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:802)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1410)
    at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    at java.lang.Thread.run(Thread.java:745)


    Any suggestions?

    Thanks!

    Best Regards,
    Razvan

  • fgrilli
    fgrilli
    Full name: federico grilli
    Posts: 207
    Last post: Jan 2, 2017 11:57:16 AM
    Registered on: Sep 15, 2010
    Re: Install Blossom 3.1.3 module on Magnolia 5.5
    #2 by fgrilli on Jan 1, 2017 10:12:47 PM

    Hi Razvan,

    apparently Spring core is not on your classpath. Dropping the Blossom jar into WEB-INF/lib isn't enough.
    I'd suggest you look into the latest Magnolia documentation here https://documentation.magnolia-cms.com/display/DOCS/Installing+a+module and use Gradle or Maven to manage your project dependencies. In this case, you need to add the required Spring dependencies to your build.gradle (or pom.xml) file. I'm no Spring/Blossom expert but looking at its pom.xml (https://git.magnolia-cms.com/projects/BLOSSOM/repos/blossom/browse/pom.xml?at=refs%2Ftags%2Fmagnolia-module-blossom-3.1.3) you need at least spring-aop and spring-webmvc (I assume at least one of the two pulls in spring-core dependency as well).

    HTH,

    Federico

  • razvanv01
    razvanv01
    Full name: Razvan
    Posts: 9
    Last post: Jan 13, 2017 6:22:00 PM
    Registered on: Dec 25, 2016
    Re: Install Blossom 3.1.3 module on Magnolia 5.5
    #3 by razvanv01 on Jan 2, 2017 9:42:58 AM

    Hi Federico and Happy New Year!,

    Thank you for the help! However since I didn't work with Magnolia before I'm not sure what it means.
    I also found this http://stackoverflow.com/questions/9039094/magnolia-cms-and-blossom-module-exception.

    As far as I understand I need to have Blossom in 2 parts: First as a module in Magnolia, then as a dependency in my Spring Project.

    For Magnolia itself (running on Tomcat) Blossom is not a custom module and it's a jar "All modules provided by Magnolia International are JAR files.", as far as I understood it's enough to drop it in the Magnolia Public and Author folders.
    Second I also have blossom inside my spring project, I am building it with gradle and it works well (build is successful and runs) so this is not part of may question.
    So I'm not sure if you mean I should add "Spring dependencies to your build.gradle" to the Magnolia build itself and rebuild Magnolia? (Kind of an overkill and which manufacturer produces such software?)

    Thank you for more clarifications!

    Best Regards,
    Razvan

  • breun
    breun
    Full name: Nils Breunese
    Posts: 416
    Last post: Feb 24, 2017 2:54:06 PM
    Registered on: Sep 16, 2010
    Re: Install Blossom 3.1.3 module on Magnolia 5.5
    #4 by breun on Jan 2, 2017 10:44:02 AM

    Hello Razvan,

    In my experience you will have a much better experience if you build your own project based on Magnolia then trying to manually add JAR files to a default bundle. Also I don't see how a Spring project is going to work with a separate Magnolia bundle deployment.

    I really recommend setting up a project to build your own custom Magnolia project to do your customizations. This doesn't mean you will be compiling Magnolia, your project will just depend on pre-built artifacts from Magnolia and can choose for yourself which modules you want to use (like Blossom if you'd like to use Spring with Magnolia), and add your own code and configuration. This may seem like overkill at first, but I can assure you this is actually one of the great things about Magnolia and something you'll grow to love. Adding custom code to something like Wordpress for instance may seem easy ("I'll just edit this file, add some of my own here, etc."), but always tuns into a unmanageable nightmare after a while.

    I recommend checking out https://documentation.magnolia-cms.com/display/DOCS/Creating+a+custom+bundle and this series of blog posts:

    Don’t build Magnolia: build your projects.
    http://dev.magnolia-cms.com/~gjoseph/dont-build-magnolia-build-your-projects

    Don’t configure Magnolia: let your projects configure it.
    http://dev.magnolia-cms.com/~gjoseph/dont-configure-magnolia-let-your-projects-configure-it

    Don’t deploy Magnolia: deploy your project.
    http://dev.magnolia-cms.com/~gjoseph/dont-deploy-magnolia-deploy-your-project

    Nils.

  • fgrilli
    fgrilli
    Full name: federico grilli
    Posts: 207
    Last post: Jan 2, 2017 11:57:16 AM
    Registered on: Sep 15, 2010
    Re: Install Blossom 3.1.3 module on Magnolia 5.5
    #5 by fgrilli on Jan 2, 2017 11:57:16 AM

    Hi Razvan, happy new year to you!

    Of course, you don't want to rebuild the whole Magnolia thing - I think Nils already pointed you into the right direction. I might add that you could look into https://git.magnolia-cms.com/projects/BLOSSOM/repos/samples/browse?at=refs%2Ftags%2Fmagnolia-blossom-samples-3.1.3 to see how you could structure your Magnolia/Spring project. It's a Maven project but I guess it should be easily portable to Gradle.

    HTH,

    Federico

  • razvanv01
    razvanv01
    Full name: Razvan
    Posts: 9
    Last post: Jan 13, 2017 6:22:00 PM
    Registered on: Dec 25, 2016
    Re: Install Blossom 3.1.3 module on Magnolia 5.5
    #6 by razvanv01 on Jan 5, 2017 2:43:22 PM

    Thank you both!

    Finally I understood how Spring works with Blossom. Initially I believed the module is the only one that has to be deployed in both the Spring Project and Magnolia standalone project, then it would connect both through an interface:port. And I kept searching for the connection settings and didn't find it anywhere because this is not the way it actually works.
    Now I know that all Magnolia dependencies will have to be included in the Spring Project and then the Project itself when deployed is partly Magnolia.


    Thanks!

    Best Regards,
    Razvan

You don't have the permission to post on this thread

Sign in

To login on this forum, you can use your Magnolia Forge, Support or Partner account, or, below, your Google, Yahoo! or OpenID account. If you have trouble logging in, or any other sort of issue, please let us know in the Meta forum, on the user-list, or simply by email at forum-admin at magnolia-cms dot com.

* Required

... or sign in with:

  • icon http://{your-openid-url}
  • icon
  • icon https://me.yahoo.com/