Categories
Travel

Amazing canal road with lots of twists and turns

This time I have been to an exciting place near my hometown and found this beauty via Google Maps ( Duvva to Bhimavaram) and it has helped in two ways, found a quick route to reach my destination and the road was a canal road, that means we have greenery on both sides of the road.

Read more: How to save money by using Google Maps

Please do check out the google maps route linked here and you can see how steep the curves were. It was great and pleasant drive and I was able to see the sunrise and captured some beautiful moments. Imagine a view where the land is covered with greenery ( paddy fields) and the sky is in light blue colour and sun is just rising up. Well, this is a perfect moment for an individual who loves nature with a pure heart. I am blessed to see this view and thought it would be great to take some videos while I drive. ( This video is captured while I was driving, all safety precautions are taken care off)

Journey Details:

Total journey is about 36km from Duva village to  Bhimavaram city ( West Godavari District, Andhra Pradesh). This route connects small villages in between and has some food joints for a quick snack if you are hungry.  I would suggest to stop by a place where there is some movement rather than a remote place. This entire route goes dead silent after 5 PM and slowly you won’t see any movement at all.

 From Beautiful Route to Scary Route:

This is one of the finest routes where it is excellent in daytime and turns to be dangerous at night as you don’t have street lights. Only lights that I relied upon was my car head lights ( So make sure your car head lights are working absolutely perfect).  I have managed to drive this route accidentally at night and found that to be very scary because there was no light at all and humping sounds that I get to hear from the canal water. I am not sure what it was exactly but it was like a perfect set for a horror movie.

Who can enjoy this ride:
  • People who like to travel to new places and admire nature’s beauty
  • People who like to drive different routes, especially which has more twists and turns
  • All individuals got habituated to city life should be definitely visiting this place
  •  Individuals who have craze for selfies can take selfies near paddy fields
  • Anyone want to enjoy cool breeze and want to spent time  in farms

This ride will definitely be stress buster, please do try and let me know your experience in comments section.

 

Categories
AI & Tech

How to resolve frequent crashes on Eclipse Luna?

Have you ever wondered why your eclipse IDE started behaving cranky and crashes very frequently?

If you are one among many individuals having following questions , we have appropriate solution for you 🙂

  • Eclipse Luna hangs frequently?
  • Eclipse frequently hangs with High CPU usage
  • Eclipse freezes every few minutes
  • Eclipse hangs at startup showing only the splash screen

Then the following tips might help you resolve your issue with the IDE. Let’s take a look at what measures can be taken in an attempt to resolve this issue.

APPROACH-1:

If you’ve recently added any plugin to your eclipse IDE, it is better to run your IDE with –clean argument, as this re-scans the installed plugins on your IDE and rebuilds the cache in ECLIPSE_HOME\configuration folder. It is a better idea to startup your eclipse for the first time after the successful installation of any plugin to clear this and at the same time can also help you resolve any crashes that might happen in future as well (due to the new plugin that you added to eclipse).

The approach here is to add the following parameters at the beginning of your eclipse.ini file and open your eclipse only once with these arguments.

clean
  -clearPersistedState

After the first run of your eclipse with these arguments, this can either be chucked off or be left alone (should you choose to leave it as is, you might face a delayed startup time of your IDE)

APPROACH-2:

If it isn’t any new plugins that you’ve added to your IDE, then it could be something else altogether. In such cases, the following arguments have come handy in most of the situations for me (personally). Add the following parameters and it should fix your IDE issue. Along with the arguments that I’ve added to my eclipse.ini file, I will also share the issue that I faced just so that you can refer to – for your case.

Add the following to your eclipse.ini file:

-vmargs
  -Dosgi.requiredJavaVersion=1.8
  -XX:+UseG1GC
  -XX:+UseStringDeduplication
  -Dosgi.requiredJavaVersion=1.8
  -Xms40m
  -Xmx512m
  -XX:PermSize=64M 
  -XX:MaxPermSize=128M
  -XX:+UseCompressedOops

If it’s Windows 7 the OS that you’re running your IDE on, then the above setting will work just fine. The error details that I promised to share along with the solution follows:

Error screenshot:

Eclipse.ini configuration that I had when I had the issue is as follows:

-clean
-startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20140415-2008.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.200.v20150204-1316
-product
org.eclipse.epp.package.jee.product
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vm
C:\Program Files\Java\jdk1.8.0_111\bin\javaw.exe
--launcher.appendVmargs
-vmargs
-Dosgi.requiredJavaVersion=1.6
-Xms40m
-Xmx512m
-XX:+UseCompressedOops

Error stack-trace:
org.eclipse.m2e.logback.configuration: The org.eclipse.m2e.logback.configuration bundle was activated before the state location was initialized.  Will retry after the state location is initialized.
org.eclipse.m2e.logback.configuration: Logback config file: E:\ProjectWorkspace\.metadata\.plugins\org.eclipse.m2e.logback.configuration\logback.1.5.1.20150109-1820.xml
org.eclipse.m2e.logback.configuration: Initializing logback
Exception in thread "org.eclipse.jdt.internal.ui.text.JavaReconciler" java.lang.OutOfMemoryError: GC overhead limit exceeded
        at org.eclipse.core.runtime.Path.append(Path.java:273)
        at org.eclipse.core.internal.dtree.DeltaDataTree.getChildren(DeltaDataTree.java:540)
        at org.eclipse.core.internal.watson.ElementTree.getChildIDs(ElementTree.java:332)
        at org.eclipse.core.internal.watson.ElementTree.getChildren(ElementTree.java:348)
        at org.eclipse.core.internal.resources.Container.getChildren(Container.java:142)
        at org.eclipse.core.internal.resources.Container.members(Container.java:270)
        at org.eclipse.core.internal.resources.Container.members(Container.java:249)
        at org.eclipse.jdt.internal.core.PackageFragmentRoot.computeFolderChildren(PackageFragmentRoot.java:224)
        at org.eclipse.jdt.internal.core.PackageFragmentRoot.computeFolderChildren(PackageFragmentRoot.java:250)
        at org.eclipse.jdt.internal.core.PackageFragmentRoot.computeFolderChildren(PackageFragmentRoot.java:250)
        at org.eclipse.jdt.internal.core.PackageFragmentRoot.computeFolderChildren(PackageFragmentRoot.java:250)
        at org.eclipse.jdt.internal.core.PackageFragmentRoot.computeFolderChildren(PackageFragmentRoot.java:250)
        at org.eclipse.jdt.internal.core.PackageFragmentRoot.computeFolderChildren(PackageFragmentRoot.java:250)
        at org.eclipse.jdt.internal.core.PackageFragmentRoot.computeFolderChildren(PackageFragmentRoot.java:250)
        at org.eclipse.jdt.internal.core.PackageFragmentRoot.computeFolderChildren(PackageFragmentRoot.java:250)
        at org.eclipse.jdt.internal.core.PackageFragmentRoot.computeChildren(PackageFragmentRoot.java:198)
        at org.eclipse.jdt.internal.core.JavaProjectElementInfo.initializePackageNames(JavaProjectElementInfo.java:253)
        at org.eclipse.jdt.internal.core.JavaProjectElementInfo.getProjectCache(JavaProjectElementInfo.java:226)
        at org.eclipse.jdt.internal.core.JavaProjectElementInfo.newNameLookup(JavaProjectElementInfo.java:291)
        at org.eclipse.jdt.internal.core.JavaProject.newNameLookup(JavaProject.java:2329)
        at org.eclipse.jdt.internal.core.SearchableEnvironment.<init>(SearchableEnvironment.java:59)
        at org.eclipse.jdt.internal.core.SearchableEnvironment.<init>(SearchableEnvironment.java:66)
        at org.eclipse.jdt.internal.core.CancelableNameEnvironment.<init>(CancelableNameEnvironment.java:26)
        at org.eclipse.jdt.internal.core.CompilationUnitProblemFinder.process(CompilationUnitProblemFinder.java:178)
        at org.eclipse.jdt.internal.core.CompilationUnitProblemFinder.process(CompilationUnitProblemFinder.java:271)
        at org.eclipse.jdt.internal.core.ReconcileWorkingCopyOperation.makeConsistent(ReconcileWorkingCopyOperation.java:191)
        at org.eclipse.jdt.internal.core.ReconcileWorkingCopyOperation.executeOperation(ReconcileWorkingCopyOperation.java:90)
        at org.eclipse.jdt.internal.core.JavaModelOperation.run(JavaModelOperation.java:729)
        at org.eclipse.jdt.internal.core.JavaModelOperation.runOperation(JavaModelOperation.java:789)
        at org.eclipse.jdt.internal.core.CompilationUnit.reconcile(CompilationUnit.java:1247)
        at org.eclipse.jdt.internal.ui.text.java.JavaReconcilingStrategy.reconcile(JavaReconcilingStrategy.java:126)
        at org.eclipse.jdt.internal.ui.text.java.JavaReconcilingStrategy.access$0(JavaReconcilingStrategy.java:108)
