Home > Cannot Be > Cannot Be Cast To Net.sf.cglib.core.keyfactory

Cannot Be Cast To Net.sf.cglib.core.keyfactory

Please have a look at the libs Jetty is loading at startup and look into your own dependencies. asked 1 year ago viewed 434 times active 1 year ago Related 1NoViableAltException using jpa10trouble deploying .WAR to tomcat0an error when deploying a war file in tomcat 712deploy war file in Now, work just fine. my stack trace follows: jvm 1 | java.lang.ExceptionInInitializerError jvm 1 | at com.thoughtworks.xstream.converters.reflection.CGLIBEnhancedConverter.canConvert(CGLIBEnhancedConverter.java:67) jvm 1 | at com.thoughtworks.xstream.core.DefaultConverterLookup.lookupConverterForType(DefaultConverterLookup.java:60) jvm 1 | at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:65) jvm 1 | at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:59) jvm 1 | Source

Join them; it only takes a minute: Sign up Tomcat: Application errors when multiple WARs deployed up vote 0 down vote favorite I am seeing something very strange after my Tomcat If it is, maybe I can use that point to convince an upgrade. After searching some more I found that cglib_nodep dependency has some class loading issues. I work on a maven project where the version is fixed, so I cannot simply upgrade. http://forum.spring.io/forum/spring-projects/web/flex/65337-an-strange-error-with-net-sf-cglib-core-keyfactory

I wanted to setup transactional support but when adding this to the applicationContext.xml : Code: + +

final String json = "{string:\"foo\"}"; +final HierarchicalStreamDriver driver = new JettisonMappedXmlDriver(); +final StringReader reader = new StringReader(json); +final HierarchicalStreamReader 

DROP TABLE IF EXISTS `mkyongdb`.`customer`; CREATE TABLE `mkyongdb`.`customer` ( `CUSTOMER_ID` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, `NAME` varchar(45) NOT NULL, `ADDRESS` varchar(255) NOT NULL, `CREATED_DATE` datetime NOT NULL, PRIMARY KEY (`CUSTOMER_ID`) ) Login Register FAQ Search View unanswered posts | View active topics Board index All times are UTC - 5 hours [ DST ] Information The requested topic does Hide Permalink Jörg Schaible added a comment - 05/Jul/11 12:23 PM @r351574nc3: Simply open a new issue that describes exactly the scenario where you're facing this problem. It is a workaround because this is not a solution since it only works in one specific scenario.

Second, need to have asm.jar in my lib. could you tell me the versions of: cglib-nodep cglib asm spring that you used in this? This many times fix this kind of issues. Generally speaking, it is a classloader issue that where a workaround can be found by correcting the classpath.

Stack : Code: Factory.java:271) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:312) at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebAp plicationContext.java:134) at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:230) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:156) Have a look at the stack trace, the ClassCastException is thrown somewhere deep down in the sources of CGLIB, XStream simply tries to call a method of a class available in Yes No OK OK Cancel X Skip navigationOracle Community DirectoryOracle Community FAQLog inRegisterMy Oracle Support Community (MOSC)SearchSearchCancelGo Directly To Oracle Technology Network CommunityMy Oracle Support CommunityOPN Cloud ConnectionOracle Employee CommunityOracle User If you agree to our use of cookies, please close this message and continue to use this site.

Home Forum Spring Projects Web Flex This forum is now a read-only archive. here Join us to help others who have the same bug. Have a look at the stack trace, the ClassCastException is thrown somewhere deep down in the sources of CGLIB, XStream simply tries to call a method of a class available in Accept & Close current community chat Stack Overflow Meta Stack Overflow your communities Sign up or log in to customize your list.

Download Source Code Download It - JSF-2-Spring-Hibernate-Integration-Example.zip (19KB)ReferenceJSF 2.0 + Spring integration exampleStruts + Spring + Hibernate integration example Tags : hibernate integration jsf2 springShare this article onTwitterFacebookGoogle+Related Posts About the this contact form Creating a table with FIXED length column widths Newton's second law for individual forces I changed one method signature and broke 25,000 other classes. It does not correct the other scenarios. Edited to add: It seems that on startup, a clean session and the first request to the application throws the following cast exception: SEVERE: Can't instantiate page using constructor public com.company.web.view.purchase.buy.BuyAGiftPage(org.apache.wicket.PageParameters)

The web application uses Spring and JPA/Hibernate but I can´t deploy it. I work on a maven project where the version is fixed, so I cannot simply upgrade. If I deploy all the other applications one by one, I can view the page without issue. have a peek here I excluded this library from the tree, explicitly defined cglib version 2.2 and it cleared things up.

it will read the XML it can write. In multithreaded scenarios with separate classloaders, this issue can occur where registering a converter a cross classloaders will cause this exact issue. Given that I can deploy the applications in a specific order and not see the error, is it possible that Tomcat is responsible for this?

If you have to transform a given + XML into an object graph, you should go the other way round.

Jörg Hide Permalink Jörg Schaible added a comment - 25/Feb/08 4:53 PM Closed after no further comment has been given. This error appear when i put these lines in my applicationContext ile, where it's defined bean for hibernate. It is not always a classpath issue because it is possible to load these remotely. There are some cross-dependencies such as services.

Automated exception search integrated into your IDE Test Samebug Integration for IntelliJ IDEA Root Cause Analysis java.lang.ClassCastException net.sf.cglib.proxy.Enhancer$EnhancerKey$$KeyFactoryByCGLIB$$7fb24d72 cannot be cast to net.sf.cglib.core.KeyFactory at net.sf.cglib.core.KeyFactory$Generator.create() Code Generation Library KeyFactory.create net.sf.cglib.core.KeyFactory$Generator.create(KeyFactory.java:145) net.sf.cglib.core.KeyFactory.create(KeyFactory.java:117) Code: test.Zone My Zone class look's like this: Code: package test; import javax.persistence.*; @Entity @Table(name = "zone") public class Zone { @Id @Column(name = "zonaId") private Table ScriptCreate a customer table and insert 2 dummy records. http://electrictricycle.net/cannot-be/cannot-be-cast-to-javax-ws-rs-core-application.html GBiz is too! Latest News Stories: Docker 1.0Heartbleed Redux: Another Gaping Wound in Web Encryption UncoveredThe Next Circle of Hell: Unpatchable SystemsGit 2.0.0 ReleasedThe Linux Foundation Announces Core Infrastructure

I have 15 applications deployed, and everything seems OK until I try to access a specific page on a specific application. Board index All times are UTC - 5 hours [ DST ] © Copyright 2014, Red Hat Inc. Tank-Fighting Alien Is it acceptable to ask an unknown professor for help in a related field during his office hours? You may provide a different configured instance of the XmlFriendlyReplacer or a complete own implementation, but you must ensure, that the resulting names are valid for XML.


If the + written XML matches your schema, XStream is also able to read it. What now? I got the following error: Failure occurred in the execution of deployment request with ID "1331664873055" for task "30". That didn't seem to make any significant difference.

It does not correct the other scenarios. Is this classloader issue fixed in later versions of xstream? If you like my tutorials, consider make a donation to these charities.Popular PostsLoading...Comments ← Older Comments →Pingback: Pam Preston Mize()Pingback: disney casting calls()Pingback: Pam Preston Mize()Pingback: Rayqvon Warren()Pingback: gordonia men free Why had Dumbledore accepted Lupin's resignation?

Follow him on Twitter, or befriend him on Facebook or Google Plus. At the end of the article, you will create a page which display a list of the existing customer from database and a "add customer" function to allow user to add Show 1 reply 1. Fixed in head revision. > ClassDefNotFound for JVM due to default security in Tomcat > ---------------------------------------------------------- > > Key: XSTR-467 > URL: http://jira.codehaus.org/browse/XSTR-467 > Project: XStream > Issue Type: Bug >

Use XStream to transfer your objects into XML. I did notice however, that on a clean start of Tomcat and the first request to the application throws a casting exception.