-->
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.  [ 10 posts ] 
Author Message
 Post subject: Exception setting property value with CGLIB
PostPosted: Tue Aug 09, 2005 1:01 pm 
Newbie

Joined: Mon Aug 08, 2005 8:29 pm
Posts: 10
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version:
Hibernate 2.0.3
Hibenator 0.9.6

Mapping documents:
----------------------------------------------
Content of Jobpackage.hbm.xml file:
------------------------------------------------
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">

<hibernate-mapping>
<class name="com.boeing.tsas.castle.data.transferobjects.JobPackage" table="job_package">
<id name="packageId" column="PACKAGE_ID">
<!--<meta attribute="finder-method">findByJobsID</meta>-->
<generator class="increment"/>
</id>
<property name="jobPackageName" column="JOB_PACKAGE_NAME"/>
<property name="subject" column="SUBJECT"/>
<property name="archiveDate" column="ARCHIVE_DATE"/>
<property name="history" column="HISTORY"/>
<property name="revisionLevel" column="REVISION_LEVEL"/>
<property name="revisionNote" column="REVISION_NOTE"/>
<property name="saFolderId" column="SA_FOLDER_ID"/>
<property name="status" column="STATUS"/>
<property name="problemFrequency" column="PROBLEM_FREQUENCY"/>
<property name="sirp" column="SIRP"/>
<property name="initiatorBemsId" column="INITIATOR_BEMS_ID"/>
<property name="primaryComponent" column="PRIMARY_COMPONENT"/>
<property name="libraryLocationCode" column="LIBRARY_LOCATION_CODE"/>
<property name="publishedInd" column="PUBLISHED_IND" />
<property name="analysisDescriptionTextId" column="ANALYSIS_DESCRIPTION_TEXT_ID"/>
<property name="primaryDiscrepancyKeywordId" column="PRIMARY_DISCREPANCY_KEYWORD_ID"/>
<property name="ata" column="ATA" type="char"/>
<property name="chargeableInd" column="CHARGEABLE_IND"/>
<property name="problemTextId" column="PROBLEM_TEXT_ID"/>
<property name="libraryLocation" column="LIBRARY_LOCATION"/>
<property name="noteTextId" column="NOTE_TEXT_ID"/>
<property name="libraryBookVolumn" column="LIBRARY_BOOK_VOLUMN"/>
<property name="itarContentInd" column="ITAR_CONTENT_IND"/>
<property name="comrContentInd" column="COMR_CONTENT_IND"/>
<property name="earContentInd" column="EAR_CONTENT_IND"/>
<property name="modelId" column="MODEL_ID"/>
<property name="requestersDocument" column="REQUESTERS_DOCUMENT"/>
<property name="jobPackageType" column="JOB_PACKAGE_TYPE"/>
<property name="writeLockingBemsId" column="WRITE_LOCKING_BEMS_ID"/>
<property name="writeLockingDate" column="WRITE_LOCKING_DATE"/>
<property name="ownerBemsId" column="OWNER_BEMS_ID"/>

<!-- bi-directional one-to-many association to Jobs -->
<set name="jobs" inverse="true" cascade="all">
<key column="PACKAGE_ID"/>
<one-to-many class="com.boeing.tsas.castle.data.transferobjects.Jobs"/>
</set>

</class>

</hibernate-mapping>
<!-- parsed in 15ms -->
------------------------------------------------------------------------------
Content of Jobs.hbm.xml file
------------------------------------------
<hibernate-mapping>
<class name="com.boeing.tsas.castle.data.transferobjects.Jobs" table="job">
<id name="jobId" column="JOB_ID">
<generator class="increment">
</generator>
</id>

<!--<property name="packageId" column="PACKAGE_ID"/> -->
<property name="jobName" column="JOB_NAME"/>
<property name="timeDateOut" column="TIME_DATE_OUT"/>
<property name="jobDateDue" column="JOB_DATE_DUE"/>
<property name="jobDateIn" column="JOB_DATE_IN"/>
<property name="jobDateLoggedIn" column="JOB_DATE_LOGGED_IN"/>
<property name="jobExtendedDateDue" column="JOB_EXTENDED_DATE_DUE"/>
<property name="jobPriority" column="JOB_PRIORITY"/>
<property name="jobSpecificQuestion" column="JOB_SPECIFIC_QUESTION"/>
<property name="jobStatus" column="JOB_STATUS"/>
<property name="jobSubject" column="JOB_SUBJECT"/>
<property name="jobType" column="JOB_TYPE"/>
<property name="requester" column="REQUESTER"/>
<property name="requesterBemsId" column="REQUESTER_BEMS_ID"/>
<property name="dispSummary" column="DISP_SUMMARY"/>
<property name="assigneeBemsId" column="ASSIGNEE_BEMS_ID"/>
<property name="initiatorBemsId" column="INITIATOR_BEMS_ID"/>
<property name="noteTextId" column="NOTE_TEXT_ID"/>
<property name="approverNewInd" column="APPROVER_NEW_IND"/>
<property name="approverClearInd" column="APPROVER_CLEAR_IND"/>
<property name="initiatorNewInd" column="INITIATOR_NEW_IND"/>
<property name="initiatorClearInd" column="INITIATOR_CLEAR_IND"/>
<property name="assigneeNewInd" column="ASSIGNEE_NEW_IND" />
<property name="assigneeClearInd" column="ASSIGNEE_CLEAR_IND"/>
<property name="approverBemsId" column="APPROVER_BEMS_ID"/>


<many-to-one name="jobPackage"
class="com.boeing.tsas.castle.data.transferobjects.JobPackage">

<!-- Used by code generator -->
<!--<meta attribute="finder-method">findByPackageID</meta> -->

<!-- Used as a DDL hint -->
<column name="PACKAGE_ID" not-null="true" />
</many-to-one>

</class>

Code between sessionFactory.openSession() and session.close():
hibernateSession = HibernateSessionFactory.currentSession();
tx = hibernateSession.beginTransaction();

jobList = hibernateSession.find("from Job in class com.boeing.tsas.castle.data.transferobjects.Jobs");
System.out.println("xxxxxxxx Job List size():"+ jobList.size());

