Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa EJB Issue when deploying mdb jar in weblogic
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


Tarun
Issue when deploying mdb jar in weblogic
0 Answer(s)      a year and 8 months ago
Posted in : EJB


Hi,

I have written the code to read messages from queue.But when i deploy this in weblogic 9.2 after creating a jar file it is showing unmarshaller failed Below is the code

MyMdb.java

package com.mdb.ejb;

import javax.ejb.EJBException; import javax.ejb.MessageDrivenBean; import javax.ejb.MessageDrivenContext; import javax.jms.JMSException; import javax.jms.Message; import javax.jms.MessageListener; import javax.jms.TextMessage;

/** * Message-Driven Bean implementation class for: MyMdb * */

public class MyMdb implements javax.ejb.MessageDrivenBean,javax.jms.MessageListener {

/**
 * 
 */
private static final long serialVersionUID = 1L;

/**
 * Default constructor. 
 */
public MyMdb() {
    // TODO Auto-generated constructor stub
}

/**
 * @see MessageListener#onMessage(Message)
 */
public void onMessage(Message message) {
    // TODO Auto-generated method stub
    System.out.println("on two thtr ");
    TextMessage textMessage = (TextMessage) message;

        try {
            System.out.println("\n\n\t(mdb) MyMDB Received \n"+ textMessage.getText());
            SendMail.sendMail(textMessage.getText());
        }
        catch (JMSException e)
        {
            e.printStackTrace();
        }

}

public void ejbRemove() throws EJBException {
    // TODO Auto-generated method stub

}

public void setMessageDrivenContext(MessageDrivenContext arg0)
        throws EJBException {
    // TODO Auto-generated method stub

}

}

ejb-jar.xml

MyMdb com.mdb.ejb.MyMdb Container destinationType javax.jms.Queue isTransacted java.lang.String true
isJmsRedeliveredBroken java.lang.String false
MyMdb onMessage Required

weblogic-ejb-jar.xml

MyMdb 10 10 qjndi cfjndi

It is shwoing below mentioned exception

