Would it be possible to use Apache Chainsaw viewer in my Java project that's in Eclipse? - apache-chainsaw

I'm wondering if Chainsaw is too old for Eclipse? The java project i'm working on is using JDK 1.5 .
Does it need to be compatible with Eclipse? because I did find another log -viewer called LogViewer.

Chainsaw V2 is a standalone app that can be used with JDK 1.5 just fine - if you mean using a socketappender, assuming the version of log4j you are sending with matches the version Chainsaw uses (log4j 1.2.x).
If you don't want to use a socketappender, you can use a fileappender - it's much easier - in the Chainsaw config screen, point it to your log4j.properties or log4j.xml containing a fileappender, and it will build the correct configuration to tail your log file.
The Chainsaw V2 available from the website is really old - the latest Chainsaw V2 developer snapshot is available here: http://people.apache.org/~sdeboy

Related

Configuring OpenLDAP 2.4 for Outlook address book lookup

Can someone kindly point me to a howto on how to configure OpenLDAP 2.4 so that I may use the directory from Outlook?
So far, the articles I've found (such as https://www.maxcrc.de/en/use-openldap-as-address-book-for-outlook-en/) mention the steps for previous versions, but the filenames in 2.4 have changed. Furthermore, I see that the officePerson.schema file does exist in /etc/openldap/schema directory. I assume that this means that I need to add this schema by first creating an LDIF file and then using ldapmodify?
I have openLDAP installed on a CentOS 7 server. All the entries I have created so far use the organizationalPerson structural class. Would I need to recreate them? If so, can I add the needed attributes to the organizationalPerson class so I wouldn't have to recreate everything? I am using LDAP to login to a large number of Linux machines via ssh, Java apps running under WebLogic, etc.

Including aws-java-sdk jar in Production

The only feature of AWS that we are going to use is s3. I have the aws-java-sdk-<ver>.jar which is ~14MB jar. Is there a standalone jar available for just using s3 (I mean the core components and s3 features)?
I looked up on the web, tried combination of names (appended s3 to links etc.) but couldn't find any. However, I stumbled upon this page : JARs for Android. There are feature specific jars for aws on Andorid. I have a feeling that they would have something similar for the regular java sdk as well. Has someone come across that or my only resort is to include the 14 MB jar?
Thanks.
This has been addressed with the AWS SDK for Java 1.9.0 release in the meantime:
Starting from 1.9.0 version, the SDK Maven project got split into multiple Maven modules. It allows you to pick up only a small subset of the SDK according to which AWS services you need to work with.
The split is basically 'one module per service', allowing to import only a core module aws-java-sdk-core, along with the one (or more) service specific module(s) actually needed, e.g. aws-java-sdk-s3.

How to use Java Mission Control (or other solutions) with ColdFusion (tomcat)

The ColdFusion monitor is great for details about the server itself but it is pretty limited when it comes to the JVM.
How can one implement Java Mission Control or similar JVM monitoring solution to monitor the JVM running ColdFusion while you are developing and testing performance / memory footprint of applications and features?
Note that I am asking this question for "community knowledge" and already know the answer, but feel free to contribute any tidbits about other monitoring solutions.
Mission control used to be bundled as as it's own utility application in the JRockit JDK. Hotspot and JRockit were two entirely different JVMs with their own JDK/JREs. By default, ColdFusion uses the HotSpot JVM. JRockit is basically defunct from new development with some of its features being merged into HotSpot.
Java Mission Control is free for development purposes.
Get started, download the the latest 1.8 JDK. My preference is to uninstall all other 64-bit JDKs and JREs installed at this time.
This step might not be needed. Change your environment variable to update your JAVA home.
a. Right click "My Computer" -> "Properties" -> "Advanced" -> "Environment Variables"
b. Change JAVA_HOME and any other JAVA vars to your new path
Adjust your jvm.config
a. Make a .bak copy of C:\ColdFusion1x\cfusion\bin\jvm.config
b. Add the following lines to the jvm.config
-XX:+UnlockCommercialFeatures
-XX:+FlightRecorder
-Dcom.sun.management.jmxremote.autodiscovery=true
-Dcom.sun.management.jdp.name=ColdFusion10
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.port=7091
-Dcom.sun.management.jmxremote.ssl=false
Open C:\program files\java\jdk1.8_**\lib\missioncontrol\configuration\org.eclipse.equinox.simpleconfigurator\bundles.info file with administrator privileges and remove the four lines that start with the following text:
org.eclipse.equinox.log.nl_ja
org.eclipse.equinox.log.nl_zh
org.eclipse.equinox.supplement.nl_ja
org.eclipse.equinox.supplement.nl_zh
Edit the C:\program files\java\jdk1.8_xx\lib\missioncontrol\configuration\config.ini, and add the following line: eclipse.home.location=$osgi.install.area$
Start up : C:\program files\java\jdk_1.8.0_**\bin\jmc
Note that JMC is launching from 1.8 while your ColdFusion instance is running with whatever the latest Hotspot version you have installed with your ColdFusion updater.
You can install plugins from the help -> install new software. The plugins site should already be there. This will give you full on memory analysis of a heap dump. It's not nearly as good as the JRockit memory analyzer, but it's better than nothing.
If you are running ColdFusion as a Windows service, you will need to open services.msc and shutdown your ColdFusion Application Server. Then open C:\ColdFusion10\cfusion\bin\cfstart.bat to fire up Tomcat and ColdFusion as a foreground application. The jOverflow plugin will not work when running as a windows service.
You will see your JVM appear in Java Mission Control, mine is call -Xdebug since I guess it has no name and starts with the first option.
Right click on your ColdFusion JVM and select "Start JMX console". You will see something that looks like this show up on the right:
There is a whole lot to explore, including a lot of junk when it comes to examining memory due to having to sift through the ColdFusion Framework itself, but there are a ton of tutorials for deciphering what it means.
This video is your primary introduction: https://www.youtube.com/watch?v=WMEpRUgp9Y4
References:
https://www.youtube.com/watch?v=WMEpRUgp9Y4
http://www.ghidinelli.com/2009/07/16/finding-memory-leaks-coldfusion-jvm
http://www.oracle.com/technetwork/java/javase/jmc53-release-notes-2157171.html (see "known issues" section)