org.eclipse.swt.SWTException: Widget is disposed
        at org.eclipse.swt.SWT.error(SWT.java:4441)
        at org.eclipse.swt.SWT.error(SWT.java:4356)
        at org.eclipse.swt.SWT.error(SWT.java:4327)
        at org.eclipse.swt.widgets.Widget.error(Widget.java:476)
        at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:348)
        at org.eclipse.swt.widgets.Shell.isVisible(Shell.java:1170)
        at org.eclipse.ui.internal.progress.ProgressManagerUtil.getDefaultParent(ProgressManagerUtil.java:387)
        at org.eclipse.ui.internal.statushandlers.InternalDialog.<init>(InternalDialog.java:154)
        at org.eclipse.ui.internal.statushandlers.WorkbenchStatusDialogManagerImpl.doAddStatusAdapter(WorkbenchStatusDialogManagerImpl.java:260)
        at org.eclipse.ui.internal.statushandlers.WorkbenchStatusDialogManagerImpl.addStatusAdapter(WorkbenchStatusDialogManagerImpl.java:198)
        at org.eclipse.ui.statushandlers.WorkbenchStatusDialogManager.addStatusAdapter(WorkbenchStatusDialogManager.java:158)
        at org.eclipse.ui.statushandlers.WorkbenchErrorHandler.showStatusAdapter(WorkbenchErrorHandler.java:105)
        at org.eclipse.ui.statushandlers.WorkbenchErrorHandler.access$0(WorkbenchErrorHandler.java:98)
        at org.eclipse.ui.statushandlers.WorkbenchErrorHandler$1.run(WorkbenchErrorHandler.java:65)
        at org.eclipse.ui.internal.UILockListener.doPendingWork(UILockListener.java:167)
        at org.eclipse.ui.internal.UISynchronizer$3.run(UISynchronizer.java:165)
        at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
        at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:136)
        at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4147)
        at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3764)
        at org.eclipse.swt.widgets.Display.release(Display.java:3817)
        at org.eclipse.swt.graphics.Device.dispose(Device.java:295)
        at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151)
        at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:648)
        at org.eclipse.equinox.launcher.Main.basicRun(Main.java:603)
        at org.eclipse.equinox.launcher.Main.run(Main.java:1465)
        at org.eclipse.equinox.launcher.Main.main(Main.java:1438)
org.eclipse.swt.SWTException: Widget is disposed
        at org.eclipse.swt.SWT.error(SWT.java:4441)
        at org.eclipse.swt.SWT.error(SWT.java:4356)
        at org.eclipse.swt.SWT.error(SWT.java:4327)
        at org.eclipse.swt.widgets.Widget.error(Widget.java:476)
        at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:348)
        at org.eclipse.swt.widgets.Shell.isVisible(Shell.java:1170)
        at org.eclipse.ui.internal.progress.ProgressManagerUtil.getDefaultParent(ProgressManagerUtil.java:387)
        at org.eclipse.ui.internal.statushandlers.InternalDialog.<init>(InternalDialog.java:154)
        at org.eclipse.ui.internal.statushandlers.WorkbenchStatusDialogManagerImpl.doAddStatusAdapter(WorkbenchStatusDialogManagerImpl.java:260)
        at org.eclipse.ui.internal.statushandlers.WorkbenchStatusDialogManagerImpl.addStatusAdapter(WorkbenchStatusDialogManagerImpl.java:198)
        at org.eclipse.ui.statushandlers.WorkbenchStatusDialogManager.addStatusAdapter(WorkbenchStatusDialogManager.java:158)
        at org.eclipse.ui.statushandlers.WorkbenchErrorHandler.showStatusAdapter(WorkbenchErrorHandler.java:105)
        at org.eclipse.ui.statushandlers.WorkbenchErrorHandler.access$0(WorkbenchErrorHandler.java:98)
        at org.eclipse.ui.statushandlers.WorkbenchErrorHandler$1.run(WorkbenchErrorHandler.java:65)
        at org.eclipse.ui.internal.UILockListener.doPendingWork(UILockListener.java:167)
        at org.eclipse.ui.internal.UISynchronizer$3.run(UISynchronizer.java:165)
        at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
        at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:136)
        at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4147)
        at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3764)
        at org.eclipse.swt.widgets.Display.release(Display.java:3817)
        at org.eclipse.swt.graphics.Device.dispose(Device.java:295)
        at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151)
        at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:648)
        at org.eclipse.equinox.launcher.Main.basicRun(Main.java:603)
        at org.eclipse.equinox.launcher.Main.run(Main.java:1465)
        at org.eclipse.equinox.launcher.Main.main(Main.java:1438)

 

Categories
AI & Tech

How to install MAVEN on your system?

The following article will help you understand the use and step by step installation guide (Maven in 5 minutes)

To set-up MAVEN 3.3.9 on Windows 7 64-bit machine, you could follow the below steps. This should be a piece of cake, if you are doing it all right in the first go itself. To install you would firstly require the MAVEN’s zip file from here, the official MAVEN downloads page

https://maven.apache.org/download.cgi )

  • Once you are able to download MAVEN successfully, you need to set-up the following variables
    • JAVA_HOME
    • M2_HOME
    • MAVEN_HOME
  • To do that, right-click on My Computer –> Properties –> Advanced System Properties –> Environment Variables –> System Variables
  • Click New and then click on Add
  • Considering that you would’ve already set-up your JAVA_HOME environment variable, go ahead and set the following variables:

JAVA_HOME=”YOUR JAVA HOME PATH”

  • M2_HOME and MAVEN_HOME=”YOUR MAVEN HOME PATH”

This should be the folder location where you would’ve unzipped the Maven from the downloaded zip file

The official documentation refers to M2_HOME, but there are programs that refer to MAVEN from MAVEN_HOME environment variable. So to be on a safer side, it is recommended to set these two variables with the same path.

Edit the Path environment Variable and add %M2_HOME%\bin; at the end of the existing path

  • Apply and Close the System Properties
  • Open a new command prompt and type
    • mvn –version

Following will be the message to confirm that MAVEN is successfully installed on your local system:

Categories
AI & Tech

How to resolve Auto Discovery Method Factory Error or Auto Import Method Factory in your newly created Soap UI-Jenkins Job?

If you are on Windows 7 and using SoapUI 5.2.1 or SoapUI 5.3.0 then you might be facing an issue as mentioned below when you running your SoapUI-Jenkins job for the very first time after installation of SoapUI

(or)

If you are Windows 7 and have recently migrated your SoapUI versions from 5.0.0 to 5.2.0 or from 5.2.1 to 5.3.0, then it is most likely that you will end getting the following issue anyway.

Are you not being able to run a SoapUI project via your Jenkins job, getting an error as like this:

11:43:32,432 INFO  [PluginManager] Adding plugin from [C:\Users\jenkins\.soapuios\plugins\readyapi-postman-1.0.1.jar]
11:43:32,432 INFO  [PluginManager] Adding plugin from [C:\Users\jenkins\.soapuios\plugins\ready-mqtt-plugin-dist.jar]
11:43:34,773 ERROR [SoapUI] An error occurred [com.eviware.soapui.plugins.auto.factories.AutoDiscoveryMethodFactory], see error log for details
java.lang.ClassNotFoundException: com.eviware.soapui.plugins.auto.factories.AutoDiscoveryMethodFactory
  at java.net.URLClassLoader$1.run(Unknown Source)
  at java.net.URLClassLoader$1.run(Unknown Source)
  at java.security.AccessController.doPrivileged(Native Method)
  at java.net.URLClassLoader.findClass(Unknown Source)
  at java.lang.ClassLoader.loadClass(Unknown Source)
  at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
  at java.lang.ClassLoader.loadClass(Unknown Source)
  at java.lang.Class.forName0(Native Method)
  at java.lang.Class.forName(Unknown Source)
  at com.eviware.soapui.plugins.LoaderBase.loadAutoFactories(LoaderBase.java:112)
  at com.eviware.soapui.plugins.LoaderBase.loadFactories(LoaderBase.java:80)
  at com.eviware.soapui.plugins.PluginLoader.loadPluginFactories(PluginLoader.java:141)
  at com.eviware.soapui.plugins.PluginLoader.loadPlugin(PluginLoader.java:104)
  at com.eviware.soapui.plugins.PluginLoader.loadPlugin(PluginLoader.java:54)
  at com.eviware.soapui.plugins.PluginManager.doInstallPlugin(PluginManager.java:141)
  at com.eviware.soapui.plugins.PluginManager.access$600(PluginManager.java:43)
  at com.eviware.soapui.plugins.PluginManager$LoadPluginsTask.computeSequentially(PluginManager.java:420)
  at com.eviware.soapui.plugins.PluginManager$LoadPluginsTask.compute(PluginManager.java:377)
  at com.eviware.soapui.plugins.PluginManager$LoadPluginsTask.compute(PluginManager.java:382)
  at com.eviware.soapui.plugins.PluginManager$LoadPluginsTask.compute(PluginManager.java:365)
  at java.util.concurrent.RecursiveTask.exec(Unknown Source)
  at java.util.concurrent.ForkJoinTask.doExec(Unknown Source)
  at java.util.concurrent.ForkJoinWorkerThread.execTask(Unknown Source)
  at java.util.concurrent.ForkJoinPool.scan(Unknown Source)
  at java.util.concurrent.ForkJoinPool.work(Unknown Source)
  at java.util.concurrent.ForkJoinWorkerThread.run(Unknown Source)
11:43:34,779 ERROR [SoapUI] An error occurred [com.eviware.soapui.plugins.auto.factories.AutoImportMethodFactory], see error log for details
java.lang.ClassNotFoundException: com.eviware.soapui.plugins.auto.factories.AutoImportMethodFactory
  at java.net.URLClassLoader$1.run(Unknown Source)
  at java.net.URLClassLoader$1.run(Unknown Source)
  at java.security.AccessController.doPrivileged(Native Method)
  at java.net.URLClassLoader.findClass(Unknown Source)
  at java.lang.ClassLoader.loadClass(Unknown Source)
  at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
  at java.lang.ClassLoader.loadClass(Unknown Source)
  at java.lang.Class.forName0(Native Method)
  at java.lang.Class.forName(Unknown Source)
  at com.eviware.soapui.plugins.LoaderBase.loadAutoFactories(LoaderBase.java:112)
  at com.eviware.soapui.plugins.LoaderBase.loadFactories(LoaderBase.java:80)
  at com.eviware.soapui.plugins.PluginLoader.loadPluginFactories(PluginLoader.java:141)
  at com.eviware.soapui.plugins.PluginLoader.loadPlugin(PluginLoader.java:104)
  at com.eviware.soapui.plugins.PluginLoader.loadPlugin(PluginLoader.java:54)
  at com.eviware.soapui.plugins.PluginManager.doInstallPlugin(PluginManager.java:141)
  at com.eviware.soapui.plugins.PluginManager.access$600(PluginManager.java:43)
  at com.eviware.soapui.plugins.PluginManager$LoadPluginsTask.computeSequentially(PluginManager.java:420)
  at com.eviware.soapui.plugins.PluginManager$LoadPluginsTask.compute(PluginManager.java:377)
  at com.eviware.soapui.plugins.PluginManager$LoadPluginsTask.compute(PluginManager.java:382)
  at com.eviware.soapui.plugins.PluginManager$LoadPluginsTask.compute(PluginManager.java:365)
  at java.util.concurrent.RecursiveTask.exec(Unknown Source)
  at java.util.concurrent.ForkJoinTask.doExec(Unknown Source)
  at java.util.concurrent.ForkJoinWorkerThread.execTask(Unknown Source)
  at java.util.concurrent.ForkJoinPool.scan(Unknown Source)
  at java.util.concurrent.ForkJoinPool.work(Unknown Source)
  at java.util.concurrent.ForkJoinWorkerThread.run(Unknown Source)
11:43:34,815 INFO  [PluginManager] Adding plugin from [C:\Users\jenkins\.soapuios\plugins\ready-uxm-plugin-1.0.1-dist.jar]
11:43:34,850 ERROR [SoapUI] An error occurred [com.eviware.soapui.plugins.auto.factories.AutoDiscoveryMethodFactory], see error log for details
java.lang.ClassNotFoundException: com.eviware.soapui.plugins.auto.factories.AutoDiscoveryMethodFactory
  at java.net.URLClassLoader$1.run(Unknown Source)
  at java.net.URLClassLoader$1.run(Unknown Source)
  at java.security.AccessController.doPrivileged(Native Method)
  at java.net.URLClassLoader.findClass(Unknown Source)
  at java.lang.ClassLoader.loadClass(Unknown Source)
  at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
  at java.lang.ClassLoader.loadClass(Unknown Source)
  at java.lang.Class.forName0(Native Method)
  at java.lang.Class.forName(Unknown Source)
  at com.eviware.soapui.plugins.LoaderBase.loadAutoFactories(LoaderBase.java:112)
  at com.eviware.soapui.plugins.LoaderBase.loadFactories(LoaderBase.java:80)
  at com.eviware.soapui.plugins.PluginLoader.loadPluginFactories(PluginLoader.java:141)
  at com.eviware.soapui.plugins.PluginLoader.loadPlugin(PluginLoader.java:104)
  at com.eviware.soapui.plugins.PluginLoader.loadPlugin(PluginLoader.java:54)
  at com.eviware.soapui.plugins.PluginManager.doInstallPlugin(PluginManager.java:141)
  at com.eviware.soapui.plugins.PluginManager.access$600(PluginManager.java:43)
  at com.eviware.soapui.plugins.PluginManager$LoadPluginsTask.computeSequentially(PluginManager.java:420)
  at com.eviware.soapui.plugins.PluginManager$LoadPluginsTask.compute(PluginManager.java:377)
  at com.eviware.soapui.plugins.PluginManager$LoadPluginsTask.compute(PluginManager.java:365)
  at java.util.concurrent.RecursiveTask.exec(Unknown Source)
  at java.util.concurrent.ForkJoinTask.doExec(Unknown Source)
  at java.util.concurrent.ForkJoinWorkerThread.execTask(Unknown Source)
  at java.util.concurrent.ForkJoinPool.scan(Unknown Source)
  at java.util.concurrent.ForkJoinPool.work(Unknown Source)
  at java.util.concurrent.ForkJoinWorkerThread.run(Unknown Source)
