-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: Path expected for join
PostPosted: Fri Jun 04, 2010 4:23 am 
Newbie

Joined: Thu Jun 03, 2010 6:03 am
Posts: 5
I have 2 class

HSQL:select c.ItemCode from CurrentlyInfo c left outer join Blpsitm b with c.ItemCode=b.ItemCode

Blpsitm.hbm.xml
Code:
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
  <class name="com.ikcSoft.Lilly.CBL.BLL.Blpsitm.Blpsitm, com.ikcSoft.Lilly.CBL.BLL" table="Blpsitm">
    <id name="ItemCode" type="string" length="7" />
    <property name="Registered" type="string" length="50" />
    <property name="Licensedid" type="string" length="50" />
    <property name="DrugName" type="string" length="50" />
    <property name="Drugddetall1" type="string" length="50" />
    <property name="Drugddetall2" type="string" length="50" />
    <property name="Spec1" type="string" length="50" />
    <property name="Spec2" type="string" length="50" />
    <property name="Spec3" type="string" length="50" />
    <property name="Quantity" type="string" length="30" />
    <property name="Label" type="string" length="50" />
    <property name="ID" type="string" length="5" />
    <property name="DrugName_Eng" type="string" length="50" />
    <property name="DrugdDetail1_Eng" type="string" length="50" />
    <property name="DrugdDetail2_Eng" type="string" length="100" />
    <property name="Produced_By" type="string" length="5000" />
    <property name="Bunch" type="integer" />
    <property name="Keep_Notes" type="string" length="255" />
    <property name="AddBy" type="string" length="7"/>
    <property name="AddDTTM" type="date" />
    <property name="AddIP" type="string" length="255"/>
    <property name="EditBy" type="string" length="7"/>
    <property name="EditDTTM" type="date" />
    <property name="EditIP" type="string" length="255"/>
  </class>
</hibernate-mapping>



CurrentlyInfo.hbm.xml

Code:
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
  <class name="com.ikcSoft.Lilly.CBL.BLL.CurrentlyInfo.CurrentlyInfo, com.ikcSoft.Lilly.CBL.BLL" table="CurrentlyInfo">
    <id name="ProLotNo" type="string" length="10" />
    <property name="OrgLotNo" type="string" length="50"/>
    <property name="ItemCode" type="string" length="7"/>
    <property name="MfgDate" type="date" />
    <property name="ExpDate" type="date" />
    <property name="Pacdate" type="date" />
    <property name="SoldTo" type="string" length="1000" />
    <property name="Bunch" type="integer" />
    <property name="SpecialSet" type="character" length="2" />
    <property name="Status" type="string" length="2" />
    <property name="AddBy" type="string" length="1"/>
    <property name="AddDTTM" type="date" />
    <property name="AddIP" type="string" length="255"/>
    <property name="EditBy" type="string" length="7"/>
    <property name="EditDTTM" type="date" />
    <property name="EditIP" type="string" length="255"/>
  </class>
</hibernate-mapping>


i get the error:Path expected for join
anybody, who can help me, tks.


Last edited by amaxman on Fri Jun 04, 2010 4:26 am, edited 1 time in total.

Top
 Profile  
 
 Post subject: detail of error
PostPosted: Fri Jun 04, 2010 4:24 am 
Newbie

