You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@isis.apache.org by Gerrie Myburgh <ge...@yahoo.co.uk.INVALID> on 2018/07/15 07:30:31 UTC

dependent class not found.

Hi,
I took simple app, removed simple module and added another module. When I run the app in the IDE it run's fine but the moment I deploy to tomcat I get a :
java.lang.ClassNotFoundException: domainapp.modules.simple.SimpleModule

What is frustrating is that I cannot find any reference to SimpleModule anywhere in my code. 
Here is the error message in the catalina log:
1) Error in custom provider, org.apache.isis.core.commons.factory.InstanceCreationClassException: Class 'class domainapp.application.manifest.DomainAppAppManifest'found , but is missing a dependent class: domainapp/modules/simple/SimpleModule  at org.apache.isis.core.runtime.runner.IsisInjectModule.provideIsisSessionFactory(IsisInjectModule.java:109)  at org.apache.isis.core.runtime.runner.IsisInjectModule.provideIsisSessionFactory(IsisInjectModule.java:109)  while locating org.apache.isis.core.runtime.system.session.IsisSessionFactory    for field at org.apache.isis.viewer.wicket.viewer.IsisWicketApplication.isisSessionFactory(IsisWicketApplication.java:155)  while locating domainapp.webapp.DomainApplication
And first exception stackstace
Caused by: java.lang.ClassNotFoundException: domainapp.modules.simple.SimpleModule at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1308) at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1136) ... 81 more
Has anyone had a similar problem and how did they find the reference to SimpleModule in order to remove it.
Thanks
Gerrie


Re: dependent class not found.

Posted by Stephen Cameron <st...@gmail.com>.
It is referenced in homepage view model too.

On Sunday, July 15, 2018, Dan Haywood <da...@haywood-associates.co.uk> wrote:

> Hi Gerrie,
>
> The application is bootstrapped using an AppManifest - DomainAppAppManifest
> in this case [1].   This references DomainAppApplicationModule which in
> turn [2] references SimpleModule.  The set of modules that are loaded is
> transitive, similar to Maven.  Each module is used to locate domain
> services and entities from which the Isis metamodel is built.
>
> When you say "deploy to tomcat", are you doing this through the IDE, or are
> you doing a build using mvn and then taking the resultant .war file and
> deploying that?  If it works in the latter then we know that the code isn't
> wrong, just a stale computed classpath with the IDE.  If even mvn fails,
> then there's a problem in the code itself.
>
> If you wish, create an example on github to demonstrate the problem, and
> describe how to reproduce in the README
>
> Thx
> Dan
>
>
> https://github.com/apache/isis/blob/master/example/application/simpleapp/
> application/src/main/java/domainapp/application/
> manifest/DomainAppAppManifest.java#L31
> https://github.com/apache/isis/blob/master/example/application/simpleapp/
> application/src/main/java/domainapp/application/
> DomainAppApplicationModule.java#L37
>
>
> On Sun, 15 Jul 2018 at 08:30 Gerrie Myburgh
> <ge...@yahoo.co.uk.invalid> wrote:
>
> > Hi,
> > I took simple app, removed simple module and added another module. When I
> > run the app in the IDE it run's fine but the moment I deploy to tomcat I
> > get a :
> > java.lang.ClassNotFoundException: domainapp.modules.simple.SimpleModule
> >
> > What is frustrating is that I cannot find any reference to SimpleModule
> > anywhere in my code.
> > Here is the error message in the catalina log:
> > 1) Error in custom provider,
> > org.apache.isis.core.commons.factory.InstanceCreationClassException:
> Class
> > 'class domainapp.application.manifest.DomainAppAppManifest'found , but
> is
> > missing a dependent class: domainapp/modules/simple/SimpleModule  at
> > org.apache.isis.core.runtime.runner.IsisInjectModule.
> provideIsisSessionFactory(IsisInjectModule.java:109)
> > at
> > org.apache.isis.core.runtime.runner.IsisInjectModule.
> provideIsisSessionFactory(IsisInjectModule.java:109)
> > while locating
> > org.apache.isis.core.runtime.system.session.IsisSessionFactory    for
> field
> > at
> > org.apache.isis.viewer.wicket.viewer.IsisWicketApplication.
> isisSessionFactory(IsisWicketApplication.java:155)
> > while locating domainapp.webapp.DomainApplication
> > And first exception stackstace
> > Caused by: java.lang.ClassNotFoundException:
> > domainapp.modules.simple.SimpleModule at
> > org.apache.catalina.loader.WebappClassLoaderBase.loadClass(
> WebappClassLoaderBase.java:1308)
> > at
> > org.apache.catalina.loader.WebappClassLoaderBase.loadClass(
> WebappClassLoaderBase.java:1136)
> > ... 81 more
> > Has anyone had a similar problem and how did they find the reference to
> > SimpleModule in order to remove it.
> > Thanks
> > Gerrie
> >
> > --
> DISCLAIMER: This e-mail is from Haywood Associates Ltd (Registered Number
> 3525455) and it and its attachments may be confidential and are intended
> solely for the use of the individual to whom it is addressed.  Any
> unauthorised use or dissemination of this communication is strictly
> prohibited. Any information provided to Haywood Associates Ltd shall be
> retained and used in accordance with our Privacy Statement at
> http://www.haywood-associates.co.uk/privacy.  If you have received this
> communication in error, please immediately notify the sender by return
> e-mail message and delete all copies of the original communication.
>

