Hi Broadleaf guys, I am currently working with the ReactStarter and converting it to use mySQL and Tomcat for the Admin and API applications. I am finding that the site/pom structure of the React Starter is a little different from the regular Broadleaf Demo and running into some issues. After I get through these steps I plan on writing up some detailed instructions that I can commit back to you guys for the community.
Basically what is happening at the moment, that when building in IntelliJ for some reason Apache Solr blows up. I have the mySQL tables connected in IntelliJ and I can view everything. I will post the error from Solr below, and then all the steps I have done thus far (I am assuming that the /site directory plays no part at all in configuring, as it is served with webpack/node)
First Question
I see in the build for admin that the site starts Tomcat. Was wondering if you guys already ported this code over to use Tomcat as the default instead of Jetty?
Tomcat initialized with port(s): 8444 (https) 8081 (http)
Starting service [Tomcat]
Starting Servlet Engine: Apache Tomcat/8.5.27
Solr
The problem is mostly likely related to me improperly configuring mySQL The error is part of a long java stack trace:
Not found in 'org.owasp.esapi.resources' directory or file not readable: /Users/rgeisman/Development/broadleaf-react/admin/ESAPI.properties
Steps I took in setting up mySQL
The root pom.xml actually doesn't have a reference to the HSQL database like the regular Heat Clinic demo does. The exporting of the schema fails until I add it. The instructions differ also between the Heat Clinic Demo and just the general moving to mySQL instructions. These are the steps I have taken so far:
Next, In the common-shared.properties file at core/src/main/resources/runtime-properties I added my database connection properties:
# your local database username, just a user that has readwrite permissions
database.user=rgeisman
# local database password
database.password=***********
database.driver=com.mysql.jdbc.Driver
# this connection URL assumes that it is connecting to a schema called broadleaf
database.url=jdbc:mysql://localhost:3306/broadleaf?useUnicode=true&characterEncoding=utf8
Installed mySQL on my local machine, with a user as rgeisman, and granted all privileges, and also created a database called: broadleaf
Then in my ~/rgeisman directory, I created a file called .my.cnf Inside the file I placed these contents:
When I set up the database configuration in IntelliJ to look at the tables, it requested that I needed to download the connector. So I did. The connector .jar file 5.1.46 matches the version in the root pom.xml. I then tested the connection in IntelliJ and it is successful.
I don't think I am missing anything... but both the /admin, and /api fail to build when relating to Solr. All the tables are created in MySQL. Any hints guys? Like I was saying, after I get it all ironed out I can write some detailed instructions to contribute to the React/Broadleaf initiative. It's amazing.
An observation
If I do mvn spring-boot:run in the /api, or /admin directory, I get a different set of errors than when running the build configuration in IntelliJ (perhaps I have only the JDBC configured in IntelliJ, but this may be a lead:
2018-10-19 14:32:18.296 WARN 8300 --- [ost-startStop-1] o.a.tomcat.jdbc.pool.PooledConnection : Not loading a JDBC driver as driverClassName property is null.
2018-10-19 14:32:18.310 ERROR 8300 --- [ost-startStop-1] o.a.tomcat.jdbc.pool.ConnectionPool : Unable to create initial connections of pool.
java.sql.SQLException: The url cannot be null
Hi Broadleaf guys, I am currently working with the ReactStarter and converting it to use mySQL and Tomcat for the Admin and API applications. I am finding that the site/pom structure of the React Starter is a little different from the regular Broadleaf Demo and running into some issues. After I get through these steps I plan on writing up some detailed instructions that I can commit back to you guys for the community.
Basically what is happening at the moment, that when building in IntelliJ for some reason Apache Solr blows up. I have the mySQL tables connected in IntelliJ and I can view everything. I will post the error from Solr below, and then all the steps I have done thus far (I am assuming that the /site directory plays no part at all in configuring, as it is served with webpack/node)
First Question
Solr The problem is mostly likely related to me improperly configuring mySQL The error is part of a long java stack trace:
Not found in 'org.owasp.esapi.resources' directory or file not readable: /Users/rgeisman/Development/broadleaf-react/admin/ESAPI.properties
Steps I took in setting up mySQL The root pom.xml actually doesn't have a reference to the HSQL database like the regular Heat Clinic demo does. The exporting of the schema fails until I add it. The instructions differ also between the Heat Clinic Demo and just the general moving to mySQL instructions. These are the steps I have taken so far:
Next, In the common-shared.properties file at core/src/main/resources/runtime-properties I added my database connection properties:
Installed mySQL on my local machine, with a user as rgeisman, and granted all privileges, and also created a database called: broadleaf
Then in my ~/rgeisman directory, I created a file called .my.cnf Inside the file I placed these contents:
When I set up the database configuration in IntelliJ to look at the tables, it requested that I needed to download the connector. So I did. The connector .jar file 5.1.46 matches the version in the root pom.xml. I then tested the connection in IntelliJ and it is successful.
I don't think I am missing anything... but both the /admin, and /api fail to build when relating to Solr. All the tables are created in MySQL. Any hints guys? Like I was saying, after I get it all ironed out I can write some detailed instructions to contribute to the React/Broadleaf initiative. It's amazing.
An observation