PDA

View Full Version : Cannot log in to new repository



kettle_anonymous
03-09-2006, 10:29 AM
I'm trying Kettle out for the first time to see if it would serve as a good alternative to SQL Server DTS packages for our organization. It looks great, but I've hit a major snap: I cannot log into a newly-created Kettle repository.


I'm running the repository on SQL Server 2000. I created an empty database, and added a user 'kettle' to it with 'dbowner' permissions. I started Kettle, and clicked to create a new repository. I used the dialog to set up a JDBC connection to my repository, and then created it with the 'Create/Upgrade' button. Everything appeared to work fine. Checking in the database, all the Kettle tables appear to have been created successfully. According to the documentation, a brand new repository should have a user named 'admin' with a password 'admin'. However, when I try to log in using 'admin' as the user name and password, I am told the user name and password is incorrect. I have verified that the JDBC connection is correct by running a Trace on my database - I can see the query being run on R_USER, with the correct login name. I have verified that user 'admin' exists in the R_USER table, along with the user 'guest.'



What's the deal? The only thing I can think of is that the default password is no longer 'admin,' and the documentation is just out of date. But naturally I cannot verify that easily since the password is hashed in the database. I guess I'll go check the code repository...in the mean time, can anyone point out where I went wrong?



Thanks,



-Matt

MattCasters
03-09-2006, 10:39 AM
Hi Matt,

Sad to hear that you're hitting this snag.
The admin password is indeed admin and hasn't changed.
Let me have a look around and get back to you.
I must have a SQL2k around here somewhere...

Thanks for the feedback!

Matt

MattCasters
03-09-2006, 01:09 PM
Matt,

Nothing wrong with SQL2K, is a problem with c:\documents & settings\user\.kettle\repositories.xml (typing with my daughter on my arm, sorry, she is only 4 weeks old).

Remove the file and enter de repository data again.
That did the trick for me after some thinkering.

All the best,

Matt

kettle_anonymous
03-10-2006, 04:15 AM
Thanks for the quick responses! I tried removing the .kettle/repositories.xml file and re-entering the info - same problem =( I've got the source loaded up in Eclipse now though, so I'm just going to hop into the debugger here and see what's going on. I've already had a cursory glance at the source code and I suspect there's an exception that's being eaten, masking the real issue. I'll let you know what I find.

-Matt McGill

jbleuel
03-10-2006, 04:33 AM
Matt,

I just tested with SQL2K (JDBC) - all works fine.

Can you check if you have the latest kettle.jar - I remember there was a change some time ago in this area.

Cheers,
Jens

kettle_anonymous
03-10-2006, 04:49 AM
Ok, now I've got something for you to go on. I was right about the exception masking. In RepositoriesDialog.java:419 (at least, that's the line number in the 2.2.2 source):

<pre>
try
{
userinfo = new UserInfo(rep, wUsername.getText(), wPassword.getText());
props.setLastRepository(repinfo.getName());
props.setLastRepositoryLogin(wUsername.getText());
}
catch(KettleException e)
{
userinfo=null;
repinfo=null;
}
finally
{
rep.disconnect();
}
</pre>

That catch clause should probably log the stack trace somewhere - turns out SQL Server was throwing the following error:

<pre>
The text, ntext, and image data types cannot be compared or sorted, except when using IS NULL or LIKE operator.
</pre>

And here's the query it's choking on, based on a SQL Server trace:
<pre>
SELECT ID_USER FROM R_USER WHERE LOGIN = @P0
</pre>

I manually changed the datatype on the LOGIN and PASSWORD fields of R_USER to varchar, and that fixed it - now can log in just fine.

What really confuses me is why I appear to be the first person to run into this - what is it about my configuration that's different from yours? I have a pretty standard SQL Server install, so I'm not sure what the variables could be.

