-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Many to Many:Assoc. Table extra columns:Exotic Mapping
PostPosted: Tue Jun 07, 2005 11:10 am 
Newbie

Joined: Thu May 26, 2005 1:04 pm
Posts: 13
I have a many to many between two tables with a link asscociation table with extra columns

Parent -> Job
Child -> Sample
Association Table Entity(composite-element of Job) -> JobSample (jobid,sampleid,some extra colums )

I got the clues for implementing a many to may with additional attribites in the association table.
from sec 8.2 user guide.And the caveatemptor apllication.

I am able to update the association table(JOB_SAMPLE).Using the following mappings and code.

While debugging I found that if I retrieve by useing a simple query like
"from Job" I do get a list of collection of JobSample instances in the Job.samples collection. but the JobSample object has null values for all its properties except for the reference to the parent i.e, Job

I have debugged it many times but cant seem to figure out as to why the samples collection in the Job has references to JobSamples instances whihc have all its properties as null.

Is there some problem with my mapping.

Thank you for you time in reading through all this.


Hibernate version:3.05

Mapping documents:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<class name="my.app.domain.Job" table="JOB">
<id name="jobUid" column="JOB_UID" type="java.lang.Long">
<generator class="native"/>
</id>
<timestamp column="_MODIFY_ON" name="ModifyOn"/>
<property name="jobName" column="JOB_NAME" type="java.lang.String"
length="50"/>
<!-- associations -->
<many-to-one name="ModifiedBy" column="_MODIFIED_BY"
class="my.app.domain.UserProfile" cascade="none"/>
<many-to-one name="assignedUser" column="ASSIGNED_USER_UID"
class="my.app.domain.UserProfile" cascade="none"/>
<!--collections-->
<idbag name="samples" table="JOB_SAMPLE" lazy="false">
<collection-id column="JOB_SAMPLE_UID" type="long">
<generator class="increment"/>
</collection-id>
<key column="JOB_UID"/>
<composite-element class="my.app.domain.JobSample">
<parent name="Job"/>
<many-to-one name="modifiedby"
column="_MODIFIED_BY"
class="my.app.domain.UserProfile"
access="my.app.dao.DirectSetAccessor"/>
<many-to-one name="sample"
column="SAMPLE_UID"
class="my.app.domain.Sample"
access="my.app.dao.DirectSetAccessor"/>
<property name="ModifyOn" column="_MODIFY_ON" type="java.util.Date" access="my.app.dao.DirectSetAccessor"/>
</composite-element>
</idbag>
</class>
</hibernate-mapping>


Code between sessionFactory.openSession() and session.close():
Code:
//Dao method being called      
   public List getJobs(UserProfile user) {
        try {
           Criteria criteria =  HibernateUtil.getSession().createCriteria(Job.class);
           if("administrator".equals(user.getRole().getRoleName()) || "director".equals(user.getRole().getRoleName())){
           }else {
              criteria.add(Restrictions.eq("assignedUser",user));
           }
            return criteria.list();
        } catch (Exception e) {
            throw new DaoException(e);
        }
    }



code for the main class Job
Code:
/*
* Created on Apr 14, 2005
*
*/

import my.app.dao.Dao;

import java.util.Date;
import java.util.Iterator;
import java.util.HashSet;
import java.util.Set;
import java.util.List;
import java.util.ArrayList;

import my.app.domain.JobSample;



public class Job extends DatabaseAware{
   /* (non-Javadoc)
    * @see java.lang.Object#equals(java.lang.Object)
    */
   
   protected static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(Job.class);
   private Long jobUid;
   private String jobName;
   private UserProfile assignedUser;
       private List samples = new ArrayList(); //if using idbag
       private int hashCode = Integer.MIN_VALUE;
   
   public Job(){}
   
    public  void delete(UserProfile user) {
       if(user.getUserUid().compareTo(this.assignedUser.getUserUid())== 0){
          Dao.getInstance().delete(this);   
       }
       
    }
   
   
   public Job(UserProfile user){
      setAssignedUser(user);
      setModifiedBy(user);
   }
   
    public static Job createDefaultJob(){
       Job job = new Job(){
          public void save(UserProfile user){
             //do nothing - users cannot save the default job
          }
       };
       job.setJobName("Session Default");
       return job;
    }
    public HashSet getSampleFromStringArray(String[] samplelist){
      Sample sample = new Sample();
      HashSet list = new HashSet();
      log.info("Parsing the list of samples "+samplelist.toString());
      for(int i=0;i<samplelist.length;i++){
         if(new Long(samplelist[i]).longValue() > 0)
         list.add((Sample) Sample.load(Sample.class,new Long(samplelist[i]).longValue()));
      }
      return list;
   }
   
   public void bindSamplesToJob(HashSet samplelist,UserProfile user){
      Sample sample = new Sample();
      JobSample jsample;
      Iterator iter = samplelist.iterator();
      log.info("Parsing the list of samples "+samplelist);
      while(iter.hasNext()){
          sample = (Sample)iter.next();
          this.getSamples().add(new JobSample(this,sample,user,new Date()));
      }
   }
/
public Set getSampleAdditionalIdentifiers(){
   HashSet additionalIdentifiers = new HashSet();
   if(this.getSamples() != null){
         Iterator itr = samples.iterator();
         while (itr.hasNext()) {
               JobSample js = (JobSample) itr.next();
               additionalIdentifiers.add(js.getSample().getDisplayIdentifier());
            }
         }
   return additionalIdentifiers;
    }
      
    public List getSamples() {
      return samples;
    }
    /**
     *
     * @param set of JobSample instances
     */
    public void setSamples(List set) {
        samples = set;
    }
   
   public void addJobSample(JobSample jsample) {
      if (jsample == null)
         throw new IllegalArgumentException("Can't add a null Job Sample.");
      this.getSamples().add(jsample);
   }
   
   
   
    private void addParentSamples(Sample s){
       //TODO complete this implementation - if necessary
    }
   