/*if (jobList.size() > 0) {

for (Iterator i = jobList.iterator(); i.hasNext() ; ) {
job = (Jobs) i.next();
System.out.println("Job name:" + job.getJobName());
}
tx.commit();
hibernateSession.save(jobList);
hibernateSession.close();
}*/
tx.commit();
hibernateSession.save(jobList);

Full stack trace of any exception that occurs:

*** Starting the server ***
************ Start Display Current Environment ************
WebSphere Platform 5.1 [BASE 5.1.0.3 cf30412.02] [JDK 1.4.1 b0344.02] running with process name localhost\localhost\server1 and process id 2932
Host Operating System is Windows XP, version 5.1
Java version = J2RE 1.4.1 IBM Windows 32 build cn1411-20031011 (JIT enabled: jitc), Java Compiler = jitc, Java VM name = Classic VM
was.install.root = C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.2\runtimes\base_v51
user.install.root = C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.2\runtimes\base_v51
Java Home = C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.2\runtimes\base_v51\java\jre
ws.ext.dirs = C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.2\runtimes\base_v51/java/lib;C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.2\runtimes\base_v51/classes;C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.2\runtimes\base_v51/classes;C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.2\runtimes\base_v51/lib;C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.2\runtimes\base_v51/lib/ext;C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.2\runtimes\base_v51/web/help;C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.2\runtimes\base_v51/deploytool/itp/plugins/com.ibm.etools.ejbdeploy/runtime;C:/Program Files/IBM/WebSphere Studio/Application Developer/v5.1.2/wstools/eclipse/plugins/com.ibm.etools.webservice_5.1.2/runtime/worf.jar
Classpath = C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.2\runtimes\base_v51/properties;C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.2\runtimes\base_v51/properties;C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.2\runtimes\base_v51/lib/bootstrap.jar;C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.2\runtimes\base_v51/lib/j2ee.jar;C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.2\runtimes\base_v51/lib/lmproxy.jar;C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.2\runtimes\base_v51/lib/urlprotocols.jar;C:\Castle\CastleLib\xml-apis.jar;C:\Castle\CastleLib\cglib-2.1.jar;C:\Castle\CastleLib\classes12.jar;C:\Castle\CastleLib\common.jar;C:\Castle\CastleLib\commons-collections-2.1.1.jar;C:\Castle\CastleLib\commons-lang.jar;C:\Castle\CastleLib\commons-logging-1.0.4.jar;C:\Castle\CastleLib\dom4j-1.6.jar;C:\Castle\CastleLib\hibernate2.jar;C:\Castle\CastleLib\hibernate3.jar;C:\Castle\CastleLib\hibernator.jar;C:\Castle\CastleLib\j2ee.jar;C:\Castle\CastleLib\jdbc2_0-stdext.jar;C:\Castle\CastleLib\log4j-1.2.9.jar;C:\Castle\CastleLib\odmg.jar;C:\Castle\CastleLib\ojdbc14.jar;C:\Castle\CastleLib\xerces-2.6.2.jar;C:\Castle\CastleLib\commons-beanutils.jar;C:\Castle\CastleLib\cglib-asm.jar;C:\Castle\AZNLib\xmlParserAPIs.jar;C:\Castle\AZNLib\activation.jar;C:\Castle\AZNLib\antlr.jar;C:\Castle\AZNLib\axis.jar;C:\Castle\AZNLib\axis-ant.jar;C:\Castle\AZNLib\aznaxisexampleclient.jar;C:\Castle\AZNLib\aznkeystore.jar;C:\Castle\AZNLib\aznkeystoreservlet.jar;C:\Castle\AZNLib\aznlog4jservlet.jar;C:\Castle\AZNLib\aznutil.jar;C:\Castle\AZNLib\commons-beanutils.jar;C:\Castle\AZNLib\commons-codec.jar;C:\Castle\AZNLib\commons-collections.jar;C:\Castle\AZNLib\commons-digester.jar;C:\Castle\AZNLib\commons-discovery.jar;C:\Castle\AZNLib\commons-fileupload.jar;C:\Castle\AZNLib\commons-httpclient.jar;C:\Castle\AZNLib\commons-lang.jar;C:\Castle\AZNLib\commons-logging.jar;C:\Castle\AZNLib\commons-logging-api.jar;C:\Castle\AZNLib\commons-validator.jar;C:\Castle\AZNLib\imap.jar;C:\Castle\AZNLib\jakarta-oro.jar;C:\Castle\AZNLib\jaxen-full.jar;C:\Castle\AZNLib\jaxrpc.jar;C:\Castle\AZNLib\jcert.jar;C:\Castle\AZNLib\jdbc2_0-stdext.jar;C:\Castle\AZNLib\jnet.jar;C:\Castle\AZNLib\jsse.jar;C:\Castle\AZNLib\jstl.jar;C:\Castle\AZNLib\log4j.jar;C:\Castle\AZNLib\mailapi.jar;C:\Castle\AZNLib\pop3.jar;C:\Castle\AZNLib\resolver.jar;C:\Castle\AZNLib\saaj.jar;C:\Castle\AZNLib\saxpath.jar;C:\Castle\AZNLib\smtp.jar;C:\Castle\AZNLib\soap.jar;C:\Castle\AZNLib\standard.jar;C:\Castle\AZNLib\struts.jar;C:\Castle\AZNLib\taglibs-application.jar;C:\Castle\AZNLib\taglibs-datetime.jar;C:\Castle\AZNLib\taglibs-log.jar;C:\Castle\AZNLib\taglibs-page.jar;C:\Castle\AZNLib\taglibs-request.jar;C:\Castle\AZNLib\taglibs-response.jar;C:\Castle\AZNLib\taglibs-session.jar;C:\Castle\AZNLib\taglibs-string.jar;C:\Castle\AZNLib\wsdl4j.jar;C:\Castle\AZNLib\xercesImpl.jar;C:\Castle\AZNLib\xercesSamples.jar;C:\Castle\AZNLib\xml-apis.jar;C:\Castle\Config;C:\Documents and Settings\gp304c\My Documents\IBM\wsappdev51\spring\workspace\castleEJB;C:\Documents and Settings\gp304c\My Documents\IBM\wsappdev51\spring\workspace\castleWeb\JavaSource;C:/Program Files/IBM/WebSphere Studio/Application Developer/v5.1.2/wstools/eclipse/plugins/com.ibm.etools.websphere.tools.common_5.1.1.1/runtime/wteServers.jar;C:/Program Files/IBM/WebSphere Studio/Application Developer/v5.1.2/wstools/eclipse/plugins/com.ibm.etools.websphere.tools.common_5.1.1.1/runtime/wasToolsCommon.jar
Java Library path = C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.2\runtimes\base_v51/bin;C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.2\runtimes\base_v51/java/bin;C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.2\runtimes\base_v51/java/jre/bin;C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.2\eclipse\jre\bin;.;C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.2\eclipse\jre\bin;C:\Oraclient920\bin;C:\Program Files\Oracle\jre\1.3.1\bin;C:\Program Files\Oracle\jre\1.1.8\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\GemPlus\GemSafe Libraries User\Bin;C:\Devtool\Ant\apache-ant-1.6.5\bin;
************* End Display Current Environment *************
[8/9/05 8:54:04:079 PDT] 3d04232b ManagerAdmin I TRAS0017I: The startup trace state is *=all=disabled.
[8/9/05 8:54:06:157 PDT] 3d04232b AdminInitiali A ADMN0015I: AdminService initialized
[8/9/05 8:54:07:891 PDT] 3d04232b Configuration A SECJ0215I: Successfully set JAAS login provider configuration class to com.ibm.ws.security.auth.login.Configuration.
[8/9/05 8:54:08:110 PDT] 3d04232b SecurityDM I SECJ0231I: The Security component's FFDC Diagnostic Module com.ibm.ws.security.core.SecurityDM registered successfully: true.
[8/9/05 8:54:08:625 PDT] 3d04232b SecurityCompo I SECJ0309I: Java 2 Security is disabled.
[8/9/05 8:54:08:641 PDT] 3d04232b SecurityCompo I SECJ0212I: WCCM JAAS configuration information successfully pushed to login provider class.
[8/9/05 8:54:08:672 PDT] 3d04232b SecurityCompo I SECJ0240I: Security service initialization completed successfully
[8/9/05 8:54:08:703 PDT] 3d04232b JMSRegistrati A MSGS0602I: WebSphere Embedded Messaging Client only has been installed
[8/9/05 8:54:29:343 PDT] 3d04232b CacheServiceI I DYNA0048I: WebSphere Dynamic Cache initialized successfully.
[8/9/05 8:54:32:061 PDT] 3d04232b JMXSoapAdapte A ADMC0013I: SOAP connector available at port 8880
[8/9/05 8:54:32:108 PDT] 3d04232b SecurityCompo I SECJ0243I: Security service started successfully
[8/9/05 8:54:32:108 PDT] 3d04232b SecurityCompo I SECJ0210I: Security enabled false
[8/9/05 8:54:33:983 PDT] 3d04232b ApplicationMg A WSVR0200I: Starting application: IBMUTC
[8/9/05 8:54:34:202 PDT] 3d04232b WebContainer A SRVE0161I: IBM WebSphere Application Server - Web Container. Copyright IBM Corp. 1998-2002
[8/9/05 8:54:34:233 PDT] 3d04232b WebContainer A SRVE0162I: Servlet Specification Level: 2.3
[8/9/05 8:54:34:296 PDT] 3d04232b WebContainer A SRVE0163I: Supported JSP Specification Level: 1.2
[8/9/05 8:54:34:483 PDT] 3d04232b WebContainer A SRVE0169I: Loading Web Module: IBM Universal Test Client.
[8/9/05 8:54:34:983 PDT] 3d04232b WebGroup I SRVE0180I: [IBM Universal Test Client] [/UTC] [Servlet.LOG]: JSP 1.2 Processor: init
[8/9/05 8:54:35:545 PDT] 3d04232b WebGroup I SRVE0180I: [IBM Universal Test Client] [/UTC] [Servlet.LOG]: SimpleFileServlet: init
[8/9/05 8:54:35:780 PDT] 3d04232b ApplicationMg A WSVR0221I: Application started: IBMUTC
[8/9/05 8:54:35:780 PDT] 3d04232b ApplicationMg A WSVR0200I: Starting application: castleEAR
[8/9/05 8:54:35:795 PDT] 3d04232b EJBContainerI I WSVR0207I: Preparing to start EJB jar: castleEJB.jar
[8/9/05 8:54:36:202 PDT] 3d04232b EJBContainerI I WSVR0037I: Starting EJB jar: castleEJB.jar
[8/9/05 8:54:36:952 PDT] 3d04232b WebContainer A SRVE0169I: Loading Web Module: castleWeb.
[8/9/05 8:54:37:124 PDT] 3d04232b WebGroup I SRVE0180I: [castleWeb] [/] [Servlet.LOG]: JSP 1.2 Processor: init
[8/9/05 8:54:37:170 PDT] 3d04232b WebGroup I SRVE0180I: [castleWeb] [/] [Servlet.LOG]: SimpleFileServlet: init
[8/9/05 8:54:37:186 PDT] 3d04232b WebGroup I SRVE0180I: [castleWeb] [/] [Servlet.LOG]: InvokerServlet: init
[8/9/05 8:54:37:202 PDT] 3d04232b ApplicationMg A WSVR0221I: Application started: castleEAR
[8/9/05 8:54:37:280 PDT] 3d04232b HttpTransport A SRVE0171I: Transport http is listening on port 9,080.
[8/9/05 8:54:39:717 PDT] 3d04232b HttpTransport A SRVE0171I: Transport https is listening on port 9,443.
[8/9/05 8:54:39:733 PDT] 3d04232b RMIConnectorC A ADMC0026I: RMI Connector available at port 2809
[8/9/05 8:54:39:889 PDT] 3d04232b WsServer A WSVR0001I: Server server1 open for e-business
[8/9/05 8:54:43:857 PDT] 7f49a329 WebGroup I SRVE0180I: [castleWeb] [/] [Servlet.LOG]: /LogonForm.jsp: init
[8/9/05 8:54:49:560 PDT] 7f49a329 WebGroup I SRVE0180I: [castleWeb] [/] [Servlet.LOG]: ControllerServlet: init
[8/9/05 8:54:49:810 PDT] 7f49a329 Environment I net.sf.hibernate.cfg.Environment Hibernate 2.0.3
[8/9/05 8:54:49:810 PDT] 7f49a329 Environment I net.sf.hibernate.cfg.Environment loaded properties from resource hibernate.properties: {hibernate.connection.username=castle, hibernate.connection.password=castle, hibernate.cglib.use_reflection_optimizer=true, hibernate.dialect=net.sf.hibernate.dialect.Oracle9Dialect, hibernate.connection.url=jdbc:oracle:thin:@gpas51.cs.boeing.com:1521:castled, hibernate.connection.driver_class=oracle.jdbc.pool.OracleConnectionPoolDataSource}
[8/9/05 8:54:49:826 PDT] 7f49a329 Environment I net.sf.hibernate.cfg.Environment using CGLIB reflection optimizer
[8/9/05 8:54:49:826 PDT] 7f49a329 Environment I net.sf.hibernate.cfg.Environment JVM proxy support: true
[8/9/05 8:54:49:826 PDT] 7f49a329 Configuration I net.sf.hibernate.cfg.Configuration Configuration resource: /hibernate.cfg.xml
[8/9/05 8:54:49:982 PDT] 7f49a329 Configuration I net.sf.hibernate.cfg.Configuration Mapping resource: com/boeing/tsas/castle/data/transferobjects/CastleUser.hbm.xml
[8/9/05 8:54:50:060 PDT] 7f49a329 Binder I net.sf.hibernate.cfg.Binder Mapping class: com.boeing.tsas.castle.data.transferobjects.CastleUser -> castle_user
[8/9/05 8:54:50:138 PDT] 7f49a329 Configuration I net.sf.hibernate.cfg.Configuration Mapping resource: com/boeing/tsas/castle/data/transferobjects/Jobs.hbm.xml
[8/9/05 8:54:50:154 PDT] 7f49a329 Binder I net.sf.hibernate.cfg.Binder Mapping class: com.boeing.tsas.castle.data.transferobjects.Jobs -> job
[8/9/05 8:54:50:201 PDT] 7f49a329 Configuration I net.sf.hibernate.cfg.Configuration Mapping resource: com/boeing/tsas/castle/data/transferobjects/JobPackage.hbm.xml
[8/9/05 8:54:50:263 PDT] 7f49a329 Binder I net.sf.hibernate.cfg.Binder Mapping class: com.boeing.tsas.castle.data.transferobjects.JobPackage -> job_package
[8/9/05 8:54:50:263 PDT] 7f49a329 Configuration I net.sf.hibernate.cfg.Configuration Configured SessionFactory: null
[8/9/05 8:54:50:263 PDT] 7f49a329 Configuration I net.sf.hibernate.cfg.Configuration processing one-to-many association mappings
[8/9/05 8:54:50:263 PDT] 7f49a329 Binder I net.sf.hibernate.cfg.Binder Mapping collection: com.boeing.tsas.castle.data.transferobjects.JobPackage.jobs -> job
[8/9/05 8:54:50:263 PDT] 7f49a329 Configuration I net.sf.hibernate.cfg.Configuration processing foreign key constraints
[8/9/05 8:54:50:404 PDT] 7f49a329 SessionFactor I net.sf.hibernate.impl.SessionFactoryImpl building session factory
[8/9/05 8:54:50:420 PDT] 7f49a329 Dialect I net.sf.hibernate.dialect.Dialect Using dialect: net.sf.hibernate.dialect.Oracle9Dialect
[8/9/05 8:54:50:420 PDT] 7f49a329 DriverManager I net.sf.hibernate.connection.DriverManagerConnectionProvider Hibernate connection pool size: 20
[8/9/05 8:54:50:451 PDT] 7f49a329 DriverManager I net.sf.hibernate.connection.DriverManagerConnectionProvider using driver: oracle.jdbc.driver.OracleDriver at URL: jdbc:oracle:thin:@gpas51.cs.boeing.com:1521:castled
[8/9/05 8:54:50:451 PDT] 7f49a329 DriverManager I net.sf.hibernate.connection.DriverManagerConnectionProvider connection properties: {user=castle, password=castle}
[8/9/05 8:54:50:451 PDT] 7f49a329 SessionFactor I net.sf.hibernate.impl.SessionFactoryImpl Use outer join fetching: true
[8/9/05 8:54:50:888 PDT] 7f49a329 SessionFactor I net.sf.hibernate.impl.SessionFactoryImpl Use scrollable result sets: true
[8/9/05 8:54:50:888 PDT] 7f49a329 SessionFactor I net.sf.hibernate.impl.SessionFactoryImpl JDBC 2 max batch size: 15
[8/9/05 8:54:51:623 PDT] 7f49a329 SessionFactor I net.sf.hibernate.impl.SessionFactoryObjectFactory no JDNI name configured
[8/9/05 8:54:51:623 PDT] 7f49a329 SessionFactor I net.sf.hibernate.impl.SessionFactoryImpl Query language substitutions: {}
[8/9/05 8:54:51:951 PDT] 7f49a329 SystemErr R JobsBean.getJob(): Exception creating sessionfactory: exception setting property value with CGLIB (set hibernate.cglib.use_reflection_optimizer=false for more info) setter of com.boeing.tsas.castle.data.transferobjects.JobPackage.?
[8/9/05 8:54:51:982 PDT] 7f49a329 SystemErr R Exception creating sessionfactory: No persister for: java.lang.Integer
[8/9/05 8:54:52:357 PDT] 7f49a329 WebGroup I SRVE0180I: [castleWeb] [/] [Servlet.LOG]: /MyWork.jsp: init
[8/9/05 8:54:52:779 PDT] 7f49a329 WebGroup I SRVE0180I: [castleWeb] [/] [Servlet.LOG]: /MyWorkHeader.jsp: init
[8/9/05 8:54:52:810 PDT] 3bd96329 WebGroup I SRVE0180I: [castleWeb] [/] [Servlet.LOG]: /MyWorkFrameset.jsp: init
[8/9/05 8:54:53:013 PDT] 7f49a329 WebGroup I SRVE0180I: [castleWeb] [/] [Servlet.LOG]: /MyWorkAlertBox.jsp: init
[8/9/05 8:54:53:107 PDT] 3bd96329 WebGroup I SRVE0180I: [castleWeb] [/] [Servlet.LOG]: /MyWorkHeader2.jsp: init
[8/9/05 8:54:53:201 PDT] 7f49a329 WebGroup I SRVE0180I: [castleWeb] [/] [Servlet.LOG]: /MyWorkWorkList.jsp: init
[8/9/05 8:54:54:810 PDT] 7f49a329 WebGroup E SRVE0026E: [Servlet Error]-[]: java.lang.NullPointerException
at org.apache.jsp._MyWorkWorkList._jspService(MyWorkWorkList.jsp :43)
at com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.service(HttpJspBase.java:89)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:344)
at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.serviceJspFile(JspServlet.java:669)
at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.service(JspServlet.java:767)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
at com.ibm.ws.webcontainer.servlet.ServicingServletState.service(StrictLifecycleServlet.java:333)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:983)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:564)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:200)
at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:119)
at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:276)
at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)
at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:182)
at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334)
at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)
at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:618)
at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:443)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:672)



