If you see the schema names in the debug logging of query SQL, then maybe you can see something in my config that causes my issue - but if you aren't meant to see the schema name in the logging, it could be something as simple as a database incompatibility.

I checked that the schema exists! It does.

<?xml version="1.0" encoding="UTF-8"?>
<persistence version="1.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_1_0.xsd";>
  <persistence-unit name="PatternRepo">
    <description>Pattern Repo JPA Config</description>
    <provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>
    <mapping-file>org/permacode/patternrepo/orm/Category.xml</mapping-file>
    <mapping-file>org/permacode/patternrepo/orm/Market.xml</mapping-file>
    <mapping-file>org/permacode/patternrepo/orm/Code.xml</mapping-file>
    <mapping-file>org/permacode/patternrepo/orm/TestResult.xml</mapping-file>
    <mapping-file>org/permacode/patternrepo/orm/TradingParam.xml</mapping-file>
  </persistence-unit>
</persistence>

orm.xml:
<?xml version="1.0" encoding="UTF-8"?>
<entity-mappings xmlns="http://java.sun.com/xml/ns/persistence/orm";
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm http://java.sun.com/xml/ns/persistence/orm_1_0.xsd";
  version="1.0">
  <persistence-unit-metadata>
    <xml-mapping-metadata-complete />
    <persistence-unit-defaults>
      <schema>DEV</schema>
    </persistence-unit-defaults>
  </persistence-unit-metadata>
</entity-mappings>

the properties I set in code:
openjpa.ConnectionUserName=sa
openjpa.ConnectionPassword=
openjpa.ConnectionURL=jdbc:hsqldb:mem:TRADING_CODE
openjpa.ConnectionDriverName=org.hsqldb.jdbcDriver
openjpa.jdbc.Schema=DEV
openjpa.jdbc.SchemaFactory=native(ForeignKeys=true)
openjpa.jdbc.DBDictionary=org.apache.openjpa.jdbc.sql.HSQLDictionary
openjpa.Log=log4j
openjpa.Id=[PatternRepo OpenJPA]


The mappings won't help but this is it:

openjpa.MetaDataFactory:jpa(Resources=org/permacode/patternrepo/orm/Category.xml;
org/permacode/patternrepo/orm/Market.xml;
org/permacode/patternrepo/orm/Code.xml;
org/permacode/patternrepo/orm/TestResult.xml;
org/permacode/patternrepo/orm/TradingParam.xml;
org/permacode/patternrepo/orm/CategoryCodeLink.xml;
org/permacode/patternrepo/orm/TestQueries.xml)


Prashant Bhat on 09/01/08 03:17, wrote:
Hi Adam,

Today, I built the latest snapshot(rev. 609825) and without any
changes it's working, although the above 'remove' line is still
present. So I think, it's been corrected already in another part of
the code:-)

As the Runtime.Trace is displaying the schema property, it's
configured properly. So a dumb question: are you sure that the
database contains the schema? because afaik, the mapping tool doesn't
create the schema.

If you post your complete openjpa configurations, I can try it in my
sample project here.

Regards,
Prashant

On Jan 9, 2008 1:45 AM, Adam Hardy <[EMAIL PROTECTED]> wrote:
Hi Prashant,

do you mind me asking exactly what you patched? I thought I'd patched it - I did
this at line 666 but it had no effect:


     Map.Entry entry;
     for (Iterator itr = remaining.entrySet().iterator(); itr.hasNext();) {
          entry = (Map.Entry) itr.next();
          Object key = entry.getKey();
          if (key != null) {
              warnInvalidProperty((String) key);
//             map.remove(key); // LEAVE openjpa.jdbc.Schema

          }
     }



Reply via email to