- This topic has 16 replies, 3 voices, and was last updated 18 years, 6 months ago by Haris Peco.
-
AuthorPosts
-
pfurbacherMemberOS X 10.4.5
Eclipse 3.1.2 patched for Core Duo
eclipse.buildId=I20051215-1506
java.version=1.5.0_06
MyEclipse IDE 4.100. Configure DB driver in Preferences > MyEclipseIDE >
Database Explorer > Drivers:– MySQL Connector/J Driver
– add library, mysql-connector-java-3.1.1.jar
– driver class name is set to
com.mysql.jdbc.Driver1. Open DB Browser view
2. Open New Database Profile dialog
3. Enter everything up to “Password”
4. Type password.This is where the problem seems to begin. I’d expect the UI to
respond with a black dot for each character I type. However,
here the cursor doesn’t move to the right or show any characters.
The UI flickers, but no text (either “private” dots or visible
characters) are shown in the password edit box.When I hit “Finish”, it is perhaps no surprise that I get an
“Access denied …”. My guess is that the password entry
line is somehow broken (how, I don’t know) and that no
password is being sent.In the PDE > Runtime Error Log view, I just get the following
when I do a “Copy” on the highlighted error entry:“Error 2006-03-08 11:58:10.552 Error while trying to login to database
java.sql.SQLException: Access denied for user ‘pf2’@’localhost’ (using password: YES)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2926)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:771)
at com.mysql.jdbc.MysqlIO.secureAuth411(MysqlIO.java:3647)
at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1176)
at com.mysql.jdbc.Connection.createNewIO(Connection.java:2544)
at com.mysql.jdbc.Connection.<init>(Connection.java:1474)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:266)
at net.sourceforge.squirrel_sql.fw.sql.SQLDriverManager.getConnection(SQLDriverManager.java:99)
at com.genuitec.eclipse.sqlexplorer.actions.LoginProgress$Login.run(LoginProgress.java:43)
at java.lang.Thread.run(Thread.java:613)What is quite odd in this stacktrace is that it appears that MyEclipse IDE
has not used my connector settings: it’s using the unregistered driver,
not com.mysql.jdbc.Driver!The thing is that I can flip to JBuilder’s DB Pilot, and successfully connect
with the same configuration. Likewise, I can use MySQL Query Browser,
Middlegen, you name it.But not MyEclipse IDE.
I’ve been doing db connections in various environments for a very
long time, so it’s unlikely that I’ve got the properties wrong. There’s
something skanky about that edit line not accepting keystrokes.Any ideas?
pfurbacherMemberWhat is quite odd in this stacktrace is that it appears that MyEclipse IDE
has not used my connector settings: it’s using the unregistered driver,
not com.mysql.jdbc.Driver!Actually, if I simulate a bad password in DB Pilot, I get the same stacktrace,
including the NonRegisteringDriver part. So that’s a red herring on my part.The thing to concentrate on solving is why the password edit line is
not accepting characters properly.
Haris PecoMemberPfurbacher,
This is problem with Core Duo
This thread on eclipse zone can help you, maybe
http://www.eclipsezone.com/eclipse/forums/m91992799.html
pfurbacherMember@support-snpe wrote:
Pfurbacher,
This is problem with Core Duo
This thread on eclipse zone can help you, maybe
http://www.eclipsezone.com/eclipse/forums/m91992799.htmlPlease read my first message more carefully. I’m not
using Eclipse 3.2 Mx which is the subject of the topic
you quote. I specifically stated at the top of my first
message that I am running Eclipse 3.1.2. It works
very nicely. In fact, from what I can tell thus far,
MyEclipseIDE seems to work just fine, except for this
small problem of entering a password.Are you suggesting that there’s a bug in the carbon
SWT jar patch for 3.1.2? Is the password text edit
a unique SWT control such that it would not work
in a cross-platform manner? Sounds plausible
but I don’t know anything about SWT. Anyone?
Haris PecoMemberyes, there are problems with every version eclipse – user in threads (link) have tried with latest release first(probably 3.1) and with 3.2 (because problems exists in 3.1)
I can’t reproduce your case (i haven’t iMac), but I know that your case work for me and it is problem with eclipse and Core Duo (probably).
If username field work fine , we can add features that type password like simple text field in dialog
Best
pfurbacherMemberOkay, here are the relevant bug reports at Eclipse.org’s bug reporter:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=104902
In a nutshell, this will be fixed in 3.2 M5. However, that doesn’t do CoreDuo/MyEclipseIDE users any good.
So, I’ve requested a patch for 3.1.2 in this bug report’s thread (scroll all the way to the bottom of the long Web page):https://bugs.eclipse.org/bugs/show_bug.cgi?id=98889
I’ll try to keep this thread here posted as to the outcome.
pfurbacherMemberhttps://bugs.eclipse.org/bugs/show_bug.cgi?id=98889
I’ll try to keep this thread here posted as to the outcome.
Here’s the latest update to the comments to this bug:
——- Comment #66 From Andre Weinand 2006-03-12 08:18 [reply] ——-
Re comment #64 and #65:
I’ve verified that the universal binary of SWT 3139 in fact contains my
workaround for bug #104902.However, this workaround seems only work for Text fields which are created with
the SWT.PASSWORD style bit, not by calling Text.setEchoChar. Since Eclipse only
uses the former (and IMO more correct) approach, I never experienced the
setEchoChar problem and did not provide a workaround for that problem.So you can either
– pass SWT.PASSWORD on Text creation and stop calling Text.setEchoChar(…), or
– call Text.setEchoChar(…) and fill the character in both byte halfs of the
16-bit character, i.e. setEchoChar((c << 8) + c)I didn’t verify the second approach myself but I think it should work.
This would imply that MyEclipseIDE is using Text.setEchoChar because
for me, patch 3139 does not remedy the problem.Any ideas from the MyEclipseIDE authors? Would Weinand’s suggestion
be implementable as a fix for DB Browser?Thanks.
Haris PecoMemberYou are correct
I will file PR for future releases
Thanks
pfurbacherMemberI will file PR for future releases
Sorry, I’m not up-to-date on acronyms:
PR = “press release”?
Will I have to rely on eclipse developers to come up with a patch,
or will MyEclipseIDE issue one?Somehow, I have the feeling that I won’t be able to adequately evaluate
this product before my 30 days expire. I’m especially interested in
evaluating the Hibernate support, and to do that, I have to be able
to connect to a db. And without being able to enter a password, I’m
sunk.Oh well, that’s what I get for stepping up to the plate and getting
a Core Duo so early on in its lifecycle.
Haris PecoMemberPR – problem report (or bug, but this is bug in eclipse and we make workaround).I will explore bug (and patch) on eclipse and try find workaround
Thanks
Haris PecoMemberI explore eclipse bug and fix for setEchoChar is similar legacy fix for SWt.PASSWORD
Do you know compile swt for eclipse for try (I can do it for you, but it will be on my Linux machine; i haven’t iMac)
Best
Haris PecoMemberpfurbacher,
I will compile swt 3.1.2 for carbon with fix for this bug, but can you try this test (first field is maked with SWT.PASSWORD and other with setEchoChar) and tell me is it work like description in https://bugs.eclipse.org/bugs/show_bug.cgi?id=98889
Thanks
Haris PecoMemberI forgot test class.Try with this (add swt libraries and Run as Swt Application)
import org.eclipse.swt.*; import org.eclipse.swt.layout.*; import org.eclipse.swt.widgets.*; public class PasswordSnippets { public static void main(String[] args) { Display display = new Display(); Shell shell = new Shell(display); GridLayout layout = new GridLayout(1, false); shell.setLayout(layout); Text text1 = new Text(shell, SWT.SINGLE | SWT.BORDER | SWT.PASSWORD); text1.setText("abcdef"); Text text2 = new Text(shell, SWT.SINGLE | SWT.BORDER); text2.setEchoChar('*'); text2.setText("abcdef"); shell.setSize(200, 100); shell.open(); while (!shell.isDisposed()) { if (!display.readAndDispatch()) display.sleep(); } display.dispose(); } }
Haris PecoMemberPaul,
I attach is swt for carbon with patch for this bug
I download eclipse 3.1.2 and change Text.java with eclipse patch
https://bugs.eclipse.org/bugs/show_bug.cgi?id=104902– static final char PASSWORD = ‘\245’;
+ static final char PASSWORD = (‘\245’ << 8) + ‘\245’;and patched setEchoChar with this on start method
if (echo != PASSWORD)
echo = (char) ((echo << 8) + echo);I can’t test and you change org.eclipse.swt.carbon.macosx.ppc_3.1.1.jar with attached file
You can test easy with PasswordSnippet (in message before)Best
Attachments:
You must be logged in to view attached files.
pfurbacherMember@pfurbacher wrote:
Somehow, I have the feeling that I won’t be able to adequately evaluate
this product before my 30 days expire. I’m especially interested in
evaluating the Hibernate support, and to do that, I have to be able
to connect to a db. And without being able to enter a password, I’m
sunk.Eh! My brain finally kicked in with a work-around … set up a db user as a guest with no password. Since this is a test db behind a firewall, I’m adequately secure and can begin evaluating the Hibernate tools in MyEclipseIDE.
The question now is, why didn’t I think of this earlier?!
Eventually it would be great to get this problem solved. But with all the work to be done going forward with 3.2, maybe this problem is not of such high priority.
Thanks for all your help.
-
AuthorPosts