-->
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.  [ 7 posts ] 
Author Message
 Post subject: java.lang.NoClassDefFoundError: ISSUE (wrong name: com/lehma
PostPosted: Thu Jan 05, 2006 6:50 pm 
Newbie

Joined: Sun May 09, 2004 2:45 pm
Posts: 14
Hello all, I desperately need help resolving what looks to be a simple classpath issue. In our application, hibernate is dynamically loading a mapped class (com.lehman.tims.feeds.Issue) based on a query result. The 'com.lehman.tims.feeds.Issue' class is definitely in the system classpath ( see the code line //1. DEBUG INFO ), yet hibernate cannot load it. This leads me to think that hibernate is using some other classpath that I don't know about.

I've worked on this all day and simply don't know where to look to pull in this class. I've run this thing in ant (forked) and standalone and I am getting the same error. Has anyone come across this and can you offer some insight? Thanks in advance.


/tim



Hibernate version:
3



Mapping documents: (Issue.hbm.xml)
Code:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
    "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
    "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd" >
   
<hibernate-mapping>
<!--
    Created by the Middlegen Hibernate plugin 2.2

    http://boss.bekk.no/boss/middlegen/
    http://www.hibernate.org/
-->

<class
    name="com.lehman.tims.feeds.Issuer"
    table="ISSUER"
    lazy="false"
>

    <composite-id>
        <key-property
            name="mvUpdDate"
            column="mv_upd_date"
            type="java.lang.String"
            length="8"
        />
        <key-property
            name="cusip6"
            column="cusip6"
            type="java.lang.String"
            length="6"
        />
        <key-property
            name="state"
            column="state"
            type="java.lang.String"
            length="2"
        />
        <key-property
            name="moody"
            column="moody"
            type="java.lang.String"
            length="4"
        />
        <key-property
            name="sp"
            column="sp"
            type="java.lang.String"
            length="4"
        />
        <key-property
            name="fitch"
            column="fitch"
            type="java.lang.String"
            length="5"
        />
        <key-property
            name="desc1"
            column="desc1"
            type="java.lang.String"
            length="30"
        />
        <key-property
            name="desc2"
            column="desc2"
            type="java.lang.String"
            length="30"
        />
        <key-property
            name="desc3"
            column="desc3"
            type="java.lang.String"
            length="30"
        />
        <key-property
            name="lastUpdDate"
            column="last_upd_date"
            type="java.sql.Timestamp"
            length="23"
        />
    </composite-id>   


    <!-- Associations -->
    <!-- derived association(s) for compound key -->
    <!-- end of derived association(s) -->
 

</class>
</hibernate-mapping>




Code between sessionFactory.openSession() and session.close():
Code:
...
      // 1. DEBUG INFO
                Class url = null;
      try {
         url = ClassLoader.getSystemClassLoader().loadClass("com.lehman.tims.feeds.Issue");
      }
      catch(ClassNotFoundException e) {
         e.printStackTrace();
      }
      System.out.println( ">>> URL ["+url+"]" );
      System.out.println( ">>> URL ["+url.toString()+"]" );


      // 2.
      Session session = null;
      try {
         session = HibernateUtil.getSession();
      }
      catch( InfrastructureException e ) {
         e.printStackTrace();
      }
      
      
      Query query = session.createQuery( "from ISSUE where cusip='"+ cusip +"'" );
      query.list();
...




Full stack trace of any exception that occurs:
Quote:
$ ant compile-src runTibco
Buildfile: build.xml

compile-src:
[echo] COMPILING SRC...
[javac] Compiling 179 source files to C:\Documents and Settings\tiwashin\Projects\TIMs\build
[javac] 9 warnings

runTibco:
[java] Listening on: LEHMAN.MUNI.TIMS.TRUST.GETTRUSTS
[java] Listening on: LEHMAN.MUNI.TIMS.TRUST.GETTRUSTINFORMATION
[java] Listening on: LEHMAN.MUNI.TIMS.TRUST.GETLOOKUPINFO
[java] Listening on: LEHMAN.MUNI.TIMS.TRUST.GETTRUSTDEFAULTVALUES
[java] Listening on: LEHMAN.MUNI.TIMS.TRUST.BONDINFORMATION
[java] Listening on: LEHMAN.MUNI.TIMS.TRUST.SAVETRUSTINFORMATION
[java] Listening on: LEHMAN.MUNI.TIMS.TRUST.CALCULATION
[java] [Thu Jan 05 17:30:57 EST 2006: subject=LEHMAN.MUNI.TIMS.TRUST.BONDINFORMATION, reply=_IN
BOX.0A260616.D8443BD9E2130E5D68.1, message={ AsyncReplySubject="LB.FIA.ANALYSIS.DEV.RETURN.nyfitw100
9597.12345" BondCusipNumber="000369CL0" }]
[java] >>> URL [class com.lehman.tims.feeds.Issue]
[java] >>> URL [class com.lehman.tims.feeds.Issue]
[java] >>> query string [QueryImpl(from ISSUE where cusip='000369CL0')]
[java] java.lang.NoClassDefFoundError: ISSUE (wrong name: com/lehman/tims/feeds/Issue)
[java] at java.lang.ClassLoader.defineClass0(Native Method)
[java] at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
[java] at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
[java] at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
[java] at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
[java] at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
[java] at java.security.AccessController.doPrivileged(Native Method)
[java] at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
[java] at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
[java] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
[java] at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
[java] at org.hibernate.util.ReflectHelper.classForName(ReflectHelper.java:102)
[java] at org.hibernate.impl.SessionFactoryImpl.getImportedClassName(SessionFactoryImpl.jav
a:745)
[java] at org.hibernate.hql.QuerySplitter.getImportedClass(QuerySplitter.java:130)
[java] at org.hibernate.hql.QuerySplitter.concreteQueries(QuerySplitter.java:96)
[java] at org.hibernate.impl.SessionFactoryImpl.getQuery(SessionFactoryImpl.java:422)
[java] at org.hibernate.impl.SessionImpl.getQueries(SessionImpl.java:884)
[java] at org.hibernate.impl.SessionImpl.list(SessionImpl.java:834)
[java] at org.hibernate.impl.QueryImpl.list(QueryImpl.java:74)
[java] at com.lehman.tims.calculation.CalculationEngine.getBondIndicativeInformation(Unknow
n Source)
[java] at com.lehman.tims.tibco.dispatcher.BondInfoDispatcher.dispatch(Unknown Source)
[java] at com.lehman.tims.tibco.TibcoServer.onMsg(Unknown Source)
[java] at com.tibco.tibrv.TibrvEvent.invoke(TibrvEvent.java:160)
[java] at com.tibco.tibrv.TibrvImplQueueC.natDispatch(Native Method)
[java] at com.tibco.tibrv.TibrvImplQueueC.dispatch(TibrvImplQueueC.java:44)
[java] at com.tibco.tibrv.TibrvQueue.dispatch(TibrvQueue.java:301)
[java] at com.lehman.tims.tibco.TibcoServer.<init>(Unknown Source)
[java] at com.lehman.tims.tibco.TibcoServer.main(Unknown Source)



Name and version of the database you are using:
Sybase Adaptive Server Enterprise 12.5.2



The generated SQL (show_sql=true):
QueryImpl(from ISSUE where cusip='000369CL0')


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 05, 2006 6:53 pm 
Regular
Regular

Joined: Thu Sep 23, 2004 11:53 am
Posts: 83
interesting you say the class is here com.lehman.tims.feeds.Issue but your mapping says it is com.lehman.tims.feeds.Issuer


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 05, 2006 7:11 pm 
Expert
Expert

Joined: Thu Dec 23, 2004 9:08 pm
Posts: 2008
How is your mapping file loaded? Are you configuring the mapping path using a hibernate-configuration file, or programmatically? Hibernate relies on a configuration to know that it is suppose to map classes, and if you haven't set one up, then it won't be able to find any classes.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 06, 2006 11:54 am 
Newbie

Joined: Sun May 09, 2004 2:45 pm
Posts: 14
Oh geez, I posted the wrong .hbm.xml file. There is an ISSUE and ISSUER table, and therefore Issue and Issuer java and hbm.xml file.


/tim


Quote:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd" >

<hibernate-mapping>
<!--
Created by the Middlegen Hibernate plugin 2.2

http://boss.bekk.no/boss/middlegen/
http://www.hibernate.org/
-->

<class
name="com.lehman.tims.feeds.Issue"
table="ISSUE"
lazy="false"
>

<composite-id>
<key-property
name="mvUpdDate"
column="mv_upd_date"
type="java.lang.String"
length="8"
/>
<key-property
name="cusip"
column="cusip"
type="java.lang.String"
length="9"
/>
<key-property
name="cusip8"
column="cusip8"
type="java.lang.String"
length="8"
/>
<key-property
name="cusip6"
column="cusip6"
type="java.lang.String"
length="6"
/>
<key-property
name="origIssueAmt"
column="orig_issue_amt"
type="java.lang.String"
length="20"
/>
<key-property
name="maturityAmt"
column="maturity_amt"
type="java.lang.String"
length="20"
/>
<key-property
name="oustandingAmt"
column="oustanding_amt"
type="java.lang.String"
length="20"
/>
<key-property
name="issueKey"
column="issue_key"
type="java.lang.String"
length="7"
/>
<key-property
name="couponRate"
column="coupon_rate"
type="java.lang.String"
length="5"
/>
<key-property
name="maturityDate"
column="maturity_date"
type="java.lang.String"
length="8"
/>
<key-property
name="state"
column="state"
type="java.lang.String"
length="2"
/>
<key-property
name="bondInsurance"
column="bond_insurance"
type="java.lang.String"
length="5"
/>
<key-property
name="mortInsurance"
column="mort_insurance"
type="java.lang.String"
length="2"
/>
<key-property
name="secType"
column="sec_type"
type="java.lang.String"
length="1"
/>
<key-property
name="useOfProceeds"
column="use_of_proceeds"
type="java.lang.String"
length="2"
/>
<key-property
name="maturityDescCode"
column="maturity_desc_code"
type="java.lang.String"
length="2"
/>
<key-property
name="firstCouponDate"
column="first_coupon_date"
type="java.lang.String"
length="8"
/>
<key-property
name="origPrincipalAmt"
column="orig_principal_amt"
type="java.lang.String"
length="12"
/>
<key-property
name="offeringType"
column="offering_type"
type="java.lang.String"
length="1"
/>
<key-property
name="couponType"
column="coupon_type"
type="java.lang.String"
length="1"
/>
<key-property
name="origCusipStatus"
column="orig_cusip_status"
type="java.lang.String"
length="1"
/>
<key-property
name="bankQualified"
column="bank_qualified"
type="java.lang.String"
length="1"
/>
<key-property
name="taxStatus"
column="tax_status"
type="java.lang.String"
length="1"
/>
<key-property
name="bondForm"
column="bond_form"
type="java.lang.String"
length="1"
/>
<key-property
name="depositoryType"
column="depository_type"
type="java.lang.String"
length="1"
/>
<key-property
name="moodyConditionalCode"
column="moody_conditional_code"
type="java.lang.String"
length="1"
/>
<key-property
name="spProvisionalCode"
column="sp_provisional_code"
type="java.lang.String"
length="1"
/>
<key-property
name="redempBondnumAvail"
column="redemp_bondnum_avail"
type="java.lang.String"
length="1"
/>
<key-property
name="otherEnhCompany"
column="other_enh_company"
type="java.lang.String"
length="2"
/>
<key-property
name="origCusip"
column="orig_cusip"
type="java.lang.String"
length="9"
/>
<key-property
name="datedDate"
column="dated_date"
type="java.lang.String"
length="8"
/>
<key-property
name="saleDate"
column="sale_date"
type="java.lang.String"
length="8"
/>
<key-property
name="origPrc"
column="orig_prc"
type="java.lang.String"
length="6"
/>
<key-property
name="origYld"
column="orig_yld"
type="java.lang.String"
length="5"
/>
<key-property
name="interestPymtDay"
column="interest_pymt_day"
type="java.lang.String"
length="3"
/>
<key-property
name="moodyLongTerm"
column="moody_long_term"
type="java.lang.String"
length="4"
/>
<key-property
name="spLongTerm"
column="sp_long_term"
type="java.lang.String"
length="4"
/>
<key-property
name="moodyShortTerm"
column="moody_short_term"
type="java.lang.String"
length="5"
/>
<key-property
name="spShortTerm"
column="sp_short_term"
type="java.lang.String"
length="5"
/>
<key-property
name="intPymtMonth"
column="int_pymt_month"
type="java.lang.String"
length="2"
/>
<key-property
name="intPymtHoliday"
column="int_pymt_holiday"
type="java.lang.String"
length="1"
/>
<key-property
name="deliveryDate"
column="delivery_date"
type="java.lang.String"
length="8"
/>
<key-property
name="settlementDate"
column="settlement_date"
type="java.lang.String"
length="8"
/>
<key-property
name="settlementCode"
column="settlement_code"
type="java.lang.String"
length="1"
/>
<key-property
name="origCusipType"
column="orig_cusip_type"
type="java.lang.String"
length="2"
/>
<key-property
name="conversionDate"
column="conversion_date"
type="java.lang.String"
length="8"
/>
<key-property
name="intAccrualDate"
column="int_accrual_date"
type="java.lang.String"
length="8"
/>
<key-property
name="otherEnhType"
column="other_enh_type"
type="java.lang.String"
length="2"
/>
<key-property
name="fitchLongTerm"
column="fitch_long_term"
type="java.lang.String"
length="4"
/>
<key-property
name="fitchShortTerm"
column="fitch_short_term"
type="java.lang.String"
length="4"
/>
<key-property
name="fitchConditionalCode"
column="fitch_conditional_code"
type="java.lang.String"
length="1"
/>
<key-property
name="capitalType"
column="capital_type"
type="java.lang.String"
length="1"
/>
<key-property
name="locType"
column="loc_type"
type="java.lang.String"
length="3"
/>
<key-property
name="locBank"
column="loc_bank"
type="java.lang.String"
length="8"
/>
<key-property
name="locExpirationDate"
column="loc_expiration_date"
type="java.lang.String"
length="8"
/>
<key-property
name="sinkingFundType"
column="sinking_fund_type"
type="java.lang.String"
length="1"
/>
<key-property
name="mandatoryTenderPrc"
column="mandatory_tender_prc"
type="java.lang.String"
length="6"
/>
<key-property
name="defaultEvent"
column="default_event"
type="java.lang.String"
length="2"
/>
<key-property
name="defaultStatus"
column="default_status"
type="java.lang.String"
length="2"
/>
<key-property
name="description"
column="description"
type="java.lang.String"
length="50"
/>
<key-property
name="currentVariableRate"
column="current_variable_rate"
type="java.lang.String"
length="5"
/>
<key-property
name="initialVariableRate"
column="initial_variable_rate"
type="java.lang.String"
length="5"
/>
<key-property
name="variableRateFloor"
column="variable_rate_floor"
type="java.lang.String"
length="5"
/>
<key-property
name="variableRateCeiling"
column="variable_rate_ceiling"
type="java.lang.String"
length="5"
/>
<key-property
name="projectName"
column="project_name"
type="java.lang.String"
length="30"
/>
<key-property
name="seriesName"
column="series_name"
type="java.lang.String"
length="20"
/>
<key-property
name="denomAmt"
column="denom_amt"
type="java.lang.String"
length="9"
/>
<key-property
name="defaultDate"
column="default_date"
type="java.lang.String"
length="8"
/>
<key-property
name="defaultType"
column="default_type"
type="java.lang.String"
length="1"
/>
<key-property
name="mandatoryTenderType"
column="mandatory_tender_type"
type="java.lang.String"
length="1"
/>
<key-property
name="variableResetDate"
column="variable_reset_date"
type="java.lang.String"
length="8"
/>
<key-property
name="nextVariableResetDate"
column="next_variable_reset_date"
type="java.lang.String"
length="8"
/>
<key-property
name="resetFreqCode"
column="reset_freq_code"
type="java.lang.String"
length="1"
/>
<key-property
name="optionalPutDate"
column="optional_put_date"
type="java.lang.String"
length="8"
/>
<key-property
name="nextOptionalPutDate"
column="next_optional_put_date"
type="java.lang.String"
length="8"
/>
<key-property
name="mandatoryTenderDate"
column="mandatory_tender_date"
type="java.lang.String"
length="8"
/>
<key-property
name="nextMandatoryTenderDate"
column="next_mandatory_tender_date"
type="java.lang.String"
length="8"
/>
<key-property
name="optionalPutPrc"
column="optional_put_prc"
type="java.lang.String"
length="6"
/>
<key-property
name="optionalPutFreqCode"
column="optional_put_freq_code"
type="java.lang.String"
length="1"
/>
<key-property
name="optionalPutMinWindow"
column="optional_put_min_window"
type="java.lang.String"
length="3"
/>
<key-property
name="optionalPutMaxWindow"
column="optional_put_max_window"
type="java.lang.String"
length="3"
/>
<key-property
name="optionalPutType"
column="optional_put_type"
type="java.lang.String"
length="1"
/>
<key-property
name="mandatoryTenderFreqCode"
column="mandatory_tender_freq_code"
type="java.lang.String"
length="1"
/>
<key-property
name="mandatoryTenderMinWindow"
column="mandatory_tender_min_window"
type="java.lang.String"
length="3"
/>
<key-property
name="mandatoryTenderMaxWindow"
column="mandatory_tender_max_window"
type="java.lang.String"
length="3"
/>
<key-property
name="corpName"
column="corp_name"
type="java.lang.String"
length="62"
/>
<key-property
name="cdRomNum"
column="cd_rom_num"
type="java.lang.String"
length="8"
/>
<key-property
name="nextCallDate"
column="next_call_date"
type="java.lang.String"
length="8"
/>
<key-property
name="nextCallPrc"
column="next_call_prc"
type="java.lang.String"
length="6"
/>
<key-property
name="parCallDate"
column="par_call_date"
type="java.lang.String"
length="8"
/>
<key-property
name="parCallPrc"
column="par_call_prc"
type="java.lang.String"
length="6"
/>
<key-property
name="refundDate"
column="refund_date"
type="java.lang.String"
length="8"
/>
<key-property
name="refundPrc"
column="refund_prc"
type="java.lang.String"
length="6"
/>
<key-property
name="inWholeCallFreqCode"
column="in_whole_call_freq_code"
type="java.lang.String"
length="1"
/>
<key-property
name="interestPymtFreq"
column="interest_pymt_freq"
type="java.lang.String"
length="1"
/>
<key-property
name="interestCalcMethod"
column="interest_calc_method"
type="java.lang.String"
length="1"
/>
<key-property
name="redempType"
column="redemp_type"
type="java.lang.String"
length="1"
/>
<key-property
name="intPartCallFreqCode"
column="int_part_call_freq_code"
type="java.lang.String"
length="1"
/>
<key-property
name="escrowType"
column="escrow_type"
type="java.lang.String"
length="1"
/>
<key-property
name="munistatementsFicheNum"
column="munistatements_fiche_num"
type="java.lang.String"
length="5"
/>
<key-property
name="refundingDatedDate"
column="refunding_dated_date"
type="java.lang.String"
length="8"
/>
<key-property
name="redempCavFlag"
column="redemp_cav_flag"
type="java.lang.String"
length="1"
/>
<key-property
name="specOptionalRedempFlag"
column="spec_optional_redemp_flag"
type="java.lang.String"
length="2"
/>
<key-property
name="specMandatoryRedempFlag"
column="spec_mandatory_redemp_flag"
type="java.lang.String"
length="2"
/>
<key-property
name="extraordRedempFlag"
column="extraord_redemp_flag"
type="java.lang.String"
length="1"
/>
<key-property
name="sinkDefeasedFlag"
column="sink_defeased_flag"
type="java.lang.String"
length="1"
/>
<key-property
name="callsDefeasedFlag"
column="calls_defeased_flag"
type="java.lang.String"
length="1"
/>
<key-property
name="callsCavFlag"
column="calls_cav_flag"
type="java.lang.String"
length="1"
/>
<key-property
name="putFlag"
column="put_flag"
type="java.lang.String"
length="1"
/>
<key-property
name="redemptionFlag"
column="redemption_flag"
type="java.lang.String"
length="1"
/>
</composite-id>


<!-- Associations -->
<!-- derived association(s) for compound key -->
<!-- end of derived association(s) -->


</class>
</hibernate-mapping>


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 06, 2006 12:05 pm 
Newbie

Joined: Sun May 09, 2004 2:45 pm
Posts: 14
I'm configuring the mapping using a hibernate configuration file. The hbm.xml files are placed in the same directory as the class files. Those class file structure is under the buildgen directory and the class and hbm.xml files are in buildgen/com/lehman/tims/feeds. I put a snippet of my ant build file and the classpath that I'm using for this case. All the files are definitely there.

/tim


build.xml
Code:
...
   <path id="tims.classpath">
      
      <pathelement location="." />
      <pathelement location="build" />
      <pathelement location="buildgen" />
      <pathelement location="buildgen/com/lehman/tims/feeds" />
      
      
      <pathelement location="buildtest" />
      <pathelement location="lib" />

      <pathelement path="${java.class.path}"/>
      
      <fileset dir="lib/" >
         <include name="**/*.jar" />
      </fileset>
   </path>
...


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 06, 2006 2:35 pm 
Newbie

Joined: Sun May 09, 2004 2:45 pm
Posts: 14
I've actually gotten a little farther along. It turns out that an error was not being reported. First it was not finding the org.xml.sax.driver system property, so I included that. Now, in Configuration.buildSessionFactory(), it is calling javax.xml.parsers.SAXParserFactory.getSchema() and I get the following error:

Quote:
java.lang.NoSuchMethodError: javax.xml.parsers.SAXParserFactory.getSchema()Ljavax/xml/validation/Schema;


Now, I've done a bit of digging and there is no getSchema() method. I've tried javap and xerces ( 2.6.2 and 2.7.1 ) and none of these fix the problem. I've taken a look at Configuration.buildSessionFactory()(http://cvs.sourceforge.net/viewcvs.py/hibernate/Hibernate3/src/org/hibernate/cfg/Configuration.java?only_with_tag=HEAD&view=markup, and nowhere in the code is called.


Here's the Hibernate code in question:
Code:
...
   public SessionFactory buildSessionFactory() throws HibernateException {
      log.debug( "Preparing to build session factory with filters : " + filterDefinitions );
      secondPassCompile();
      validate();
      Environment.verifyProperties( properties );
      Properties copy = new Properties();
      copy.putAll( properties );
      PropertiesHelper.resolvePlaceHolders( copy );
      Settings settings = buildSettings( copy );

      return new SessionFactoryImpl(
            this,
            mapping,
            settings,
            getInitializedEventListeners()
         );
   }
...



And here's my code that's breaking:
Code:
   static {
      
      System.setProperty( "org.xml.sax.driver", "org.apache.xerces.parsers.SAXParser" );
      try {
         Configuration cfg = new Configuration();
         sessionFactory = cfg.configure().buildSessionFactory();
      }
      catch (Throwable ex) {
         ex.printStackTrace(System.out);
         throw new RuntimeException(ex);
      }
   }


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 10, 2006 5:16 pm 
Newbie

Joined: Sun May 09, 2004 2:45 pm
Posts: 14
I finally solved this problem by changing the case in my SQL code. When using the 'createQuery' method, you are selecting from the class, not the table. So in my case...


...this:
Query query = session.createQuery( "from ISSUE where CUSIP='206856AV8'" );

...became:
Query query = session.createQuery( "from Issue where cusip='206856AV8'" );


... now my code can cast the results to an Issue class.


/tim


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