Ray Harrison wrote:

> Did the information in the database get entered outside of the
> application? If so, cycle the app server to see if that fixes

What do you mean outside of the application?  The database is
populated with some base data before the application can start
doing anything.

> the problem (there's a flag you can set to eliminate that
> particular problem). If not, would you mind firing over the
> appropriate code snippets? (The place in your code that you
> are calling the findBy.. in, and the orion-ejb-jar.xml file
> that is generated).

Here's my new data-sources.xml (snip):

        <data-source
        class="com.evermind.sql.DriverManagerDataSource"
        name="CatsummitSource"
        location="jdbc/nonPooledCatsummitSource"
        pooled-location="jdbc/pooledCatsummitSource"
        xa-location="jdbc/CatsummitTxSource"
        ejb-location="jdbc/CatsummitSource"
       
connection-driver="oracle.jdbc.driver.OracleDriver"                            
min-connections="5"
        max-connections="25"
        username="catsummit"
       
password="catsummit"                                                           
url="jdbc:oracle:thin:@192.168.1.68:1521:orclcat"                              
/>                                                

My orion-ejb-jar.xml has this entity-deployment node:

        <entity-deployment
        name="com.zycus.util.PrimarykeygenerationHome"
        location="com.zycus.util.PrimarykeygenerationHome"
        wrapper="PrimarykeygenerationHome_EntityHomeWrapper200"
        table="util_PrimarykeygenerationHome"
        data-source="jdbc/CatsummitSource">
            <primkey-mapping>
                <cmp-field-mapping name="tablename"
                persistence-name="tablename" />
            </primkey-mapping>
            <cmp-field-mapping name="currentkeyid"
            persistence-name="currentkeyid" />
            <resource-ref-mapping name="jdbc/CatsummitSource" />
        </entity-deployment>

That's for an entity bean for the database table
"PrimaryKeyGenerationTbl", where a mapping of table name to
max(prikey) is stored for every other table in the database.

Here's the piece of code that throws the
ObjectNotFoundException:

  public Long getNextNumberInSequence(String tableName) throws
      PrimaryKeyGenerationException, RemoteException {

    Long key = null;
    Primarykeygeneration pkgRemote =
        (Primarykeygeneration) hmpEntries.get(tableName);
    if (pkgRemote == null) {
      // add an entry to the PrimaryKeyGenerationTbl table
      try{
          pkgRemote = pkgHome.findByPrimaryKey(tableName);
      } catch(javax.ejb.FinderException e) { // this exception
           throw new PrimaryKeyGenerationException(msgId1, e);
      }
      hmpEntries.put(tableName, pkgRemote);
    }
    // ... and so on and so forth
  }

> What version of Orion are you using? (Curious also as to your
> weblogic version).

I'm using OC4J (Oracle9iAS) 1.0.2.2.1 and WebLogic 6.1.

Manish

Reply via email to