• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Cast problem

 
Ranch Hand
Posts: 681
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 681
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 681
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
yes, that's the way to force your own class-loading.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic