Getting following error while executing CronJobSchedulingExample - java

Getting following error while running CronJobSchedulingExample example from github https://github.com/apache/ignite/blob/master/examples/src/main/java-lgpl/org/apache/ignite/examples/misc/schedule/ComputeScheduleExample.java
Exception in thread "main" class org.apache.ignite.IgniteException: Current Ignite configuration does not support schedule functionality (consider adding ignite-schedule module to classpath).
at org.apache.ignite.internal.processors.schedule.IgniteNoopScheduleProcessor.processorException(IgniteNoopScheduleProcessor.java:50)
at org.apache.ignite.internal.processors.schedule.IgniteNoopScheduleProcessor.schedule(IgniteNoopScheduleProcessor.java:43)
at org.apache.ignite.internal.IgniteSchedulerImpl.scheduleLocal(IgniteSchedulerImpl.java:123)
at com.mstorm.ignition.CronJobSchedulingExample.main(CronJobSchedulingExample.java:38)

You need to have ignite-schedule module in project classpath. Check if it's added in your pom.xml or, if you're running it using ignite.sh, - copy ignite-schedule directory from libs/optional to libs.

Related

Error occurred during initialization of boot layer spring framework

When I am running my code the Console shows the following error
"Error occurred during initialization of boot layer
java.lang.module.FindException: Unable to derive module descriptor for
C:\Users\Ankit
Singh\Downloads\spring-framework-5.1.9.RELEASE\libs\spring-context-indexer-5.1.9.RELEASE-sources.jar
Caused by: java.lang.module.InvalidModuleDescriptorException: Provider
class
org.springframework.context.index.processor.CandidateComponentsIndexer
not in module
Default Package delete.
Reinstalled Spring library
Two different way to call beans
Can someone suggested whats wrong in my system??
You might use a default package, right? I have had the same error as you...
Listen, dude, you can try to click: your project name-properties-java build path, move your external jar(s) from module-path to classpath. Then, you can run the code again.

How to resolve java.lang.NoClassDefFoundError: iaik/x509/X509Certificate?

I am using Struts 2.0 for one application and getting the class not found exception:
java.lang.NoClassDefFoundError: iaik/x509/X509Certificate
After searching some site i found this class is in iaik_jce.jar.Can anyone help me understanding when this jar is required and if the jar is proper
Cannot paste the entire stacktarce.
The issue is resolved adding enttoolkit.jar .
The jar is available with webmethods client \common\lib\ext\enttoolkit.jar
The java code is calling service of webmethods,so the jar is required in the java app classpath.

Where can I find quartz-all-2.2.1.jar file

I'm developing code that executes a quartz job. When I execute this code on my local tomcat it is working fine, but when I try to do the same code inside a web application I get java.lang.NoClassDefFoundError: org/quartz/DisallowConcurrentExecution. I'm using quartz 2.2.1 and it's already in the class path. Here is the stack trace:
java.lang.IllegalStateException
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1600)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559)
at org.quartz.impl.JobDetailImpl.isConcurrentExectionDisallowed(JobDetailImpl.java:388)
at org.quartz.simpl.RAMJobStore.acquireNextTriggers(RAMJobStore.java:1428)
at org.quartz.core.QuartzSchedulerThread.run(QuartzSchedulerThread.java:272)
Exception in thread "DefaultQuartzScheduler_QuartzSchedulerThread" java.lang.NoClassDefFoundError: org/quartz/DisallowConcurrentExecution
at org.quartz.impl.JobDetailImpl.isConcurrentExectionDisallowed(JobDetailImpl.java:388)
at org.quartz.simpl.RAMJobStore.acquireNextTriggers(RAMJobStore.java:1428)
at org.quartz.core.QuartzSchedulerThread.run(QuartzSchedulerThread.java:272)
Caused by: java.lang.ClassNotFoundException: org.quartz.DisallowConcurrentExecution
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1714)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559)
... 3 more
I already read that I should check if I have multiply quartz-all-xxx.jar in my classpath and that I should use quartz-all-xxx.jar except of quartz-ver.jar.
Quartz Documentation:
The Quartz package includes a number of jar files, located in root directory of the distribution. The main Quartz library is named quartz-all-xxx.jar (where xxx is a version number). In order to use any of Quartz's features, this jar must be located on your application's classpath.
I can't find this quartz-all-xxx.jar in the quartz package and I also tried to find it as a single file. Does anyone know a download link or if it maybe got deleted?
Thanks in advance.
For quart version 2.2.1 you don't have quartz-all-xxx.jar. Refer below
Maven artifacts are available in the central Maven repository within a few hours after a new release.
As of version 2.2.0, all of the Quartz libraries are contained in the quartz-xxx.jar file (where xxx is a version number), except for the out-of-the-box jobs, which are in the quartz-jobs-xxx.jar file.
The group id is: org.quartz-scheduler. Substitute the version number you wish to use in the dependency snippets below (e.g., "2.2.0").
http://quartz-scheduler.org/downloads
Also refer pom.xml from maven

NoClassDefFoundError: Could not initialize class org.apache.axis2.description.AxisService

While running the application I was getting the following errors.
java.lang.NoClassDefFoundError: Could not initialize class org.apache.axis2.description.AxisService
AxisService class is in axis2-kernel-1.6.2.jar file. Some of the classes from this jar are working fine without any issues, but some classes are throwing NoClassDefFoundError from this jar file at runtime. AxisService class is present in axis2-kernel-1.6.2.jar, even it throws error.
This is working fine in local machine. But error getting in Oracle r12 server.I have already set the class path for the jar file.
I am Using Java version is 1.6 and Apache axis2.1.6.2.
Had the same issue. I had included only jars that I needed to compile the application.
When I included everything from \axis2-1.6.2\lib\ folder, this exception were gone.
I had a similar problem using Tomcat and Axis2 and after a week finding out the error I realized there was a axis configuration problem. especifically my aplication can't instantiate the class which accedded to persistence layer. I include this parameter line:
<parameter name="ServiceTCCL">composite</parameter>
in services.xml file which is used by axis2 to work.
For more information see the comments in http://wso2.com/node/1131

What to check in web project if library exists by error class not found?

I have java web application, that uses hibernate core 3.6.7,
I have check that in WEB-INF/lib exists hibernate-core-3.6.7.Final.jar,
but when I run application (eclipse embedded) I receive error:
Exception in thread "Thread-4" java.lang.NoClassDefFoundError: org/hibernate/hql/ast/tree/LiteralNode
at org.hibernate.hql.ast.SqlASTFactory.getASTNodeType(SqlASTFactory.java:154)
I have checked that inside of hibernate-core-3.6.7.Final.jar file exists class org.hibernate.hql.ast.tree.LiteralNode.
What next need to check?
Thanks.
Check that you have all the needed dependencies of Hibernate also in WEB-INF/lib. See http://docs.jboss.org/hibernate/core/3.6/quickstart/en-US/html_single/#hibernate-gsg-setup-releaseBundle for how to know the required dependencies.
Also, read the rest of the stack trace, which should indicate that LiteralNode has not been found because a class it depends on has itself not been found.

Categories