11:43:34,852 ERROR [SoapUI] An error occurred [com.eviware.soapui.plugins.auto.factories.AutoImportMethodFactory], see error log for details
java.lang.ClassNotFoundException: com.eviware.soapui.plugins.auto.factories.AutoImportMethodFactory
  at java.net.URLClassLoader$1.run(Unknown Source)
  at java.net.URLClassLoader$1.run(Unknown Source)
  at java.security.AccessController.doPrivileged(Native Method)
  at java.net.URLClassLoader.findClass(Unknown Source)
  at java.lang.ClassLoader.loadClass(Unknown Source)
  at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
  at java.lang.ClassLoader.loadClass(Unknown Source)
  at java.lang.Class.forName0(Native Method)
  at java.lang.Class.forName(Unknown Source)
  at com.eviware.soapui.plugins.LoaderBase.loadAutoFactories(LoaderBase.java:112)
  at com.eviware.soapui.plugins.LoaderBase.loadFactories(LoaderBase.java:80)
  at com.eviware.soapui.plugins.PluginLoader.loadPluginFactories(PluginLoader.java:141)
  at com.eviware.soapui.plugins.PluginLoader.loadPlugin(PluginLoader.java:104)
  at com.eviware.soapui.plugins.PluginLoader.loadPlugin(PluginLoader.java:54)
  at com.eviware.soapui.plugins.PluginManager.doInstallPlugin(PluginManager.java:141)
  at com.eviware.soapui.plugins.PluginManager.access$600(PluginManager.java:43)
  at com.eviware.soapui.plugins.PluginManager$LoadPluginsTask.computeSequentially(PluginManager.java:420)
  at com.eviware.soapui.plugins.PluginManager$LoadPluginsTask.compute(PluginManager.java:377)
  at com.eviware.soapui.plugins.PluginManager$LoadPluginsTask.compute(PluginManager.java:365)
  at java.util.concurrent.RecursiveTask.exec(Unknown Source)
  at java.util.concurrent.ForkJoinTask.doExec(Unknown Source)
  at java.util.concurrent.ForkJoinWorkerThread.execTask(Unknown Source)
  at java.util.concurrent.ForkJoinPool.scan(Unknown Source)
  at java.util.concurrent.ForkJoinPool.work(Unknown Source)
  at java.util.concurrent.ForkJoinWorkerThread.run(Unknown Source)
11:43:34,861 INFO  [PluginManager] Adding plugin from [C:\Users\jenkins\.soapuios\plugins\soapui-swagger-plugin-2.2-dist.jar]
11:43:37,408 ERROR [SoapUI] An error occurred [com.eviware.soapui.plugins.auto.factories.AutoDiscoveryMethodFactory], see error log for details
java.lang.ClassNotFoundException: com.eviware.soapui.plugins.auto.factories.AutoDiscoveryMethodFactory
  at java.net.URLClassLoader$1.run(Unknown Source)
  at java.net.URLClassLoader$1.run(Unknown Source)
  at java.security.AccessController.doPrivileged(Native Method)
  at java.net.URLClassLoader.findClass(Unknown Source)
  at java.lang.ClassLoader.loadClass(Unknown Source)
  at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
  at java.lang.ClassLoader.loadClass(Unknown Source)
  at java.lang.Class.forName0(Native Method)
  at java.lang.Class.forName(Unknown Source)
  at com.eviware.soapui.plugins.LoaderBase.loadAutoFactories(LoaderBase.java:112)
  at com.eviware.soapui.plugins.LoaderBase.loadFactories(LoaderBase.java:80)
  at com.eviware.soapui.plugins.PluginLoader.loadPluginFactories(PluginLoader.java:141)
  at com.eviware.soapui.plugins.PluginLoader.loadPlugin(PluginLoader.java:104)
  at com.eviware.soapui.plugins.PluginLoader.loadPlugin(PluginLoader.java:54)
  at com.eviware.soapui.plugins.PluginManager.doInstallPlugin(PluginManager.java:141)
  at com.eviware.soapui.plugins.PluginManager.access$600(PluginManager.java:43)
  at com.eviware.soapui.plugins.PluginManager$LoadPluginsTask.computeSequentially(PluginManager.java:420)
  at com.eviware.soapui.plugins.PluginManager$LoadPluginsTask.compute(PluginManager.java:377)
  at com.eviware.soapui.plugins.PluginManager$LoadPluginsTask.compute(PluginManager.java:382)
  at com.eviware.soapui.plugins.PluginManager$LoadPluginsTask.compute(PluginManager.java:365)
  at java.util.concurrent.RecursiveTask.exec(Unknown Source)
  at java.util.concurrent.ForkJoinTask.doExec(Unknown Source)
  at java.util.concurrent.ForkJoinWorkerThread.execTask(Unknown Source)
  at java.util.concurrent.ForkJoinPool.scan(Unknown Source)
  at java.util.concurrent.ForkJoinPool.work(Unknown Source)
  at java.util.concurrent.ForkJoinWorkerThread.run(Unknown Source)
11:43:37,412 ERROR [SoapUI] An error occurred [com.eviware.soapui.plugins.auto.factories.AutoImportMethodFactory], see error log for details
java.lang.ClassNotFoundException: com.eviware.soapui.plugins.auto.factories.AutoImportMethodFactory
  at java.net.URLClassLoader$1.run(Unknown Source)
  at java.net.URLClassLoader$1.run(Unknown Source)
  at java.security.AccessController.doPrivileged(Native Method)
  at java.net.URLClassLoader.findClass(Unknown Source)
  at java.lang.ClassLoader.loadClass(Unknown Source)
  at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
  at java.lang.ClassLoader.loadClass(Unknown Source)
  at java.lang.Class.forName0(Native Method)
  at java.lang.Class.forName(Unknown Source)
  at com.eviware.soapui.plugins.LoaderBase.loadAutoFactories(LoaderBase.java:112)
  at com.eviware.soapui.plugins.LoaderBase.loadFactories(LoaderBase.java:80)
  at com.eviware.soapui.plugins.PluginLoader.loadPluginFactories(PluginLoader.java:141)
  at com.eviware.soapui.plugins.PluginLoader.loadPlugin(PluginLoader.java:104)
  at com.eviware.soapui.plugins.PluginLoader.loadPlugin(PluginLoader.java:54)
  at com.eviware.soapui.plugins.PluginManager.doInstallPlugin(PluginManager.java:141)
  at com.eviware.soapui.plugins.PluginManager.access$600(PluginManager.java:43)
  at com.eviware.soapui.plugins.PluginManager$LoadPluginsTask.computeSequentially(PluginManager.java:420)
  at com.eviware.soapui.plugins.PluginManager$LoadPluginsTask.compute(PluginManager.java:377)
  at com.eviware.soapui.plugins.PluginManager$LoadPluginsTask.compute(PluginManager.java:382)
  at com.eviware.soapui.plugins.PluginManager$LoadPluginsTask.compute(PluginManager.java:365)
  at java.util.concurrent.RecursiveTask.exec(Unknown Source)
  at java.util.concurrent.ForkJoinTask.doExec(Unknown Source)
  at java.util.concurrent.ForkJoinWorkerThread.execTask(Unknown Source)
  at java.util.concurrent.ForkJoinPool.scan(Unknown Source)
  at java.util.concurrent.ForkJoinPool.work(Unknown Source)
  at java.util.concurrent.ForkJoinWorkerThread.run(Unknown Source)
