我是Moqui的新手,我使用以下命令启动Moqui:
$ git clone https://github.com/moqui/moqui-framework.git moqui
$ cd moqui
$ ./gradlew getComponent -Pcomponent=PopCommerce
$ ./gradlew getComponent -Pcomponent=HiveMind
$ ./gradlew downloadElasticSearch
$ ./gradlew load
我有一些问题:
20:33:03.043 ERROR main .moqui.i.e.EntityDatasourceFactoryImpl Error connecting to DataSource transactional (postgres), try 4 of 5: java.lang.ExceptionInInitializerError: Exception bitronix.tm.internal.BitronixRuntimeException: error initializing JdbcProxyFactory [in thread "main"]
20:32:52.683 WARN c-jmx-worker b.tm.u.ManagementRegistrar Cannot execute ManagementRegisterCommand on object with name bitronix.tm:type=JDBC,UniqueName=transactional_DS,Id=4
20:32:36.567 ERROR main .moqui.i.e.EntityDatasourceFactoryImpl Error connecting to DataSource transactional (postgres), try 1 of 5: java.lang.reflect.InaccessibleObjectException:
Unable to make protected final java.lang.Class java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain) throws java.lang.ClassFormatError accessible: module java.base does not "opens java.lang" to unnamed module @56620197
下面是我的文件MoquiDefaultConf.xml:
<default-property name="instance_purpose" value="production"/>
<!-- Locale and Time Zone Properties -->
<default-property name="default_locale" value="en_US"/>
<default-property name="default_time_zone" value="US/Pacific"/>
<default-property name="database_time_zone" value="US/Pacific"/>
<!-- Web App Properties -->
<default-property name="webapp_http_host" value=""/>
<default-property name="webapp_http_port" value=""/>
<default-property name="webapp_https_port" value=""/>
<default-property name="webapp_https_enabled" value="false"/>
<default-property name="webapp_allow_origins" value=""/>
<default-property name="webapp_handle_cors" value="true"/>
<default-property name="webapp_status_ips" value="127.0.0.1"/>
<default-property name="webapp_require_session_token" value="true"/>
<default-property name="webapp_upload_executable_allow" value="false"/>
<default-property name="webapp_client_ip_header" value=""/>
<!-- Properties for the primary (transactional group) datasource -->
<default-property name="entity_ds_db_conf" value="postgres"/>
<default-property name="entity_ds_host" value="127.0.0.1"/>
<default-property name="entity_ds_port" value="5432"/>
<default-property name="entity_ds_database" value="h2"/>
<default-property name="entity_ds_url" value="jdbc:h2:${moqui_runtime}/db/h2/${entity_ds_database};lock_timeout=30000"/>
<default-property name="entity_ds_schema" value=""/>
<default-property name="entity_ds_user" value="postgres"/>
<default-property name="entity_ds_password" value="trunghung0804"/>
<default-property name="entity_ds_crypt_pass" value="MoquiDefaultPassword:CHANGEME"/>
<default-property name="entity_ds_crypt_pass_old" value="MoquiDefaultPassword:CHANGEME"/>
<default-property name="entity_add_missing_runtime" value="false"/>
<default-property name="entity_add_missing_startup" value="true"/>
<default-property name="entity_lock_track" value="false"/>
<default-property name="entity_statement_timeout" value="false"/>
<default-property name="entity_empty_db_load" value="seed,seed-initial,install"/>
还有我在MoquiDefaultConf.xml中的数据源配置:
<datasource group-name="transactional" database-conf-name="${entity_ds_db_conf}" schema-name="${entity_ds_schema}"
runtime-add-missing="${entity_add_missing_runtime}" startup-add-missing="${entity_add_missing_startup}">
<!-- by default no inline-jdbc or jndi-jdbc elements, use default from database conf -->
</datasource>
<datasource group-name="transactional" database-conf-name="postgres" schema-name="">
<inline-jdbc pool-minsize="5" pool-maxsize="50">
<xa-properties user="postgres" password="trunghung0804" pinGlobalTxToPhysicalConnection="true"
serverName="127.0.0.1" port="5432" databaseName="moqui" autoReconnectForPools="true"
useUnicode="true" encoding="UTF-8"/>
</inline-jdbc>
</datasource>
这里是我连接到的数据库:enter image description here
1条答案
按热度按时间m1m5dgzv1#
你的连接配置是错误的,使用这配置
将moqui替换为数据库名称,
将dbUsername替换为您的数据库用户名,
将dbPassword替换为您的数据库密码