Monday 3 November 2014

Oracle IP change Issue

Just update the IP inside this location:
go to this location:{$app_DIR}\admin\product\11.2.0\dbhome_1\NETWORK\ADMIN
e.g.
E:\app\admin\product\11.2.0\dbhome_1\NETWORK\ADMIN

open cmd in adminstrator mode using shortcut key:
WINDOW+X

Go to the above dir location and
 type = notepad sqlnet.ora and edit localhost or current IP with updated IP
then
type = notepad tnsnames.ora and edit localhost or current IP with updated IP

Spring MVC + Google App Engine + Deployment

Spring MVC Integration with Goggle App Engine and its deployment.

Pre-Requisites:
1)Eclipse 4.3
2)JDK 1.7


1)Install Google Plugin for Eclipse =
  click “Help” –> “Install New Software…“, copy and paste following URL
  http://dl.google.com/eclipse/plugin/4.3

  Select “Google Plugin for Eclipse (required), and Google App Engine SDK for Java.

  Eclipse prompts you to restart once installation finish.

  After Restart ,A small Google icon is available in the Eclipse toolbar.'g'

2)In Eclipse toolbar, click on the Google icon, and select “New Web Application Project…”
Deselect the “Google Web ToolKit“, and link your GAE Java SDK via the “configure SDK” link.
Click finished, Google Plugin for Eclipse will generate a sample project automatically.

3)Right click on the project and run as “Web Application“.
  Access URL http://localhost:8888/, see output

4)Deploy to Google App Engine
  Register an account on https://appengine.google.com/, and create an application ID for your web application
  and put it in appengine-web.xml.

5)Click on GAE deploy button on the toolbar.
6)Sign in with your Google account and click on the Deploy button.
7)Done :)

Now Integration of Spring MVC project with Google App Engine

1)Create sample 'Spring MVC Project'(Better install "Spring tool suite") with some package ie. com.sat.first
2)Create 'Web Application project' same as above.(keep package name same as com.sat.first)
3)Copy 'appengine-web.xml' and logging.properties from 'WAP' to 'Spring project location' -> \WEB_INF\
4)Right Click on project google-> App Engine Setting select as Use Google App Engine
5)Go to 'Web Application select the 'Tick' Box.
6)Press 'OK'

Now Run As-> Web Application and check the URL in Browser.

If Eclipse creates problem then go to Eclipse Installation DIR
and Edit Ecilpse.ini and paste vm arguments as:
-vm
C:\Program Files\Java\jdk1.7.0_40\bin
just below 'openFile'.

and restart eclipse again.

Now go to projeect dir and copy 'E:\Eclipse_GAE\workspace\FirstApp_Spring\target\first-1.0.0-BUILD-SNAPSHOT'

Rigt Click on the project and select 'Run\Debug Setting'.
Edit the configuration. Select Arguments Tab then paste copied above with space i.e:
--port=8888 E:\Eclipse_GAE\workspace\FirstApp_Spring\target\first-1.0.0-BUILD-SNAPSHOT

and save with 'OK'

Now run Web Application project then deploy at google App Enngine.

2) Now 'Maven Clean' and 'Maven Install' to create War file.
3) WAR file should be present

Useful Links:
http://www.mkyong.com/google-app-engine/google-app-engine-hello-world-example-using-eclipse
http://www.mkyong.com/google-app-engine/how-to-install-google-plugin-for-eclipse/
https://www.youtube.com/watch?v=i_vK6U24vsE

Friday 20 April 2012

how to use singleton class for handling multiple request at runtime

I faced this issue when i was working with one of my web project. The issue comes in picture when i generated web stub to use web methods for a particular wsdl URL. Previously i had requirement for hitting one web port only but later i received requirement for handling multiple web port at run-time.As i had only one singleton class for dealing with one web port so i used my design pattern in which i created one hash table like bucket in which i put object first time and second time the request search for the old object inside bucket.In this way we can create multiple singleton object each referring to a separate wsdl URL. so my problem got solved.

Not getting intelligence in layout xml in android

Simple and small solution: just restart your computer :)

Saturday 14 April 2012

Apache CXF 2.5 Issue- Two classes have same XML type and namespace issue.


I faced this issue while i was working on one of my web service project. I was trying to consume soap web service using Apache CXF 2.5 framework.I generated the web stub to use web services directly from web method generated. I used wsdl batch file to generate web stub.First time i got some error some of the methods as they were not getting appropriate jax-ws environment. so i resolved this error by generating the web stub using augmented command like : wsdl2java -frontend jaxws21 <wsdlurl>
Then my web method error get removed . Now to remove actual error: IllegalAnnotation..20 counts found.
I was getting this error when i was running my project in server mode but it was running proper as java application. So when i include the Apache CXF 2.5 lib into WEB-INF folder. My problem get resolved.

How to add google account in AVD .

I faced this issue while i was trying to implement C2DM push at my AVD in android version 2.2.
This was very small thing but no where find any solution clearly to add google account in emulator .
So Here is the solution:
Create an AVD with target as google api's .It will automatically provide you google account option
when you will visit from Setting -> Accounts & Sync