What is the best WSO2 upgrade strategy?

What is the best / flexible WSO2 upgrade strategy?
Because now we are upgrading WSO2 DSS 3.0.1 to DSS 3.1.1, therefore there is some difficult changes in dbs file one by one
wso2dss-3.0.1
<data name="BASE_PERSON_DataService" serviceNamespace=
"http://company.mn/base/BASE_PERSON">
wso2dss-3.1.1
<data description="multiple services per each table" enableBatchRequests="false"
enableBoxcarring="false" name="BASE_PERSON_DataService"
serviceNamespace="http://company.mn/base/BASE_PERSON" serviceStatus="active">
What is the easy way, we have many data services (dbs files)?
Regards,
Eba
As far as I know, there is usually no standard migration tool or procedure available. Check that the newer version uses a compliant schema for the wso2 registry database and so on; maybe it's the same or you just need to create new additional tables. Sometimes you find things like migration scripts in the dbscripts folder. You should also check for differences in newer xml configuration files, and adjust your older custom configuration to the new format (usually few or no changes could be required). As far as the artifacts are concerned, I never heard of any way to convert them. If there are many of them, I would probably try some script and regex to batch modify and adjust them to the new format.
These are the steps you should follow if you are upgrading
Step 1 - Deploy artifacts {dbs/datasource/drivers}
Cappy the deployed data services from current installation to new installation by copying repository/deployment/server folder.(all dbs files are backword compatible so what ever worked in WSO2 DSS 3.0.1, should work on DSS 3.1.1) Also note you need to copy data source configuration properties if you have created carbon data sources therefore copy master-datasources.xml from repository/conf/datasources to the new installation.
Also Copy all the content of repository/component/lib to the new installation to ensure the the jdbc drivers are properly installed.
Step 2- Change the configuration files
Apply the same changes you have done to configurations files inside OLD_DSS/repository/conf to NEW_DSS/repository/conf (if you have done any such to any configuration files)
Note - If you have done registry mounting make sure you apply to the new installation as done before by changing relevant configuration files such as
carbon.xml,axis2.xml,user-mgt.xml,mgt-transports.xml

.NET 4.0 upgrade error on MSI install - XML does not contain expected attribute error

We have an MSI to install windows service on client machine.
Windows service calls the web service of our server to perform operations.
Initially both the MSI and web service were built using .NET 2.0 framework.
Last quarter we upgraded our systems to .NET 4.0. Though our web service is still ASP.NET i.e. asmx (and not WCF). Also I did set framework 4.0 as the prerequisite for MSI to install.
One of our clients reported this issue:
Client was using .NET framework 2.0, and had the older version of MSI installed in his system.
When he tried to installed the .NET framework 4.0 version of the MSI, was prompted to install framework 4.0 (because of the prerequisite). Once the framework installation finished, he tried to install the MSI and got this error. Can someone please guide me to the resolution. I can provide details if needed.
EDIT 1:
On more research, I found it is my AppName.installstate file. Uninstall removes this file, but upgrade does not do it. The file is lying in the install directory. On a closer look I can see "http://schemas.xmlsoap.org/soap/envelope/:Envelope" in the file contents. Any pointer would be greatly appreciated.
EDIT 2:
Custom action Install creates AppName.installstate file and custom action Uninstall deletes the file. In my case, I am doing an MSI upgrade which does not do anything to this file. When I compared the installstate file from 2.0 and 4.0 (both installed manually), I could see a huge difference in the XML syntax, schema and contents, the reason, I am getting serialization error. Now I need to know why AppName.installstate is not getting overwritten when upgraded. Doing lot of google, but landing nowhere.
Looked at MSI install log, but no useful information.
Eureka !!!!
I found solution to my problem.
Root cause of the problem:
MSI generates an XML file during installation (application_name.installstate), which stores information MSI uses during install, uninstall, rollback. The format of this XML file is completely different between .NET 2.0 and .NET 4.0 i.e. MSI developed using VS2005 and VS2010.
Because 4.0 frmaework is not able to understand the file generated by Old Framework version (2.0), we are getting the error saying “Not able to serialize the Type of the Installstate file”.
Though there is no documentation available online for this, there is this discussion I found > http://social.msdn.microsoft.com/Forums/en-US/winformssetup/thread/bedbb8bd-dad5-4bcb-a87a-ac69386669b4/
Solution I tried (I would call it work-around):
During installation of the New version, I am explicitly replacing the old XML file with the new format (4.0). i.e I included application_Name.installstate file (generated by new version) in my package, so it overwrote the old file while upgrade.
MSI got installed without any error and is running successfully.
Reply here if anybody needs detail on both problem and solution.
This error message has nothing to do with the installer per the 1001 error message. The problem is fully inside your service.
Your service's OnStart method should be doing nothing but spinning up a background process and returning success start to the service control manager as quickly as possible. There shouldn't be any long running code in that critical path as the SCM will only wait so long before assuming there was an error starting the service.
Refactor your service to run the job on another thread and the install will successfully install. From there you can focus on the real problem of what's going on in your DeSerialization process.