   public void save(){
          save(assignedUser);

   }
    public String getJobName() {
        return jobName;
    }

    public Long getJobUid() {
        return jobUid;
    }

    public void setJobName(String string) {
        jobName = string;
    }

    public void setJobUid(Long long1) {
        jobUid = long1;
    }

    public UserProfile getAssignedUser() {
        return assignedUser;
    }

    public void setAssignedUser(UserProfile profile) {
        assignedUser = profile;
    }

   

    public boolean equals (Object obj) {
      if (null == obj) return false;
      if (!(obj instanceof gov.cdc.mustang.domain.Job)) return false;
      else {
         gov.cdc.mustang.domain.Job job = (gov.cdc.mustang.domain.Job) obj;
         if (null == this.getJobUid() || null == job.getJobUid()) return false;
         else return (this.getJobUid().equals(job.getJobUid()));
      }
   }

   public int hashCode () {
      if (Integer.MIN_VALUE == this.hashCode) {
         if (null == this.getJobUid()) return super.hashCode();
         else {
            String hashStr = this.getClass().getName() + ":" + this.getJobUid().hashCode();
            this.hashCode = hashStr.hashCode();
         }
      }
      return this.hashCode;
   }
}




Code for the Assciation class(Composite-element)

Code:

package my.app.domain;

import java.io.Serializable;
import java.util.Date;

public class JobSample  implements Serializable {

   private long jobSampleUid = 0;
   private Job job;
   private Sample sample;
   private UserProfile modifiedby;
   private Date ModifyOn;
   
   public JobSample(){}
   public JobSample(Job job,Sample sample,UserProfile modifiedby,Date ModifyOn){
      this.job=job;
      this.sample=sample;
      this.modifiedby=modifiedby;
      this.ModifyOn=ModifyOn;
   }

   /**
    * @return Returns the _modified_by.
    */
   public UserProfile getModifiedby() {
      return modifiedby;
   }
   /**
    * @param _modified_by The _modified_by to set.
    */
   public void setModifiedby(UserProfile modifiedby) {
      this.modifiedby = modifiedby;
   }
   /**
    * @return Returns the _Modify_On.
    */
   public Date getModifyOn() {
      return ModifyOn;
   }
   /**
    * @param modify_On The _Modify_On to set.
    */
   public void setModifyOn(Date ModifyOn) {
      this.ModifyOn = ModifyOn;
   }
   /**
    * @return Returns the job.
    */
   public Job getJob() {
      return job;
   }
   /**
    * @param job The job to set.
    */
   public void setJob(Job job) {
      this.job = job;
   }
   /**
    * @return Returns the jobSampleUid.
    */
   public long getJobSampleUid() {
      return jobSampleUid;
   }
   /**
    * @param jobSampleUid The jobSampleUid to set.
    */
   public void setJobSampleUid(long jobSampleUid) {
      this.jobSampleUid = jobSampleUid;
   }
   /**
    * @return Returns the sample.
    */
   public Sample getSample() {
      return sample;
   }
   /**
    * @param sample The sample to set.
    */
   public void setSample(Sample sample) {
      
      this.sample = sample;
   }


   public boolean equals (Object obj) {
      if (null == obj) return false;
      if (!(obj instanceof gov.cdc.mustang.domain.JobSample)) return false;
      else {
         gov.cdc.mustang.domain.JobSample jobSample = (gov.cdc.mustang.domain.JobSample) obj;
         if (0 == this.getJobSampleUid() || 0 == jobSample.getJobSampleUid()) return false;
         else return (this.getJobSampleUid()==(jobSample.getJobSampleUid()));
      }
   }

   public int hashCode() {
      int result;
      result = (job != null ? job.hashCode() : 0);
      result = 29 * result + (sample != null ? sample.hashCode() : 0);
      return result;
   }
   
   public String toString () {
      return super.toString();
   }


}


Full stack trace of any exception that occurs:

Name and version of the database you are using:HSQL DB 1.7.2

The generated SQL (show_sql=true):

