-->
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.  [ 3 posts ] 
Author Message
 Post subject: reflection optimizer disabled
PostPosted: Fri Nov 07, 2003 9:18 am 
Beginner
Beginner

Joined: Mon Sep 01, 2003 10:52 am
Posts: 23
Location: UK
Folks

any help on why I get this following problem would be helpful.


13:06:16,170 INFO Environment:403 - Hibernate 2.0.3
13:06:16,270 INFO Environment:437 - loaded properties from resource hibernate.properties: {hibernate.connection.driver_class=com.ibm.as400.access.AS400JDBCDriver, hibernate.cglib.use_reflection_optimizer=true, hibernate.dialect=net.sf.hibernate.dialect.DB2Dialect, hibernate.connection.username=ISDVPR, hibernate.connection.url=jdbc:as400://TFSCAPE, hibernate.show_sql=true, hibernate.connection.password=WESTBROM , hibernate.statement_cache.size=6, hibernate.connection.pool_size=20}
13:06:16,300 INFO Environment:452 - using CGLIB reflection optimizer
13:06:16,300 INFO Environment:462 - JVM proxy support: true
13:06:16,380 INFO Configuration:283 - Mapping resource: uk/co/ltf/ltas/custinter/dao/ASVehicleCategory.hbm.xml
13:06:20,367 INFO Binder:178 - Mapping class: uk.co.ltf.ltas.custinter.dao.ASVehicleCategory -> LTRACOM.TKD0REP
13:06:21,909 INFO Configuration:283 - Mapping resource: uk/co/ltf/ltas/custinter/dao/ASFleetInformation.hbm.xml
13:06:22,370 INFO Binder:178 - Mapping class: uk.co.ltf.ltas.custinter.dao.ASFleetInformation -> LTRAPF.TKEEREP
13:06:22,520 INFO Configuration:283 - Mapping resource: uk/co/ltf/ltas/custinter/dao/Depot.hbm.xml
13:06:22,921 INFO Binder:178 - Mapping class: uk.co.ltf.ltas.custinter.dao.Depot -> LTRAPF.DEPMS01P
13:06:22,921 INFO Configuration:283 - Mapping resource: uk/co/ltf/ltas/custinter/dao/ASEquipType.hbm.xml
13:06:23,331 INFO Binder:178 - Mapping class: uk.co.ltf.ltas.custinter.dao.ASEquipType -> LTRACOM.TKE5REP
13:06:23,331 INFO Configuration:283 - Mapping resource: uk/co/ltf/ltas/custinter/dao/ASControlSection.hbm.xml
13:06:23,762 INFO Binder:178 - Mapping class: uk.co.ltf.ltas.custinter.dao.ASControlSection -> LTRAPF.TKDYREP
13:06:26,226 INFO Configuration:283 - Mapping resource: uk/co/ltf/ltas/custinter/dao/ASSLAMaster.hbm.xml
13:06:26,657 INFO Binder:178 - Mapping class: uk.co.ltf.ltas.custinter.dao.ASSLAMaster -> LTRAPF.TKEOCPL1
13:06:27,007 INFO Configuration:283 - Mapping resource: uk/co/ltf/ltas/custinter/dao/ASSLASummary.hbm.xml
13:06:27,478 INFO Binder:178 - Mapping class: uk.co.ltf.ltas.custinter.dao.ASSLASummary -> LTRAPF.TKERCPP
13:06:27,868 INFO Configuration:492 - processing one-to-many association mappings
13:06:27,868 INFO Configuration:503 - processing foreign key constraints
13:06:28,379 INFO SessionFactoryImpl:132 - building session factory
13:06:28,640 INFO Dialect:83 - Using dialect: net.sf.hibernate.dialect.DB2Dialect
13:06:28,720 INFO DriverManagerConnectionProvider:41 - Hibernate connection pool size: 20
13:06:28,980 INFO DriverManagerConnectionProvider:70 - using driver: com.ibm.as400.access.AS400JDBCDriver at URL: jdbc:as400://TFSCAPE
13:06:28,990 INFO DriverManagerConnectionProvider:71 - connection properties: {user=ISDVPR, password=WESTBROM }
13:06:29,040 INFO PreparedStatementCache:60 - prepared statement cache size: 6
13:06:29,040 INFO SessionFactoryImpl:162 - Use outer join fetching: true
13:07:13,271 INFO SessionFactoryImpl:185 - Use scrollable result sets: true
13:07:13,321 INFO SessionFactoryImpl:194 - echoing all SQL to stdout
13:07:16,786 INFO ReflectHelper:328 - reflection optimizer disabled for: uk.co.ltf.ltas.custinter.dao.ASFleetInformation, NullPointerException: null
13:07:24,388 INFO SessionFactoryObjectFactory:82 - no JDNI name configured
13:07:24,418 INFO SessionFactoryImpl:269 - Query language substitutions: {}

My hbm.xml is as follows
?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="uk.co.ltf.ltas.custinter.dao.ASFleetInformation" table="LTRAPF.TKEEREP">
<id name="equipmentNo" column="EECSCD">
<generator class="assigned" />
</id>
<!--<property name="opLocation" column="EESGC2" />-->

<many-to-one name ="asVehicleCategory" column="EESLC2" />

<many-to-one name="asControlSection" >

<!-- <column name="EEOZCD"/> uncomment later -->
<column name="EESEC2"/>
<column name="EESGC2"/>
<column name="EESCC2"/>
</many-to-one>

<property name="asVehicleReg" column="EETMC2" />
<many-to-one name ="asEquipType" column="EEVXC2" />
<many-to-one name ="asHomeWorkshop" column="EETQC2" />

</class>

</hibernate-mapping>
<!-- parsed in 0ms -->

and my java bean object is as follows

public class ASFleetInformation {

private String equipmentNo = null;
private String modelType = null;
private String opLocationDesc = null;
private String opLocation = null;
private ASVehicleCategory asVehicleCategory = null;
private String asVehicleCategoryCode =null;
private String superCustomerCode =null;
private String asStationCode =null;
private String asAllocationCode =null;
private String asControlSectionCode =null;
private ASControlSection asControlSection = null;
private String asVehicleReg = null;
private ASEquipType asEquipType = null;
private String asEquipTypeCode = null;
private Depot asHomeWorkshop = null;
private String asHomeWorkshopCode = null;


/**
* Returns the modelType.
* @return String
*/
public String getModelType() {
return modelType;
}

/**
* Returns the opLocation.
* @return String
*/
public String getOpLocation() {
return opLocation;
}

/**
* Returns the opLocationDesc.
* @return String
*/
public String getOpLocationDesc() {
return opLocationDesc;
}



/**
* Sets the modelType.
* @param modelType The modelType to set
*/
public void setModelType(String modelType) {
this.modelType = modelType;
}

/**
* Sets the opLocation.
* @param opLocation The opLocation to set
*/
public void setOpLocation(String opLocation) {
this.opLocation = opLocation;
}

/**
* Sets the opLocationDesc.
* @param opLocationDesc The opLocationDesc to set
*/
public void setOpLocationDesc(String opLocationDesc) {
this.opLocationDesc = opLocationDesc;
}

public void setEquipmentNo(String equipmentNo) {
this.equipmentNo = equipmentNo;
}

public String getEquipmentNo() {
return equipmentNo;
}

/**
* Returns the asVehicleCategory.
* @return ASVehicleCategory
*/
public ASVehicleCategory getAsVehicleCategory() {
return asVehicleCategory;
}

/**
* Sets the asVehicleCategory.
* @param asVehicleCategory The asVehicleCategory to set
*/
public void setAsVehicleCategory(ASVehicleCategory asVehicleCategory) {
this.asVehicleCategory = asVehicleCategory;
this.asVehicleCategoryCode = asVehicleCategory.getAsVehicleCategoryCode();
}

/**
* Returns the asControlSection.
* @return ASControlSection
*/
public ASControlSection getAsControlSection() {
return asControlSection;
}

/**
* Sets the asControlSection.
* @param asControlSection The asControlSection to set
*/
public void setAsControlSection(ASControlSection asControlSection) {
this.asControlSection = asControlSection;
this.asAllocationCode = asControlSection.getAscskey().getAsAllocationCode();
this.asStationCode =asControlSection.getAscskey().getAsStationCode();
this.asControlSectionCode=asControlSection.getAscskey().getAsControlSectionCode();

}

/**
* @return
*/
public String getAsVehicleReg() {
return asVehicleReg;
}

/**
* @param string
*/
public void setAsVehicleReg(String string) {
asVehicleReg = string;
}

/**
* @return
*/
public ASEquipType getAsEquipType() {
return asEquipType;
}

/**
* @param type
*/
public void setAsEquipType(ASEquipType type) {
asEquipType = type;
this.asEquipTypeCode = asEquipType.getAsEquipTypeCode();
}

/**
* @return
*/
public Depot getAsHomeWorkshop() {
return asHomeWorkshop;
}

/**
* @param depot
*/
public void setAsHomeWorkshop(Depot depot) {
asHomeWorkshop = depot;
this.asHomeWorkshopCode = asHomeWorkshop.getDepotCode();
}

/**
* @return
*/
public String getAsAllocationCode() {
return asAllocationCode;
}

/**
* @return
*/
public String getAsStationCode() {
return asStationCode;
}

/**
* @param string
*/
public void setAsAllocationCode(String string) {
asAllocationCode = string;
}

/**
* @param string
*/
public void setAsStationCode(String string) {
asStationCode = string;
}

/**
* @return
*/
public String getAsControlSectionCode() {
return asControlSectionCode;
}

/**
* @param string
*/
public void setAsControlSectionCode(String string) {
asControlSectionCode = string;
}

/**
* @return
*/
public String getAsVehicleCategoryCode() {
return asVehicleCategoryCode;
}

/**
* @param string
*/
public void setAsVehicleCategoryCode(String string) {
asVehicleCategoryCode = string;
}

/**
* @return
*/
public String getAsEquipTypeCode() {
return asEquipTypeCode;
}

/**
* @param string
*/
public void setAsEquipTypeCode(String string) {
asEquipTypeCode = string;
}

/**
* @return
*/
public String getAsHomeWorkshopCode() {
return asHomeWorkshopCode;
}

/**
* @param string
*/
public void setAsHomeWorkshopCode(String string) {
asHomeWorkshopCode = string;
}

/**
* @return
*/
public String getSuperCustomerCode() {
return superCustomerCode;
}

/**
* @param string
*/
public void setSuperCustomerCode(String string) {
superCustomerCode = string;
}

}


cheers in advance
Paul


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 07, 2003 10:15 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
http://www.hibernate.org/116.html#A9

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 07, 2003 12:49 pm 
CGLIB Developer
CGLIB Developer

Joined: Thu Aug 28, 2003 1:44 pm
Posts: 1217
Location: Vilnius, Lithuania
hibernate tests optimizer before to use it and dissables on exception. It is too paranoid, but safe. Problem is in setters:

public void setAsVehicleCategory(ASVehicleCategory asVehicleCategory) {
this.asVehicleCategory = asVehicleCategory;
this.asVehicleCategoryCode = asVehicleCategory.getAsVehicleCategoryCode();
}

this kind of code is OK, but it throws null pointer exeption in test.


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