Name and version of the database you are using:
Oracle 9.x

The generated SQL (show_sql=true):

None

Debug level Hibernate log excerpt:
All


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 09, 2005 1:11 pm 
Expert
Expert

Joined: Thu Dec 04, 2003 12:36 pm
Posts: 275
Location: Bielefeld, Germany
Please post your POJOs, especially the methods of your id packageId.

Best regards
Sven


Top
 Profile  
 
 Post subject: Exception setting property value with CGLIB
PostPosted: Tue Aug 09, 2005 2:18 pm 
Newbie

Joined: Mon Aug 08, 2005 8:29 pm
Posts: 10
Thanks for your prompt response.

Here is the pojos for both:
-------------------------------

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

public class JobPackage implements Serializable{

private Integer packageId;
private String jobPackageName;
private String subject;
private Date archiveDate;
private String history;
private int revisionLevel;
private String revisionNote;
private int saFolderId;
private String status;
private String problemFrequency;
private String sirp;
private int initiatorBemsId;
private String primaryComponent;
private String libraryLocationCode;
private int publishedInd;
private int analysisDescriptionTextId;
private int primaryDiscrepancyKeywordId;
private char ata;
private int chargeableInd;
private int problemTextId;
private String libraryLocation;
private int noteTextId;
private String libraryBookVolumn;
private int itarContentInd;
private int comrContentInd;
private int earContentInd;
private int modelId;
private String requestersDocument;
private String jobPackageType;
private int writeLockingBemsId;
private Date writeLockingDate;
private int ownerBemsId;

/** persistent field */
private Set jobs;

/** default constructor */
public JobPackage() {
}

/** minimal constructor */
public JobPackage(Set jobs) {
this.jobs = jobs;
}


/**
* @return
*/
public int getAnalysisDescriptionTextId() {
return analysisDescriptionTextId;
}

/**
* @return
*/
public Date getArchiveDate() {
return archiveDate;
}

/**
* @return
*/
public char getAta() {
return ata;
}

/**
* @return
*/
public int getChargeableInd() {
return chargeableInd;
}

/**
* @return
*/
public int getComrContentInd() {
return comrContentInd;
}

/**
* @return
*/
public int getEarContentInd() {
return earContentInd;
}

/**
* @return
*/
public String getHistory() {
return history;
}

/**
* @return
*/
public int getInitiatorBemsId() {
return initiatorBemsId;
}

/**
* @return
*/
public int getItarContentInd() {
return itarContentInd;
}

/**
* @return
*/
public String getJobPackageName() {
return jobPackageName;
}

/**
* @return
*/
public String getJobPackageType() {
return jobPackageType;
}

/**
* @return
*/
public String getLibraryBookVolumn() {
return libraryBookVolumn;
}

/**
* @return
*/
public String getLibraryLocation() {
return libraryLocation;
}

/**
* @return
*/
public String getLibraryLocationCode() {
return libraryLocationCode;
}

/**
* @return
*/
public int getModelId() {
return modelId;
}

/**
* @return
*/
public int getNoteTextId() {
return noteTextId;
}

/**
* @return
*/
public int getOwnerBemsId() {
return ownerBemsId;
}

/**
* @return
*/
public Integer getPackageId() {
return packageId;
}

/**
* @return
*/
public String getPrimaryComponent() {
return primaryComponent;
}

/**
* @return
*/
public int getPrimaryDiscrepancyKeywordId() {
return primaryDiscrepancyKeywordId;
}

/**
* @return
*/
public String getProblemFrequency() {
return problemFrequency;
}

/**
* @return
*/
public int getProblemTextId() {
return problemTextId;
}

/**
* @return
*/
public int getPublishedInd() {
return publishedInd;
}

/**
* @return
*/
public String getRequestersDocument() {
return requestersDocument;
}

/**
* @return
*/
public int getRevisionLevel() {
return revisionLevel;
}

/**
* @return
*/
public String getRevisionNote() {
return revisionNote;
}

/**
* @return
*/
public int getSaFolderId() {
return saFolderId;
}

/**
* @return
*/
public String getSirp() {
return sirp;
}

/**
* @return
*/
public String getStatus() {
return status;
}

/**
* @return
*/
public String getSubject() {
return subject;
}

/**
* @return
*/
public int getWriteLockingBemsId() {
return writeLockingBemsId;
}

/**
* @return
*/
public Date getWriteLockingDate() {
return writeLockingDate;
}

/**
* @param i
*/
public void setAnalysisDescriptionTextId(int i) {
this.analysisDescriptionTextId = i;
}

/**
* @param string
*/
public void setArchiveDate(Date dte) {
this.archiveDate = dte;
}

/**
* @param c
*/
public void setAta(char c) {
this.ata = c;
}

/**
* @param i
*/
public void setChargeableInd(int i) {
this.chargeableInd = i;
}

/**
* @param i
*/
public void setComrContentInd(int i) {
this.comrContentInd = i;
}

/**
* @param i
*/
public void setEarContentInd(int i) {
this.earContentInd = i;
}

/**
* @param string
*/
public void setHistory(String string) {
this.history = string;
}

/**
* @param i
*/
public void setInitiatorBemsId(int i) {
this.initiatorBemsId = i;
}

/**
* @param i
*/
public void setItarContentInd(int i) {
this.itarContentInd = i;
}

/**
* @param string
*/
public void setJobPackageName(String string) {
this.jobPackageName = string;
}

/**
* @param string
*/
public void setJobPackageType(String string) {
this.jobPackageType = string;
}

/**
* @param string
*/
public void setLibraryBookVolumn(String string) {
this.libraryBookVolumn = string;
}

/**
* @param string
*/
public void setLibraryLocation(String string) {
this.libraryLocation = string;
}

/**
* @param string
*/
public void setLibraryLocationCode(String string) {
this.libraryLocationCode = string;
}

/**
* @param i
*/
public void setModelId(int i) {
this.modelId = i;
}

/**
* @param i
*/
public void setNoteTextId(int i) {
this.noteTextId = i;
}

/**
* @param i
*/
public void setOwnerBemsId(int i) {
this.ownerBemsId = i;
}

/**
* @param i
*/
public void setPackageId(Integer i) {
this.packageId = i;
}

/**
* @param string
*/
public void setPrimaryComponent(String string) {
this.primaryComponent = string;
}

/**
* @param i
*/
public void setPrimaryDiscrepancyKeywordId(int i) {
this.primaryDiscrepancyKeywordId = i;
}

/**
* @param string
*/
public void setProblemFrequency(String string) {
this.problemFrequency = string;
}

/**
* @param i
*/
public void setProblemTextId(int i) {
this.problemTextId = i;
}

/**
* @param i
*/
public void setPublishedInd(int i) {
this.publishedInd = i;
}

/**
* @param string
*/
public void setRequestersDocument(String string) {
this.requestersDocument = string;
}

/**
* @param i
*/
public void setRevisionLevel(int i) {
this.revisionLevel = i;
}

/**
* @param string
*/
public void setRevisionNote(String string) {
this.revisionNote = string;
}

/**
* @param i
*/
public void setSaFolderId(int i) {
this.saFolderId = i;
}

/**
* @param string
*/
public void setSirp(String string) {
this.sirp = string;
}

/**
* @param string
*/
public void setStatus(String string) {
this.status = string;
}

/**
* @param string
*/
public void setSubject(String string) {
this.subject = string;
}

/**
* @param i
*/
public void setWriteLockingBemsId(int i) {
this.writeLockingBemsId = i;
}

/**
* @param string
*/
public void setWriteLockingDate(Date dte) {
this.writeLockingDate = dte;
}

/**
* @return
*/
public Set getJobs() {
return jobs;
}

/**
* @param set
*/
public void setJobs(Set set) {
this.jobs = set;
}

}
---------------------------------------------------------------------------------

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

