Hi All,
I am not sure if it is already reported.  Anyway,
if i have a bean with a field "int id" in my bean which is not
a primary key(i have another string field configured as a
primary key in <beanname>.jdo), OJB is taking int id 
as a primary field during enhancing. 

Note: I do not have this id field in PhaseActivityBean.jdo

It is causing nullPointerexception during updates.

public class PhaseActivityBean implements java.io.Serializable
{
        private String phaseActivity; // Primary Key
        private String description;
        // Causes npe with the following field declared in the bean
        //private int id;

        
        public PhaseActivityBean(  )
        {
        }

        public String getPhaseActivity(  )
        {
                return phaseActivity;
        }

        
        public void setPhaseActivity( String phaseActivity )
        {
                this.phaseActivity = phaseActivity;
        }

        
        public String getDescription(  )
        {
                return description;
        }

        
        public void setDescription( String description )
        {
                this.description = description;
        }
        
}


Thanks,
Vijay B

Reply via email to