Saturday, November 22, 2014

A Huge Business around IT Professionals

Today, It has been a smart and large business running around IT Professionals.
Various Sectors are targeting these folks and enjoying the fruits.

The various sectors especially in india are

                                                                                                      
Banking:

This sector is the top one who attracts IT peoples. They are come up with different flavors of credit cards,personal loans etc. They are processing and issuing the cards very quickly with minimum documentation.Wether it is use or not they giving 3 times their salary credit. To attract, they are giving rewards on purchase in shops and petrol pumps etc. Customer care executives repeatedly calling the people
and insisting for cards.But for non-it people it is tough to get these many cards easily.

Loans:

Another one who target IT are home loans. So many banks are competent and they are giving competent
interest rates.And if the ITb company is good, then it is very easy to get lacks and cores of amount for homes.
There are so many mediators are benefited in there processes .

Health Care: 

Now a days, so many hospital management is looking to IT candidates , they are tie up with corporate companies, and they are coming to IT offices and giving free health camps and even giving various discounts
to attract the people.

Education:

These so many companies are giving external training to their employees. These training includes both technical and non-technical subjects. There are so many teaching consultancies and lecturers are making this
opportunity very well. 

Food Courts:

So many popular hotels and companies are approaching IT campuses and making a high business with IT people. There you get bulk of people.

Entertainment: 

These days entertainment such as Fun, outings and Annual day celebrations and other occasions, so many event management consultancies are utilizing this opportunities to run their business .

Others :

Like wise so many other sector or organizations are targeting IT Professionals and running their business effectively.


Sunday, June 16, 2013

Unable to load bean: type: class:com.opensymphony.xwork2.ObjectFactory

Unable to load bean: type: class:com.opensymphony.xwork2.ObjectFactory - bean - jar:file:/C:/workspaces/test/test/target/work/webapp/WEB-INF/lib/struts2-core-2.1.8.1.jar!/struts-default.xml:29:72
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:208)
     at org.apache.struts2.config. 
StrutsXmlConfigurationProvider.
 register(StrutsXmlConfigurationProvider.java:101)
     at com.opensymphony.xwork2. 
config.impl.DefaultConfiguration.
 reload(DefaultConfiguration.java:131)
     at com.opensymphony.xwork2.
 config.ConfigurationManager. 
getConfiguration(ConfigurationManager.java:52)
     at org.apache.struts2.
 dispatcher.Dispatcher. 
init_PreloadConfiguration(Dispatcher.java:395)
     at org.apache.struts2.
 dispatcher.Dispatcher.init(Dispatcher.java:452)
     at org.apache.struts2 
.dispatcher.ng.InitOperations. 
initDispatcher(InitOperations.java:69)
     at org.apache.struts2.
 dispatcher.ng.filter.
 StrutsPrepareAndExecuteFilter. 
init(StrutsPrepareAndExecuteFilter.java:51)
     at org.mortbay.jetty.servlet. 
FilterHolder.doStart(FilterHolder.java:97)
     at org.mortbay.component. 
AbstractLifeCycle.start(AbstractLifeCycle.java:39)
     at org.mortbay.jetty.servlet.
 ServletHandler.initialize(ServletHandler.java:589)
     at org.mortbay.jetty. 
servlet.Context.startContext(Context.java:139)
     at org.mortbay.jetty.webapp.
 WebAppContext.startContext(WebAppContext.java:1220)
     at org.mortbay.jetty.handler. 
ContextHandler.doStart(ContextHandler.java:510)
     at org.mortbay.jetty.webapp. 
WebAppContext.doStart(WebAppContext.java:448)
     at org.mortbay.jetty.plugin.
 Jetty6PluginWebAppContext.
 doStart(Jetty6PluginWebAppContext.java:110)
     at org.mortbay.component. 
AbstractLifeCycle.start(AbstractLifeCycle.java:39)
    
