Fabian Christ created JCR-3584:
----------------------------------
Summary: Wrong handling of database 'schema' parameter causes NPE
Key: JCR-3584
URL: https://issues.apache.org/jira/browse/JCR-3584
Project: Jackrabbit Content Repository
Issue Type: Bug
Components: jackrabbit-core
Affects Versions: 2.6
Reporter: Fabian Christ
When configuring a MySQL persistence manager like this
<PersistenceManager
class="org.apache.jackrabbit.core.persistence.pool.MySqlPersistenceManager">
<param name="driver" value="com.mysql.jdbc.Driver"/>
<param name="url" value="jdbc:mysql://host:3306/db"/>
<param name="user" value="user" />
<param name="password" value="secret" />
<param name="schema" value="mysql"/>
<param name="schemaObjectPrefix" value="pm_ws_${wsp.name}_"/>
</PersistenceManager>
The parameter 'schema' should define the database schema. In the
BundleDbPersistenceManager.java of jackrabbit-core 2.6 we see this
312 * Sets the database type. This identifier is used to load and execute
313 * the respective .ddl resource in order to create the required schema
314 * objects.
315 * @deprecated
316 * This method is deprecated; {@link setDatabaseType} should be used
instead.
317 *
318 * @param databaseType database type name
319 */
320 public void setSchema(String databaseType) {
321 this.databaseType = databaseType;
322 }
So setting the schema sets the databaseType. When setting the schema to
anything different from "mysql" you will get an NPE bebause the 'mysql.ddl'
file can not be found when creating the schema.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira