i am trying to configure Lexik JWT Bundle but i am getting error which is given below - mongodb

There is no extension able to load the configuration for "jwt_private_key_path" (in /var/www/html/EduboldPortalApp/eduboldportal/app/config/parameters.yml). Looked for namespace "jwt_private_key_path", found "framework", "security", "twig", "monolog", "swiftmailer", "doctrine", "sensio_framework_extra", "doctrine_mongodb", "lexik_jwt_authentication", "fos_rest", "debug", "web_profiler", "sensio_distribution" in /var/www/html/EduboldPortalApp/eduboldportal/app/config/parameters.yml (which is being imported from "/var/www/html/EduboldPortalApp/eduboldportal/app/config/config.yml").
There is no extension able to load the configuration for "jwt_private_key_path" (in /var/www/html/EduboldPortalApp/eduboldportal/app/config/parameters.yml). Looked for namespace "jwt_private_key_path", found "framework", "security", "twig", "monolog", "swiftmailer", "doctrine", "sensio_framework_extra", "doctrine_mongodb", "lexik_jwt_authentication", "fos_rest", "debug", "web_profiler", "sensio_distribution"

Are you sure the bundle has been added to the app/AppKernel.php ?
From the error it seems like symfony is not loading the bundle.

Related

Deploying custom Keycloak theme with Operator (v15.1.1 & v16.0.0)

I have a theme with a size >1MB (which precludes the configmap-solution provided as an answer to this question).
This theme has been been packaged according to the Server Development Guide - its folder structure is
META-INF/keycloak-themes.json
themes/[themeName]/login/login.ftl
themes/[themeName]/login/login-reset-password.ftl
themes/[themeName]/login/template.ftl
themes/[themeName]/login/template.html
themes/[themeName]/login/theme.properties
themes/[themeName]/login/messages/messages_de.properties
themes/[themeName]/login/messages/messages_en.properties
themes/[themeName]/login/resources/[...]
The contents of keycloak-themes.json are
{
"themes": [{
"name" : "[themeName]",
"types": [ "login" ]
}]
}
where [themeName] is my theme name.
Keycloak is running with 3 instances, its resource spec includes:
extensions:
- [URL-to-jar]
Deployment was successful according to the logs of each pod - each log contains a message containing
Deployed "[jar-name].jar" (runtime-name : "[jar-name].jar")
However, in the admin console, I cannot select the theme from the extension for the login-theme. Creating a new realm via crd with a preconfigured login-theme via spec-entry
loginTheme: [themeName]
also does not work - in the admin-console, the selected entry for the login-theme is empty.
I may be missing something basic, but it seems like this ought to work according to this answer if I am not mistaken.
As is so often the case, an uncaught typo was the source of the error.
The directory-structure must not be
META-INF/keycloak-themes.json
themes/[theme-name]/[theme-role]/theme.properties
[...]
But instead
META-INF/keycloak-themes.json
theme/[theme-name]/[theme-role]/theme.properties
[...]
Given a correct structure, keycloak-operator can successfully deploy and load custom-themes as jar-extensions.

VS Code: Unable to load schema from 'https://json.schemastore.org/xxx': unable to get local issuer certificate