11:43:37,421 INFO  [PluginManager] Adding plugin from [C:\Users\jenkins\.soapuios\plugins\readyapi-swaggerhub-plugin-1.0.jar]
11:43:37,491 ERROR [SoapUI] An error occurred [com.eviware.soapui.plugins.auto.factories.AutoDiscoveryMethodFactory], see error log for details
java.lang.ClassNotFoundException: com.eviware.soapui.plugins.auto.factories.AutoDiscoveryMethodFactory
  at java.net.URLClassLoader$1.run(Unknown Source)
  at java.net.URLClassLoader$1.run(Unknown Source)
  at java.security.AccessController.doPrivileged(Native Method)
  at java.net.URLClassLoader.findClass(Unknown Source)
  at java.lang.ClassLoader.loadClass(Unknown Source)
  at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
  at java.lang.ClassLoader.loadClass(Unknown Source)
  at java.lang.Class.forName0(Native Method)
  at java.lang.Class.forName(Unknown Source)
  at com.eviware.soapui.plugins.LoaderBase.loadAutoFactories(LoaderBase.java:112)
  at com.eviware.soapui.plugins.LoaderBase.loadFactories(LoaderBase.java:80)
  at com.eviware.soapui.plugins.PluginLoader.loadPluginFactories(PluginLoader.java:141)
  at com.eviware.soapui.plugins.PluginLoader.loadPlugin(PluginLoader.java:104)
  at com.eviware.soapui.plugins.PluginLoader.loadPlugin(PluginLoader.java:54)
  at com.eviware.soapui.plugins.PluginManager.doInstallPlugin(PluginManager.java:141)
  at com.eviware.soapui.plugins.PluginManager.access$600(PluginManager.java:43)
  at com.eviware.soapui.plugins.PluginManager$LoadPluginsTask.computeSequentially(PluginManager.java:420)
  at com.eviware.soapui.plugins.PluginManager$LoadPluginsTask.compute(PluginManager.java:377)
  at com.eviware.soapui.plugins.PluginManager$LoadPluginsTask.compute(PluginManager.java:365)
  at java.util.concurrent.RecursiveTask.exec(Unknown Source)
  at java.util.concurrent.ForkJoinTask.doExec(Unknown Source)
  at java.util.concurrent.ForkJoinWorkerThread.execTask(Unknown Source)
  at java.util.concurrent.ForkJoinPool.scan(Unknown Source)
  at java.util.concurrent.ForkJoinPool.work(Unknown Source)
  at java.util.concurrent.ForkJoinWorkerThread.run(Unknown Source)
11:43:37,494 ERROR [SoapUI] An error occurred [com.eviware.soapui.plugins.auto.factories.AutoImportMethodFactory], see error log for details
java.lang.ClassNotFoundException: com.eviware.soapui.plugins.auto.factories.AutoImportMethodFactory
  at java.net.URLClassLoader$1.run(Unknown Source)
  at java.net.URLClassLoader$1.run(Unknown Source)
  at java.security.AccessController.doPrivileged(Native Method)
  at java.net.URLClassLoader.findClass(Unknown Source)
  at java.lang.ClassLoader.loadClass(Unknown Source)
  at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
  at java.lang.ClassLoader.loadClass(Unknown Source)
  at java.lang.Class.forName0(Native Method)
  at java.lang.Class.forName(Unknown Source)
  at com.eviware.soapui.plugins.LoaderBase.loadAutoFactories(LoaderBase.java:112)
  at com.eviware.soapui.plugins.LoaderBase.loadFactories(LoaderBase.java:80)
  at com.eviware.soapui.plugins.PluginLoader.loadPluginFactories(PluginLoader.java:141)
  at com.eviware.soapui.plugins.PluginLoader.loadPlugin(PluginLoader.java:104)
  at com.eviware.soapui.plugins.PluginLoader.loadPlugin(PluginLoader.java:54)
  at com.eviware.soapui.plugins.PluginManager.doInstallPlugin(PluginManager.java:141)
  at com.eviware.soapui.plugins.PluginManager.access$600(PluginManager.java:43)
  at com.eviware.soapui.plugins.PluginManager$LoadPluginsTask.computeSequentially(PluginManager.java:420)
  at com.eviware.soapui.plugins.PluginManager$LoadPluginsTask.compute(PluginManager.java:377)
  at com.eviware.soapui.plugins.PluginManager$LoadPluginsTask.compute(PluginManager.java:365)
  at java.util.concurrent.RecursiveTask.exec(Unknown Source)
  at java.util.concurrent.ForkJoinTask.doExec(Unknown Source)
  at java.util.concurrent.ForkJoinWorkerThread.execTask(Unknown Source)
  at java.util.concurrent.ForkJoinPool.scan(Unknown Source)
  at java.util.concurrent.ForkJoinPool.work(Unknown Source)
  at java.util.concurrent.ForkJoinWorkerThread.run(Unknown Source)
11:43:38,450 ERROR [SoapUI] An error occurred [com.eviware.soapui.plugins.auto.factories.AutoDiscoveryMethodFactory], see error log for details
java.lang.ClassNotFoundException: com.eviware.soapui.plugins.auto.factories.AutoDiscoveryMethodFactory
  at java.net.URLClassLoader$1.run(Unknown Source)
  at java.net.URLClassLoader$1.run(Unknown Source)
  at java.security.AccessController.doPrivileged(Native Method)
  at java.net.URLClassLoader.findClass(Unknown Source)
  at java.lang.ClassLoader.loadClass(Unknown Source)
  at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
  at java.lang.ClassLoader.loadClass(Unknown Source)
  at java.lang.Class.forName0(Native Method)
  at java.lang.Class.forName(Unknown Source)
  at com.eviware.soapui.plugins.LoaderBase.loadAutoFactories(LoaderBase.java:112)
  at com.eviware.soapui.plugins.LoaderBase.loadFactories(LoaderBase.java:80)
  at com.eviware.soapui.plugins.PluginLoader.loadPluginFactories(PluginLoader.java:141)
  at com.eviware.soapui.plugins.PluginLoader.loadPlugin(PluginLoader.java:104)
  at com.eviware.soapui.plugins.PluginLoader.loadPlugin(PluginLoader.java:54)
  at com.eviware.soapui.plugins.PluginManager.doInstallPlugin(PluginManager.java:141)
  at com.eviware.soapui.plugins.PluginManager.access$600(PluginManager.java:43)
  at com.eviware.soapui.plugins.PluginManager$LoadPluginsTask.computeSequentially(PluginManager.java:420)
  at com.eviware.soapui.plugins.PluginManager$LoadPluginsTask.compute(PluginManager.java:377)
  at com.eviware.soapui.plugins.PluginManager$LoadPluginsTask.compute(PluginManager.java:382)
  at com.eviware.soapui.plugins.PluginManager$LoadPluginsTask.compute(PluginManager.java:365)
  at java.util.concurrent.RecursiveTask.exec(Unknown Source)
  at java.util.concurrent.ForkJoinTask.doExec(Unknown Source)
  at java.util.concurrent.ForkJoinWorkerThread.execTask(Unknown Source)
  at java.util.concurrent.ForkJoinPool.scan(Unknown Source)
  at java.util.concurrent.ForkJoinPool.work(Unknown Source)
  at java.util.concurrent.ForkJoinWorkerThread.run(Unknown Source)
