Ibo-config.xml not found

Exception:

A persistence manager factory has been instantiated using:

PersistenceManagerFactoryImpl pmf = new PersistenceManagerFactoryImpl();  
There are no further configurations in the source code of the application.

Afterwards a business object shall be made persistent:

pmf.getPersistenceManager().makePersistent(p);

This fails with the following exception:

com.signsoft.ibo.exception.IBOJDOFatalDataStoreException:
[IBO#7005]: Failed to acquire resource or resource handler, 
reason::resource not known: SJDO_DEFAULT: 
Reason:

You can configure the data source of a factory in the source code of the application or by the means of a separate configuration file ibo-config.xml . In this case the factory has been initialised without explicitly declaring a ibo-config.xml file and there is no further configuration in the source code.

As a result Signsoft intelliBO searches for a ibo-config.xml in the whole CLASSPATH . If there is not such file there is also no data source to configure the factory and the factory will be intitialised with an "empty" database connection.

This does not cause a visible exception and you can create a persistence manager from this factory too. But if you try to make a business object persistent with this manager, this is not possible because of the missing database connection and it appears the exception above.

Solution:

Option 1:

Create a valid ibo-config.xml file (see also section "File based configuration (ibo-config.xml)") and include it in your CLASSPATH . If you create a persistence manager factory as described above, it will now be instantiated with the values from the configuration file first found in your CLASSPATH .

You may also pass a reference of this file to the persistence manager factory during instantiation (if desired, with another name too):

PersistenceManagerFactoryImpl pmf = new PersistenceManagerFactoryImpl("/my-ibo-config.xml"); 

Option 2:

If you instantiate the factory without a configuration file, you have to configure it in the source code of your application. At least the datasource has to be specified. It could look like this:

pmf = new PersistenceManagerFactoryImpl();
pmf.setConnectionDriverName("org.h2.Driver");
pmf.setConnectionURL("jdbc:h3:database/data");
pmf.setConnectionInfoName("com.signsoft.ibo.dbsupport.h2.H2DatabaseInfo");
Please note, that the configuration of the datasource in the source code of the application only works, if there is actually no separate system configuration file.