quality@glassfish.java.net

Re: Unable to create Oracle datasource on admin gui

From: Wouter van Reeven <wouter_at_van.reeven.nl>
Date: Wed, 28 Oct 2009 09:01:01 +0100

Hi Richard,


In the past I tried putting the jdbc jar in lib/ext and that won't work,
no matter what the documentation says. Either put it in <gf install>/lib
or <gf install>/domains/domain1/lib and it will work. In the first case
it will work for all domains, in the second only for domain1.

FWIW you can also use the asadmin commain line to create connection
pools and jdbc resources. To create a connection pool use

asadmin create-jdbc-connection-pool --datasourceclassname=oracle.jdbc.pool.OracleDataSource --property username=<user>:password=<pwd>:url=jdbc\\:oracle\\:thin\\:@<host>\\:1521\\:<sid> <pool_name>

To ping a connection pool, use

asadmin ping-connection-pool <pool_name>

And to create a JDBC resource, use

asadmin create-jdbc-resource --connectionpoolid=<pool_name> jdbc/<resource_name>

Please note that the backslashes in the first command are needed on a
Linux environment and you may have to fiddle with them on a Windows
environment (I don't have any experience there).

I think using the above commands is safer than copying and pasting GFv2
settings.


HTH, Wouter van Reeven

On Wed, Oct 28, 2009 at 08:39:18AM +0200, Richard Kolb wrote:
> Hi Judy
>
> I think we have a more complex problem. The driver may need to be in lib/ext to
> make Oracle Toplink work.
> Personally I don't use toplink so I can't confirm this.
>
> Maybe a nice to have (and a quick one) is to add a README.TXT file in lib/ext
> and say what should and what should not be included there.
>
> regards
> Richard
>
>
> 2009/10/28 Judy Tang <Judy.J.Tang_at_sun.com>
>
> Hi Richard,
>
> Thanks for continue testing and report issues. It helps us to know where to improve.
>
> Checked with Yifeng she confirmed if put the driver in domain1/lib, it is working fine. Thanks Yifeng :-)
>
> Thanks Anissa, you are so fast, even looked into online Help and found an issue there.
>
> I have a suggestion and see if it is possible to add code to check under domain1/lib, if driver is not
> there, may be pop up an error message to suggest user to put the driver in the right place ?
>
>
> Judy
>
> Anissa Lam wrote:
>
>
> Hi Richard,
> I have looked at this and realized what is the problem.
> The location where you install the oracle driver is the issue. It
> should be placed under glassfishv3/glassfish/domains/domain1/lib
> (Note: NOT lib/ext).
> Once you put it there, and restart the driver, connector runtime is
> able to detect that and console presented the correct information.
> Attached is the list of property shown when i select
> "javax.sql.DataSource" as the resource type.
>
> I checked the current Online Help for creating the pool, the help did
> mention that lib/ext being an alternate location which is incorrect.
>
> # Make the driver accessible to the common class loader.
> 1. Copy the JAR and ZIP files of the driver into the domain-dir/lib
> directory; or copy the class files into the domain-dir/lib/ext
> directory.
> 2. Restart the domain.
>
> I will contact the doc team and ensure that this will be corrected.
> Again, thanks for drawing this to our attention and takeing the time
> to file the bug.
>
> thanks
> Anissa.
>
> Richard Kolb wrote:
>
> Hi Anissa
>
> No problem, just glad I saw it.
> Will copy the GF 2.1 setting.
>
>
> regards
> Richard
>
> 2009/10/28 Anissa Lam <Anissa.Lam_at_sun.com>
>
>
> Hi Richard,
> I will look into this. In the meantime, maybe you can work
> around the problem by adding rows in the Property table and
> fill in the Property name and value pair instead of relying
> GUI to provide the property list for you to fill in the value.
>
> Sorry for the inconvenience.
>
> thanks
> Anissa.
>
>
> Richard Kolb wrote:
>
>
> Can someone please confirm this (it's a bad one) :
> https://glassfish.dev.java.net/issues/show_bug.cgi?id=10626
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> quality-unsubscribe_at_glassfish.dev.java.net For additional
> commands, e-mail: quality-help_at_glassfish.dev.java.net
>
>
>
>
> ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
>
> [cid]
>
> ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: quality-unsubscribe_at_glassfish.dev.java.net
>
> For additional commands, e-mail: quality-help_at_glassfish.dev.java.net
>
>
>



-- 
There is a theory which states that if ever anyone discovers exactly what the
Universe is for and why it is here, it will instantly disappear and be replaced
by something even more bizarre and inexplicable.
There is another theory which states that this has already happened.
[The Hitchhiker's Guide To The Galaxy]
Skype: wvreeven
Facebook: wvreeven
Twitter: wvreeven