I'm working on a Portlet project using Java8 and Spring 4.1.5
I have a class annotated with @Service
that includes this line (same failure with any closure)
user.getOrganizations().stream().forEach(o -> System.out.println(o));
When I deploy my webapp I get the following error (omitting the massive stack-trace)
org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate component class: file [C:\dev\liferay-developer-studio\DeveloperStudio\workspace\somepath\service\MyService.class];
nested exception is java.lang.ArrayIndexOutOfBoundsException: 52264
....
Caused by: java.lang.ArrayIndexOutOfBoundsException: 52264
at org.springframework.asm.ClassReader.readClass(Unknown Source)
My dependencies in MVN look like:
myGroupId:myArtifactId:war:0.0.0-SNAPSHOT
+- com.liferay.portal:portal-service:jar:6.2.10.11:provided
+- com.liferay.portal:util-bridges:jar:6.2.10.11:provided
+- com.liferay.portal:util-java:jar:6.2.10.11:provided
+- com.liferay.portal:util-taglib:jar:6.2.10.11:provided
+- javax.portlet:portlet-api:jar:2.0:provided
+- javax.servlet:servlet-api:jar:2.5:provided
+- javax.servlet.jsp:jsp-api:jar:2.2:provided
+- org.springframework:spring-webmvc-portlet:jar:4.1.5.RELEASE:provided
| +- org.springframework:spring-beans:jar:4.1.5.RELEASE:provided
| +- org.springframework:spring-context:jar:4.1.5.RELEASE:provided
| | +- org.springframework:spring-aop:jar:4.1.5.RELEASE:provided
| | | \- aopalliance:aopalliance:jar:1.0:provided
| | \- org.springframework:spring-expression:jar:4.1.5.RELEASE:provided
| +- org.springframework:spring-core:jar:4.1.5.RELEASE:provided
| | \- commons-logging:commons-logging:jar:1.2:provided
| +- org.springframework:spring-web:jar:4.1.5.RELEASE:provided
| \- org.springframework:spring-webmvc:jar:4.1.5.RELEASE:provided
+- org.springframework:spring-test:jar:4.1.5.RELEASE:test
+- org.mockito:mockito-all:jar:1.10.8:test
+- junit:junit:jar:4.11:test
| \- org.hamcrest:hamcrest-core:jar:1.3:test
+- org.powermock:powermock-module-junit4:jar:1.5.1:test
| \- org.powermock:powermock-module-junit4-common:jar:1.5.1:test
| \- org.powermock:powermock-reflect:jar:1.5.1:test
| \- org.objenesis:objenesis:jar:1.2:test
+- org.powermock:powermock-module-junit4-rule-agent:jar:1.5.1:test
| +- org.powermock:powermock-module-javaagent:jar:1.5.1:test
| \- org.powermock:powermock-core:jar:1.5.1:test
| \- org.javassist:javassist:jar:3.18.0-GA:test
\- org.powermock:powermock-api-mockito:jar:1.5.1:test
\- org.powermock:powermock-api-support:jar:1.5.1:test
Every solution that I've found so far says "If you are using spring 3 update to spring 4" but I'm already using it
Any ideas?
Cheers