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.  [ 13 posts ] 
Author Message
 Post subject: Troubles with querying and left join
PostPosted: Fri Jun 02, 2006 3:48 pm 
Newbie

Joined: Tue Mar 14, 2006 3:20 pm
Posts: 14
Hi,

Here is a problem I just cannot seem to figure out. Maybe it is my approach altogether, but let me explain...

I have essentially two tables:

Groups
Administrators

Groups looks like this:
id (PK) varchar
name varchar
...

Administrators looks like this:
group_id
user_id

(User ids come from our ldap server, so there is no users table)

Next, I have my objects:

Person (base class)
Administrator (extends Person)

Group (base class)
ManagedGroup (extends Group)

Person contains the following properties:
dn (String)

Administrator doesn't contain anything else for now.

Group contains the following properties:
id (String)
name (String)

ManagedGroup contains an additional property:
administrators (Set)

So, then I have a mapping for my administrators:

<class name="Person" entity-name="Administrator" table="administrators">
<id name="dn" column="user_id" type="java.lang.String"/>
</class>

And a mapping for my group:

<class abstract="true" name="Group">
<union-subclass name="ManagedGroup" table="groups">
<set name="administrators">
<key>
<column name="group_id"/>
</key>
<many-to-many column="user_id" entity-name="Administrator"/>
</set>
</union-subclass>
</class>

Now, I would like to query for all of my Groups and initialize the Administrators Set at the same time. If I turn off lazy-initialization, it works fine. The administrators are getting loaded correctly and all that good stuff. Of course, I don't want to leave that on, so I turn it off and try modifying my query so that the administrators are joined during the query. Unfortunately, I am receiving a ClassCastException when I try to do that.

Here is the code I am using for the query:

Transaction tx = session.beginTransaction();

String hql = "from ManagedGroup as group " +
"order by name";

Query query = session.createQuery(hql);
List resultList = query.list();
tx.commit();

return resultList;

When attempting my left join, the query looks like this:
String hql = "from ManagedGroup as group " +
"left join fetch group.administrators " +
"order by name";

Here is the actual stacktrace of the error message:
java.lang.ClassCastException
at org.hibernate.hql.ast.HqlSqlWalker.resolve(HqlSqlWalker.java:458)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.propertyRef(HqlSqlBaseWalker.java:1829)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.propertyRefLhs(HqlSqlBaseWalker.java:4416)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.propertyRef(HqlSqlBaseWalker.java:1798)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.joinElement(HqlSqlBaseWalker.java:2970)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.fromElement(HqlSqlBaseWalker.java:2841)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.fromElementList(HqlSqlBaseWalker.java:2719)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.fromClause(HqlSqlBaseWalker.java:513)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.query(HqlSqlBaseWalker.java:371)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.selectStatement(HqlSqlBaseWalker.java:201)
at org.hibernate.hql.antlr.HqlSqlBaseWalker.statement(HqlSqlBaseWalker.java:151)
at org.hibernate.hql.ast.QueryTranslatorImpl.analyze(QueryTranslatorImpl.java:189)
at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:130)
at org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:83)
at org.hibernate.impl.SessionFactoryImpl.getQuery(SessionFactoryImpl.java:427)
at org.hibernate.impl.SessionImpl.getQueries(SessionImpl.java:884)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:834)
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:74)
at com.spx.groupbuilder.data.SpringGroupDAO.getGroups(SpringGroupDAO.java:187)
at com.spx.groupbuilder.tests.LocalTest.main(LocalTest.java:26)

Can someone let me know what I'm doing wrong. I have wasted 2 days so far on this and it is probably something easy!

Thanks for an replies,
Eric


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jun 02, 2006 5:10 pm 
Expert
Expert

Joined: Thu Sep 22, 2005 10:29 am
Posts: 285
Location: Almassera/Valencia/Spain/EU/Earth/Solar system/Milky Way/Local Group/Virgo Supercluster
You would need these tables:
ADMIN, GROUP and ADMIN_GROUP (this is a join table for the many-to-many association).

But you only have:
GROUP table (you called it Groups)
and ADMIN_GROUP table (you called it Administrators, really a bad name).

=================================

With your tables you can only have a one-to-many association.
Code:
    <set name="administrators">
        <key column="group_id" not-null="true"/>
        <one-to-many class="Administrator"/>
    </set>


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jun 02, 2006 8:17 pm 
Newbie

Joined: Tue Mar 14, 2006 3:20 pm
Posts: 14
Yeah, I've actually tried using the one-to-many as well and that didn't work either. It seems like something about the 'left join fetch' part that is causing the problem.

As far as the table names... I know they are bad... I just simplified them so my sample would be easier to follow.

Any other help would be appreciated.

Thanks,
Eric


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jun 03, 2006 3:59 pm 
Expert
Expert

Joined: Thu Sep 22, 2005 10:29 am
Posts: 285
Location: Almassera/Valencia/Spain/EU/Earth/Solar system/Milky Way/Local Group/Virgo Supercluster
post ManagedGroup POJO


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jun 03, 2006 9:34 pm 
Newbie

Joined: Tue Mar 14, 2006 3:20 pm
Posts: 14
Here is the Group POJO:

Code:
public abstract class Group
{
    private String id;
    private String name;
    private String relationshipOwner;
    private String ldapQuery;
    private String configName;
   
    public String getId()
    {
        return id;
    }
    public String getLdapQuery()
    {
        return ldapQuery;
    }
    public String getName()
    {
        return name;
    }
    public String getRelationshipOwner()
    {
        return relationshipOwner;
    }
    public void setId(String id)
    {
        this.id = id;
    }
    public void setLdapQuery(String ldapQuery)
    {
        this.ldapQuery = ldapQuery;
    }
    public void setName(String name)
    {
        this.name = name;
    }
    public void setRelationshipOwner(String relationshipOwner)
    {
        this.relationshipOwner = relationshipOwner;
    }
    public String getConfigName()
    {
        return configName;
    }
    public void setConfigName(String configName)
    {
        this.configName = configName;
    }
   
    public String toString()
    {
        StringBuffer buf = new StringBuffer();
        buf.append("Group id: " + this.getId() + System.getProperty("line.separator"));
        buf.append("Group name: " + this.getName() + System.getProperty("line.separator"));
        buf.append("Group config name: " + this.getConfigName() + System.getProperty("line.separator"));
        buf.append("Group ldap query: " + this.getLdapQuery() + System.getProperty("line.separator"));
        buf.append("Group relationship owner: " + this.getRelationshipOwner() + System.getProperty("line.separator"));
       
        return buf.toString();
    }
   
}



And then ManagedGroup POJO which extends Group:

Code:
import java.util.Set;

public class ManagedGroup extends Group
{
    private Set administrators;
    private Set owners;
   
    public Set getAdministrators()
    {
        return administrators;
    }
    public Set getOwners()
    {
        return owners;
    }
    public void setAdministrators(Set administrators)
    {
        this.administrators = administrators;
    }
    public void setOwners(Set owners)
    {
        this.owners = owners;
    }
   
}


Thanks,
Eric


Top
 Profile  
 
 Post subject: your query should prbly be
PostPosted: Sun Jun 04, 2006 2:00 am 
Senior
Senior

