Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9283167
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T18:33:42+00:00 2026-06-18T18:33:42+00:00

I have a jar file which has the beans defined in applicationContext.xml. I have

  • 0

I have a jar file which has the beans defined in applicationContext.xml. I have added the jar file to the lib directory and also modified my build config to

runtime “content:content-examiner-data:1.0”

I have defined the beans in the resource.groovy as follows

beans = {

importBeans("classpath*:/applicationContext.xml")

}

The bean definitions are as follows

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:mongo="http://www.springframework.org/schema/data/mongo"
    xmlns:context="http://www.springframework.org/schema/context"
    xsi:schemaLocation="http://www.springframework.org/schema/data/mongo http://www.springframework.org/schema/data/mongo/spring-mongo-1.1.xsd
        http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
        http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.2.xsd">

    <mongo:mongo host="localhost" port="27017" />


    <bean class="org.springframework.data.mongodb.core.MongoTemplate"
        id="mongoTemplate">
        <constructor-arg ref="mongo"></constructor-arg>
        <constructor-arg value="documents"></constructor-arg>
    </bean>
    <mongo:db-factory id="mongoDbFactory" dbname="database" mongo-ref="mongo"/>
  <mongo:mapping-converter id="converter" />

  <bean id="gridTemplate" class="org.springframework.data.mongodb.gridfs.GridFsTemplate">
    <constructor-arg ref="mongoDbFactory" />
    <constructor-arg ref="converter" />
  </bean>

  <bean id="ceMongoStore" class="gov.ic.isso.ce.service.mongoimpl.CEStorageMongoImpl">
    <constructor-arg ref="mongoTemplate" />
    <constructor-arg ref="gridTemplate" />
    <constructor-arg value="cedocs" />
  </bean>
</beans>

I get an error as follows when running the app with run-app option

 Error 2013-02-07 16:08:24,806 [localhost-startStop-1] ERROR context.GrailsContextLoader  - Error executing bootstraps: Cannot find class [gov.ic.isso.ce.service.mongoimpl.CEStorageMongoImpl] for bean with name 'ceMongoStore' defined in URL [jar:file:/C:/development/projects/sentrytrunk/Latest/fc/content-examiner-web/lib/content-examiner-data-1.0.jar!/applicationContext.xml]; nested exception is java.lang.ClassNotFoundException: gov.ic.isso.ce.service.mongoimpl.CEStorageMongoImpl
Message: Cannot find class [gov.ic.isso.ce.service.mongoimpl.CEStorageMongoImpl] for bean with name 'ceMongoStore' defined in URL [jar:file:/C:/development/projects/sentrytrunk/Latest/fc/content-examiner-web/lib/content-examiner-data-1.0.jar!/applicationContext.xml]; nested exception is java.lang.ClassNotFoundException: gov.ic.isso.ce.service.mongoimpl.CEStorageMongoImpl
   Line | Method
->> 303 | innerRun in java.util.concurrent.FutureTask$Sync
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|   138 | run      in java.util.concurrent.FutureTask
|   886 | runTask  in java.util.concurrent.ThreadPoolExecutor$Worker
|   908 | run      in     ''
^   662 | run . .  in java.lang.Thread

Caused by ClassNotFoundException: gov.ic.isso.ce.service.mongoimpl.CEStorageMongoImpl
->> 202 | run      in java.net.URLClassLoader$1

when I do a dump of the jar file using jar tvf I get the following output

1472 Thu Feb 07 16:00:30 EST 2013 applicationContext.xml
   709 Thu Feb 07 16:00:30 EST 2013 gov/ic/isso/ce/data/CEStorage.class
  1946 Thu Feb 07 16:00:30 EST 2013 gov/ic/isso/ce/data/model/document/Document.class
  1186 Thu Feb 07 16:00:30 EST 2013 gov/ic/isso/ce/data/model/document/DocumentStatus.class
  5995 Thu Feb 07 16:00:30 EST 2013 gov/ic/isso/ce/service/mongoimpl/CEStorageMongoImpl.class
     0 Thu Feb 07 16:00:34 EST 2013 META-INF/maven/
     0 Thu Feb 07 16:00:34 EST 2013 META-INF/maven/gov.ic.isso.content-examiner/
     0 Thu Feb 07 16:00:34 EST 2013 META-INF/maven/gov.ic.isso.content-examiner/content-examiner-data/
  1925 Thu Feb 07 15:54:44 EST 2013 META-INF/maven/gov.ic.isso.content-examiner/content-examiner-data/pom.xml
   146 Thu Feb 07 16:00:34 EST 2013 META-INF/maven/gov.ic.isso.content-examiner/content-examiner-data/pom.properties
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T18:33:43+00:00Added an answer on June 18, 2026 at 6:33 pm

    Remove runtime "content:content-examiner-data:1.0" or the jar file – you only need one. If you add jar files to the lib directory, you need to run grails compile --refresh-dependencies to get it added to the classpath

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have user defined jar file which has .class files Ex: abc.jar. I want
I have a JAR-file in the WEB-INF/lib directory of my project that is displayed
I have a .jar file which has a command line interface. I want to
I have a jar file of my application which has more than one class.
I have an application which has a font stored within a jar file. It
I have an html file which has a jar file included in it as
I have a Java application and a build file which, among its tasks, has
I have a project which has as maven dependency a jar file which includes
I have an .ear file with the standard lib directory. I have a .jar
I have a Gradle multi-project build and have to inlcude a JAR file which

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.