[
https://issues.jboss.org/browse/JBIDE-12354?page=com.atlassian.jira.plugi...
]
Max Rydahl Andersen commented on JBIDE-12354:
---------------------------------------------
mysql and jdbc driver should not matter here.
its probably dependent of what version of hibernate is on the user classpath, what version
is selected in hibernate configuration in the tools and what kind of mapping is used for
the query parameter.
If Jiri and Denis tries with perfectly aligned versions but Juergen is using H3 with H4
for example things will be different.
Juergen could you provide some more background details?
Query Parameter causes IncompatibleClassChangeError
---------------------------------------------------
Key: JBIDE-12354
URL:
https://issues.jboss.org/browse/JBIDE-12354
Project: Tools (JBoss Tools)
Issue Type: Bug
Components: hibernate
Affects Versions: 3.3.1
Environment: Eclipse Juno JEE edition plus JBoss Tools
3.3.1-2012-07-14_23-57-15-H211
Reporter: Juergen Zimmermann
Assignee: Jiri Peterka
Fix For: 4.0.0.Alpha2
Attachments: hibernate-console.pdf, paramExceptionFix.txt, query-parameter.pdf,
value-not-set.png
When submitting the following query I'm getting a IncompatibleClassChangeError (see
stacktrace below). However, when I replace :id by a long value, then the query works
fine.
select adresse
from Adresse as adresse
where adresse.id = :id
I'm basically getting the same stacktrace when using a string-based query parameter
and the LIKE operator: StringType instead of LongType. I'll attach screenshots to show
the Hibernate 4 configuration for a MySQL database, a successful query with a long value
and a crashing query with a query parameter.
The stacktrace:
java.lang.IncompatibleClassChangeError: Class org.hibernate.type.LongType does not
implement the requested interface org.hibernate.type.Type
at
org.hibernate.param.NamedParameterSpecification.bind(NamedParameterSpecification.java:66)
at org.hibernate.loader.hql.QueryLoader.bindParameterValues(QueryLoader.java:588)
at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1756)
at org.hibernate.loader.Loader.doQuery(Loader.java:828)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:289)
at org.hibernate.loader.Loader.doList(Loader.java:2463)
at org.hibernate.loader.Loader.doList(Loader.java:2449)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2279)
at org.hibernate.loader.Loader.list(Loader.java:2274)
at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:470)
at org.hibernate.hql.internal.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:355)
at org.hibernate.engine.query.spi.HQLQueryPlan.performList(HQLQueryPlan.java:196)
at org.hibernate.internal.SessionImpl.list(SessionImpl.java:1116)
at org.hibernate.internal.QueryImpl.list(QueryImpl.java:101)
at org.jboss.tools.hibernate4_0.HQLQueryPage.getList(HQLQueryPage.java:55)
at
org.hibernate.eclipse.console.views.QueryPageViewer$ContentProviderImpl.getElements(QueryPageViewer.java:120)
at org.eclipse.jface.viewers.StructuredViewer.getRawChildren(StructuredViewer.java:1010)
at org.eclipse.jface.viewers.ColumnViewer.getRawChildren(ColumnViewer.java:703)
at
org.eclipse.jface.viewers.AbstractTableViewer.getRawChildren(AbstractTableViewer.java:1087)
at
org.eclipse.jface.viewers.StructuredViewer.getFilteredChildren(StructuredViewer.java:917)
at
org.eclipse.jface.viewers.StructuredViewer.getSortedChildren(StructuredViewer.java:1067)
at
org.eclipse.jface.viewers.AbstractTableViewer.internalRefreshAll(AbstractTableViewer.java:701)
at
org.eclipse.jface.viewers.AbstractTableViewer.internalRefresh(AbstractTableViewer.java:649)
at
org.eclipse.jface.viewers.AbstractTableViewer.internalRefresh(AbstractTableViewer.java:636)
at org.eclipse.jface.viewers.AbstractTableViewer$2.run(AbstractTableViewer.java:592)
at
org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1443)
at
org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1404)
at
org.eclipse.jface.viewers.AbstractTableViewer.inputChanged(AbstractTableViewer.java:590)
at org.eclipse.jface.viewers.ContentViewer.setInput(ContentViewer.java:280)
at org.eclipse.jface.viewers.StructuredViewer.setInput(StructuredViewer.java:1690)
at
org.hibernate.eclipse.console.views.QueryPageViewer.createTable(QueryPageViewer.java:225)
at
org.hibernate.eclipse.console.views.QueryPageViewer.createControl(QueryPageViewer.java:203)
at
org.hibernate.eclipse.console.views.QueryPageViewer.<init>(QueryPageViewer.java:160)
at
org.hibernate.eclipse.console.views.QueryPageTabView.rebuild(QueryPageTabView.java:109)
at
org.hibernate.eclipse.console.views.QueryPageTabView$1.contentsChanged(QueryPageTabView.java:75)
at
org.hibernate.eclipse.console.views.QueryPageTabView$1.intervalAdded(QueryPageTabView.java:85)
at javax.swing.AbstractListModel.fireIntervalAdded(AbstractListModel.java:148)
at org.hibernate.console.QueryPageModel.add(QueryPageModel.java:67)
at
org.hibernate.console.KnownConfigurations$1.queryPageCreated(KnownConfigurations.java:88)
at
org.hibernate.console.ConsoleConfiguration.fireQueryPageCreated(ConsoleConfiguration.java:332)
at
org.hibernate.console.ConsoleConfiguration.executeHQLQuery(ConsoleConfiguration.java:301)
at org.hibernate.eclipse.hqleditor.HQLEditor.executeQuery(HQLEditor.java:447)
at
org.hibernate.eclipse.console.actions.ExecuteQueryAction.execute(ExecuteQueryAction.java:88)
at
org.hibernate.eclipse.console.actions.ExecuteQueryAction.run(ExecuteQueryAction.java:56)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
at
org.hibernate.eclipse.console.actions.ExecuteQueryAction.runWithEvent(ExecuteQueryAction.java:60)
at
org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
at
org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
at
org.eclipse.jface.action.ActionContributionItem$6.handleEvent(ActionContributionItem.java:452)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4169)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3758)
at
org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1022)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at
org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:916)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:86)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:585)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:540)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira