If you're really trying to run H2 in embedded mode, you're using the wrong
URL structure. You shouldn't be mentioning any ports unless you've got H2 up
and running on port 9092. See
http://www.h2database.com/html/quickstart.html#embedding



2010/3/23 Ricardo Tatsch <[email protected]>

> Hi Manfred,
>
> Thanks, but not work.
>
> It seems that the H2 is not being initiated by Jboss. Folder DX is not
> being created in the directory.
>
>
>
>
> Atenciosamente,
>
> Ricardo Santana Tatsch
> Analista de Desenvolvimento / P & D
> (55+51) 3019-4625
> [email protected]/tatsch_dixtal
> Dixtal Biomédica
>
> Philips Healthcare Cardiac and Critical Care
>
>
> On Mon, Mar 22, 2010 at 2:22 PM, maro <[email protected]> wrote:
>
>> Hi Ricardo,
>>
>> for me it works fine in JBoss 5.1. I think your JDBC URL is wrong:
>>
>> jdbc:h2:tcp://localhost:9092/${jboss.server.data.dir}$/data/DixtalDB;
>>
>> At least the $ before /data must be omitted. Also: the property
>> jboss.server.data.dir points already to a directory data. Maybe you
>> can try the following JDBC URL:
>>
>> jdbc:h2:tcp://localhost:9092/${jboss.server.data.dir}/DixtalDB
>>
>> Best,
>> Manfred
>>
>>
>> On Mar 22, 3:27 pm, Ricardo Tatsch <[email protected]> wrote:
>> > Hello Felows,
>> >
>> > I'm trying to use the H2 in embedded mode with JBOSS. No errors occur
>> when
>> > starting the AS, but occurs when I try to connect the H2. I've done MANY
>> > Google searches and found little information.
>> >
>> > Below the error:
>> >
>> > 10:48:22,573 INFO  [STDOUT] H2ClienteDAO.initDb()
>> > 10:48:24,001 WARN  [JBossManagedConnectionPool] *Throwable while
>> attempting
>> > to get a new connection: null*
>> > org.jboss.resource.JBossResourceException: Could not create connection;
>> -
>> > nested throwable: (org.h2.jdbc.JdbcSQLException: *Connection is broken:
>> > "session closed" [90067-131])*
>> >     at
>> >
>> org.jboss.resource.adapter.jdbc.xa.XAManagedConnectionFactory.createManagedConnection(XAManagedConnectionFactory.java:155)
>> >     at
>> >
>> org.jboss.resource.connectionmanager.InternalManagedConnectionPool.createConnectionEventListener(InternalManagedConnectionPool.java:619)
>> >     at
>> >
>> org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:264)
>> >     at
>> >
>> org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(JBossManagedConnectionPool.java:575)
>> >     at
>> >
>> org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:347)
>> >     at
>> >
>> org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:330)
>> >     at
>> >
>> org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:402)
>> >     at
>> >
>> org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:849)
>> >     at
>> >
>> org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:89)
>> >     at
>> dixtal.basico.server.PersistenciaContainer.getPersistencia(Unknown
>> > Source)
>> >     at dixtal.basico.server.AbstractSqlDAO.getConnection(Unknown Source)
>> >     at dixtal.sgdb.h2.model.H2DatabaseDAO.initDb(H2DatabaseDAO.java:31)
>> >
>> > Below is the code of the routine that tries to connect.
>> >
>> >   public Object getPersistencia() {
>> >     try {
>> >       InitialContext ic = new InitialContext();
>> >       javax.sql.DataSource ds = (javax.sql.DataSource)
>> > ic.lookup("java:/H2Ds");
>> >       return ds.getConnection();
>> >
>> >     } catch (Exception e) {
>> >       e.printStackTrace();
>> >     }
>> >     return null;
>> >   }
>> >
>> > Attached the h2-xa-ds.xml.
>> >
>> > Ricardo Santana Tatsch
>> > Development Analyst / P & D
>> > (55+51) 3019-4625
>> > [email protected]/tatsch_dixtal
>> > Dixtal Biomédica
>> >
>> > Philips Healthcare Cardiac and Critical Care
>> >
>> >  h2-xa-ds.xml
>> > 2KViewDownload
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "H2 Database" group.
>> To post to this group, send email to [email protected].
>> To unsubscribe from this group, send email to
>> [email protected]<h2-database%[email protected]>
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/h2-database?hl=en.
>>
>>
>  --
> You received this message because you are subscribed to the Google Groups
> "H2 Database" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<h2-database%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/h2-database?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/h2-database?hl=en.

Reply via email to