Hi Sebastien You get no log messages at to standalone/log/server.log file. If not I would suggest posting to the Wildfly forum or taking a visit to there IRC channel. The server.log file should receive all logging unless configured not to. I assume you have seen this document https://docs.jboss.org/author/display/WFLY8/Logging+Configuration or this https://docs.jboss.org/author/display/WFLY8/How+To#HowTo-HowdoIuselog4j.propertiesorlog4j.xmlinsteadofusingtheloggingsubsystemconfiguration%3F
To me it would sound like a Wildfly or JBoss issue. On 8 August 2014 16:01, Sebastien <[email protected]> wrote: > Hi Stefan, David, Martin, > > Well, I agree about modules, I did it for oracle-db drivers. > About slf4j, the module/jar already exists in the server > (modules\system\layers\base\org\slf4j) so no need to declare it, I also > agree. > > I am currently wondering if the transitive dependency from wicket to > slf4j-api does not shortcut the jboss one (slf4j-api-1.7.2.jbossorg-1.jar), > still testing... > Also a strange thing, there is no log4j jar in > modules\system\layers\base\org\apache\log4j\main... > Even more strange (I forgot I did the test, sorry): even a sysout or a JUL > logger info does *not* work!... (and my ear/war is deployed, up and running > of course) > > If it is working for you both and not for me and Martin, that's means there > should be kind of switch/hint that solve the issue! (in the meanwhile, it's > a nightmare) > > Thanks for your help anyway, > Sebastien > > > > On Fri, Aug 8, 2014 at 4:41 PM, David Beer <[email protected]> wrote: > > > Hi Guys > > > > Thought I would chime in here. I have been using Wildfly 8 for a long > time > > developing wicket Apps. By default all logging goes to the standard out > > log, I have changed nothing different and get the Wicket logged errors > > there, I also currently use the java Logger as still in development but > > will switch to log4j later. > > > > As for custom modules for drivers for databases I use a postgresql driver > > and connection. I simply created a module under the modules directory > > modules/system/layers/base/org/postgresql/main/ and then added a > module.xml > > file and the postgresql jar. Then added the data source in the > > standalone/configuration/standalone.xml file. I then created a new > database > > connection and setup pooling and connect my JPA persistence that way. > > > > Copy of my standalone.xml snippet for data source. > > > > <subsystem xmlns="urn:jboss:domain:datasources:2.0"> > > <datasources> > > <datasource jndi-name="java:jboss/datasources/ExampleDS" > > pool-name="ExampleDS" enabled="true" use-java-context="true"> > > > > > > > <connection-url>jdbc:h2:mem:test;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE</connection-url> > > <driver>h2</driver> > > <security> > > <user-name>sa</user-name> > > <password>sa</password> > > </security> > > </datasource> > > <datasource jta="false" > > jndi-name="java:jboss/datasources/PostgreSQLDS" pool-name="PostgreSQL" > > enabled="true" use-ccm="false"> > > <connection-url>xxxxxx</connection-url> > > <driver-class>org.postgresql.Driver</driver-class> > > <driver>postgresql</driver> > > <security> > > <user-name>xxxx</user-name> > > <password>xxxxx</password> > > </security> > > <validation> > > <validate-on-match>false</validate-on-match> > > > > <background-validation>false</background-validation> > > </validation> > > <statement> > > > > <share-prepared-statements>false</share-prepared-statements> > > </statement> > > </datasource> > > <drivers> > > <driver name="h2" module="com.h2database.h2"> > > > > <xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class> > > </driver> > > <driver name="postgresql" module="org.postgresql"> > > > > > <xa-datasource-class>org.postgresql.xa.PGXADataSource</xa-datasource-class> > > </driver> > > </drivers> > > </datasources> > > </subsystem> > > > > I hope this helps plus I am currently using 8.1.0.Final but this all > worked > > with 8.0.0.Final. I also use a jboss-deployment-structure.xml file to > > enable and disable specifc modules. This file must go in the correct > > location, for WAR it is in WEB-INF directory. > > > > I hope this helps if you have any other questions feel free to ask. > > > > David > > > > > > > > On 8 August 2014 14:08, Stefan Lindner <[email protected]> > wrote: > > > > > Hi Sebastien, > > > > > > just a few final words abot my Wildfly experiences. > > > > > > 1. Any jar file that you want to use in your applicationsmust be > defined > > > as a module in subfolder "modules". If you want to use an oracle driver > > > this must be a module > > > 2. Modules that use other modules define this dependencies in their > > > module.xml file e.g. > > > > > > <?xml version="1.0" encoding="UTF-8"?> > > > > > > <module xmlns="urn:jboss:module:1.1" name="de.my.module"> > > > <resources> > > > <resource-root path="my-module.jar"/> > > > </resources> > > > <dependencies> > > > <module name="javax.persistence.api"/> > > > <module name="com.ingres"/> > > > <module name="de.visionet.javalib"/> > > > <module name="org.slf4j" export="true"/> > > > <module name="org.slf4j.impl" export="true"/> > > > <module name="org.slf4j.jcl-over-slf4j" export="true"/> > > > <module name="org.apache.log4j" export="true"/> > > > > > > <system export="true"> > > > <paths> > > > <path name="javax/naming"/> > > > <path name="javax/sql"/> > > > <path name="com/sun/proxy"/> > > > </paths> > > > </system> > > > > > > </dependencies> > > > </module> > > > > > > 3. Using a module like the above one in a deployes JAR/EAR or WAR needs > > > the "Dependencies=de.my.module" specification > > > 4. modules with "export=true" are inherited by the JAR/EAR or WAR > > > > > > Now I think you have wicket.jar inside your WEB-INF/lib folder inside > of > > > your application.war file. > > > Such jar files are available to your app without defining them as a > > module. > > > > > > But I don't know if e.g. wicket.jar needs a > > "Dependencies=org.apache.log4j > > > etc...." specification in it's MANIFEST.MF to have access tot he > logging > > > system. I did not try this. > > > > > > Mit freundlichen Grüßen > > > --- > > > Stefan Lindner, Visionet Hard- und Software GmbH, Karolinenstraße 52b, > > > 90763 Fürth > > > Durchwahl: Tel.: 0911/148894-10, FAX: 0911-148894-11, E-Mail: > > > [email protected] > > > Zentrale: Tel.: 0911/148894-0, FAX: 0911-148894-99, Internet: > > > http://www.visionet.de > > > Registergericht Fürth: HRB 6573, Geschäftsführer: Stefan Lindner > > > > > > > > > -----Ursprüngliche Nachricht----- > > > Von: Sebastien [mailto:[email protected]] > > > Gesendet: Freitag, 8. August 2014 14:55 > > > An: [email protected] > > > Betreff: Re: Wicket / WildFly 8: Log4J / SLF4J ? > > > > > > Hi Stefan, > > > > > > Thanks for your verification, it is really helpful. > > > By conscience, I tried out the "full" profile, nothing better. > > > > > > I will investigate a little bit further and will post the answer (as > > > supposed I find the answer... :s) > > > > > > Best regards, > > > Sebastien. > > > > > > > > > On Fri, Aug 8, 2014 at 2:32 PM, Stefan Lindner < > > [email protected] > > > > > > > wrote: > > > > > > > Hi Sebastien, > > > > > > > > your file looks similar to mine. I can't remember any problems with > > > > logging.Just worked out oft he box. Defining datasources, using own > > > > libraries etc was a pain but logging was not. > > > > The only difference between you and me: i use the "full" profile > which > > > > you might require to use too wehen you think about EJBs persistence, > > > > message queues etc. > > > > > > > > --- > > > > Stefan > > > > > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: [email protected] > > > For additional commands, e-mail: [email protected] > > > > > > > > >
