tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Romain Manni-Bucau <rmannibu...@gmail.com>
Subject Re: TomEE Plume 7.0.4/JDBC resource config/unused property
Date Thu, 19 Jul 2018 14:42:50 GMT
Hi

Basically the tests " Password=xxx, Password xxx, password=xxx, passWord
xxx...." are all the same since we are not case sensitive.

However you didnt set oracle driver as jdbcdriver so our pool configuration
is bypassed by default and we use the oracle datasource as main
configuration for the real connection so you must configure the datasource
too, i.e  User and Pass for oracle IIRC.

Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://rmannibucau.metawerx.net/> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
<https://www.packtpub.com/application-development/java-ee-8-high-performance>


Le jeu. 19 juil. 2018 à 15:41, maciejka <maciej.michal.kaminski@gmail.com>
a écrit :

> Hello and welcome
>
> I am using 'apache-tomee-plume-7.0.4' with java version '1.8.0_152' on
> 'Linux debian 3.16.0-4-amd64'
>
> I have basic problem with datasource configuration. My datasource is
> configured like (tried various configurations - Password=xxx, Password xxx,
> password=xxx, passWord xxx....):
>
> <Resource id="jdbc/xxx" type="DataSource">
>     jdbcDriver=oracle.jdbc.xa.client.OracleXADataSource
>     jdbcUrl=jdbc:oracle:thin:@xxx.xxx.xxx.xxx:1521:xxx
>     UserName=xxx
>     Password=xxx
> </Resource>
>
> I put ojdbc.jar to tomee lib folder. During deployment of my app I have
> warning like:
>
> 18-Jul-2018 16:35:13.799 INFO [main]
> org.apache.openejb.assembler.classic.Assembler.createRecipe Creating
> Resource(id=jdbc/xxx)
> 18-Jul-2018 16:35:13.900 WARNING [main]
> org.apache.openejb.assembler.classic.Assembler.unusedProperty unused
> property 'JdbcUrl' for resource 'jdbc/xxx'
> 18-Jul-2018 16:35:13.900 WARNING [main]
> org.apache.openejb.assembler.classic.Assembler.unusedProperty unused
> property 'UserName' for resource 'jdbc/xxx'
> 18-Jul-2018 16:35:13.900 WARNING [main]
> org.apache.openejb.assembler.classic.Assembler.unusedProperty unused
> property 'Password' for resource 'jdbc/xxx'
> 18-Jul-2018 16:35:13.900 WARNING [main]
> org.apache.openejb.assembler.classic.Assembler.unusedProperty unused
> property 'PasswordCipher' for resource 'jdbc/xxx'
> 18-Jul-2018 16:35:13.900 WARNING [main]
> org.apache.openejb.assembler.classic.Assembler.unusedProperty unused
> property 'asdf' for resource 'jdbc/xxx'
>
> When I use my Resource like:
>
>         @Resource(name = "jdbc/xxx")
>         private DataSource ds;
>
>         java.sql.Connection connection = ds.getConnection();
>         Statement createStatement = connection.createStatement();
>         executeQuery = createStatement.executeQuery("...");
>
>
> I get: java.sql.SQLException: ORA-01017: invalid username/password; logon
> denied
>
> but if I write:
>
>         java.sql.Connection connection = ds.getConnection("xxx", "xxx");
>         Statement createStatement = connection.createStatement();
>         executeQuery = createStatement.executeQuery("...");
>
> it works.
> Somehow 'jdbcUrl' was set on resource - despite the WARINING - and
> 'username' and 'password' were not.
>
> Questions:
>  Why properties (username, password) set in tomee.xml for the datasource
> are
> not taken into account and 'jdbcUrl' is?
>  How to trace this issue? I don't know where to search.
>
>
>
> --
> Sent from:
> http://tomee-openejb.979440.n4.nabble.com/TomEE-Users-f979441.html
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message