SDK JAR files - NoClassDefFoundError

Hello,

I’m having a problem building my regular client (not web) application.
It works fine when I run it from my IDE, but when I try to deploy it to a Jar file and then run it through “java -jar application.jar”, I get the following error:

Exception in thread “main” java.lang.NoClassDefFoundError: org/apache/log4j/Category

Can I deploy my application as a single jar file with all BO SDK jars included?

Thanks.


vkamins (BOB member since 2007-10-19)

try adding the commons logging jars directly to your project and the make sure the paths line up correctly in your MANIFEST.

and remember, Google is your friend! refer to the link below for a more detailed discussion …

http://www.qos.ch/logging/classloader.jsp


Atul Chowdhury (BOB member since 2003-07-07)

Hi,

Thanks for your reply.

I tried adding commons-logging.jar and log4j.jar, but I got this error:

log4j:WARN No appenders could be found for logger (com.crystaldecisions.enterprise.ocaframework.ServiceMgr).
log4j:WARN Please initialize the log4j system properly.
Sorry - you could not be logged on to this server.

The application can’t create an Enterprise session manager object, but it works through the IDE.

I spent a better part of my day trying to use Google to find an answer yesterday :slight_smile:

I apologize in advance if this is something simple, I just can’t figure this out.

Thanks.


vkamins (BOB member since 2007-10-19)

what does your complete classpath look like?


Atul Chowdhury (BOB member since 2003-07-07)

The problem was with the classpath!

Thanks for your help and in case someone runs into the same issue…
here’s my classpath that worked.

Class-Path: lib\boconfig.jar lib\cecore.jar
lib\celib.jar lib\ceplugins.jar
lib\cereports.jar lib\cesession.jar lib\ceutils.jar
lib\cexsd.jar lib\corbaidl.jar lib\CRDBJavabeansServer.jar
lib\CRDBJavaServer.jar lib\CRDBJavaServerCommon.jar
lib\CRDBJDBCServer.jar lib\CRDBXMLServer.jar lib\crlov.jar
lib\crlovexternal.jar lib\crlovmanifest.jar
lib\CrystalCharting.jar lib\CrystalCommon.jar
lib\CrystalContentModels.jar lib\CrystalDatabaseConnectors.jar
lib\CrystalExporters.jar lib\CrystalExportingBase.jar
lib\CrystalQueryEngine.jar lib\CrystalReportEngine.jar
lib\dsws-bicatalog.jar lib\dsws-common.jar lib\dsws-publish.jar
lib\dsws-queryservice.jar lib\dsws-reportengine.jar
lib\dsws-session.jar lib\ebus405.jar lib\external
lib\InstallEntSdkWrapper.jar lib\jrcadapter.jar lib\jrcerom.jar
lib\jtools.jar lib\keycodeDecoder.jar lib\MetafileRenderer.jar
lib\rasapp.jar lib\rascore.jar lib\rebean.common.jar
lib\rebean.fc.jar lib\rebean.jar lib\rebean.wi.jar
lib\ReportPrinter.jar
lib\ReportTemplate.jar lib\ReportViewer.jar lib\rpoifs.jar
lib\Serialization.jar lib\softwareInventory.jar lib\taglib
lib\URIUtil.jar lib\webreporting-jsf.jar
lib\webreporting.jar lib\wihtmlgen.zip lib\wilog.jar
lib\external\commons-logging.jar lib\external\log4j.jar


vkamins (BOB member since 2007-10-19)