Adobe-Marketing-Cloud / aem-guides-wknd-events

Step by Step guide to creating a Single Page Application to use with AEM
48 stars 34 forks source link

Error when trying to run #45

Closed daddyschmack closed 5 years ago

daddyschmack commented 5 years ago

Hi All, I'm new to maven, I'm getting a when I run the command from the tutorial: mvn -PautoInstallPackage clean install

Here is a log of the the errors:

[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[ERROR] Unresolveable build extension: Plugin com.day.jcr.vault:content-package-maven-plugin:0.5.1 or one of its dependencies could not be resolved: Failure to find com.day.jcr.vault:content-package-maven-plugin:jar:0.5.1 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced @ 
[ERROR] Unknown packaging: content-package @ com.adobe.aem.guides:aem-guides-wknd-events.ui.apps:[unknown-version], /Users/johnjaeckle/Sites/aem-guides-wknd-events-angular-v1.0.0/ui.apps/pom.xml, line 34, column 16
[ERROR] Unresolveable build extension: Plugin com.day.jcr.vault:content-package-maven-plugin:0.5.1 or one of its dependencies could not be resolved: Failure to find com.day.jcr.vault:content-package-maven-plugin:jar:0.5.1 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced @ 
[ERROR] Unknown packaging: content-package @ com.adobe.aem.guides:aem-guides-wknd-events.ui.content:[unknown-version], /Users/johnjaeckle/Sites/aem-guides-wknd-events-angular-v1.0.0/ui.content/pom.xml, line 34, column 16
 @ 

I searched for issues found this article, https://github.com/Adobe-Marketing-Cloud/aem-guides-wknd-events/issues/21 and per the suggestion ran: mvn -PautoInstallPackage -Padobe-public clean install and it does much better, but I run into this error at the end:

[ERROR] Failed to execute goal com.day.jcr.vault:content-package-maven-plugin:0.5.1:install (install-package) on project aem-guides-wknd-events.ui.apps: Connection refused -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :aem-guides-wknd-events.ui.apps
davidjgonzalez commented 5 years ago

@daddyschmack is your AEM AUthor instance started and running on localhost:4502 (started with the default username/password of admin/admin)?

daddyschmack commented 5 years ago

@davidjgonzalez , I was following the tutorial at: https://helpx.adobe.com/experience-manager/kt/sites/using/getting-started-spa-wknd-tutorial-develop/angular/chapter-0.html , it says git clone, change branches, and run that command.

See Step #1 and #2.

Thanks,

John

daddyschmack commented 5 years ago

Downloading from central: https://repo.maven.apache.org/maven2/com/day/jcr/vault/content-package-maven-plugin/0.5.1/content-package-maven-plugin-0.5.1.pom.

The "day" directory doesn't exist in the com directory above.

daddyschmack commented 5 years ago

@davidjgonzalez , I'm a little more familiar with the structure now. I did not have my local server running, I could not create the local server per the companion tutorial because of similar maven issues. (Have you tried running either of these servers while not logged in as yourself?) But as a workaround, I finished the tutorial using the mocks per the instructions in this tutorial! It worked great.
Then I tried to install the snapshots onto a different server stood up in my organization, and change the proxy to point to that server.. (So we made progress!) But this was the result of the angular.model.json from the snapshot.zip files. ` :items:Object :itemsOrder:Array[0] :type:"wknd-events/components/structure/app" cssClassNames:"app page basicpage" designPath:"/libs/settings/wcm/designs/default" language:"en-US" templateName:"wknd-events-app-template" title:"Angular App"

`

Can you confirm if this is the angular.model.json you that is intended to be in the downloadable zip files, or did I mistake? I grabbed the snapshot files from https://github.com/Adobe-Marketing-Cloud/aem-guides-wknd-events/releases it looks like the ones listed were for react pages, but then I tried to install the ones labeled for angular, but with the server installed, both gave me the above json.

this is the new proxy file, which does reach the angular.model.json [

{

"context": [

  "/content/**/**.model.json",

  "/content/**/**.jpeg",

  "/content/**/**.jpg"

],

"target": "http://someAddress:4502 ",

"auth": "***:***",

"logLevel": "debug"

}

]

I checked my local angular.model.json and it reflects the information per the tutorial.

daddyschmack commented 5 years ago

@godanny86 , does the above make sense? Shouldn't the snapshot contain all the info I need to display the content if I completed the tutorial correctly?

godanny86 commented 5 years ago

The JSON you showed:

:items:Object
:itemsOrder:Array[0]
:type:"wknd-events/components/structure/app"
cssClassNames:"app page basicpage"
designPath:"/libs/settings/wcm/designs/default"
language:"en-US"
templateName:"wknd-events-app-template"
title:"Angular App"

Does not look correct. On the AEM Server can you check that the OSGi Bundle for wknd-events is active: http://aemhost/system/console ? Keepin mind it needs to be AEM version 6.4 + Service Pack 2

daddyschmack commented 5 years ago

checking now

godanny86 commented 5 years ago

The OSGi Bundle (Java code) running on AEM should dynamically create the JSON structure based on the page content. The JSON you currently have looks like the OOTB JSON. The ui.apps snapshot should include the OSGi Bundle that will render the correct the JSON. My guess is that the bundle is not started or installed correctly...

daddyschmack commented 5 years ago

Okay, this server is not on my machine, but a remote machine. The only thing I did was follow the package manager instructions. (Which doens't mean it's installed correctly.) basically, I downloaded the packages, then uploaded the packages, then installed the packages.

Here is the output from the from the OSGI bundels: `

545 WKND Events - Corecom.adobe.aem.guides.aem-guides-wknd-events.coreSymbolic Namecom.adobe.aem.guides.aem-guides-wknd-events.coreVersion0.0.1.SNAPSHOTBundle Locationjcrinstall:/apps/wknd-events/install/aem-guides-wknd-events.core-0.0.1-SNAPSHOT.jarLast ModificationMon Jan 07 15:28:03 EST 2019DescriptionCore bundle for WKND EventsStart Level20Exported Packagescom.adobe.aem.guides.wkndevents.core,version=1.0com.adobe.aem.guides.wkndevents.core.models,version=0.0.1Imported Packagescom.adobe.aem.guides.wkndevents.core.models from com.adobe.aem.guides.aem-guides-wknd-events.core (545)com.adobe.cq.export.json,version=[2.0,3) from com.adobe.cq.export.json (186)com.adobe.cq.export.json.hierarchy,version=[1.0,2) -- Cannot be resolvedcom.day.cq.wcm.api,version=[1.27,2) from com.day.cq.wcm.cq-wcm-api (431)com.day.cq.wcm.api.components,version=[5.8,6) from com.day.cq.wcm.cq-wcm-api (431)com.day.cq.wcm.api.designer,version=[5.9,6) from com.day.cq.wcm.cq-wcm-api (431)com.day.cq.wcm.api.policies,version=[1.6,2) from com.day.cq.wcm.cq-wcm-api (431)com.fasterxml.jackson.annotation,version=[2.8,3) from com.fasterxml.jackson.core.jackson-annotations (481)com.fasterxml.jackson.databind.annotation,version=[2.8,3) from com.fasterxml.jackson.core.jackson-databind (483)javax.annotation from org.apache.felix.framework (0)javax.inject,version=0.0.0 from org.apache.geronimo.specs.geronimo-atinject_1.0_spec (479)org.apache.commons.lang3,version=[3.5,4) from org.apache.commons.lang3 (38)org.apache.sling.api,version=[2.3,3) from org.apache.sling.api (68)org.apache.sling.api.request,version=[2.4,3) from org.apache.sling.api (68)org.apache.sling.api.resource,version=[2.10,3) from org.apache.sling.api (68)org.apache.sling.api.wrappers,version=[2.6,3) from org.apache.sling.api (68)org.apache.sling.models.annotations,version=[1.5,2) from org.apache.sling.models.api (515)org.apache.sling.models.annotations.injectorspecific,version=[1.1,2) from org.apache.sling.models.api (515)org.apache.sling.models.factory,version=[1.4,2) from org.apache.sling.models.api (515)Manifest HeadersBnd-LastModified: 1544128061618Build-Jdk: 1.8.0_181Built-By: dgonzaleBundle-Description: Core bundle for WKND EventsBundle-ManifestVersion: 2Bundle-Name: WKND Events - CoreBundle-SymbolicName: com.adobe.aem.guides.aem-guides-wknd-events.coreBundle-Version: 0.0.1.SNAPSHOTCreated-By: Apache Maven Bundle PluginExport-Package: com.adobe.aem.guides.wkndevents.core.models; uses:="com.adobe.cq.export.json, com.adobe.cq.export.json.hierarchy, com.fasterxml.jackson.annotation"; version="0.0.1", com.adobe.aem.guides.wkndevents.core; version="1.0"Import-Package: javax.inject; version="0.0.0", com.adobe.aem.guides.wkndevents.core.models, com.adobe.cq.export.json; version="[2.0, 3)", com.adobe.cq.export.json.hierarchy; version="[1.0, 2)", com.day.cq.wcm.api; version="[1.27, 2)", com.day.cq.wcm.api.components; version="[5.8, 6)", com.day.cq.wcm.api.designer; version="[5.9, 6)", com.day.cq.wcm.api.policies; version="[1.6, 2)", com.fasterxml.jackson.annotation; version="[2.8, 3)", com.fasterxml.jackson.databind.annotation; version="[2.8, 3)", javax.annotation, org.apache.commons.lang3; version="[3.5, 4)", org.apache.sling.api; version="[2.3, 3)", org.apache.sling.api.request; version="[2.4, 3)", org.apache.sling.api.resource; version="[2.10, 3)", org.apache.sling.api.wrappers; version="[2.6, 3)", org.apache.sling.models.annotations; version="[1.5, 2)", org.apache.sling.models.annotations.injectorspecific; version="[1.1, 2)", org.apache.sling.models.factory; version="[1.4, 2)"Manifest-Version: 1.0Require-Capability: osgi.ee; filter:="(&(osgi.ee=JavaSE)(version=1.8))"Sling-Model-Packages: com.adobe.aem.guides.wkndevents.coreTool: Bnd-3.3.0.201609221906 Symbolic Name com.adobe.aem.guides.aem-guides-wknd-events.core Version 0.0.1.SNAPSHOT Bundle Location jcrinstall:/apps/wknd-events/install/aem-guides-wknd-events.core-0.0.1-SNAPSHOT.jar Last Modification Mon Jan 07 15:28:03 EST 2019 Description Core bundle for WKND Events Start Level 20 Exported Packages com.adobe.aem.guides.wkndevents.core,version=1.0com.adobe.aem.guides.wkndevents.core.models,version=0.0.1 Imported Packages com.adobe.aem.guides.wkndevents.core.models from com.adobe.aem.guides.aem-guides-wknd-events.core (545)com.adobe.cq.export.json,version=[2.0,3) from com.adobe.cq.export.json (186)com.adobe.cq.export.json.hierarchy,version=[1.0,2) -- Cannot be resolvedcom.day.cq.wcm.api,version=[1.27,2) from com.day.cq.wcm.cq-wcm-api (431)com.day.cq.wcm.api.components,version=[5.8,6) from com.day.cq.wcm.cq-wcm-api (431)com.day.cq.wcm.api.designer,version=[5.9,6) from com.day.cq.wcm.cq-wcm-api (431)com.day.cq.wcm.api.policies,version=[1.6,2) from com.day.cq.wcm.cq-wcm-api (431)com.fasterxml.jackson.annotation,version=[2.8,3) from com.fasterxml.jackson.core.jackson-annotations (481)com.fasterxml.jackson.databind.annotation,version=[2.8,3) from com.fasterxml.jackson.core.jackson-databind (483)javax.annotation from org.apache.felix.framework (0)javax.inject,version=0.0.0 from org.apache.geronimo.specs.geronimo-atinject_1.0_spec (479)org.apache.commons.lang3,version=[3.5,4) from org.apache.commons.lang3 (38)org.apache.sling.api,version=[2.3,3) from org.apache.sling.api (68)org.apache.sling.api.request,version=[2.4,3) from org.apache.sling.api (68)org.apache.sling.api.resource,version=[2.10,3) from org.apache.sling.api (68)org.apache.sling.api.wrappers,version=[2.6,3) from org.apache.sling.api (68)org.apache.sling.models.annotations,version=[1.5,2) from org.apache.sling.models.api (515)org.apache.sling.models.annotations.injectorspecific,version=[1.1,2) from org.apache.sling.models.api (515)org.apache.sling.models.factory,version=[1.4,2) from org.apache.sling.models.api (515) Manifest Headers Bnd-LastModified: 1544128061618Build-Jdk: 1.8.0_181Built-By: dgonzaleBundle-Description: Core bundle for WKND EventsBundle-ManifestVersion: 2Bundle-Name: WKND Events - CoreBundle-SymbolicName: com.adobe.aem.guides.aem-guides-wknd-events.coreBundle-Version: 0.0.1.SNAPSHOTCreated-By: Apache Maven Bundle PluginExport-Package: com.adobe.aem.guides.wkndevents.core.models; uses:="com.adobe.cq.export.json, com.adobe.cq.export.json.hierarchy, com.fasterxml.jackson.annotation"; version="0.0.1", com.adobe.aem.guides.wkndevents.core; version="1.0"Import-Package: javax.inject; version="0.0.0", com.adobe.aem.guides.wkndevents.core.models, com.adobe.cq.export.json; version="[2.0, 3)", com.adobe.cq.export.json.hierarchy; version="[1.0, 2)", com.day.cq.wcm.api; version="[1.27, 2)", com.day.cq.wcm.api.components; version="[5.8, 6)", com.day.cq.wcm.api.designer; version="[5.9, 6)", com.day.cq.wcm.api.policies; version="[1.6, 2)", com.fasterxml.jackson.annotation; version="[2.8, 3)", com.fasterxml.jackson.databind.annotation; version="[2.8, 3)", javax.annotation, org.apache.commons.lang3; version="[3.5, 4)", org.apache.sling.api; version="[2.3, 3)", org.apache.sling.api.request; version="[2.4, 3)", org.apache.sling.api.resource; version="[2.10, 3)", org.apache.sling.api.wrappers; version="[2.6, 3)", org.apache.sling.models.annotations; version="[1.5, 2)", org.apache.sling.models.annotations.injectorspecific; version="[1.1, 2)", org.apache.sling.models.factory; version="[1.4, 2)"Manifest-Version: 1.0Require-Capability: osgi.ee; filter:="(&(osgi.ee=JavaSE)(version=1.8))"Sling-Model-Packages: com.adobe.aem.guides.wkndevents.coreTool: Bnd-3.3.0.201609221906
Symbolic Name com.adobe.aem.guides.aem-guides-wknd-events.core
Version 0.0.1.SNAPSHOT
Bundle Location jcrinstall:/apps/wknd-events/install/aem-guides-wknd-events.core-0.0.1-SNAPSHOT.jar
Last Modification Mon Jan 07 15:28:03 EST 2019
Description Core bundle for WKND Events
Start Level 20
Exported Packages com.adobe.aem.guides.wkndevents.core,version=1.0com.adobe.aem.guides.wkndevents.core.models,version=0.0.1
Imported Packages com.adobe.aem.guides.wkndevents.core.models from com.adobe.aem.guides.aem-guides-wknd-events.core (545)com.adobe.cq.export.json,version=[2.0,3) from com.adobe.cq.export.json (186)com.adobe.cq.export.json.hierarchy,version=[1.0,2) -- Cannot be resolvedcom.day.cq.wcm.api,version=[1.27,2) from com.day.cq.wcm.cq-wcm-api (431)com.day.cq.wcm.api.components,version=[5.8,6) from com.day.cq.wcm.cq-wcm-api (431)com.day.cq.wcm.api.designer,version=[5.9,6) from com.day.cq.wcm.cq-wcm-api (431)com.day.cq.wcm.api.policies,version=[1.6,2) from com.day.cq.wcm.cq-wcm-api (431)com.fasterxml.jackson.annotation,version=[2.8,3) from com.fasterxml.jackson.core.jackson-annotations (481)com.fasterxml.jackson.databind.annotation,version=[2.8,3) from com.fasterxml.jackson.core.jackson-databind (483)javax.annotation from org.apache.felix.framework (0)javax.inject,version=0.0.0 from org.apache.geronimo.specs.geronimo-atinject_1.0_spec (479)org.apache.commons.lang3,version=[3.5,4) from org.apache.commons.lang3 (38)org.apache.sling.api,version=[2.3,3) from org.apache.sling.api (68)org.apache.sling.api.request,version=[2.4,3) from org.apache.sling.api (68)org.apache.sling.api.resource,version=[2.10,3) from org.apache.sling.api (68)org.apache.sling.api.wrappers,version=[2.6,3) from org.apache.sling.api (68)org.apache.sling.models.annotations,version=[1.5,2) from org.apache.sling.models.api (515)org.apache.sling.models.annotations.injectorspecific,version=[1.1,2) from org.apache.sling.models.api (515)org.apache.sling.models.factory,version=[1.4,2) from org.apache.sling.models.api (515)
Manifest Headers Bnd-LastModified: 1544128061618Build-Jdk: 1.8.0_181Built-By: dgonzaleBundle-Description: Core bundle for WKND EventsBundle-ManifestVersion: 2Bundle-Name: WKND Events - CoreBundle-SymbolicName: com.adobe.aem.guides.aem-guides-wknd-events.coreBundle-Version: 0.0.1.SNAPSHOTCreated-By: Apache Maven Bundle PluginExport-Package: com.adobe.aem.guides.wkndevents.core.models; uses:="com.adobe.cq.export.json, com.adobe.cq.export.json.hierarchy, com.fasterxml.jackson.annotation"; version="0.0.1", com.adobe.aem.guides.wkndevents.core; version="1.0"Import-Package: javax.inject; version="0.0.0", com.adobe.aem.guides.wkndevents.core.models, com.adobe.cq.export.json; version="[2.0, 3)", com.adobe.cq.export.json.hierarchy; version="[1.0, 2)", com.day.cq.wcm.api; version="[1.27, 2)", com.day.cq.wcm.api.components; version="[5.8, 6)", com.day.cq.wcm.api.designer; version="[5.9, 6)", com.day.cq.wcm.api.policies; version="[1.6, 2)", com.fasterxml.jackson.annotation; version="[2.8, 3)", com.fasterxml.jackson.databind.annotation; version="[2.8, 3)", javax.annotation, org.apache.commons.lang3; version="[3.5, 4)", org.apache.sling.api; version="[2.3, 3)", org.apache.sling.api.request; version="[2.4, 3)", org.apache.sling.api.resource; version="[2.10, 3)", org.apache.sling.api.wrappers; version="[2.6, 3)", org.apache.sling.models.annotations; version="[1.5, 2)", org.apache.sling.models.annotations.injectorspecific; version="[1.1, 2)", org.apache.sling.models.factory; version="[1.4, 2)"Manifest-Version: 1.0Require-Capability: osgi.ee; filter:="(&(osgi.ee=JavaSE)(version=1.8))"Sling-Model-Packages: com.adobe.aem.guides.wkndevents.coreTool: Bnd-3.3.0.201609221906

`

daddyschmack commented 5 years ago

Here is what I see on the package manager: image

daddyschmack commented 5 years ago

and here is my sites view: image

godanny86 commented 5 years ago

yeah it is as I expected: Packages com.adobe.aem.guides.wkndevents.core.models from com.adobe.aem.guides.aem-guides-wknd-events.core (545)com.adobe.cq.export.json,version=[2.0,3) from com.adobe.cq.export.json (186)com.adobe.cq.export.json.hierarchy,version=[1.0,2) -- Cannot be resolved. Can you confirm that this is AEM 6.4.2?(http://aemserver/libs/cq/core/content/welcome.html)? On occasion I have seen a restart needed to resolve the dependencies

daddyschmack commented 5 years ago

Apparantly we are running AEM 6.4.0, What is the LOE and risks involved in upgrading to 6.4.2.

godanny86 commented 5 years ago

At this point, you should upgrade to 6.4.3: https://helpx.adobe.com/experience-manager/6-4/release-notes/sp-release-notes.html. The LOE (just a package install) and risks should be minimal, but should always be done in a QA and Staging environment before touching production.

daddyschmack commented 5 years ago

The upgrade fixed things!!! Thanks @godanny86

godanny86 commented 5 years ago

sweet!

daddyschmack commented 5 years ago

@godanny86 , I have one more quick question for you. My company was expecting that they could create a form in Adobe AEM Manager, and then have that form, w/o having to create a matching form on the angular side, be served by the Angular Application.
Is that possible? (I thought AEM simply provided content.)

Thanks,

gdguradio commented 4 years ago

How to fix ff:

[ERROR] Failed to execute goal com.day.jcr.vault:content-package-maven-plugin:1.0.2:install (default-cli) on project aem-guides-wknd.ui.apps: Connection refused (Connection refused) -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.day.jcr.vault:content-package-maven-plugin:1.0.2:install (default-cli) on project aem-guides-wknd.ui.apps: Connection refused (Connection refused)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:566)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoExecutionException: Connection refused (Connection refused)

EDIT:

Maven and Java versions:

image