Debug level Hibernate log excerpt:
10:47:27,939 INFO [Configuration] Mapping resource: my/app/domain/Job.hbm.xml
10:47:27,955 INFO [HbmBinder] Mapping class: my.app.domain.Job -> JOB
10:47:27,970 INFO [HbmBinder] Mapping collection: my.app.domain.Job.samples -> JOB_SAMPLE
10:47:27,970 INFO [Configuration] Configured SessionFactory: null
10:47:27,970 INFO [Configuration] processing extends queue
10:47:27,986 INFO [Configuration] processing collection mappings
10:47:27,986 INFO [HbmBinder] Mapping collection: my.app.domain.ValueSet.valueSetCodeRels -> VALUE_SET_CODE
10:47:27,986 INFO [HbmBinder] Mapping collection: my.app.domain.Sample.ids -> SAMPLE_ADDITIONAL_IDENTIFIER
10:47:27,986 INFO [Configuration] processing association property references
10:47:27,986 INFO [Configuration] processing foreign key constraints
10:47:28,970 INFO [DriverManagerConnectionProvider] Using Hibernate built-in connection pool (not for production use!)
10:47:28,970 INFO [DriverManagerConnectionProvider] Hibernate connection pool size: 5
10:47:28,986 INFO [DriverManagerConnectionProvider] autocommit mode: false
10:47:28,986 INFO [STDOUT] DriverManager.initialize: jdbc.drivers = null
10:47:28,986 INFO [STDOUT] JDBC DriverManager initialized
10:47:28,986 INFO [STDOUT] registerDriver: driver[className=org.hsqldb.jdbcDriver,org.hsqldb.jdbcDriver@200d0c]
10:47:28,986 INFO [DriverManagerConnectionProvider] using driver: org.hsqldb.jdbcDriver at URL: jdbc:hsqldb:hsql://localhost/mustang
10:47:28,986 INFO [DriverManagerConnectionProvider] connection properties: {user=sa, password=}
10:47:28,986 INFO [STDOUT] DriverManager.getConnection("jdbc:hsqldb:hsql://localhost/mustang")
10:47:28,986 INFO [STDOUT] trying driver[className=org.hsqldb.jdbcDriver,org.hsqldb.jdbcDriver@200d0c]
10:47:29,173 INFO [STDOUT] [Server@15b5783]: [Thread[HSQLDB Server @15b5783,5,jboss]]: handleConnection(Socket[addr=/127.0.0.1,port=2481,localport=9001]) entered
10:47:29,189 INFO [STDOUT] [Server@15b5783]: [Thread[HSQLDB Server @15b5783,5,jboss]]: handleConnection() exited
10:47:29,204 INFO [STDOUT] [Server@15b5783]: [Thread[HSQLDB Connection @bdb859,5,HSQLDB Connections @15b5783]]: 0:trying to connect user SA
10:47:29,204 INFO [STDOUT] getConnection returning driver[className=org.hsqldb.jdbcDriver,org.hsqldb.jdbcDriver@200d0c]
10:47:29,204 INFO [STDOUT] [Server@15b5783]: 0:HSQLCLI:GETSESSIONATTR
10:47:29,204 INFO [STDOUT] [Server@15b5783]: 0:HSQLCLI:SETSESSIONATTR:AUTOCOMMIT false CONNECTION_READONLY null
10:47:29,298 INFO [STDOUT] [Server@15b5783]: 0:call "org.hsqldb.Library.getDatabaseProductName"()
10:47:29,345 INFO [STDOUT] [Server@15b5783]: 0:call "org.hsqldb.Library.getDatabaseMajorVersion"()
10:47:29,345 INFO [STDOUT] [Server@15b5783]: 0:call "org.hsqldb.Library.getDatabaseProductVersion"()
10:47:29,345 INFO [SettingsFactory] RDBMS: HSQL Database Engine, version: 1.7.2
10:47:29,345 INFO [SettingsFactory] JDBC driver: HSQL Database Engine Driver, version: 1.7.2
10:47:29,486 INFO [Dialect] Using dialect: org.hibernate.dialect.HSQLDialect
10:47:29,548 INFO [TransactionFactoryFactory] Using default transaction strategy (direct JDBC transactions)
10:47:29,564 INFO [TransactionManagerLookupFactory] No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
10:47:29,564 INFO [SettingsFactory] Automatic flush during beforeCompletion(): disabled
10:47:29,564 INFO [SettingsFactory] Automatic session close at end of transaction: disabled
10:47:29,564 INFO [SettingsFactory] JDBC batch size: 15
10:47:29,564 INFO [SettingsFactory] JDBC batch updates for versioned data: disabled
10:47:29,579 INFO [SettingsFactory] Scrollable result sets: enabled
10:47:29,579 INFO [SettingsFactory] JDBC3 getGeneratedKeys(): disabled
10:47:29,579 INFO [SettingsFactory] Connection release mode: null
10:47:29,579 INFO [SettingsFactory] Maximum outer join fetch depth: 2
10:47:29,579 INFO [SettingsFactory] Default batch fetch size: 1
10:47:29,579 INFO [SettingsFactory] Generate SQL with comments: disabled
10:47:29,579 INFO [SettingsFactory] Order SQL updates by primary key: disabled
10:47:29,579 INFO [SettingsFactory] Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
10:47:29,626 INFO [ASTQueryTranslatorFactory] Using ASTQueryTranslatorFactory
10:47:29,626 INFO [SettingsFactory] Query language substitutions: {}
10:47:29,626 INFO [SettingsFactory] Second-level cache: enabled
10:47:29,642 INFO [SettingsFactory] Query cache: disabled
10:47:29,642 INFO [SettingsFactory] Cache provider: org.hibernate.cache.EhCacheProvider
10:47:29,673 INFO [SettingsFactory] Optimize cache for minimal puts: disabled
10:47:29,673 INFO [SettingsFactory] Structured second-level cache entries: disabled
10:47:29,720 INFO [SettingsFactory] Echoing all SQL to stdout
10:47:29,720 INFO [SettingsFactory] Statistics: disabled
10:47:29,736 INFO [SettingsFactory] Deleted entity synthetic identifier rollback: disabled
10:47:29,736 INFO [SettingsFactory] Default entity-mode: pojo
10:47:30,423 INFO [SessionFactoryImpl] building session factory
10:47:30,485 WARN [Configurator] No configuration found. Configuring ehcache from ehcache-failsafe.xml found in the classpath: jar:file:/C:/Work/ClearCase/rrt8_v2_Jan2005/PhinLX/bin/jboss-4.0.1/server/mustang/tmp/deploy/tmp3763mustang-exp.war/WEB-INF/lib/ehcache-1.1.jar!/ehcache-failsafe.xml
10:47:36,828 INFO [SessionFactoryObjectFactory] Not binding factory to JNDI, no JNDI name configured
10:47:36,828 INFO [SessionFactoryImpl] Checking 0 named queries
10:47:50,654 INFO [STDOUT] [Server@15b5783]: 0:HSQLCLI:GETSESSIONATTR
10:47:50,670 INFO [STDOUT] Hibernate: select userprofil0_.USER_UID as USER1_, userprofil0_._MODIFY_ON as column2_1_, userprofil0_.USERID as USERID1_, userprofil0_.PASSWORD as PASSWORD1_, userprofil0_.USER_NAME_PREFIX as USER5_1_, userprofil0_.USER_FIRST_NAME as USER6_1_, userprofil0_.USER_MIDDLE_NAME as USER7_1_, userprofil0_.USER_LAST_NAME as USER8_1_, userprofil0_.USER_NAME_SUFFIX as USER9_1_, userprofil0_.USER_EMAIL_ADDRESS as USER10_1_, userprofil0_.USER_DISPLAY_NAME as USER11_1_, userprofil0_.RULES_OF_BEHAVIOR as RULES12_1_, userprofil0_.ROLE_UID as ROLE13_1_, userprofil0_._ACTIVE_FLAG as column14_1_, userprofil0_.PHONE_NUMBER as PHONE15_1_, userprofil0_.PHONE_AREA_CODE as PHONE16_1_, userprofil0_.PHONE_EXTENSION_NUMBER as PHONE17_1_, userprofil0_._SOURCE as column18_1_ from USER_PROFILE userprofil0_ where userprofil0_.USERID=?
10:47:50,685 INFO [STDOUT] [Server@15b5783]: 0:SQLCLI:SQLPREPARE select userprofil0_.USER_UID as USER1_, userprofil0_._MODIFY_ON as column2_1_, userprofil0_.USERID as USERID1_, userprofil0_.PASSWORD as PASSWORD1_, userprofil0_.USER_NAME_PREFIX as USER5_1_, userprofil0_.USER_FIRST_NAME as USER6_1_, userprofil0_.USER_MIDDLE_NAME as USER7_1_, userprofil0_.USER_LAST_NAME as USER8_1_, userprofil0_.USER_NAME_SUFFIX as USER9_1_, userprofil0_.USER_EMAIL_ADDRESS as USER10_1_, userprofil0_.USER_DISPLAY_NAME as USER11_1_, userprofil0_.RULES_OF_BEHAVIOR as RULES12_1_, userprofil0_.ROLE_UID as ROLE13_1_, userprofil0_._ACTIVE_FLAG as column14_1_, userprofil0_.PHONE_NUMBER as PHONE15_1_, userprofil0_.PHONE_AREA_CODE as PHONE16_1_, userprofil0_.PHONE_EXTENSION_NUMBER as PHONE17_1_, userprofil0_._SOURCE as column18_1_ from USER_PROFILE userprofil0_ where userprofil0_.USERID=?
10:47:50,842 INFO [STDOUT] [Server@15b5783]: 0:SQLCLI:SQLEXECUTE:1
10:47:50,967 INFO [STDOUT] [Server@15b5783]: 0:SQLCLI:SQLFREESTMT:1
10:47:51,076 INFO [STDOUT] [Server@15b5783]: 0:HSQLCLI:GETSESSIONATTR
10:47:51,076 INFO [CLogin] Authentication successful: my.app.domain.UserProfile@e3865e
10:47:51,560 INFO [STDOUT] [Server@15b5783]: 0:HSQLCLI:GETSESSIONATTR
10:47:51,560 INFO [STDOUT] Hibernate: select top ? this_.SHIPMENT_UID as SHIPMENT1_0_, this_._MODIFY_ON as column2_3_0_, this_.SHIPPER_NAME as SHIPPER3_3_0_, this_.INTERNAL_TRACKING_NUMBER as INTERNAL4_3_0_, this_.COURIER_NAME as COURIER5_3_0_, this_.SHIPPER_STREET_ADDRESS_LINE_1 as SHIPPER6_3_0_, this_.TRACKING_NUMBER as TRACKING7_3_0_, this_.SHIPPER_STREET_ADDRESS_LINE_2 as SHIPPER8_3_0_, this_.RECEIVED_DATE as RECEIVED9_3_0_, this_.SHIPPER_CITY_NAME as SHIPPER10_3_0_, this_.SHIPPER_ZIP_CODE as SHIPPER11_3_0_, this_._ACTIVE_FLAG as column12_3_0_, this_.SHIPMENT_DESCRIPTION as SHIPMENT13_3_0_, this_.SHIPPER_CONTACT_NAME as SHIPPER14_3_0_, this_.RECEIVED_BY as RECEIVED15_3_0_, this_.DEPARTURE_DATE as DEPARTURE16_3_0_, this_.SHIPPER_WORK_AREA_CODE as SHIPPER17_3_0_, this_.SHIPPER_WORK_PHONE_NUMBER as SHIPPER18_3_0_, this_.SHIPPER_WORK_EXTENSION_NUMBER as SHIPPER19_3_0_, this_.SHIPPER_FAX_AREA_CODE as SHIPPER20_3_0_, this_.SHIPPER_FAX_PHONE_NUMBER as SHIPPER21_3_0_, this_._SOURCE as column22_3_0_, this_.SHIPMENT_CONDITION_UID as SHIPMENT23_3_0_, this_.BIOSAFETY_LEVEL_UID as BIOSAFETY24_3_0_, this_.HANDLING_CODE_UID as HANDLING25_3_0_, this_.RISK_CODE_UID as RISK26_3_0_, this_.SHIPPER_STATE_UID as SHIPPER27_3_0_, this_.SUSPECT_AGENT_UID as SUSPECT28_3_0_, this_.EVENT_UID as EVENT29_3_0_, this_._MODIFIED_BY as column30_3_0_ from SHIPMENT this_ where this_._ACTIVE_FLAG=? order by this_._MODIFY_ON desc
10:47:51,560 INFO [STDOUT] [Server@15b5783]: 0:SQLCLI:SQLPREPARE select top ? this_.SHIPMENT_UID as SHIPMENT1_0_, this_._MODIFY_ON as column2_3_0_, this_.SHIPPER_NAME as SHIPPER3_3_0_, this_.INTERNAL_TRACKING_NUMBER as INTERNAL4_3_0_, this_.COURIER_NAME as COURIER5_3_0_, this_.SHIPPER_STREET_ADDRESS_LINE_1 as SHIPPER6_3_0_, this_.TRACKING_NUMBER as TRACKING7_3_0_, this_.SHIPPER_STREET_ADDRESS_LINE_2 as SHIPPER8_3_0_, this_.RECEIVED_DATE as RECEIVED9_3_0_, this_.SHIPPER_CITY_NAME as SHIPPER10_3_0_, this_.SHIPPER_ZIP_CODE as SHIPPER11_3_0_, this_._ACTIVE_FLAG as column12_3_0_, this_.SHIPMENT_DESCRIPTION as SHIPMENT13_3_0_, this_.SHIPPER_CONTACT_NAME as SHIPPER14_3_0_, this_.RECEIVED_BY as RECEIVED15_3_0_, this_.DEPARTURE_DATE as DEPARTURE16_3_0_, this_.SHIPPER_WORK_AREA_CODE as SHIPPER17_3_0_, this_.SHIPPER_WORK_PHONE_NUMBER as SHIPPER18_3_0_, this_.SHIPPER_WORK_EXTENSION_NUMBER as SHIPPER19_3_0_, this_.SHIPPER_FAX_AREA_CODE as SHIPPER20_3_0_, this_.SHIPPER_FAX_PHONE_NUMBER as SHIPPER21_3_0_, this_._SOURCE as column22_3_0_, this_.SHIPMENT_CONDITION_UID as SHIPMENT23_3_0_, this_.BIOSAFETY_LEVEL_UID as BIOSAFETY24_3_0_, this_.HANDLING_CODE_UID as HANDLING25_3_0_, this_.RISK_CODE_UID as RISK26_3_0_, this_.SHIPPER_STATE_UID as SHIPPER27_3_0_, this_.SUSPECT_AGENT_UID as SUSPECT28_3_0_, this_.EVENT_UID as EVENT29_3_0_, this_._MODIFIED_BY as column30_3_0_ from SHIPMENT this_ where this_._ACTIVE_FLAG=? order by this_._MODIFY_ON desc
10:47:51,576 INFO [STDOUT] [Server@15b5783]: 0:SQLCLI:SQLEXECUTE:2
10:47:51,623 INFO [STDOUT] [Server@15b5783]: 0:SQLCLI:SQLFREESTMT:2
10:47:51,638 INFO [STDOUT] [Server@15b5783]: 0:HSQLCLI:GETSESSIONATTR
10:47:51,638 INFO [InternalResourceViewResolver] Cached view 'landing'
10:47:51,685 INFO [Engine] StandardContext[/mustang] Velocity [info] ResourceManager : found /landing.vm with loader org.apache.velocity.tools.view.servlet.WebappLoader
10:47:51,685 INFO [Engine] StandardContext[/mustang] Velocity [info] ResourceManager : found header.vm with loader org.apache.velocity.tools.view.servlet.WebappLoader
10:47:51,717 INFO [Engine] StandardContext[/mustang] Velocity [info] ResourceManager : found banner.vm with loader org.apache.velocity.tools.view.servlet.WebappLoader
10:47:51,732 INFO [Engine] StandardContext[/mustang] Velocity [info] Velocimacro : added new VM : #consoletree( level label ) : source = leftnav.vm
10:47:51,857 INFO [Engine] StandardContext[/mustang] Velocity [info] ResourceManager : found leftnav.vm with loader org.apache.velocity.tools.view.servlet.WebappLoader
10:47:57,309 INFO [STDOUT] Hibernate: select rolelookup0_.ROLE_UID as ROLE1_0_, rolelookup0_._MODIFY_ON as column2_0_0_, rolelookup0_.ROLE_NAME as ROLE3_0_0_, rolelookup0_.ROLE_DESCRIPTION as ROLE4_0_0_, rolelookup0_._MODIFY_BY as column5_0_0_, rolelookup0_._ACTIVE_FLAG as column6_0_0_ from ROLE_LOOKUP rolelookup0_ where rolelookup0_.ROLE_UID=?
10:47:57,309 INFO [STDOUT] [Server@15b5783]: 0:SQLCLI:SQLPREPARE select rolelookup0_.ROLE_UID as ROLE1_0_, rolelookup0_._MODIFY_ON as column2_0_0_, rolelookup0_.ROLE_NAME as ROLE3_0_0_, rolelookup0_.ROLE_DESCRIPTION as ROLE4_0_0_, rolelookup0_._MODIFY_BY as column5_0_0_, rolelookup0_._ACTIVE_FLAG as column6_0_0_ from ROLE_LOOKUP rolelookup0_ where rolelookup0_.ROLE_UID=?
10:47:57,309 INFO [STDOUT] [Server@15b5783]: 0:SQLCLI:SQLEXECUTE:3
10:47:57,325 INFO [STDOUT] [Server@15b5783]: 0:SQLCLI:SQLFREESTMT:3
10:47:57,325 INFO [STDOUT] Hibernate: select this_.JOB_UID as JOB1_0_, this_._MODIFY_ON as column2_22_0_, this_.JOB_NAME as JOB3_22_0_, this_._MODIFIED_BY as column4_22_0_, this_.ASSIGNED_USER_UID as ASSIGNED5_22_0_ from JOB this_ where this_.ASSIGNED_USER_UID=?
10:47:57,341 INFO [STDOUT] [Server@15b5783]: 0:SQLCLI:SQLPREPARE select this_.JOB_UID as JOB1_0_, this_._MODIFY_ON as column2_22_0_, this_.JOB_NAME as JOB3_22_0_, this_._MODIFIED_BY as column4_22_0_, this_.ASSIGNED_USER_UID as ASSIGNED5_22_0_ from JOB this_ where this_.ASSIGNED_USER_UID=?
10:47:57,341 INFO [STDOUT] [Server@15b5783]: 0:SQLCLI:SQLEXECUTE:4
10:47:57,356 INFO [STDOUT] [Server@15b5783]: 0:SQLCLI:SQLFREESTMT:4
10:47:57,372 INFO [STDOUT] Hibernate: select samples0_.JOB_UID as JOB1_0_, samples0_._MODIFIED_BY as column2_0_, samples0_.SAMPLE_UID as SAMPLE3_0_, samples0_._MODIFY_ON as column4_0_, samples0_.JOB_SAMPLE_UID as JOB5_0_ from JOB_SAMPLE samples0_ where samples0_.JOB_UID=?
10:47:57,372 INFO [STDOUT] [Server@15b5783]: 0:SQLCLI:SQLPREPARE select samples0_.JOB_UID as JOB1_0_, samples0_._MODIFIED_BY as column2_0_, samples0_.SAMPLE_UID as SAMPLE3_0_, samples0_._MODIFY_ON as column4_0_, samples0_.JOB_SAMPLE_UID as JOB5_0_ from JOB_SAMPLE samples0_ where samples0_.JOB_UID=?
10:47:57,372 INFO [STDOUT] [Server@15b5783]: 0:SQLCLI:SQLEXECUTE:5
10:47:57,388 INFO [STDOUT] [Server@15b5783]: 0:SQLCLI:SQLFREESTMT:5
10:47:57,388 INFO [STDOUT] Hibernate: select samples0_.JOB_UID as JOB1_0_, samples0_._MODIFIED_BY as column2_0_, samples0_.SAMPLE_UID as SAMPLE3_0_, samples0_._MODIFY_ON as column4_0_, samples0_.JOB_SAMPLE_UID as JOB5_0_ from JOB_SAMPLE samples0_ where samples0_.JOB_UID=?
10:47:57,388 INFO [STDOUT] [Server@15b5783]: 0:SQLCLI:SQLPREPARE select samples0_.JOB_UID as JOB1_0_, samples0_._MODIFIED_BY as column2_0_, samples0_.SAMPLE_UID as SAMPLE3_0_, samples0_._MODIFY_ON as column4_0_, samples0_.JOB_SAMPLE_UID as JOB5_0_ from JOB_SAMPLE samples0_ where samples0_.JOB_UID=?
10:47:57,419 INFO [STDOUT] [Server@15b5783]: 0:SQLCLI:SQLEXECUTE:6
10:47:57,466 INFO [STDOUT] [Server@15b5783]: 0:SQLCLI:SQLFREESTMT:6
10:47:57,466 INFO [STDOUT] Hibernate: select samples0_.JOB_UID as JOB1_0_, samples0_._MODIFIED_BY as column2_0_, samples0_.SAMPLE_UID as SAMPLE3_0_, samples0_._MODIFY_ON as column4_0_, samples0_.JOB_SAMPLE_UID as JOB5_0_ from JOB_SAMPLE samples0_ where samples0_.JOB_UID=?
10:47:57,466 INFO [STDOUT] [Server@15b5783]: 0:SQLCLI:SQLPREPARE select samples0_.JOB_UID as JOB1_0_, samples0_._MODIFIED_BY as column2_0_, samples0_.SAMPLE_UID as SAMPLE3_0_, samples0_._MODIFY_ON as column4_0_, samples0_.JOB_SAMPLE_UID as JOB5_0_ from JOB_SAMPLE samples0_ where samples0_.JOB_UID=?
10:47:57,466 INFO [STDOUT] [Server@15b5783]: 0:SQLCLI:SQLEXECUTE:7
10:47:57,481 INFO [STDOUT] [Server@15b5783]: 0:SQLCLI:SQLFREESTMT:7
10:47:57,481 INFO [STDOUT] [Server@15b5783]: 0:HSQLCLI:GETSESSIONATTR
10:47:57,481 INFO [Engine] StandardContext[/mustang] Velocity [error] Left side ($jobPane.currentJob.jobUid) of '==' operation has null value. If a reference, it may not be in the context. Operation not possible. leftnav.vm [line 29, column 77]
10:47:57,481 INFO [Engine] StandardContext[/mustang] Velocity [error] Left side ($jobPane.currentJob.jobUid) of '==' operation has null value. If a reference, it may not be in the context. Operation not possible. leftnav.vm [line 29, column 77]
10:47:57,497 INFO [Engine] StandardContext[/mustang] Velocity [error] Left side ($jobPane.currentJob.jobUid) of '==' operation has null value. If a reference, it may not be in the context. Operation not possible. leftnav.vm [line 29, column 77]
10:48:00,856 INFO [STDOUT] Hibernate: select this_.JOB_UID as JOB1_0_, this_._MODIFY_ON as column2_22_0_, this_.JOB_NAME as JOB3_22_0_, this_._MODIFIED_BY as column4_22_0_, this_.ASSIGNED_USER_UID as ASSIGNED5_22_0_ from JOB this_ where this_.ASSIGNED_USER_UID=?
10:48:00,856 INFO [STDOUT] [Server@15b5783]: 0:SQLCLI:SQLPREPARE select this_.JOB_UID as JOB1_0_, this_._MODIFY_ON as column2_22_0_, this_.JOB_NAME as JOB3_22_0_, this_._MODIFIED_BY as column4_22_0_, this_.ASSIGNED_USER_UID as ASSIGNED5_22_0_ from JOB this_ where this_.ASSIGNED_USER_UID=?
10:48:00,856 INFO [STDOUT] [Server@15b5783]: 0:SQLCLI:SQLEXECUTE:8
10:48:00,871 INFO [STDOUT] [Server@15b5783]: 0:SQLCLI:SQLFREESTMT:8
10:48:00,871 INFO [STDOUT] [Server@15b5783]: 0:HSQLCLI:GETSESSIONATTR
10:48:02,199 INFO [STDOUT] Hibernate: select this_.JOB_UID as JOB1_0_, this_._MODIFY_ON as column2_22_0_, this_.JOB_NAME as JOB3_22_0_, this_._MODIFIED_BY as column4_22_0_, this_.ASSIGNED_USER_UID as ASSIGNED5_22_0_ from JOB this_ where this_.ASSIGNED_USER_UID=?
10:48:02,199 INFO [STDOUT] [Server@15b5783]: 0:SQLCLI:SQLPREPARE select this_.JOB_UID as JOB1_0_, this_._MODIFY_ON as column2_22_0_, this_.JOB_NAME as JOB3_22_0_, this_._MODIFIED_BY as column4_22_0_, this_.ASSIGNED_USER_UID as ASSIGNED5_22_0_ from JOB this_ where this_.ASSIGNED_USER_UID=?
10:48:02,215 INFO [STDOUT] [Server@15b5783]: 0:SQLCLI:SQLEXECUTE:9
10:48:02,215 INFO [STDOUT] [Server@15b5783]: 0:SQLCLI:SQLFREESTMT:9
10:48:02,215 INFO [STDOUT] [Server@15b5783]: 0:HSQLCLI:GETSESSIONATTR
10:48:03,230 INFO [STDOUT] Hibernate: select this_.JOB_UID as JOB1_0_, this_._MODIFY_ON as column2_22_0_, this_.JOB_NAME as JOB3_22_0_, this_._MODIFIED_BY as column4_22_0_, this_.ASSIGNED_USER_UID as ASSIGNED5_22_0_ from JOB this_ where this_.ASSIGNED_USER_UID=?
10:48:03,230 INFO [STDOUT] [Server@15b5783]: 0:SQLCLI:SQLPREPARE select this_.JOB_UID as JOB1_0_, this_._MODIFY_ON as column2_22_0_, this_.JOB_NAME as JOB3_22_0_, this_._MODIFIED_BY as column4_22_0_, this_.ASSIGNED_USER_UID as ASSIGNED5_22_0_ from JOB this_ where this_.ASSIGNED_USER_UID=?
10:48:03,230 INFO [STDOUT] [Server@15b5783]: 0:SQLCLI:SQLEXECUTE:10
10:48:03,246 INFO [STDOUT] [Server@15b5783]: 0:SQLCLI:SQLFREESTMT:10
10:48:03,246 INFO [STDOUT] [Server@15b5783]: 0:HSQLCLI:GETSESSIONATTR
10:48:03,309 INFO [Engine] StandardContext[/mustang] Velocity [info] ResourceManager : found footer.vm with loader org.apache.velocity.tools.view.servlet.WebappLoader
10:49:22,218 INFO [STDOUT] [Server@15b5783]: [Thread[HSQLDB Server @15b5783,5,jboss]]: handleConnection(Socket[addr=/127.0.0.1,port=2491,localport=9001]) entered
10:49:22,218 INFO [STDOUT] [Server@15b5783]: [Thread[HSQLDB Server @15b5783,5,jboss]]: handleConnection() exited
10:49:22,234 INFO [STDOUT] [Server@15b5783]: [Thread[HSQLDB Connection @1d2300e,5,HSQLDB Connections @15b5783]]: 1:trying to connect user SA
10:49:22,234 INFO [STDOUT] [Server@15b5783]: 1:HSQLCLI:SETSESSIONATTR:AUTOCOMMIT true CONNECTION_READONLY null
10:49:22,234 INFO [STDOUT] [Server@15b5783]: 1:SELECT * FROM SYSTEM_TYPEINFO
10:49:25,577 INFO [STDOUT] [Server@15b5783]: 1:HSQLCLI:GETSESSIONATTR
10:49:25,577 INFO [STDOUT] [Server@15b5783]: 1:select samples0_.JOB_UID as JOB1_0_, samples0_._MODIFIED_BY as column2_0_, samples0_.SAMPLE_UID as SAMPLE3_0_, samples0_._MODIFY_ON as column4_0_, samples0_.JOB_SAMPLE_UID as JOB5_0_ from JOB_SAMPLE samples0_ where samples0_.JOB_UID=0
10:50:21,116 INFO [STDOUT] [Server@15b5783]: 0:HSQLCLI:GETSESSIONATTR
10:50:21,116 INFO [STDOUT] Hibernate: select top ? this_.SHIPMENT_UID as SHIPMENT1_0_, this_._MODIFY_ON as column2_3_0_, this_.SHIPPER_NAME as SHIPPER3_3_0_, this_.INTERNAL_TRACKING_NUMBER as INTERNAL4_3_0_, this_.COURIER_NAME as COURIER5_3_0_, this_.SHIPPER_STREET_ADDRESS_LINE_1 as SHIPPER6_3_0_, this_.TRACKING_NUMBER as TRACKING7_3_0_, this_.SHIPPER_STREET_ADDRESS_LINE_2 as SHIPPER8_3_0_, this_.RECEIVED_DATE as RECEIVED9_3_0_, this_.SHIPPER_CITY_NAME as SHIPPER10_3_0_, this_.SHIPPER_ZIP_CODE as SHIPPER11_3_0_, this_._ACTIVE_FLAG as column12_3_0_, this_.SHIPMENT_DESCRIPTION as SHIPMENT13_3_0_, this_.SHIPPER_CONTACT_NAME as SHIPPER14_3_0_, this_.RECEIVED_BY as RECEIVED15_3_0_, this_.DEPARTURE_DATE as DEPARTURE16_3_0_, this_.SHIPPER_WORK_AREA_CODE as SHIPPER17_3_0_, this_.SHIPPER_WORK_PHONE_NUMBER as SHIPPER18_3_0_, this_.SHIPPER_WORK_EXTENSION_NUMBER as SHIPPER19_3_0_, this_.SHIPPER_FAX_AREA_CODE as SHIPPER20_3_0_, this_.SHIPPER_FAX_PHONE_NUMBER as SHIPPER21_3_0_, this_._SOURCE as column22_3_0_, this_.SHIPMENT_CONDITION_UID as SHIPMENT23_3_0_, this_.BIOSAFETY_LEVEL_UID as BIOSAFETY24_3_0_, this_.HANDLING_CODE_UID as HANDLING25_3_0_, this_.RISK_CODE_UID as RISK26_3_0_, this_.SHIPPER_STATE_UID as SHIPPER27_3_0_, this_.SUSPECT_AGENT_UID as SUSPECT28_3_0_, this_.EVENT_UID as EVENT29_3_0_, this_._MODIFIED_BY as column30_3_0_ from SHIPMENT this_ where this_._ACTIVE_FLAG=? order by this_._MODIFY_ON desc
10:50:21,116 INFO [STDOUT] [Server@15b5783]: 0:SQLCLI:SQLPREPARE select top ? this_.SHIPMENT_UID as SHIPMENT1_0_, this_._MODIFY_ON as column2_3_0_, this_.SHIPPER_NAME as SHIPPER3_3_0_, this_.INTERNAL_TRACKING_NUMBER as INTERNAL4_3_0_, this_.COURIER_NAME as COURIER5_3_0_, this_.SHIPPER_STREET_ADDRESS_LINE_1 as SHIPPER6_3_0_, this_.TRACKING_NUMBER as TRACKING7_3_0_, this_.SHIPPER_STREET_ADDRESS_LINE_2 as SHIPPER8_3_0_, this_.RECEIVED_DATE as RECEIVED9_3_0_, this_.SHIPPER_CITY_NAME as SHIPPER10_3_0_, this_.SHIPPER_ZIP_CODE as SHIPPER11_3_0_, this_._ACTIVE_FLAG as column12_3_0_, this_.SHIPMENT_DESCRIPTION as SHIPMENT13_3_0_, this_.SHIPPER_CONTACT_NAME as SHIPPER14_3_0_, this_.RECEIVED_BY as RECEIVED15_3_0_, this_.DEPARTURE_DATE as DEPARTURE16_3_0_, this_.SHIPPER_WORK_AREA_CODE as SHIPPER17_3_0_, this_.SHIPPER_WORK_PHONE_NUMBER as SHIPPER18_3_0_, this_.SHIPPER_WORK_EXTENSION_NUMBER as SHIPPER19_3_0_, this_.SHIPPER_FAX_AREA_CODE as SHIPPER20_3_0_, this_.SHIPPER_FAX_PHONE_NUMBER as SHIPPER21_3_0_, this_._SOURCE as column22_3_0_, this_.SHIPMENT_CONDITION_UID as SHIPMENT23_3_0_, this_.BIOSAFETY_LEVEL_UID as BIOSAFETY24_3_0_, this_.HANDLING_CODE_UID as HANDLING25_3_0_, this_.RISK_CODE_UID as RISK26_3_0_, this_.SHIPPER_STATE_UID as SHIPPER27_3_0_, this_.SUSPECT_AGENT_UID as SUSPECT28_3_0_, this_.EVENT_UID as EVENT29_3_0_, this_._MODIFIED_BY as column30_3_0_ from SHIPMENT this_ where this_._ACTIVE_FLAG=? order by this_._MODIFY_ON desc
10:50:21,131 INFO [STDOUT] [Server@15b5783]: 0:SQLCLI:SQLEXECUTE:11
10:50:21,147 INFO [STDOUT] [Server@15b5783]: 0:SQLCLI:SQLFREESTMT:11
10:50:21,147 INFO [STDOUT] [Server@15b5783]: 0:HSQLCLI:GETSESSIONATTR
10:50:21,194 INFO [Engine] StandardContext[/mustang] Velocity [info] ResourceManager : found /landing.vm with loader org.apache.velocity.tools.view.servlet.WebappLoader
10:50:21,194 INFO [Engine] StandardContext[/mustang] Velocity [info] ResourceManager : found header.vm with loader org.apache.velocity.tools.view.servlet.WebappLoader
10:50:21,209 INFO [Engine] StandardContext[/mustang] Velocity [info] ResourceManager : found banner.vm with loader org.apache.velocity.tools.view.servlet.WebappLoader
10:50:21,225 INFO [Engine] StandardContext[/mustang] Velocity [info] Velocimacro : added new VM : #consoletree( level label ) : source = leftnav.vm
10:50:21,319 INFO [Engine] StandardContext[/mustang] Velocity [info] ResourceManager : found leftnav.vm with loader org.apache.velocity.tools.view.servlet.WebappLoader
10:50:24,865 INFO [STDOUT] Hibernate: select this_.JOB_UID as JOB1_0_, this_._MODIFY_ON as column2_22_0_, this_.JOB_NAME as JOB3_22_0_, this_._MODIFIED_BY as column4_22_0_, this_.ASSIGNED_USER_UID as ASSIGNED5_22_0_ from JOB this_ where this_.ASSIGNED_USER_UID=?
10:50:24,881 INFO [STDOUT] [Server@15b5783]: 0:SQLCLI:SQLPREPARE select this_.JOB_UID as JOB1_0_, this_._MODIFY_ON as column2_22_0_, this_.JOB_NAME as JOB3_22_0_, this_._MODIFIED_BY as column4_22_0_, this_.ASSIGNED_USER_UID as ASSIGNED5_22_0_ from JOB this_ where this_.ASSIGNED_USER_UID=?
10:50:24,881 INFO [STDOUT] [Server@15b5783]: 0:SQLCLI:SQLEXECUTE:12
10:50:24,881 INFO [STDOUT] [Server@15b5783]: 0:SQLCLI:SQLFREESTMT:12
10:50:24,881 INFO [STDOUT] [Server@15b5783]: 0:HSQLCLI:GETSESSIONATTR
10:50:30,239 INFO [Engine] StandardContext[/mustang] Velocity [error] Method getSampleAdditionalIdentifiers threw exception for reference $jobPane in template leftnav.vm at [38,47]
10:50:30,239 INFO [Engine] StandardContext[/mustang] Velocity [error] VelocityViewServlet: Exception processing the template: org.apache.velocity.exception.MethodInvocationException: Invocation of method 'getSampleAdditionalIdentifiers' in class my.app.domain.Job threw exception class java.lang.NullPointerException : null

Code:

_________________
RT


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 07, 2005 5:34 pm 
Newbie

Joined: Thu May 26, 2005 1:04 pm
Posts: 13
finally figured it out the problem/issue was the DirectSetAccessor
access="my.app.dao.DirectSetAccessor" for the Lint/Association table/class properties . I removed it and it worked like a charm.

_________________
RT


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.