You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`@Configuration @componentscan(basePackages={"com.triadic"})
@EnableMongoRepositories(basePackages= "com.triadic.repository") @propertysource("classpath:application.conf")
public class ApplicationConfig extends AbstractMongoConfiguration {
@Override
protected String getDatabaseName() {
return "new_schema";
}
@Override
public Mongo mongo() throws Exception {
return new MongoClient("127.0.0.1", 27017);
}
}`
*Repository *
public interface UserProfileRepository extends MongoRepository<UserProfile, String> {}
*Error:- *
Caused by: java.lang.ClassNotFoundException: com.triadic.repository.model.UserProfile at java.net.URLClassLoader.findClass(URLClassLoader.java:381) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) at org.springframework.util.ClassUtils.forName(ClassUtils.java:250) at org.springframework.data.mongodb.config.AbstractMongoConfiguration.getInitialEntitySet(AbstractMongoConfiguration.java:225) at org.springframework.data.mongodb.config.AbstractMongoConfiguration.mongoMappingContext(AbstractMongoConfiguration.java:156) at com.triadic.ApplicationConfig$$EnhancerBySpringCGLIB$$acc47b5b.CGLIB$mongoMappingContext$7(<generated>) at com.triadic.ApplicationConfig$$EnhancerBySpringCGLIB$$acc47b5b$$FastClassBySpringCGLIB$$65261ae5.invoke(<generated>) at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228) at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:355)
Enabled Module in config. as same as your sample
did i missed anything here ?
The text was updated successfully, but these errors were encountered:
Spring Configuration
`@Configuration
@componentscan(basePackages={"com.triadic"})
@EnableMongoRepositories(basePackages= "com.triadic.repository")
@propertysource("classpath:application.conf")
public class ApplicationConfig extends AbstractMongoConfiguration {
}`
*Repository *
public interface UserProfileRepository extends MongoRepository<UserProfile, String> {}
*Error:- *
Caused by: java.lang.ClassNotFoundException: com.triadic.repository.model.UserProfile at java.net.URLClassLoader.findClass(URLClassLoader.java:381) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) at org.springframework.util.ClassUtils.forName(ClassUtils.java:250) at org.springframework.data.mongodb.config.AbstractMongoConfiguration.getInitialEntitySet(AbstractMongoConfiguration.java:225) at org.springframework.data.mongodb.config.AbstractMongoConfiguration.mongoMappingContext(AbstractMongoConfiguration.java:156) at com.triadic.ApplicationConfig$$EnhancerBySpringCGLIB$$acc47b5b.CGLIB$mongoMappingContext$7(<generated>) at com.triadic.ApplicationConfig$$EnhancerBySpringCGLIB$$acc47b5b$$FastClassBySpringCGLIB$$65261ae5.invoke(<generated>) at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228) at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:355)
Enabled Module in config. as same as your sample
did i missed anything here ?
The text was updated successfully, but these errors were encountered: