Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Cast problem

 
Ranch Hand
Posts: 635
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am updated from jboss-4.0.5.GA to jboss-5.1.0.GA, been getting reams of errors an bugs allfun to work through.

Now I am getting this cast error.



com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl is contained in the xercesImpl-2.6.2.jar
and it extends javax.xml.parsers.SAXParserFactory.

Since objectA extends objectB objectA can be cast into objectB.

So although its output as a cast error, there must be another reason, any thoughts any ideas.



 
Tony Evans
Ranch Hand
Posts: 635
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Using jarscan to scan all my jar files I only have one jar xml-apis-1.0.b2.jar that contains javax.xml.parsers.SAXParserFactory

So its not a case of two or morejar files containing javax.xml.parsers.SAXParserFactory.
 
Ranch Hand
Posts: 128
Eclipse IDE Oracle Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please remove any xerces related jar that you have added into the existing JBoss. JBoss 5.1 already contains xerces jars and you don't need to add those jars again which might be old. I had faced the same problem while upgrading from JBoss 4.2 to JBoss 5.1.
 
Tony Evans
Ranch Hand
Posts: 635
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks uttam

Found a or The solution :



Link http://www.mastertheboss.com/jboss-application-server/223-solving-jboss-5-classloading-issues.html

JBoss 5 adds the concepts of custom meta data files, one of which is jboss-classloading.xml
which let you define exactly how the war classloader is constructed.

Added jboss-classloading.xml to C:\appservers\jboss-5.1.0.GA\server\bgifunds\deploy\bgifunds.war\WEB-INF

This sorts out all the class loading problems.
 
uttam kumar
Ranch Hand
Posts: 128
Eclipse IDE Oracle Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes, that's the way to force your own class-loading.
 
I didn't say it. I'm just telling you what this tiny ad said.
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic