1

Hello I am using the latest version of Broadleaf (5.2.7). The project works perfectly fine running with HSQL. The problem is that I am trying to migrate to mysql. I am trying to follow the tutorials here and here

The problem is that I cannot find the dependancies in my root pom.xml that the tutorials mention

So for instance the tutorial mentions on step 3:

In your root pom.xml, find the following in the section under the with org.apache.tomcat.maven

<dependency>
<groupId>org.hsqldb</groupId>
<artifactId>hsqldb</artifactId>
<version>2.3.1</version>
<type>jar</type>
<scope>compile</scope>

Where should this exist? I might have a huge misunderstanding here but I cannot find it.As far as I understand this is my root pom.xml (??) and it looks like this

<?xml version="1.0" encoding="UTF-8"?>

http://maven.apache.org/xsd/maven-4.0.0.xsd">

<parent>
    <groupId>org.broadleafcommerce</groupId>
    <artifactId>broadleaf-boot-starter-parent</artifactId>
    <version>5.2.7-GA</version>
    <relativePath />
</parent>

<modelVersion>4.0.0</modelVersion>
<groupId>com.mycompany-community</groupId>
<artifactId>boot-community-demo</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>Broadleaf Spring Boot Community Demo</name>

<repositories>
    <repository>
        <id>public snapshots</id>
        <name>public snapshots</name>
        <url>http://nexus.broadleafcommerce.org/nexus/content/groups/community-snapshots/</url>
    </repository>
    <repository>
        <id>public releases</id>
        <name>public releases</name>
        <url>http://nexus.broadleafcommerce.org/nexus/content/groups/community-releases/</url>
    </repository>
</repositories>

<properties>
    <maven.compiler.source>1.8</maven.compiler.source>
    <maven.compiler.target>1.8</maven.compiler.target>
    <google-closure-compiler.version>v20180506</google-closure-compiler.version>

    <debug.args>-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=${debug.port}</debug.args>
    <boot.jvm.memory>-Xmx1536M</boot.jvm.memory>
    <boot.jvm.args>${boot.jvm.memory} ${debug.args}</boot.jvm.args>

    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.uri>${project.baseUri}</project.uri>
</properties>

<build>
    <pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <configuration>
                    <jvmArguments>${boot.jvm.args}</jvmArguments>
                </configuration>
            </plugin>
        </plugins>
    </pluginManagement>
    <plugins>
        <plugin>
            <groupId>org.zeroturnaround</groupId>
            <artifactId>jrebel-maven-plugin</artifactId>
            <version>1.1.7</version>
            <executions>
                <execution>
                    <id>generate-rebel-xml</id>
                    <phase>process-resources</phase>
                    <goals>
                        <goal>generate</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
    </plugins>
</build>

<profiles>
    <profile>
        <id>jrebel</id>
        <properties>
            <boot.jvm.args>${boot.jvm.memory} ${debug.args} ${jrebel.agent.args}</boot.jvm.args>
        </properties>
    </profile>
</profiles>

<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>com.mycompany-community</groupId>
            <artifactId>boot-community-demo-core</artifactId>
            <version>${project.version}</version>
        </dependency>

        <dependency>
            <groupId>com.google.javascript</groupId>
            <artifactId>closure-compiler-unshaded</artifactId>
            <version>${google-closure-compiler.version}</version>
        </dependency>
    </dependencies>
</dependencyManagement>

<modules>
    <module>core</module>
    <module>site</module>
    <module>admin</module>
    <module>api</module>
</modules>

Any tips of what I am missing?

Thanks!!!

Shadow
  • 33,525
  • 10
  • 51
  • 64
tim.a
  • 83
  • 1
  • 1
  • 10

1 Answers1

1

So I opened an issue at broadleaf's github and found a solution. This might be useful for anyone interested in the future:

https://github.com/BroadleafCommerce/DemoSite/issues/40

I would suggest to not follow the tutorials for migrating to mysql as it seems to be outdated. Follow the changes I describe in the github link.

The first time you create the db it might take up to 15+ minutes. Be prepared for that and don't stop the compiling process. After the first time you can change "blPU.hibernate.hbm2ddl.auto" from "create" to "none" or "update".

Finally after the update if you try and visit localhost:8081/admin you might get this error

2018-12-08 19:55:26.540 INFO 6616 --- [nio-8081-exec-3] o.apache.coyote.http11.Http11Processor : Error parsing HTTP request header

As contributors informed there's no known solution for that so what you can do is go directly to the https link : https://localhost:8444/admin

tim.a
  • 83
  • 1
  • 1
  • 10