11:43:38,453 ERROR [SoapUI] An error occurred [com.eviware.soapui.plugins.auto.factories.AutoImportMethodFactory], see error log for details
java.lang.ClassNotFoundException: com.eviware.soapui.plugins.auto.factories.AutoImportMethodFactory
  at java.net.URLClassLoader$1.run(Unknown Source)
  at java.net.URLClassLoader$1.run(Unknown Source)
  at java.security.AccessController.doPrivileged(Native Method)
  at java.net.URLClassLoader.findClass(Unknown Source)
  at java.lang.ClassLoader.loadClass(Unknown Source)
  at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
  at java.lang.ClassLoader.loadClass(Unknown Source)
  at java.lang.Class.forName0(Native Method)
  at java.lang.Class.forName(Unknown Source)
  at com.eviware.soapui.plugins.LoaderBase.loadAutoFactories(LoaderBase.java:112)
  at com.eviware.soapui.plugins.LoaderBase.loadFactories(LoaderBase.java:80)
  at com.eviware.soapui.plugins.PluginLoader.loadPluginFactories(PluginLoader.java:141)
  at com.eviware.soapui.plugins.PluginLoader.loadPlugin(PluginLoader.java:104)
  at com.eviware.soapui.plugins.PluginLoader.loadPlugin(PluginLoader.java:54)
  at com.eviware.soapui.plugins.PluginManager.doInstallPlugin(PluginManager.java:141)
  at com.eviware.soapui.plugins.PluginManager.access$600(PluginManager.java:43)
  at com.eviware.soapui.plugins.PluginManager$LoadPluginsTask.computeSequentially(PluginManager.java:420)
  at com.eviware.soapui.plugins.PluginManager$LoadPluginsTask.compute(PluginManager.java:377)
  at com.eviware.soapui.plugins.PluginManager$LoadPluginsTask.compute(PluginManager.java:382)
  at com.eviware.soapui.plugins.PluginManager$LoadPluginsTask.compute(PluginManager.java:365)
  at java.util.concurrent.RecursiveTask.exec(Unknown Source)
  at java.util.concurrent.ForkJoinTask.doExec(Unknown Source)
  at java.util.concurrent.ForkJoinWorkerThread.execTask(Unknown Source)
  at java.util.concurrent.ForkJoinPool.scan(Unknown Source)
  at java.util.concurrent.ForkJoinPool.work(Unknown Source)
  at java.util.concurrent.ForkJoinWorkerThread.run(Unknown Source)

Then in such case, the solution to the problem is pretty simple. Follow the steps given below to resolve your issue:

If you are running SoapUI version 5.2.1 or 5.3.0 (I found this issue on both the versions listed just earlier), the problem is with the default plugins installed under “C:\Users\<user name>.soapuios\plugin“.

  • For SoapUI 5.2.1, there are 4 plugins that are installed in this directory:
    • readyapi-swaggerhub-plugin-1.0.jar
    • ready-mqtt-plugin-dist.jar
    • ready-uxm-plugin-1.0.1-dist.jar
    • soapui-swagger-plugin-2.2-dist.jar
  • For SoapUI 5.3.0, there are 5 plugins that are installed in this directory:
    • readyapi-postman-1.0.1.jar
    • readyapi-swaggerhub-plugin-1.0.jar
    • ready-mqtt-plugin-dist.jar
    • ready-uxm-plugin-1.0.1-dist.jar
    • soapui-swagger-plugin-2.2-dist.jar

You can resolve your issue (for any version of SoapUI listed above) by just renaming the original folder ‘plugins‘ to ‘plugins_NOTUsed‘ (or any other name of your choice). You might be thinking, by just renaming this folder how the actual problem has been solved – To explain this, it is just so that default plugins could be forced to be hidden during runtime and hence the problem doesn’t arise anymore.

Categories
AI & Tech

How to use Pivot in MicroSoft SQL Server

Following a lot of questions on the internet, how to convert rows of a table to depict as columns of a table and also on how to use a PIVOT in SQL Server – here is an attempt to showcase the same on MS SQL Server 2012

 

Read more: How to edit top 200 rows in SQL

So let us start with a scenario which is simple enough for the basic understanding.

How to use Pivot in Microsoft SQL Server

Consider a table that stores User Vs Privilege mapping, where we query for a particular USER and get to identify the PRIVILEGEs that he has, here’s the CREATE TABLE script for the same.

CREATE TABLE USER_PRIVILEGES(
  USER_PRIVILEGE_ID INT IDENTITY(1,1),
  USERNAME VARCHAR(25),
    PRIVILEGE VARCHAR(25)
   PRIMARY KEY(USER_PRIVILEGE_ID)
);

 Considering the above, let’s fill it up with some data to work on the example under discussion. The INSERT scripts are as follows, if you want to use them instead of writing them all by yourself:

INSERT INTO USER_PRIVILEGES VALUES('Tim Cook', 'Read')
INSERT INTO USER_PRIVILEGES VALUES('Satya Nadella', 'Read')
INSERT INTO USER_PRIVILEGES VALUES('Satya Nadella', 'Write')
INSERT INTO USER_PRIVILEGES VALUES('Mark Zuckerberg', 'Read')
INSERT INTO USER_PRIVILEGES VALUES('Mark Zuckerberg', 'Write')
INSERT INTO USER_PRIVILEGES VALUES('Mark Zuckerberg', 'Read/Write')
INSERT INTO USER_PRIVILEGES VALUES('Warren Buffet', 'Read')
INSERT INTO USER_PRIVILEGES VALUES('Warren Buffet', 'Write')
INSERT INTO USER_PRIVILEGES VALUES('Warren Buffet', 'Read/Write')
INSERT INTO USER_PRIVILEGES VALUES('Warren Buffet', 'Administrator')
INSERT INTO USER_PRIVILEGES VALUES('Steve Jobs', 'Read')
INSERT INTO USER_PRIVILEGES VALUES('Steve Jobs', 'Write')
INSERT INTO USER_PRIVILEGES VALUES('Steve Jobs', 'Read/Write')
INSERT INTO USER_PRIVILEGES VALUES('Steve Jobs', 'Administrator')
INSERT INTO USER_PRIVILEGES VALUES('Steve Jobs', 'SuperUser')

Now if we do a SELECT, we will be able to see the flat data as follows:

This is a lot of data that can get growing on a day to day basis, and could be hard to get to know the number of Users who have the particular PRIVILEGE which you are interested in and having said that, on a day-to-day basis the number of PRIVILEGES that could be offered to the users can also grow.

This simple PL/SQL should do the trick, to convert your ROWS to COLUMNS and represent the same data in a total different view for your to refer.

DECLARE @columns AS NVARCHAR(MAX),
        @query AS NVARCHAR(MAX)

SELECT @columns = STUFF((SELECT DISTINCT ',[' + privilege +']'
                         FROM user_privileges 
          FOR XML PATH(''), TYPE).value('.', 'NVARCHAR(MAX)') ,1, 1, '')

SET @query = 'SELECT username,' + @columns + ' FROM 
              (
                SELECT username, privilege, 1 as xCount FROM user_privileges
              ) x
              PIVOT 
              (
                count(xCount)
                FOR privilege IN (' + @columns + ')
              ) p
    ORDER BY username DESC'

EXECUTE(@query);

 On executing the above piece of PL/SQL code, you’ll be able to see that data has been reformatted to the following:

Hope that you are able to benefit from this post.Keep checking for more and more fun to do activities, concepts and technical queries on this space.

Categories
AI & Tech

How to generate Client side Java Client using Swagger Codegen?

