• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Tim Cooke
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Frank Carver
  • Henry Wong
  • Ron McLeod
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Himai Minh

adEjbModule error

 
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm trying to install one of the applications (MyBank) from a WebSphere tutorial in WAS AEs 4.0.2.
Lab: Build a WebSphere Application
url -> http://www7b.software.ibm.com/wsdd/library/presents/AE_SkillTrans.html
ftp://vadd1:bgm86zq2@207.25.253.53/1/wsdd/pdf/presents/WS40ST04L-1.pdf
I get the following error in the stdout log file:
X WSVR0040E: addEjbModule failed for com.ibm.ejs.models.base.config.applicationserver.impl.EJBModuleRefImpl (desiredExecutionState: START) (uri: Deployed_MyBankEJB.jar)
java.lang.LinkageError: Class WebSphereSamples/AccountAndTransfer/AccountKey violates loader constraints
The java AccountKey class from the tutorial follows. Can someone tell me why it violates the loader constraints?
Sorry about the formatting.
// 5630-A23, 5630-A22, (C) Copyright IBM Corporation, 1997, 2000
// All rights reserved. Licensed Materials Property of IBM
// Note to US Government users: Documentation related to restricted rights
// Use, duplication or disclosure is subject to restrictions set forth in GSA ADP Schedule with IBM Corp.
// This page may contain other proprietary notices and copyright information, the terms of which must be observed and followed.
//
// This program may be used, executed, copied, modified and distributed
// without royalty for the purpose of developing, using,
// marketing, or distributing.
//
package WebSphereSamples.AccountAndTransfer;
/**
* The key class of the Account entity bean.
**/
import java.io.*;
public class AccountKey implements Serializable {
public long accountId;
/**
* Constructs an AccountKey object.
*/
public AccountKey() {}
/**
* Constructs a newly allocated AccountKey object that represents the primitive long argument.
*/
public AccountKey(long accountId) {
this.accountId = accountId;
}
/**
* Determines if the AccountKey object passed to the method matches this AccountKey object.
* @param o java.lang.Object The AccountKey object to compare to this AccountKey object.
* @return boolean The pass object is either equal to this AccountBMKey object (true) or
*/
public boolean equals(Object o) {
if (o instanceof AccountKey) {
AccountKey otherKey = (AccountKey) o;
return (((accountId == otherKey.accountId)));
} else {
return false;
}
}
/**
* Generates a hash code for this AccountKey object.
* @return int The hash code.
*/
public int hashCode() {
return ((new Long(accountId).hashCode()));
}
}
 
Mike Jones
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Also, a related question. Where do I lookup the information for a specific error code. In this case, does the output from the log "X WSVR0040E:" represent an error code?
Thanks,
Mike
 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi..
I am also experiencing a similar error.
Can somebody tell me how to get rid of this error
 
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The problem is that you are running two EJB JAR files on the same server and you have a name violation. Remove one JAR file or rename the classes.
 
It's fun to be me, and still legal in 9 states! Wanna see my tiny ad?
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic