Hi,
I have a project with Hibernate all working with JDK1.4. I have heard we have to use JDK 1.3 now. I use JBuilder, and if I switch JDK from 1.4 to 1.3 in JBuilder, it compiles well, but it won't run.
I get this error message:
java.lang.ExceptionInInitializerError: java.lang.NullPointerException at java.util.HashMap.put(HashMap.java:327) at net.sf.hibernate.type.TypeFactory.<clinit>(TypeFactory.java:50)
at net.sf.hibernate.cfg.Binder.getTypeFromXML(Binder.java:909)
at net.sf.hibernate.cfg.Binder.bindSimpleValue(Binder.java:411)
at net.sf.hibernate.cfg.Binder.bindRootClass(Binder.java:265)
at net.sf.hibernate.cfg.Binder.bindRoot(Binder.java:1229)
at net.sf.hibernate.cfg.Configuration.add(Configuration.java:249)
at net.sf.hibernate.cfg.Configuration.addInputStream(Configuration.java:285)
at org.mercyships.msss.util.MsssEnvironment.init(MsssEnvironment.java:60)
at org.mercyships.msss.Main.main(Main.java:47)
Here is the log output:
Files\Infragistics\JSuite\jars\acl.jar;C:\Program Files\Infragistics\JSuite\jars\connectionpool.jar;C:\Program Files\Infragistics\JSuite\jars\jfcChart.jar;C:\Program Files\Infragistics\JSuite\jars\password.jar;C:\Program Files\Infragistics\JSuite\jars\pvAll.jar;C:\Program Files\Infragistics\JSuite\jars\pvAll10.jar;C:\Program Files\Infragistics\JSuite\jars\pvCombo.jar;C:\Program Files\Infragistics\JSuite\jars\pvDates.jar;C:\Program Files\Infragistics\JSuite\jars\pvEdits.jar;C:\Program Files\Infragistics\JSuite\jars\pvJDates.jar;C:\Program Files\Infragistics\JSuite\jars\pvJEdits.jar;C:\Program Files\Infragistics\JSuite\jars\pvJExplor.jar;C:\Program Files\Infragistics\JSuite\jars\pvJTable.jar;C:\Program Files\Infragistics\JSuite\jars\pvJTree.jar;C:\Program Files\Infragistics\JSuite\jars\pvTab.jar;C:\Program Files\Infragistics\JSuite\jars\pvTable.jar;C:\Program Files\Infragistics\JSuite\jars\pvTree.jar;C:\Program Files\Infragistics\JSuite\jars\pvxAll.jar;C:\Program Files\Infragistics\JSuite\jars\pvxCombo.jar;C:\Program Files\Infragistics\JSuite\jars\pvxDates.jar;C:\Program Files\Infragistics\JSuite\jars\pvxEdits.jar;C:\Program Files\Infragistics\JSuite\jars\pvxExplor.jar;C:\Program Files\Infragistics\JSuite\jars\pvxTable.jar;C:\Program Files\Infragistics\JSuite\jars\pvxTable118.jar;C:\Program Files\Infragistics\JSuite\jars\pvxTree.jar;C:\Program Files\Infragistics\JSuite\jars\runChart.jar;C:\Program org.mercyships.msss.Main
12:50:47,282 INFO XmlBeanDefinitionReader:103 - Loading XmlBeanFactory from resource [(no description]
12:50:47,372 DEBUG XmlBeanDefinitionReader:105 - Using JAXP implementation [org.apache.xerces.jaxp.DocumentBuilderFactoryImpl@3d93f4]
12:50:48,393 DEBUG BeansDtdResolver:34 - Trying to resolve XML entity with public ID [-//SPRING//DTD BEAN//EN] and system ID [http://www.springframework.org/dtd/spring-beans.dtd]
12:50:48,393 DEBUG BeansDtdResolver:40 - Trying to locate [spring-beans.dtd] under [org/springframework/beans/factory/xml/]
12:50:48,393 DEBUG BeansDtdResolver:43 - Found beans DTD [http://www.springframework.org/dtd/spring-beans.dtd] in class path
12:50:48,523 DEBUG DefaultXmlBeanDefinitionParser:112 - Loading bean definitions
12:50:48,554 DEBUG DefaultXmlBeanDefinitionParser:116 - Default lazy init 'false'
12:50:48,594 DEBUG DefaultXmlBeanDefinitionParser:118 - Default dependency check 'none'
12:50:48,594 DEBUG DefaultXmlBeanDefinitionParser:120 - Default autowire 'no'
12:50:48,864 DEBUG DefaultXmlBeanDefinitionParser:185 - Registering bean definition with id 'mainMenu'
12:50:48,984 DEBUG DefaultXmlBeanDefinitionParser:185 - Registering bean definition with id 'nameAddressEntry'
12:50:49,154 DEBUG DefaultXmlBeanDefinitionParser:185 - Registering bean definition with id 'nameAddressStart'
12:50:49,275 DEBUG DefaultXmlBeanDefinitionParser:185 - Registering bean definition with id 'nameAddressAdd'
12:50:49,365 DEBUG DefaultXmlBeanDefinitionParser:185 - Registering bean definition with id 'nameAddressProvider'
12:50:49,505 DEBUG DefaultXmlBeanDefinitionParser:185 - Registering bean definition with id 'gangwayRecording'
12:50:49,505 DEBUG DefaultXmlBeanDefinitionParser:185 - Registering bean definition with id 'gangwayStart'
12:50:49,515 DEBUG DefaultXmlBeanDefinitionParser:185 - Registering bean definition with id 'gangwayShow'
12:50:49,575 DEBUG DefaultXmlBeanDefinitionParser:185 - Registering bean definition with id 'gangwayProvider'
12:50:49,655 DEBUG DefaultXmlBeanDefinitionParser:185 - Registering bean definition with id 'applicationLiterals'
12:50:49,665 DEBUG DefaultXmlBeanDefinitionParser:185 - Registering bean definition with id 'msssEnvironment'
12:50:49,735 DEBUG DefaultXmlBeanDefinitionParser:185 - Registering bean definition with id 'ApplicationLiteralText'
12:50:49,785 DEBUG DefaultXmlBeanDefinitionParser:185 - Registering bean definition with id 'ApplicationLiteral'
12:50:49,785 DEBUG DefaultXmlBeanDefinitionParser:185 - Registering bean definition with id 'GangwayLog'
12:50:49,835 DEBUG DefaultXmlBeanDefinitionParser:185 - Registering bean definition with id 'PartnerSecurityCard'
12:50:49,865 DEBUG DefaultXmlBeanDefinitionParser:185 - Registering bean definition with id 'RecoveryLog'
12:50:49,885 DEBUG DefaultXmlBeanDefinitionParser:185 - Registering bean definition with id 'Schedule'
12:50:49,895 DEBUG DefaultXmlBeanDefinitionParser:185 - Registering bean definition with id 'SecurityCardTypeInfo'
12:50:49,895 DEBUG DefaultXmlBeanDefinitionParser:131 - Found 18 <bean> elements defining beans
12:50:49,895 INFO XmlBeanFactory:187 - Creating shared instance of singleton bean 'msssEnvironment'
12:50:49,946 DEBUG XmlBeanFactory:519 - Creating instance of bean 'msssEnvironment' with merged definition [Root bean definition with class [org.mercyships.msss.util.MsssEnvironment]]
12:50:50,056 DEBUG CachedIntrospectionResults:78 - Getting BeanInfo for class [org.mercyships.msss.util.MsssEnvironment]
12:50:50,076 DEBUG CachedIntrospectionResults:81 - Caching PropertyDescriptors for class [org.mercyships.msss.util.MsssEnvironment]
12:50:50,076 DEBUG CachedIntrospectionResults:86 - Found property 'dupCity' of type [int]; editor=[null]
12:50:50,076 DEBUG CachedIntrospectionResults:86 - Found property 'partnershipSession' of type [interface net.sf.hibernate.Session]; editor=[null]
12:50:50,076 DEBUG CachedIntrospectionResults:86 - Found property 'class' of type [class java.lang.Class]; editor=[null]
12:50:50,086 DEBUG CachedIntrospectionResults:86 - Found property 'factory' of type [interface org.springframework.beans.factory.BeanFactory]; editor=[null]
12:50:50,086 DEBUG CachedIntrospectionResults:86 - Found property 'utilitySession' of type [interface net.sf.hibernate.Session]; editor=[null]
12:50:50,086 DEBUG CachedIntrospectionResults:86 - Found property 'dupPostalCode' of type [int]; editor=[null]
12:50:50,086 DEBUG CachedIntrospectionResults:86 - Found property 'session' of type [interface net.sf.hibernate.Session]; editor=[null]
12:50:50,126 DEBUG CachedIntrospectionResults:86 - Found property 'dupFirstName' of type [int]; editor=[null]
12:50:50,126 DEBUG CachedIntrospectionResults:86 - Found property 'partnershipUtilitySession' of type [interface net.sf.hibernate.Session]; editor=[null]
12:50:50,126 DEBUG CachedIntrospectionResults:86 - Found property 'dupCountryCode' of type [int]; editor=[null]
12:50:50,146 DEBUG CachedIntrospectionResults:86 - Found property 'dupLastName' of type [int]; editor=[null]
12:50:50,146 DEBUG CachedIntrospectionResults:86 - Found property 'languageCode' of type [class java.lang.String]; editor=[null]
12:50:50,146 DEBUG CachedIntrospectionResults:91 - Caching MethodDescriptors for class [org.mercyships.msss.util.MsssEnvironment]
12:50:50,146 DEBUG CachedIntrospectionResults:96 - Found method 'getDupPostalCode' of type [int]
12:50:50,186 DEBUG CachedIntrospectionResults:96 - Found method 'getDupFirstName' of type [int]
12:50:50,186 DEBUG CachedIntrospectionResults:96 - Found method 'wait' of type [void]
12:50:50,186 DEBUG CachedIntrospectionResults:96 - Found method 'notifyAll' of type [void]
12:50:50,186 DEBUG CachedIntrospectionResults:96 - Found method 'getDupCity' of type [int]
12:50:50,186 DEBUG CachedIntrospectionResults:96 - Found method 'getDupLastName' of type [int]
12:50:50,186 DEBUG CachedIntrospectionResults:96 - Found method 'fixQuotes' of type [class java.lang.String]
12:50:50,196 DEBUG CachedIntrospectionResults:96 - Found method 'getUtilitySession' of type [interface net.sf.hibernate.Session]
12:50:50,196 DEBUG CachedIntrospectionResults:96 - Found method 'equals' of type [boolean]
12:50:50,196 DEBUG CachedIntrospectionResults:96 - Found method 'notify' of type [void]
12:50:50,196 DEBUG CachedIntrospectionResults:96 - Found method 'getFactory' of type [interface org.springframework.beans.factory.BeanFactory]
12:50:50,266 DEBUG CachedIntrospectionResults:96 - Found method 'getDupCountryCode' of type [int]
12:50:50,266 DEBUG CachedIntrospectionResults:96 - Found method 'printString' of type [class java.lang.String]
12:50:50,266 DEBUG CachedIntrospectionResults:96 - Found method 'wait' of type [void]
12:50:50,266 DEBUG CachedIntrospectionResults:96 - Found method 'close' of type [void]
12:50:50,266 DEBUG CachedIntrospectionResults:96 - Found method 'getLanguageCode' of type [class java.lang.String]
12:50:50,266 DEBUG CachedIntrospectionResults:96 - Found method 'wait' of type [void]
12:50:50,286 DEBUG CachedIntrospectionResults:96 - Found method 'getPartnershipSession' of type [interface net.sf.hibernate.Session]
12:50:50,286 DEBUG CachedIntrospectionResults:96 - Found method 'toString' of type [class java.lang.String]
12:50:50,286 DEBUG CachedIntrospectionResults:96 - Found method 'hashCode' of type [int]
12:50:50,286 DEBUG CachedIntrospectionResults:96 - Found method 'getSession' of type [interface net.sf.hibernate.Session]
12:50:50,296 DEBUG CachedIntrospectionResults:96 - Found method 'init' of type [void]
12:50:50,296 DEBUG CachedIntrospectionResults:96 - Found method 'setFactory' of type [void]
12:50:50,296 DEBUG CachedIntrospectionResults:96 - Found method 'getClass' of type [class java.lang.Class]
12:50:50,296 DEBUG CachedIntrospectionResults:96 - Found method 'getPartnershipUtilitySession' of type [interface net.sf.hibernate.Session]
12:50:50,506 DEBUG XmlBeanFactory:829 - Invoking BeanPostProcessors on bean with name 'msssEnvironment'
And here is my mapping file:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 2.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">
<hibernate-mapping>
<class name="org.mercyships.msss.db.ApplicationLiteralText" table="application_literal_text">
<id name="primaryId" type="java.lang.String" column="primary_id">
<generator class="uuid.hex"/>
</id>
<many-to-one name="applicationLiteral" class="org.mercyships.msss.db.ApplicationLiteral" cascade="none" column="literal_identifier"/>
<property name="languageCode" column="language_code" type="java.lang.String"/>
<property name="text" column="text" type="java.lang.String"/>
</class>
<class name="org.mercyships.msss.db.ApplicationLiteral" table="application_literals">
<id name="literalIdentifier" type="java.lang.String" column="literal_identifier">
<generator class="assigned"/>
</id>
<set
name="applicationLiteralTexts"
lazy="true"
inverse="true">
<key column="literal_identifier"/>
<one-to-many class="org.mercyships.msss.db.ApplicationLiteralText"/>
</set>
</class>
<class name="org.mercyships.msss.db.GangwayLog" table="gangway_log">
<id name="primaryId" type="java.lang.String" column="primary_id">
<generator class="uuid.hex"/>
</id>
<many-to-one name="partnerSecurityCard" class="org.mercyships.msss.db.PartnerSecurityCard" cascade="none" column="security_card_id"/>
<property name="gangwayTimestamp" column="gangway_timestamp" type="timestamp"/>
<property name="boarded" column="boarded" type="boolean"/>
</class>
<class name="org.mercyships.msss.db.PartnerSecurityCard" table="partner_security_cards">
<id name="securityCardId" type="integer" column="security_card_id">
<generator class="assigned"/>
</id>
<property name="partnerId" column="partner_id" type="java.lang.Integer"/>
<many-to-one name="securityCardTypeInfo" class="org.mercyships.msss.db.SecurityCardTypeInfo" cascade="none" column="security_card_type_code"/>
<property name="tourCode" column="tour_code" type="java.lang.String"/>
<property name="firstName" column="first_name" type="java.lang.String"/>
<property name="middleName" column="middle_name" type="java.lang.String"/>
<property name="lastName" column="last_name" type="java.lang.String"/>
<property name="issueDate" column="issue_date" type="date"/>
<property name="validDate" column="valid_date" type="date"/>
<property name="expirationDate" column="expiration_date" type="date"/>
<property name="invalidFlag" column="invalid_flag" type="boolean"/>
<property name="timesPrinted" column="times_printed" type="integer"/>
<property name="inCrewReport" column="in_crew_report" type="boolean"/>
<property name="photo" column="photo" type="java.sql.Blob"/>
<set
name="gangwayLogs"
lazy="true"
inverse="true">
<key column="security_card_id"/>
<one-to-many class="org.mercyships.msss.db.GangwayLog"/>
</set>
<set
name="schedules"
lazy="true"
inverse="true">
<key column="security_card_id"/>
<one-to-many class="org.mercyships.msss.db.Schedule"/>
</set>
</class>
<class name="org.mercyships.msss.db.RecoveryLog" table="recovery_log">
<id name="securityCardId" type="integer" column="security_card_id">
<generator class="assigned"/>
</id>
<property name="title" column="title" type="java.lang.String"/>
<property name="firstName" column="first_name" type="java.lang.String"/>
<property name="middleName" column="middle_name" type="java.lang.String"/>
<property name="lastName" column="last_name" type="java.lang.String"/>
<property name="gender" column="gender" type="java.lang.String"/>
<property name="address1" column="address_1" type="java.lang.String"/>
<property name="address2" column="address_2" type="java.lang.String"/>
<property name="address3" column="address_3" type="java.lang.String"/>
<property name="address4" column="address_4" type="java.lang.String"/>
<property name="city" column="city" type="java.lang.String"/>
<property name="state" column="state" type="java.lang.String"/>
<property name="postalCode" column="postal_code" type="java.lang.String"/>
<property name="countryName" column="country_name" type="java.lang.String"/>
<property name="phoneHome" column="phone_home" type="java.lang.String"/>
<property name="phoneWork" column="phone_work" type="java.lang.String"/>
<property name="phoneFax" column="phone_fax" type="java.lang.String"/>
<property name="emailAddress" column="email_address" type="java.lang.String"/>
</class>
<class name="org.mercyships.msss.db.Schedule" table="schedule">
<id name="primaryId" type="java.lang.String" column="primary_id">
<generator class="uuid.hex"/>
</id>
<many-to-one name="partnerSecurityCard" class="org.mercyships.msss.db.PartnerSecurityCard" cascade="none" column="security_card_id"/>
<property name="weekday" column="weekday" type="short"/>
<property name="startHour" column="start_hour" type="short"/>
<property name="endHour" column="end_hour" type="short"/>
</class>
<class name="org.mercyships.msss.db.SecurityCardTypeInfo" table="security_card_type_info">
<id name="securityCardTypeCode" type="java.lang.String" column="security_card_type_code">
<generator class="assigned"/>
</id>
<property name="description" column="description" type="java.lang.String"/>
<property name="scheduled" column="scheduled" type="boolean"/>
<property name="daysValid" column="days_valid" type="java.lang.Integer"/>
<property name="hoursAllowed" column="hours_allowed" type="java.lang.Integer"/>
<set
name="partnerSecurityCards"
lazy="true"
inverse="true">
<key column="security_card_type_code"/>
<one-to-many class="org.mercyships.msss.db.PartnerSecurityCard"/>
</set>
</class>
<class name="org.mercyships.msss.db.TourInfo" table="tour_info">
<id name="tourCode" type="java.lang.String" column="tour_code">
<generator class="assigned"/>
</id>
<property name="description" column="description" type="java.lang.String"/>
<property name="tourDate" column="tour_date" type="date"/>
<property name="tourTime" column="tour_time" type="time"/>
<property name="letterCode" column="letter_code" type="java.lang.String"/>
<property name="officeCode" column="office_code" type="java.lang.String"/>
</class>
</hibernate-mapping>
|