Swagger (hyperlink to this site http://swagger.io) provides the most simple, yet powerful representation of your API’s. Most of the cases what you would want to do after generating a thorough set of API’s is to have a simple Java client to access these – and Swagger comes to rescue here, by providing an open source tool just to do that.

Here in this article, we would be using Swagger Codegen tool to generate our Client side code. You can simply download the Swagger Codegen zip file from this location (link to this site https://github.com/swagger-api/swagger-codegen)

Open the link and then click on the green coloured button ‘Clone or download’ and from the drop-down click on ‘Download Zip’.

How to build Swagger Codegen?

After downloading the source zip file from the site above, you would have to build this project. You could use either ANT or MAVEN to build the project, but the downloaded file is a MAVEN project. Hence there is a prerequisite that you need to have MAVEN installed and configured on the system.

Now with all the pre-requisite being handled and answered, let’s get down to business in building the Swagger Codegen project that you’ve downloaded in the last step.

  • Extract the zip file to a location which you would be referring to from a command line tool
  • Fire the following command to on a command prompt to build the project
  • mvn package

 

How to generate Client-side code using Swagger Codegen?

The above step would download all the requisite dependencies on to your local system, which is something that MAVEN handles on its own. Along with the dependencies, it will also generate the needed modules under this directory which will be used in the steps below. With the above step done, you’ll need to follow the steps below to get the client-side code generated using Swagger Codegen.

  • There are a plenty of supported languages to choose from (like Clojure, Groovy, Haskell, Java) but I will try to keep this article targeted to be used with JAVA.
  • With the choice made above, all you need to have is a YAML or a JSON input file, which would be used to represent the API using Swagger.
  • You can take any of the sample YAML/JSON files provided by Swagger themselves, or write your own YAML by hand and use the same as the input
    • You can use Swagger editor (link to this site: http://editor.swagger.io/#/) to write your own YAML / JSON input files.
    • If you decide to go by having your own YAML / JSON input file, then this Swagger specifications (link to this site: http://swagger.io/specification/) should be followed with due respect.
  • From the same location as above, fire the command below:
    • This command will work if you are using any of the sample YAML / JSON files provided by Swagger itself
    • java -jar modules/swagger-codegen-cli/target/swagger-codegen-cli.jar generate
      
              -i http://petstore.swagger.io/v2/swagger.json
      
              -l java
      
              -o samples/client/petstore/java

       

 

  • The following command will work if you are using any of your own input YAML file to generate client-side code with an assumption that the YAML file is placed under the folder structure shown in the command below.
  • java -jar modules/swagger-codegen-cli/target/swagger-codegen-cli.jar generate
    
            -i modules/swagger-codegen-cli/target/sample_api.yaml
    
            -l java
    
            -o samples/client/java
    
    

     

    Choose whichever the case as you like and it will generate a java project with the package structure as mentioned in the command above with the -o

How to use the generated client-side code?

Now that the toughest part of the task being completed, you could use the generated client side code in whichever way that you wish.

  • You could import this code as a Java project into any IDE of your choice or you could very well zip the project as a JAR and ship to it whoever wants to gain access to your API’s that are generated.
  • If you take a look into the code that has been created, you would find a package named ‘io.swagger.client.api’ and under which you’d find 3 classes. Using these you would be able to do whatever you want with the API specification that you have.
  • A sample code to say update a pet and display it’s name can be done using the following code.
package io.swagger.test;

import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

import org.w3c.dom.ls.LSException;

import io.swagger.client.ApiException;
import io.swagger.client.api.*;

public class test 
{
  public static void main(String[] args) throws IOException
  {
    List<String> status = new ArrayList<String>();
    status.add("sold");
    PetApi pet = new PetApi();

    try 
    {
      pet.updatePetWithForm("1", "nicky", "available");
      System.out.println(pet.getPetById((long) 1).getName());
    }
    catch (ApiException e) 
    {
      e.printStackTrace();
    }
  }
}

 

 

Categories
Mobile

How to Turn off the Badge Count for Single App

With the help of the technology and mobile apps evolution, spreading information or marketing about a brand or product has been very simple and also proved to be very economical, unlike the traditional SMS where the user has to no control over the Inbox and it is cluttered with different messages and doesn’t have any segregation.


With the help of mobile application, information is pushed to their devices by the vendors and it is all available within the mobile application. All these notifications are cluttered and they are all placed in notification tray for the mobile application and it is handy for the user and can check at ease. What if these notifications are not taken care off, obviously they pile up. When they are not checked at proper intervals the number goes up and the badge count looks ridiculous. Also ending up taking a lot of memory, reducing the battery life (iPhone Charging)

What is badge count?

Badge count is the number of un-noticed or not read messages/notifications within the single application. This is a reminder for the user and provokes him or her to check their messages and be up-to-date with offers or product launches. Usually, this is displayed next to the app icon and the number is highlighted in the red circle.

How to Turn off the Badge Count?

To turn off the badge count for a specific application:

  • Go to Settings on your iPhone (Full Review)
  • Tap on Notifications section on the screen
  • A list of all installed applications is displayed within this screen.

  • Tap on the application where you want to turn off the badge count.

  • Look for Badge count Info section and turn off that section.
We have selected Jabong mobile application to show this trick and its results . 

One has to follow the above process and trick works perfectly 🙂

 

You can apply this trick to the multiple applications according to your necessity. By doing this user will still receive notifications but the outstanding number is not displayed in badge count.

 What is the use of  Deactivating Badge Count?

  • Well, this is just an option that one can prefer and they can have a cleaner Home screen rather than cluttered with badge counts. Imagine this for all the applications installed.
  • It is useful within festive seasons, businesses generally pound on promoting their products to increase their sales during festive seasons.
  • It is another option that a user can try

 

 

Categories
How To

How to Avoid Stress: 8 Best ways to reduce your stress level

How to Avoid Stress: 8 Best ways to reduce your stress level

At some point or the other, each and every individual has already experienced it. It has various factors associated, call it a busy and mechanical lifestyle, living in a concrete jungle, lack of healthy lifestyle and the list goes on and on. To be honest there is article will definitely help you to give some quick tips to manage your stress.

1.   Concentrate on your surroundings:

We humans have an absolute power to think and analyze stuff when compared to other living beings. Concentrate on the different sounds that come from your surroundings and try to frame a tune for the same. This will help you to divert your mind and also helps you to be creative.If you have your mobile phone handy, then you can prefer listening to your own song collection but this is more routine and doesn’t add any value to yourself improvement. It is just a choice for the individual, ultimately listening to music will definitely reduce the stress levels.

2.   Talk to a friend

Talking to your old buddies while you’re stressed is definitely a good option and it will definitely reduce the stress for an individual. Based on the discussion you might end up meeting up for a drink after work or plan for a get together over the weekend, which is always good and also gives you a break from the mechanical life.

3.  Talk yourself through it

Stress can be a devil sometimes and it is really bad and gets you act up cranky. In this situations talking to yourself is the best option rather than relying on anyone else. One has to calm his mind by telling himself about the situation and it is going to last temporarily and motivate yourself to look at brighter side of life.

4.  Eat right

Stress is a beast altogether and there is no definite reason why an individual is stressed out. It can be your lifestyle and eating habits. If you are not eating right you are not providing necessary protein and nutrients to your body and ultimately leads to a lot of side effects, one being stress.

In this busy schedule, people often tend to lose motivation and always look for a quick bite and most of the time it’s not healthy food. If you can inculcate a habit of including vegetables and fruits in your diet, it will be helpful.

5.  Laugh it off

Laughter is one of the best medicines in the world, it releases endorphins which improves your mood and decreases the stress levels of an individual by balancing cortisol and adrenaline hormones. Watching kids is the best thing an individual can get and one can enjoy with a pure heart. Most of the time I tend to watch standup comedy series on YouTube. If you are not sure but want to laugh then I would suggest you go to YouTube and search for funny videos and I can bet you will never be bored again.

6.  Take a small Break:

Sometimes continuous efforts doesn’t yield results, one has to give small breaks to make sure you are giving enough time for yourself and calm your thoughts. This will help you to be fresh for rest of your day work and also these small breaks will help you get creative ideas about your existing tasks or unfinished work and in fact you end up planning perfectly.

7.  Quick Exercises

Exercise doesn’t necessarily mean powerlifting at the gym or training for a marathon. A short walk around the office or simply standing up to stretch during a break at work can offer immediate relief in a stressful situation. Getting your blood moving releases endorphins and can improve your mood almost instantaneously.

Among us we have a common myth that exercises are only done at Gym and powerlifting is the only exercise but it not true. A minute walk can also be considered as a small exercise and simple stretches help you to reduce your stress levels. A simple breathing exercise, it can be done at your work desk and you don’t need any tool or equipment to exercise.

8.  Sleep well

Lack of sleep is another major contributor which is the primary cause of stress. It is evident that if you are not sleeping well then your body and brain is not rejuvenated for next day activities. So we recommend you to visit a doctor if you are having sleeping disorders and also make sure no electronic devices are available near your bed. We recommend having your phone in silent mode while sleeping as this won’t disturb your sleep. Based on your needs one can adjust the settings and make sure you can have sound sleep.

Well, these are few tips that can help you manage your stress levels better but also practicing and mastering these techniques will yield better results. Hope you all have a stress free life 🙂

Also Read about:

Top 8 Benefits of Drinking Coffee

How to reduce the effects of Technology on your Children

Categories
How To

How to Plan your budget carefully?

A person can be defined by the people around him like friends, colleagues, family, etc. It is not always necessary for them to have a similar attitude and mentality like yours. Ultimately, they have an impact on your lifestyle.

This article will help talk about ” How to Plan your budget carefully“?

In general, every person is likely to have and get to meet people from different classes of life. All that matters is who are you getting influenced by! Are your friends or family acting like your motivators or role models?? Are they having any impact in your life?

How to plan your budget carefully

I say very a few are able to differentiate good amongst the bad. We must frame certain limits which we are never going to cross no matter what or who forces you because it will ultimately show its impact on you. Having more number of people in your life is not valued when compared to the kind of people you have.

You have to be very cautious while selecting people you hang out with especially when you are on a plan of saving money. Life is just not the same always, it’s never too late to set a limit on the money you are going to spend.

Here are a few tips you can follow if you want to live a happy budget-conscious life:

If you have more of partiers in your group then you are likely to spend more, to reduce the count and start hanging out with people who are economical.

Create an opportunity:

Try out part-time jobs by which you stay focused on work, indulge in new things, meet new people which result in making money at the same time.

Be a Planner:
How to Plan your budget carefully

There certainly have to be someone to take the initiative of coming up with ideas when you plan for a get-together or like. Why don’t you be the person? By doing so, you can set a plan which you want and is reasonable. This will develop your organizing and managing skills which are good for an individual.

Introduce new ideas:

Suggest potluck parties which are fun, wallet-friendly and are trending too. You can always put on some extra efforts of making it more exciting by coming forward with different games, fun activities and etc. Instead of partying Friday nights you can save the money and plan for cycling on a Sunday morning. This is much more relaxing, it will be fun if your friends join you.

Budgeting is fun:

Budgeting is not about restricting the way you live or would love to. It’s just about priorities and making best of what you have. It’s about focussing on long-term goals by giving up on few short-term one. Well, planned budgeting is nothing but investing in a better future.

Planning out any activity that involves nature is fun and inexpensive say it be trekking. Form a clutch, pack your bags and go over. Trust me it will be one of the best low budget trips you might ever have.

Be a self Accountant:
How to plan your budget carefully

Maintain a record of what you have earned, mark your own target, let the month go. See what you are left with it at the end. By doing this you can have a focus on how much is left and can plan accordingly for the next month and the next and the next. Mentoring kids about these aspects of their children is very important and we need to educate them about these aspects  (Facts with the kids)

Involve your spouse:

If you are married involve your spouse in planning and maintaining your budget cause there is no better person to understand you better than your spouse.

Never ever hide your budget near your spouse or kids, if you have any. Cause they are your family and every decision of yours will certainly impact them too.

Express yourself:

Many at times you get carried away by your friends or people around you. Believe me or not your friend’s behavior and emotion will have an impact on you. You tend to imitate those you are surrounded by.

How to plan your budget carefully

If you are a social activist you will definitely have many events coming now and then. You must be very sure while picking up the events you are going to spend on. Ask few questions before saying yes to any event. What is the event about? Are you getting any benefit from it? How much are they charging to attend the event? Is it worth spending for such event? Don’t you get other opportunities attending similar events?

All in all, it is all laid back to the individual, one has to understand and make their own decisions and it is one of the qualities that the individual has to develop through experiences. If you are still lost and didn’t match your goals then you must follow 50 30 20 budget rule.

So what is 50 30 20 budget rule?

So 50 30 20 budget rule is nothing but your entire net income for the month is divided into three categories of expenses. So let’s understand this in a bit more detail:

50% of your net income for the month should be allocated for your needs.  This amount should be exactly met and no extra amount should be used to fulfill the need. You have to be very strict in terms of controlling your needs. Basically, need vs necessity should be evaluated.  Need is something that is good to have. Necessity is something that is necessary for survival.

So the next 30% of your net income for the month should be allocated for your wants. This can include savings or can be accumulated for your long-term goals. This 30% is something that you can save or you can spend based on your want list. This is extremely important and one should be very cautious about what they are going for.

Rest of 20% of your net income for the month should be allocated for your loans and debt repayments. This amount should be limited to only 20% of your net income. So we advise staying away from the EMI based product buying options.  Initially,  the offer looks attractive but your monthly debt repayment amount will be significantly increased and after some time it becomes a burden.

This article is focused on teenagers and newly married couples and to the matter of the fact anyone who is looking to save money.

 

Categories
How To

How to reduce the effects of Technology on your children?

How to reduce the effects of Technology on your children?

Well, it is a big topic to deal with. First, let’s recap what we as parents are doing on daily basis and by end of the article we will be able to understand and list different ways to reduce the effects of technology on our children.

We feel proud to say that we are getting technologically advanced day by day. Acceptance of which started showing its other side. We want everything to be automated and equipped no matter it be a normal pen or plane. With no wonder, we can call it an era of Artificial Intelligence.There was a time when people expected robots to replace the human. Recently, there came a news stating that robots are ready to get implemented.

Did we ever wonder about the impact these advancements are going to leave us or on our future generations?

We find kids using all types of gadgets and feel proud to see them using these with an ease. Mobile phones, iPad’s, tablets, etc. available in the market and most of the kids want them these days.
It is a good sign if they use it for their benefit but do you think that is really happening? I would say a big no to it

Let me tell you why I said no to the above statement:

How are your kids doing their projects or home works?

Answer: By browsing the internet.
How did we do?
Answer: by thinking, referring to other books.

By this, we can say that they have stopped to put efforts on thinking and working on their own home works. Wherein, parents feel proud to say that their kid scored the highest.

Kids get tantalized towards video games available online or by play stations. There are many applications freely available over the internet which get installed in less than a minute. Parents show the same to their kids which results in a situation where they lose motivation to go out and play. With this, they stop interacting with people other than family and school friends. We can see this change already happening around us.

We as kids were forced to stay home to study and do our home works when we wanted to go out and play. We used to have gangs, random talks, all other memories.

Do the kids of this generation have those?     Not really!!

All that they have is a limited group of friends, gadgets and four walls.
Are they making memories? No!
How is a two-year-old kid able to operate the phone?

Because they see their parents operating the same. Parents are first teachers of the child. Every act of the parent whether positive or negative will have the same effect on their kids. They operate fan, light, AC etc. from their phones. Kids see and learn the same. They become lazy as they don’t even move from the place they are for minimum things. This will have a very bad health effects in the near future while the kid is growing.

As a firm believer in the saying “whatever you give will come back to you” it is just the same here. Your kid is your reflection. You do well he will just do the same. They see what their parents show. Their growth depends on the surroundings he is in. Firstly it is the responsibility of the parents to mold and guide them. As the parents can’t always be there beside the kid their motivation does all the magic. Every situation that a kid comes across has two ways, good and bad. So the way he is raised is all that matters.
At the age of two where very few kids start talking, now started operating gadgets.

Giving freedom to choose their life is only thing parents can give. Giving whatever they ask for makes them stubborn and overhasty. It is no wonder that 8 out of 10 kids at the age of five or six say that they are in love. How can a kid know what is love? That sounds crazy, isn’t it?

They learn from what they see. That is pictures, TV shows, etc. There should be some restrictions on where you take the kids and what you show them. To all those parents who party late night, booze and get back home. Beware your kid is watching you.

Kids have more grasping power when compared to elders. We think they don’t pay attention to what they see or listen. The fact is everything they see and listen at their early age gets registered in their brain.

We as grownups have to know that we are been watched every moment and our kids are learning the same. To be a responsible parent one has to motivate their kids to gel with others and encourage them to play outdoors and from time to time if your budget permits then we would suggest organizing small parties for the kids where they can meet and play outdoors.

If you are a parent and observed this on daily basis then you should definitely implement a change in your lifestyle. Your kid is watching you and learning passively from you.

Exit mobile version