An error occurred during activation of changes, please see the log for details. ???Exception preparing module: EJBModule(MessageDrivenBeanProject) Unable to deploy EJB: MessageDrivenBeanProject.jar from MessageDrivenBeanProject.jar: There are 2 nested errors: weblogic.ejb.container.compliance.ComplianceException: In EJB MyMdb, the message-driven bean class must implement the javax.ejb.MessageDrivenBean interface. at weblogic.ejb.container.compliance.MessageDrivenBeanClassChecker.checkMessageDrivenImplementsMDB(MessageDrivenBeanClassChecker.java:54) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:592) at weblogic.ejb.container.compliance.EJBComplianceChecker.check(EJBComplianceChecker.java:262) at weblogic.ejb.container.compliance.EJBComplianceChecker.checkDeploymentInfo(EJBComplianceChecker.java:216) at weblogic.ejb.container.ejbc.EJBCompiler.complianceCheckJar(EJBCompiler.java:875) at weblogic.ejb.container.ejbc.EJBCompiler.checkCompliance(EJBCompiler.java:843) at weblogic.ejb.container.ejbc.EJBCompiler.doCompile(EJBCompiler.java:229) at weblogic.ejb.container.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:497) at weblogic.ejb.container.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:464) at weblogic.ejb.container.deployer.EJBDeployer.runEJBC(EJBDeployer.java:432) at weblogic.ejb.container.deployer.EJBDeployer.compileJar(EJBDeployer.java:754) at weblogic.ejb.container.deployer.EJBDeployer.compileIfNecessary(EJBDeployer.java:657) at weblogic.ejb.container.deployer.EJBDeployer.prepare(EJBDeployer.java:1201) at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:355) at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:93) at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:360) at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26) at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:56) at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:46) at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.java:615) at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26) at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:191) at weblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:147) at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:61) at weblogic.deploy.internal.targetserver.operations.ActivateOperation.createAndPrepareContainer(ActivateOperation.java:189) at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doPrepare(ActivateOperation.java:87) at weblogic.deploy.internal.targetserver.operations.AbstractOperation.prepare(AbstractOperation.java:217) at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentPrepare(DeploymentManager.java:718) at weblogic.deploy.internal.targetserver.DeploymentManager.prepareDeploymentList(DeploymentManager.java:1185) at weblogic.deploy.internal.targetserver.DeploymentManager.handlePrepare(DeploymentManager.java:247) at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.prepare(DeploymentServiceDispatcher.java:157) at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doPrepareCallback(DeploymentReceiverCallbackDeliverer.java:157) at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$000(DeploymentReceiverCallbackDeliverer.java:12) at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$1.run(DeploymentReceiverCallbackDeliverer.java:45) at weblogic.work.ServerWorkManagerImpl$WorkAdapterImpl.run(ServerWorkManagerImpl.java:518) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209) at weblogic.work.ExecuteThread.run(ExecuteThread.java:181) and weblogic.ejb.container.compliance.ComplianceException: In EJB MyMdb, a Message-driven EJB must define an ejbCreate method that takes no parameters. at weblogic.ejb.container.compliance.MessageDrivenBeanClassChecker.checkEjbCreateMethod(MessageDrivenBeanClassChecker.java:401) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:592) at weblogic.ejb.container.compliance.EJBComplianceChecker.check(EJBComplianceChecker.java:262) at weblogic.ejb.container.compliance.EJBComplianceChecker.checkDeploymentInfo(EJBComplianceChecker.java:216) at weblogic.ejb.container.ejbc.EJBCompiler.complianceCheckJar(EJBCompiler.java:875) at weblogic.ejb.container.ejbc.EJBCompiler.checkCompliance(EJBCompiler.java:843) at weblogic.ejb.container.ejbc.EJBCompiler.doCompile(EJBCompiler.java:229) at weblogic.ejb.container.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:497) at weblogic.ejb.container.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:464) at weblogic.ejb.container.deployer.EJBDeployer.runEJBC(EJBDeployer.java:432) at weblogic.ejb.container.deployer.EJBDeployer.compileJar(EJBDeployer.java:754) at weblogic.ejb.container.deployer.EJBDeployer.compileIfNecessary(EJBDeployer.java:657) at weblogic.ejb.container.deployer.EJBDeployer.prepare(EJBDeployer.java:1201) at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:355) at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:93) at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:360) at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26) at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:56) at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:46) at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.java:615) at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26) at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:191) at weblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:147) at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:61) at weblogic.deploy.internal.targetserver.operations.ActivateOperation.createAndPrepareContainer(ActivateOperation.java:189) at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doPrepare(ActivateOperation.java:87) at weblogic.deploy.internal.targetserver.operations.AbstractOperation.prepare(AbstractOperation.java:217) at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentPrepare(DeploymentManager.java:718) at weblogic.deploy.internal.targetserver.DeploymentManager.prepareDeploymentList(DeploymentManager.java:1185) at weblogic.deploy.internal.targetserver.DeploymentManager.handlePrepare(DeploymentManager.java:247) at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.prepare(DeploymentServiceDispatcher.java:157) at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doPrepareCallback(DeploymentReceiverCallbackDeliverer.java:157) at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$000(DeploymentReceiverCallbackDeliverer.java:12) at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$1.run(DeploymentReceiverCallbackDeliverer.java:45) at weblogic.work.ServerWorkManagerImpl$WorkAdapterImpl.run(ServerWorkManagerImpl.java:518) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209) at weblogic.work.ExecuteThread.run(ExecuteThread.java:181) ??? ??? There are 2 nested errors: weblogic.ejb.container.compliance.ComplianceException: In EJB MyMdb, the message-driven bean class must implement the javax.ejb.MessageDrivenBean interface. ???


Advertisement
View Answers