VS Code (1.62.2) couldn't access to json schema to validate them. Each time I open package.json file, I got this message: "Problems loading reference 'https://json.schemastore.org/package': Unable to load schema from 'https://json.schemastore.org/package': unable to get local issuer certificate."
With Chrome on same computer, I could access to 'https://json.schemastore.org/package'.
I tried different settings but without success, these is what I have in settings.json file:
"http.proxy": "http://my.corporate.proxy",
"http.proxyAuthorization": null,
"http.proxyStrictSSL": false,
I tried also to set an http url to access to the package json schema but it didn't change anything
"json.schemas": [
{
"fileMatch": ["package.json"],
"url": "http://json.schemastore.org/package",
"schema": true
}
]
Thanks for your help
Add an environment variable named NODE_EXTRA_CA_CERTS with the value being the path to a PEM file containing the certificate chain. Node.js is lacking trust for the certificate being used for the TLS connection.
Mine was caused by the JSON Editor plugin. Here (https://github.com/Microsoft/vscode/issues/36197) it describes some settings that are needed, but disabling the plugin proved the cause.

Product images issue in vue storefornt

I integrated vue store front with magento 2, frontend works fine but product images not display in frontend. It throws error Unable to compile TypeScript:\nsrc/image/action/local/index.ts(27,18): error TS2339: Property 'query' does not exist on type 'Request<any, any, any, any>'. imagemagick is also installed and imgurl in local.json is also defined.
Anyone please know about this why error display.
It is about this.req which is typeof Request from express - it has query property. Please make sure you have yarn.lock from the original repo and reinstall dependencies.
If you are using docker, you might need to add:
- './yarn.lock/var/www/yarn.lock'
To volumes section in the docker-compose.nodejs.yml
i have found a simple solution you can try that
copy all your magento 2 pub/media data in vue-storefront-api/var/magento-folder/pub/media
Or
create a symlink if you are working on localhost
vue-storefront-api/config/local.json
"magento2": {
"imgUrl": "http://magento-domain/pub/media/catalog/product",
"assetPath": "/../var/magento-folder/pub/media",
}
vue-storefront/config/local.json
"images": {
"useExactUrlsNoProxy": false,
"baseUrl": "http://localhost:8080/img/",
"useSpecificImagePaths": false,
"paths": {
"product": "/catalog/product"
},
"productPlaceholder": "/assets/placeholder.jpg"
},
run command in vue-storefront and vue-storefront-api

Error when activating a TYPO3 extension using Composer

I am running the following command in the directory where my root composer.json file is located:
./vendor/bin/typo3 extension:activate slickcarousel
However, I get the following error in return:
In ConnectionPool.php line 110: The requested database connection named "Default" has not been configured.
Even though I have configured my database in my LocalConfiguration.php. I also cannot find the ConnectionPool.php file in the vendor directory. How do I fix this error?
Do you use a different TYPO3 Context maybe? then you need to set that as well with
TYPO3_CONTEXT=Development ./vendor/bin/typo3 extension:activate slickcarousel

Extended application descriptor file and invalid datasource

I have two applications:
hrportalcore: The core application with BaseController, ...
hrportalrequestleave: A sample application extended from the hrportalcore application
The hrportalcore has the namespace de.example.core and there are the dataSources also maintained. (sap.app.dataSources in manifest.json). The datasource is:
[...]
"HRPOJavaLeave": {
"uri": "<path>",
"type": "OData",
"settings": {
"annotations": [],
"odataVersion": "2.0",
"localUri": ""
}
}
[...]
The datasources can be used without any problems in the extended application but the console brings the following errors:
It says the datasource contains errors, but it can be used (strange?).
Another thing is, that the Component-preload.js file is loaded from a wrong place once a time. The application works without problems, but it is - as said - loaded once from a wrong location?
My manifest.json of the hrportalrequestleave looks like in the extension part (sap.ui5.extends):
[...]
"extends": {
"component": "de.example.core",
"extensions": {}
},
[...]
The parent is defined rightly in the neo-app.json as /parent to show to hrportalcore.
jQuery.sap.declare("de.example.request.leave.Component");
// use the load function for getting the optimized preload file if present
if (!jQuery.sap.isDeclared("de.example.core.Component")) {
sap.ui.component.load({
name: "de.example.core",
// Use the below URL to run the extended application when SAP-delivered application is deployed on cloud
url: jQuery.sap.getModulePath("de.example.request.leave") + "/parent"
// we use a URL relative to our own component
// extension application is deployed with customer namespace
});
}
this.de.example.core.Component.extend("de.example.request.leave.Component", {
metadata: {
manifest: "json"
}
});
This all happens in the Fiori Launchpad of HANA Cloud Platform
Solution
manifest.json of hrportalcore: Always use the up-to-date version which you have deployed on your HCP in the applicationVersion property:
{
"_version": "1.2.0",
"sap.app": {
"_version": "1.2.0",
"applicationVersion": {
"version": "1.6.2"
},
...
manifest.json of hrportalrequestleave (Extension project): As above, always use the up-to-date version which you have deployed on your HCP in the applicationVersion property.
DataSource not found?!
If you have a extension project (like hrportalrequestleave < hrportalcore), then the manifest.json of both applications are merged like jQuery.extend(...). All properties, expect the sap.app tree, because it describes really the application and can not be copied from parent extension.
Now, when you use a dataSource from the parent extension, it will not be found. That means for you, you must define the sap.app.dataSources in the extension project manifest.json.
The error in the log
"Error in application dependency de.example.core.Component: No descriptor was found"
suggests that the manifest.json contains a dependency to "de.example.core.Component" instead of "de.example.core". According to your code snippets, the "extends" dependency is correct. Do you have other dependencies?
The AppIndex in the backend calculates the transitive closure of dependencies and if it can't find an installation with that ID, the above error is created and logged on the client side.
If your manifest.json looks okay but might have contained a wrong dependency in the past, then it might be necessary to re-run the AppIndex (or schedule it for a regular run).
The fact that the app works despite the config error is caused by the code that you've shown above. It explicitly loads the de.example.core component from an explicitly calculated URL. But before that step, the framework already tries to load it, based on the information in the manifest.json and there the information about the explicit URL is missing.
BTW: the code that calculates the URL suggests that even after fixing the manifest.json, the AppIndex might not find the component as it seems to be stored in a sub package of the de.example.request.leave app. Not sure if the AppIndex can handle this (it can handle nested components if they are listed as embedded components in the top level manifest.json, but I'm not sure if it recognizes such embedded components in the dependencies section. As a result it might try to load the embedded component although it has been loaded together with the enclosing component already.