January 28, 2014

Authentication Token is required to trigger the Jenkins Jobs Remotely

This article focuses on triggering the Jenkins Job remotely in 1.499 and the issue faced when upgraded to 1.546.

With Jenkins 1.499, GET method was used to invoke the URL http://JenkinsURL/job/JOBNAME/buildWithParameters?param1=value1&param2=value2

With the latest version of Jenkins (say 1.546), the trouble started while triggering the Jenkins jobs remotely as Jenkins is looking for POST rather than GET method and giving below error message,


Further research fetched some light through the below  URL that an authentication token that needs to be passed to the Jenkins job as shown in the below screen shot and it has helped to resolve the issue.


 
So the updated URL with Authentication Token for POST method is  http://JenkinsURL/job/JOBNAME/buildWithParameters?param1=value1&param2=value2&token=build

January 15, 2014

Multijob Plugin throws NoClassDefFoundError without Parameter Plugin

If you install a multi-job plugin 1.7 on Jenkins 1.499 without Parameter plugin, you will get NoClassDefFoundError (as mentioned below), while creating a multi-job and saving it.

So while installing any plugin, make sure to install all the required dependant plugins.

Status Code: 500

Exception: java.lang.NoClassDefFoundError: hudson/plugins/parameterizedtrigger/AbstractBuildParameters$DontTriggerException
Stacktrace:

javax.servlet.ServletException: java.lang.NoClassDefFoundError: hudson/plugins/parameterizedtrigger/AbstractBuildParameters$DontTriggerException

        at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:615)
        at org.kohsuke.stapler.Stapler.invoke(Stapler.java:658)
        at org.kohsuke.stapler.MetaClass$6.doDispatch(MetaClass.java:241)
        at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
        at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:573)
        at org.kohsuke.stapler.Stapler.invoke(Stapler.java:658)
        at org.kohsuke.stapler.Stapler.invoke(Stapler.java:487)
        at org.kohsuke.stapler.Stapler.service(Stapler.java:164)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:45)
        at winstone.ServletConfiguration.execute(ServletConfiguration.java:248)
        at winstone.RequestDispatcher.forward(RequestDispatcher.java:333)
        at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:376)
        at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:95)
        at hudson.plugins.greenballs.GreenBallFilter.doFilter(GreenBallFilter.java:58)
        at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:98)
        at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:87)
        at winstone.FilterConfiguration.execute(FilterConfiguration.java:194)
        at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:366)
        at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:47)
        at winstone.FilterConfiguration.execute(FilterConfiguration.java:194)
        at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:366)
        at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
        at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76)
        at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:164)
        at winstone.FilterConfiguration.execute(FilterConfiguration.java:194)
        at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:366)
        at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:50)
        at winstone.FilterConfiguration.execute(FilterConfiguration.java:194)
        at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:366)
        at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:81)
        at winstone.FilterConfiguration.execute(FilterConfiguration.java:194)
        at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:366)
        at winstone.RequestDispatcher.forward(RequestDispatcher.java:331)
        at winstone.RequestHandlerThread.processRequest(RequestHandlerThread.java:215)
        at winstone.RequestHandlerThread.run(RequestHandlerThread.java:138)
        at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
        at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
        at java.util.concurrent.FutureTask.run(Unknown Source)
        at winstone.BoundedExecutorService$1.run(BoundedExecutorService.java:77)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NoClassDefFoundError: hudson/plugins/parameterizedtrigger/AbstractBuildParameters$DontTriggerException
        at java.lang.Class.getDeclaredFields0(Native Method)
        at java.lang.Class.privateGetDeclaredFields(Unknown Source)
        at java.lang.Class.privateGetPublicFields(Unknown Source)
        at java.lang.Class.getFields(Unknown Source)
        at org.kohsuke.stapler.ClassDescriptor.<init>(ClassDescriptor.java:71)
        at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:561)
        at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:618)
        at org.kohsuke.stapler.RequestImpl.bindJSON(RequestImpl.java:377)
        at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:574)
        at org.kohsuke.stapler.RequestImpl.bindJSON(RequestImpl.java:377)
        at org.kohsuke.stapler.RequestImpl.bindJSON(RequestImpl.java:373)
        at com.tikal.jenkins.plugins.multijob.MultiJobBuilder$DescriptorImpl.newInstance(MultiJobBuilder.java:231)
        at com.tikal.jenkins.plugins.multijob.MultiJobBuilder$DescriptorImpl.newInstance(MultiJobBuilder.java:214)
        at hudson.model.Descriptor.newInstancesFromHeteroList(Descriptor.java:939)
        at hudson.model.Descriptor.newInstancesFromHeteroList(Descriptor.java:926)
        at hudson.util.DescribableList.rebuildHetero(DescribableList.java:203)
        at hudson.model.Project.submit(Project.java:200)
        at hudson.model.Job.doConfigSubmit(Job.java:1046)
        at hudson.model.AbstractProject.doConfigSubmit(AbstractProject.java:723)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:288)
        at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:151)
        at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:90)
        at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:111)
        at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
        at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:573)
        ... 41 more

Caused by: java.lang.ClassNotFoundException: hudson.plugins.parameterizedtrigger.AbstractBuildParameters$DontTriggerException
        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 java.lang.ClassLoader.loadClass(Unknown Source)
        ... 70 more

Related Article: Multijob Plugin Null Pointer Exception.
 

December 26, 2013

Using "Direct Replies To" Option in MS Outlook 2013

You can use “ReplyTo” option (New Message -> Options -> Direct Replies To -> Have replies sent to) to re-direct the replies to the “specific user(s)”. Refer the below image for more details.
 

October 19, 2013

Recording ReadyTalk Meetings

Steps to record ReadyTalk Meeting:
 
1.       Login to www.readytalk.com as a chairperson

2.       Click Open Meeting controls

3.       Dial into RT number as a chairperson using phone or Click Use Computer under Audio controls for using computer Audio

4.       Click Start Meeting

5.       Click Record Meeting (enter a name for recording)

6.       Anytime you can Stop Recording and the same will be available immediately under your Ready Talk home page -> Manage Recordings -> Recordings. You can select a specific recording to view, rename, edit, download or delete.

7.       Repeat step 5 & 6, if you want to record by different topics.

8.       Stop Meeting, when you are done. 

October 18, 2013

SQL Query to View or Set the Compatibility Mode in SQL Server 2012

Steps to View or Set the compatibility mode:
1. Connect to a particular DB Server using MS SQL Server Management Studio and create a new query
2. Run the Queries to view the compatibility mode
use mydbname
select compatibility_levelfrom sys.databases where name= ‘mydbname’
 
Output:
compatibility_level will be either 100 or 101.
- 100 = SQL Server 2008 & 2008 R2
- 110 = SQL Server 2012
3. Run the following Query to set the compatibility mode to SQL Server 2012.
Alter database mydbname set compatibility_level = 110
 
4. Here is the compatibility level for different SQL Server versions
60 = SQL Server 6.0
65 = SQL Server 6.5
70 = SQL Server 7.0
80 = SQL Server 2000
90 = SQL Server 2005
100 = SQL Server 2008 & 2008 R2
110 = SQL Server 2012