Re: dependent class not found.

Posted by Dan Haywood <da...@haywood-associates.co.uk>.
Hi Gerrie,

The application is bootstrapped using an AppManifest - DomainAppAppManifest
in this case [1].   This references DomainAppApplicationModule which in
turn [2] references SimpleModule.  The set of modules that are loaded is
transitive, similar to Maven.  Each module is used to locate domain
services and entities from which the Isis metamodel is built.

When you say "deploy to tomcat", are you doing this through the IDE, or are
you doing a build using mvn and then taking the resultant .war file and
deploying that?  If it works in the latter then we know that the code isn't
wrong, just a stale computed classpath with the IDE.  If even mvn fails,
then there's a problem in the code itself.

If you wish, create an example on github to demonstrate the problem, and
describe how to reproduce in the README

Thx
Dan


https://github.com/apache/isis/blob/master/example/application/simpleapp/application/src/main/java/domainapp/application/manifest/DomainAppAppManifest.java#L31
https://github.com/apache/isis/blob/master/example/application/simpleapp/application/src/main/java/domainapp/application/DomainAppApplicationModule.java#L37


On Sun, 15 Jul 2018 at 08:30 Gerrie Myburgh
<ge...@yahoo.co.uk.invalid> wrote:

> Hi,
> I took simple app, removed simple module and added another module. When I
> run the app in the IDE it run's fine but the moment I deploy to tomcat I
> get a :
> java.lang.ClassNotFoundException: domainapp.modules.simple.SimpleModule
>
> What is frustrating is that I cannot find any reference to SimpleModule
> anywhere in my code.
> Here is the error message in the catalina log:
> 1) Error in custom provider,
> org.apache.isis.core.commons.factory.InstanceCreationClassException: Class
> 'class domainapp.application.manifest.DomainAppAppManifest'found , but is
> missing a dependent class: domainapp/modules/simple/SimpleModule  at
> org.apache.isis.core.runtime.runner.IsisInjectModule.provideIsisSessionFactory(IsisInjectModule.java:109)
> at
> org.apache.isis.core.runtime.runner.IsisInjectModule.provideIsisSessionFactory(IsisInjectModule.java:109)
> while locating
> org.apache.isis.core.runtime.system.session.IsisSessionFactory    for field
> at
> org.apache.isis.viewer.wicket.viewer.IsisWicketApplication.isisSessionFactory(IsisWicketApplication.java:155)
> while locating domainapp.webapp.DomainApplication
> And first exception stackstace
> Caused by: java.lang.ClassNotFoundException:
> domainapp.modules.simple.SimpleModule at
> org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1308)
> at
> org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1136)
> ... 81 more
> Has anyone had a similar problem and how did they find the reference to
> SimpleModule in order to remove it.
> Thanks
> Gerrie
>
> --
DISCLAIMER: This e-mail is from Haywood Associates Ltd (Registered Number
3525455) and it and its attachments may be confidential and are intended
solely for the use of the individual to whom it is addressed.  Any
unauthorised use or dissemination of this communication is strictly
prohibited. Any information provided to Haywood Associates Ltd shall be
retained and used in accordance with our Privacy Statement at
http://www.haywood-associates.co.uk/privacy.  If you have received this
communication in error, please immediately notify the sender by return
e-mail message and delete all copies of the original communication.