Hibernate не работает с Payara. Похоже, учетные данные соединения, такие как имя пользователя, пароль или URL игнорируются сервером. Я думаю, что проблема с поставщиком, который является org.hibernate.jpa.HibernatePersistenceProvider. Логи приложения выглядят очень хорошо, но sql никак не влияет. я использую mysql8. Когда я предоставил неверные значения в качестве учетных данных, ошибки не было.
Файл постоянства:
<provider>org.hibernate.jpa.HibernatePersistenceProvider</provider>
<properties>
<property name="hibernate.connection.url"
value="badAddress" />
<property name="hibernate.connection.username" value="badpassword" />
<property name="hibernate.connection.password" value="badlogin" />
<property name="hibernate.hbm2ddl.auto" value="create" />
<property name="hibernate.show_sql" value="true" />
<property name="hibernate.format_sql" value="true" />
<property name="hibernate.dialect"
value="org.hibernate.dialect.MySQL8Dialect" />
<property name="hibernate.transaction.jta.platform"
value="org.hibernate.service.jta.platform.internal.SunOneJtaPlatform" />
</properties>
</persistence-unit>
Журнал:
2020-03-15T13:13:27.054+0100|INFO: GUI deployment: uploadToTempfile
2020-03-15T13:13:27.055+0100|INFO: uploadFileName=LoginCreatorImpl.war
2020-03-15T13:13:27.056+0100|INFO: ================== availabilityEnabled skipped
2020-03-15T13:13:28.463+0100|INFO: HHH000204: Processing PersistenceUnitInfo [
name: test
...]
2020-03-15T13:13:28.586+0100|INFO: HHH000412: Hibernate Core {5.3.1.Final}
2020-03-15T13:13:28.589+0100|INFO: HHH000206: hibernate.properties not found
2020-03-15T13:13:28.729+0100|INFO: HCANN000001: Hibernate Commons Annotations {5.0.3.Final}
2020-03-15T13:13:28.949+0100|INFO: HHH000400: Using dialect: org.hibernate.dialect.MySQL8Dialect
2020-03-15T13:13:29.275+0100|INFO: HHH10005002: No explicit CDI BeanManager reference was passed to Hibernate, but CDI is available on the Hibernate ClassLoader.
2020-03-15T13:13:29.996+0100|INFO: Hibernate:
drop table if exists NowaEncja
2020-03-15T13:13:30.005+0100|INFO: Hibernate:
create table NowaEncja (
id bigint not null auto_increment,
test varchar(255),
primary key (id)
) engine=InnoDB
2020-03-15T13:13:30.007+0100|INFO: HHH000476: Executing import script 'org.hibernate.tool.schema.internal.exec.ScriptSourceInputNonExistentImpl@4befe0af'
2020-03-15T13:13:30.235+0100|INFO: Portable JNDI names for EJB TestBean: [java:global/LoginCreatorImpl/TestBean!eu.pstdio.LoginCreatorImpl.business.dao.TestBean, java:global/LoginCreatorImpl/TestBean]
2020-03-15T13:13:30.489+0100|INFO: Clustered CDI Event bus initialized
2020-03-15T13:13:30.529+0100|INFO: Hibernate:
insert
into
NowaEncja
(test)
values
(?)
2020-03-15T13:13:30.593+0100|INFO: Initializing Soteria 1.1-b01 for context '/LoginCreator'
2020-03-15T13:13:30.605+0100|INFO: Initializing Mojarra 2.3.9.payara-p3 for context '/LoginCreator'
2020-03-15T13:13:30.824+0100|INFO: Loading application [LoginCreatorImpl] at [/LoginCreator]
2020-03-15T13:13:31.001+0100|INFO: LoginCreatorImpl was successfully deployed in 3 888 milliseconds.