Error in installing the amp file in alfresco war file - alfresco

I am new to alfresco record management 5.0,extracted the alfresco rm source code from github for customization of unique record identifier.In the pom file, I have uncommented the amp and then build and getting the amp file.To install amp file to alfresco war below statement executed.Also I have added the module properties file under the config amp folder
java -jar alfresco-mmt.jar install c:\alfresco-one\amps\repo-amp.amp c:\alfresco-one\tomcat\webapps\alfresco.war
[![enter image description here][1]][1]
Error occured:
de.schlichtherle.truezip.fs.FsEntryNotFoundException: amp:file:/c:/alfresco-one/
amps/alfresco-rm-server-amp.amp!/module.properties (no such entry)
at de.schlichtherle.truezip.fs.FsBasicArchiveController$1Input.getLocalT
arget(FsBasicArchiveController.java:187)
at de.schlichtherle.truezip.fs.FsBasicArchiveController$1Input.getDelega
te(FsBasicArchiveController.java:200)
at de.schlichtherle.truezip.socket.DelegatingInputSocket.getBoundSocket(
DelegatingInputSocket.java:43)
at de.schlichtherle.truezip.socket.DelegatingInputSocket.newInputStream(
DelegatingInputSocket.java:63)
at de.schlichtherle.truezip.fs.FsContextController$Input.newInputStream(
FsContextController.java:273)
at de.schlichtherle.truezip.fs.FsResourceController$Input.newInputStream
(FsResourceController.java:252)
at de.schlichtherle.truezip.socket.DelegatingInputSocket.newInputStream(
DelegatingInputSocket.java:63)
at de.schlichtherle.truezip.fs.FsSyncController$Input.newInputStream(FsS
yncController.java:400)
at de.schlichtherle.truezip.fs.FsLockController$Input$1NewInputStream.ca
ll(FsLockController.java:455)
at de.schlichtherle.truezip.fs.FsLockController$Input$1NewInputStream.ca
ll(FsLockController.java:452)
at de.schlichtherle.truezip.fs.FsLockController.locked(FsLockController.
java:328)
at de.schlichtherle.truezip.fs.FsLockController.writeLocked(FsLockContro
ller.java:268)
at de.schlichtherle.truezip.fs.FsLockController$Input.newInputStream(FsL
ockController.java:459)
at de.schlichtherle.truezip.fs.FsFinalizeController$Input.newInputStream
(FsFinalizeController.java:177)
at de.schlichtherle.truezip.fs.FsFalsePositiveArchiveController$1Input$N
ewInputStream.call(FsFalsePositiveArchiveController.java:333)
at de.schlichtherle.truezip.fs.FsFalsePositiveArchiveController$1Input$N
ewInputStream.call(FsFalsePositiveArchiveController.java:326)
at de.schlichtherle.truezip.fs.FsFalsePositiveArchiveController$TryChild
.call(FsFalsePositiveArchiveController.java:507)
at de.schlichtherle.truezip.fs.FsFalsePositiveArchiveController.call(FsF
alsePositiveArchiveController.java:104)
at de.schlichtherle.truezip.fs.FsFalsePositiveArchiveController$1Input.n
ewInputStream(FsFalsePositiveArchiveController.java:323)
at de.schlichtherle.truezip.file.TFileInputStream.newInputStream(TFileIn
putStream.java:104)
at de.schlichtherle.truezip.file.TFileInputStream.<init>(TFileInputStrea
m.java:81)
at org.alfresco.repo.module.tool.ModuleDetailsHelper.createModuleDetails
FromPropertyLocation(ModuleDetailsHelper.java:74)
at org.alfresco.repo.module.tool.ModuleManagementTool.installModule(Modu
leManagementTool.java:220)
at org.alfresco.repo.module.tool.ModuleManagementTool.main(ModuleManagem
entTool.java:813)
01200001 An error was encountered during deployment of the AMP into the WAR: 012
00000 Unable to load module details from property file. File Not Found, amp:file
:/c:/alfresco-one/amps/alfresco-rm-server-amp.amp!/module.properties (no such en
try)
Please help to resolve this.Thanks

Related

Nuxt3 deployment with Cloudflare pages failed

I have successfully compiled my nuxt3 project locally. But the deployment is not working with cloud flare page
00:14:35.140 Executing user command: npm run generate
00:14:35.613
00:14:35.613 > generate
00:14:35.613 > nuxt generate
00:14:35.614
00:14:35.725 Nuxt CLI v3.0.0-rc.3-27567768.c1f728e
00:14:38.919 ✔ Using ~/components/content for components in Markdown
00:14:43.437 ℹ Vite client warmed up in 3072ms
00:14:44.646 ℹ Client built in 4280ms
00:14:44.681 ℹ Building server...
00:14:47.053 ✔ Server built in 2373ms
00:14:47.249 ✔ Generated public dist
00:14:47.249 ℹ Initializing prerenderer
00:14:50.871 ℹ Prerendering 4 initial routes with crawler
00:14:50.891 ├─ / (20ms)
00:14:50.894 ├─ /200 (3ms)
00:14:50.897 ├─ /404 (3ms)
00:14:50.958 ├─ /api/_content/cache (61ms)
00:14:50.971 ✔ You can now deploy .output/public to any static hosting!
00:14:51.017 Finished
00:14:51.018 Note: No functions dir at /functions found. Skipping.
00:14:51.018 Validating asset output directory
00:14:51.018 Error: Output directory ".output/public" not found.
00:14:52.095 Failed: build output directory not found
This is failed with "Error: Output directory ".output/public" not found." but actually the directory is generated few lines before. Any clue to resolve this problem?
I worked around the problem with:
Adding Nitro output config [1] [2] to nuxt.config.ts:
export default defineNuxtConfig({
"nitro": {
"output": {
dir: 'output',
serverDir: 'output/server',
publicDir: 'output/public'
}
}
})
In Cloudflare Pages, setting build output directory to: server/output/public.
I think the issue is caused by the default deployment script at CloudFlare side, checking the existence of .output, but not being able to see "hidden" (starting with dot) folders.
17:27:08.682 Validating asset output directory
17:27:08.682 Error: Output directory ".output/public" not found.
Edit (2022-07-10) found a cleaner way:
add "target" : "static" to nuxt.config.ts
Use as CloudFlare Pages build command: ./node_modules/.bin/nuxt generate
Set CloudFlare Pages build output directory to dist
I also had this issue, after testings, this is what i found.
The documentation says Use the nuxi generate command to build your application. (https://v3.nuxtjs.org/getting-started/deployment#static-hosting).
Configure Node Version
First, i'll add an .nvmrc file at the root of the project, so that Cloudflare doesn't use its default 12.18.0 version on deploy.
The content of the file is :
16
sources:
nuxt 3 prerequisites : https://v3.nuxtjs.org/getting-started/installation/#prerequisites
Node version on Cloudflare Pages : https://developers.cloudflare.com/pages/platform/build-configuration/#language-support-and-tools
Configure the Cloudflare Page
Then i'm adding the configuration in the cloudflare interface with following :
Build command: npx nuxi generate
Build output directory: /.output/public
Root directory: /
🚀
Going further
Actually, it shouldn't be a problem to deploy easily on CF Pages: the team has added a cloudflare_pages preset right into nitro, the server library behind nuxt 3. https://nitro.unjs.io/deploy/providers/cloudflare#cloudflare-pages
I wasn't able to make this preset work for now, i'll update my answer when this has changed :)

How to handle the "wildcard" * asterisk on a Windows Command