As far as a fix, I'm not really sure what the right option would be. Perhaps you could change to query to use <code>LIKE</code> instead of <code>=</code>? But I'm not really familiar with all the flavors of SQL out there, and I don't know if that would break support for some other vendor.

-Matt McGill

kettle_anonymous
03-10-2006, 04:59 AM
Well, it looks like there are probably a whole slew of repository-related queries which (for me, for some reason) crash with the same error because of the <code>text</code> data type being used for all string data. I think I'll throw the repository on a Postgres database for now, so I can play with Kettle. Still can't figure out why I'd be different than you guys though - let me know if you have some insight! =)



-Matt McGill

jbleuel
03-10-2006, 05:19 AM
Matt,

can you please confirm this also with the latest kettle.jar?

I just checked again and got varchar (old version created text).

Cheers,
Jens

MattCasters
03-10-2006, 05:25 AM
Well, I must be overworked, because I&#39;m using the latest 2.3.0 development snapshot.
Sorry that I forgot to tell you to grab the latest kettle.jar
Like Jens must have know, we fixed this issue.

Anyway, yesterday I installed SQL2K eval edition so I guess we still have 119 days to fix this one if it persists ;-)

Cheers,
Matt

jbleuel
03-10-2006, 05:59 AM
Thanks Matt for this analysis. We added a change request 1712 for the exception masking:


http://www.javaforge.com/proj/tracker/itemDetails.do?task_id=1712&navigation=true



Cheers, Jens

kettle_anonymous
03-10-2006, 06:19 AM
Thanks guys! I realize that I failed to mention the version I was using in my original post, which didn&#39;t help you much. Sorry to send you on a goose chase <=) I needed an excuse to put Postgres on my dev workstation anyway, so I&#39;ll stick with the 2.2.2 stable build for now, and rest comfortably in the knowledge that the SQL2K fix will be in a future release.

And I appreciate the quick responses - I&#39;ve made use of probably 5 or 6 new open-source projects as part of my current work-related activities over the past couple weeks, and sometimes it&#39;s pretty challenging to get meaningful feedback from an active developer =)

I (and, happily, my manager) am exited about Kettle - we&#39;re a tiny little university IT department trying to integrate web applications with a very unwieldy ERP and in many cases running against the actual ERP database is impossible for performance reasons, so I have to maintain a set of scheduled ETLs that populate a separate database for the apps. Budget constraints force us to use SQL Server for the separate database, so I was until now stuck with the pain of DTS packages. Being able to dump my ETLs to XML and store them with my application code in source control makes me happy =D Keep up the good work!

-Matt McGill

MattCasters
03-10-2006, 06:27 AM
Hi Matt,

What ERP package are you using? Unlocking secrets in propriatery ERP systems is exactly the kind of thing Kettle was built for ;-)
Just let us know how we can help, it will be our pleasure!

BTW, development 2.3.0 is quite stable, although this time, I&#39;m hanging on until some crucial changes are done. (localization: Kettle in Chinese!) 2.2.2 will have to stand on it&#39;s own for a month or so.

Kind regards,
Matt

kettle_anonymous
03-10-2006, 06:37 AM
We&#39;re using Banner, which I&#39;ve been told is pretty much *the* ERP for educational institutions. Sure is a bear to write applications against, though - it&#39;s been around for a long time, and you can tell by looking at the schema. Some of the things they&#39;ve done make me want to cry ;) Last app we wrote, a &#39;simple&#39; query to retrieve a list of current students in a particular major took more than 2 minutes to run, and we couldn&#39;t come up with a way to optimize it any further - the tables we needed to join contained data going back 10 years, and it&#39;s just too much to sort through on-the-fly. Sigh.

I suppose I should also mention that one of our major responsibilities is maintaining a data warehouse (currently implemented entirely in DTS). We&#39;re pretty under-staffed so a full-scale conversion won&#39;t be happening any time soon, but there&#39;s some interest in using Kettle for the next datamart we have to add.

-Matt McGill