Issue with Job Plugin

17 views
Skip to first unread message

Chad Welfle

unread,
Dec 9, 2015, 11:46:54 AM12/9/15
to dotCMS User Group
I am having an issue with `java.lang.NoClassDefFoundError: main/java/com/guildcpo/service/ForumDiscussion` where the class is just a package of service classes that I added to my plugin code.  I am not sure if I am supposed to tell gradle.build that I created a package to handle this logic.  I had this issue with a different package on my plugin and when I committed my code to github it for some reason it fixed the issues.  I am not sure what is causing this but any insight into the situation would be much appreciated.  Here is the stack trace. 

```
[09/12/15 16:29:00:065 UTC] ERROR core.JobRunShell: Job MailDigest Jobs.MailDigest Job threw an unhandled Exception:
java.lang.NoClassDefFoundError: main/java/com/guildcpo/service/ForumDiscussion
at main.java.com.guildcpo.osgi.job.MailDigestJob.execute(MailDigestJob.java:141)
at org.quartz.core.JobRunShell.run(JobRunShell.java:223)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:549)
Caused by: java.lang.ClassNotFoundException: main.java.com.guildcpo.service.ForumDiscussion
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1516)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1361)
at com.dotmarketing.osgi.UrlOsgiClassLoader.loadClass(UrlOsgiClassLoader.java:61)
... 3 more
[09/12/15 16:29:00:065 UTC] ERROR core.ErrorLogger: Job (MailDigest Jobs.MailDigest Job threw an exception.
org.quartz.SchedulerException: Job threw an unhandled exception. [See nested exception: java.lang.NoClassDefFoundError: main/java/com/guildcpo/service/ForumDiscussion]
at org.quartz.core.JobRunShell.run(JobRunShell.java:234)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:549)
Caused by: java.lang.NoClassDefFoundError: main/java/com/guildcpo/service/ForumDiscussion
at main.java.com.guildcpo.osgi.job.MailDigestJob.execute(MailDigestJob.java:141)
at org.quartz.core.JobRunShell.run(JobRunShell.java:223)
... 1 more
Caused by: java.lang.ClassNotFoundException: main.java.com.guildcpo.service.ForumDiscussion
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1516)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1361)
at com.dotmarketing.osgi.UrlOsgiClassLoader.loadClass(UrlOsgiClassLoader.java:61)
... 3 more
```

Another quick question here too, I have an issue when uploading my plugin several times I notice that it is getting cached somewhere and my code changes are not being displayed.  I decompiled the jar files to make sure that the code is actually being updated when I do my gradle build, which it is.  I have to restart dotCMS to get the code to update, so that is what makes me think that it is caching it somewhere.  Could someone point me to a config file that I can edit to stop it from doing this or another solution I can try.

Thanks, Chad

Chad Welfle

unread,
Dec 11, 2015, 3:59:33 PM12/11/15
to dotCMS User Group
Well just in case someone ever runs into this issue, I found that just restarting dotCMS did the trick.
Reply all
Reply to author
Forward
0 new messages