java.sql.SQLException

Conversion failed when converting the varchar value 'TWO' to data type int.

Samebug tips0

We couldn't find tips for this exception.

Don't give up yet. Paste your full stack trace to get a solution.

Solutions on the web454

  • via Unknown by Eric Belanger,
  • via Unknown by Eric Belanger,
  • via Unknown by Unknown author,
  • Stack trace

    • java.sql.SQLException: Conversion failed when converting the varchar value 'TWO' to data type int. at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:365) at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2781) at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2224) at net.sourceforge.jtds.jdbc.TdsCore.isDataInResultSet(TdsCore.java:792) at net.sourceforge.jtds.jdbc.JtdsResultSet.<init>(JtdsResultSet.java:146) at net.sourceforge.jtds.jdbc.JtdsStatement.executeSQLQuery(JtdsStatement.java:424) at net.sourceforge.jtds.jdbc.JtdsPreparedStatement.executeQuery(JtdsPreparedStatement.java:693) at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:186) at org.hibernate.loader.Loader.getResultSet(Loader.java:1787) at org.hibernate.loader.Loader.doQuery(Loader.java:674) at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236) at org.hibernate.loader.Loader.doList(Loader.java:2220) at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2104) at org.hibernate.loader.Loader.list(Loader.java:2099) at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:378) at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:338) at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172) at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1121) at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79) at org.hibernate.console.HQLQueryPage.getList(HQLQueryPage.java:50) at org.hibernate.eclipse.console.views.QueryPageViewer$ContentProviderImpl.getElements(QueryPageViewer.java:114) at org.eclipse.jface.viewers.StructuredViewer.getRawChildren(StructuredViewer.java:937) at org.eclipse.jface.viewers.ColumnViewer.getRawChildren(ColumnViewer.java:693) at org.eclipse.jface.viewers.AbstractTableViewer.getRawChildren(AbstractTableViewer.java:1071) at org.eclipse.jface.viewers.StructuredViewer.getFilteredChildren(StructuredViewer.java:871) at org.eclipse.jface.viewers.StructuredViewer.getSortedChildren(StructuredViewer.java:994) at org.eclipse.jface.viewers.AbstractTableViewer.internalRefreshAll(AbstractTableViewer.java:685) at org.eclipse.jface.viewers.AbstractTableViewer.internalRefresh(AbstractTableViewer.java:633) at org.eclipse.jface.viewers.AbstractTableViewer.internalRefresh(AbstractTableViewer.java:620) at org.eclipse.jface.viewers.AbstractTableViewer$2.run(AbstractTableViewer.java:576) at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1368) at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1330) at org.eclipse.jface.viewers.AbstractTableViewer.inputChanged(AbstractTableViewer.java:574) at org.eclipse.jface.viewers.ContentViewer.setInput(ContentViewer.java:251) at org.eclipse.jface.viewers.StructuredViewer.setInput(StructuredViewer.java:1606) at org.hibernate.eclipse.console.views.QueryPageViewer.createTable(QueryPageViewer.java:218) at org.hibernate.eclipse.console.views.QueryPageViewer.createControl(QueryPageViewer.java:197) at org.hibernate.eclipse.console.views.QueryPageViewer.<init>(QueryPageViewer.java:154) at org.hibernate.eclipse.console.views.QueryPageTabView.rebuild(QueryPageTabView.java:114) at org.hibernate.eclipse.console.views.QueryPageTabView$1.contentsChanged(QueryPageTabView.java:78) at org.hibernate.eclipse.console.views.QueryPageTabView$1.intervalAdded(QueryPageTabView.java:88) at javax.swing.AbstractListModel.fireIntervalAdded(AbstractListModel.java:130) at org.hibernate.console.QueryPageModel.add(QueryPageModel.java:67) at org.hibernate.console.KnownConfigurations$1.queryPageCreated(KnownConfigurations.java:90) at org.hibernate.console.ConsoleConfiguration.fireQueryPageCreated(ConsoleConfiguration.java:419) at org.hibernate.console.ConsoleConfiguration.access$5(ConsoleConfiguration.java:415) at org.hibernate.console.ConsoleConfiguration$4.execute(ConsoleConfiguration.java:391) at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:65) at org.hibernate.console.ConsoleConfiguration.executeHQLQuery(ConsoleConfiguration.java:383) at org.hibernate.eclipse.hqleditor.HQLEditor.executeQuery(HQLEditor.java:406) at org.hibernate.eclipse.console.actions.ExecuteQueryAction.execute(ExecuteQueryAction.java:72) at org.hibernate.eclipse.console.actions.ExecuteQueryAction.run(ExecuteQueryAction.java:52) at org.eclipse.jface.action.Action.runWithEvent(Action.java:498) at org.hibernate.eclipse.console.actions.ExecuteQueryAction.runWithEvent(ExecuteQueryAction.java:56) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:546) at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:490) at org.eclipse.jface.action.ActionContributionItem$6.handleEvent(ActionContributionItem.java:443) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1101) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3319) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2971) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2389) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2219) at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:461) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:106) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:169) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:508) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:447) at org.eclipse.equinox.launcher.Main.run(Main.java:1173)

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    oddodd
    2 times, last one
    Unknown visitor
    Unknown visitorOnce,
    Unknown visitor
    Unknown visitorOnce,
    ruifungruifung
    Once,
    Unknown visitor
    Unknown visitorOnce,
    24 more bugmates