Quando tento inserir no banco estou tendo o seguinte erro "Caused by: org.h2.jdbc.JdbcSQLSyntaxErrorException: Schema "SYSCAT" not found; SQL statement: select * from syscat.sequences [90079-200]"
package br.com.alura.loja.testes;
import java.math.BigDecimal;
import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;
import br.com.alura.loja.modelo.Produto;
public class CadastroDeProduto {
public static void main(String[] args) {
Produto celular = new Produto();
celular.setNome("Xiaomi redmi");
celular.setDescricao("Inovador");
celular.setPreco(new BigDecimal("1500"));
EntityManagerFactory factory = Persistence.createEntityManagerFactory("loja");
EntityManager em = factory.createEntityManager();
em.getTransaction().begin();
em.persist(celular);
em.getTransaction().commit();
em.close();
}
}
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="2.2"
xmlns="http://xmlns.jcp.org/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_2.xsd">
<persistence-unit name="loja" transaction-type="RESOURCE_LOCAL">
<properties>
<property name="javax.persistence.jdbc.driver" value="org.h2.Driver"/>
<property name="javax.persistence.jdbc.url" value="jdbc:h2:mem:loja"/>
<property name="javax.persistence.jdbc.user" value="sa"/>
<property name="javax.persistence.jdbc.password" value=""/>
<property name="hibernate.dialect" value="org.hibernate.dialect.DB2Dialect"/>
<property name="hibernate.show.sql" value="true"/>
<property name="hibernate.hbm2ddl.auto" value="update"/>
</properties>
</persistence-unit>
</persistence>