通过 jar 部署 6.1
Deploy 6.1 via jar
我有一个全新的 broadleaf-commerce 源代码下载。它允许我 运行 mvn clean install
并且我能够 运行 mvn spring:boot run
在 admin
中。但是,当我在根文件夹中运行 mvn package
。我看到了不同的 jar file
和 运行 java -jar admin/target/admin.jar
例外
onContext. To display the conditions report re-run your application with 'debug' enabled.
2020-10-07 23:54:33.045 ERROR 4853 --- [ main] o.s.boot.SpringApplication : Application run failed
org.hibernate.exception.SQLGrammarException: could not extract ResultSet
at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:63) ~[hibernate-core-5.3.17.Final.jar!/:5.3.17.Final]
at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.3.17.Final.jar!/:5.3.17.Final]
at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:113) ~[hibernate-core-5.3.17.Final.jar!/:5.3.17.Final]
at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:99) ~[hibernate-core-5.3.17.Final.jar!/:5.3.17.Final]
at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.extract(ResultSetReturnImpl.java:69) ~[hibernate-core-5.3.17.Final.jar!/:5.3.17.Final]
at org.hibernate.loader.Loader.getResultSet(Loader.java:2265) ~[hibernate-core-5.3.17.Final.jar!/:5.3.17.Final]
at org.hibernate.loader.Loader.executeQueryStatement(Loader.java:2028) ~[hibernate-core-5.3.17.Final.jar!/:5.3.17.Final]
at org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1990) ~[hibernate-core-5.3.17.Final.jar!/:5.3.17.Final]
at org.hibernate.loader.Loader.doQuery(Loader.java:949) ~[hibernate-core-5.3.17.Final.jar!/:5.3.17.Final]
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:351) ~[hibernate-core-5.3.17.Final.jar!/:5.3.17.Final]
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:321) ~[hibernate-core-5.3.17.Final.jar!/:5.3.17.Final]
at org.hibernate.loader.Loader.loadCollectionBatch(Loader.java:2536) ~[hibernate-core-5.3.17.Final.jar!/:5.3.17.Final]
at org.hibernate.loader.collection.plan.LegacyBatchingCollectionInitializerBuilder$LegacyBatchingCollectionInitializer.initialize(LegacyBatchingCollectionInitializerBuilder.java:83) ~[hibernate-core-5.3.17.Final.jar!/:5.3.17.Final]
at org.hibernate.persister.collection.AbstractCollectionPersister.initialize(AbstractCollectionPersister.java:692) ~[hibernate-core-5.3.17.Final.jar!/:5.3.17.Final]
at org.hibernate.event.internal.DefaultInitializeCollectionEventListener.onInitializeCollection(DefaultInitializeCollectionEventListener.java:75) ~[hibernate-core-5.3.17.Final.jar!/:5.3.17.Final]
at org.hibernate.internal.SessionImpl.initializeCollection(SessionImpl.java:2266) ~[hibernate-core-5.3.17.Final.jar!/:5.3.17.Final]
at org.hibernate.collection.internal.AbstractPersistentCollection.doWork(AbstractPersistentCollection.java:585) ~[hibernate-core-5.3.17.Final.jar!/:5.3.17.Final]
at org.hibernate.collection.internal.AbstractPersistentCollection.withTemporarySessionIfNeeded(AbstractPersistentCollection.java:263) ~[hibernate-core-5.3.17.Final.jar!/:5.3.17.Final]
at org.hibernate.collection.internal.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:581) ~[hibernate-core-5.3.17.Final.jar!/:5.3.17.Final]
at org.hibernate.collection.internal.AbstractPersistentCollection.read(AbstractPersistentCollection.java:148) ~[hibernate-core-5.3.17.Final.jar!/:5.3.17.Final]
at org.hibernate.collection.internal.PersistentBag.iterator(PersistentBag.java:390) ~[hibernate-core-5.3.17.Final.jar!/:5.3.17.Final]
at org.broadleafcommerce.core.search.service.solr.index.SolrIndexServiceImpl.attachIndexableDocumentFields(SolrIndexServiceImpl.java:524) ~[broadleaf-framework-6.1.3-GA.jar!/:na]
at org.broadleafcommerce.core.search.service.solr.index.SolrIndexServiceImpl.buildDocument(SolrIndexServiceImpl.java:506) ~[broadleaf-framework-6.1.3-GA.jar!/:na]
at
at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:52) ~[ROOT.jar:1.0.0-SNAPSHOT]
Caused by: java.sql.SQLSyntaxErrorException: Unknown column 'fieldtypes0_.ARCHIVED' in 'where clause'
我的配置
database.user=root
# local database password
#
database.password=dockerPassword
database.driver=com.mysql.jdbc.Driver
# this connection URL assumes that it is connecting to a schema called broadleaf
database.url=jdbc:mysql://127.0.0.1:3306/broadleaf
blPU.hibernate.hbm2ddl.auto=create
blCMSStorage.hibernate.hbm2ddl.auto=create
blSecurePU.hibernate.hbm2ddl.auto=create
blEventPU.hibernate.hbm2ddl.auto=create
当 运行 java -jar
时,请务必包含 -javaagent:target/agents/spring-instrument.jar
作为参数,以便 Spring 可以检测 类。
我有一个全新的 broadleaf-commerce 源代码下载。它允许我 运行 mvn clean install
并且我能够 运行 mvn spring:boot run
在 admin
中。但是,当我在根文件夹中运行 mvn package
。我看到了不同的 jar file
和 运行 java -jar admin/target/admin.jar
例外
onContext. To display the conditions report re-run your application with 'debug' enabled.
2020-10-07 23:54:33.045 ERROR 4853 --- [ main] o.s.boot.SpringApplication : Application run failed
org.hibernate.exception.SQLGrammarException: could not extract ResultSet
at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:63) ~[hibernate-core-5.3.17.Final.jar!/:5.3.17.Final]
at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.3.17.Final.jar!/:5.3.17.Final]
at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:113) ~[hibernate-core-5.3.17.Final.jar!/:5.3.17.Final]
at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:99) ~[hibernate-core-5.3.17.Final.jar!/:5.3.17.Final]
at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.extract(ResultSetReturnImpl.java:69) ~[hibernate-core-5.3.17.Final.jar!/:5.3.17.Final]
at org.hibernate.loader.Loader.getResultSet(Loader.java:2265) ~[hibernate-core-5.3.17.Final.jar!/:5.3.17.Final]
at org.hibernate.loader.Loader.executeQueryStatement(Loader.java:2028) ~[hibernate-core-5.3.17.Final.jar!/:5.3.17.Final]
at org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1990) ~[hibernate-core-5.3.17.Final.jar!/:5.3.17.Final]
at org.hibernate.loader.Loader.doQuery(Loader.java:949) ~[hibernate-core-5.3.17.Final.jar!/:5.3.17.Final]
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:351) ~[hibernate-core-5.3.17.Final.jar!/:5.3.17.Final]
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:321) ~[hibernate-core-5.3.17.Final.jar!/:5.3.17.Final]
at org.hibernate.loader.Loader.loadCollectionBatch(Loader.java:2536) ~[hibernate-core-5.3.17.Final.jar!/:5.3.17.Final]
at org.hibernate.loader.collection.plan.LegacyBatchingCollectionInitializerBuilder$LegacyBatchingCollectionInitializer.initialize(LegacyBatchingCollectionInitializerBuilder.java:83) ~[hibernate-core-5.3.17.Final.jar!/:5.3.17.Final]
at org.hibernate.persister.collection.AbstractCollectionPersister.initialize(AbstractCollectionPersister.java:692) ~[hibernate-core-5.3.17.Final.jar!/:5.3.17.Final]
at org.hibernate.event.internal.DefaultInitializeCollectionEventListener.onInitializeCollection(DefaultInitializeCollectionEventListener.java:75) ~[hibernate-core-5.3.17.Final.jar!/:5.3.17.Final]
at org.hibernate.internal.SessionImpl.initializeCollection(SessionImpl.java:2266) ~[hibernate-core-5.3.17.Final.jar!/:5.3.17.Final]
at org.hibernate.collection.internal.AbstractPersistentCollection.doWork(AbstractPersistentCollection.java:585) ~[hibernate-core-5.3.17.Final.jar!/:5.3.17.Final]
at org.hibernate.collection.internal.AbstractPersistentCollection.withTemporarySessionIfNeeded(AbstractPersistentCollection.java:263) ~[hibernate-core-5.3.17.Final.jar!/:5.3.17.Final]
at org.hibernate.collection.internal.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:581) ~[hibernate-core-5.3.17.Final.jar!/:5.3.17.Final]
at org.hibernate.collection.internal.AbstractPersistentCollection.read(AbstractPersistentCollection.java:148) ~[hibernate-core-5.3.17.Final.jar!/:5.3.17.Final]
at org.hibernate.collection.internal.PersistentBag.iterator(PersistentBag.java:390) ~[hibernate-core-5.3.17.Final.jar!/:5.3.17.Final]
at org.broadleafcommerce.core.search.service.solr.index.SolrIndexServiceImpl.attachIndexableDocumentFields(SolrIndexServiceImpl.java:524) ~[broadleaf-framework-6.1.3-GA.jar!/:na]
at org.broadleafcommerce.core.search.service.solr.index.SolrIndexServiceImpl.buildDocument(SolrIndexServiceImpl.java:506) ~[broadleaf-framework-6.1.3-GA.jar!/:na]
at
at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:52) ~[ROOT.jar:1.0.0-SNAPSHOT]
Caused by: java.sql.SQLSyntaxErrorException: Unknown column 'fieldtypes0_.ARCHIVED' in 'where clause'
我的配置
database.user=root
# local database password
#
database.password=dockerPassword
database.driver=com.mysql.jdbc.Driver
# this connection URL assumes that it is connecting to a schema called broadleaf
database.url=jdbc:mysql://127.0.0.1:3306/broadleaf
blPU.hibernate.hbm2ddl.auto=create
blCMSStorage.hibernate.hbm2ddl.auto=create
blSecurePU.hibernate.hbm2ddl.auto=create
blEventPU.hibernate.hbm2ddl.auto=create
当 运行 java -jar
时,请务必包含 -javaagent:target/agents/spring-instrument.jar
作为参数,以便 Spring 可以检测 类。