Xie Kevin
Xie Kevin

Reputation: 31

Error during include of component : xxx cannot be resolved to a type

I developed a class DateFormatter in core bundle following blog . and get my date value in header page :

<sly data-sly-use.date="${'com.xxx.DateFormatter' @ date=pageProperties.jcr:created,
     format='dd/MM/yyyy'}"></sly>
<meta name="my_date" content="${date.value}">

This works fine on my local server. However, after I run package install onto remote server. On the author page,it got errors:

Error Message: org.apache.sling.scripting.sightly.SightlyException: Compilation errors in org/apache/sling/scripting/sightly/apps/xxx/components/structure/page/header_html.java: Line 28, column 1285 : Only a type can be imported. com.xxx.DateFormatter resolves to a package Line 106, column 4988 : DateFormatter cannot be resolved to a type

I tried mvn clean and installed bundles onto the remote server but no luck.

Upvotes: 1

Views: 8801

Answers (1)

Xie Kevin
Xie Kevin

Reputation: 31

Verified the bundle is active and this issue is resolved now. Maybe it was not active during that time. BTW, I run bundle installation (not installPackage) specially also resolved the issue.

Upvotes: 2

Related Questions