Donate Share

Eclipse Checkstyle Plug-in

Tracker: Bugs

5 Remote checkstyle configuration fails authentication - ID: 1843511
Last Update: Comment added ( immo )

I have installed the Checkstyle plugin version 4.3.3 from the update site
into Eclipse RCP 3.3 (Europa). We're running Java SE 1.5.0 update 14.

I am trying to configure a remote checkstyle configuration that resides in
a Subversion repository. I can access it using a browser under
http://whatever.server.com:7770/svn/path/to/checks.xml (names changed to
protect the guilty) but when I put the same URL into the "New
Configuration" dialog and add the same username and password to the
appropriate text boxes, and regardless of whether I tick the "cache" box, I
get a 401 error - Authentication Failed - reported at the top of the dialog
box. Same if I click the "Additional Properties" button. The authentication
failure is returned suspiciously quickly.


Immo Huneke ( immo ) - 2007-12-03 17:34

5

Closed

Fixed

Lars Koedderitzsch

Checkstyle Integration

post 4.0.0

Public


Comments ( 8 )

Date: 2007-12-10 22:42
Sender: immo


Ha! That just goes to prove that one should never change more than one
parameter at a time. Breaking this rule (because I was desperate to get it
working any old how) I changed the JVM at the same time as manually editing
the checkstyle configuration to add the external rules file. Although I got
the syntax slightly wrong, when I then went back to the preferences screen
and added the username and password, it was able to save the result to the
configuration file. I ascribed it to the fact that I had finally managed to
get all references to JavaSE-1.6 out of my Eclipse configuration.


Date: 2007-12-10 19:42
Sender: lkoeProject Admin


Hmm, there actually was a bug in the plugin which prevented the
authentication to work properly.
I committed a fix to CVS, which I tested on JDK 1.6.0_03.

What puzzles me though is why it supposedly worked with JDK 1.5, judging
from the code it shouldn't have worked at all...


Date: 2007-12-05 22:31
Sender: lkoeProject Admin


Thanks for the hint.
I'll test this with an 1.6 JVM and see if there is a workaround.


Date: 2007-12-05 15:24
Sender: immo


After further testing, it really does seem that this is a JVM issue. Once
I had eliminated all references to 1.6 from all projects and from the
"available JVMs" configuration, and was therefore running with Java 1.5.0
update 14, the problem disappeared.

This isn't the first such incompatibility that I have encountered, sadly.


Date: 2007-12-05 10:09
Sender: immo


As requested, here is a sample stack trace. First the housekeeping
information:

eclipse.buildId=M20071023-1652
java.version=1.6.0_03
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_GB

(Hmm - I was convinced that I was running under Java 1.5.0 update 14 - I
will change environment variables and see if that fixes the problem)

Date: 2007-12-03 17:34:41.193
Message: Checkstyle-Plugin: 401: Authentication failed

com.atlassw.tools.eclipse.checkstyle.util.CheckstylePluginException: 401:
Authentication failed
at
com.atlassw.tools.eclipse.checkstyle.util.CheckstylePluginException.rethrow(CheckstylePluginException.java:95)
at
com.atlassw.tools.eclipse.checkstyle.util.CheckstylePluginException.rethrow(CheckstylePluginException.java:107)
at
com.atlassw.tools.eclipse.checkstyle.config.configtypes.RemoteConfigurationType.getCheckstyleConfiguration(RemoteConfigurationType.java:166)
at
com.atlassw.tools.eclipse.checkstyle.config.CheckConfigurationWorkingCopy.getCheckstyleConfiguration(CheckConfigurationWorkingCopy.java:420)
at
com.atlassw.tools.eclipse.checkstyle.config.CheckConfigurationWorkingCopy.setLocation(CheckConfigurationWorkingCopy.java:208)
at
com.atlassw.tools.eclipse.checkstyle.config.configtypes.RemoteConfigurationEditor.getEditedWorkingCopy(RemoteConfigurationEditor.java:238)
at
com.atlassw.tools.eclipse.checkstyle.config.gui.CheckConfigurationPropertiesDialog.okPressed(CheckConfigurationPropertiesDialog.java:337)
at org.eclipse.jface.dialogs.Dialog.buttonPressed(Dialog.java:464)
at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:616)
at
org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:227)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3682)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3293)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:820)
at org.eclipse.jface.window.Window.open(Window.java:796)
at
com.atlassw.tools.eclipse.checkstyle.config.gui.CheckConfigurationWorkingSetEditor.addCheckConfig(CheckConfigurationWorkingSetEditor.java:466)
at
com.atlassw.tools.eclipse.checkstyle.config.gui.CheckConfigurationWorkingSetEditor.access$300(CheckConfigurationWorkingSetEditor.java:77)
at
com.atlassw.tools.eclipse.checkstyle.config.gui.CheckConfigurationWorkingSetEditor$PageController.widgetSelected(CheckConfigurationWorkingSetEditor.java:372)
at
org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:227)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3682)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3293)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:820)
at org.eclipse.jface.window.Window.open(Window.java:796)
at
org.eclipse.ui.internal.OpenPreferencesAction.run(OpenPreferencesAction.java:65)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
at
org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:546)
at
org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:490)
at
org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:402)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3682)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3293)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2389)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2219)
at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
at
org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:461)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at
org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:106)
at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:169)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:508)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:447)
at org.eclipse.equinox.launcher.Main.run(Main.java:1173)
Caused by: java.io.IOException: 401: Authentication failed
at
com.atlassw.tools.eclipse.checkstyle.config.configtypes.RemoteConfigurationType.getBytesFromURLConnection(RemoteConfigurationType.java:361)
at
com.atlassw.tools.eclipse.checkstyle.config.configtypes.RemoteConfigurationType.getCheckstyleConfiguration(RemoteConfigurationType.java:117)
... 52 more





Date: 2007-12-04 22:38
Sender: lkoeProject Admin


Open the Error Log view (Window->Show View->Error Log).
There you should find the according error to the 401 error(s).
Double-click the entry and copy the shown stack trace.

Almost all unexpected exceptions in the plugin result in an error log
entry, so I figure there should be one for your problem too...

Regards,
Lars


Date: 2007-12-04 01:17
Sender: immo


Hi Lars, I'm a bit of a beginner with Eclipse. I don't know where to find
that stack-trace. How do you know there is one? All I got was a 401 message
at the top of the dialog box.


Date: 2007-12-03 18:20
Sender: lkoeProject Admin


Can you please post the stack trace from the according error log entry?

Thanks,
Lars Ködderitzsch


Attached File

No Files Currently Attached

Changes ( 4 )

Field Old Value Date By
status_id Open 2007-12-10 19:42 lkoe
resolution_id None 2007-12-10 19:42 lkoe
assigned_to nobody 2007-12-10 19:42 lkoe
close_date - 2007-12-10 19:42 lkoe