Search This Blog

Tuesday, February 18, 2020

Joomla ERROR: The archive file is corrupt, truncated or archive parts

Open configuration.php

public $tmp_path = '../tmp';
public $tmp_path = 'tmp';

TO [add slash only]
public $tmp_path = '/tmp';

How to disable warning in Joomla - Continue to Continue 2

Go to Administrator->System menu -> Global Configuration -> Server -> Error reporting -> NONE


Open configuration.php

public $error_reporting = 'none';


fasterxml jackson ObjectMapper produces JSON string with '=' and not ':'

Produces [key=value]
new ObjectMapper ().writerWithDefaultPrettyPrinter ().writeValueAsString ( responseVO.toString() )

Produces {"key":"value"}
new ObjectMapper ().writerWithDefaultPrettyPrinter ().writeValueAsString ( responseVO )

Note : Dont convert toString and pass taht to writeValueAsString ()

Thursday, February 13, 2020

How to Disable WordPress PHP Error Warning Messages - XMAPP


Remove those lines 
define('WP_DEBUG', false);
define('WP_DEBUG_DISPLAY', false);

Paste these lines
ini_set('error_reporting', E_ALL );
define('WP_DEBUG', false);
define('WP_DEBUG_DISPLAY', false);

Tuesday, February 11, 2020

Joomla - You are not authorised to view this resource

1. Basically we are not using the latest version of PHP and Joomla
2. So please download the latest version from joomla 3.9.x
3. Install XAMPP latest in your local 
4. Go to xmapp/htdocs folder,
5. Extract the latest joomla into htdocs [for ex: infovijaysite ]
6. Open it in browser http://localhost/infovijaysite
7. Joomla installation page will come. setup with the new database
8. Remove the installation folder

9. Now check the latest database with your old database. 
    9.1 you can see additionally 10+ tables are newly added in latest joomla version.
    9.2 you can see some of the columns like client_id, package_id, asset_id in few tables. 
    9.3 truncate drv_sessions table  [_session] table.
    9.4 check few table, values also changed from the old to new. possible change that too. I have taken that only table dump from new and replaced with old if the rows are same or more/less.
    9.5 verify each old table columns with new table columns. if any thing added, please add the same in your old database itself. 
    9.6  Keep remember, add those columns in the same table in your old DB and also create those 10+ tables in old DB. 

10. change the old DB name in configuration.php under your folder [ex: infovijaysite ]. 
11. ctrl+f5 or clear cache and refresh your site [point 6].

I have done the same for ma own site, please visit -

Note: But the menu may be looks diff than your old style. but your site is reborn. 

Sunday, February 2, 2020

Java Beanshell - Checkstyle NewlineAtEndOfFile File does not end with a newline. - checkstyle-suppressions.xml ignore lineseparator

Solution 1:

1. Add this line inside tag



    "-//Puppy Crawl//DTD Suppressions 1.1//EN"


Solution 2:

Eclipse ..Window >> Preferences >> Checkstyle >> Select the configuration file >>

Click on "Properties" button >> Uncheck the Protect Checkstyle Configuration file.

Click on "Configure" button >> search for "New Line At End Of File" >> Uncheck the checkbox which you see next to New Line At End Of File.

Thursday, January 30, 2020

Could not install packages due to an EnvironmentError: [WinError 5] Access is denied - Python

pip/pip3 install --upgrade  --user
pip install  --user
else, open CMD in administrator mode, then run the command.

Wednesday, January 22, 2020

Java CMD -D arguments Custom

Note your java class or jar name should be at last and not first before -D.

YES = java -jar -Dfiles=c1 -Dexcludes=va2 filename.jar
NO = java -jar filename.jar -Dfiles=c1 -Dexcludes=va2

In Program
Properties systemProperties = System.getProperties();
System.out.println( systemProperties.get ( "files" ) );
System.out.println( systemProperties.get ( "excludes" ) );

Wednesday, January 15, 2020

Java Stream API - Get Max value from two list.

Double max = -> modellist .stream()
  .collect(Collectors.averagingDouble(model ->
  jarowinklerdistance.apply(model.getCity(), vo.getCity())))

Monday, January 13, 2020

Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean

1. You are missing the @SpringBootApplication annotation on your Start class 
2. ( , args );  
3. in all the area in that java file.

Hit Counter

View My Stats