public class Jobs implements Serializable{

private Integer jobId;
private Integer packageId;
private String jobName;
private Date timeDateOut;
private Date jobDateDue;
private Date jobDateIn;
private Date jobDateLoggedIn;
private Date jobExtendedDateDue;
private int jobPriority;
private String jobSpecificQuestion;
private String jobStatus;
private String jobSubject;
private String jobType;
private String requester;
private int requesterBemsId;
private String dispSummary;
private int assigneeBemsId;
private int assigneeClearInd;
private int assigneeNewInd;
private int initiatorBemsId;
private int initiatorClearInd;
private int initiatorNewInd;
private int noteTextId;
private int approverBemsId;
private int approverNewInd;
private int approverClearInd;

/** nullable persistent field */
private JobPackage jobPackage;

/** default constructor */
public Jobs() {
}

//full constructor
public Jobs(JobPackage jobPackage){
setJobPackage(jobPackage);
}


/**
* @return
*/
public int getApproverBemsId() {
return this.approverBemsId;
}

/**
* @return
*/
public int getApproverClearInd() {
return this.approverClearInd;
}

/**
* @return
*/
public int getApproverNewInd() {
return this.approverNewInd;
}

/**
* @return
*/
public int getAssigneeBemsId() {
return this.assigneeBemsId;
}

/**
* @return
*/
public int getAssigneeClearInd() {
return this.assigneeClearInd;
}

/**
* @return
*/
public int getAssigneeNewInd() {
return this.assigneeNewInd;
}

/**
* @return
*/
public String getDispSummary() {
return this.dispSummary;
}

/**
* @return
*/
public int getInitiatorBemsId() {
return this.initiatorBemsId;
}

/**
* @return
*/
public int getInitiatorClearInd() {
return this.initiatorClearInd;
}

/**
* @return
*/
public int getInitiatorNewInd() {
return this.initiatorNewInd;
}

/**
* @return
*/
public Date getJobDateDue() {
return this.jobDateDue;
}

/**
* @return
*/
public Date getJobDateIn() {
return this.jobDateIn;
}

/**
* @return
*/
public Date getJobDateLoggedIn() {
return this.jobDateLoggedIn;
}

/**
* @return
*/
public Date getJobExtendedDateDue() {
return this.jobExtendedDateDue;
}

/**
* @return
*/
public Integer getJobId() {
return this.jobId;
}

/**
* @return
*/
public String getJobName() {
return this.jobName;
}

/**
* @return
*/
public JobPackage getJobPackage() {
return this.jobPackage;
}

/**
* @return
*/
public int getJobPriority() {
return this.jobPriority;
}

/**
* @return
*/
public String getJobSpecificQuestion() {
return this.jobSpecificQuestion;
}

/**
* @return
*/
public String getJobStatus() {
return this.jobStatus;
}

/**
* @return
*/
public String getJobSubject() {
return this.jobSubject;
}

/**
* @return
*/
public String getJobType() {
return this.jobType;
}

/**
* @return
*/
public int getNoteTextId() {
return this.noteTextId;
}

/**
* @return
*/
public Integer getPackageId() {
return this.packageId;
}

/**
* @return
*/
public String getRequester() {
return this.requester;
}

/**
* @return
*/
public int getRequesterBemsId() {
return this.requesterBemsId;
}

/**
* @return
*/
public Date getTimeDateOut() {
return this.timeDateOut;
}

/**
* @param i
*/
public void setApproverBemsId(int i) {
this.approverBemsId = i;
}

/**
* @param i
*/
public void setApproverClearInd(int i) {
this.approverClearInd = i;
}

/**
* @param i
*/
public void setApproverNewInd(int i) {
this.approverNewInd = i;
}

/**
* @param i
*/
public void setAssigneeBemsId(int i) {
this.assigneeBemsId = i;
}

/**
* @param i
*/
public void setAssigneeClearInd(int i) {
this.assigneeClearInd = i;
}

/**
* @param i
*/
public void setAssigneeNewInd(int i) {
this.assigneeNewInd = i;
}

/**
* @param string
*/
public void setDispSummary(String string) {
this.dispSummary = string;
}

/**
* @param i
*/
public void setInitiatorBemsId(int i) {
this.initiatorBemsId = i;
}

/**
* @param i
*/
public void setInitiatorClearInd(int i) {
this.initiatorClearInd = i;
}

/**
* @param i
*/
public void setInitiatorNewInd(int i) {
this.initiatorNewInd = i;
}

/**
* @param date
*/
public void setJobDateDue(Date date) {
this.jobDateDue = date;
}

/**
* @param date
*/
public void setJobDateIn(Date date) {
this.jobDateIn = date;
}

/**
* @param date
*/
public void setJobDateLoggedIn(Date date) {
this.jobDateLoggedIn = date;
}

/**
* @param date
*/
public void setJobExtendedDateDue(Date date) {
this.jobExtendedDateDue = date;
}

/**
* @param i
*/
public void setJobId(Integer i) {
this.jobId = i;
}

/**
* @param string
*/
public void setJobName(String string) {
this.jobName = string;
}

/**
* @param package1
*/
public void setJobPackage(JobPackage package1) {
this.jobPackage = package1;
}

/**
* @param i
*/
public void setJobPriority(int i) {
this.jobPriority = i;
}

/**
* @param string
*/
public void setJobSpecificQuestion(String string) {
this.jobSpecificQuestion = string;
}

/**
* @param string
*/
public void setJobStatus(String string) {
this.jobStatus = string;
}

/**
* @param string
*/
public void setJobSubject(String string) {
this.jobSubject = string;
}

/**
* @param string
*/
public void setJobType(String string) {
this.jobType = string;
}

/**
* @param i
*/
public void setNoteTextId(int i) {
this.noteTextId = i;
}

/**
* @param i
*/
public void setPackageId(Integer i) {
this.packageId = i;
}

/**
* @param string
*/
public void setRequester(String string) {
this.requester = string;
}

/**
* @param i
*/
public void setRequesterBemsId(int i) {
this.requesterBemsId = i;
}

/**
* @param date
*/
public void setTimeDateOut(Date date) {
this.timeDateOut = date;
}

}

