-->
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.  [ 4 posts ] 
Author Message
 Post subject: joined-subclass error
PostPosted: Mon Dec 29, 2003 11:38 am 
Newbie

Joined: Mon Dec 29, 2003 11:30 am
Posts: 3
Hello,

I'm attempting to do a joined-suclass and I get the following error:
10:18:30,354 WARN [JDBCExceptionReporter] SQL Error: 923, SQLState: 42000
10:18:30,354 ERROR [JDBCExceptionReporter] ORA-00923: FROM keyword not found where expected


Here are snippets (whole hbm is too long) from my hbm:
<hibernate-mapping>
Code:
<class
    name="test.Person"
    table="PERSON">

    <id
        name="personId"
        type="java.lang.Long"
        column="PERSON_ID">
        <generator class="sequence">
           <param     name="sequence">PERSON_ID_SEQ</param>
        </generator>
    </id>
    <!-- long list of properties -->
    <joined-subclass
   name="test.User"
   table="USERS">      
       <key column="PERSON_ID"/>
    </joined-subclass>
</class>
</hibernate-mapping>


Here is the sql generated by hibernate:
select user0_.PERSON_ID as PERSON_ID, user0_.PASSWORD as PASSWORD24_, user0_.COMMENTS as COMMENTS24_, user0_.TRAINING_COMPLETION_DT as TRAINING4_24_, user0_.USERNAME as USERNAME24_, user0_.REMOTE ACCESS as REMOTE A6_24_, user0_.CONFIDENTIALITY_AGREEMENT as CONFIDEN7_24_, user0_.LOGGED_ON as LOGGED_ON24_, user0_.ACTIVE as ACTIVE24_, user0_.BUSINESS_HOURS_ONLY as BUSINES10_24_, user0__1_.PERSON_FIRST_NAME as PERSON_F2_23_, user0__1_.PERSON_LAST_NAME as PERSON_L3_23_, user0__1_.PERSON_MIDDLE_NAME as PERSON_M4_23_, user0__1_.PERSON_SALUTATION as PERSON_S5_23_, user0__1_.PHONE_NUM as PHONE_NUM23_, user0__1_.FAX_NUM as FAX_NUM23_, user0__1_.EMAIL_ADDRESS as EMAIL_AD8_23_, user0__1_.WEB_ADDRESS as WEB_ADDR9_23_, user0__1_.STREET_ADDRESS as STREET_10_23_, user0__1_.CITY as CITY23_, user0__1_.COUNTY as COUNTY23_, user0__1_.POSTAL_CODE as POSTAL_13_23_, user0__1_.STATE as STATE23_, user0__1_.PHONE_EXT as PHONE_EXT23_ from USERS user0_, PERSON user0__1_ where user0_.PERSON_ID=user0__1_.PERSON_ID and ((user0_.USERNAME=? ))

I'm at a loss, if anybody knows what I'm doing wrong, I'd greatly appreciate the help.

Mike R.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 29, 2003 12:00 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
http://www.hibernate.org/ForumMailinglists/HowToAskForHelp
You're not giving us the proper mapping according to your log, no code between session open and close etc...

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 14, 2006 9:12 am 
JBoss jBPM Developer
JBoss jBPM Developer

Joined: Thu Aug 28, 2003 11:56 am
Posts: 30
Location: Belgium
maybe this is the same problem as this jbpm user is having:

http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3971544#3971544

i'll ask that user to post more info here.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jun 01, 2007 10:55 am 
Newbie

Joined: Fri Aug 18, 2006 12:26 pm
Posts: 4
Nope, this person mapped a column of "REMOTE ACCESS" instead of "REMOTE_ACCESS" (note the space instead of underscore), which created an extra space in the SELECT statement, making it invalid.

Just a FYI in case anyone gets the same error and a search turns up this thread, which just happened to me :-)


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