I'm quite new to the subject and I'd like to know what is wrong with what I've done so far.
So to establish the database connectioin I created a persistence.xml:
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="2.0"
xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://java.sun.com/xml/ns/persistence
http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
<persistence-unit name="Primary">
<class>xxx.model.Lecture</class>
<properties>
<property name="javax.persistence.jdbc.driver" value="com.ibm.db2.jcc.DB2Driver" />
<property name="javax.persistence.jdbc.url" value="jdbc:db2://localhost:50000/xxx" />
<property name="javax.persistence.jdbc.user" value="xxx" />
<property name="javax.persistence.jdbc.password" value="xxx" />
<property name="hibernate.dialect" value="org.hibernate.dialect.DB2Dialect"/>
<property name="show_sql" value="true"/>
<property name="hibernate.temp.use_jdbc_metadata_defaults" value="false"/>
</properties>
</persistence-unit>
</persistence>
... and included the driver .jar: db2jcc4.jar
When running the app I get the following error:
java.sql.SQLSyntaxErrorException: Schema 'DB2ADMIN' does not exist.
So did I miss something essential?
Thanks in advance!