最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

I can't deploy the rest-builder module (Liferay 7.4) - TransformUtil - Stack Overflow

programmeradmin0浏览0评论

I am trying to deploy a rest-builder service but I have same problem detailed in this entry:

I can't deploy the rest-builder module (Liferay 7.4)

Anyone found a solution?

I detected that TransformUtil autogenerated was using a deprecated package. I changed it but problem continue.

enter image description here

LOG ERROR:

C:\projects\liferay\developer-tools\liferay-workspace\modules\event-tracker-rest\event-tracker-rest-impl\src\main\java\event\tracker\rest\internal\resource\v1_0\BaseEventEntryResourceImpl.java:274: error: no suitable method found for transform(T#1[],UnsafeFunction<T#1,R#1,Exception>,Class<CAP#1>) return TransformUtil.transform(array, unsafeFunction, clazz); ^ method TransformUtil.<T#2,R#2,E#1>transform(Collection<T#2>,UnsafeFunction<T#2,R#2,E#1>) is not applicable (cannot infer type-variable(s) T#2,R#2,E#1 (actual and formal argument lists differ in length)) method TransformUtil.<R#3,E#2>transform(int[],UnsafeFunction<Integer,R#3,E#2>,Class) is not applicable (cannot infer type-variable(s) R#3,E#2 (argument mismatch; T#1[] cannot be converted to int[])) method TransformUtil.transform(long[],UnsafeFunction,Class) is not applicable (cannot infer type-variable(s) R#4,E#3 (argument mismatch; T#1[] cannot be converted to long[])) method TransformUtil.transform(T#3[],UnsafeFunction,Class) is not applicable (inference variable R#5 has incompatible bounds equality constraints: R#1 lower bounds: CAP#1) where T#1,R#1,T#2,R#2,E#1,R#3,E#2,R#4,E#3,T#3,R#5,E#4 are type-variables: T#1 extends Object declared in method transform(T#1[],UnsafeFunction,Class) R#1 extends Object declared in method <T#1,R#1>transform(T#1[],UnsafeFunction<T#1,R#1,Exception>,Class) T#2 extends Object declared in method transform(Collection,UnsafeFunction) R#2 extends Object declared in method transform(Collection,UnsafeFunction) E#1 extends Throwable declared in method transform(Collection,UnsafeFunction) R#3 extends Object declared in method transform(int[],UnsafeFunction,Class) E#2 extends Throwable declared in method transform(int[],UnsafeFunction,Class) R#4 extends Object declared in method transform(long[],UnsafeFunction,Class) E#3 extends Throwable declared in method transform(long[],UnsafeFunction,Class) T#3 extends Object declared in method transform(T#3[],UnsafeFunction,Class) R#5 extends Object declared in method transform(T#3[],UnsafeFunction,Class) E#4 extends Throwable declared in method transform(T#3[],UnsafeFunction,Class) where CAP#1 is a fresh type-variable: CAP#1 extends Object from capture of ? C:\projects\liferay\developer-tools\liferay-workspace\modules\event-tracker-rest\event-tracker-rest-impl\src\main\java\event\tracker\rest\internal\resource\v1_0\BaseEventEntryResourceImpl.java:281: error: method transformToArray in class TransformUtil cannot be applied to given types; return TransformUtil.transformToArray( ^ required: Collection,UnsafeFunction,Class found: Collection,UnsafeFunction,Class reason: inference variable R#1 has incompatible bounds equality constraints: R#2 lower bounds: CAP#1 where T#1,R#1,E,T#2,R#2 are type-variables: T#1 extends Object declared in method transformToArray(Collection,UnsafeFunction,Class) R#1 extends Object declared in method transformToArray(Collection,UnsafeFunction,Class) E extends Throwable declared in method transformToArray(Collection,UnsafeFunction,Class) T#2 extends Object declared in method transformToArray(Collection,UnsafeFunction,Class) R#2 extends Object declared in method <T#2,R#2>transformToArray(Collection<T#2>,UnsafeFunction<T#2,R#2,Exception>,Class<?>) where CAP#1 is a fresh type-variable: CAP#1 extends Object from capture of ? Note: C:\projects\liferay\developer-tools\liferay-workspace\modules\event-tracker-rest\event-tracker-rest-impl\src\main\java\event\tracker\rest\internal\resource\v1_0\BaseEventEntryResourceImpl.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: C:\projects\liferay\developer-tools\liferay-workspace\modules\event-tracker-rest\event-tracker-rest-impl\src\main\java\event\tracker\rest\internal\graphql\query\v1_0\Query.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. 2 errors

Task :modules:event-tracker-rest:event-tracker-rest-impl:compileJava FAILED

FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ':modules:event-tracker-rest:event-tracker-rest-impl:compileJava'.

Compilation failed; see the compiler error output for details.

  • Try:

Run with --info option to get more log output. Run with --scan to get full insights.

I tried to modify deprecated package using: com.liferay.petra.function.transform.TransformUtil, but error persists.

I want to deploy the rest service into OSGi container.

发布评论

评论列表(0)

  1. 暂无评论