-----------------------------------------------------------------------
Result of show-sql=true in log: (Missing part in earlier post)
---------------------------------------------------------------------

Hibernate: select Job.JOB_ID as JOB_ID, Job.JOB_NAME as JOB_NAME, Job.TIME_DATE_OUT as TIME_DAT3_, Job.JOB_DATE_DUE as JOB_DATE4_, Job.JOB_DATE_IN as JOB_DATE5_, Job.JOB_DATE_LOGGED_IN as JOB_DATE6_, Job.JOB_EXTENDED_DATE_DUE as JOB_EXTE7_, Job.JOB_PRIORITY as JOB_PRIO8_, Job.JOB_SPECIFIC_QUESTION as JOB_SPEC9_, Job.JOB_STATUS as JOB_STATUS, Job.JOB_SUBJECT as JOB_SUB11_, Job.JOB_TYPE as JOB_TYPE, Job.REQUESTER as REQUESTER, Job.REQUESTER_BEMS_ID as REQUEST14_, Job.DISP_SUMMARY as DISP_SU15_, Job.ASSIGNEE_BEMS_ID as ASSIGNE16_, Job.INITIATOR_BEMS_ID as INITIAT17_, Job.NOTE_TEXT_ID as NOTE_TE18_, Job.APPROVER_NEW_IND as APPROVE19_, Job.APPROVER_CLEAR_IND as APPROVE20_, Job.INITIATOR_NEW_IND as INITIAT21_, Job.INITIATOR_CLEAR_IND as INITIAT22_, Job.ASSIGNEE_NEW_IND as ASSIGNE23_, Job.ASSIGNEE_CLEAR_IND as ASSIGNE24_, Job.APPROVER_BEMS_ID as APPROVE25_, Job.PACKAGE_ID as PACKAGE_ID from job Job

