osgi bundles version in felix after package uninstall in aem - aem

I have a doubt regarding osgi bundles version in felix console after uninstalling the package in aem. The build plan is that the packages are installed incremently with the build version like 1.13.1 then 1.13.2 and so on.
If there is a package package-1.13.4.zip installed; which has a bundle bundle-1.13.4.jar
After uninstalling the package-1.13.4.zip; as per my understanding; the bundle-1.13.4.jar should be removed from apps/myproject/install as well as from the felix console; the bundle that should be installed in felix console should be bundle-1.13.3.jar; since it was the version which was installed prior to 1.13.4
But when I uninstall package-1.13.4.zip ; neither the bundle-1.13.4.jar gets removed from apps/myproject/install nor the bundle-1.13.4.jar gets removed from the felix console. Is there something wrong with my understanding?

There are couple of things which might be the issue here :
1) check if your package has /apps/myproject/install in the filter list. Uninstalling your package package-1.13.4.zip will only remove your bundle bundle-1.13.4.jar, if the path /apps/myproject/install is in the filter list of your package.
2) Check your deployment scripts. There might be a case that your bundle is not installed using JCRInstaller. Your bundle will be uninstalled only if the bundle was installed using /apps/myproject/install. if your jenkins/maven script has installed your bundle directly using felix console or /system/console/ then uninstalling the pacakge will not uninstall the bundle.
If you want to make sure that when you uninstall the package then your bundle should also get uninstalled then do the following :
1) use Maven sling plugin - this will make sure that your bundle is installed at /apps//install.
2) Make sure your deployment scripts are installing the bundle at /apps//install and uploading to the felix console directly.

After uninstalling the package-1.13.4.zip; as per my understanding; the bundle-1.13.4.jar should be removed from apps/myproject/install as well as from the felix console; the bundle that should be installed in felix console should be bundle-1.13.3.jar; since it was the version which was installed prior to 1.13.4
Uninstalling the bundle does not restore its previous version in felix console and it maintains only one version of the bundle at any time. Also, build-installing the old version will not replace existing greater version installed. If the SNAPSHOT has been removed from the version name one cannot build-install it after uninstalling.

Related

Bundled JRE error with install4j installer packaged as msix

We create an installer with install4j that bundles the JRE. We then use the MSIX Packaging Tool to create a .msix installer, to publish on the Microsoft App Store.
When we install the .msix package for testing and try to run the application, we get the following error:
"The JVM found at .\jre is damaged. Please reinstall or define EXE4J_JAVA_HOME to point to an installed 64-bit JDK or JRE"
Note that the JRE is bundled with the installer, and it is actually installed in a folder called "jre" under the installation folder.
When we install from the .exe installer, everything works fine, this problem only happens after we create a .msix installer with the MSIX Packaging Tool. We've checked all the installed files and everything looks fine, but the launcher will not run.
Has anybody seen this problem? And is there a solution or workaround?

run as testNG is missing

