RAD Websphere - EAR not picking up latest jar - websphere

I am using RAD 7.0. My web application works with a jar(contains the backend code for our application) which undergoes frequent changes. But whenever I replace the jar in the WebInf/lib folder of the war and restart the server, it does not pick up the latest jar. It keeps referring to the previous jar. I have to undeploy, restart server several times to make the war pick up the latest jar. Has anyone come across this issue? Any pointers will be useful.
Many thanks,
RJ

Is your server configured with "Run with resources within the workspace"?
If so, switch to "Run with resources on the server" and see if this solves the problem.
I have had my share of RAD problems not picking up new code, especially on RAD 6.0 and 7.0; on RAD 7.5, IBM finally seemed to have a grip on these issues.

You can also do a server clean to force the temp and work dirs to be cleaned and the code to be republished. RAD 7 has a problems and if you can upgrade to 7.5 many get resolved in that version.

Related

AEM 6.1 and 6.5 switching on local machine

~We have some projects still running in AEM 6.1 SP2 (the move to newest version of AEM is in progress) and new projects in AEM 6.5.
AEM 6.1 runs in java 8 and AEM 6.5 runs in java 11.
For us developers this switching between jdk versions is difficult in our local environment, quite often we get our AEM instances corrupted or maven project imports are no longer working properly in IDE.
Anyone else had this situation? What are the best practices for such a situation?
My recommendation would be to set up vagrant box instances to your specs (AEM version + Java) and use automated deployments. This way, you can bring up a preconfigured instances in minutes by executing a single vagrant up command, run your automated deployment, and test your projects. If your instance gets corrupted, run a vagrant destroy command, bring up a new instance again with 0 configurations needed for the next deployment. You willincrease your productivity manifolds with this approach.
I have been using this approach for years and it has saved hours of devops work during critical project timelines
If you are using MAC [OSX], you can try Jenv. It can help you to have a unique Java Environment to a specific directory. We did find it very useful.
https://github.com/jenv/jenv
Thanks!
If you are running your AEM instances via shell scripts E.g. ./crx-quickstart/bin/start you can always specify the JAVA_HOME variable to be used in this particular file.
E.g.
export JAVA_HOME="path to your JVM"
export PATH=$JAVA_HOME/bin:$PATH

OSGI plugin development with Domino Designer 10

Up to date I was using IBM Domino Designer V9.0.1 FP8 to develop an OSGI plugin. With this version everything was working as intended. I've created a plugin project, a feature project and an update site project. Selecting "Build all" in the update site project created all the the corresponding jar files.
Today I've installed IBM (HCL) Domino Desinger V10 FP2 (fresh install i.e. I've deinstalled V9.0.1 and deleted the old "workspace" directory in NotesData, but I kept the NotesData itself).
Now if I open my plugin projects, I can edit the plugin, save the Java classes without any errors. Up to this point everything is working as usual. But now, if I use "Build all" in the update site project I see a screen with "generating ant script" and then the build process is finished, but no jar files are generated.
Any ideas why this is happening? Am I missing some files? Am I missing some configurations?
BTW: if I use standard eclipse to build the plugin all jar files are generated.
Domino Designer is a customised version of Eclipse. 9.0.1 FP9 and lower is a very old version of Eclipse, 9.0.1 FP10+ is a much newer version, so not comparable to what was happening before. It's possible there are differences in the customisation of Eclipse that are affecting it. But every Domino OSGi plugin developer I'm aware of uses standard Eclipse.
Follow the steps for setting up your environment here https://github.com/OpenNTF/XPagesExtensionLibrary/wiki/Development-Environment. In the documentation there I've tried to document why steps are done and what they achieve, as well as just the steps themselves. The intention is to pass on understanding to a broader set of developers, for future proofing.

Problems with Osgi plugins in Domino Designer after 9.01. FP4

We have our own OSGI plugin with a set of custom code and some java libraries that we use cross projects. It is installed on servers via an update site and imported on developers Domino Designer.
It is working fine up to FP4, but in Domino Designer it is not added to bundles after FP4. For servers and Notes clients it works fine up to FP6 for which we have tested so far.
Tested now with FP7 on my Domino Designer, and the plugin installs fine both via update site and via manual import. However each time I open a database using this library I get build errors. It solves by going to the code, on the error select correct project configuration and adding our plugin to the required bundles. When I close the database and open again, I have to do the same process and we have the same problem with all databases using this plugin.
I have tested starting Notes with the osgi console, but all reports as it is installed normal there.
When viewing in package explorer before fixing the bundle I can see that the plugin is missing from Plugin dependecies and gets added there when doing the fix.
I just installed a fresh Domino Designer for a new user now and upgraded him directly to FP7. He got exactly the same problem. Downgrading him to FP4 solves the problem.
Anyone having the same problem or have ideas to how it can be solved?

Websphere EAR limit

WebSphere Application Server 8.0.0.0
I am using RAD to make Host Access Transformation Services (HATS) macros and deploy them as webservices on WAS. I'm a .NET developer and have no (very little) experience with WAS and Java EE.
When I was discussing some things with people who have more experience it was mentioned that we should avoid making multiple EAR files and deploying them onto WAS. It would be preferred if we could keep them as low as possible, ideal would be only a single EAR deployed. The WAR modules are fine if masses of them exist.
Is there any truth in this or would it be ok if we have more EAR files deployed on WAS?
I haven't seen any warning like that, and we run 20-30 EARs on our servers. It's definitely supported and expected that you run multiple Enterprise Applications (EARs).

Glassfish deployment time

At the moment we use glassfish 3.1 as application server for our enterprise application. The application(s) are packed within an ear. The ear contains approximately
5 wars,
10 jars and
60 jars(ejb) .
The deployment of the ear takes more than 10 minutes. Is there any chance to tweak the deployment time of the application?
BTW: We splitted the ear already in smaller pieces. But in most cases we need the complete suite deployed.
If you are trying to reduce development time, there is two way for it for glassfish as much as I know.
First, you can deploy as a directory with asadmin deploydir. As a result of that you can change jsp files and method bodies, thanks to hot swap technology.
But the most elegant solution is using an alternative library in order to decrease the amount of deployments. There are a few alternative for this but you can use jrebel. It is quite stable. JRebel is used to reduce deployments and reloads class files on the fly by jvm its jvm agent. It has support for almost all well known frameworks.
You could be running into this:
http://java.net/jira/browse/GLASSFISH-17094
Download the latest GlassFish 3.1.2 build and see if it solves your problem:
http://dlc.sun.com.edgesuite.net/glassfish/3.1.2/promoted/glassfish-3.1.2-b23.zip
Update: GlassFish Server 3.1.2 has been released:
https://blogs.oracle.com/theaquarium/entry/glassfish_3_1_2_final
Hope this helps.

Resources