-
1. Re: Why jdbc logs isn't working
bmajsak Oct 21, 2014 7:21 AM (in response to alkhan)Does it work when you deploy your application normally (not through Arquillian)?
-
2. Re: Why jdbc logs isn't working
alkhan Oct 21, 2014 8:40 AM (in response to bmajsak)With a normal deployement:
The logger of EclipseLink does not work, but jboss.jdbc.spy works.
Through Arquillian:
The logger of EclipseLink and jboss.jdbc.spy do not work. -
3. Re: Why jdbc logs isn't working
bmajsak Oct 21, 2014 10:08 AM (in response to alkhan)How is your test setup? Managed container? Can you share your dependencies, test class and arquillian.xml?
Cheers,
Bartosz
-
4. Re: Why jdbc logs isn't working
alkhan Oct 22, 2014 10:29 AM (in response to bmajsak)My Test:
@RunWith(Arquillian.class)
public class TestProp {
@Inject
private PropertiesDAO propDao;
@Deployment
public static WebArchive createDeployment() {
return ShrinkWrap.create(WebArchive.class, "test.war").addPackages(true, "com.test")
.addAsResource("test-persistence.xml", "META-INF/persistence.xml");
}
@Test
public void testGetProperties() {
List<Properties> lst = this.propDao.getProperties();
assertTrue("No properties found", lst.size() > 1);
}
}
My arquillian.xml :
<?xml version="1.0" encoding="UTF-8"?>
<arquillian xmlns="http://jboss.org/schema/arquillian"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://jboss.org/schema/arquillian http://jboss.org/schema/arquillian/arquillian_1_0.xsd">
<engine>
<property name="deploymentExportPath">target/arquillian</property>
</engine>
<container qualifier="wildfly" default="true">
<configuration>
<property name="jbossHome">C:/wildfly-8.1-test</property>
<property name="modulePath">C:/wildfly-8.1-test/modules</property>
</configuration>
</container>
</arquillian>
In my pom.xml:
<dependencies> <dependency> <groupId>org.eclipse.persistence</groupId> <artifactId>eclipselink</artifactId> <version>${eclipselink.version}</version> <scope>provided</scope> </dependency> <dependency> <groupId>org.eclipse.persistence</groupId> <artifactId>javax.persistence</artifactId> <version>${javax.persistence.version}</version> <scope>provided</scope> </dependency> <dependency> <groupId>org.eclipse.persistence</groupId> <artifactId>org.eclipse.persistence.jpa.modelgen.processor</artifactId> <version>${eclipselink.version}</version> <scope>provided</scope> </dependency> <dependency> <groupId>org.javassist</groupId> <artifactId>javassist</artifactId> <version>3.18.1-GA</version> </dependency> <!-- test --> <dependency> <groupId>org.eu.ingwar.tools</groupId> <artifactId>arquillian-suite-extension</artifactId> <version>${arquillian.suite.extension.version}</version> <scope>test</scope> </dependency> <dependency> <groupId>org.jboss.arquillian</groupId> <artifactId>arquillian-bom</artifactId> <version>${arquillian.version}</version> <type>pom</type> </dependency> <dependency> <groupId>org.jboss.arquillian.extension</groupId> <artifactId>arquillian-transaction-api</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>org.jboss.arquillian.extension</groupId> <artifactId>arquillian-transaction-impl-base</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>org.jboss.arquillian.extension</groupId> <artifactId>arquillian-transaction-spi</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>org.jboss.arquillian.extension</groupId> <artifactId>arquillian-transaction-jta</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>org.jboss.arquillian.junit</groupId> <artifactId>arquillian-junit-container</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>${junit.version}</version> <scope>test</scope> </dependency> </dependencies>
<profiles>
<profile> <id>arquillian-wildfly-embedded</id> <activation> <activeByDefault>true</activeByDefault> </activation> <dependencies> <dependency> <groupId>org.wildfly</groupId> <artifactId>wildfly-arquillian-container-embedded</artifactId> <version>8.1.0.Final</version> </dependency> <dependency> <groupId>org.wildfly</groupId> <artifactId>wildfly-embedded</artifactId> <version>8.1.0.Final</version> </dependency> <dependency> <groupId>com.h2database</groupId> <artifactId>h2</artifactId> <version>${h2.version}</version> <scope>test</scope> </dependency> </dependencies> <build> <testResources> <testResource> <directory>src/test/resources</directory> </testResource> </testResources> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>${maven.surefire.plugin.version}</version> </plugin> </plugins> </build> </profile> </profiles>
Thanks for you help !