Joined: Thu Jun 03, 2010 6:03 am
Posts: 5
“CBL.vshost.exe”(托管): 已加载“C:\WINDOWS\assembly\GAC_MSIL\System.Windows.Forms.resources\2.0.0.0_zh-CHS_b77a5c561934e089\System.Windows.Forms.resources.dll”
在 NHibernate.Hql.Ast.ANTLR.SemanticException 中第一次偶然出现的“NHibernate.dll”类型的异常
“CBL.vshost.exe”(托管): 已加载“C:\WINDOWS\assembly\GAC_MSIL\System.Transactions.resources\2.0.0.0_zh-CHS_b77a5c561934e089\System.Transactions.resources.dll”
System.Transactions Critical: 0 : <TraceRecord xmlns="http://schemas.microsoft.com/2004/10/E2ETraceEvent/TraceRecord" Severity="Critical"><TraceIdentifier>http://msdn.microsoft.com/TraceCodes/System/ActivityTracing/2004/07/Reliability/Exception/Unhandled</TraceIdentifier><Description>未处理的异常</Description><AppDomain>CBL.vshost.exe</AppDomain><Exception><ExceptionType>NHibernate.Hql.Ast.ANTLR.SemanticException, NHibernate, Version=2.1.2.4000, Culture=neutral, PublicKeyToken=aa95f207798dfdb4</ExceptionType><Message>Path expected for join! [select c.ItemCode from com.ikcSoft.Lilly.CBL.BLL.CurrentlyInfo.CurrentlyInfo c left outer join Blpsitm b with c.ItemCode=b.ItemCode]</Message><StackTrace> 在 NHibernate.Hql.Ast.ANTLR.HqlSqlWalker.CreateFromJoinElement(IASTNode path, IASTNode alias, Int32 joinType, IASTNode fetchNode, IASTNode propertyFetch, IASTNode with)
在 NHibernate.Hql.Ast.ANTLR.HqlSqlWalker.joinElement()
在 NHibernate.Hql.Ast.ANTLR.HqlSqlWalker.fromElement()
在 NHibernate.Hql.Ast.ANTLR.HqlSqlWalker.fromElementList()
在 NHibernate.Hql.Ast.ANTLR.HqlSqlWalker.fromClause()
在 NHibernate.Hql.Ast.ANTLR.HqlSqlWalker.unionedQuery()
在 NHibernate.Hql.Ast.ANTLR.HqlSqlWalker.query()
在 NHibernate.Hql.Ast.ANTLR.HqlSqlWalker.selectStatement()
在 NHibernate.Hql.Ast.ANTLR.HqlSqlWalker.statement()
在 NHibernate.Hql.Ast.ANTLR.HqlSqlTranslator.Translate()
在 NHibernate.Hql.Ast.ANTLR.QueryTranslatorImpl.Analyze(HqlParseEngine parser, String collectionRole)
在 NHibernate.Hql.Ast.ANTLR.QueryTranslatorImpl.DoCompile(IDictionary`2 replacements, Boolean shallow, String collectionRole)
在 NHibernate.Hql.Ast.ANTLR.QueryTranslatorImpl.Compile(IDictionary`2 replacements, Boolean shallow)
在 NHibernate.Engine.Query.HQLQueryPlan..ctor(String hql, String collectionRole, Boolean shallow, IDictionary`2 enabledFilters, ISessionFactoryImplementor factory)
在 NHibernate.Engine.Query.HQLQueryPlan..ctor(String hql, Boolean shallow, IDictionary`2 enabledFilters, ISessionFactoryImplementor factory)
在 NHibernate.Engine.Query.QueryPlanCache.GetHQLQueryPlan(String queryString, Boolean shallow, IDictionary`2 enabledFilters)
在 NHibernate.Impl.AbstractSessionImpl.GetHQLQueryPlan(String query, Boolean shallow)
在 NHibernate.Impl.AbstractSessionImpl.CreateQuery(String queryString)
在 com.ikcsoft.Lilly.CBL.DAL.Connection`1.QueryList(String hsql) 位置 E:\IKCSoft\Project\Lillychina\CBL\Source\com.ikcsoft.Lilly.CBL.DAL\Connection.cs:行号 43
在 com.ikcSoft.Lilly.Imprinting.FrmImprintingReprint.btSearch_Click(Object sender, EventArgs e) 位置 E:\IKCSoft\Project\Lillychina\CBL\Source\CBL\Imprinting\FrmImprintingReprint.cs:行号 75
在 System.Windows.Forms.Control.OnClick(EventArgs e)
在 System.Windows.Forms.Button.OnClick(EventArgs e)
在 System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
在 System.Windows.Forms.Control.WmMouseUp(Message&amp;amp; m, MouseButtons button, Int32 clicks)
在 System.Windows.Forms.Control.WndProc(Message&amp;amp; m)
在 System.Windows.Forms.ButtonBase.WndProc(Message&amp;amp; m)
在 System.Windows.Forms.Button.WndProc(Message&amp;amp; m)
在 System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message&amp;amp; m)
在 System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message&amp;amp; m)
在 System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
在 System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG&amp;amp; msg)
在 System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
在 System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
在 System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
在 System.Windows.Forms.Application.RunDialog(Form form)
在 System.Windows.Forms.Form.ShowDialog(IWin32Window owner)
在 System.Windows.Forms.Form.ShowDialog()
在 com.ikcSoft.Lilly.FrmLogin.btLogin_Click(Object sender, EventArgs e) 位置 E:\IKCSoft\Project\Lillychina\CBL\Source\CBL\FrmLogin.cs:行号 42
在 System.Windows.Forms.Control.OnClick(EventArgs e)
在 DevComponents.DotNetBar.ButtonX.OnClick(EventArgs e)
在 DevComponents.DotNetBar.ButtonX.OnMouseUp(MouseEventArgs e)
在 System.Windows.Forms.Control.WmMouseUp(Message&amp;amp; m, MouseButtons button, Int32 clicks)
在 System.Windows.Forms.Control.WndProc(Message&amp;amp; m)
在 DevComponents.DotNetBar.PopupItemControl.WndProc(Message&amp;amp; m)
在 System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message&amp;amp; m)
在 System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message&amp;amp; m)
在 System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
在 System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG&amp;amp; msg)
在 System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
在 System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
在 System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
在 System.Windows.Forms.Application.Run(Form mainForm)
在 CBL.Program.Main() 位置 E:\IKCSoft\Project\Lillychina\CBL\Source\CBL\Program.cs:行号 20
在 System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
在 System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
在 Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
在 System.Threading.ThreadHelper.ThreadStart_Context(Object state)
在 System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
在 System.Threading.ThreadHelper.ThreadStart()</StackTrace><ExceptionString>NHibernate.Hql.Ast.ANTLR.SemanticException: Path expected for join! [select c.ItemCode from com.ikcSoft.Lilly.CBL.BLL.CurrentlyInfo.CurrentlyInfo c left outer join Blpsitm b with c.ItemCode=b.ItemCode]
在 NHibernate.Hql.Ast.ANTLR.HqlSqlWalker.CreateFromJoinElement(IASTNode path, IASTNode alias, Int32 joinType, IASTNode fetchNode, IASTNode propertyFetch, IASTNode with)
在 NHibernate.Hql.Ast.ANTLR.HqlSqlWalker.joinElement()
在 NHibernate.Hql.Ast.ANTLR.HqlSqlWalker.fromElement()
在 NHibernate.Hql.Ast.ANTLR.HqlSqlWalker.fromElementList()
在 NHibernate.Hql.Ast.ANTLR.HqlSqlWalker.fromClause()
在 NHibernate.Hql.Ast.ANTLR.HqlSqlWalker.unionedQuery()
在 NHibernate.Hql.Ast.ANTLR.HqlSqlWalker.query()
在 NHibernate.Hql.Ast.ANTLR.HqlSqlWalker.selectStatement()
在 NHibernate.Hql.Ast.ANTLR.HqlSqlWalker.statement()
在 NHibernate.Hql.Ast.ANTLR.HqlSqlTranslator.Translate()
在 NHibernate.Hql.Ast.ANTLR.QueryTranslatorImpl.Analyze(HqlParseEngine parser, String collectionRole)
在 NHibernate.Hql.Ast.ANTLR.QueryTranslatorImpl.DoCompile(IDictionary`2 replacements, Boolean shallow, String collectionRole)
在 NHibernate.Hql.Ast.ANTLR.QueryTranslatorImpl.Compile(IDictionary`2 replacements, Boolean shallow)
在 NHibernate.Engine.Query.HQLQueryPlan..ctor(String hql, String collectionRole, Boolean shallow, IDictionary`2 enabledFilters, ISessionFactoryImplementor factory)
在 NHibernate.Engine.Query.HQLQueryPlan..ctor(String hql, Boolean shallow, IDictionary`2 enabledFilters, ISessionFactoryImplementor factory)
在 NHibernate.Engine.Query.QueryPlanCache.GetHQLQueryPlan(String queryString, Boolean shallow, IDictionary`2 enabledFilters)
在 NHibernate.Impl.AbstractSessionImpl.GetHQLQueryPlan(String query, Boolean shallow)
在 NHibernate.Impl.AbstractSessionImpl.CreateQuery(String queryString)
在 com.ikcsoft.Lilly.CBL.DAL.Connection`1.QueryList(String hsql) 位置 E:\IKCSoft\Project\Lillychina\CBL\Source\com.ikcsoft.Lilly.CBL.DAL\Connection.cs:行号 43
在 com.ikcSoft.Lilly.Imprinting.FrmImprintingReprint.btSearch_Click(Object sender, EventArgs e) 位置 E:\IKCSoft\Project\Lillychina\CBL\Source\CBL\Imprinting\FrmImprintingReprint.cs:行号 75
在 System.Windows.Forms.Control.OnClick(EventArgs e)
在 System.Windows.Forms.Button.OnClick(EventArgs e)
在 System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
在 System.Windows.Forms.Control.WmMouseUp(Message&amp;amp; m, MouseButtons button, Int32 clicks)
在 System.Windows.Forms.Control.WndProc(Message&amp;amp; m)
在 System.Windows.Forms.ButtonBase.WndProc(Message&amp;amp; m)
在 System.Windows.Forms.Button.WndProc(Message&amp;amp; m)
在 System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message&amp;amp; m)
在 System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message&amp;amp; m)
在 System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
在 System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG&amp;amp; msg)
在 System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
在 System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
在 System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
在 System.Windows.Forms.Application.RunDialog(Form form)
在 System.Windows.Forms.Form.ShowDialog(IWin32Window owner)
在 System.Windows.Forms.Form.ShowDialog()
在 com.ikcSoft.Lilly.FrmLogin.btLogin_Click(Object sender, EventArgs e) 位置 E:\IKCSoft\Project\Lillychina\CBL\Source\CBL\FrmLogin.cs:行号 42
在 System.Windows.Forms.Control.OnClick(EventArgs e)
在 DevComponents.DotNetBar.ButtonX.OnClick(EventArgs e)
在 DevComponents.DotNetBar.ButtonX.OnMouseUp(MouseEventArgs e)
在 System.Windows.Forms.Control.WmMouseUp(Message&amp;amp; m, MouseButtons button, Int32 clicks)
在 System.Windows.Forms.Control.WndProc(Message&amp;amp; m)
在 DevComponents.DotNetBar.PopupItemControl.WndProc(Message&amp;amp; m)
在 System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message&amp;amp; m)
在 System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message&amp;amp; m)
在 System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
在 System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG&amp;amp; msg)
在 System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
在 System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
在 System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
在 System.Windows.Forms.Application.Run(Form mainForm)
在 CBL.Program.Main() 位置 E:\IKCSoft\Project\Lillychina\CBL\Source\CBL\Program.cs:行号 20
在 System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
在 System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
在 Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
在 System.Threading.ThreadHelper.ThreadStart_Context(Object state)
在 System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
在 System.Threading.ThreadHelper.ThreadStart()</ExceptionString></Exception></TraceRecord>


Top
 Profile  
 
 Post subject: Re: Path expected for join
PostPosted: Sun Jun 06, 2010 1:21 pm 
Newbie

Joined: Thu Jun 03, 2010 6:03 am
Posts: 5
Anybody who can reply this?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.