-
1. Re: loading jdbs
wdfink Dec 3, 2013 3:31 PM (in response to mykhailo)1 of 1 people found this helpfulIf the module is installed correct you could set a dependency to your app and use it. Also you can add that module as driver and use it in a datasource.
-
2. Re: loading jdbs
mykhailo Dec 4, 2013 8:36 AM (in response to wdfink)Could you please help me how can I add dependency?
I set up module(it's works because datasource with it works)
Then I add jboss-deployment-structure.xml (put it in WEB_INF):<jboss-deployment-structure>
<deployment>
<dependencies>
<module name="org.postgresql"/>
</dependencies>
</deployment>
</jboss-deployment-structure>
But looks like classloader doesn't load it. What do I do wrong? -
3. Re: loading jdbs
wdfink Dec 4, 2013 8:54 AM (in response to mykhailo)1 of 1 people found this helpfulPortable way is to use MANIFEST file.
ou might have a look to Class Loading in AS7
-
4. Re: loading jdbs
mykhailo Dec 4, 2013 9:38 AM (in response to wdfink)I read it and thats where i found about jboss-deployment-structure.xml
bu I have problems
jboss output: http://pastebin.com/ARmRykiD
andpersistance-unit from persistance.xml
<persistence-unit name="PostgreSQLPU">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<properties>
<property name="hibernate.connection.url" value="jdbc:postgresql://localhost:5432/rentbusiness"/>
<property name="hibernate.connection.driver_class" value="org.postgresql.Driver"/>
<property name="hibernate.connection.username" value="user"/>
<property name="hibernate.connection.password" value="password"/>
<property name="hibernate.connection.pool_size" value="10"/>
<property name="hibernate.archive.autodetection" value="class"/>
<property name="hibernate.show_sql" value="true"/>
<property name="hibernate.format_sql" value="true"/>
<property name="hibernate.hbm2ddl.auto" value="update"/>
<property name="hibernate.dialect" value="org.hibernate.dialect.PostgresPlusDialect"/>
</properties>
</persistence-unit>
don't know why it throws exception..
-
5. Re: loading jdbs
wdfink Dec 4, 2013 1:38 PM (in response to mykhailo)Not sure ATM, but I suppose that you need to add the dependency to the hibernate module if you havn't packed hibernate into the application