Using
Windows
Local by Flywheel
Composer (task runner)
Working on a Child Theme to a Custom Made "Core" theme.
I'm running composer install on the root of my WP directory to install dependencies on a parent and child theme.
Problem is when the installations are running it errors out when it gets to the src/*.js. I asked the team that set up the page and they told me that it was a problem with how Windows handles wildcard characters, which I understand it as the asterisk* and that they solved it in the pass by getting their employee a Mac. Since these dependencies are not going through, there's files that aren't loading on the website.
Getting a Mac, to solve this issue, is not on the table, so I'm looking to figure out what other options do I have to run this command successfully on a windows?
I tried going directly to the src/ folder and running npx wp-scripts start src on each .js file individually, and it gave a "successful build" message each time, but that didn't fix the issues on the page.
> wp-scripts build src/*.js
assets by status 95 bytes [cached] 2 assets
Entrypoint * = *.js *.asset.php
ERROR in *
Module not found: Error: Can't resolve './src/*.js' in 'C:\Users\UserName\Local Sites\localSiteName\app\public\wp-content\themes\parentThemeName'
resolve './src/*.js' in 'C:\Users\UserName\Local Sites\localSiteName\app\public\wp-content\themes\parentThemeName'
using description file: C:\Users\UserName\Local Sites\localSiteName\app\public\wp-content\themes\parentThemeName\package.json (relative path: .)
Field 'browser' doesn't contain a valid alias configuration
using description file: C:\Users\UserName\Local Sites\localSiteName\app\public\wp-content\themes\parentThemeName\package.json (relative path: ./src/*.js)
no extension
Field 'browser' doesn't contain a valid alias configuration
C:\Users\UserName\Local Sites\localSiteName\app\public\wp-content\themes\parentThemeName\src\*.js doesn't exist
.js
Field 'browser' doesn't contain a valid alias configuration
C:\Users\UserName\Local Sites\localSiteName\app\public\wp-content\themes\parentThemeName\src\*.js.js doesn't exist
.json
Field 'browser' doesn't contain a valid alias configuration
C:\Users\UserName\Local Sites\localSiteName\app\public\wp-content\themes\parentThemeName\src\*.js.json doesn't exist
.wasm
Field 'browser' doesn't contain a valid alias configuration
C:\Users\UserName\Local Sites\localSiteName\app\public\wp-content\themes\parentThemeName\src\*.js.wasm doesn't exist
as directory
C:\Users\UserName\Local Sites\localSiteName\app\public\wp-content\themes\parentThemeName\src\*.js doesn't exist
webpack 5.64.1 compiled with 1 error in 149 ms
Script cd wp-content/themes/parentThemeName && npm install && npm run build && composer install --no-interaction --ansi --ignore-platform-reqs handling the install-core-deps event returned with error code 1
Script composer install-core-deps && composer install-child-deps handling the post-install-cmd event returned with error code 1
Thanks for any and all help.
Cheers!

Issue with custome moduel installation in Sulu Admin

I have integrated the Example module in my Sulu-standard installation. The code I used for the example module is from following repository :
https://github.com/sulu/ExampleNewsBundle
And the steps I followed for integration are from this
http://blog.sulu.io/how-to-develop-a-bundle-in-the-sulu-admin-1
After the installation I am getting this error while loading the JS for the module :
"NetworkError: 404 Not Found - http://beauty_dev.com/en/bundles/examplenews/js/main.js?v=develop"
Error: Script error for: /bundles/examplenews/js/main.js http://requirejs.org/docs/errors.html#scripterror
var e = new Error(msg + '\nhttp://requirejs.org/docs/errors.html#' + id);
Error: Script error for: /bundles/examplenews/js/main.js http://requirejs.org/docs/errors.html#scripterror
var e = new Error(msg + '\nhttp://requirejs.org/docs/errors.html#' + id);
After some research I found that 404 error was due to locale(en) appended in the URL.
Is it possible to remove the locale from the URL?
Any reference will be appreciated.
After adding a new bundle you have to reinstall the assets using the following command:
app/console assets:install --symlink
Symfony doesn't do that automatically, so you have to execute this line, in order for the files to be copied to the web directory. You could also check if the accessed file is available in the web directory, which should be the case after executing the above command.
Regarding the language: You see that because Sulu tries to redirect to the default language if the current URL leads to a 404 and doesn't contain a language.
Are you sure that the files in the web/bundles/examplenews folder exists and you can access from the browser? When the files exists and the webserver returns them correctly the /de will not be prepended.

Releasing and publishing from sbt-bintray

I'm trying to publish to bintray a relase for my library. I already released several versions till now.
java.lang.RuntimeException: error uploading to https://api.bintray.com/maven/raisercostin/maven/maven/org/raisercostin/jedi-io_2.10/0.22/jedi-io_2.10-0.22.pom:
{"message":"Unable to upload files: Maven group, artifact or version defined in the pom file do not match the file path 'org/raisercostin/jedi-io_2.10/0.22/jedi-io_2.10-0.22.pom'"}
at bintray.BintrayMavenRepository.put(Resolver.scala:27)
at org.apache.ivy.plugins.resolver.RepositoryResolver.put(RepositoryResolver.java:234)
I'm using bintray-sbt via project/plugins.sbt
addSbtPlugin("me.lessis" % "bintray-sbt" % "0.3.0")
The project with full details is hosted on github/jedi-io.
I noticed a double maven/maven in the api url and tried to "fix" it using a custom bintray-sbt and it didn't work with either: https://api.bintray.com/maven/raisercostin/maven/org/raisercostin/jedi-io_2.10/0.22/jedi-io_2.10-0.22.pom
As a workaround I enabled publishing ivy style with publishMavenStyle := false and defined an additional ivy resolver in the using app resolvers += Resolver.url("raisercostin ivy resolver", url("http://dl.bintray.com/raisercostin/maven"))(Resolver.ivyStylePatterns)

How to add credentials for sbt-launcher to access custom repository for bootstrap

I'm overriding repository in sbt.boot.properties file so that the bootstrap loads the file from company repository. Here is fragment in that file:
[repositories]
local
typesafe-ivy-releases: https://artifactory.mycompay.com/artifactory/simple/typesafe2-ivy/, [organisation]/[module]/[revision]/[type]s/[artifact].[ext], bootOnly
How should I provide credentials for that boot time load?
Add environment variable SBT_CREDENTIALS that contains path to file with credentials.
It was $HOME/.ivy2/.credentials in my case.
Then I could see
credentials added: Artifactory Realm#mycompany.jfrog.io joedoe/***************
in ~/.sbt/boot/update.log file.

Resources