I'm getting class not found exception for com.allen_sauer.gwt.log.client.WrappedClientThrowable while starting my application in tomcat 8.0.36.
Libraries used
- gwt-user-2.8
- gwt-servlet-2.7.0
- spring4gwt-0.0.1
- gwt-log-3.1.2
This class is present in gwt-log but in package com.allen_sauer.gwt.log.shared. My application code is referring to the correct package but still I'm getting this exception:
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:153)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:725)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:940)
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1816)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.NoClassDefFoundError: com/allen_sauer/gwt/log/client/WrappedClientThrowable
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
at java.lang.Class.getDeclaredMethods(Class.java:1975)
at org.apache.catalina.util.Introspection.getDeclaredMethods(Introspection.java:127)
at org.apache.catalina.startup.WebAnnotationSet.loadMethodsAnnotation(WebAnnotationSet.java:273)
at org.apache.catalina.startup.WebAnnotationSet.loadApplicationServletAnnotations(WebAnnotationSet.java:133)
at org.apache.catalina.startup.WebAnnotationSet.loadApplicationAnnotations(WebAnnotationSet.java:65)
at org.apache.catalina.startup.ContextConfig.applicationAnnotationsConfig(ContextConfig.java:335)
at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:782)
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:306)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:95)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5202)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
... 10 more
Caused by: java.lang.ClassNotFoundException: com.allen_sauer.gwt.log.client.WrappedClientThrowable
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1333)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1167)
... 24 more
Not sure which library is referring to the old package. Any help is appreciated. Thanks in advance.
Seems like you have a gwt-user and gwt-servlet in different versions.
It would be great if you could post your full "mvn dependency:tree" (or gradle equivalent)
EDIT:
Feels like you are using a somewhat outdated logging library.
https://github.com/fredsa/gwt-log/wiki/GettingStarted
Try adding this guy to your dependencies: compile 'com.allen-sauer.gwt.log:gwt-log:3.3.2
Seems this issue was introduced due to some duplicate compiled classes. I got the application from a different team who have recently converted it to gradle build. When I checked the project structure and gradle scripts, I found many inconsistencies. Basically project was not converted correctly.
After I converted it correctly, this error was gone.
Thanks for the insights, really appreciate it
Related
I'm pretty new to Liferay development. I'm working on migrating a project from 6.2 to 7.3.
The plugin I'm working on has the -api / -service / -portlet structure that I've seen in the tutorials.
When I try to deploy the service JAR to my server, I'm getting the following error:
2021-07-07 10:30:11.759 ERROR [pipe-start 1356][LiferayServiceExtender:88] org.hibernate.MappingException: entity class not found: PhishRodLab.db.model.impl.Customer_PreferencesImpl
org.hibernate.MappingException: entity class not found: PhishRodLab.db.model.impl.Customer_PreferencesImpl
at org.hibernate.mapping.PersistentClass.getMappedClass(PersistentClass.java:125)
at org.hibernate.tuple.PropertyFactory.getGetter(PropertyFactory.java:191)
at org.hibernate.tuple.PropertyFactory.buildIdentifierProperty(PropertyFactory.java:67)
at org.hibernate.tuple.entity.EntityMetamodel.(EntityMetamodel.java:135)
at org.hibernate.persister.entity.AbstractEntityPersister.(AbstractEntityPersister.java:485)
at org.hibernate.persister.entity.SingleTableEntityPersister.(SingleTableEntityPersister.java:133)
at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:84)
at org.hibernate.impl.SessionFactoryImpl.(SessionFactoryImpl.java:286)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1872)
at org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:795)
at com.liferay.portal.spring.hibernate.PortalHibernateConfiguration.newSessionFactory(PortalHibernateConfiguration.java:298)
at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:717)
at com.liferay.portal.spring.hibernate.PortalHibernateConfiguration.buildSessionFactory(PortalHibernateConfiguration.java:99)
at com.liferay.portal.spring.extender.internal.LiferayServiceExtender$LiferayServiceExtension.start(LiferayServiceExtender.java:148)
at com.liferay.portal.spring.extender.internal.LiferayServiceExtender.addingBundle(LiferayServiceExtender.java:83)
at com.liferay.portal.spring.extender.internal.LiferayServiceExtender.addingBundle(LiferayServiceExtender.java:61)
at org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:475)
at org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:1)
at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)
at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229)
at org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTracker.java:450)
at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:908)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEventPrivileged(EquinoxEventPublisher.java:230)
at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:137)
at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:129)
at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor.publishModuleEvent(EquinoxContainerAdaptor.java:191)
at org.eclipse.osgi.container.Module.publishEvent(Module.java:476)
at org.eclipse.osgi.container.Module.doStart(Module.java:578)
at org.eclipse.osgi.container.Module.start(Module.java:449)
at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:428)
at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:447)
at org.eclipse.equinox.console.commands.EquinoxCommandProvider.start(EquinoxCommandProvider.java:243)
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.apache.felix.gogo.runtime.Reflective.invoke(Reflective.java:139)
at org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:91)
at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:599)
at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:526)
at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:415)
at org.apache.felix.gogo.runtime.Pipe.doCall(Pipe.java:416)
at org.apache.felix.gogo.runtime.Pipe.call(Pipe.java:229)
at org.apache.felix.gogo.runtime.Pipe.call(Pipe.java:59)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.ClassNotFoundException: PhishRodLab.db.model.impl.Customer_PreferencesImpl
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1365)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1188)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at org.hibernate.util.ReflectHelper.classForName(ReflectHelper.java:200)
at org.hibernate.mapping.PersistentClass.getMappedClass(PersistentClass.java:122)
... 49 more
I've encountered that error when migrating from previous versions when the DTD of the service.xml file is not the right one. You must make sure you are using the latest version available for the version you are using (7.3 in this case).
For example, the header of the service.xml file should start like this:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE service-builder PUBLIC "-//Liferay//DTD Service Builder 7.3.0//EN" "http://www.liferay.com/dtd/liferay-service-builder_7_3_0.dtd">
<service-builder...>
The best option is to generate a test servicebuilder project using the tutorial, and then compare the generated code with yours, making note of the differences.
More info: https://help.liferay.com/hc/es/articles/360029028211-Introduction-to-Service-Builder
While deploying war in JBoss getting below exception: Using asm3.1 jar
I've verified this on google. But I didn't get much info. It said that check asm jar dependency with java8 version and I've tried updating asm latest builds also after updating latest builds (asm 5.0.3 or later) I got another error as incompatibleclasschangeerror
java.lang.ArrayIndexOutOfBoundsException: 9578
at org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:85)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
at org.jboss.threads.JBossThread.run(JBossThread.java:320) Caused by: java.lang.ArrayIndexOutOfBoundsException: 9578
at org.objectweb.asm.ClassReader.readClass(Unknown Source)
at org.objectweb.asm.ClassReader.accept(Unknown Source)
at org.objectweb.asm.ClassReader.accept(Unknown Source)
at com.sun.jersey.spi.scanning.AnnotationScannerListener.onProcess(AnnotationScannerListener.java:133)
at com.sun.jersey.core.spi.scanning.JarFileScanner.scan(JarFileScanner.java:97)
at com.sun.jersey.spi.scanning.WebAppResourcesScanner$1.f(WebAppResourcesScanner.java:94)
I've removed the lambda dependency from my application and verified it. It is working fine. (asm 3.1, JBoss wildfly 9.0, Java 1.8).
I installed apache-tomee-plume-7.1.0 from https://tomee.apache.org/
I installed eclipse-jee from https://www.eclipse.org/ using the installation tool.
In eclipse I added a new tomcat v8.5 server since eclipse told me that was the installed version.
When starting the server from within eclipse, I get an error-message like this:
'Starting tomcat v8.5 Server at localhost' has encountered a problem.
Server Tomcat v8.5 Server at localhost failed to start.
In the console it says:
SEVERE: A child container failed during start
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[]]
at java.base/java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:191)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:941)
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:872)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1421)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1411)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)
... 6 more
Caused by: java.lang.NoClassDefFoundError: Could not initialize class org.apache.openejb.util.proxy.LocalBeanProxyFactory$Unsafe
at org.apache.openejb.util.proxy.LocalBeanProxyFactory.createProxy(LocalBeanProxyFactory.java:137)
at org.apache.openejb.util.proxy.LocalBeanProxyFactory.createProxy(LocalBeanProxyFactory.java:147)
at org.apache.tomee.catalina.TomcatWebAppBuilder.eagerInitOfLocalBeanProxies(TomcatWebAppBuilder.java:1563)
at org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:1309)
at org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:1125)
at org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:133)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:94)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5154)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 6 more
There are some more errors but I think the NoClassDefFoundError might be the main problem... am I right?
Any help is appreciated.
I ended up using another version of tomee.
Switched to version: apache-tomee-plume-8.0.0-M3
This solved my issues.
Both version of TomEE, witch is Apache TomEE plume 8.0.0-M3 and Apache Tomee plume 7.1.0, it seems to run without error, both started from prompt and also from Eclipse plugin. However try to unpacked them in an directory whose name does not contain the space character.
I'm beginner in Nutch. Tried out some tutorial to crawl the web from NutchWiki. Then I try to make a custom plugin for parsing with the help of this.
All configurations are made and after building using ant my plugin folders are there in build/plugins and runtime/local/plugin and in apache-nutch-1.13-SNAPSHOT.job file. When I parsed the fetched content, I got the following error.
Error parsing: http://example.com/: java.lang.RuntimeException: org.apache.nutch.plugin.PluginRuntimeException: java.lang.ClassNotFoundException: org.apache.nutch.parsefilter.TagExtractorParseFilter
at org.apache.nutch.plugin.PluginRepository.getOrderedPlugins(PluginRepository.java:469)
at org.apache.nutch.parse.HtmlParseFilters.<init>(HtmlParseFilters.java:35)
at org.apache.nutch.parse.html.HtmlParser.setConf(HtmlParser.java:340)
at org.apache.nutch.plugin.Extension.getExtensionInstance(Extension.java:163)
at org.apache.nutch.parse.ParserFactory.getParsers(ParserFactory.java:136)
at org.apache.nutch.parse.ParseUtil.parse(ParseUtil.java:78)
at org.apache.nutch.parse.ParseSegment.map(ParseSegment.java:107)
at org.apache.nutch.parse.ParseSegment.map(ParseSegment.java:45)
at org.apache.hadoop.mapred.MapRunner.run(MapRunner.java:54)
at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:453)
at org.apache.hadoop.mapred.MapTask.run(MapTask.java:343)
at org.apache.hadoop.mapred.LocalJobRunner$Job$MapTaskRunnable.run(LocalJobRunner.java:243)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.nutch.plugin.PluginRuntimeException: java.lang.ClassNotFoundException: org.apache.nutch.parsefilter.TagExtractorParseFilter
at org.apache.nutch.plugin.Extension.getExtensionInstance(Extension.java:167)
at org.apache.nutch.plugin.PluginRepository.getOrderedPlugins(PluginRepository.java:441)
... 16 more
Caused by: java.lang.ClassNotFoundException: org.apache.nutch.parsefilter.TagExtractorParseFilter
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.apache.nutch.plugin.PluginRepository.getCachedClass(PluginRepository.java:331)
at org.apache.nutch.plugin.Extension.getExtensionInstance(Extension.java:156)
... 17 more
I can't figure what exactly is the problem and I have done all things specified in the tutorial.
Any help will be appreciated.
EDIT : I temporarily solved this issue by hardcoding the classpath of plugin in nutch script file like:
CLASSPATH="${CLASSPATH}:$NUTCH_HOME/plugins/TagExtractorParseFilter/TagExtractorParseFilter.jar"
# distributed mode
EXEC_CALL=(hadoop jar "$NUTCH_JOB")
if $local; then
EXEC_CALL=("$JAVA" $JAVA_HEAP_MAX "${NUTCH_OPTS[#]}" -classpath "$CLASSPATH")
else
.....................
I finally solved this issue. It was due to a small mistake in my plugin.xml.
Earlier the runtime property in plugin.xml was like
<runtime>
<library name="TagExtractorParseFilter">
<export name="*"/>
</library>
</runtime>
I changed it to
<runtime>
<library name="TagExtractorParseFilter.jar">
<export name="*"/>
</library>
</runtime>
Then, it worked.
I am getting following exceptions while deploying i am using tomcat 7. I am using netbeans7.4 for development.
I have included struts2.3.15 jar files and hibernet jar files.
SEVERE: Exception starting filter struts2
java.lang.NoSuchMethodError: com.opensymphony.xwork2.util.finder.UrlSet.includeClassesUrl(Lcom/opensymphony/xwork2/util/finder/ClassLoaderInterface;Lcom/opensymphony/xwork2/util/finder/UrlSet$FileProtocolNormalizer;)Lcom/opensymphony/xwork2/util/finder/UrlSet;
at org.apache.struts2.convention.PackageBasedActionConfigBuilder.buildUrlSet(PackageBasedActionConfigBuilder.java:442)
at org.apache.struts2.convention.PackageBasedActionConfigBuilder.readUrls(PackageBasedActionConfigBuilder.java:410)
at org.apache.struts2.convention.PackageBasedActionConfigBuilder.findActions(PackageBasedActionConfigBuilder.java:389)
at org.apache.struts2.convention.PackageBasedActionConfigBuilder.buildActionConfigs(PackageBasedActionConfigBuilder.java:347)
at org.apache.struts2.convention.ClasspathPackageProvider.loadPackages(ClasspathPackageProvider.java:53)
at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:215)
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:66)
at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:446)
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:490)
at org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:74)
at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:57)
at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:281)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:262)
at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:107)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4746)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5399)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:656)
at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1635)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
How to resolve this.
java.lang.NoSuchMethodError:
Error is Thrown if an application tries to call a specified method of a class (either static or instance), and that class no longer has a definition of that method.
Normally, this error is caught by the compiler; this error can only occur at run time if the definition of a class has incompatibly changed.
Try to download latest version of jar file
NoSuchMethodError: is generally thrown when there is conflict for the methods in included jars or may be due to different version of included dependent jars. Try removing unnecessary jars and if still issue is not resolved check the version of included jars