Search code examples
javavaadinmagnolia

Upgrading magnolia to 5.6.1, vaadin resources


After Tomcat starts Magnolia, I always get the following error:

17:04:36.781 [localhost-startStop-1] ERROR info.magnolia.module.ModuleManagerImpl - Can't start module ui-framework
com.google.common.util.concurrent.ExecutionError: java.lang.NoClassDefFoundError: com/vaadin/data/util/converter/Converter$ConversionException
    at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2216) ~[guava-23.1-jre.jar:?]

And later when I request the admin page, I keep getting these errors.

INFO: Requested resource [/VAADIN/themes/valo/styles.css] not found from filesystem or through class loader. Add widgetset and/or theme JAR to your classpath or add files to WebContent/VAADIN folder.
Jan 23, 2018 12:50:50 PM com.vaadin.server.VaadinServlet serveStaticResourcesInVAADIN
INFO: Requested resource [/VAADIN/themes/valo/favicon.ico] not found from filesystem or through class loader. Add widgetset and/or theme JAR to your classpath or add files to WebContent/VAADIN folder.

Amongst other things, I've included everything I think I need in the dependencies for the UI framework:

<project>
  <!-- ... -->
  <dependency>
    <groupId>info.magnolia.ui</groupId>
    <artifactId>magnolia-ui-framework</artifactId>
    <version>${magnoliaUiVersion}</version>
  </dependency>
  <dependency>
    <groupId>info.magnolia.ui</groupId>
    <artifactId>magnolia-ui-admincentral</artifactId>
    <version>${magnoliaUiVersion}</version>
  </dependency>
  <dependency>
    <groupId>info.magnolia.ui</groupId>
    <artifactId>magnolia-ui-contentapp</artifactId>
    <version>${magnoliaUiVersion}</version>
  </dependency>
</project>

Edit 1:

So I've found that magnolia-resources is version 2.4 in the Magnolia Travel Demo. When you run it with this version (and Magnolia 5.6.1 Core) the login screen doesn't display the Magnolia logo. When I upgraded to version 2.6, the Magnolia logo appeared.


Edit 2:

I'm now able to login, and the admincentral is stuck on loading. After a few seconds, the following message pops up:

Failed to load the widgetset: ./../VAADIN/widgetsets/info.magnolia.widgetset.MagnoliaWidgetSet/info.magnolia.widgetset.MagnoliaWidgetSet.nocache.js?1516882029507

POM below:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd ">
    <modelVersion>4.0.0</modelVersion>
    <groupId><!-- hidden --></groupId>
    <artifactId><!-- hidden --></artifactId>
    <name><!-- hidden --></name>
    <version>1.0-SNAPSHOT</version>
    <packaging>pom</packaging>
    <description><!-- hidden --></description>

    <properties>
        <magnoliaVersion>5.6.1</magnoliaVersion>
        <magnoliaUiVersion>5.6.1</magnoliaUiVersion>
        <magnoliaDamVersion>2.3</magnoliaDamVersion>
        <magnoliaPasswordManagerVersion>1.2</magnoliaPasswordManagerVersion>
        <magnoliaImagingVersion>3.4</magnoliaImagingVersion>
        <magnoliaCategorizationVersion>2.6</magnoliaCategorizationVersion>
        <magnoliaTemplatingVersion>1.2</magnoliaTemplatingVersion>
        <magnoliaResourcesVersion>2.6</magnoliaResourcesVersion>
        <magnoliaFormVersion>2.4</magnoliaFormVersion>
        <magnoliaSiteVersion>1.2</magnoliaSiteVersion>
        <vaadinVersion>8.1.5</vaadinVersion>
        <mavenCompilerVersion>3.6.1</mavenCompilerVersion>
        <tomcat7Version>2.2</tomcat7Version>
    </properties>

    <dependencyManagement>
        <dependencies>
            <!-- info.magnolia -->
            <dependency>
                <groupId>info.magnolia</groupId>
                <artifactId>magnolia-project</artifactId>
                <version>${magnoliaVersion}</version>
                <scope>import</scope>
                <type>pom</type>
            </dependency>
            <dependency>
                <groupId>info.magnolia.ui</groupId>
                <artifactId>magnolia-ui-project</artifactId>
                <version>${magnoliaUiVersion}</version>
                <scope>import</scope>
                <type>pom</type>
            </dependency>
            <dependency>
                <groupId>info.magnolia.cache</groupId>
                <artifactId>magnolia-cache-core</artifactId>
                <version>${magnoliaVersion}</version>
            </dependency>
            <dependency>
                <groupId>info.magnolia.site</groupId>
                <artifactId>magnolia-site</artifactId>
                <version>${magnoliaSiteVersion}</version>
            </dependency>

            <!-- info.magnolia.dam -->
            <dependency>
                <groupId>info.magnolia.dam</groupId>
                <artifactId>magnolia-dam-templating</artifactId>
                <version>${magnoliaDamVersion}</version>
            </dependency>
            <dependency>
                <groupId>info.magnolia.dam</groupId>
                <artifactId>magnolia-dam-jcr</artifactId>
                <version>${magnoliaDamVersion}</version>
            </dependency>
            <dependency>
                <groupId>info.magnolia.dam</groupId>
                <artifactId>magnolia-dam-api</artifactId>
                <version>${magnoliaDamVersion}</version>
            </dependency>
            <dependency>
                <groupId>info.magnolia.dam</groupId>
                <artifactId>magnolia-dam-app</artifactId>
                <version>${magnoliaDamVersion}</version>
            </dependency>
            <dependency>
                <groupId>info.magnolia.dam</groupId>
                <artifactId>magnolia-dam-imaging</artifactId>
                <version>${magnoliaDamVersion}</version>
            </dependency>

            <!-- info.magnolia.imaging -->
            <dependency>
                <groupId>info.magnolia.imaging</groupId>
                <artifactId>magnolia-imaging</artifactId>
                <version>${magnoliaImagingVersion}</version>
            </dependency>
            <dependency>
                <groupId>info.magnolia.imaging</groupId>
                <artifactId>magnolia-imaging-support</artifactId>
                <version>${magnoliaImagingVersion}</version>
            </dependency>

            <!-- info.magnolia.passwordmanager -->
            <dependency>
                <groupId>info.magnolia.passwordmanager</groupId>
                <artifactId>magnolia-module-password-manager</artifactId>
                <version>${magnoliaPasswordManagerVersion}</version>
            </dependency>

            <!--  info.magnolia.resources -->
            <dependency>
                <groupId>info.magnolia.boms</groupId>
                <artifactId>magnolia-external-dependencies</artifactId>
                <version>${magnoliaVersion}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>info.magnolia.resources</groupId>
                <artifactId>magnolia-resources</artifactId>
                <version>${magnoliaResourcesVersion}</version>
            </dependency>

            <!-- info.magnolia.categorization -->
            <dependency>
                <groupId>info.magnolia.categorization</groupId>
                <artifactId>magnolia-categorization</artifactId>
                <version>${magnoliaCategorizationVersion}</version>
            </dependency>

            <!-- info.magnolia.templating -->
            <dependency>
                <groupId>info.magnolia.templating</groupId>
                <artifactId>magnolia-templating-kit</artifactId>
                <version>${magnoliaTemplatingVersion}</version>
            </dependency>
            <dependency>
                <groupId>info.magnolia.templating</groupId>
                <artifactId>magnolia-templating-essentials-models</artifactId>
                <version>${magnoliaTemplatingVersion}</version>
            </dependency>

            <!-- info.magnolia.form -->
            <dependency>
                <groupId>info.magnolia.form</groupId>
                <artifactId>magnolia-form</artifactId>
                <version>${magnoliaFormVersion}</version>
            </dependency>

            <!--  com.vaadin -->
            <dependency>
                <groupId>com.vaadin</groupId>
                <artifactId>vaadin-compatibility-server</artifactId>
                <version>${vaadinVersion}</version>
            </dependency>
            <dependency>
                <groupId>com.vaadin</groupId>
                <artifactId>vaadin-server</artifactId>
                <version>${vaadinVersion}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <repositories>
        <repository>
            <id>magnolia.public</id>
            <url>https://nexus.magnolia-cms.com/content/groups/public</url>
            <snapshots />
        </repository>
        <!-- IF YOU NEED MODULES FROM THE ENTERPRISE VERSION, UNCOMMENT THE FOLLOWING REPOSITORY -->
        <!--
        <repository>
          <id>magnolia.enterprise.releases</id>
          <url>https://nexus.magnolia-cms.com/content/repositories/magnolia.enterprise.releases</url>
          <snapshots>
            <enabled>false</enabled>
          </snapshots>
        </repository>
        -->
        <repository>
            <id>vaadin-addons</id>
            <url>https://maven.vaadin.com/vaadin-addons</url>
        </repository>
    </repositories>

    <profiles>
        <profile>
            <id>default</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <properties>
                <profileName>default</profileName>
                <downloadSources>true</downloadSources>
                <downloadJavadocs>true</downloadJavadocs>
            </properties>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.tomcat.maven</groupId>
                        <artifactId>tomcat7-maven-plugin</artifactId>
                        <version>${tomcat7Version}</version>
                        <configuration>
                            <path>/</path>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${mavenCompilerVersion}</version>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <modules>
        <module><!-- hidden -->-webapp</module>
        <module><!-- hidden -->-blossom</module>
    </modules>
</project>

Any thoughts?


Solution

  • Please have a look at https://documentation.magnolia-cms.com/display/DOCS56/Upgrading+to+Magnolia+5.6.x. Especially part of Vaadin8 Upgrade and BOM. I believe you have to import dependency management section from BOM project.

    Hope this helps, Cheers,