fixed.

On 7 March 2016 at 12:52, Dan Haywood <[email protected]> wrote:

> Ah ok. I'll fix that this evening.
> Thx, Dan
> On 7 Mar 2016 12:50, "Nacho Cánovas Rejón" <[email protected]>
> wrote:
>
>> Hi everyone.
>>
>> I rescue this thread because I have some issue running with Java 1.7
>>
>> The problem exists since' ISIS-993: when normalize, bind actions to
>> properties or field sets (if metadata not already specified as an
>> annotation). (Commit id: e014bf80a823457bdbfc3acb5fac4b4a666715a1)'
>>
>> As I can see, Consumer class is created in Java 1.8, so there is no way
>> to compile Isis Code with 1.7.
>>
>> This is the stack trace I get executing some test.
>>
>> java.lang.NoClassDefFoundError: java/util/function/Consumer
>>         at java.lang.Class.forName0(Native Method)
>>         at java.lang.Class.forName(Class.java:191)
>>         at
>> org.apache.isis.core.runtime.services.ServiceInstantiator.loadClass(ServiceInstantiator.java:117)
>>         at
>> org.apache.isis.core.runtime.services.ServiceInstantiator.createInstance(ServiceInstantiator.java:104)
>>         at
>> org.apache.isis.core.runtime.services.ServicesInstallerUtils.instantiateService(ServicesInstallerUtils.java:81)
>>         at
>> org.apache.isis.core.runtime.services.ServicesInstallerUtils$1.apply(ServicesInstallerUtils.java:96)
>>         at
>> org.apache.isis.core.runtime.services.ServicesInstallerUtils$1.apply(ServicesInstallerUtils.java:93)
>>         at
>> com.google.common.collect.Iterators$8.transform(Iterators.java:817)
>>         at
>> com.google.common.collect.TransformedIterator.next(TransformedIterator.java:48)
>>         at
>> com.google.common.collect.Iterators$7.computeNext(Iterators.java:674)
>>         at
>> com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:143)
>>         at
>> com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:138)
>>         at com.google.common.collect.Iterators.addAll(Iterators.java:364)
>>         at com.google.common.collect.Lists.newArrayList(Lists.java:162)
>>         at
>> com.google.common.collect.Collections2$FilteredCollection.toArray(Collections2.java:215)
>>         at java.util.ArrayList.<init>(ArrayList.java:164)
>>         at com.google.common.collect.Lists.newArrayList(Lists.java:147)
>>         at
>> org.apache.isis.core.runtime.services.ServicesInstallerUtils.instantiateServicesFrom(ServicesInstallerUtils.java:89)
>>         at
>> org.apache.isis.core.runtime.services.ServicesInstallerFromConfigurationAndAnnotation.getServices(ServicesInstallerFromConfigurationAndAnnotation.java:98)
>>         at
>> org.apache.isis.core.integtestsupport.IsisSystemForTest$Builder.withServicesIn(IsisSystemForTest.java:242)
>>         at
>> com.xms.framework.testing.TestConfigurationHelper.configureTestBuilder(TestConfigurationHelper.java:71)
>>         at
>> com.xms.framework.measurement.integration.MeasurementSystemInitializer$MeasurementIntegTestBuilder.<init>(MeasurementSystemInitializer.java:33)
>>         at
>> com.xms.framework.measurement.integration.MeasurementSystemInitializer$MeasurementIntegTestBuilder.<init>(MeasurementSystemInitializer.java:31)
>>         at
>> com.xms.framework.measurement.integration.MeasurementSystemInitializer.initIsft(MeasurementSystemInitializer.java:23)
>>         at
>> com.xms.framework.measurement.integration.MeasurementIntegTestAbstract.initClass(MeasurementIntegTestAbstract.java:19)
>>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>         at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>>         at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>         at java.lang.reflect.Method.invoke(Method.java:606)
>>         at
>> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
>>         at
>> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
>>         at
>> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
>>         at
>> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
>>         at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
>>         at
>> org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
>>         at
>> org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
>>         at
>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
>>         at
>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)
>>         at
>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
>>         at
>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
>> Caused by: java.lang.ClassNotFoundException: java.util.function.Consumer
>>         at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
>>         at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
>>         at java.security.AccessController.doPrivileged(Native Method)
>>         at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
>>         at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
>>         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
>>         at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
>>         ... 40 more
>>
>>
>> Thanks so much for everything.
>>
>>
>> -----Original Message-----
>> From: Diego [mailto:[email protected]]
>> Sent: domingo, 28 de febrero de 2016 14:59
>> To: [email protected]
>> Subject: Re: Multiple build problems on simpleapp-archetype on Java 1.7
>>
>> Hi guys,
>>
>> thanks a lot.
>>
>> @Kevin
>> Good suggestion I tried but I'm having hard luck installing two parallel
>> JDK on my windows 10 box, as in [1] (still working on the suggested
>> solution) and besides I want to use 1.7 (hoping to introduce Isis on my
>> company which is not on Java 8 by now). On the mailing list I saw that 1.7
>> support is planned till Java 9 is out (fortunately :)
>>
>>
>> @Dan
>>
>> Yes, those small modifications allowed to build and run under my 1.7 jdk.
>> Isis looks fantastic (especially, but not only for, rapid prototyping) ,
>> I'm willing to explore a little bit more.
>>
>> BTW, I ventured in the analysis of a possibile handling of that problem
>> and found the Maven Animal Sniffer Plugin [2] , but couldn't make it
>> intercept that specific problem (source and target on 1.7 should
>> suffice...) Anyway it looks interesting (other than specific jdks)  for
>> other APIs too by means of scanning signatures... Just a generic suggestion
>> for Isis.
>> Maybe you might have a check. :)
>>
>> Be aware that it's a Codehaus project, and Codehaus, per se, has shutdown
>> code hosting services
>>
>> Bye.
>>
>> Diego
>>
>>
>> [1]
>>
>> http://stackoverflow.com/questions/26324486/properly-installing-java-8-along-with-java-7
>> [2]
>>
>> http://www.mojohaus.org/animal-sniffer/animal-sniffer-maven-plugin/index.html
>>
>> On Sun, Feb 28, 2016 at 11:00 AM, Dan Haywood <
>> [email protected]>
>> wrote:
>>
>> > Hi Diego,
>> >
>> > OK, so I just tried this out, and you are right that there is a slight
>> > issue trying to compile the code under JDK 1.7, but it's easy enough
>> > to work around.
>> >
>> > basically, where you are getting the compile exceptions, change the
>> > code to cast to the raw type, eg:
>> >
>> >
>> >     @Override
>> >     public List<Class<?>> getModules() {
>> >         return (List)Arrays.asList(
>> >                 ...
>> >         );
>> >     }
>> >
>> >
>> > I had to do this for DomainAppAppManifest, DomainAppDomManifest.
>> >
>> > Similarly
>> >
>> >     public List<Class<? extends FixtureScript>> getFixtures() {
>> >         return (List)Lists.newArrayList(RecreateSimpleObjects.class);
>> >     }
>> >
>> > in DomainAppAppManifestWithFixtures
>> >
>> >
>> > I also had the following changes to pom.xml (you mentioned some of
>> these):
>> >
>> > - adjust maven-enforcer-plugin configuration:
>> >
>> >                             <requireJavaVersion>
>> >                                 <version>[1.7.0,)</version>
>> >                             </requireJavaVersion>
>> >
>> > - adjust maven-compiler-plugin configuration:
>> >
>> >                     <configuration>
>> >                         <source>1.7</source>
>> >                         <target>1.7</target>
>> >                         <!--
>> >                         <compilerArgument>-parameters</compilerArgument>
>> >             -->
>> >                     </configuration>
>> >
>> >
>> > HTH
>> > Dan
>> >
>> >
>> > On 27 February 2016 at 15:41, Diego <[email protected]> wrote:
>> >
>> > > Hello everyone.
>> > >
>> > > I was trying to get acquainted with Apache Isis (which I find
>> > fascinating)
>> > > by means
>> > > of the tutorial pages using the simpleapp archetype.
>> > >
>> > > I'm having multiple issues though:
>> > >
>> > > a) Config issues
>> > >
>> > > b) Source code issues
>> > >
>> > > My setup:
>> > >
>> > > Windows 10, Eclipse Luna, Maven 3.3.9, JDK 1.7.0_79-b15 (64 bit)
>> > >
>> > > About a)
>> > >
>> > > Using Maven from the command line (pasted) :
>> > >
>> > >
>> > >
>> > c:\Work2\Testing\myapp3\myapp>c:\Work2\bin\apache-maven-3.3.9-bin\apac
>> > he-maven-3.3.9\bin\mvn
>> > >    archetype:generate -D archetypeGroupId=org.apache.isis.archetype
>> > > -D archetypeArtifactId=simpleapp-archetype  -D
>> > > archetypeVersion=1.11.1 -D groupId=com.mycompany -D artifactId=myapp
>> > > -D version=1.0-SNAPSHOT -B
>> > >
>> > >
>> > > Maven is signalling source and target being 1.8 and also having
>> > > troubles with
>> > >
>> > > this in the POM file
>> > >
>> > > <compilerArgument>-parameters</compilerArgument>
>> > >
>> > > To solve this, I tried Maven v 3.2.1 and v.3.0.5 adjusting to 1.7
>> > > and commenting out the compiler argument (and modifying
>> > > requireJavaVersion in maven enforcer plugin)
>> > >
>> > > About b)
>> > >
>> > > By tweaking the parameters, somehow I managed to start the
>> > > compilaton process on Maven 3.3.9 (mvn -e -X clean compile ) but I'm
>> > > getting 'incompatible types" compiler errors:
>> > >
>> > > org.apache.maven.lifecycle.LifecycleExecutionException: Failed to
>> > > execute goal
>> > > org.apache.maven.plugins:maven-compiler-plugin:3.1:compile
>> > > (default-compile) on project myapp-dom: Compilation failure
>> > > /C:/Work2/Testing/myapp2/myapp/dom/src/main/java/domainapp/dom/
>> > > DomainAppDomManifest.java:[36,29] incompatible types
>> > >   required: java.util.List<java.lang.Class<?>>
>> > >   found:    java.util.List<java.lang.Class<domainapp.dom.
>> > > DomainAppDomainModule>>
>> > >
>> > > ....
>> > > ....
>> > >
>> > > Caused by:
>> org.apache.maven.plugin.compiler.CompilationFailureException:
>> > > Compilation failure
>> > > /C:/Work2/Testing/myapp2/myapp/dom/src/main/java/domainapp/dom/
>> > > DomainAppDomManifest.java:[36,29] incompatible types
>> > >   required: java.util.List<java.lang.Class<?>>
>> > >   found:    java.util.List<java.lang.Class<domainapp.dom.
>> > > DomainAppDomainModule>>
>> > >
>> > >
>> > > I tried some code tweaking and got further complaints about some
>> > > method
>> > not
>> > > overridden (getModules() by AppManifest abstract class)
>> > >
>> > > I did some research and this MIGHT be related to a JDK bug but..
>> > > basically... I'm lost.
>> > >
>> > > I saw that Apache Isis 1.11 was re-released (1.11.1) to comply with
>> > > 1.7 (and still supports 1.7 as a minimum fortunately)  so this might
>> > > be related.
>> > >
>> > > Can you help?
>> > >
>> > >
>> > > Cheers,
>> > >
>> > > Diego
>> > >
>> > > P.S. = I also tried using 1.12.0-SNAPSHOT  and using Maven from
>> > > inside Eclipse, with the same effect
>> > >
>> >
>>
>>

Reply via email to