java.lang.ClassCastException

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.

  • Wanted: Help serializing Generic Maps!
    via by Siegfried Heintze,
  • The default template bundles (see http://confluence.atlassian.com/display/DOC/Confluence+3.2+Release+Notes#Confluence3.2ReleaseNotes-TemplateBundles) are not available and an exception is logged to the log file. How to reproduce: Log in as an admin > Go to the admin console ({{/confluence/admin/console.action}}) and click on "Import Templates". The exception will be written to the log file and the default templates are not available. {code} 2010-10-07 13:00:52,280 WARN [http-8080-6] [opensymphony.xwork.util.OgnlValueStack] findValue Caught an exception while evaluating expression 'availableTemplates' against value stack -- referer: http://tuatara.sydney.atlassian.com:8080/confluence/pages/templates/listpagetemplates.action | url: /confluence/admin/plugins/templatePackage/configurePlugin.action | userName: admin | action: configurePlugin java.lang.RuntimeException: Caught an Ognl exception while getting property availableTemplates at com.opensymphony.xwork.util.CompoundRootAccessor.getProperty(CompoundRootAccessor.java:112) at ognl.OgnlRuntime.getProperty(OgnlRuntime.java:1603) at ognl.ASTProperty.getValueBody(ASTProperty.java:96) at ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:171) at ognl.SimpleNode.getValue(SimpleNode.java:193) at ognl.Ognl.getValue(Ognl.java:333) at ognl.Ognl.getValue(Ognl.java:310) at com.opensymphony.xwork.util.OgnlValueStack.findValue(OgnlValueStack.java:141) at com.opensymphony.webwork.views.velocity.WebWorkVelocityContext.internalGet(WebWorkVelocityContext.java:72) at org.apache.velocity.context.AbstractContext.get(AbstractContext.java:193) at org.apache.velocity.context.InternalContextAdapterImpl.get(InternalContextAdapterImpl.java:286) at org.apache.velocity.runtime.parser.node.ASTReference.getVariableValue(ASTReference.java:823) at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:212) at org.apache.velocity.runtime.parser.node.ASTReference.value(ASTReference.java:487) at org.apache.velocity.runtime.directive.Foreach.render(Foreach.java:280) at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:175) at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72) at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:336) at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:106) {code} It gets interesting further down: {code} java.lang.ClassCastException: com.sun.xml.bind.v2.runtime.JAXBContextImpl cannot be cast to javax.xml.bind.JAXBContext at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:150) at javax.xml.bind.ContextFinder.find(ContextFinder.java:286) at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:372) at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:337) at com.atlassian.confluence.plugin.templates.packages.DefaultTemplatesPackage.getAvailableTemplates(DefaultTemplatesPackage.java:26) 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.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307) at org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:58) at org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:62) {code}
    via by Stefan Saasen,
    • java.lang.ClassCastException: sun.reflect.generics.reflectiveObjects.GenericArrayTypeImpl cannot be cast to java.lang.Class at com.sun.xml.internal.bind.v2.model.impl.RuntimeModelBuilder.createArrayInfo(Unknown Source) at com.sun.xml.internal.bind.v2.model.impl.RuntimeModelBuilder.createArrayInfo(Unknown Source) at com.sun.xml.internal.bind.v2.model.impl.ModelBuilder.getTypeInfo(Unknown Source) at com.sun.xml.internal.bind.v2.model.impl.TypeRefImpl.calcRef(Unknown Source) at com.sun.xml.internal.bind.v2.model.impl.TypeRefImpl.getTarget(Unknown Source) at com.sun.xml.internal.bind.v2.model.impl.RuntimeTypeRefImpl.getTarget(Unknown Source) at com.sun.xml.internal.bind.v2.model.impl.RuntimeTypeRefImpl.getTarget(Unknown Source) at com.sun.xml.internal.bind.v2.model.impl.ElementPropertyInfoImpl$1.get(Unknown Source) at com.sun.xml.internal.bind.v2.model.impl.ElementPropertyInfoImpl$1.get(Unknown Source) at java.util.AbstractList$Itr.next(Unknown Source) at com.sun.xml.internal.bind.v2.model.impl.ModelBuilder.getClassInfo(Unknown Source) at com.sun.xml.internal.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(Unknown Source) at com.sun.xml.internal.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(Unknown Source) at com.sun.xml.internal.bind.v2.model.impl.ModelBuilder.getClassInfo(Unknown Source) at com.sun.xml.internal.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(Unknown Source) at com.sun.xml.internal.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(Unknown Source) at com.sun.xml.internal.bind.v2.model.impl.ModelBuilder.getTypeInfo(Unknown Source) at com.sun.xml.internal.bind.v2.model.impl.TypeRefImpl.calcRef(Unknown Source) at com.sun.xml.internal.bind.v2.model.impl.TypeRefImpl.getTarget(Unknown Source) at com.sun.xml.internal.bind.v2.model.impl.RuntimeTypeRefImpl.getTarget(Unknown Source) at com.sun.xml.internal.bind.v2.model.impl.RuntimeTypeRefImpl.getTarget(Unknown Source) at com.sun.xml.internal.bind.v2.model.impl.ElementPropertyInfoImpl$1.get(Unknown Source) at com.sun.xml.internal.bind.v2.model.impl.ElementPropertyInfoImpl$1.get(Unknown Source) at java.util.AbstractList$Itr.next(Unknown Source) at com.sun.xml.internal.bind.v2.model.impl.ModelBuilder.getClassInfo(Unknown Source) at com.sun.xml.internal.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(Unknown Source) at com.sun.xml.internal.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(Unknown Source) at com.sun.xml.internal.bind.v2.model.impl.ModelBuilder.getClassInfo(Unknown Source) at com.sun.xml.internal.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(Unknown Source) at com.sun.xml.internal.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(Unknown Source) at com.sun.xml.internal.bind.v2.model.impl.ModelBuilder.getTypeInfo(Unknown Source) at com.sun.xml.internal.bind.v2.model.impl.ModelBuilder.getTypeInfo(Unknown Source) at com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(Unknown Source) at com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl.<init>(Unknown Source) at com.sun.xml.internal.bind.v2.ContextFactory.createContext(Unknown Source) at com.sun.xml.internal.bind.v2.ContextFactory.createContext(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at javax.xml.bind.ContextFinder.newInstance(Unknown Source) at javax.xml.bind.ContextFinder.find(Unknown Source) at javax.xml.bind.JAXBContext.newInstance(Unknown Source) at javax.xml.bind.JAXBContext.newInstance(Unknown Source) at com.heintze.DemoMaps.main(DemoMaps.java:108)
    No Bugmate found.