Related Tutorials/Questions & Answers:
Issue when deploying mdb jar in weblogic
Issue when deploying mdb jar in weblogic  Hi, I have written the code to read messages from queue.But when i deploy this in weblogic 9.2 after creating a jar file it is showing unmarshaller failed Below is the code MyMdb.java
Deploying Servlet in Weblogic 9.2 - Servlet Interview Questions
Deploying Servlet in Weblogic 9.2   Hi Friend thanks in advance, can u give me steps for deploying servlet using weblogic server 9.2
Advertisements
Deploying Servlet in Weblogic 9.2 - Servlet Interview Questions
Deploying Servlet in Weblogic 9.2  Hi Friends, I am new to web application, can u explain briefly wat is "Deploying a .war,.jar,.ear files... configuration of the hosting server application. When the server encounters a particular
Deploying Weblogic Server in MyEclipseBlue6.6 - IDE Questions
Deploying Weblogic Server in MyEclipseBlue6.6  Hi I am facing some problem in deploying "weblogicserver8.1" in my "MyEclipseBlue6.6".Please provide me detailed path of BEA home directory, Web logic Installation directory
Issue in Converting .zip file to .jar file?
Issue in Converting .zip file to .jar file?  I have a folder called "printpdf.jar". I have changed the .jar to .zip and did some customizations. After which i had "zipped" it again and made as ".jar". Now the final file
Tomcat jar file issue - JSP-Servlet
Tomcat jar file issue  Hello All, Currently in my application we... folder from JRUN server to Tomcat 6.0.29 webapps folder. When our GUI code... of experience before ?Appreciate your help in this issue. Thanks in Advance
I got build failed when deploying enterprise application - EJB
I got build failed when deploying enterprise application  I created...-user: init-project: do-init: post-init: init-check: init: deps-jar: deps-j2ee-archive: init: deps-module-jar: deps-ear-jar: init: deps-jar: compile
MDB - EJB
MDB  Hi All, can we make MDB is Synchronous ??? if yes then how????  Hi friend, i am sending simple code. Actually MDBs only live in an EJB server - all the Swing code you've supplied is not MDB, its regular JMS
EJB-MDB - EJB
EJB-MDB  What are the MDB transaction attributes
Copy .mdb file for backup.
Copy .mdb file for backup.  hi.. i am new to java... in my application , at one place for taking back up i have to copy .mdb file from one place to another ... please can anyone help me, how can i do that ....and also if possible
jms to mdb - JMS
jms to mdb  how to invoke MDB from JMS? is there any server configuration file?  Hi Friend, Please visit the following link: http://www.roseindia.net/ejb/MessageDrivenBeans.shtml http://www.roseindia.net/ejb
DEVELOPING & DEPLOYING A PACKAGED EJB
<?xml version="1.0" ?> <!DOCTYPE weblogic-ejb-jar PUBLIC '-//BEA...' ----------------------------------------------------------------------- Now, we copy the jar file to the WebLogic folder...\mydomain\applications Start the weblogic server and the jar will be deployed
How to solve concurrency issue when an application is running on two machine to fetch record from one database
How to solve concurrency issue when an application is running on two machine to fetch record from one database  I have developed an application... it. I want to make sure that when application run on two machine
.MDB Files to open on mac.. DATABASE
.MDB Files to open on mac.. DATABASE  how to open .mdb files on mac.. I have a database file that has sent to me through email. Since i have a mac... confused is the .mdb file tranferred to my project
Weblogic - EJB
Weblogic  How can i download the weblogic sever of application develop could u provide the link for that.  Hi friend, Download the weblogic sever of application visit to : http://www.roseindia.net/javabeans
Deploying and testing Stateless Session Bean
="${deploymentdescription}/jar/"   includes="ejb-jar.xml,weblogic-cmp-rdbms...Deploying and testing Stateless Session Bean... ear file. We will deploy our application using WebLogic console. Building ear
weblogic server
weblogic server  as a java developer how much knowledge he has to know about the weblogic sever,if one know please give me reply   WebLogic is a server software application that runs on a middle tier, between back-end
Is there any website available to open .mdb file online?
Is there any website available to open .mdb file online?  I am having an .mdb file. And I don't have MS Office in my computer. So for, I need to view the .mdb file in online. Could you tell me any website
servlet with weblogic
servlet with weblogic  hi everyone.... When I'm running this program on weblogic server8.1 import java.io.*; import java.sql.*; import javax.servlet.*; import javax.servlet.http.*; class DataInsertion extends HttpServlet
how can i export a .jar file include .mbd file?
how can i export a .jar file include .mbd file?  i have a project of java.it includes a .mdb file, when i export to .jar file i eclipse, it show a error that can't export .jar file width the .mdb file ? how can i import this .mdb
weblogic 9.1 - WebSevices
weblogic 9.1  How to working on weblogic server ??? how to deploy on weblogic server ???? how to retrieve data for te server ???? differt bettw weblogic 8.1 ,9.1 & 10
Deployment Steps in Weblogic Server - Development process
Deployment Steps in Weblogic Server  Hi Friends, Can anyone give me steps for Deploying application in web logic server ( both versions 8.1 and 9.2 ) with Eclipse IDE
Weblogic server - Java Beginners
Weblogic server  how can we create connection poolong in weblogic 9.1 application server
websphere vs weblogic
websphere vs weblogic  websphere vs weblogic Why you are using websphere instead of weblogic
JTABLE Issue
to go back for another search. Now issue is -- when I put some input data... to customer name. But when I click on Back button and provide some other name
Dumps related to weblogic certification
Dumps related to weblogic certification   I want to perform the weblogic certification exam code 1z0-110. Can anybody please provide me the dumps related to 1z0-110 Thanks in advance
Regarding weblogic portal
Regarding weblogic portal  Hi, My name is Ramanuja.i am working on weblogic portal.if u know any info regarding plz provide the materials or information to me.plz help me. Thanks in advance
weblogic portal 10.3
weblogic portal 10.3  Hi , Please let me know what are good websites for learning step by step Weblogic Portal 10.3. Thanks Ramanuja
Java_Weblogic - Development process
Java_Weblogic  How to run as service bea weblogic server on unix mode
issue on jcombobox
issue on jcombobox  i have JTextfield and JComboBox. there are several values in combobox.when i select a value from combobox how to make textfiled as a combobox.only few values in the combobox need this functionality. need
 

 

 

DMCA.com