Caused by: Bean type class com.opensymphony.xwork2.ObjectFactory with the name xwork has already been loaded by bean
 - jar:file:/C:/workspaces/ulearn/ulearn/target/work/webapp/WEB-INF/lib/struts2-core-2.0.11.2.jar!/struts-default.xml:30:72
 - bean - jar:file:/C:/workspaces/ulearn/ulearn/target/work/webapp/WEB-INF/lib/struts2-core-2.1.8.1.jar!/struts-default.xml:
 at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:193)
 
 
 
 
I Solved it by..
 
Just Removing all the struts jars at Server Run Configuration.

Wednesday, June 13, 2012

Aspect Oriented Programming

Aspect Oriented Programming (AOP) is a promising new technology for separating crosscutting concerns that are usually hard to do in object-oriented programming. This article aims to be an introductory point to the basic concepts associated with this new paradigm.

Crosscutting Concerns

An example of crosscutting concerns is "logging," which is frequently used in distributed applications to aid debugging by tracing method calls. Suppose we do logging at both the beginning and the end of each function body. This will result in crosscutting all classes that have at least one function. Other typical crosscutting concerns include context-sensitive error handling, performance optimization, and design patterns.

Crosscutting concerns may exist in some programs, especially large ones. However, in some situations, redesign of the system might transform a crosscutting into an object. AOP assumes that crosscutting concerns may exist in programs and can't be re-factored out of the design in all situations.

Aspect Oriented Programming and Java

AOP is a concept, so it is not bound to a specific programming language. In fact, it can help with the shortcomings of all languages (not only OO languages) that use single, hierarchical decomposition. AOP has been implemented in different languages (for example, C++, Smalltalk, C#, C, and Java).
Of course, the language that gains a great interest of the research community is the Java language. The following is a list of tools that support AOP with Java:

A very simple approach is  AspectWerkz .

Ref : http://aspectwerkz.codehaus.org/index.html

Friday, April 20, 2012

JStuff

Annotations:

  • Information for the compiler — Annotations can be used by the compiler to detect errors or suppress warnings.
  • Compiler-time and deployment-time processing — Software tools can process annotation information to generate code, XML files, and so forth.
  • Runtime processing — Some annotations are available to be examined at runtime.

 

Annotation is a very powerful mechanism and can be used in a lot of different ways:
  • to describe constraints or usage of an element: e.g. @Deprecated, @Override, or @NotNull
  • to describe the "nature" of an element, e.g. @Entity, @TestCase, @WebService
  • to describe the behavior of an element: @Statefull, @Transaction
  • to describe how to process the element: @Column, @XmlElement

Usage of annotations:
  • Documentation, e.g. XDoclet
  • Compilation
  • IDE
  • Testing framework, e.g. JUnit
  • IoC container e.g. as Spring
  • Serialization, e.g. XML
  • Aspect-oriented programming (AOP), e.g. Spring AOP
  • Application servers, e.g. EJB container, Web Service
  • Object-relational mapping (ORM), e.g. Hibernate, JPA
  • and many more...
------------------------------------------------------------------------------------------------------------

Struts-Flow:


1) When first the request is made from a JSP/HTML/XSLT to the server with a particular URI(/something.do), the controll first reaches Web.xml file.
2) it checks the mapping for /something.do in web.xml and finds the ActionServlet and loads ActionServlet.
......
<servlet-name>action</servlet-name>
        <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
.....

    <servlet-mapping>
        <servlet-name>action</servlet-name>
        <url-pattern>*.do</url-pattern>
    </servlet-mapping>
3) As part of loading ActionServlet calls the init() as every other servlet does.
(Note: ActionServlet extends HttpServlet only)
......................
        <init-param>
            <param-name>config</param-name>
            <param-value>/WEB-INF/struts-config.xml</param-value>
        </init-param>
........................
4) in init() it takes the init-parameters as struts-config.xml and loads the xml file.
5) then the ActionServlet calls the proceed() of RequestProcessor class.
6) in proceed() , it checks the appropriate mapping for current request, creates and ActionMapping object and maps the URI to the action in the struts-config.xml.
7) then it creates an object to ActionForm associated to that action mapped object

8) calls the setters and reset().

9) if the action tag in struts-config.xml contains validate="true", then the validate method is called.

10) if any validation errors, it return to view component (any jsp,XSLT) which is specified as an attribute of input="/error.jsp"

11) if there are not validation errors, it then creates an Action class for that mapping and search for execute method and executes it.

12) execute method performs the bussinesslogic which you provide and returns with an ActionForward key.

13) now the returned key is searched in the mapping object which is specified as forward tag.

14) it looks for the appropriate view component and performs the getters on that view component and returns the response to the browser.

Message Driven Bean

A MDB is component can process messages asynchronously. This is associated with JMS service. Basically it works as JMS Listener. The messages can be sent by any client like JMSclient, any other EJB,system that does not use Java EE technology. Bean associated with JMS queue or topic.

Monday, March 19, 2012

XML Info

SAX Parser:
  1. Event based model.
  2. Serial access (flow of events).
  3. Low memory usage (only events are generated).
  4. To process parts of the document (catching relevant events).
  5. To process the document only once.
  6. Backward navigation is not possible as it sequentially processes the document.
  7. Objects are to be created.
DOM Parser:
  1. (Object based)Tree data structure.
  2. Random access (in-memory data structure).
  3. High memory usage (the document is loaded into memory).
  4. To edit the document (processing the in-memory data structure).
  5. To process multiple times (document loaded in memory).
  6. Ease of navigation.
  7. Stored as objects.
XPath :
  • XPath is used to navigate through elements and attributes in an XML document.
  • Used in XSLT.
  • XPath uses path expressions to select nodes or node-sets in an XML document.

Friday, February 17, 2012

Linux Commands

 Count number of files in a directory:
    
  $  ls -1 targetdir | wc -l

The above method will count symbolic links as well as subdirectories in targetdir (but not recursively into subdirectories).

If you want to exclude subdirectories, you need a heavier duty tool than ls.
 
$ find targetdir -type f  -maxdepth 1 | wc -l
 
 type f ensures that the find command only returns regular files for counting (no subdirectories).   

By default, the find command traverses into subdirectories for searching.  -maxdepth 1 prevents find from traversing into subdirectories.   If you do want to count files in the subdirectories, just remove -maxdepth 1 from the command line.

Note that the find command does NOT classify a symbolic link as a regular file.  Therefore, the above find -type f command does not return symbolic links. As a result, the final count excludes all symbolic links.

To include symbolic links, add the -follow option to find.
 
$ find targetdir -type f -follow  -maxdepth 1 | wc -l 

Tuesday, February 7, 2012

Classloader issues with MQ shared object files

NoClassDefFoundError: com/ibm/mq/server/MQSESSION when running WSMQ adapter in bindings mode

Symptom

GIS 4.1.1 Build Version: 1982_BR4932266_SR1370953
Customer is able to use WSMQ adapter without issue when running in client mode. When switching to bindings mode, an initializer error and no class definition found error is logged in the WebSphereMQSuite.log
Verified that the correct jars are referenced in dynamicclasspath.cfg, and that they exist at the specified locations.
Error Message [2009-05-26 10:40:19.53] ALL 000000000000 GLOBAL_SCOPE <WSMQAsyncRcv-TA.CA.INFRA.TEST_Node2-515856336> ##[DEBUG]## startupAdapter
[2009-05-26 10:40:19.54] ALL 000000000000 GLOBAL_SCOPE <WSMQAsyncRcv-TA.CA.INFRA.TEST_Node2-514938832> ### WSMQAsyncRcv thread running ###
[2009-05-26 10:40:19.54] ALL 000000000000 GLOBAL_SCOPE <WSMQAsyncRcv-TA.CA.INFRA.TEST_Node2-515856336> ##[DEBUG]## startup complete
[2009-05-26 10:40:19.547] ALL 000000000000 GLOBAL_SCOPE <WSMQAsyncRcv-TA.CA.INFRA.TEST_Node2-514938832> ##[DEBUG]## ThreadMgr maxThreads=10
[2009-05-26 10:40:19.547] ALL 000000000000 GLOBAL_SCOPE <WSMQAsyncRcv-TA.CA.INFRA.TEST_Node2-ccaita2p:16ff17dd:1217d5d1ebc:-100f-5149388 32> ##[DEBUG]## Attempting to open a connection with the following values:
MQEnvironment version_notice=MQSeries classes for Java V5.2.0
hostname=null (bindings mode)
port=1414
qManager=QM0.PR.US.CCAITA2P
channel=null (bindings mode)
[2009-05-26 10:40:19.589] ERROR 000000000000 GLOBAL_SCOPE <WSMQAsyncRcv-TA.CA.INFRA.TEST_Node2-514938832> Exception in WSMQAsyncRcv thread
java.lang.ExceptionInInitializerError
at com.ibm.mq.MQSESSIONServer.getMQSESSION(MQSESSIONServer.java(Compiled Code))
at com.ibm.mq.MQSESSION.getSession(MQSESSION.java(Compiled Code))
at com.ibm.mq.MQManagedConnectionJ11.<init>(MQManagedConnectionJ11.java(Compiled Code))
at com.ibm.mq.MQBindingsManagedConnectionFactoryJ11._createManagedConnection(MQBind ingsManagedConnectionFactoryJ11.java:179)
at com.ibm.mq.MQBindingsManagedConnectionFactoryJ11.createManagedConnection(MQBindi ngsManagedConnectionFactoryJ11.java:215)
at com.ibm.mq.StoredManagedConnection.<init>(StoredManagedConnection.java(Compiled Code))
at com.ibm.mq.MQSimpleConnectionManager.allocateConnection(MQSimpleConnectionManage r.java(Compiled Code))
at com.ibm.mq.MQQueueManagerFactory.obtainBaseMQQueueManager(MQQueueManagerFactory. java(Compiled Code))
at com.ibm.mq.MQQueueManagerFactory.procure(MQQueueManagerFactory.java(Compiled Code))
at com.ibm.mq.MQQueueManagerFactory.constructQueueManager(MQQueueManagerFactory.jav a(Compiled Code))
at com.ibm.mq.MQQueueManagerFactory.createQueueManager(MQQueueManagerFactory.java(C ompiled Code))
at com.ibm.mq.MQQueueManager.<init>(MQQueueManager.java(Compiled Code))
at com.sterlingcommerce.woodstock.services.wsmqSuite.WSMQSession.openConnection(WSM QSession.java(Inlined Compiled Code))
at com.sterlingcommerce.woodstock.services.wsmqSuite.WSMQSession.openSession(WSMQSe ssion.java(Compiled Code))
at com.sterlingcommerce.woodstock.services.wsmqSuite.WSMQAsyncRcv$1.run(WSMQAsyncRc v.java(Compiled Code))
Caused by: java.lang.NullPointerException
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:2159)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1994)
at java.lang.Runtime.loadLibrary0(Runtime.java:824)
at java.lang.System.loadLibrary(System.java:908)
at com.ibm.mq.MQSESSION.loadLib(MQSESSION.java:1088)
at com.ibm.mq.server.MQSESSION$1.run(MQSESSION.java:230)
at java.security.AccessController.doPrivileged1(Native Method)
at java.security.AccessController.doPrivileged(AccessController.java(Compiled Code))
at com.ibm.mq.server.MQSESSION.<clinit>(MQSESSION.java:224)
... 15 more
[2009-05-26 10:40:19.686] ERROR 000000000000 GLOBAL_SCOPE <WSMQAsyncRcv-TA.CA.INFRA.TEST_Node2-514938832> Exception in WSMQAsyncRcv thread during backout
java.lang.Exception: Queue Manager is null.
at com.sterlingcommerce.woodstock.services.wsmqSuite.WSMQSession.backout(WSMQSessio n.java(Inlined Compiled Code))
at com.sterlingcommerce.woodstock.services.wsmqSuite.WSMQAsyncRcv$1.run(WSMQAsyncRc v.java(Compiled Code))
[2009-05-26 10:40:19.687] ALL 000000000000 GLOBAL_SCOPE <WSMQAsyncRcv-TA.CA.INFRA.TEST_Node2-514938832> ### Exception occurred - waiting to retry
[2009-05-26 10:45:19.688] ALL 000000000000 GLOBAL_SCOPE <WSMQAsyncRcv-TA.CA.INFRA.TEST_Node2-ccaita2p:16ff17dd:1217d61d8d8:-3273-5149388 32> ##[DEBUG]## Attempting to open a connection with the following values:
MQEnvironment version_notice=MQSeries classes for Java V5.2.0
hostname=null (bindings mode)
port=1414
qManager=QM0.PR.US.CCAITA2P
channel=null (bindings mode)
[2009-05-26 10:45:19.688] ERROR 000000000000 GLOBAL_SCOPE <WSMQAsyncRcv-TA.CA.INFRA.TEST_Node2-514938832> Exception in WSMQAsyncRcv thread
java.lang.NoClassDefFoundError: com/ibm/mq/server/MQSESSION
at com.ibm.mq.MQSESSIONServer.getMQSESSION(MQSESSIONServer.java(Compiled Code))
at com.ibm.mq.MQSESSION.getSession(MQSESSION.java(Compiled Code))
at com.ibm.mq.MQManagedConnectionJ11.<init>(MQManagedConnectionJ11.java(Compiled Code))
at com.ibm.mq.MQBindingsManagedConnectionFactoryJ11._createManagedConnection(MQBind ingsManagedConnectionFactoryJ11.java:179)
at com.ibm.mq.MQBindingsManagedConnectionFactoryJ11.createManagedConnection(MQBindi ngsManagedConnectionFactoryJ11.java:215)
at com.ibm.mq.StoredManagedConnection.<init>(StoredManagedConnection.java(Compiled Code))
at com.ibm.mq.MQSimpleConnectionManager.allocateConnection(MQSimpleConnectionManage r.java(Compiled Code))
at com.ibm.mq.MQQueueManagerFactory.obtainBaseMQQueueManager(MQQueueManagerFactory. java(Compiled Code))
at com.ibm.mq.MQQueueManagerFactory.procure(MQQueueManagerFactory.java(Compiled Code))
at com.ibm.mq.MQQueueManagerFactory.constructQueueManager(MQQueueManagerFactory.jav a(Compiled Code))
at com.ibm.mq.MQQueueManagerFactory.createQueueManager(MQQueueManagerFactory.java(C ompiled Code))
at com.ibm.mq.MQQueueManager.<init>(MQQueueManager.java(Compiled Code))
at com.sterlingcommerce.woodstock.services.wsmqSuite.WSMQSession.openConnection(WSM QSession.java(Inlined Compiled Code))
at com.sterlingcommerce.woodstock.services.wsmqSuite.WSMQSession.openSession(WSMQSe ssion.java(Compiled Code))
at com.sterlingcommerce.woodstock.services.wsmqSuite.WSMQAsyncRcv$1.run(WSMQAsyncRc v.java(Compiled Code))
[2009-05-26 10:45:19.689] ERROR 000000000000 GLOBAL_SCOPE <WSMQAsyncRcv-TA.CA.INFRA.TEST_Node2-514938832> Exception in WSMQAsyncRcv thread during backout
java.lang.Exception: Queue Manager is null.
at com.sterlingcommerce.woodstock.services.wsmqSuite.WSMQSession.backout(WSMQSessio n.java(Inlined Compiled Code))
at com.sterlingcommerce.woodstock.services.wsmqSuite.WSMQAsyncRcv$1.run(WSMQAsyncRc v.java(Compiled Code))
[2009-05-26 10:45:19.689] ALL 000000000000 GLOBAL_SCOPE <WSMQAsyncRcv-TA.CA.INFRA.TEST_Node2-514938832> ### Exception occurred - waiting to retry

Resolving the problem

Currently this issue does not have a resolution; it is being worked on by IBM Sterling Support. If you believe you are experiencing this issue and would like to be notified when a resolution is reached, please open a case through Customer Center and ask that it be associated with number 25540