Hibernate: select jobpacka0_.PACKAGE_ID as PACKAGE_ID, jobpacka0_.JOB_PACKAGE_NAME as JOB_PACK2_, jobpacka0_.SUBJECT as SUBJECT, jobpacka0_.ARCHIVE_DATE as ARCHIVE_4_, jobpacka0_.HISTORY as HISTORY, jobpacka0_.REVISION_LEVEL as REVISION6_, jobpacka0_.REVISION_NOTE as REVISION7_, jobpacka0_.SA_FOLDER_ID as SA_FOLDE8_, jobpacka0_.STATUS as STATUS, jobpacka0_.PROBLEM_FREQUENCY as PROBLEM10_, jobpacka0_.SIRP as SIRP, jobpacka0_.INITIATOR_BEMS_ID as INITIAT12_, jobpacka0_.PRIMARY_COMPONENT as PRIMARY13_, jobpacka0_.LIBRARY_LOCATION_CODE as LIBRARY14_, jobpacka0_.PUBLISHED_IND as PUBLISH15_, jobpacka0_.ANALYSIS_DESCRIPTION_TEXT_ID as ANALYSI16_, jobpacka0_.PRIMARY_DISCREPANCY_KEYWORD_ID as PRIMARY17_, jobpacka0_.ATA as ATA, jobpacka0_.CHARGEABLE_IND as CHARGEA19_, jobpacka0_.PROBLEM_TEXT_ID as PROBLEM20_, jobpacka0_.LIBRARY_LOCATION as LIBRARY21_, jobpacka0_.NOTE_TEXT_ID as NOTE_TE22_, jobpacka0_.LIBRARY_BOOK_VOLUMN as LIBRARY23_, jobpacka0_.ITAR_CONTENT_IND as ITAR_CO24_, jobpacka0_.COMR_CONTENT_IND as COMR_CO25_, jobpacka0_.EAR_CONTENT_IND as EAR_CON26_, jobpacka0_.MODEL_ID as MODEL_ID, jobpacka0_.REQUESTERS_DOCUMENT as REQUEST28_, jobpacka0_.JOB_PACKAGE_TYPE as JOB_PAC29_, jobpacka0_.WRITE_LOCKING_BEMS_ID as WRITE_L30_, jobpacka0_.WRITE_LOCKING_DATE as WRITE_L31_, jobpacka0_.OWNER_BEMS_ID as OWNER_B32_ from job_package jobpacka0_ where jobpacka0_.PACKAGE_ID=?

