javax.persistence.sql-load-script-source property is not effective [message #1709182] |
Thu, 24 September 2015 16:18 |
David Mising name Messages: 24 Registered: June 2010 |
Junior Member |
|
|
I configured this persistence unit trying to insert some data into some tables. But rows are not inserted (tables were created fine); and I can not find any trace (success or fail) in eclipselink log.
I am running in a bundle environment; and involved bundles are list below as well ...
Any idea of what might be wrong is greatly appreciated!!
<?xml version="1.0" encoding="UTF-8"?>
<persistence 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_1.xsd"
version="2.1">
<persistence-unit name="MyUnit" transaction-type="RESOURCE_LOCAL">
<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
<class>...</class>
<class>...</class>
<properties>
<property name="javax.persistence.sql-load-script-source" value="META-INF/initiate_realm.sql" />
</properties>
</persistence-unit>
</persistence>
Bundles,
eclipsePlugins(group: 'org.eclipse.persistence', name: 'javax.persistence', version: '2.1.0')
eclipsePlugins(group: 'org.eclipse.persistence', name: 'org.eclipse.persistence.jpa', version: '2.5.2')
eclipsePlugins(group: 'org.eclipse.persistence', name: 'org.eclipse.persistence.jpa.jpql', version: '2.5.2')
eclipsePlugins(group: 'org.eclipse.persistence', name: 'org.eclipse.persistence.antlr', version: '3.2.0')
eclipsePlugins(group: 'org.eclipse.persistence', name: 'org.eclipse.persistence.asm', version: '3.3.1')
eclipsePlugins(group: 'org.eclipse.persistence', name: 'org.eclipse.persistence.core', version: '2.5.2')
[Updated on: Thu, 24 September 2015 16:19] Report message to a moderator
|
|
|
|
|
|
Re: javax.persistence.sql-load-script-source property is not effective [message #1709771 is a reply to message #1709642] |
Wed, 30 September 2015 19:44 |
David Mising name Messages: 24 Registered: June 2010 |
Junior Member |
|
|
Since we are running in a OSGi environment, all the DDL settings are setup via an OSGi Configuration service with id "gemini.jpa.punit". It is like,
Configuration config = conf.createFactoryConfiguration("gemini.jpa.punit", null);
Dictionary<String, String> props = new Hashtable<String, String>();
props.put("gemini.jpa.punit.name", "MyName");
props.put("eclipselink.target-database", "PostgreSQL");
props.put("javax.persistence.jdbc.driver", "org.postgresql.Driver");
props.put("javax.persistence.jdbc.url", "xxxx");
props.put("javax.persistence.jdbc.user", "xxxx");
props.put("javax.persistence.jdbc.password", "password");
props.put("eclipselink.weaving", "false");
props.put("eclipselink.logging.level", "ALL");
props.put("eclipselink.logging.file", "/opt/tomcat6/logs/eclipselink.log");
props.put("eclipselink.logging.timestamp", "false");
props.put("eclipselink.logging.thread", "false");
props.put("eclipselink.logging.exceptions", "true");
props.put("eclipselink.orm.throw.exceptions", "true");
props.put("eclipselink.jdbc.read-connections.min", "1");
props.put("eclipselink.jdbc.write-connections.min", "1");
props.put("eclipselink.ddl-generation", "create-or-extend-tables");
config.update(props);
I have tried to add the following to the props; however it doesn't make a difference, and not logs.
props.put("javax.persistence.sql-load-script-source", "/opt/tomcat6/configurations/initiate.sql");
Thanks!
[Updated on: Wed, 30 September 2015 19:46] Report message to a moderator
|
|
|
|
Powered by
FUDForum. Page generated in 0.03910 seconds