The option runAs->TestNG on xml file is missing somehow on my eclipse,
I tried to install the eclipse from scratch and now I have Version: 2018-12 (4.10.0).
Also I have latest JDK and JRE testNG is installed as far as I see and when I want to install them again I have a problem.
All the threads that i saw till now nothing helped me and i tried all the solution as i wrote maybe you have any idea
the only solution i founded till now is that i need to install eclipse from scratch and convert the same project again to TestNG and to copy the old XML to the new one, if its the latest eclipse than to download the beta version of TestNG
There is an issue with the TestNG plugin and Eclipse 2018-12 (https://github.com/cbeust/testng-eclipse/issues/408). You can use the current beta version from https://github.com/cbeust/testng-eclipse.
If the picture above of your installed software is the current state of your Eclipse 2018-12 setup, it cannot be a clean install. The version 6.14.x of the TestNG plugin is not compatible with 2018-12. It is not possible to install the plugin with Eclipse. Either the existing Eclipse directories are reused or the plugin directories have been added manually. It is important to remove them. After that, it should be possible to install the version 7 beta of the TestNG plugin.
It should look like this:
With this setup, you will get your context menu entry for TestNG:

AEM 6.1 Downgrade of a Java version and quickstart shows UnsupportedClassVersionError major.minor version 52.0

We were using AEM 6.1 quickstart on Windows machine with Java 1.8.
To be consistent with other teams, we had to downgrade our Java version to 1.7.0_79 , after we uninstalled Java 8 and rest the JAVA_HOME and PATH variable to reflect the new (downgraded) version of Java and ran AEM using "crx-quickstart.jar" file, AEM started properly but the default startup page does not load and shows this exception:
java.lang.UnsupportedClassVersionError: org/apache/jsp/libs/granite/core/components/login/login_jsp : Unsupported major.minor version 52.0
RequestURI=/libs/granite/core/content/login.html
Servlet= /libs/granite/core/components/login/login.jsp
ApacheSling/2.4 (jetty/9.2.9.v20150224, Java HotSpot(TM) 64-Bit Server VM 1.7.0_79, Windows 7 6.1 amd64)
One of the solution that worked for us is to rename or delete the "crx-quickstart" folder.. and starting AEM, would work as AEM will recompile everything using the correct version of Java and everything works as expected. But is there any other way.. not to rename/delete the crx-quickstart folder?
Here's a more detailed explanation of the solution:
Symptom: After you upgrade or downgrade a version of Java on your machine, and see that pages are not loading on AEM, not even the main login page.
What causes this:
When AEM is starting up, it compiles java/jsp files using the version of Java is installed on the pc. When there is a change in the version of Java, the new files should be compiled by the installed version and all references must be updated but there is an issue on AEM 6.1 (this maybe fixed in Service Packs).
Resolution:
NOTE: Please backup your AEM instance before doing this
Go to localhost:4502/system/console/configMgr
If the page opens, login as "admin"
Go to Menu > OSGI > Bundles [http://localhost:4502/system/console/bundles]
Find this "Apache Sling Commons FileSystem ClassLoader (org.apache.sling.commons.fsclassloader)" and note the BundleID (it
is 218 for me)
STOP AEM
On Windows Explorer go to this path where your AEM is installed.. $path\aem-61-author\crx-quickstart\launchpad\felix\bundle218\data
Delete the classes folder under it.
Restart AEM.. this should fix the issue.
If the page above does not open,
(assuming the bundle-id is 218)
STOP AEM
On Windows Explorer go to this path where your AEM is installed.. __
$path\aem-61-author\crx-quickstart\launchpad\felix\bundle218\data
__
Delete the classes folder under it.
Restart AEM.. this should fix the issue.
To avoid downgrading your java-version, one work around is to apply Service Pack 2 when you first time install CQ6.1.
First, download your SP2 from adobe package share or copy from other machine. Then unpack your cq jar file and copy your SP2 zip file to crx-quickstart/install folder then install.
The detail step should be like below
java -jar cq5-author-<port>.jar -unpack -v
cp SP2.zip crx-quickstart/install
java -jar cq5-author-<port>.jar
Once again, the Service Pack 2 must be applied when first time install.

Unable to install Plugins in Eclipse (jpbm)

I have a major problem with installing plugins in eclipse. I'm using ubuntu 10.04 64 bit and I installed:
Eclipse SDK
Version: 3.6.0
Build id: I20100608-0911
(Not by using the apt-get, via apt-get I get galileo, but that version didn't work as well)
The Plugin I want to install is: http://sourceforge.net/projects/jbpm/files/jBPM%203/jbpm-jpdl-3.2.7/ I have to use this plugin because its compatible with alresco (dms)
I tried to install the plugin via dropin and the normal way:
Help->Install new Software-> Add -> Archive -> select the downloaded *.jar.
When I hit OK, I get the following error message:
"Could not find jar:file:/home/xyxyx/jbpm.jar"
I tried to solve it by extracting the jar but no success. Putting the jar into the plugins folder and changing permissions won't help! I also tried different versions of eclipse on several systems. No success!
I have been looking for a solution all day! I tried some advice I found on stackoverflow. I don't use a proxy. I changed the update system to classic! Now I don't know what to do anymore.
Anything special I have to configure before I use eclipse on ubuntu besides installing the JDK?
Try to run the installed using the following command:
java -jar jbpm-installer-3.2.7.jar
On the other hand, you may want to use JBoss IDE which has integrated support for jBPM.

Installing Eclipse

I am installing Eclipse for RCP and RAP Developers. My old copy went rogue and decided to act up.
So clean install time! Yay! I downloaded the new version, copied it to the opt folder, extracted it, and ran it.
For some reason, I can't install any plugins due to some crap error*, and it doesn't have a list of default plugins. I deleted my workspace and the original Eclipse install.
Is there another file that is helping Eclipse keep data from previous installs? I am seeing update sites I added when I was constantly trying to get past this issue.
Also, why can't I install new plugins?
I need a clean install so I can't use the Ubuntu installer.
Any tips are appreciated.
*Cannot complete the install because one or more required items could not be found.
Software being installed: Maven Integration for Eclipse (Required) 0.10.2.20100623-1649 (org.maven.ide.eclipse.feature.feature.group 0.10.2.20100623-1649)
Missing requirement: Maven Integration for Eclipse (Editors) 0.10.2.20100623-1649 (org.maven.ide.eclipse.editor 0.10.2.20100623-1649) requires 'bundle org.eclipse.zest.core 0.0.0' but it could not be found
Cannot satisfy dependency:
From: Maven Integration for Eclipse (Required) 0.10.2.20100623-1649 (org.maven.ide.eclipse.feature.feature.group 0.10.2.20100623-1649)
To: org.maven.ide.eclipse.editor [0.10.2.20100623-1649]
I had the same problem when doing a fresh install of Java EE eclipse (helios, galileo, win32 and win64).
The solution for me was to explicitly open the Java perspective, and doing the install after this. This time the installation worked fine.
I suspect the reason is that after a fresh install not all bundles are loaded (although they are present on disk; a feature of eclipse) so that the dependencies cannot be resolved. Opening the Java perspective or creating a dummy Java project will force to load these bundles. Once a bundle is loaded, its existence is persisted, so this only has to happen once.
This issue was mentioned a number of time on the official websites, but always closed or neglected, probably because the reproducer did not do a fresh install.
Download Eclipse 2018-19 (4.9.0) version as an updated eclipse version and install it! Maven dependency will presented inbuild thing in that model, Right click on project -> properties -> on left pane, Maven will display ! Change your setting there to overcome this error and you can add external JAR'S there