isis-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephen Cameron <steve.cameron...@gmail.com>
Subject Re: integration testing
Date Fri, 04 Sep 2015 09:11:05 GMT
Hi,

Yes, I could see the probable reason, but couldn't figure out what might be
a fix it.

I have changed strategy and I think it will be better to begin over with
simpleapp and add things in. Better to have a starting point that works
then I know that the breakage was due to the last thing added, but also to
do it the TDD way.

I looked at fixtures and integtests early on, but was in too much of a
hurry to show something to the client. I've decided to go back to the right
approach.

Try to eliminate the stress early (well mid-way) through the project rather
than it hitting at the end, as I read.

On Fri, Sep 4, 2015 at 6:27 PM, Dan Haywood <dan@haywood-associates.co.uk>
wrote:

> Hi Steve,
>
> I've taken a quick look, and found one issue:
>
>
> https://github.com/Stephen-Cameron-Data-Services/isis-chats/blob/master/integtests/src/test/java/au/com/scds/isis/integtests/bootstrap/SimpleAppSystemInitializer.java#L51
>
> should be "au.com.scds.chats.dom.module".
>
>
> However, the error reporting clearly needs to be better to help track this
> down ... I saw an exception regarding the misconfiguration in the console,
> but it didn't seem to be written to stdout or stderr, for some reason.
>
> The subsequent exception that you are seeing (NullPointerException) is
> because Isis tries to do a shutdown after a failed initialization, and this
> fails - perhaps not surprisingly - because the initialization was
> incomplete.  I think this could be improved too, so will look into it.
>
> ~~~
>
> With this issue fixed, I did then hit a further issue with respect to
> database schemas.  I will take a look at that later today, though I have
> some other things to work on first, I'm afraid
>
> HTH
> Dan
>
>
>
>
> On 4 September 2015 at 06:10, Stephen Cameron <steve.cameron.62@gmail.com>
> wrote:
>
> > Hi All,
> >
> > I am trying to make a start with integration testing, not much success so
> > far.
> >
> > I am getting an NullPointerException in the metamodel creation phase I
> > think.
> >
> >
> The stack trace indicates that the framework can't find an implementation
> of TranslationService.  Under normal circumstances the implementation is
> provided by default by the framework
> (org.apache.isis.core.runtime.services.i18n.po.TranslationServicePo).
>
>
>
>
> > I tried to set a breakpoint in Eclipse to see what is being translated,
> but
> > that does not happen for this exception, do I need to have the Isis code
> on
> > the classpath?
> >
> > Maybe I can get more info on the metamodel validation in the log? I am
> > mostly just seeing the datanuclues db schema creation to this point.
> >
> > Perhaps I need to go back to the start, beginning with simpleapp and
> start
> > adding things to be truly doing TDD! Retrospective is not easy :)
> >
> > java.lang.NullPointerException
> > 14:58:11,347  [ObjectReflectorDefault Thread-0   INFO ]  shutting down
> > org.apache.isis.core.metamodel.specloader.ObjectReflectorDefault@6c9499ea
> >     at
> >
> >
> org.apache.isis.core.metamodel.facets.all.i18n.NamedFacetTranslated.<init>(NamedFacetTranslated.java:42)
> >     at
> >
> >
> org.apache.isis.core.metamodel.facets.all.i18n.TranslationFacetFactory.translateName(TranslationFacetFactory.java:98)
> >     at
> >
> >
> org.apache.isis.core.metamodel.facets.all.i18n.TranslationFacetFactory.process(TranslationFacetFactory.java:61)
> >     at
> >
> >
> org.apache.isis.core.metamodel.specloader.facetprocessor.FacetProcessor.process(FacetProcessor.java:324)
> >     at
> >
> >
> org.apache.isis.core.metamodel.specloader.specimpl.FacetedMethodsBuilder.createPropertyFacetedMethodsFromAccessors(FacetedMethodsBuilder.java:385)
> >     at
> >
> >
> org.apache.isis.core.metamodel.specloader.specimpl.FacetedMethodsBuilder.findAndRemovePropertyAccessorsAndCreateCorrespondingFacetedMethods(FacetedMethodsBuilder.java:339)
> >     at
> >
> >
> org.apache.isis.core.metamodel.specloader.specimpl.FacetedMethodsBuilder.createAssociationFacetedMethods(FacetedMethodsBuilder.java:316)
> >     at
> >
> >
> org.apache.isis.core.metamodel.specloader.specimpl.FacetedMethodsBuilder.getAssociationFacetedMethods(FacetedMethodsBuilder.java:294)
> >     at
> >
> >
> org.apache.isis.core.metamodel.specloader.specimpl.dflt.ObjectSpecificationDefault.createAssociations(ObjectSpecificationDefault.java:220)
> >     at
> >
> >
> org.apache.isis.core.metamodel.specloader.specimpl.dflt.ObjectSpecificationDefault.introspectTypeHierarchyAndMembers(ObjectSpecificationDefault.java:178)
> >     at
> >
> >
> org.apache.isis.core.metamodel.specloader.ObjectReflectorDefault.introspect(ObjectReflectorDefault.java:514)
> >     at
> >
> >
> org.apache.isis.core.metamodel.specloader.ObjectReflectorDefault.introspectIfRequired(ObjectReflectorDefault.java:501)
> >     at
> >
> >
> org.apache.isis.core.metamodel.specloader.ObjectReflectorDefault.loadSpecificationForSubstitutedClass(ObjectReflectorDefault.java:400)
> >     at
> >
> >
> org.apache.isis.core.metamodel.specloader.ObjectReflectorDefault.internalLoadSpecification(ObjectReflectorDefault.java:378)
> >     at
> >
> >
> org.apache.isis.core.metamodel.specloader.ObjectReflectorDefault.loadSpecification(ObjectReflectorDefault.java:344)
> >     at
> >
> >
> org.apache.isis.objectstore.jdo.datanucleus.DataNucleusApplicationComponents.catalogNamedQueries(DataNucleusApplicationComponents.java:242)
> >     at
> >
> >
> org.apache.isis.objectstore.jdo.datanucleus.DataNucleusApplicationComponents.initialize(DataNucleusApplicationComponents.java:112)
> >     at
> >
> >
> org.apache.isis.objectstore.jdo.datanucleus.DataNucleusApplicationComponents.<init>(DataNucleusApplicationComponents.java:103)
> >     at
> >
> >
> org.apache.isis.objectstore.jdo.datanucleus.DataNucleusPersistenceMechanismInstaller.createDataNucleusApplicationComponentsIfRequired(DataNucleusPersistenceMechanismInstaller.java:134)
> >     at
> >
> >
> org.apache.isis.objectstore.jdo.datanucleus.DataNucleusPersistenceMechanismInstaller.createObjectStore(DataNucleusPersistenceMechanismInstaller.java:110)
> >     at
> >
> >
> org.apache.isis.core.runtime.system.persistence.PersistenceSessionFactory.createPersistenceSession(PersistenceSessionFactory.java:95)
> >     at
> >
> >
> org.apache.isis.core.runtime.system.session.IsisSessionFactory.openSession(IsisSessionFactory.java:141)
> >     at
> >
> >
> org.apache.isis.core.runtime.system.context.IsisContextStatic.openSessionInstance(IsisContextStatic.java:70)
> >     at
> >
> >
> org.apache.isis.core.runtime.system.context.IsisContext.openSession(IsisContext.java:279)
> >     at
> >
> >
> org.apache.isis.core.runtime.system.IsisSystem.shutdownServices(IsisSystem.java:311)
> >     at
> >
> >
> org.apache.isis.core.runtime.system.IsisSystem.shutdown(IsisSystem.java:300)
> >     at
> >
> >
> org.apache.isis.core.integtestsupport.IsisSystemForTest.shutdown(IsisSystemForTest.java:467)
> >     at
> >
> >
> org.apache.isis.core.integtestsupport.IsisSystemForTest.access$100(IsisSystemForTest.java:74)
> >     at
> >
> >
> org.apache.isis.core.integtestsupport.IsisSystemForTest$Builder$1.run(IsisSystemForTest.java:301)
> > java.lang.NullPointerException
> >     at
> >
> >
> org.apache.isis.core.metamodel.facets.all.i18n.NamedFacetTranslated.<init>(NamedFacetTranslated.java:42)
> >     at
> >
> >
> org.apache.isis.core.metamodel.facets.all.i18n.TranslationFacetFactory.translateName(TranslationFacetFactory.java:98)
> >     at
> >
> >
> org.apache.isis.core.metamodel.facets.all.i18n.TranslationFacetFactory.process(TranslationFacetFactory.java:61)
> >     at
> >
> >
> org.apache.isis.core.metamodel.specloader.facetprocessor.FacetProcessor.process(FacetProcessor.java:324)
> >     at
> >
> >
> org.apache.isis.core.metamodel.specloader.specimpl.FacetedMethodsBuilder.createPropertyFacetedMethodsFromAccessors(FacetedMethodsBuilder.java:385)
> >     at
> >
> >
> org.apache.isis.core.metamodel.specloader.specimpl.FacetedMethodsBuilder.findAndRemovePropertyAccessorsAndCreateCorrespondingFacetedMethods(FacetedMethodsBuilder.java:339)
> >     at
> >
> >
> org.apache.isis.core.metamodel.specloader.specimpl.FacetedMethodsBuilder.createAssociationFacetedMethods(FacetedMethodsBuilder.java:316)
> >     at
> >
> >
> org.apache.isis.core.metamodel.specloader.specimpl.FacetedMethodsBuilder.getAssociationFacetedMethods(FacetedMethodsBuilder.java:294)
> >     at
> >
> >
> org.apache.isis.core.metamodel.specloader.specimpl.dflt.ObjectSpecificationDefault.createAssociations(ObjectSpecificationDefault.java:220)
> >     at
> >
> >
> org.apache.isis.core.metamodel.specloader.specimpl.dflt.ObjectSpecificationDefault.introspectTypeHierarchyAndMembers(ObjectSpecificationDefault.java:178)
> >     at
> >
> >
> org.apache.isis.core.metamodel.specloader.ObjectReflectorDefault.introspect(ObjectReflectorDefault.java:514)
> >     at
> >
> >
> org.apache.isis.core.metamodel.specloader.ObjectReflectorDefault.introspectIfRequired(ObjectReflectorDefault.java:501)
> >     at
> >
> >
> org.apache.isis.core.metamodel.specloader.ObjectReflectorDefault.loadSpecificationForSubstitutedClass(ObjectReflectorDefault.java:400)
> >     at
> >
> >
> org.apache.isis.core.metamodel.specloader.ObjectReflectorDefault.internalLoadSpecification(ObjectReflectorDefault.java:378)
> >     at
> >
> >
> org.apache.isis.core.metamodel.specloader.ObjectReflectorDefault.loadSpecifications(ObjectReflectorDefault.java:415)
> >     at
> >
> >
> org.apache.isis.core.metamodel.specloader.specimpl.FacetedMethodsBuilder.createAssociationFacetedMethods(FacetedMethodsBuilder.java:310)
> >     at
> >
> >
> org.apache.isis.core.metamodel.specloader.specimpl.FacetedMethodsBuilder.getAssociationFacetedMethods(FacetedMethodsBuilder.java:294)
> >     at
> >
> >
> org.apache.isis.core.metamodel.specloader.specimpl.dflt.ObjectSpecificationDefault.createAssociations(ObjectSpecificationDefault.java:220)
> >     at
> >
> >
> org.apache.isis.core.metamodel.specloader.specimpl.dflt.ObjectSpecificationDefault.introspectTypeHierarchyAndMembers(ObjectSpecificationDefault.java:178)
> >     at
> >
> >
> org.apache.isis.core.metamodel.specloader.ObjectReflectorDefault.introspect(ObjectReflectorDefault.java:514)
> >     at
> >
> >
> org.apache.isis.core.metamodel.specloader.ObjectReflectorDefault.introspectIfRequired(ObjectReflectorDefault.java:501)
> >     at
> >
> >
> org.apache.isis.core.metamodel.specloader.ObjectReflectorDefault.loadSpecificationForSubstitutedClass(ObjectReflectorDefault.java:400)
> >     at
> >
> >
> org.apache.isis.core.metamodel.specloader.ObjectReflectorDefault.internalLoadSpecification(ObjectReflectorDefault.java:378)
> >     at
> >
> >
> org.apache.isis.core.metamodel.specloader.ObjectReflectorDefault.loadSpecification(ObjectReflectorDefault.java:344)
> >     at
> >
> >
> org.apache.isis.objectstore.jdo.datanucleus.DataNucleusApplicationComponents.catalogNamedQueries(DataNucleusApplicationComponents.java:242)
> >     at
> >
> >
> org.apache.isis.objectstore.jdo.datanucleus.DataNucleusApplicationComponents.initialize(DataNucleusApplicationComponents.java:112)
> >     at
> >
> >
> org.apache.isis.objectstore.jdo.datanucleus.DataNucleusApplicationComponents.<init>(DataNucleusApplicationComponents.java:103)
> >     at
> >
> >
> org.apache.isis.objectstore.jdo.datanucleus.DataNucleusPersistenceMechanismInstaller.createDataNucleusApplicationComponentsIfRequired(DataNucleusPersistenceMechanismInstaller.java:134)
> >     at
> >
> >
> org.apache.isis.objectstore.jdo.datanucleus.DataNucleusPersistenceMechanismInstaller.createObjectStore(DataNucleusPersistenceMechanismInstaller.java:110)
> >     at
> >
> >
> org.apache.isis.core.runtime.system.persistence.PersistenceSessionFactory.createPersistenceSession(PersistenceSessionFactory.java:95)
> >     at
> >
> >
> org.apache.isis.core.runtime.system.session.IsisSessionFactory.openSession(IsisSessionFactory.java:141)
> >     at
> >
> >
> org.apache.isis.core.runtime.system.context.IsisContextStatic.openSessionInstance(IsisContextStatic.java:70)
> >     at
> >
> >
> org.apache.isis.core.runtime.system.context.IsisContext.openSession(IsisContext.java:279)
> >     at
> >
> >
> org.apache.isis.core.runtime.system.IsisSystem.shutdownServices(IsisSystem.java:311)
> >     at
> >
> >
> org.apache.isis.core.runtime.system.IsisSystem.shutdown(IsisSystem.java:300)
> >     at
> >
> >
> org.apache.isis.core.integtestsupport.IsisSystemForTest.shutdown(IsisSystemForTest.java:467)
> >     at
> >
> >
> org.apache.isis.core.integtestsupport.IsisSystemForTest.access$100(IsisSystemForTest.java:74)
> >     at
> >
> >
> org.apache.isis.core.integtestsupport.IsisSystemForTest$Builder$1.run(IsisSystemForTest.java:301)
> > 14:58:11,442  [ObjectReflectorDefault Thread-1   INFO ]  shutting down
> > org.apache.isis.core.metamodel.specloader.ObjectReflectorDefault@6c9499ea
> >
> > Results :
> >
> > Tests in error:
> >   TODO: implement me
> >   TODO: implement me
> >   TODO: implement me
> >   TODO: implement me
> >   TODO: implement me
> >   TODO: implement me
> >   ParticipantsIntegTest$Create>SimpleAppIntegTest.initClass:33 » Runtime
> > java.la...
> >   ParticipantsIntegTest$ListAll>SimpleAppIntegTest.initClass:33 » Runtime
> > java.l...
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message