Hi try type=DataSource
+ JdbcUsername etc are not all supported, That's Username for instance see http://tomee.apache.org/common-datasource-configurations.html and http://tomee.apache.org/datasource-config.html Romain Manni-Bucau Twitter: @rmannibucau Blog: http://rmannibucau.wordpress.com/ LinkedIn: http://fr.linkedin.com/in/rmannibucau Github: https://github.com/rmannibucau 2014-09-15 20:43 GMT+02:00 Felipe Jaekel <[email protected]>: > Hi, > > I'm trying to create a MySQL test dataSource in TomEE 1.7.0+ like this: > > @BeforeClass public void setUp() throws Exception { final Properties > properties = new Properties(); > properties.setProperty("openejb.embedded.remotable", "true"); > properties.put("TissDataSource", > "new://Resource?type=javax.sql.DataSource"); > properties.put("TissDataSource.JdbcDriver ", "com.mysql.jdbc.Driver"); > properties.put("TissDataSource.JdbcUrl ", "jdbc:mysql:// > 192.168.1.249:3306/TISS"); properties.put("TissDataSource.JdbcUsername ", > "***"); properties.put("TissDataSource.JdbcPassword ", "***"); container = > EJBContainer.createEJBContainer(properties); } > > > But in the console I see this: > > INFORMAÇÕES - Configuring Service(id=TissDataSource, type=Resource, > provider-id=Default JDBC Database) > INFORMAÇÕES - Creating TransactionManager(id=Default Transaction Manager) > INFORMAÇÕES - Creating SecurityService(id=Default Security Service) > INFORMAÇÕES - Creating Resource(id=TissDataSource) > ADVERTÊNCIA - Property "JdbcUsername " not supported by "TissDataSource" > ADVERTÊNCIA - Property "JdbcPassword " not supported by "TissDataSource" > ADVERTÊNCIA - Property "JdbcUrl " not supported by "TissDataSource" > ADVERTÊNCIA - Property "JdbcDriver " not supported by "TissDataSource" > > > And I run the test I get this: > java.sql.SQLException: invalid schema name: TISS > at org.hsqldb.jdbc.JDBCUtil.sqlException(Unknown Source) > at org.hsqldb.jdbc.JDBCUtil.sqlException(Unknown Source) > at org.hsqldb.jdbc.JDBCPreparedStatement.<init>(Unknown Source) > at org.hsqldb.jdbc.JDBCConnection.prepareStatement(Unknown Source) > at > org.apache.commons.dbcp.DelegatingConnection.prepareStatement(DelegatingConnection.java:508) > at > org.apache.commons.dbcp.DelegatingConnection.prepareStatement(DelegatingConnection.java:508) > at > org.hibernate.engine.jdbc.internal.StatementPreparerImpl$2.doPrepare(StatementPreparerImpl.java:117) > at > org.hibernate.engine.jdbc.internal.StatementPreparerImpl$StatementPreparationTemplate.prepareStatement(StatementPreparerImpl.java:183) > ... 98 more > > Any ideas? > > Thanks
