java.lang.ClassCastException: java.lang.Integer

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • STR: 1) Alter a level property to use the captionColumn attribute to use a column in the DB whose data type is an integer (and probably other non-string types) 2) Use an application that takes advantage of the captionColumn attribute 3) An exception similar to the following will occur: java.lang.ClassCastException: java.lang.Integer at mondrian.rolap.RolapMember.getName(RolapMember.java:377) at org.freeolap.olap.mondrian.MondrianCube.fillMembers(MondrianCube.java:172) at org.freeolap.olap.mondrian.MondrianCube.fillMembers(MondrianCube.java:178) at org.freeolap.olap.mondrian.MondrianCube.fillMembers(MondrianCube.java:178) at org.freeolap.olap.mondrian.MondrianCube.fillMembers(MondrianCube.java:178) at org.freeolap.olap.mondrian.MondrianCube.fillMembers(MondrianCube.java:178) at org.freeolap.olap.mondrian.MondrianCube.exploreCube(MondrianCube.java:140) at org.freeolap.olap.mondrian.MondrianCube.connect(MondrianCube.java:81) at org.freeolap.FreeOlapPlugin.doConnect(FreeOlapPlugin.java:162) at org.freeolap.FreeOlapPlugin.connect(FreeOlapPlugin.java:129) at org.freeolap.ApplicationWorkbenchWindowAdvisor.postWindowOpen(ApplicationWorkbenchWindowAdvisor.java:62) at org.eclipse.ui.internal.WorkbenchWindow.fireWindowOpened(WorkbenchWindow.java:1128) at org.eclipse.ui.internal.WorkbenchWindow.open(WorkbenchWindow.java:685) at org.eclipse.ui.internal.Workbench.busyOpenWorkbenchWindow(Workbench.java:819) at org.eclipse.ui.internal.Workbench.doOpenFirstTimeWindow(Workbench.java:1453) at org.eclipse.ui.internal.Workbench.access$10(Workbench.java:1451) at org.eclipse.ui.internal.Workbench$17.run(Workbench.java:1415) at org.eclipse.ui.internal.Workbench.runStartupWithProgress(Workbench.java:1430) at org.eclipse.ui.internal.Workbench.openFirstTimeWindow(Workbench.java:1413) at org.eclipse.ui.internal.WorkbenchConfigurer.openFirstTimeWindow(WorkbenchConfigurer.java:190) at org.eclipse.ui.application.WorkbenchAdvisor.openWindows(WorkbenchAdvisor.java:708) at org.eclipse.ui.internal.Workbench.init(Workbench.java:1101) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1863) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:422) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.freeolap.Application.run(Application.java:20) at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177) 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:585) at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336) at org.eclipse.core.launcher.Main.basicRun(Main.java:280) at org.eclipse.core.launcher.Main.run(Main.java:977) at org.eclipse.core.launcher.Main.main(Main.java:952) In this instance I was using FreeAnalysis. It looks as if getName() is expecting Property.NAME.name to return a string, but if I'm not mistaken it's annoyed because the data type of the column being retrieved is not a string, but I could just be flat wrong because the stack trace says line 377, but 377 occurs between these two functions on a blank line: void makeUniqueName(HierarchyUsage hierarchyUsage) { if (parentMember == null && key != null) { String n = hierarchyUsage.getName(); if (n != null) { String name = keyToString(key); n = Util.quoteMdxIdentifier(n); this.uniqueName = Util.makeFqName(n, name); if (getLogger().isDebugEnabled()) { getLogger().debug("RolapMember.makeUniqueName: uniqueName=" +uniqueName); } } } } private void setUniqueName(Object key) { String name = keyToString(key); this.uniqueName = (parentMember == null) ? Util.makeFqName(getHierarchy(), name) : Util.makeFqName(parentMember, name); } ... which leads me to believe that the current version of FreeAnalysis may have been compiled with an earlier version of mondrian, so I'm really not certain where this error is truly happening. At the very least what I'm asking for is: catch this exception and re-throw it with a more descriptive message. As a last resort I just did a search/replace to remove all captionColumn entries in my schema on the off chance that guess might fix it (after having exhausted all other attempts at fixing it by looking at the other more likely suspects), and it just so happened that it did.
    via by Brian Vandenberg,
  • STR: 1) Alter a level property to use the captionColumn attribute to use a column in the DB whose data type is an integer (and probably other non-string types) 2) Use an application that takes advantage of the captionColumn attribute 3) An exception similar to the following will occur: java.lang.ClassCastException: java.lang.Integer at mondrian.rolap.RolapMember.getName(RolapMember.java:377) at org.freeolap.olap.mondrian.MondrianCube.fillMembers(MondrianCube.java:172) at org.freeolap.olap.mondrian.MondrianCube.fillMembers(MondrianCube.java:178) at org.freeolap.olap.mondrian.MondrianCube.fillMembers(MondrianCube.java:178) at org.freeolap.olap.mondrian.MondrianCube.fillMembers(MondrianCube.java:178) at org.freeolap.olap.mondrian.MondrianCube.fillMembers(MondrianCube.java:178) at org.freeolap.olap.mondrian.MondrianCube.exploreCube(MondrianCube.java:140) at org.freeolap.olap.mondrian.MondrianCube.connect(MondrianCube.java:81) at org.freeolap.FreeOlapPlugin.doConnect(FreeOlapPlugin.java:162) at org.freeolap.FreeOlapPlugin.connect(FreeOlapPlugin.java:129) at org.freeolap.ApplicationWorkbenchWindowAdvisor.postWindowOpen(ApplicationWorkbenchWindowAdvisor.java:62) at org.eclipse.ui.internal.WorkbenchWindow.fireWindowOpened(WorkbenchWindow.java:1128) at org.eclipse.ui.internal.WorkbenchWindow.open(WorkbenchWindow.java:685) at org.eclipse.ui.internal.Workbench.busyOpenWorkbenchWindow(Workbench.java:819) at org.eclipse.ui.internal.Workbench.doOpenFirstTimeWindow(Workbench.java:1453) at org.eclipse.ui.internal.Workbench.access$10(Workbench.java:1451) at org.eclipse.ui.internal.Workbench$17.run(Workbench.java:1415) at org.eclipse.ui.internal.Workbench.runStartupWithProgress(Workbench.java:1430) at org.eclipse.ui.internal.Workbench.openFirstTimeWindow(Workbench.java:1413) at org.eclipse.ui.internal.WorkbenchConfigurer.openFirstTimeWindow(WorkbenchConfigurer.java:190) at org.eclipse.ui.application.WorkbenchAdvisor.openWindows(WorkbenchAdvisor.java:708) at org.eclipse.ui.internal.Workbench.init(Workbench.java:1101) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1863) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:422) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.freeolap.Application.run(Application.java:20) at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177) 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:585) at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336) at org.eclipse.core.launcher.Main.basicRun(Main.java:280) at org.eclipse.core.launcher.Main.run(Main.java:977) at org.eclipse.core.launcher.Main.main(Main.java:952) In this instance I was using FreeAnalysis. It looks as if getName() is expecting Property.NAME.name to return a string, but if I'm not mistaken it's annoyed because the data type of the column being retrieved is not a string, but I could just be flat wrong because the stack trace says line 377, but 377 occurs between these two functions on a blank line: void makeUniqueName(HierarchyUsage hierarchyUsage) { if (parentMember == null && key != null) { String n = hierarchyUsage.getName(); if (n != null) { String name = keyToString(key); n = Util.quoteMdxIdentifier(n); this.uniqueName = Util.makeFqName(n, name); if (getLogger().isDebugEnabled()) { getLogger().debug("RolapMember.makeUniqueName: uniqueName=" +uniqueName); } } } } private void setUniqueName(Object key) { String name = keyToString(key); this.uniqueName = (parentMember == null) ? Util.makeFqName(getHierarchy(), name) : Util.makeFqName(parentMember, name); } ... which leads me to believe that the current version of FreeAnalysis may have been compiled with an earlier version of mondrian, so I'm really not certain where this error is truly happening. At the very least what I'm asking for is: catch this exception and re-throw it with a more descriptive message. As a last resort I just did a search/replace to remove all captionColumn entries in my schema on the off chance that guess might fix it (after having exhausted all other attempts at fixing it by looking at the other more likely suspects), and it just so happened that it did.
    via by Brian Vandenberg,
  • Jasperanalysis error | Jaspersoft Community
    via by Unknown author,
    • java.lang.ClassCastException: java.lang.Integer at mondrian.rolap.RolapMember.getName(RolapMember.java:377) at org.freeolap.olap.mondrian.MondrianCube.fillMembers(MondrianCube.java:172) at org.freeolap.olap.mondrian.MondrianCube.fillMembers(MondrianCube.java:178) at org.freeolap.olap.mondrian.MondrianCube.fillMembers(MondrianCube.java:178) at org.freeolap.olap.mondrian.MondrianCube.fillMembers(MondrianCube.java:178) at org.freeolap.olap.mondrian.MondrianCube.fillMembers(MondrianCube.java:178) at org.freeolap.olap.mondrian.MondrianCube.exploreCube(MondrianCube.java:140) at org.freeolap.olap.mondrian.MondrianCube.connect(MondrianCube.java:81) at org.freeolap.FreeOlapPlugin.doConnect(FreeOlapPlugin.java:162) at org.freeolap.FreeOlapPlugin.connect(FreeOlapPlugin.java:129) at org.freeolap.ApplicationWorkbenchWindowAdvisor.postWindowOpen(ApplicationWorkbenchWindowAdvisor.java:62) at org.eclipse.ui.internal.WorkbenchWindow.fireWindowOpened(WorkbenchWindow.java:1128) at org.eclipse.ui.internal.WorkbenchWindow.open(WorkbenchWindow.java:685) at org.eclipse.ui.internal.Workbench.busyOpenWorkbenchWindow(Workbench.java:819) at org.eclipse.ui.internal.Workbench.doOpenFirstTimeWindow(Workbench.java:1453) at org.eclipse.ui.internal.Workbench.access$10(Workbench.java:1451) at org.eclipse.ui.internal.Workbench$17.run(Workbench.java:1415) at org.eclipse.ui.internal.Workbench.runStartupWithProgress(Workbench.java:1430) at org.eclipse.ui.internal.Workbench.openFirstTimeWindow(Workbench.java:1413) at org.eclipse.ui.internal.WorkbenchConfigurer.openFirstTimeWindow(WorkbenchConfigurer.java:190) at org.eclipse.ui.application.WorkbenchAdvisor.openWindows(WorkbenchAdvisor.java:708) at org.eclipse.ui.internal.Workbench.init(Workbench.java:1101) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1863) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:422) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.freeolap.Application.run(Application.java:20) at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177) 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:585) at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336) at org.eclipse.core.launcher.Main.basicRun(Main.java:280) at org.eclipse.core.launcher.Main.run(Main.java:977) at org.eclipse.core.launcher.Main.main(Main.java:952)
    No Bugmate found.