Hibernate: select job0_.JOB_ID as JOB_ID__, job0_.JOB_ID as JOB_ID, job0_.JOB_NAME as JOB_NAME, job0_.TIME_DATE_OUT as TIME_DAT3_, job0_.JOB_DATE_DUE as JOB_DATE4_, job0_.JOB_DATE_IN as JOB_DATE5_, job0_.JOB_DATE_LOGGED_IN as JOB_DATE6_, job0_.JOB_EXTENDED_DATE_DUE as JOB_EXTE7_, job0_.JOB_PRIORITY as JOB_PRIO8_, job0_.JOB_SPECIFIC_QUESTION as JOB_SPEC9_, job0_.JOB_STATUS as JOB_STATUS, job0_.JOB_SUBJECT as JOB_SUB11_, job0_.JOB_TYPE as JOB_TYPE, job0_.REQUESTER as REQUESTER, job0_.REQUESTER_BEMS_ID as REQUEST14_, job0_.DISP_SUMMARY as DISP_SU15_, job0_.ASSIGNEE_BEMS_ID as ASSIGNE16_, job0_.INITIATOR_BEMS_ID as INITIAT17_, job0_.NOTE_TEXT_ID as NOTE_TE18_, job0_.APPROVER_NEW_IND as APPROVE19_, job0_.APPROVER_CLEAR_IND as APPROVE20_, job0_.INITIATOR_NEW_IND as INITIAT21_, job0_.INITIATOR_CLEAR_IND as INITIAT22_, job0_.ASSIGNEE_NEW_IND as ASSIGNE23_, job0_.ASSIGNEE_CLEAR_IND as ASSIGNE24_, job0_.APPROVER_BEMS_ID as APPROVE25_, job0_.PACKAGE_ID as PACKAGE_ID from job job0_ where job0_.PACKAGE_ID=?


Top
 Profile  
 
 Post subject: Exception setting property value with CGLIB
PostPosted: Wed Aug 10, 2005 5:28 pm 
Newbie

Joined: Mon Aug 08, 2005 8:29 pm
Posts: 10
This problem is solved by follwoing the steps below:

1. I changed the data type 'int' to Integer for all the fields my my POJOs.
2. Added the correct file which will catch the error for the perticular field.

Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 16, 2005 3:50 pm 
Newbie

Joined: Tue Aug 16, 2005 3:39 pm
Posts: 2
Why would Integer work and not int? I'm running to the same Exception
(Caused by: org.hibernate.PropertyAccessException: exception setting property value with CGLIB (set hibernate.cglib.use_reflection_optimizer=false for more info) setter of foo.bar.Config.setPercentage).

It's occurring for all properties in the Config class, as I comment out various mapped properties in the Config.hbm.xml file.

It's caused by an NullPointerException in PojoTuplizer (line 200 in Hibernate 3.0.5) where the BulkBean optmizier property is null for a runtime-compiled CGLIB-generated class in Config.

I've also seen Hibernate work fine with primitive types prior to this in separate projects.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 16, 2005 3:59 pm 
CGLIB Developer
CGLIB Developer

Joined: Thu Aug 28, 2003 1:44 pm
Posts: 1217
Location: Vilnius, Lithuania
Use wrapper objects for nullable fields, default type mapping implementation doe's not know how to convert null to integer value.


Top
 Profile  
 
 Post subject: What is a wrapper Object for nullable fields
PostPosted: Tue Feb 28, 2006 10:30 am 
Newbie

Joined: Tue Feb 28, 2006 10:13 am
Posts: 2
Could you explain what you mean with wrapper Object for nullable fields.

Please give me an example.


Top
 Profile  
 
 Post subject: What is a wrapper Object for nullable fields
PostPosted: Tue Feb 28, 2006 10:30 am 
Newbie

Joined: Tue Feb 28, 2006 10:13 am
Posts: 2
Could you explain what you mean with wrapper Object for nullable fields.

Please give me an example.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 27, 2006 12:16 pm 
Newbie

Joined: Mon Dec 05, 2005 8:13 am
Posts: 9
Primitive type: int
Wrapper type: java.lang.Integer

Integer can be null, while int can't.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 12, 2006 4:18 am 
Newbie

Joined: Fri Jul 15, 2005 4:21 am
Posts: 14
I think this is very interesting. If you run hbm2java on a mapping file looking like this

<property
name="thisisadouble"
column="thisisadouble"
type="double"
/>

<property
name="thisisaninteger"
column="thisisaninteger"
type="integer"
/>

the program will translate this into the following:

double thisisadouble;
Integer thisisaninteger;

Obviously this is flawed since you are now saying that double won't work on nullable fields, only Double. If this is the case, someone should update hbm2java with this behaviour ...

Kristoffer


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 10 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.