Posts

Showing posts from 2011

Configure Template Email Sender for Managed Weblogic Server

This is how i done the configuration for my local box. My Admin Server as usual is running in the Weblogic default port 7001.To deploy another EAR,I have created a Managed Server running in port 7002. My application hosted in the Managed Server got hanged when i try to send email through template email sender. Fix After modifying the component Configuration.properties   i was able to do that. Add the properties siteHttpServerPort and adminPort in <ATG-Home>/servers/managed-webLogicServer/localconfig/atg/dynamo/ Configuration.p roperties and set it to your Managed Server Ports. siteHttpServerPort=7002 adminPort=7002 If  you use CIM configuration  for creating Managed Server,CIM will automatically create this entries in the component, otherwise you need to modify it manually.The above properties are required to send out email through template email sender using template jsp.  Also set the below properties in SMTPEmail component which is required anyways

solution for removing duplicate title tag in your blog

I have resolved the issue of duplicate title tags,In my case,I have made 10 different titles but all starting with the same wordings initially (as it addresses same topic different issues)and a difference in the latter part. After analysing the title,i came to know, the blog by default creates the title from the initial part of wordings,also based on that it creates an html file for your post . I have rearranged my titles so that the later part which has the real meaningful difference in wordings will come first,by doing this way had created unique  titles and the corresponding html files for me.Others please find some suitable unique titles and modify accordingly. Once you have addressed this issue,within 2-3 weeks all the errors which were previously showing in Webmaster Tools,Diagnostic section->HTML Suggestions had gone !! it looks clean now. Also keep a periodic check to your Webmaster Tools and its appropriate/advisable to take corrective actions for these simple issu

Hot Swap Java Classes - Hot Deploy ATG Application with Weblogic

I saw a lot of  information regarding this topic which is either cluttered or confusing to the readers,i tried this,a very useful feature and a must have for every developers,this is quite easy to configure with minimal modifications. Visit the link to see the  Pre-Requisites and how hotswap works in Java Application Hot Deploy Java Application Now its time for hot deploying your classes in ATG Apllications which is deployed in some Application Servers,believe me its really simple,fast and saves a hell lot of time !!!, you can modify your classes straight away but do keep in mind to launch the debgugger before doing so,Run the runAssembler as well(This can be invoked from a build script,probably an Ant Build with “fork = yes”,so that it will run in a seperate JVM), after this  you can see your class changes will be reflected without needing a Server restart

Hot deploy Pre Requisites – Easiest way to hotdeploy your code – Hot switch your java classes

Pre Requisites This can be possible if  the version of JVM is V1.4 or higher. In Eclipse Set up your remote debugging options. please visit the link to see how can you setup this, Set up Remote Debug Also From the Eclipse Project menu,check 'Build Automatically' Option. Set  break points to the class you need to modify(will make sense if you keep the debug point before the line you want to modify),after that Launch the debugger. Hot Deploy Java Application Generally you compile the code with the options  ‘Run  as a Java Application’ or through some ant script which will do a clean, build and deploy your whole code.which is time consuming. Hot Deploy, Modify your code straight away unless it's a change in method signature,save your changes, Relaunch the  debugger with the same class(in case any issues with automatic build ) and you will notice your changes are reflected without compilation. Also verify how to Hot Swap classes in ATG Applications running in

Download Rent Receipt free of cost - HRA Format download

As March 2012 is nearing,Its high time to update your tax declarations and submit the necessary proofs to support your declarations.As you know HRA is an integral part of your tax declarations,For Showing HRA proofs,many people buy receipt book from nearby  stationary shop or so,but atleast for IT industry,you dont require any receipt book, but a Receipt Format created in Word or PDF will do the job for you instead. So its good to have this doc handy  with you,so that with a minimal modification you can  show the proof for the coming years as well without shelling out a single penny,as your company bears your print out costs obviously :) ...  You can leave your email id in the comments section,i will send you the format !!! See Also Gas Transfer Formalities Aadhar UID Enrollment   Efiling Acknowledgement

ATG 9.1 Required JARS - ATG JARS

Assuming you have installed ATG in the folder C:/ATG/ATG9.1.Below are the mandatory jar files you require.   /DSS/lib/classes.jar /DAS/lib/classes.jar /DAS/lib/ice.jar /DAS/lib/resources.jar /DAS-UI/lib/uiclasses.jar /DCS/lib/classes.jar /DCS/lib/resources.jar /DPS/lib/classes.jar /DSS/lib/resources.jar /DAS/lib/servlet.jar /B2BCommerce/lib/classes.jar /Publishing/base/lib/classes.jar /DCS-UI9.1/DCS-UI/management/lib/classes.jar /PublishingAgent/base/lib/agent.jar /PublishingAgent/base/lib/classes.jar For configuring this in Eclipse add a User library(ATG),in the Build Path and add all these Jar files to that.

Java StringBuilder to concatenate strings - Sample Code

Concatenation of string using “+” operator can be seen very common in sysout,logDebug statements.This will have an impact on the performance. it should be avoided to improve the performance.instead you can use  StringBuilder.append().This will really improve the efficiency of CPU utilization by 2.3 times compare with concatenation of string using “+” operator. Please find the usage below System.out.println("request params :"                     + " contextPath=" + pRequest.getContextPath()                     + ", " + PATH_Info + "=" + pathInfo                     + ", " + BASIC_AUTH + "=" + basicAuth                     + ", " + FORM_AUTH + "=" + formAuth                     + ", " + FORCE_LOCALE_PARAM + "=" + forceLocale                     ); The above concatenation can be achieved as given below, String [] stringConcatArray  = {"request params :","

ATGDustCase for a Droplet - Sample Code

The code given is pretty much focussed on basics,it certainly helps to execute/pass your first ATG Dust Case.Customise this class as you wish to suit your requirements, dont forget to add your own package  name,service method etc here. Below is the AtgDustCase for a Droplet named AcessServlet. I am not providing the code for AccessServlet but for the test class. package *.*.*.*; import java.io.File; import java.io.IOException; import java.util.HashMap; import java.util.Map; import javax.servlet.ServletException; import atg.servlet.DynamoHttpServletRequest; import atg.servlet.DynamoHttpServletResponse; import atg.servlet.ServletTestUtils; import atg.test.AtgDustCase; public class AcessServletTest extends AtgDustCase {         private ServletTestUtils mServletTestUtils = null;         private AcessServlet obj;         protected void setUp() throws Exception {         super.setUp();         if (mServletTestUtils == null)             mServletTestUtils = new

ATG Dust Jar - ATGDustCase Jar's

Image
Assumption is you are working on ATG Platform and have all the necesary JAR's and user libraries to run  applications on this Platform.Now you are going to write your first ATG test case and for that you need to add appropriate Jar files and modify your classpath settings so that it will include your recently added jars. Now the JAR's required by you to run the ATGDustCase shown below You also need to set the below JAR files in your classpath. See how can you add these JAR's to the classpath in Eclipse. See basic steps required to execute ATGDustCase -> ATGDustCase Steps

Unit Testing ATG Classes Your First ATGDustCase

1. Make sure you have all the required Jar Files to execute ATG    Dust. 2. Your  test class must  extend the class ATGDustCase    (package ->atg.dust.ATGDustCase). eg:     package x.x.x.x;(->package structure where your test class    resides)              import atg.test.AtgDustCase;              public class FirstATGDustCaseTest extends AtgDustCase {             } 3. Override the two methods setup() and tearDown() in your test    class.     eg:    protected void setUp() throws Exception {              }             protected void tearDown() throws Exception {              } 4. You have to write minimum one test method and it must prefix the    word 'test'(eg: actual method ->Agent(),test method->testAgent    ()). See basic steps to execute ATGDustCase for a Droplet

SVN Best Practices - Basic/Essential SVN things developer must know

Synchronize your code base Consider synchronize your code base as the first task towards your development activity. 1.   Synchronize all the modules, 2.   Accept all incoming changes and 3.   Merge all the conflicts,if any. This makes your code base in sync with the actual code base. Check -in/Commit Once you have completed one file/functionality,repeat the above steps from 1-3.Now  open  synchronize perspective from Eclipse you will see only your outgoing changes.You have to build all the modules now, This will make sure the whole activity has  not created build breaks. If no build errors!!!  go ahead and Commit. 1. You can select all the files and select commit in one go ,      but  doing so will allow one common comment     to all the  files. 2. You can commit file one by one . In this case you can enter a    comment for each  file.But working in larger projects,this might    create build errors, if we have to commit lot of files and    meanwhile other person st

display your custom module in the ATG Control Center(ACC)

Image
You can display your custom modules in the components section of ATG Control Center, with minor configuration changes, following are the elements you need to add to your modules. Config.properties -  Create this file in your modules config directory.(Fullfillment/config/)This files labels and configures a configuration layer in the ATG Control Center(ACC). Module component – Create a Nucleus component(eg:Fullfillment.properties) of the class atg.service.modules.Module inside /config/atg/modules/.Give your module name(Fullfillment) as a value for the moduleName attribute. The properties file is listed below $class=atg.service.modules.Module moduleName=Fullfillment Module Manager - Add your modules name to the modules property of the atg/modules/ModuleManager component. Create a ModuleManager.properties file in your module's /config/atg/modules directory with the following property : modules+=Fullfillment This adds the Fullfillment component to the modules list of t

Repository Cache modes - item descriptor inheritance

ATG Repository Cache modes There are four  types of cache modes Disabled – No caching Simple – Simple Caching - Default mode Locked – Locked caching Distributed – Distributed caching We  can specify cache mode for an item descriptor as well as its properties,if we specify cache mode for an item descriptor,it will become the default cache mode for all the properties inside that item descriptor unless specified other wise. See below example. Here we are specifying the cache mode locked for the item descriptor 'account',but dont want the 'balance' property to be cached which if not specified will inherit the cache mode of the item descriptor.So specifying the cache-mode as disabled for this property. <item-descriptor name="account" cache-mode="locked">     <table >             <property name="balance" cache-mode="disabled"/>    </table> </item-descriptor>

issue in deleting files from windows search results - cannot read from source file or disk

Image
I faced a strange issue while trying to delete  files from windows search results. My idea is to delete all the image files from my computer,so for this i opted windows search option,i tried to search 'Pictures and Photos' from mycomputer,it had given me a list of files. I sticked the traditional idea of doing ctrl-a shift-delete,but end up seeing the below exception. Solution: Right click on the file, open the containing folder and started deleting all  files  from that folder using the traditional way of ctrl-a shift-delete,it worked !!!. Do this process repeatedly to delete all the files.I believe there is no other easy way for this :)

Deploy different ears without admin console-Fast way of Deploying EAR to Weblogic

Traditional Way Normally in Weblogic for deploying a new ear,the process most of us follows are ,In short,login to Weblogic Admin Console,go to 'Deployments',click 'Lock and Edit', click 'Install' button, navigate to the respectieve path where your EAR is residing,select the appropriate deployment mode,then finally click 'Finish' button. Here the first step opening the admin console and login with the credentials itself is a time consuming process so as the other steps. Instead follow the steps below for easy deployment. Easy Deployment This requires a little tweak in the  config.xml file,idea is to specify in  config.xml files  which ear you need to deploy,Weblogic Server will read the Config file and looks for  an EAR in the  location  specified in the config file,great!!! ,then if found,it waits for nothing it will go ahead with the usual Server startup,picks the EAR,starts the modules specified in the EAR, installs the EAR to the Server

atg.service.jdbc.MonitoredDataSource vs atg.nucleus.JNDIReference

Monitored DataSource This is the default class used by ATG for configuring datasources,Most of the out of the box repositories in ATG uses  this in combination with JTDataSource component. JNDIReference For working with Weblogic Server,you need to override the old style of relying MonitoredDataSource,it makes life difficult if we have multiple repositories pointing to multipe datasources,configuring each repositories in this way is a tedious task, instead replace the old class with atg.nucleus.JNDIReference,so now the repositories   is pointing to the datasource which is specified by the JNDIName in the   JTDataSource component,which in turn points to the   Datasources configured in Weblogic Server identified with the JNDI name. eg: $class=atg.nucleus.JNDIReference JNDIName=abc_ds where abc_ds is the JNDI name in which you have configured the datasource in Weblogic Server. See how to alter a datasource quickly/easy -> Alter Datasource Quickly

DUseSunHttpHandler=true weblogic.net.http.SOAPHttpsURLConnection Weblogic/Java HttpHandler issues

Verify the issue is happening due to the error throwing  from the weblogic class  SOAPHttpsURLConnection,then you need to inform the Application Server which handler implementation you need to use.  add the following option to JAVA_OPTIONS in   setDomainEnv.sh/setDomainEnv.cmd  on Unix/Windows.   -DUseSunHttpHandler=true.  eg:  set JAVA_PROPERTIES=%JAVA_PROPERTIES% %WLP_JAVA_PROPERTIES%  set JAVA_OPTIONS=%JAVA_OPTIONS% %JAVA_PROPERTIES% -  DUseSunHttpHandler=true -Dwlw.iterativeDev=%iterativeDevFlag% -  Dwlw.testConsole=%testConsoleFlag% -Dwlw.logErrorsToConsole=%  logErrorsToConsoleFlag%  This setting tells WebLogic to use the Sun's https Handler   implementation rather than the WebLogic one.  So after this,it will use the  class HttpsURLConnection from the  javax package.   See Also   SSL Handshake error   java.lang.RuntimePermission modifyThread

Change encrypted password - Add Password Propert y-to Weblogic Data Source Files

While configuring datasources weblogic defaultly stored the password in encrypted format inside the datasource files.But this will make the developers job   difficult in case if he want to change the password property directly through files. eg: <properties>       <property>         <name>user</name>         <value>test</value>       </property>     </properties> <password-encrypted>{3SFG}/kMKUSVmft+uzUsiXxpMNPw==</password-encrypted> But we have an easy way to accomplish this by adding the property which has a name and value pair like below. eg: <properties>       <property>         <name>user</name>         <value>test</value>       </property>       <property>         <name>password</name>         <value>testapp</value>       </property>  </properties> Now you know how to edit this file to suit your needs. Done !! Se

Switch Weblogic Datasources quickly to connect different databases

Generally while configuring Datasources,especially changing the Username and Password for the datasources,Modifying the url of the datasource so as to establish connection to different databases in different environments like (Development,System Testing to verify a defect etc) will surely become a  tedious task if we rely  admin console each time to make these changes. There is an easy way to accomplish this,Assuming you already have a datasource configured for your Development purpose(connected to devdb),Now you need to connect to different datasource/database  to test a defect in different environment,say in System Test environment(connected to systestdb). Open your datasource files with a wordpad or notepad, located inside C:\bea\user_projects\domains\xxx_domain\config\jdbc folder, keep a back up of your old datasource file,now modify the datasource url,user name and password etc with respect to your environment(System test).Restart the  Weblogic Server. Now you can see your

Issues Opening ATG Control Center(ACC) - Not Resolving Host Name

This summary is not available. Please click here to view the post.

Modifying Registry keys for Standalone ATG Control Center

This can be done by editing the Registry Key.But take proper care in doing so. Go to the Start Menu->Run-type regedit then go to [HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\DNSClient] You will see an entry 'SearchList' if not add an entry for that,in  the data field of 'SearchList' enter the host name to be resolved. eg: -> SearchList="xxx.com,xxx.org.net" Now exit from Registry Editor.Run the command ipconfig/flushdns from your Command Window. After this ,Open your  standalone ACC. You will be prompted with  a dialog box which asks for, ”some files need to be downloaded from the Dynamo server To run this program successfully.Proceed with download ?" Click Yes and you will be able to Open your ACC .done!! You can see how to modify hosts file for this -> Modifying Windows Hosts file

sun.security.validator.ValidatorException sun.security.provider install SSL Handshake error

This summary is not available. Please click here to view the post.

Unit Test Global Components using ATG Control Center or AdminUI

How fast and easy  to do unit testing for a Global Component ? Lets assume i have not coded my JSP Pages, but for unit testing  i want to  invoke one of the handleMethod(String x,String y) inside my component which is of a Global scope. The easiest way is to write another test method inside the same component, and from there invoke the handleMethod.Make sure you pass the necessary parameters if any required for the original method from your test method. Like something below: public void testHandleMethod() {       String tmp1 = "test";        String tmp2 = "Method";         handleMethod(String tmp1,String tmp2) } Now in your ACC or Component Browser this method will be visible, so that you can invoke the testHandleMethod() directly from there. Note : Your test method must be public        Your test method must not contain any parameters. Now invoke the debugger and record the unit test results !!! Also verify how can we write a unit test cas

Aadhar UID Enrollment Steps made Easier than before

Enrolment Procedure Normally enrollment can be done through all Post Offices on specified dates.You can enroll in other Centers also identified for this.I went to nearby Post Office and done the entire process within half an hour. The enrollment process is very easy,Post Office guys will give you the Enrollment Form Upfront(This Enrollment Form Format might be different in different centres,means format will vary slightly),Fill up the necessary details,while submitting you have to carry  the required documents (Id,Address Proof)'. Its Best if you have a Xerox of DL or Passport which has both ID and Address Proof.So it alone will suffice for both,Other wise you need to provide the necessary Proofs,the list of supportings/Proofs will be displayed in every Post Office,Also there is no need to take  any Originals or Photo  with us at the time of enrollment. Once Verified they will issue a token,With this token you can go ahead and complete the formalities same day prefe

ATG Best practices to shutdown ATG Servers

Image
Always shutdown the Server by executing the shutdown scripts provided by the Weblogic (bea\user_projects\domains\base_domain\bin\stopWeblogic.cmd ). But the server will wait for the open session,open transaction to release ,and it will take some time.There is an option available which you can use and legitimately shutdown the Weblogic Server quickly. Add the 'force' option Open bea\user_projects\domains\base_domain\bin\stopWeblogic.cmd Modify the line to include the "force' option. this will be immediate and will suspend all the application process. You can also see how to Shutdown Weblogic Server while ACC is running   

Start ACC Faster or Different ways of starting ACC

There are 3 different ways to start ACC(ATG Control Center). 1.  Open your Component Brower,here you have an option to start      ACC in same or different VM.Choose the appropriate option      to start the ACC. 2.  You can Start it from the Desktop Start Menu.      Click Start-Programs-ATGX.X->Tools->ATG Control Center 3. Create a short cut in the Desktop/Taskbar which points to     C:\ATG\ATG9.0\home\bin\startACC.bat     The last way is faster compared to     the other two,as it opens the ACC(ATG Control Center)     in a single click.    You can also see how to shutdown weblogic while ACC is running

Cheating/Fraud at Advaith hyundai Service Center- bad service experience hyundai service center bangalore jp nagar

Address: 56, 1st Main Road, Saraki Industrial Layout, 3rd Phase, J.P Nagar , Bangalore- 560078 , Karnataka Landmark: Behind Teja Networks. i want to narrate a bad customer experience from this service center it would be less if i mention this incident as a height of irresponsibility i had given service of my car last week,.i was assigned a service executive Mr Bala.he appeared gentle but turned out to be a casual/irresponsible guy. i went to take delivery of vehicle,and found that they changed the   floor rubber mats,mine was thick rubber mats and they changed with s ome other car's mats which is of a old thin syntethic type,luckily  i found out this immediatly and told to the executive,he  told me that its misplaced and the person has gone, when he comes next time for servicing  we will replace this.how can he say something like this ????do i need to wait till he comes and live with this old mats ?? its really a painful experience for any customer. i got angry  as what will

Tips to handle bad vehicle servicing,misplaced or destroyed parts

Dont agree anything verbally,like that they will replace this next day or so.if you are casual they will not turn up. Make it written and signed by the executive atleast  in the job card. Dont take the old/damaged parts ...leave it in the service center itself if possible. Finally dont sign any papers given by them post servicing, also dont pay the bill till it got repaired/replaced. Give appropriate feedback based on your experience post servicing. For complaints There will be a GM associated with every dealers, give a written complaint,and lastly write to the company stating the issue.

outofMemory error while opening ATG AdminUI or Component Browser

Some times during development we used to get out of memory error if we try to view/modify the Dynamo AdminUI/Component Browser(through http://host:port/dyn/admin ) , this happens eventhough we had made the necessary settings for JVM parameters (MEM_ARGS and MaxPermSize) A work around for this issue is to just type the absoulute path of the component in the address bar For eg: if  you need to view/modify  the component, DeploymentServer through the component browser,g o to the Dynamo AdminUI/Component Browser,Browse to the path, http://host:port/dyn/admin/nucleus/atg/epub/DeploymentServer/ You can view/modify the component now!!!

Initiate the gas transfer formalities in the new location/branch

Initiate the transfer formalities in the new location/branch Go to the gas agency,with the below mentioned documents New Transfer Voucher also called subscription Voucher Regulator Book ID proof Address Proof Electricity bill Within 2 minutes the authorities can initiate the gas connection to your new location. Additionally you need to provide your date of birth and mobile numbers  to update in their system,mobile number is very important, Booking can be done through this only, also  in some agency  you have to send sms through the registered mobile numbers for booking. Note: You have the luxury to give an alternate number which would be useful in certain circumstances,the authorities generally are ignorant and will not tell  anything about this,but  this can be helpful in future. See how can we initiate  Transfer Formalities in Old Branch

gas transfer formalities in the old/current location/branch

Initiate the transfer formalities in the old/current location/branch  Go to the gas agency,with the below mentioned documents Transfer Voucher also called subscription Voucher Regulator Book ID proof You have to enquire well before the location and agency to which you need to initaiate the transfer Within 2 minutes the authorities can initiate the transfer to your preferred location. You have to do a signature in the new Transfer Voucher/Subscription Voucher. That’s all you have to do !!! Note: You don’t have to surrender any cylinder,regulator or any things that you are currently using. See how to Initiate the  Transfer Formalities in New Branch