• 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

java.lang.NoClassDefFoundError: org/apache/commons/codec/binary/Base64

 
Ranch Hand
Posts: 851
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

I have dedicated server with RHE

When its running the program then its throwing the following error:



What I did is:

1) I placed base64coder.jar in /WEB-INF/lib
2) I also copies the file to jdk/jre/lib/ext
3) I un-jar and made folder org/apache/commons/codec/binary/Base64/Base64Coder.class in /WEB-INF/classes

Nothing worked so far. Please help me

Thanks & best regards


 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
(1) Is all you need to do.

If that's not working then either: (a) the class isn;t in the jar file, or (b) your web app is structured incorrectly such that the lib folder isn't getting loaded.

I have dedicated server with RHE


I have no idea what this means.
 
Farakh khan
Ranch Hand
Posts: 851
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I un-jar and class exist
How can I check that lib folder is loaded or not?

thanks for replying
 
Farakh khan
Ranch Hand
Posts: 851
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is Tomcat log

 
Saloon Keeper
Posts: 7582
176
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What is "base64coder.jar"? It sure doesn't sound like the name of an Apache Commons jar file (which would be something like commons-codec-1.5.jar).

org/apache/commons/codec/binary/Base64/Base64Coder.class


The Commons Codec library has no such class - what is that supposed to be?
 
Farakh khan
Ranch Hand
Posts: 851
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Tim Moores wrote:What is "base64coder.jar"? It sure doesn't sound like the name of an Apache Commons jar file (which would be something like commons-codec-1.5.jar).



Dear Bear Bibeault & Tim Moores,

Thanks from the bottom of my heart.

You are right Tim Moores.
The problem was jar file. When I checked the unjar package then this was biz_source_code_Base64 package instead of org.apache.....

Problem fixed

Best regards
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I added tomcat-util.jar to the class path and that made it work (it contains the codec class)

build.xml

<path id="catalina-ant-classpath">
<!-- We need the Catalina jars for Tomcat -->
<!-- * for other app servers - check the docs -->
<fileset dir="${appserver.lib}">
<include name="catalina-ant.jar"/>
<include name="tomcat-util.jar"/>
</fileset>
</path>
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic