Skip to main content

Posts

Showing posts from 2020

Split string and extract nth word in Oracle

   Split string and extract nth word in Oracle Here I am taking 5 word from string glaccount example  222-333-23434-2222333-000-0000-888 select REGEXP_SUBSTR(glaccount, '[^-]+', 1, 3) AS glaccount from Workorder Output : 23434  Here  we are separting word with delimitter - if you have comma replace hiphen with comma.

Getting Mboset from session / Getting Mboset from Memory

Getting Mboset from session / Getting Mboset from Memory   This is typical sometimes you need to supply attribute of newly created MBO like id field to a child object which is in Memory on save of object.  When we do getMboSet ()  we don't get this object because its in Memory and get Mboset get it from db via relationship Inorder to do this you need to explicity get object from MXserver.getMboset() and then  call Add() method and save it. Now in child Mbo you will get that object.

Oracle Passing array elements as input parameters.

 set serveroutput on ; CREATE OR REPLACE TYPE MyType AS VARRAY(200) OF VARCHAR2(50); \ CREATE OR REPLACE PROCEDURE testing(t_in MyType, v_type in varchar) IS   ret varchar2(100):='';  BEGIN    FOR i IN 1..t_in.count LOOP     dbms_output.put_line(t_in(i));     IF i < t_in.count THEN      ret:=ret||' '''||t_in(i)||''',  ';     ELSE      ret:=ret||' '''||t_in(i)||'''  ';     END IF ;     END LOOP;   dbms_output.put_line(ret);   dbms_output.put_line(v_type);  END; \  DECLARE       v_t MyType;     BEGIN       v_t := MyType();       v_t.EXTEND(3);       v_t(1) := 'WAPPR';       v_t(2) := 'APPR';       v_t(3) := 'INPRG';       testing(v_t,'Test');     END;

Maximo heap dump analysis

 Often we see in our environment particularly non prod we saw memory leak or heap dumps. There can be chance of this due to memory leakage and often require analysis too found root cause. There are different tools commercial as well as opersource to analys these heap dumps We will see why heap dumps created and how to identify issue.

Maximo Reorder not generating PR

 If Reorder is not generating PR  1. Check for vendor order unit has a conversion exists with item issue unit? 2. Check for ITem is active at org and inventory level? 3. Check any field is mandatory in PR which is not fullfilled while PR is getting generated from Reorder? 4. Check calculation for Quantity to reorder matches with calculation? 5. Check exchange rate is defined for Currency specified for vendor? 6. Check GL account is  valid?

Maximo Technical Consultant Course Syllabus

DB config Application Designer Escalation Crontask Workflow Designer Automation Script Migration Manager Object Structure Message Tracking Import export via CSV Mximo Integration Framework Maximo Webservice SOAP Maximo Webservice Rest Call a Webserver from Mbo Class or Bean Class Integration Automation Script

Unix/Linux Important Commands

Main Linux commands ls -lrt == list of files order by date ascending ls -lrt | tail - 10  == list of files order by date ascending Top 10 wc -l == line count in file grep -i === Match pattern ignoring case grep -i Test00 == Find word  Test00  ignoring case and give the list of words containing  Test00 grep -i  Test00  | wc -l === Gives count of number of words wc -l Test.txt == this will give line count in text.txt grep -i "Maximo" | wc -l = Give the count of lines which contains word Maximo pwd === Print working directory. cd == to go into directory cd .. == to go out of directory df -H == This is used to check disk file system space available and used. rm file.txt == to remove file ls heap* == to list all files with heap* name.. TOP == see all process kill -9 IDOFPROCESSTOKILL

How to create Multiselect lookup

 Inorder to create a multiselect lookup you can use following steps 1. Create a Menu to call a dialog. 2. Create a multiselect dialog using relationship for mbo you want to select 3. write a beanclass on ok even of dialog to select mbo's selected and set value in owner of the dialog by concatenating.

ORACLE PROCEDURE WITH VARIABLE ARGUMENTS

set serveroutput on ; CREATE OR REPLACE TYPE MyType AS VARRAY(200) OF VARCHAR2(50); \ CREATE OR REPLACE PROCEDURE testing(t_in MyType, v_type in varchar) IS   ret varchar2(100):='';  BEGIN    FOR i IN 1..t_in.count LOOP     dbms_output.put_line(t_in(i));     IF i < t_in.count THEN      ret:=ret||' '''||t_in(i)||''',  ';     ELSE      ret:=ret||' '''||t_in(i)||'''  ';     END IF ;     END LOOP;   dbms_output.put_line(ret);   dbms_output.put_line(v_type);  END; \  DECLARE       v_t MyType;     BEGIN       v_t := MyType();       v_t.EXTEND(3);       v_t(1) := 'WAPPR';       v_t(2) := 'APPR';       v_t(3) := 'INPRG';       testing(v_t,'Test');     END;

Call to VidMessageSlotMap failed: Last=0xc000000d/87 (VERR_NEM_VM_CREATE_FAILED)

Call to VidMessageSlotMap failed: Last=0xc000000d/87 (VERR_NEM_VM_CREATE_FAILED) To resove this error Uninstall docker or similar tool if you are using Go to start -> Turn of/off windows features then uncheck Hyper-V then check virtual machine then check sandbox then uncheck containers open power shell in administrator (Run as admin) and type command bcdedit /set hypervisorlaunchtype off then restart your PC  

how to free port port in use error

C:\Users\AnilBalwani>netstat -ano | findstr 8080   TCP    0.0.0.0:8080           0.0.0.0:0              LISTENING       12744   TCP    [::]:8080              [::]:0                 LISTENING       12744   TCP    [::1]:8080             [::1]:57481            TIME_WAIT       0 C:\Users\AnilBalwani>taskkill /pid 12744 ERROR: The process with PID 12744 could not be terminated. Reason: This process can only be terminated forcefully (with /F option). C:\Us...

Getting started with docker

Docker has 2 editions community edition(free) and enterprise edition (paid) Select the os from docker website and download and install docker. Once you install docker run in powershell run below command >Docker run hello-world Docker run command is used to run an container To find what all containers you can run go to docker hub. once you use run command docker reuires internet and it will download from that dockerhum you can find list of container >docker ps  or docker list command Stopping a container >docker stop Name_of_Container to stop docker service >service docker stop to Remove use docker -rm command If you want to create your own image you should use docker files

JUNK characters or special characters are passed when sending request from ajax/javascript to servlet + multipart form data

Special characters / Junk characters while sending data from jquery ajax to servlet while uploading file Hi recently I received a weird issue is while setting description of a record it appended some weird special characters in my string.  Inorder to solve this issue what we can do is  use item.getString("UTF") instead of item.getString().

Steps to start derby database

C:\Users\AnilBalwani> java -jar C:\Users\AnilBalwani\Downloads\db-derby-10.14.2.0-bin\db-derby-10.14.2.0-bin\lib\derbyrun.jar Usage: java -jar derbyrun.jar ij [-p propertiesfile] [sql script] java -jar derbyrun.jar sysinfo [-cp ...] [-cp help] java -jar derbyrun.jar dblook [args] (or no arguments for usage) java -jar derbyrun.jar server [args] (or no arguments for usage) java -jar derbyrun.jar SignatureChecker [args] java -jar derbyrun.jar PlanExporter [args] C:\Users\AnilBalwani> java -jar C:\Users\AnilBalwani\Downloads\db-derby-10.14.2.0-bin\db-derby-10.14.2.0-bin\lib\derbyrun.jar ij ij version 10.14 ij> CONNECT 'jdbc:derby:booksdb;create=true'; ij> CREATE TABLE book (book_id int primary key, title varchar(64)); 0 rows inserted/updated/deleted ij> INSERT INTO book VALUES (1, 'Core Java'), (2, 'Thinking in Java'), (3, 'Effective Java'); 3 rows inserted/updated/deleted ij> CONNECT 'jdbc:derby://localhost:1527/project...

Python HTTP Request

import requests,json print(requests.get('https://api.github.com')); # Getting response in json format response=requests.get('https://api.github.com'); #print(response.json()); #print(response.headers); print(response.headers['content-type']); print(response.headers['date']);

Reading JSON File using Python

Code to Read Json File using Python >>> import os >>> os.chdir(r"C:\Users\AnilBalwani\Desktop"); >>> f=open("hello.json"); >>> print(json.load(f)); {'glossary': {'title': 'example glossary', 'GlossDiv': {'title': 'S', 'GlossList': {'GlossEntry': {'ID': 'SGML', 'SortAs': 'SGML', 'GlossTerm': 'Standard Generalized Markup Language', 'Acronym': 'SGML', 'Abbrev': 'ISO 8879:1986', 'GlossDef': {'para': 'A meta-markup language, used to create markup languages such as DocBook.', 'GlossSeeAlso': ['GML', 'XML']}, 'GlossSee': 'markup'}}}}}

Reading a file in oracle

create a directory using sqlplus sys / as sysdba create directory create directory test as 'C:\test' grant access for read and write to db Grant read,write test to public; copy your file emp.txt with data DECLARE   L_HANDLER UTL_FILE.FILE_TYPE; L_TEST VARCHAR2(1000); BEGIN   L_HANDLER := UTL_FILE.FOPEN('TEST', 'EMP.txt', 'R');  UTL_FILE.GET_LINE(L_HANDLER,L_TEXT); DBMS_OUTPUT.PUT_LINE(L_TEXT); END;

PIP Tool Python

PIP is tool for installing library. IT is used for installing/listing/deleting library. To search for python libraries https://pypi.org/search/ pip install qbill To check installation pip show qbill

PIP syntax error python

PIP syntax error python  Open command prompt. Check python version run command like  pip install qrbill --user (--user is optional if you have access denied issue ) Steps to install package in python is Microsoft Windows [Version 10.0.18363.778] (c) 2019 Microsoft Corporation. All rights reserved. C:\Users\AnilBalwani>python --version Python 3.8.2 C:\Users\AnilBalwani>pip --version pip 19.2.3 from c:\program files (x86)\python38-32\lib\site-packages\pip (python 3.8) C:\Users\AnilBalwani>python -m pip install --upgrade pip setuptools wheel Collecting pip   Downloading https://files.pythonhosted.org/packages/54/0c/d01aa759fdc501a58f431eb594a17495f15b88da142ce14b5845662c13f3/pip-20.0.2-py2.py3-none-any.whl (1.4MB)      |████████████████████████████████| 1.4MB 386kB/s Collecting setuptools   Downloading https://files.pythonhosted.org/packages/a0/df/635cdb901ee4a8a42ec68e480c49f85f4c59e8816effbf57d9e6ee8b3588/setuptools-4...

Maximo Integration Framework

Maximo Integration framework is used for integrating with external application or system or for loading data. Its heart is object structure. It supports following file formats JSON, XML, CSV etc. You can integrate via Webservice Soap/Rest, JMS , HTTP etc. You can also define a particular time during a day to synchronize or can be in real time. Main integration components and there use in Layman terms : - Object Structure  : List of Objects Publish Channel : Used to send data or Publish data Enterprise Service : Used to receive data from external system Invocation Channel : Used for Send and receive data at particular event External system : you define a virtual name for external system you are integrating. Endpoint : - Its a gate through which data goes in and out. For business logic we can do XSL Mapping, Java classes or processing rules.

Hellow World program in python

# Hello World program in Python import datetime,time,sys def welcome():     print("Hi How are you" +str(datetime.datetime.now()));                    #prints date and time     print("Hope you are having a great day");     print("Welcome to python");     time.sleep(1);        #cause program to wait for 1 second welcome(); welcome(); exit(); This program creates welcome function, shows you how to import or do multiple import and print datetime. with params # Hello World program in Python import datetime,time def welcome(number):     print("Hi How are you" +str(datetime.datetime.now()));     print("Hope you are having a great day"+str(number+1));     print("Welcome to python");     time.sleep(1); welcome(6); Python Creating class example class Person:     d...

Getting started with PLSQL

PLSQL Basics Structure of PLSQL Block Declare                      (Optional) BEGIN                      (Required)        Sql statments        IF....While...For....Else....Do....While Exception                  (Optional) End ;                       (Mandatory) Types of blocks in PLSQL 1. Anonymous Structure : Declare                      (Optional) BEGIN                      (Required)        Sql statments        IF....While...For....Else....Do....While Exception                  (Optional) End       ...

Steps to create user in database

Creating test user in oracle database alter session set container=testdb--only for 12c create user test identified by test; grant create session to test; grant create table,create view to test; grant  create procedure to test; grant create synonym, create trigger to test; grant unlimited tablespace to test;

Dependencies in Software development

Dependencies in Software development  Change Dependency : - Developers need to ensure that the code change they implementing due to client requirement is working well with the other related part of the code to form a stable baseline.  Expertise Dependency : - Developers might need expertise of colleagues or business analyst in case of any challenge in bug fixing, technical challenge arising due to past defects in system or in case of code merge/deployment activity. Availability Dependency : - Availability is required for Key resources for performing technical work and availability is required for Timeline Dependency :- Any other Project running in parallel might impact timelines for Execution.  

Assumptions in Software Development Project

Assumptions in Software Development Project 1. End users will be available to test during the time  they agree to. 2. Time is allocated for preparing development environment. 3. There will not be any major requirement change after sign off. 4. Estimation of effort is based on our current understanding of the scope. Any change in scope will result in revision of estimate and will be handled through change management process. 5. Estimate includes weekly status reporting and weekly meetings related to this Enhancement 6. External Partner or Third Party will respond to requests for action / clarification within timelines. 7. Their will be client expertise involved as and when required.

Risk in Software development

Risk involved in Software development 1. As development progresses more and more features that were not identified at the beginning of the project or changing of requirements may impact estimates and timelines. 2. Employee availability can cause significant delays in project. 3. Incorrect estimation due to external factors like insufficient time from client for feedback on layout and reports, approval on various documents insufficient time allocated for testing or due to any technical challenges. 4. This project work requires lot of coordination with multiple stakeholders. Any delay might affect the schedule. 5. If documentation / deliverables from key stakeholders does not meet quality standards, project execution will be impacted. 6. Any issues in installation can cause significant delay in project execution.

Kafka Comands

Starting Zookeeper  C:\kafka_2.12-2.4\kafka_2.12-2.4.0\bin\windows>zookeeper-server-start C:\kafka_2.12-2.4\kafka_2.12-2.4.0\config\zookeeper.properties Starting Kafka server C:\ Kafka\ kafka-server-start.bat C:\kafka_2.12-2.4\kafka_2.12-2.4.0\config\server.properties Creating topics C:\Users\AnilBalwani>kafka-topics --zookeeper 127.0.0.1:2181 --topic test_topic --create --partitions 3 --replication-factor 1 WARNING: Due to limitations in metric names, topics with a period ('.') or underscore ('_') could collide. To avoid issues it is best to use either, but not both. Created topic test_topic. C:\Users\AnilBalwani> List topics C:\Users\AnilBalwani>kafka-topics --zookeeper 127.0.0.1:2181 --list test_topic Kafka Information about topics C:\Users\AnilBalwani>kafka-topics --zookeeper 127.0.0.1:2181 --topic test_topic --describe Topic: test_topic      PartitionCount: 3       ReplicationFactor: ...

error running Kafka zookeeper

Error running Kafka org.apache.zookeeper.server.quorum.QuorumPeerConfig$ConfigException: Error processing config\zookeeper.properties C:\kafka_2.12-2.4\kafka_2.12-2.4.0\bin\windows>zookeeper-server-start config\zookeeper.properties [2020-02-29 17:59:17,354] INFO Reading configuration from: config\zookeeper.properties (org.apache.zookeeper.server.quorum.QuorumPeerConfig) [2020-02-29 17:59:17,365] WARN config\zookeeper.properties is relative. Prepend .\ to indicate that you're sure! (org.apache.zookeeper.server.quorum.QuorumPeerConfig) [2020-02-29 17:59:17,367] ERROR Invalid config, exiting abnormally (org.apache.zookeeper.server.quorum.QuorumPeerMain) org.apache.zookeeper.server.quorum.QuorumPeerConfig$ConfigException: Error processing config\zookeeper.properties         at org.apache.zookeeper.server.quorum.QuorumPeerConfig.parse(QuorumPeerConfig.java:154)         at org.apache.zookeeper.server.quorum.QuorumP...

Selecting different elements in Jquery

For selecting an id field with name mytable we can use $('#mytable') we can also use $('.mytable') If you want to select a row in my table use $('.mytable.tr') if you have to select h1 which is inside a paragraph which is  inside a div $('div.myDiv p h1') To get first row of table $('#myTable tbody tr:first') To select every text box and paragraph $('p,input') Change background of first row $('#meetable tbody tr:first').css('background-color','blue')

"BMXAA4024E - The synonym value REPORT is not valid for the domain REPORTTYPES."

This error occurs in Multilanguage environment. whenever you add a new report and generate request page you can get this error because you have old reports from previous maximo version which are cause problems. What you have to do is delete the no longer required data using steps from IBM page and then regenerate request page for all reports and then run the report.