Saludos a todos,
Recurro a ustedes porque no he encontrado a que se debe este error.
Tengo la siguiente consulta:
return (List<Model.Municipio>)NH.Session.CreateQuery(@"
SELECT M FROM Municipio AS M WHERE NOT EXISTS (SELECT UM
FROM Usuario_municipios AS UM JOIN UM.Usuarios AS U
WHERE U.Idusuario = :usuario AND UM.Municipio = M")
.SetParameter("usuario",
_Usuario.Idusuario).List<Model.Municipio>();
Pero me esta retornando el siguiente error, alguna idea que me ayude a
solucionarlo
No se controló NHibernate.Hql.Ast.ANTLR.QuerySyntaxException
Message="Se produjo una excepción de tipo
'Antlr.Runtime.MismatchedTokenException'."
Source="NHibernate"
StackTrace:
en NHibernate.Hql.Ast.ANTLR.ErrorCounter.ThrowQueryException()
en NHibernate.Hql.Ast.ANTLR.HqlParseEngine.Parse()
en
NHibernate.Hql.Ast.ANTLR.ASTQueryTranslatorFactory.CreateQueryTranslators(String
queryString, String collectionRole, Boolean shallow, IDictionary`2 filters,
ISessionFactoryImplementor factory)
en
NHibernate.Engine.Query.HQLStringQueryPlan.CreateTranslators(String hql,
String collectionRole, Boolean shallow, IDictionary`2 enabledFilters,
ISessionFactoryImplementor factory)
en NHibernate.Engine.Query.HQLStringQueryPlan..ctor(String hql,
String collectionRole, Boolean shallow, IDictionary`2 enabledFilters,
ISessionFactoryImplementor factory)
en NHibernate.Engine.Query.HQLStringQueryPlan..ctor(String hql,
Boolean shallow, IDictionary`2 enabledFilters, ISessionFactoryImplementor
factory)
en NHibernate.Engine.Query.QueryPlanCache.GetHQLQueryPlan(String
queryString, Boolean shallow, IDictionary`2 enabledFilters)
en NHibernate.Impl.AbstractSessionImpl.GetHQLQueryPlan(String query,
Boolean shallow)
en NHibernate.Impl.AbstractSessionImpl.CreateQuery(String
queryString)
en SICCA_Lib.BLL.MunicipioBLL.ListarDisponibles(Usuarios _Usuario)
en D:\Documentos\Visual Studio
2008\Projects\SICCA\SICCA_Lib\BLL\Municipio.cs:línea 66
en
SICCA_Seguridad.Operaciones.PermisosMunicipioXtraForm.RefreshData() en
D:\Documentos\Visual Studio
2008\Projects\SICCA\SICCA_Seguridad\Operaciones\PermisosMunicipioXtraForm.cs:línea
41
en
SICCA_Seguridad.Operaciones.PermisosMunicipioXtraForm.GrupoLookUpEdit_EditValueChanged(Object
sender, EventArgs e) en D:\Documentos\Visual Studio
2008\Projects\SICCA\SICCA_Seguridad\Operaciones\PermisosMunicipioXtraForm.cs:línea
93
en
DevExpress.XtraEditors.Repository.RepositoryItem.RaiseEditValueChangedCore(EventArgs
e)
en
DevExpress.XtraEditors.Repository.RepositoryItem.RaiseEditValueChanged(EventArgs
e)
en DevExpress.XtraEditors.BaseEdit.RaiseEditValueChanged()
en DevExpress.XtraEditors.BaseEdit.OnEditValueChanged()
en DevExpress.XtraEditors.TextEdit.OnEditValueChanged()
en DevExpress.XtraEditors.LookUpEdit.OnEditValueChanged()
en
DevExpress.XtraEditors.BaseEdit.OnEditValueChanging(ChangingEventArgs e)
en
DevExpress.XtraEditors.LookUpEdit.OnEditValueChanging(ChangingEventArgs e)
en DevExpress.XtraEditors.BaseEdit.set_EditValue(Object value)
en
SICCA_Seguridad.Operaciones.PermisosMunicipioXtraForm..ctor(Usuarios
_Usuario) en D:\Documentos\Visual Studio
2008\Projects\SICCA\SICCA_Seguridad\Operaciones\PermisosMunicipioXtraForm.cs:línea
28
en
SICCA_Seguridad.Catalogos.UsuarioForm.MunicipioToolStripButton_Click(Object
sender, EventArgs e) en D:\Documentos\Visual Studio
2008\Projects\SICCA\SICCA_Seguridad\Catalogos\UsuarioForm.cs:línea 90
en System.Windows.Forms.ToolStripItem.RaiseEvent(Object key,
EventArgs e)
en System.Windows.Forms.ToolStripButton.OnClick(EventArgs e)
en System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
en System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
en System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs
e, ToolStripItemEventType met)
en System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e,
ToolStripItemEventType met)
en System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
en System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons
button, Int32 clicks)
en System.Windows.Forms.Control.WndProc(Message& m)
en System.Windows.Forms.ScrollableControl.WndProc(Message& m)
en System.Windows.Forms.ToolStrip.WndProc(Message& m)
en
System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
en System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message&
m)
en System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd,
Int32 msg, IntPtr wparam, IntPtr lparam)
en System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG&
msg)
en
System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32
dwComponentID, Int32 reason, Int32 pvLoopData)
en
System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32
reason, ApplicationContext context)
en
System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason,
ApplicationContext context)
en System.Windows.Forms.Application.Run(Form mainForm)
en SICCA__Win.Program.Main() en D:\Documentos\Visual Studio
2008\Projects\SICCA\SICCA__Win\Program.cs:línea 22
en System.AppDomain._nExecuteAssembly(Assembly assembly, String[]
args)
en System.AppDomain.nExecuteAssembly(Assembly assembly, String[]
args)
en System.Runtime.Hosting.ManifestRunner.Run(Boolean checkAptModel)
en System.Runtime.Hosting.ManifestRunner.ExecuteAsAssembly()
en
System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext
activationContext, String[] activationCustomData)
en
System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext
activationContext)
en System.Activator.CreateInstance(ActivationContext
activationContext)
en
Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssemblyDebugInZone()
en System.Threading.ThreadHelper.ThreadStart_Context(Object state)
en System.Threading.ExecutionContext.Run(ExecutionContext
executionContext, ContextCallback callback, Object state)
en System.Threading.ThreadHelper.ThreadStart()
InnerException:
--
*Ing. Josué Acuña*
--
Para escribir al Grupo, hágalo a esta dirección:
[email protected]
Para más, visite: http://groups.google.com/group/NHibernate-Hispano