Title: RE: [JBoss-user] RE: log4j

I'll throw this out, though it may not directly relate to your problem..

We encountered a VerifyError when trying to call the Logger, part of log4j 1.2 beta, that isn't part of log4j1.1.3 that is distributed with Jboss 3 (not sure about 2.4). I simply removed references to Logger and used Category.getInstance("foo") and was able to get everything to work. It seems that the jboss custom classloaders obey the Java way of doing things and prefer their log4j rather than one packaged within your own ear or war. So, you will have to use 1.1.3 log4j. As for your class not found, I'm not sure of the exact problem, other than possibly the need for an entry in your ejb's manifest such as:

Classpath: log4j.jar (or maybe lib/log4j.jar) <CR>

HTH,
James

     -----Original Message-----
    From:   [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Eric Kaplan

    Sent:   Tuesday, April 23, 2002 8:46 AM
    To:     Eric Kaplan; [EMAIL PROTECTED]
    Subject:        [JBoss-user] RE: log4j

    ok, now i feel like i'm being ignored.  is this is a difficult question?  i see other people encountered this same problem,

    but have tried various things and nothing seems to fix this.  can someone please tell me, this is critical for the work

    we're doing.  if you can't use log4j with jboss without great pain, it's a problem.

       -----Original Message-----
      From:   Eric Kaplan [mailto:[EMAIL PROTECTED]]
      Sent:   Monday, April 22, 2002 2:12 PM
      To:     [EMAIL PROTECTED]
      Subject:        log4j

      I had posed this question a while ago and never actually got an answer that worked.  If I instantiate a static
      Category in one of my beans, I get the following error upon loading.  This is jboss 2.4.1.  Yes, I'm behind a bit,
      but that's because when I tried to upgrade to 2.4.4 I got some errors which I have not had time to resolve.
      What needs to happen here?

      Thanks

      Eric

      [Verifier] java.lang.NoClassDefFoundError: org/apache/log4j/Category
      [Verifier]      at com.armanta.ejb.coldefs.ColdefsMasterBean.<clinit>(ColdefsMas
      terBean.java:103)
      [Verifier]      at java.lang.Class.newInstance0(Native Method)
      [Verifier]      at java.lang.Class.newInstance(Class.java:237)
      [Verifier]      at org.jboss.verifier.strategy.AbstractVerifier.hasDefaultConstr
      uctor(AbstractVerifier.java:356)
      [Verifier]      at org.jboss.verifier.strategy.EJBVerifier11.verifySessionBean(E
      JBVerifier11.java:630)
      [Verifier]      at org.jboss.verifier.strategy.EJBVerifier11.checkSession(EJBVer
      ifier11.java:93)
      [Verifier]      at org.jboss.verifier.BeanVerifier.verify(BeanVerifier.java:134)

      [Verifier]      at org.jboss.ejb.ContainerFactory.deploy(ContainerFactory.java:4
      67)
      [Verifier]      at org.jboss.ejb.ContainerFactory.deploy(ContainerFactory.java:3
      69)
      [Verifier]      at org.jboss.ejb.ContainerFactory.deploy(ContainerFactory.java:3
      04)
      [Verifier]      at java.lang.reflect.Method.invoke(Native Method)
      [Verifier]      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl
      .java:1628)
      [Verifier]      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl
      .java:1523)
      [Verifier]      at org.jboss.deployment.J2eeDeployer.startModules(J2eeDeployer.j
      ava:494)
      [Verifier]      at org.jboss.deployment.J2eeDeployer.startApplication(J2eeDeploy
      er.java:468)
      [Verifier]      at org.jboss.deployment.J2eeDeployer.deploy(J2eeDeployer.java:20
      8)
      [Verifier]      at java.lang.reflect.Method.invoke(Native Method)
      [Verifier]      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl
      .java:1628)
      [Verifier]      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl
      .java:1523)
      [Verifier]      at org.jboss.ejb.AutoDeployer.deploy(AutoDeployer.java:379)
      [Verifier]      at org.jboss.ejb.AutoDeployer.run(AutoDeployer.java:217)
      [Verifier]      at org.jboss.ejb.AutoDeployer.startService(AutoDeployer.java:353
      )
      [Verifier]      at org.jboss.util.ServiceMBeanSupport.start(ServiceMBeanSupport.
      java:107)
      [Verifier]      at java.lang.reflect.Method.invoke(Native Method)
      [Verifier]      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl
      .java:1628)
      [Verifier]      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl
      .java:1523)
      [Verifier]      at org.jboss.configuration.ConfigurationService$ServiceProxy.inv
      oke(ConfigurationService.java:836)
      [Verifier]      at $Proxy0.start(Unknown Source)
      [Verifier]      at org.jboss.util.ServiceControl.start(ServiceControl.java:81)
      [Verifier]      at java.lang.reflect.Method.invoke(Native Method)
      [Verifier]      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl
      .java:1628)
      [Verifier]      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl
      .java:1523)
      [Verifier]      at org.jboss.Main.<init>(Main.java:210)
      [Verifier]      at org.jboss.Main$1.run(Main.java:116)
      [Verifier]      at java.security.AccessController.doPrivileged(Native Method)
      [Verifier]      at org.jboss.Main.main(Main.java:112)
      Eric Kaplan
      Armanta, Inc.
      55 Madison Ave.
      Morristown, NJ  07960
      Phone: (973) 326-9600

Reply via email to