Topic
  • 4 replies
  • Latest Post - ‏2012-10-10T06:52:38Z by Jagis
SystemAdmin
SystemAdmin
549 Posts

Pinned topic JBoss createCommonBaseEvent error

‏2005-09-04T20:21:33Z |
Hi,

I have a CBE generator module deployed in JBoss 4.0.3RC1 which generates CBE for error conditions. When I test this module within Eclipse framework, the code runs as expected. However, when I run this within JBoss, I am getting the following error:

java.lang.NoSuchMethodError: org.eclipse.hyades.logging.events.cbe.impl.EventPackageImpl.initEAttribute(Lorg/eclipse/emf/ecore/EAttribute;Lorg/eclipse/emf/ecore/EClassifier;Ljava/lang/String;Ljava/lang/String;IIZZZZZZZ)Lorg/eclipse/emf/ecore/EAttribute;
org.eclipse.hyades.logging.events.cbe.impl.EventPackageImpl.initializePackageContents(EventPackageImpl.java:1357)
org.eclipse.hyades.logging.events.cbe.impl.EventPackageImpl.init(EventPackageImpl.java:279)
org.eclipse.hyades.logging.events.cbe.EventPackage.<clinit>(EventPackage.java:69)
org.eclipse.hyades.logging.events.cbe.impl.CommonBaseEventImpl.<clinit>(CommonBaseEventImpl.java:101)
org.eclipse.hyades.logging.events.cbe.impl.EventFactoryImpl.createCommonBaseEventGen(EventFactoryImpl.java:224)
org.eclipse.hyades.logging.events.cbe.impl.EventFactoryImpl.createCommonBaseEvent(EventFactoryImpl.java:234)

My code looks as follows:
EventFactoryContext eventFactoryContext = EventFactoryContext.getInstance();
// - Set the simple Event Factory Home type for all callers:
eventFactoryContext.setEventFactoryHomeType("org.eclipse.hyades.logging.events.cbe.impl.SimpleEventFactoryHomeImpl");
// - Retrieve the preconfigured simple Event Factory Home instance from
// the Event Factory Context:
EventFactoryHome eventFactoryHome = eventFactoryContext.getEventFactoryHome();
// - Retrieve an Event Factory instance from the Event Factory Home:
EventFactory eventFactory = eventFactoryHome.getEventFactory("com.ac.logger.CBEGenerator");
// Create an empty CBE
CommonBaseEvent cbe = eventFactory.createCommonBaseEvent();

The function createCommonBaseEvent causes the error within JBoss.

Any suggestions will be helpful.
Thanks,
Kirthi
Updated on 2012-10-10T06:52:38Z at 2012-10-10T06:52:38Z by Jagis
  • SystemAdmin
    SystemAdmin
    549 Posts

    Re: JBoss createCommonBaseEvent error

    ‏2005-09-05T13:34:38Z  
    Request you to confirm that the correct version of the necessary jars/classes are available in the classpath of your server. Also make sure that your classpath doesn't have another incompatible version of the CBE API.
  • SystemAdmin
    SystemAdmin
    549 Posts

    Re: JBoss createCommonBaseEvent error

    ‏2005-09-05T17:14:11Z  
    Request you to confirm that the correct version of the necessary jars/classes are available in the classpath of your server. Also make sure that your classpath doesn't have another incompatible version of the CBE API.
    Hi,

    Thanks for your response. I have double checked the CLASSPATH in JBoss. It has all the jar files as required. There are no version differences between my Eclipse project and JBoss deployment. I have tried pretty much everything there is to try. I still keep getting the same errors. I have updated the run.bat file of JBoss server startup script to explicitly set the CLASSPATH to point to the jar files that I am using in my Eclipse framework.

    Let me know if I can try some other approach.
    Thanks,
    Kirthi
  • SystemAdmin
    SystemAdmin
    549 Posts

    Re: JBoss createCommonBaseEvent error

    ‏2005-09-06T14:15:37Z  
    Hi,

    Thanks for your response. I have double checked the CLASSPATH in JBoss. It has all the jar files as required. There are no version differences between my Eclipse project and JBoss deployment. I have tried pretty much everything there is to try. I still keep getting the same errors. I have updated the run.bat file of JBoss server startup script to explicitly set the CLASSPATH to point to the jar files that I am using in my Eclipse framework.

    Let me know if I can try some other approach.
    Thanks,
    Kirthi
    The error seems to be because of loading another version of the CBE/EMF API in JBoss environment. Suggest you to reorder your classpath in JBoss to make sure that the jars that worked in eclipse environment are loaded first than the JBoss jars.

    If it still doesn't work, send a mail to actkit@in.ibm.com with details of JBoss, your source code, log and adapter files.
  • Jagis
    Jagis
    2 Posts

    Re: JBoss createCommonBaseEvent error

    ‏2012-10-10T06:52:38Z  
    The error seems to be because of loading another version of the CBE/EMF API in JBoss environment. Suggest you to reorder your classpath in JBoss to make sure that the jars that worked in eclipse environment are loaded first than the JBoss jars.

    If it still doesn't work, send a mail to actkit@in.ibm.com with details of JBoss, your source code, log and adapter files.
    Hi,

    While executing Junit, i'm getting below error.

    java.lang.NoSuchMethodError: org/eclipse/hyades/logging/events/cbe/impl/EventPackageImpl.initEAttribute(Lorg/eclipse/emf/ecore/EAttribute;Lorg/eclipse/emf/ecore/EClassifier;Ljava/lang/String;Ljava/lang/String;IIZZZZZZZ)Lorg/eclipse/emf/ecore/EAttribute;
    at org.eclipse.hyades.logging.events.cbe.impl.EventPackageImpl.initializePackageContents(EventPackageImpl.java:1357)
    at org.eclipse.hyades.logging.events.cbe.impl.EventPackageImpl.init(EventPackageImpl.java:279)
    at org.eclipse.hyades.logging.events.cbe.EventPackage.<clinit>(EventPackage.java:69)
    at java.lang.J9VMInternals.initializeImpl(Native Method)
    at java.lang.J9VMInternals.initialize(J9VMInternals.java:200)
    at org.eclipse.hyades.logging.events.cbe.impl.CommonBaseEventImpl.<clinit>(CommonBaseEventImpl.java:103)
    at java.lang.J9VMInternals.initializeImpl(Native Method)
    at java.lang.J9VMInternals.initialize(J9VMInternals.java:200)
    at org.eclipse.hyades.logging.events.cbe.impl.EventFactoryImpl.createCommonBaseEventGen(EventFactoryImpl.java:219)
    at org.eclipse.hyades.logging.events.cbe.impl.EventFactoryImpl.createCommonBaseEvent(EventFactoryImpl.java:229)

    Can you please share path to download CBE jar.

    Thanks,