ClassNotFound exception from FTS

I have activated FTS in my project and indexed Entities. Suddenly I have started getting the following exception when I select any menu and no screen is now opening!!

java.lang.ClassNotFoundException: com.myapp.entity.ca.NewEntity
	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 com.haulmont.bali.util.ReflectionHelper.loadClass(ReflectionHelper.java:61)
	at com.haulmont.bali.util.ReflectionHelper.getClass(ReflectionHelper.java:71)
	at com.haulmont.fts.core.sys.ConfigLoader.loadFromStream(ConfigLoader.java:117)
	at com.haulmont.fts.core.sys.ConfigLoader.loadConfiguration(ConfigLoader.java:89)
	at com.haulmont.fts.core.sys.EntityDescrsManagerBean.getDescrByClassNameMap(EntityDescrsManagerBean.java:80)
	at com.haulmont.fts.core.sys.EntityDescrsManagerBean.getDescrByNameMap(EntityDescrsManagerBean.java:45)
	at com.haulmont.fts.core.sys.EntityDescrsManagerBean.getDescrByEntityName(EntityDescrsManagerBean.java:59)
	at com.haulmont.fts.core.app.FtsManager.showInResults(FtsManager.java:325)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:343)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
	at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:93)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212)
	at com.sun.proxy.$Proxy194.showInResults(Unknown Source)
	at com.haulmont.fts.core.app.FtsServiceBean.isEntityIndexed(FtsServiceBean.java:151)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:343)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
	at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:88)
	at com.haulmont.cuba.core.sys.ServiceInterceptor.aroundInvoke(ServiceInterceptor.java:117)
	at sun.reflect.GeneratedMethodAccessor301.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:644)
	at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:633)
	at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:70)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)
	at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:93)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212)
	at com.sun.proxy.$Proxy195.isEntityIndexed(Unknown Source)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at com.haulmont.cuba.core.sys.remoting.LocalServiceInvokerImpl.invoke(LocalServiceInvokerImpl.java:94)
	at com.haulmont.cuba.web.sys.remoting.LocalServiceProxy$LocalServiceInvocationHandler.invoke(LocalServiceProxy.java:154)
	at com.sun.proxy.$Proxy375.isEntityIndexed(Unknown Source)
	at com.haulmont.fts.app.FtsFilterHelperBean.isEntityIndexed(FtsFilterHelperBean.java:55)
	at com.haulmont.cuba.gui.components.filter.FilterDelegateImpl.isEntityAvailableForFts(FilterDelegateImpl.java:1488)
	at com.haulmont.cuba.gui.components.filter.FilterDelegateImpl.setDatasource(FilterDelegateImpl.java:1395)
	at com.haulmont.cuba.web.gui.components.WebFilter.setDatasource(WebFilter.java:78)
	at com.haulmont.cuba.gui.xml.layout.loaders.FilterLoader.loadComponent(FilterLoader.java:119)
	at com.haulmont.cuba.gui.xml.layout.loaders.ContainerLoader.loadSubComponents(ContainerLoader.java:37)
	at com.haulmont.cuba.gui.xml.layout.loaders.ContainerLoader.loadSubComponentsAndExpand(ContainerLoader.java:88)
	at com.haulmont.cuba.gui.xml.layout.loaders.WindowLoader.loadComponent(WindowLoader.java:99)
	at com.haulmont.cuba.web.sys.WebScreens.loadWindowFromXml(WebScreens.java:354)
	at com.haulmont.cuba.web.sys.WebScreens.createScreen(WebScreens.java:227)
	at com.haulmont.cuba.web.sys.WebScreens.create(WebScreens.java:171)
	at com.haulmont.cuba.gui.config.MenuItemCommands$ScreenCommand.run(MenuItemCommands.java:212)
	at com.haulmont.cuba.web.sys.SideMenuBuilder$MenuCommandExecutor.accept(SideMenuBuilder.java:264)
	at com.haulmont.cuba.web.sys.SideMenuBuilder$MenuCommandExecutor.accept(SideMenuBuilder.java:249)
	at com.haulmont.cuba.web.gui.components.mainwindow.WebSideMenu$MenuItemImpl.menuSelected(WebSideMenu.java:569)
	at com.haulmont.cuba.web.widgets.CubaSideMenu$1.menuItemTriggered(CubaSideMenu.java:90)

I am using platform v7.05

Thanks for any help to remove this exception.

Hi,

Check your modules/core/src/.../fts.xml file, there should be com.myapp.entity.ca.NewEntity. It seems that you created this entity and then removed it.

1 Like

Yes! Thanks

Isn’t it supposed to be removed automatically when the Entity was deleted?

Studio removes entity from fts.xml automatically. Seems like you’ve removed it without safe deletion option (it is enabled by default).

1 Like