Joined: Sun Jun 04, 2006 1:58 am
Posts: 136
try this query

from ManagedGroup as group " +
"left join fetch group.administrators " +
"order by group.name"


Top
 Profile  
 
 Post subject: The ORDER BY is ok, AFAIK
PostPosted: Sun Jun 04, 2006 1:24 pm 
Newbie

Joined: Tue Mar 14, 2006 3:20 pm
Posts: 14
Thanks for the help, but the ORDER BY works with either name or group.name, so I think that is ok. It's only adding the left join line where it fails. If I just use lazy initialization without the left join it works. I add the left join in again and it fails. I just cannot seem to figure out what is wrong with that query. Maybe the results returned when you do a left join are different than when you just do the query? I'm not sure.

Eric


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jun 04, 2006 2:28 pm 
Beginner
Beginner

Joined: Sat Jun 03, 2006 6:23 pm
Posts: 28
Quote:
When attempting my left join, the query looks like this:
String hql = "from ManagedGroup as group " +
"left join fetch group.administrators " +
"order by name";


When you do this, the resulting list will actually containt Object arrays, of which the first element will be the group, the second is an administrator.

What you need is:

String hql = "select group from ManagedGroup as group " +
"left join fetch group.administrators " +
"order by name";

This way you will have a list of ManagedGroups, but still you will have repetitions, because the list contains the same amount of elements as the underlying ResultSet (if there are multiple administrators per group, that is).

You can get rid of duplicates this way:

Code:
Query q = ...;
Collection result = new HashSet(q);


Roland


Top
 Profile  
 
 Post subject: Still receiving the same error
PostPosted: Sun Jun 04, 2006 3:20 pm 
Newbie

Joined: Tue Mar 14, 2006 3:20 pm
Posts: 14
The line in my code where the ClassCastException is occuring is on this line:

Query query = session.createQuery(hql);

But, I did try adding the 'select group' in there. Unfortunately, I'm not getting past the createQuery line to actually do anything with the Query.

Thanks,
Eric


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 05, 2006 3:05 am 
Expert
Expert

Joined: Thu Sep 22, 2005 10:29 am
Posts: 285
Location: Almassera/Valencia/Spain/EU/Earth/Solar system/Milky Way/Local Group/Virgo Supercluster
try loading the query from a map file, using <query> tags.
Then you will get a more understandable error message.


Top
 Profile  
 
 Post subject: Tried this
PostPosted: Mon Jun 05, 2006 9:24 am 
Newbie

Joined: Tue Mar 14, 2006 3:20 pm
Posts: 14
Here is what I tried...

I modified the mapping file like this:

Code:
<query name="all.groups.full"><![CDATA[
     select group from com.spx.groupbuilder.beans.Group as group left join fetch group.administrators order by group.name
   ]]></query>


Then, I modified the Java code like this:

Code:
Query query = session.getNamedQuery("all.groups.full");
List resultList = query.list();


Here is the exception:

Code:
Initial SessionFactory creation failed.java.lang.ClassCastException
java.lang.NoClassDefFoundError
   at com.spx.groupbuilder.data.SpringGroupDAO.getGroups(SpringGroupDAO.java:112)
   at com.spx.groupbuilder.tests.GetGroupsTest.main(GetGroupsTest.java:22)
Exception in thread "main"


Note that I have abandoned the ManagedGroup and Administrators that were extending the base classes Group and Person to try to simplify my test and narrow down the error.

Here is the full text from the log:

Code:
2006-06-05 09:17:53,620 [main] DEBUG com.spx.groupbuilder.data.SpringGroupDAO(SpringGroupDAO.java:35)  - getGroups() - start
2006-06-05 09:17:53,651 [main] INFO  org.hibernate.cfg.Environment(Environment.java:479)  - Hibernate 3.1.3
2006-06-05 09:17:53,651 [main] INFO  org.hibernate.cfg.Environment(Environment.java:509)  - hibernate.properties not found
2006-06-05 09:17:53,651 [main] INFO  org.hibernate.cfg.Environment(Environment.java:525)  - using CGLIB reflection optimizer
2006-06-05 09:17:53,667 [main] INFO  org.hibernate.cfg.Environment(Environment.java:555)  - using JDK 1.4 java.sql.Timestamp handling
2006-06-05 09:17:53,729 [main] INFO  org.hibernate.cfg.Configuration(Configuration.java:1308)  - configuring from resource: /hibernate.cfg.xml
2006-06-05 09:17:53,729 [main] INFO  org.hibernate.cfg.Configuration(Configuration.java:1285)  - Configuration resource: /hibernate.cfg.xml
2006-06-05 09:17:53,776 [main] DEBUG org.hibernate.util.DTDEntityResolver(DTDEntityResolver.java:22)  - trying to resolve system-id [http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd]
2006-06-05 09:17:53,776 [main] DEBUG org.hibernate.util.DTDEntityResolver(DTDEntityResolver.java:24)  - recognized hibernate namespace; attempting to resolve on classpath under org/hibernate/
2006-06-05 09:17:53,776 [main] DEBUG org.hibernate.util.DTDEntityResolver(DTDEntityResolver.java:34)  - located [http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd] in classpath
2006-06-05 09:17:53,808 [main] DEBUG org.hibernate.cfg.Configuration(Configuration.java:1269)  - hibernate.connection.driver_class=net.sourceforge.jtds.jdbc.Driver
2006-06-05 09:17:53,823 [main] DEBUG org.hibernate.cfg.Configuration(Configuration.java:1269)  - hibernate.connection.password=password
2006-06-05 09:17:53,823 [main] DEBUG org.hibernate.cfg.Configuration(Configuration.java:1269)  - hibernate.connection.url=jdbc:jtds:sqlserver://localhost:1433/groupbuilder
2006-06-05 09:17:53,823 [main] DEBUG org.hibernate.cfg.Configuration(Configuration.java:1269)  - hibernate.connection.username=groupbuilder
2006-06-05 09:17:53,823 [main] DEBUG org.hibernate.cfg.Configuration(Configuration.java:1269)  - hibernate.dialect=org.hibernate.dialect.SQLServerDialect
2006-06-05 09:17:53,823 [main] DEBUG org.hibernate.cfg.Configuration(Configuration.java:1269)  - show_sql=true
2006-06-05 09:17:53,823 [main] DEBUG org.hibernate.cfg.Configuration(Configuration.java:1269)  - format_sql=true
2006-06-05 09:17:53,823 [main] DEBUG org.hibernate.cfg.Configuration(Configuration.java:1269)  - current_session_context_class=thread
2006-06-05 09:17:53,823 [main] DEBUG org.hibernate.cfg.Configuration(Configuration.java:1464)  - null<-org.dom4j.tree.DefaultAttribute@7bb290 [Attribute: name resource value "Group.hbm.xml"]
2006-06-05 09:17:53,823 [main] INFO  org.hibernate.cfg.Configuration(Configuration.java:469)  - Reading mappings from resource: Group.hbm.xml
2006-06-05 09:17:53,823 [main] DEBUG org.hibernate.util.DTDEntityResolver(DTDEntityResolver.java:22)  - trying to resolve system-id [http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd]
2006-06-05 09:17:53,823 [main] DEBUG org.hibernate.util.DTDEntityResolver(DTDEntityResolver.java:24)  - recognized hibernate namespace; attempting to resolve on classpath under org/hibernate/
2006-06-05 09:17:53,823 [main] DEBUG org.hibernate.util.DTDEntityResolver(DTDEntityResolver.java:34)  - located [http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd] in classpath
2006-06-05 09:17:53,933 [main] INFO  org.hibernate.cfg.HbmBinder(HbmBinder.java:309)  - Mapping class: com.spx.groupbuilder.beans.Person -> groupbuilder_administrators
2006-06-05 09:17:53,948 [main] DEBUG org.hibernate.cfg.HbmBinder(HbmBinder.java:1261)  - Mapped property: groupId -> group_id
2006-06-05 09:17:53,964 [main] DEBUG org.hibernate.cfg.HbmBinder(HbmBinder.java:1261)  - Mapped property: dn -> user_id
2006-06-05 09:17:53,964 [main] INFO  org.hibernate.cfg.HbmBinder(HbmBinder.java:309)  - Mapping class: com.spx.groupbuilder.beans.Group -> groupbuilder_groups
2006-06-05 09:17:53,964 [main] DEBUG org.hibernate.cfg.HbmBinder(HbmBinder.java:1261)  - Mapped property: id -> id
2006-06-05 09:17:53,964 [main] DEBUG org.hibernate.cfg.HbmBinder(HbmBinder.java:1261)  - Mapped property: name -> name
2006-06-05 09:17:53,964 [main] DEBUG org.hibernate.cfg.HbmBinder(HbmBinder.java:1261)  - Mapped property: administrators
2006-06-05 09:17:53,964 [main] DEBUG org.hibernate.cfg.HbmBinder(HbmBinder.java:2527)  - Named query: all.groups.full ->
     select group from com.spx.groupbuilder.beans.Group as group left join fetch group.administrators order by group.name

2006-06-05 09:17:53,964 [main] INFO  org.hibernate.cfg.Configuration(Configuration.java:1419)  - Configured SessionFactory: null
2006-06-05 09:17:53,964 [main] DEBUG org.hibernate.cfg.Configuration(Configuration.java:1420)  - properties: {hibernate.connection.password=password, java.runtime.name=Java(TM) 2 Runtime Environment, Standard Edition, sun.boot.library.path=C:\j2sdk1.4.2_07\jre\bin, java.vm.version=1.4.2_07-b05, hibernate.connection.username=groupbuilder, java.vm.vendor=Sun Microsystems Inc., java.vendor.url=http://java.sun.com/, path.separator=;, java.vm.name=Java HotSpot(TM) Client VM, file.encoding.pkg=sun.io, user.country=US, sun.os.patch.level=Service Pack 2, java.vm.specification.name=Java Virtual Machine Specification, user.dir=C:\Local\develop\eclipse\workspaces\edirectory\GroupBuilder Test, java.runtime.version=1.4.2_07-b05, java.awt.graphicsenv=sun.awt.Win32GraphicsEnvironment, hibernate.current_session_context_class=thread, java.endorsed.dirs=C:\j2sdk1.4.2_07\jre\lib\endorsed, os.arch=x86, java.io.tmpdir=C:\DOCUME~1\eborisow\LOCALS~1\Temp\, line.separator=
, java.vm.specification.vendor=Sun Microsystems Inc., user.variant=, os.name=Windows XP, sun.java2d.fontpath=, java.library.path=C:\j2sdk1.4.2_07\bin;.;C:\WINDOWS\system32;C:\WINDOWS;c:\programs\ruby\bin;C:\j2sdk1.4.2_07\jre\bin\client;C:\Program Files\Oracle\jre\1.1.8\bin;C:\oracle\product\10.2.0\client_1;C:\Perl\bin\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\ATI Technologies\ATI Control Panel;C:\Program Files\Symantec\pcAnywhere\;;C:\j2sdk1.4.2_07\bin;C:\programs\apache\apache-ant-1.6.1\bin;c:\programs\cvs;C:\programs\apache\maven-2.0.2\bin;C:\programs\opensource\jad2.0.3;C:\programs\opensource\php-4.3.10-Win32;C:\Program Files\Microsoft SQL Server\80\Tools\BINN;C:\Program Files\Microsoft SQL Server\80\Tools\Binn\;c:\programs\cygwin\bin;C:\Program Files\Vignette\V7\vbis\bin;;C:\Program Files\Java\j2re1.4.2_03\bin\client\;c:\temp\oracle\oracle9i\bin;C:\Program Files\Oracle\jre\1.3.1\bin;C:\Program Files\MySQL\MySQL Server 4.1\bin;C:\programs\sun\jwsdp-1.5\jwsdp-shared\bin;C:\programs\sun\jwsdp-1.1\jwsdp-shared\bin;C:\Program Files\SSH Communications Security\SSH Secure Shell;C:\Program Files\Novell\exteNd5\Director\autonomy;c:\programs\cygwin\bin, java.specification.name=Java Platform API Specification, java.class.version=48.0, java.util.prefs.PreferencesFactory=java.util.prefs.WindowsPreferencesFactory, os.version=5.1, user.home=C:\Documents and Settings\eborisow, user.timezone=America/New_York, java.awt.printerjob=sun.awt.windows.WPrinterJob, file.encoding=Cp1252, java.specification.version=1.4, hibernate.format_sql=true, hibernate.connection.driver_class=net.sourceforge.jtds.jdbc.Driver, show_sql=true, user.name=eborisow, java.class.path=C:\Local\develop\eclipse\workspaces\edirectory\GroupBuilder Test\bin;C:\programs\sourceforge\hibernate-3.1\lib\ant-1.6.5.jar;C:\programs\sourceforge\hibernate-3.1\lib\ant-antlr-1.6.5.jar;C:\programs\sourceforge\hibernate-3.1\lib\ant-junit-1.6.5.jar;C:\programs\sourceforge\hibernate-3.1\lib\ant-launcher-1.6.5.jar;C:\programs\sourceforge\hibernate-3.1\lib\antlr-2.7.6rc1.jar;C:\programs\sourceforge\hibernate-3.1\lib\ant-swing-1.6.5.jar;C:\programs\sourceforge\hibernate-3.1\lib\asm.jar;C:\programs\sourceforge\hibernate-3.1\lib\asm-attrs.jar;C:\programs\sourceforge\hibernate-3.1\lib\c3p0-0.9.0.jar;C:\programs\sourceforge\hibernate-3.1\lib\cglib-2.1.3.jar;C:\programs\sourceforge\hibernate-3.1\lib\cleanimports.jar;C:\programs\sourceforge\hibernate-3.1\lib\commons-collections-2.1.1.jar;C:\programs\sourceforge\hibernate-3.1\lib\commons-logging-1.0.4.jar;C:\programs\sourceforge\hibernate-3.1\lib\concurrent-1.3.2.jar;C:\programs\sourceforge\hibernate-3.1\lib\connector.jar;C:\programs\sourceforge\hibernate-3.1\lib\dom4j-1.6.1.jar;C:\programs\sourceforge\hibernate-3.1\lib\ehcache-1.1.jar;C:\programs\sourceforge\hibernate-3.1\lib\jaas.jar;C:\programs\sourceforge\hibernate-3.1\lib\jacc-1_0-fr.jar;C:\programs\sourceforge\hibernate-3.1\lib\jaxen-1.1-beta-7.jar;C:\programs\sourceforge\hibernate-3.1\lib\jboss-cache.jar;C:\programs\sourceforge\hibernate-3.1\lib\jboss-common.jar;C:\programs\sourceforge\hibernate-3.1\lib\jboss-jmx.jar;C:\programs\sourceforge\hibernate-3.1\lib\jboss-system.jar;C:\programs\sourceforge\hibernate-3.1\lib\jdbc2_0-stdext.jar;C:\programs\sourceforge\hibernate-3.1\lib\jgroups-2.2.8.jar;C:\programs\sourceforge\hibernate-3.1\lib\jta.jar;C:\programs\sourceforge\hibernate-3.1\lib\junit-3.8.1.jar;C:\programs\sourceforge\hibernate-3.1\lib\log4j-1.2.11.jar;C:\programs\sourceforge\hibernate-3.1\lib\oscache-2.1.jar;C:\programs\sourceforge\hibernate-3.1\lib\proxool-0.8.3.jar;C:\programs\sourceforge\hibernate-3.1\lib\swarmcache-1.0rc2.jar;C:\programs\sourceforge\hibernate-3.1\lib\syndiag2.jar;C:\programs\sourceforge\hibernate-3.1\lib\versioncheck.jar;C:\programs\sourceforge\hibernate-3.1\lib\xerces-2.6.2.jar;C:\programs\sourceforge\hibernate-3.1\lib\xml-apis.jar;C:\programs\sourceforge\hibernate-3.1\hibernate3.jar;C:\programs\opensource\jdbc drivers\mssql server\jTDS\jtds-1.2.jar;C:\Local\develop\eclipse\workspaces\Portal\itvendorscommon\bin\WEB-INF\lib\log4j-1.2.12.jar, format_sql=true, hibernate.show_sql=true, current_session_context_class=thread, java.vm.specification.version=1.0, java.home=C:\j2sdk1.4.2_07\jre, sun.arch.data.model=32, hibernate.dialect=org.hibernate.dialect.SQLServerDialect, hibernate.connection.url=jdbc:jtds:sqlserver://localhost:1433/groupbuilder, user.language=en, java.specification.vendor=Sun Microsystems Inc., awt.toolkit=sun.awt.windows.WToolkit, hibernate.cglib.use_reflection_optimizer=true, java.vm.info=mixed mode, java.version=1.4.2_07, java.ext.dirs=C:\j2sdk1.4.2_07\jre\lib\ext, sun.boot.class.path=C:\j2sdk1.4.2_07\jre\lib\rt.jar;C:\j2sdk1.4.2_07\jre\lib\i18n.jar;C:\j2sdk1.4.2_07\jre\lib\sunrsasign.jar;C:\j2sdk1.4.2_07\jre\lib\jsse.jar;C:\j2sdk1.4.2_07\jre\lib\jce.jar;C:\j2sdk1.4.2_07\jre\lib\charsets.jar;C:\j2sdk1.4.2_07\jre\classes, java.vendor=Sun Microsystems Inc., file.separator=\, java.vendor.url.bug=http://java.sun.com/cgi-bin/bugreport.cgi, sun.io.unicode.encoding=UnicodeLittle, sun.cpu.endian=little, sun.cpu.isalist=pentium i486 i386}
2006-06-05 09:17:53,964 [main] DEBUG org.hibernate.cfg.Configuration(Configuration.java:1167)  - Preparing to build session factory with filters : {}
2006-06-05 09:17:53,964 [main] DEBUG org.hibernate.cfg.Configuration(Configuration.java:1002)  - processing extends queue
2006-06-05 09:17:53,964 [main] DEBUG org.hibernate.cfg.Configuration(Configuration.java:1006)  - processing collection mappings
2006-06-05 09:17:53,964 [main] DEBUG org.hibernate.cfg.CollectionSecondPass(CollectionSecondPass.java:33)  - Second pass for collection: com.spx.groupbuilder.beans.Group.administrators
2006-06-05 09:17:53,964 [main] INFO  org.hibernate.cfg.HbmBinder(HbmBinder.java:2349)  - Mapping collection: com.spx.groupbuilder.beans.Group.administrators -> groupbuilder_administrators
2006-06-05 09:17:53,979 [main] DEBUG org.hibernate.cfg.CollectionSecondPass(CollectionSecondPass.java:49)  - Mapped collection key: group_id, one-to-many: com.spx.groupbuilder.beans.Person
2006-06-05 09:17:53,979 [main] DEBUG org.hibernate.cfg.Configuration(Configuration.java:1017)  - processing native query and ResultSetMapping mappings
2006-06-05 09:17:53,979 [main] DEBUG org.hibernate.cfg.Configuration(Configuration.java:1025)  - processing association property references
2006-06-05 09:17:53,979 [main] DEBUG org.hibernate.cfg.Configuration(Configuration.java:1047)  - processing foreign key constraints
2006-06-05 09:17:53,979 [main] DEBUG org.hibernate.cfg.Configuration(Configuration.java:1130)  - resolving reference to class: com.spx.groupbuilder.beans.Group
2006-06-05 09:17:54,042 [main] INFO  org.hibernate.connection.DriverManagerConnectionProvider(DriverManagerConnectionProvider.java:41)  - Using Hibernate built-in connection pool (not for production use!)
2006-06-05 09:17:54,042 [main] INFO  org.hibernate.connection.DriverManagerConnectionProvider(DriverManagerConnectionProvider.java:42)  - Hibernate connection pool size: 20
2006-06-05 09:17:54,042 [main] INFO  org.hibernate.connection.DriverManagerConnectionProvider(DriverManagerConnectionProvider.java:45)  - autocommit mode: false
2006-06-05 09:17:54,042 [main] INFO  org.hibernate.connection.DriverManagerConnectionProvider(DriverManagerConnectionProvider.java:80)  - using driver: net.sourceforge.jtds.jdbc.Driver at URL: jdbc:jtds:sqlserver://localhost:1433/groupbuilder
2006-06-05 09:17:54,042 [main] INFO  org.hibernate.connection.DriverManagerConnectionProvider(DriverManagerConnectionProvider.java:83)  - connection properties: {user=groupbuilder, password=password}
2006-06-05 09:17:54,042 [main] DEBUG org.hibernate.connection.DriverManagerConnectionProvider(DriverManagerConnectionProvider.java:93)  - total checked-out connections: 0
2006-06-05 09:17:54,042 [main] DEBUG org.hibernate.connection.DriverManagerConnectionProvider(DriverManagerConnectionProvider.java:109)  - opening new JDBC connection
2006-06-05 09:17:54,183 [main] DEBUG org.hibernate.connection.DriverManagerConnectionProvider(DriverManagerConnectionProvider.java:115)  - created connection to: jdbc:jtds:sqlserver://localhost:1433/groupbuilder, Isolation Level: 2
2006-06-05 09:17:54,198 [main] INFO  org.hibernate.cfg.SettingsFactory(SettingsFactory.java:77)  - RDBMS: Microsoft SQL Server, version: 08.00.0760
2006-06-05 09:17:54,198 [main] INFO  org.hibernate.cfg.SettingsFactory(SettingsFactory.java:78)  - JDBC driver: jTDS Type 4 JDBC Driver for MS SQL Server and Sybase, version: 1.2
2006-06-05 09:17:54,198 [main] DEBUG org.hibernate.connection.DriverManagerConnectionProvider(DriverManagerConnectionProvider.java:129)  - returning connection to pool, pool size: 1
2006-06-05 09:17:54,214 [main] INFO  org.hibernate.dialect.Dialect(Dialect.java:103)  - Using dialect: org.hibernate.dialect.SQLServerDialect
2006-06-05 09:17:54,214 [main] INFO  org.hibernate.transaction.TransactionFactoryFactory(TransactionFactoryFactory.java:31)  - Using default transaction strategy (direct JDBC transactions)
2006-06-05 09:17:54,229 [main] INFO  org.hibernate.transaction.TransactionManagerLookupFactory(TransactionManagerLookupFactory.java:33)  - No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
2006-06-05 09:17:54,229 [main] INFO  org.hibernate.cfg.SettingsFactory(SettingsFactory.java:125)  - Automatic flush during beforeCompletion(): disabled
2006-06-05 09:17:54,229 [main] INFO  org.hibernate.cfg.SettingsFactory(SettingsFactory.java:129)  - Automatic session close at end of transaction: disabled
2006-06-05 09:17:54,229 [main] INFO  org.hibernate.cfg.SettingsFactory(SettingsFactory.java:144)  - Scrollable result sets: enabled
2006-06-05 09:17:54,229 [main] DEBUG org.hibernate.cfg.SettingsFactory(SettingsFactory.java:148)  - Wrap result sets: disabled
2006-06-05 09:17:54,229 [main] INFO  org.hibernate.cfg.SettingsFactory(SettingsFactory.java:152)  - JDBC3 getGeneratedKeys(): enabled
2006-06-05 09:17:54,229 [main] INFO  org.hibernate.cfg.SettingsFactory(SettingsFactory.java:160)  - Connection release mode: auto
2006-06-05 09:17:54,229 [main] INFO  org.hibernate.cfg.SettingsFactory(SettingsFactory.java:187)  - Default batch fetch size: 1
2006-06-05 09:17:54,229 [main] INFO  org.hibernate.cfg.SettingsFactory(SettingsFactory.java:191)  - Generate SQL with comments: disabled
2006-06-05 09:17:54,229 [main] INFO  org.hibernate.cfg.SettingsFactory(SettingsFactory.java:195)  - Order SQL updates by primary key: disabled
2006-06-05 09:17:54,229 [main] INFO  org.hibernate.cfg.SettingsFactory(SettingsFactory.java:338)  - Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
2006-06-05 09:17:54,229 [main] INFO  org.hibernate.hql.ast.ASTQueryTranslatorFactory(ASTQueryTranslatorFactory.java:24)  - Using ASTQueryTranslatorFactory
2006-06-05 09:17:54,245 [main] INFO  org.hibernate.cfg.SettingsFactory(SettingsFactory.java:203)  - Query language substitutions: {}
2006-06-05 09:17:54,245 [main] INFO  org.hibernate.cfg.SettingsFactory(SettingsFactory.java:209)  - Second-level cache: enabled
2006-06-05 09:17:54,245 [main] INFO  org.hibernate.cfg.SettingsFactory(SettingsFactory.java:213)  - Query cache: disabled
2006-06-05 09:17:54,245 [main] INFO  org.hibernate.cfg.SettingsFactory(SettingsFactory.java:325)  - Cache provider: org.hibernate.cache.EhCacheProvider
2006-06-05 09:17:54,245 [main] INFO  org.hibernate.cfg.SettingsFactory(SettingsFactory.java:228)  - Optimize cache for minimal puts: disabled
2006-06-05 09:17:54,245 [main] INFO  org.hibernate.cfg.SettingsFactory(SettingsFactory.java:237)  - Structured second-level cache entries: disabled
2006-06-05 09:17:54,245 [main] DEBUG org.hibernate.exception.SQLExceptionConverterFactory(SQLExceptionConverterFactory.java:52)  - Using dialect defined converter
2006-06-05 09:17:54,245 [main] INFO  org.hibernate.cfg.SettingsFactory(SettingsFactory.java:257)  - Echoing all SQL to stdout
2006-06-05 09:17:54,245 [main] INFO  org.hibernate.cfg.SettingsFactory(SettingsFactory.java:264)  - Statistics: disabled
2006-06-05 09:17:54,261 [main] INFO  org.hibernate.cfg.SettingsFactory(SettingsFactory.java:268)  - Deleted entity synthetic identifier rollback: disabled
2006-06-05 09:17:54,261 [main] INFO  org.hibernate.cfg.SettingsFactory(SettingsFactory.java:283)  - Default entity-mode: pojo
2006-06-05 09:17:54,292 [main] INFO  org.hibernate.impl.SessionFactoryImpl(SessionFactoryImpl.java:154)  - building session factory
2006-06-05 09:17:54,292 [main] DEBUG org.hibernate.impl.SessionFactoryImpl(SessionFactoryImpl.java:165)  - Session factory constructed with filter configurations : {}
2006-06-05 09:17:54,292 [main] DEBUG org.hibernate.impl.SessionFactoryImpl(SessionFactoryImpl.java:168)  - instantiating session factory with properties: {java.runtime.name=Java(TM) 2 Runtime Environment, Standard Edition, hibernate.connection.password=password, sun.boot.library.path=C:\j2sdk1.4.2_07\jre\bin, java.vm.version=1.4.2_07-b05, hibernate.connection.username=groupbuilder, java.vm.vendor=Sun Microsystems Inc., java.vendor.url=http://java.sun.com/, path.separator=;, java.vm.name=Java HotSpot(TM) Client VM, file.encoding.pkg=sun.io, user.country=US, sun.os.patch.level=Service Pack 2, java.vm.specification.name=Java Virtual Machine Specification, user.dir=C:\Local\develop\eclipse\workspaces\edirectory\GroupBuilder Test, java.runtime.version=1.4.2_07-b05, java.awt.graphicsenv=sun.awt.Win32GraphicsEnvironment, hibernate.current_session_context_class=thread, java.endorsed.dirs=C:\j2sdk1.4.2_07\jre\lib\endorsed, os.arch=x86, java.io.tmpdir=C:\DOCUME~1\eborisow\LOCALS~1\Temp\, line.separator=
, java.vm.specification.vendor=Sun Microsystems Inc., user.variant=, os.name=Windows XP, sun.java2d.fontpath=, java.library.path=C:\j2sdk1.4.2_07\bin;.;C:\WINDOWS\system32;C:\WINDOWS;c:\programs\ruby\bin;C:\j2sdk1.4.2_07\jre\bin\client;C:\Program Files\Oracle\jre\1.1.8\bin;C:\oracle\product\10.2.0\client_1;C:\Perl\bin\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\ATI Technologies\ATI Control Panel;C:\Program Files\Symantec\pcAnywhere\;;C:\j2sdk1.4.2_07\bin;C:\programs\apache\apache-ant-1.6.1\bin;c:\programs\cvs;C:\programs\apache\maven-2.0.2\bin;C:\programs\opensource\jad2.0.3;C:\programs\opensource\php-4.3.10-Win32;C:\Program Files\Microsoft SQL Server\80\Tools\BINN;C:\Program Files\Microsoft SQL Server\80\Tools\Binn\;c:\programs\cygwin\bin;C:\Program Files\Vignette\V7\vbis\bin;;C:\Program Files\Java\j2re1.4.2_03\bin\client\;c:\temp\oracle\oracle9i\bin;C:\Program Files\Oracle\jre\1.3.1\bin;C:\Program Files\MySQL\MySQL Server 4.1\bin;C:\programs\sun\jwsdp-1.5\jwsdp-shared\bin;C:\programs\sun\jwsdp-1.1\jwsdp-shared\bin;C:\Program Files\SSH Communications Security\SSH Secure Shell;C:\Program Files\Novell\exteNd5\Director\autonomy;c:\programs\cygwin\bin, java.specification.name=Java Platform API Specification, java.class.version=48.0, java.util.prefs.PreferencesFactory=java.util.prefs.WindowsPreferencesFactory, os.version=5.1, user.home=C:\Documents and Settings\eborisow, user.timezone=America/New_York, java.awt.printerjob=sun.awt.windows.WPrinterJob, file.encoding=Cp1252, java.specification.version=1.4, hibernate.format_sql=true, hibernate.connection.driver_class=net.sourceforge.jtds.jdbc.Driver, show_sql=true, java.class.path=C:\Local\develop\eclipse\workspaces\edirectory\GroupBuilder Test\bin;C:\programs\sourceforge\hibernate-3.1\lib\ant-1.6.5.jar;C:\programs\sourceforge\hibernate-3.1\lib\ant-antlr-1.6.5.jar;C:\programs\sourceforge\hibernate-3.1\lib\ant-junit-1.6.5.jar;C:\programs\sourceforge\hibernate-3.1\lib\ant-launcher-1.6.5.jar;C:\programs\sourceforge\hibernate-3.1\lib\antlr-2.7.6rc1.jar;C:\programs\sourceforge\hibernate-3.1\lib\ant-swing-1.6.5.jar;C:\programs\sourceforge\hibernate-3.1\lib\asm.jar;C:\programs\sourceforge\hibernate-3.1\lib\asm-attrs.jar;C:\programs\sourceforge\hibernate-3.1\lib\c3p0-0.9.0.jar;C:\programs\sourceforge\hibernate-3.1\lib\cglib-2.1.3.jar;C:\programs\sourceforge\hibernate-3.1\lib\cleanimports.jar;C:\programs\sourceforge\hibernate-3.1\lib\commons-collections-2.1.1.jar;C:\programs\sourceforge\hibernate-3.1\lib\commons-logging-1.0.4.jar;C:\programs\sourceforge\hibernate-3.1\lib\concurrent-1.3.2.jar;C:\programs\sourceforge\hibernate-3.1\lib\connector.jar;C:\programs\sourceforge\hibernate-3.1\lib\dom4j-1.6.1.jar;C:\programs\sourceforge\hibernate-3.1\lib\ehcache-1.1.jar;C:\programs\sourceforge\hibernate-3.1\lib\jaas.jar;C:\programs\sourceforge\hibernate-3.1\lib\jacc-1_0-fr.jar;C:\programs\sourceforge\hibernate-3.1\lib\jaxen-1.1-beta-7.jar;C:\programs\sourceforge\hibernate-3.1\lib\jboss-cache.jar;C:\programs\sourceforge\hibernate-3.1\lib\jboss-common.jar;C:\programs\sourceforge\hibernate-3.1\lib\jboss-jmx.jar;C:\programs\sourceforge\hibernate-3.1\lib\jboss-system.jar;C:\programs\sourceforge\hibernate-3.1\lib\jdbc2_0-stdext.jar;C:\programs\sourceforge\hibernate-3.1\lib\jgroups-2.2.8.jar;C:\programs\sourceforge\hibernate-3.1\lib\jta.jar;C:\programs\sourceforge\hibernate-3.1\lib\junit-3.8.1.jar;C:\programs\sourceforge\hibernate-3.1\lib\log4j-1.2.11.jar;C:\programs\sourceforge\hibernate-3.1\lib\oscache-2.1.jar;C:\programs\sourceforge\hibernate-3.1\lib\proxool-0.8.3.jar;C:\programs\sourceforge\hibernate-3.1\lib\swarmcache-1.0rc2.jar;C:\programs\sourceforge\hibernate-3.1\lib\syndiag2.jar;C:\programs\sourceforge\hibernate-3.1\lib\versioncheck.jar;C:\programs\sourceforge\hibernate-3.1\lib\xerces-2.6.2.jar;C:\programs\sourceforge\hibernate-3.1\lib\xml-apis.jar;C:\programs\sourceforge\hibernate-3.1\hibernate3.jar;C:\programs\opensource\jdbc drivers\mssql server\jTDS\jtds-1.2.jar;C:\Local\develop\eclipse\workspaces\Portal\itvendorscommon\bin\WEB-INF\lib\log4j-1.2.12.jar, user.name=eborisow, format_sql=true, hibernate.show_sql=true, current_session_context_class=thread, java.vm.specification.version=1.0, sun.arch.data.model=32, java.home=C:\j2sdk1.4.2_07\jre, hibernate.connection.url=jdbc:jtds:sqlserver://localhost:1433/groupbuilder, hibernate.dialect=org.hibernate.dialect.SQLServerDialect, java.specification.vendor=Sun Microsystems Inc., user.language=en, awt.toolkit=sun.awt.windows.WToolkit, java.vm.info=mixed mode, hibernate.cglib.use_reflection_optimizer=true, java.version=1.4.2_07, java.ext.dirs=C:\j2sdk1.4.2_07\jre\lib\ext, sun.boot.class.path=C:\j2sdk1.4.2_07\jre\lib\rt.jar;C:\j2sdk1.4.2_07\jre\lib\i18n.jar;C:\j2sdk1.4.2_07\jre\lib\sunrsasign.jar;C:\j2sdk1.4.2_07\jre\lib\jsse.jar;C:\j2sdk1.4.2_07\jre\lib\jce.jar;C:\j2sdk1.4.2_07\jre\lib\charsets.jar;C:\j2sdk1.4.2_07\jre\classes, java.vendor=Sun Microsystems Inc., file.separator=\, java.vendor.url.bug=http://java.sun.com/cgi-bin/bugreport.cgi, sun.cpu.endian=little, sun.io.unicode.encoding=UnicodeLittle, sun.cpu.isalist=pentium i486 i386}
2006-06-05 09:17:54,292 [main] DEBUG net.sf.ehcache.CacheManager(CacheManager.java:191)  - Creating new CacheManager with default config
2006-06-05 09:17:54,308 [main] DEBUG net.sf.ehcache.CacheManager(CacheManager.java:164)  - Configuring ehcache from classpath.
2006-06-05 09:17:54,308 [main] WARN  net.sf.ehcache.config.Configurator(Configurator.java:126)  - No configuration found. Configuring ehcache from ehcache-failsafe.xml found in the classpath: jar:file:/C:/programs/sourceforge/hibernate-3.1/lib/ehcache-1.1.jar!/ehcache-failsafe.xml
2006-06-05 09:17:54,308 [main] DEBUG net.sf.ehcache.config.Configuration$DiskStore(Configuration.java:185)  - Disk Store Path: C:\DOCUME~1\eborisow\LOCALS~1\Temp\
2006-06-05 09:17:54,573 [main] DEBUG org.hibernate.persister.entity.AbstractEntityPersister(AbstractEntityPersister.java:2447)  - Static SQL for entity: com.spx.groupbuilder.beans.Group
2006-06-05 09:17:54,573 [main] DEBUG org.hibernate.persister.entity.AbstractEntityPersister(AbstractEntityPersister.java:2449)  -  Version select: select id from groupbuilder_groups where id =?
2006-06-05 09:17:54,573 [main] DEBUG org.hibernate.persister.entity.AbstractEntityPersister(AbstractEntityPersister.java:2450)  -  Snapshot select: select group_.id, group_.name as name1_ from groupbuilder_groups group_ where group_.id=?
2006-06-05 09:17:54,573 [main] DEBUG org.hibernate.persister.entity.AbstractEntityPersister(AbstractEntityPersister.java:2452)  -  Insert 0: insert into groupbuilder_groups (name, id) values (?, ?)
2006-06-05 09:17:54,573 [main] DEBUG org.hibernate.persister.entity.AbstractEntityPersister(AbstractEntityPersister.java:2453)  -  Update 0: update groupbuilder_groups set name=? where id=?
2006-06-05 09:17:54,573 [main] DEBUG org.hibernate.persister.entity.AbstractEntityPersister(AbstractEntityPersister.java:2454)  -  Delete 0: delete from groupbuilder_groups where id=?
2006-06-05 09:17:54,589 [main] DEBUG org.hibernate.persister.entity.AbstractEntityPersister(AbstractEntityPersister.java:2447)  - Static SQL for entity: com.spx.groupbuilder.beans.Person
2006-06-05 09:17:54,589 [main] DEBUG org.hibernate.persister.entity.AbstractEntityPersister(AbstractEntityPersister.java:2449)  -  Version select: select group_id from groupbuilder_administrators where group_id =?
2006-06-05 09:17:54,589 [main] DEBUG org.hibernate.persister.entity.AbstractEntityPersister(AbstractEntityPersister.java:2450)  -  Snapshot select: select person_.group_id, person_.user_id as user2_0_ from groupbuilder_administrators person_ where person_.group_id=?
2006-06-05 09:17:54,589 [main] DEBUG org.hibernate.persister.entity.AbstractEntityPersister(AbstractEntityPersister.java:2452)  -  Insert 0: insert into groupbuilder_administrators (user_id, group_id) values (?, ?)
2006-06-05 09:17:54,589 [main] DEBUG org.hibernate.persister.entity.AbstractEntityPersister(AbstractEntityPersister.java:2453)  -  Update 0: update groupbuilder_administrators set user_id=? where group_id=?
2006-06-05 09:17:54,589 [main] DEBUG org.hibernate.persister.entity.AbstractEntityPersister(AbstractEntityPersister.java:2454)  -  Delete 0: delete from groupbuilder_administrators where group_id=?
2006-06-05 09:17:54,605 [main] DEBUG org.hibernate.persister.collection.AbstractCollectionPersister(AbstractCollectionPersister.java:511)  - Static SQL for collection: com.spx.groupbuilder.beans.Group.administrators
2006-06-05 09:17:54,605 [main] DEBUG org.hibernate.persister.collection.AbstractCollectionPersister(AbstractCollectionPersister.java:512)  -  Row insert: update groupbuilder_administrators set group_id=? where group_id=?
2006-06-05 09:17:54,605 [main] DEBUG org.hibernate.persister.collection.AbstractCollectionPersister(AbstractCollectionPersister.java:514)  -  Row delete: update groupbuilder_administrators set group_id=null where group_id=? and group_id=?
2006-06-05 09:17:54,605 [main] DEBUG org.hibernate.persister.collection.AbstractCollectionPersister(AbstractCollectionPersister.java:515)  -  One-shot delete: update groupbuilder_administrators set group_id=null where group_id=?
2006-06-05 09:17:54,620 [main] DEBUG org.hibernate.loader.entity.EntityLoader(EntityLoader.java:79)  - Static select for entity com.spx.groupbuilder.beans.Group: select group0_.id as id1_0_, group0_.name as name1_0_ from groupbuilder_groups group0_ where group0_.id=?
2006-06-05 09:17:54,620 [main] DEBUG org.hibernate.loader.entity.EntityLoader(EntityLoader.java:79)  - Static select for entity com.spx.groupbuilder.beans.Group: select group0_.id as id1_0_, group0_.name as name1_0_ from groupbuilder_groups group0_ where group0_.id=?
2006-06-05 09:17:54,620 [main] DEBUG org.hibernate.loader.entity.EntityLoader(EntityLoader.java:79)  - Static select for entity com.spx.groupbuilder.beans.Group: select group0_.id as id1_0_, group0_.name as name1_0_ from groupbuilder_groups group0_ where group0_.id=?
2006-06-05 09:17:54,620 [main] DEBUG org.hibernate.loader.entity.EntityLoader(EntityLoader.java:79)  - Static select for entity com.spx.groupbuilder.beans.Group: select group0_.id as id1_0_, group0_.name as name1_0_ from groupbuilder_groups group0_ where group0_.id=?
2006-06-05 09:17:54,636 [main] DEBUG org.hibernate.loader.entity.EntityLoader(CascadeEntityLoader.java:34)  - Static select for action ACTION_MERGE on entity com.spx.groupbuilder.beans.Group: select group0_.id as id1_0_, group0_.name as name1_0_ from groupbuilder_groups group0_ where group0_.id=?
2006-06-05 09:17:54,636 [main] DEBUG org.hibernate.loader.entity.EntityLoader(CascadeEntityLoader.java:34)  - Static select for action ACTION_REFRESH on entity com.spx.groupbuilder.beans.Group: select group0_.id as id1_0_, group0_.name as name1_0_ from groupbuilder_groups group0_ where group0_.id=?
2006-06-05 09:17:54,636 [main] DEBUG org.hibernate.loader.entity.EntityLoader(EntityLoader.java:79)  - Static select for entity com.spx.groupbuilder.beans.Person: select person0_.group_id as group1_0_0_, person0_.user_id as user2_0_0_ from groupbuilder_administrators person0_ where person0_.group_id=?
2006-06-05 09:17:54,636 [main] DEBUG org.hibernate.loader.entity.EntityLoader(EntityLoader.java:79)  - Static select for entity com.spx.groupbuilder.beans.Person: select person0_.group_id as group1_0_0_, person0_.user_id as user2_0_0_ from groupbuilder_administrators person0_ where person0_.group_id=?
2006-06-05 09:17:54,636 [main] DEBUG org.hibernate.loader.entity.EntityLoader(EntityLoader.java:79)  - Static select for entity com.spx.groupbuilder.beans.Person: select person0_.group_id as group1_0_0_, person0_.user_id as user2_0_0_ from groupbuilder_administrators person0_ where person0_.group_id=?
2006-06-05 09:17:54,636 [main] DEBUG org.hibernate.loader.entity.EntityLoader(EntityLoader.java:79)  - Static select for entity com.spx.groupbuilder.beans.Person: select person0_.group_id as group1_0_0_, person0_.user_id as user2_0_0_ from groupbuilder_administrators person0_ where person0_.group_id=?
2006-06-05 09:17:54,636 [main] DEBUG org.hibernate.loader.entity.EntityLoader(CascadeEntityLoader.java:34)  - Static select for action ACTION_MERGE on entity com.spx.groupbuilder.beans.Person: select person0_.group_id as group1_0_0_, person0_.user_id as user2_0_0_ from groupbuilder_administrators person0_ where person0_.group_id=?
2006-06-05 09:17:54,636 [main] DEBUG org.hibernate.loader.entity.EntityLoader(CascadeEntityLoader.java:34)  - Static select for action ACTION_REFRESH on entity com.spx.groupbuilder.beans.Person: select person0_.group_id as group1_0_0_, person0_.user_id as user2_0_0_ from groupbuilder_administrators person0_ where person0_.group_id=?
2006-06-05 09:17:54,636 [main] DEBUG org.hibernate.loader.collection.OneToManyLoader(OneToManyLoader.java:64)  - Static select for one-to-many com.spx.groupbuilder.beans.Group.administrators: select administra0_.group_id as group1_1_, administra0_.group_id as group1_0_0_, administra0_.user_id as user2_0_0_ from groupbuilder_administrators administra0_ where administra0_.group_id=?
2006-06-05 09:17:54,651 [main] DEBUG org.hibernate.impl.SessionFactoryObjectFactory(SessionFactoryObjectFactory.java:39)  - initializing class SessionFactoryObjectFactory
2006-06-05 09:17:54,651 [main] DEBUG org.hibernate.impl.SessionFactoryObjectFactory(SessionFactoryObjectFactory.java:76)  - registered: 8aa97c400ba457a0010ba457a25b0000 (unnamed)
2006-06-05 09:17:54,651 [main] INFO  org.hibernate.impl.SessionFactoryObjectFactory(SessionFactoryObjectFactory.java:82)  - Not binding factory to JNDI, no JNDI name configured
2006-06-05 09:17:54,651 [main] DEBUG org.hibernate.impl.SessionFactoryImpl(SessionFactoryImpl.java:293)  - instantiated session factory
2006-06-05 09:17:54,651 [main] DEBUG org.hibernate.impl.SessionFactoryImpl(SessionFactoryImpl.java:354)  - Checking 1 named HQL queries
2006-06-05 09:17:54,651 [main] DEBUG org.hibernate.impl.SessionFactoryImpl(SessionFactoryImpl.java:362)  - Checking named query: all.groups.full
2006-06-05 09:17:54,651 [main] DEBUG org.hibernate.engine.query.QueryPlanCache(QueryPlanCache.java:69)  - unable to locate HQL query plan in cache; generating (
     select group from com.spx.groupbuilder.beans.Group as group left join fetch group.administrators order by group.name
)
2006-06-05 09:17:54,714 [main] DEBUG org.hibernate.hql.ast.QueryTranslatorImpl(QueryTranslatorImpl.java:236)  - parse() - HQL:
     select group from com.spx.groupbuilder.beans.Group as group left join fetch group.administrators order by group.name

2006-06-05 09:17:54,714 [main] DEBUG org.hibernate.hql.ast.HqlParser(HqlParser.java:290)  - weakKeywords() : new LT(1) token - ["group",<119> previously: <24>,line=2,col=16,possibleID=true]
2006-06-05 09:17:54,714 [main] DEBUG org.hibernate.hql.ast.HqlParser(HqlParser.java:290)  - weakKeywords() : new LT(1) token - ["Group",<119> previously: <24>,line=2,col=54,possibleID=true]
2006-06-05 09:17:54,714 [main] DEBUG org.hibernate.hql.PARSER(ErrorCounter.java:42)  - Keyword  'group' is being interpreted as an identifier due to: expecting IDENT, found 'group'
2006-06-05 09:17:54,730 [main] DEBUG org.hibernate.hql.PARSER(ErrorCounter.java:42)  - Keyword  'group' is being interpreted as an identifier due to: expecting IDENT, found 'group'
2006-06-05 09:17:54,730 [main] DEBUG org.hibernate.hql.ast.HqlParser(HqlParser.java:290)  - weakKeywords() : new LT(1) token - ["group",<119> previously: <24>,line=2,col=115,possibleID=true]
2006-06-05 09:17:54,776 [main] DEBUG org.hibernate.hql.ast.AST(QueryTranslatorImpl.java:252)  - --- HQL AST ---
\-[QUERY] 'query'
    +-[SELECT_FROM] 'SELECT_FROM'
    |  +-[FROM] 'from'
    |  |  +-[RANGE] 'RANGE'
    |  |  |  +-[DOT] '.'
    |  |  |  |  +-[DOT] '.'
    |  |  |  |  |  +-[DOT] '.'
    |  |  |  |  |  |  +-[DOT] '.'
    |  |  |  |  |  |  |  +-[IDENT] 'com'
    |  |  |  |  |  |  |  \-[IDENT] 'spx'
    |  |  |  |  |  |  \-[IDENT] 'groupbuilder'
    |  |  |  |  |  \-[IDENT] 'beans'
    |  |  |  |  \-[IDENT] 'Group'
    |  |  |  \-[ALIAS] 'group'
    |  |  \-[JOIN] 'join'
    |  |     +-[LEFT] 'left'
    |  |     +-[FETCH] 'fetch'
    |  |     \-[DOT] '.'
    |  |        +-[WEIRD_IDENT] 'group'
    |  |        \-[IDENT] 'administrators'
    |  \-[SELECT] 'select'
    |     \-[IDENT] 'group'
    \-[ORDER] 'order'
       \-[DOT] '.'
          +-[IDENT] 'group'
          \-[IDENT] 'name'

2006-06-05 09:17:54,776 [main] DEBUG org.hibernate.hql.ast.ErrorCounter(ErrorCounter.java:68)  - throwQueryException() : no errors
2006-06-05 09:17:54,823 [main] DEBUG org.hibernate.hql.antlr.HqlSqlBaseWalker(HqlSqlBaseWalker.java:111)  - select << begin [level=1, statement=select]
2006-06-05 09:17:54,839 [main] DEBUG org.hibernate.hql.ast.tree.FromElement(FromElement.java:104)  - FromClause{level=1} :  com.spx.groupbuilder.beans.Group (group) -> group0_


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 05, 2006 10:17 am 
Expert
Expert

Joined: Thu Sep 22, 2005 10:29 am
Posts: 285
Location: Almassera/Valencia/Spain/EU/Earth/Solar system/Milky Way/Local Group/Virgo Supercluster
don't use 'group' as an alias, cause it's an HQL keyword and hibernate gets confused.

Try with this:
Code:
<query name="all.groups.full">
<![CDATA[
from
   com.spx.groupbuilder.beans.Group as grup
   left outer join fetch grup.administrators
order by
   grup.name
]]>
</query>


Top
 Profile  
 
 Post subject: Oh geez...
PostPosted: Mon Jun 05, 2006 10:47 am 
Newbie

Joined: Tue Mar 14, 2006 3:20 pm
Posts: 14
I knew it was something simple and stupid (on my part).

Thanks everyone for the help!
Eric


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