Issue 146 in uby: Add logging notice about database location

2 views
Skip to first unread message

u...@googlecode.com

unread,
Mar 30, 2015, 6:47:40 AM3/30/15
to uby-dev...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Enhancement Priority-Low

New issue 146 by EmilyKJa...@gmail.com: Add logging notice about database
location
https://code.google.com/p/uby/issues/detail?id=146

It would be nice if Uby displayed a very prominent notice when it is
working from a Maven packaged database versus when it is working from the
user's local database.

Recently, I followed the (outdated) tutorial code and created my Uby as
below. I wanted to use my local mysql.

ExternalResourceDescription myUbyResource = ExternalResourceFactory
.createExternalResourceDescription(
UbyResource.class,
UbyResource.PARAM_URL, "localhost/uby_open_0_6_0",
UbyResource.PARAM_DRIVER, "com.mysql.jdbc.Driver",
UbyResource.PARAM_LANGUAGE, "en",
UbyResource.PARAM_DIALECT, "mysql",
UbyResource.PARAM_USERNAME, "root",
UbyResource.PARAM_PASSWORD, "pass"
);

There weren't instructions anywhere to include this line:
UbyResource.PARAM_MODEL_LOCATION,
ResourceObjectProviderBase.NOT_REQUIRED,
and if I hadn't been fixing an unrelated exception, I might not have ever
discovered I was not using my local database.


--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

u...@googlecode.com

unread,
Mar 30, 2015, 8:10:20 AM3/30/15
to uby-dev...@googlegroups.com

Comment #1 on issue 146 by richard.eckart: Add logging notice about
database location
https://code.google.com/p/uby/issues/detail?id=146

I believe that instructions are in the JavaDoc of PARAM_MODEL_LOCATION.

Actually, it would be good if it was not required to set
UbyResource.PARAM_MODEL_LOCATION to ResourceObjectProviderBase.NOT_REQUIRED
at all. We should probably assume that if PARAM_URL is set, that
PARAM_MODEL_LOCATION should not be used.

u...@googlecode.com

unread,
Mar 30, 2015, 8:18:24 AM3/30/15
to uby-dev...@googlegroups.com

Comment #2 on issue 146 by EmilyKJa...@gmail.com: Add logging notice about
database location
https://code.google.com/p/uby/issues/detail?id=146

I agree. We could also assume that if PARAM_USERNAME and PARAM_PASSWORD
are set, it should not be necessary to set UbyResource.PARAM_MODEL_LOCATION
to ResourceObjectProviderBase.NOT_REQUIRED.

u...@googlecode.com

unread,
Mar 30, 2015, 8:24:39 AM3/30/15
to uby-dev...@googlegroups.com

Comment #3 on issue 146 by richard.eckart: Add logging notice about
database location
https://code.google.com/p/uby/issues/detail?id=146

Btw. the information that the embedded DB is used is also logged:

UbyResource.this.getLogger().info("Using embedded database");

Also, the process of extracting the database to a temporary location is
logged and where to:

UbyResource.this.getLogger().info("Extracting embedded database to [" +
tmpDbFile + "]");
Message has been deleted

u...@googlecode.com

unread,
Mar 30, 2015, 4:41:34 PM3/30/15
to uby-dev...@googlegroups.com

Comment #5 on issue 146 by richard.eckart: Add logging notice about
database location
https://code.google.com/p/uby/issues/detail?id=146

I still think we should find a way of doing with the
ResourceObjectProviderBase.NOT_REQUIRED. We're pretty much all thinking
that this is not intuitive.

If nobody has a better suggestion, then mine would be to try settings
PARAM_MODEL_LOCATION to NOT_REQUIRED implicitly when PARAM_URL is set.

u...@googlecode.com

unread,
Mar 31, 2015, 1:52:46 AM3/31/15
to uby-dev...@googlegroups.com

Comment #6 on issue 146 by eckle.kohler: Add logging notice about database
location
https://code.google.com/p/uby/issues/detail?id=146

sure, go ahaead. This was your piece of code in the first place.

u...@googlecode.com

unread,
Mar 31, 2015, 3:32:22 AM3/31/15
to uby-dev...@googlegroups.com
Updates:
Status: Accepted
Owner: richard.eckart
Labels: Milestone-0.7.0

Comment #7 on issue 146 by richard.eckart: Add logging notice about
database location
https://code.google.com/p/uby/issues/detail?id=146

I set this to release 0.7.0 in the hopes that - should I forget -
eventually somebody should bump me before the next release about fixing
this.

u...@googlecode.com

unread,
Mar 31, 2015, 8:32:10 AM3/31/15
to uby-dev...@googlegroups.com

Comment #8 on issue 146 by EmilyKJa...@gmail.com: Add logging notice about
database location
https://code.google.com/p/uby/issues/detail?id=146

The tutorial I referenced was the publicly-visible dkpro-tutorials code,
which is the current recommended reference from the uby google project.
The dkpro-tutorials code is out of date and does not include the line:
UbyResource.PARAM_MODEL_LOCATION,
ResourceObjectProviderBase.NOT_REQUIRED,

But my hope in raising this issue was not simply to fix the documentation,
which will continue to fall out of date, but to encourage other/redundant
forms of notification/object creation for the user to make it extremely
clear which database is being used. For example, I provided my local mysql
username and password, and I would expect that to throw an exception when
creating a UbyResource with Maven origins; when no exception is thrown, I
expect that my username and pw are successfully being used.
Message has been deleted

u...@googlecode.com

unread,
Mar 31, 2015, 9:12:29 AM3/31/15
to uby-dev...@googlegroups.com

Comment #9 on issue 146 by richard.eckart: Add logging notice about
database location
https://code.google.com/p/uby/issues/detail?id=146

We do not consider the tutorials on dkpro-tutorials to be proper parts of
the software packages. They are one-time tutorials that do not get updated
as the software continues to develop. The sole exception to this is, when
we hold a tutorial again - then we update it to the respective versions
current at that point in time. So the tutorials are quite different from
in-project documentation (i.e. asiidoc or JavaDoc) which we should strive
to update as the project evolves.

I added a note to the tutorial page explicitly stating that it is for Uby
0.4.0.

I believe that we have no documentation yet on the UbyResource in Uby
itself (except the JavaDoc, which is up-to-date for the specified case).

Anyway, we found out that the NOT_REQUIRED setting is quite unintuitive
(despite being documented) and as soon as I can spare some time for this,
I'll try to fix that.
Reply all
Reply to author
Forward
0 new messages