Обсуждение: Redhat 8 default database warning: JDBC problems

Поиск
Список
Период
Сортировка

Redhat 8 default database warning: JDBC problems

От
Dennis King
Дата:
This is a summary of the problems I had getting JDBC working with the
Redhat Database that comes with the Redhat 8.0 installation, which
are treated in an earlier thread. "forName finds Driver but
getConnection doesn.t".

Very simple, really. I believe I correctly configured PostgreSQL; the
postgresql.conf file had "tcpip_sockets=true", the pg_hba.conf file
had "host all 127.0.0.1 255.255.255.255 password," the driver from
both Redhat and PostgreSQL were in the path. I could load the driver
with the Class.forName() call, but not make the connection.

I downloaded the upgrade packages and installed. Same thing.

I uninstalled all the packages. Then I installed the source tarball
for 7.2.3. I could not run make successfully with and configuration
options other than "./configure". All --with-x and --enable-y options
broke make.

I reinstalled the OS without the Redhat database, installed Java
1.3.1 and the Java Web Services Developers Pack, and all ran fine.
The same program that had failed with the Redhat distribution worked
right away.

Redhat's site mentions that their database has been approved for
Redhat 7.3. Perhaps they distribute incompatible software with the
8.0 distribution.

Hope this saves somebody some grief. Thanks for all the helpful words
from those who wrote me back.

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus � Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

Re: Redhat 8 default database warning: JDBC problems (CLARIFICATION)

От
Fernando Nasser
Дата:
Just to clarify the issue, I use RHDB (many versions) and the JDBC
driver with all variants of JREs every day, in machines with several
different versions of the RHL OS, without any problems so far.
And so do a score of other people.

Dennis had the wrong PATH set.  I myself do the same thing many times as
I also have the GNU gcj compiler installed on my system.  Unfortunately
I didn't see his message in the hundreds of ones I get daily.

If you encounter any problem that you think are specific to the Red Hat
Database packing please feel free to use the rhdb public mailing list:

      rhdb@sources.redhat.com

or at list cross post to that list to make sure one of us sees it.

Regards to all,
Fernando

Dennis King wrote:
> This is a summary of the problems I had getting JDBC working with the
> Redhat Database that comes with the Redhat 8.0 installation, which
> are treated in an earlier thread. "forName finds Driver but
> getConnection doesn.t".
>
> Very simple, really. I believe I correctly configured PostgreSQL; the
> postgresql.conf file had "tcpip_sockets=true", the pg_hba.conf file
> had "host all 127.0.0.1 255.255.255.255 password," the driver from
> both Redhat and PostgreSQL were in the path. I could load the driver
> with the Class.forName() call, but not make the connection.
>
> I downloaded the upgrade packages and installed. Same thing.
>
> I uninstalled all the packages. Then I installed the source tarball
> for 7.2.3. I could not run make successfully with and configuration
> options other than "./configure". All --with-x and --enable-y options
> broke make.
>
> I reinstalled the OS without the Redhat database, installed Java
> 1.3.1 and the Java Web Services Developers Pack, and all ran fine.
> The same program that had failed with the Redhat distribution worked
> right away.
>
> Redhat's site mentions that their database has been approved for
> Redhat 7.3. Perhaps they distribute incompatible software with the
> 8.0 distribution.
>
> Hope this saves somebody some grief. Thanks for all the helpful words
> from those who wrote me back.
>
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
> http://mailplus.yahoo.com
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly
>


--
Fernando Nasser
Red Hat Canada Ltd.                     E-Mail:  fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario   M4P 2C9


Re: Redhat 8 default database warning: JDBC problems (CLARIFICATION)

От
Dennis King
Дата:
Thanks, Fernando. Can you tell me how I set the path correctly?

I only posted this after I sent email to Red Hat support through
their Red Hat Network pages and didn't hear back. I just couldn't get
it working following the instructions in the RHN online docs, even
after helpful review from this list. I just checked the
administrators and users manual again, and the first sections,
covering account creation and initdb to create the database, don't
mention setting the path. Also, since the install was included in the
OS install and the user was created and the service registered and
started automatically, I'd expect the path to have been set as well.
The "Using Red Hat Database with JDBC" tutorial also makes no mention
that there could be a conflict with the Sun JRE it instructs you to
install and assumes you use.

By the way, I _am_ a Redhat fan, and really like 8.0 overall.

Best,

Dennis


