Just read your blog - you can ignore my previous post here.
But my problem remains.
Does the file naming convention has something to do with it?
Does the file has to be named openejb.xml or resource.xml ???
--
View this message in context:
I tried that - I still get the error.
I noticed one line in the Tomee startup logs
INFO: Configuring Service(id=Default JDBC Database, type=Resource,
provider-id=Default JDBC Database)
-- does this mean, it is loading the default Database??
--
View this message in context:
I believe this is the same bug reported in
https://issues.apache.org/jira/browse/TOMEE-924
I will try in 1.6.0 snapshot and check.
--
View this message in context:
http://openejb.979440.n4.nabble.com/MySQL-resource-in-Tomee-1-5-2-tp4665872p4666006.html
Sent from the OpenEJB User mailing
So if I understand you correctly the resource id should be same as the war
name
Are you suggesting this ?
Resource id=quot;jdbc/lt;lt;bWAR-NAME* type=javax.sql.DataSource
JdbcDriver com.mysql.jdbc.Driver
JdbcUrl jdbc:mysql://localhost:3306/localdb
Just so that I am understanding this correctly, would it be possible for you
to provide a resources.xml sample, the web.xml snippet and a small code for
datasource from initialcontext lookup - ??
Mine are here :-
Resources.xml ( in WEB-INF folder of deployed war)
Resource id=jdbc/localDB
Hi Romain,
If I understand you correctly, you are saying that id and resource name do
not match
Here :-
Resource id=quot;lt;bjdbc/localDB* type=javax.sql.DataSource
JdbcDriver com.mysql.jdbc.Driver
JdbcUrl jdbc:mysql://localhost:3306/localdb
MaxActive 100
I am putting resources.xml in the WEB-INF Folder, with a resource
configuration.
Resource id=jdbc/localDB type=javax.sql.DataSource
JdbcDriver com.mysql.jdbc.Driver
JdbcUrl jdbc:mysql://localhost:3306/localdb
MaxActive 100
MaxIdle 30
Hi Romain,
Thanks for taking a look. But I am Not sure what you meant .. could you
please elaborate.
I have the resource configuration in tomee.xml and the following in web.xml.
resource-ref
descriptionMySQL Connection/description
Sorry the code got messed up. The java code is as follows:-
InitialContext ic = new InitialContext();
Context envCtx = (Context) ic.lookup(java:comp/env);
DataSource ds = (DataSource)envCtx.lookup(jdbc/SentinelDB);
--
View this message in context:
Nope, it just mentions creating a default database, although resources.xml
exists:-
Nov 02, 2013 3:27:08 PM org.apache.tomee.catalina.TomEEClassLoaderEnricher
validateJarFile
WARNING: jar
'D:\dev_wksd\eclipse-wksd\devel\Sentinel\war\WEB-INF\lib\hibernate-jpa-2.0-api-1.0.1.Final.jar'
contains
10 matches
Mail list logo