--- Fernando Nasser <fnasser@redhat.com> wrote:
> Just to clarify the issue, I use RHDB (many versions) and the JDBC
> driver with all variants of JREs every day, in machines with
> several
> different versions of the RHL OS, without any problems so far.
> And so do a score of other people.
>
> Dennis had the wrong PATH set.  I myself do the same thing many
> times as
> I also have the GNU gcj compiler installed on my system.
> Unfortunately
> I didn't see his message in the hundreds of ones I get daily.
>
> If you encounter any problem that you think are specific to the Red
> Hat
> Database packing please feel free to use the rhdb public mailing
> list:
>
>       rhdb@sources.redhat.com
>
> or at list cross post to that list to make sure one of us sees it.
>
> Regards to all,
> Fernando
>
> Dennis King wrote:
> > This is a summary of the problems I had getting JDBC working with
> the
> > Redhat Database that comes with the Redhat 8.0 installation,
> which
> > are treated in an earlier thread. "forName finds Driver but
> > getConnection doesn.t".
> >
> > Very simple, really. I believe I correctly configured PostgreSQL;
> the
> > postgresql.conf file had "tcpip_sockets=true", the pg_hba.conf
> file
> > had "host all 127.0.0.1 255.255.255.255 password," the driver
> from
> > both Redhat and PostgreSQL were in the path. I could load the
> driver
> > with the Class.forName() call, but not make the connection.
> >
> > I downloaded the upgrade packages and installed. Same thing.
> >
> > I uninstalled all the packages. Then I installed the source
> tarball
> > for 7.2.3. I could not run make successfully with and
> configuration
> > options other than "./configure". All --with-x and --enable-y
> options
> > broke make.
> >
> > I reinstalled the OS without the Redhat database, installed Java
> > 1.3.1 and the Java Web Services Developers Pack, and all ran
> fine.
> > The same program that had failed with the Redhat distribution
> worked
> > right away.
> >
> > Redhat's site mentions that their database has been approved for
> > Redhat 7.3. Perhaps they distribute incompatible software with
> the
> > 8.0 distribution.
> >
> > Hope this saves somebody some grief. Thanks for all the helpful
> words
> > from those who wrote me back.
> >
> > __________________________________________________
> > Do you Yahoo!?
> > Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
> > http://mailplus.yahoo.com
> >
> > ---------------------------(end of
> broadcast)---------------------------
> > TIP 3: if posting/reading through Usenet, please send an
> appropriate
> > subscribe-nomail command to majordomo@postgresql.org so that your
> > message can get through to the mailing list cleanly
> >
>
>
> --
> Fernando Nasser
> Red Hat Canada Ltd.                     E-Mail:  fnasser@redhat.com
> 2323 Yonge Street, Suite #300
> Toronto, Ontario   M4P 2C9
>


__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

Re: Redhat 8 default database warning: JDBC problems (CLARIFICATION)

От
Fernando Nasser
Дата:
Dennis King wrote:
> Thanks, Fernando. Can you tell me how I set the path correctly?
>
> I only posted this after I sent email to Red Hat support through
> their Red Hat Network pages and didn't hear back.

I am not sure where your mail went.
Just use the rhdb@sources.redhat.com for Red Hat Database problems.
This one I know we are subscribed to.


> The "Using Red Hat Database with JDBC" tutorial also makes no mention
> that there could be a conflict with the Sun JRE it instructs you to
> install and assumes you use.
>

I guess this was written long before gcj started to install a
/usr/bin/java (pointing to gij, I believe), which happened just now in
8.0.  You are right, it needs updating.  I will get that patched.


Just make sure you have your $JAVA_HOME/bin directory ahead of /usr/bin
so that the 'java' command that you get is the one from the Sun SDK, not
the one installed by gcj.

--
Fernando Nasser
Red Hat Canada Ltd.                     E-Mail:  fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario   M4P 2C9


Re: Redhat 8 default database warning: JDBC problems (CLARIFICATION)

От
Dennis King
Дата:
Since I believe the Sun Java installation docs suggest adding
"PATH=$PATH:/usr/local/jdk1.x/bin" to /etc/profile, which will still
leave /usr/bin/java ahead of the JRE most people know about, it seems
like the Gnu package is potentially a landmine in other instances as
well. It seems like /usr/bin should be ahead of the Java
installation's executables path as a general rule.

Again, thanks very much for the help, Fernando.

--- Fernando Nasser <fnasser@redhat.com> wrote:
> Dennis King wrote:
> > Thanks, Fernando. Can you tell me how I set the path correctly?
> >
> > I only posted this after I sent email to Red Hat support through
> > their Red Hat Network pages and didn't hear back.
>
> I am not sure where your mail went.
> Just use the rhdb@sources.redhat.com for Red Hat Database problems.
> This one I know we are subscribed to.
>
>
> > The "Using Red Hat Database with JDBC" tutorial also makes no
> mention
> > that there could be a conflict with the Sun JRE it instructs you
> to
> > install and assumes you use.
> >
>
> I guess this was written long before gcj started to install a
> /usr/bin/java (pointing to gij, I believe), which happened just now
> in
> 8.0.  You are right, it needs updating.  I will get that patched.
>
>
> Just make sure you have your $JAVA_HOME/bin directory ahead of
> /usr/bin
> so that the 'java' command that you get is the one from the Sun
> SDK, not
> the one installed by gcj.
>
> --
> Fernando Nasser
> Red Hat Canada Ltd.                     E-Mail:  fnasser@redhat.com
> 2323 Yonge Street, Suite #300
> Toronto, Ontario   M4P 2C9
>
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to
majordomo@postgresql.org


__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

Re: Redhat 8 default database warning: JDBC problems (CLARIFICATION)

От
Fernando Nasser
Дата:
Dennis King wrote:> Since I believe the Sun Java installation docs suggest adding
> "PATH=$PATH:/usr/local/jdk1.x/bin" to /etc/profile, which will still
> leave /usr/bin/java ahead of the JRE most people know about, it seems
> like the Gnu package is potentially a landmine in other instances as
> well. It seems like /usr/bin should be ahead of the Java
> installation's executables path as a general rule.
>

I have forward your documentation request to the Red Hat Java folks.

P.S.: I don't know how they will handle that as the Open Source Java is actually
  GNU gcj and associated libraries.  To install a package that replaces
something native in a system one should add the path ahead of the others.  And
they will not have any way of changing Sun's documentation.  All this would be
solved if Sun would distribute RPMs or at least let us do so.  But people have
to get their SDK directly from their site :-(



> Again, thanks very much for the help, Fernando.
>

You are very much welcome.



--
Fernando Nasser
Red Hat - Toronto                       E-Mail:  fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario   M4P 2C9


Re: Redhat 8 default database warning: JDBC problems

От
Fernando Nasser
Дата:
Dennis King wrote:> This is a summary of the problems I had getting JDBC working
with the
> Redhat Database that comes with the Redhat 8.0 installation, which
> are treated in an earlier thread. "forName finds Driver but
> getConnection doesn.t".
>

Dennis,

It was brought to my attention that you were actually using the community
postgresql RPM.  This is the one that comes with the OS.  What we call "Red Hat
Database" includes that, some GUI tools, a modified set of manuals etc.

You can download it from free.  Check it out at:

http://www.redhat.com/software/database

and the project page has also some useful information:

http://sources.redhat.com/rhdb


And, of course, it is PostgreSQL after all, so the postgresql.org site and lists
will continue to be useful if you install that.

Best regards,
Fernando

--
Fernando Nasser
Red Hat - Toronto                       E-Mail:  fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario   M4P 2C9


Re: Redhat 8 default database warning: JDBC problems

От
Dennis King
Дата:
Sorry to keep this slogging through, but one last clarification: I
was only using the PostgreSQL source distribution after being unable
to get Red Hat Database working because of the GCJ issue. Once that
failed, I reinstalled the OS without RHDB; apparently GCJ wasn't
included. Perhaps the opportunity for conflict also exists with a
postgresql.org source download if you have GCJ installed, but that
wasn't the origin of my problem.

--- Fernando Nasser <fnasser@redhat.com> wrote:
> Dennis King wrote:> This is a summary of the problems I had getting
> JDBC working
> with the
> > Redhat Database that comes with the Redhat 8.0 installation,
> which
> > are treated in an earlier thread. "forName finds Driver but
> > getConnection doesn.t".
> >
>
> Dennis,
>
> It was brought to my attention that you were actually using the
> community
> postgresql RPM.  This is the one that comes with the OS.  What we
> call "Red Hat
> Database" includes that, some GUI tools, a modified set of manuals
> etc.
>
> You can download it from free.  Check it out at:
>
> http://www.redhat.com/software/database
>
> and the project page has also some useful information:
>
> http://sources.redhat.com/rhdb
>
>
> And, of course, it is PostgreSQL after all, so the postgresql.org
> site and lists
> will continue to be useful if you install that.
>
> Best regards,
> Fernando
>
> --
> Fernando Nasser
> Red Hat - Toronto                       E-Mail:  fnasser@redhat.com
> 2323 Yonge Street, Suite #300
> Toronto, Ontario   M4P 2C9
>


__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

Re: Redhat 8 default database warning: JDBC problems

От
Fernando Nasser
Дата:
Dennis King wrote:
> Sorry to keep this slogging through, but one last clarification: I
> was only using the PostgreSQL source distribution after being unable
> to get Red Hat Database working because of the GCJ issue. Once that
> failed, I reinstalled the OS without RHDB; apparently GCJ wasn't
> included. Perhaps the opportunity for conflict also exists with a
> postgresql.org source download if you have GCJ installed, but that
> wasn't the origin of my problem.
>

Hi Dennis,

I am not sure I understood the above completely, but yes, the same
problem would occur with the postgresql.org download.  The problem is
gij providing the java command in /usr/bin ahead of the Sun or IBM JRE,
so it independs on what distribution of postgresql you are using.

In any case, I told the GNU Java folks that this is happening.
However, we all think that the correct way of adding new packages is to
add their path to the front of the current path, not like you say it was
suggested by Sun's documentation.  Imagine an IBM machine which will
probably have the IBM JRE in the PATH?  The same problem will happen.
Also, if your sysadmin had a Sun JRE 1.3 added to the default PATH and
you wanted to use the 1.4 one?  Same problem.

The usual way of doing this would be:

export PATH=<new package bin dir>:$PATH

Maybe the Linux documentation should have a special section about Java
and the possible ways of finding it and the correct way of installing
them (including how to have more than one installed on the same system).
I will talk to some people and see if someone can implement your
suggestion of documenting the issue.

Best regards,
Fernando



--
Fernando Nasser
Red Hat Canada Ltd.                     E-Mail:  fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario   M4P 2C9