Deploying EJB application

Hi,
We are developing an Enterprise application, using JSP pages, Servlets and EJBs. All EJB development is handled by one developer and I do the web tier development (JSPs, Servlets and other required Java classes). We are using Oracle Container for J2EE (OC4J) and having problems accessing the EJBs from the web application if I deploy them separately. The question is - should we deploy the EJBs and Web application together? What is the best practice?
Deploying together takes a lot of time, that is why I want to avoid it.
I appreciate your help.
Giri.

The most accepted practice is to deploy it as an ear file. Unfortunately, the classloader standard does not make them like DLL's. That is, if the EJB changes, you have to update each application / ear file. It's dumb, but that's the way it is.
Another method, which can be more simple depending on your environment is to include that ejb/jar within your war files (in the web-inf/lib) directory and deploy it on the server as an EJB. Again, all applications have to be updated if the ejb is changed.
The only way I know of to avoid this is to put the EJB within your classpath. Then it doesn't need be included in all your projects nor installed as an EJB on your server. However, whenever it gets updated the server will have to be restarted.
Hope this helps.
~hayedid

Similar Messages

  • Unable to deploy EJB application

    Hi iam getting the following exception while deploying an EJB application in WebLogic 8.1
    Exception:weblogic.management.ApplicationException: prepare failed for Addition
    Module: Addition Error: Exception preparing module: EJBModule(Addition,status=NEW)
    Unable to deploy EJB: Addition.jar from Addition.jar:
    Compiler failed executable.exec
    at weblogic.ejb20.ejbc.EJBCompiler.doCompile(EJBCompiler.java:274)
    at weblogic.ejb20.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:468)
    at weblogic.ejb20.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:401)
    at weblogic.ejb20.deployer.EJBDeployer.runEJBC(EJBDeployer.java:493)
    at weblogic.ejb20.deployer.EJBDeployer.compileJar(EJBDeployer.java:763)
    what might be the reason for this exception ????

    This problem is caused by the way WebLogic calls javac to compile the generated classes for the EJBs deployment. This became a big problem for our project with 50 Entity EJBs 2.0 with CMP/CMR, about 15 EJB-QL statements, 3 MDB and 8 Session EJB. I think that these numbers are limits, so exceeding any of these numbers cause javac to exhaust the memory it allocates by default. Even the WebLogic 8.1.Server's administarion console allows you to supply additional parameters for RMI and EJB compilers, it does not allow to supply the -J-Xmx256M (or more) option needed to increase the memory javac allocates.
    Thus:
    1. In the active $JAVA_HOME/bin of the Server create the file:
    Windows:
    javac1.cmd Containing:
    javac -J-Xmx256M %*
    Linux:
    javac1.sh Containing:
    #!/bin/bash
    javac -J-Xmx256M $*
    make it "executable"
    NOTE: startWeblogic script sets it own JAVA_HOME, so check it first.
    2. In the administraitve console of WebLogic 8.1 Server select the server in the left frame under the
    <Domain> / Servers branch. In the right frame select the General tab.
    3. In the Java Compiler box change javac to javac1.cmd or javac1.sh respectively. No restart is needed.
    This solved our problem.
    I could not find any solution published, hopefully this will help other colleagues.
    Rusi Popov

  • Error while deploying WC application: Unable to deploy EJB

    Hi All,
    we are getting the below error quite frequently, whenever we deploy the application to server:
    [03:35:14 AM] Weblogic Server Exception: weblogic.application.ModuleException: Exception preparing module: EJBModule(CAWrapperEJB.jar)
    Unable to deploy EJB: CAService from CAWrapperEJB.jar:
    [EJB:011055]Error deploying the EJB 'CAService(Application: CAPortal, EJBComponent: CAWrapperEJB.jar)', the JNDI name 'CAPortal-CAPModel-CAService2#com.lexisnexis.service.CAService' is already in use. You must set a different JNDI name in the weblogic-ejb-jar.xml deployment descriptor or corresponding annotation for this EJB before it can be deployed.
    [03:35:14 AM] Caused by: java.lang.Throwable: Substituted for missing class [EJB - 11055]Error deploying the EJB 'CAService(Application: CAPortal, EJBComponent: CAWrapperEJB.jar)', the JNDI name 'CAPortal-CAPModel-CAService2#com.lexisnexis.service.CAnService' is already in use. You must set a different JNDI name in the weblogic-ejb-jar.xml deployment descriptor or corresponding annotation for this EJB before it can be deployed.
    [03:35:14 AM] See server logs or server console for more details.
    -to solve this issue we just delete the cache and restart the Managed server.
    Please tell me what is the cause of this error and how can we fix it permanently, as restarting the server everytime is not very convenient.
    TIA,
    Bob

    The content of "weblogic-ejb-jar.xml" present in code is:
    <?xml version = '1.0' encoding = 'windows-1252'?>
    <weblogic-ejb-jar xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.bea.com/ns/weblogic/weblogic-ejb-jar http://www.bea.com/ns/weblogic/weblogic-ejb-jar/1.0/weblogic-ejb-jar.xsd"
    xmlns="http://www.bea.com/ns/weblogic/weblogic-ejb-jar">
    </weblogic-ejb-jar>

  • Steps to deploy an ejb application and running an ejb client in weblogic server6.1

    steps to deploy an ejb application and steps to run an ejb client in weblogic server6.1
    if the client is an simple java application and if the client is a servlet

    Hi.
    Check out the beanManaged example that ships with WLS and read the accompanying docs. This
    is a simple EJB with a servlet that invokes it.
    Michael
    shekhar sachdev wrote:
    steps to deploy an ejb application and steps to run an ejb client in weblogic server6.1
    if the client is an simple java application and if the client is a servlet--
    Michael Young
    Developer Relations Engineer
    BEA Support

  • Deploying EJBs with same name in different application jars on JBOSS

    Hi,
    We are attempting to deploy entity beans with the same name in 2 different EJB application jars on jboss 3.2.5. One bean is an extension of the other, so some of the DB columns they refer to are the same (they access different DB tables in different tablespaces). However, the field names corresponding to these DB columns in the beans themselves are different (i.e. DB column serviceid is associated with the field serviceid in one bean and service_id in the other).
    We have altered jboss.xml for one of the EJB applications so that the jndi-name used to access that application's bean is different to the jndi-name used to access the entity bean in the other EJB jar.
    However, when we attempt to deploy both jar files on the same jboss server, one of the applications deploys successfully and when we deploy the other, we get EJB spec violation errors, such as the following:
    14:18:34,631 WARN [verifier] EJB spec violation:
    Bean : CommunityAddress
    Section: 10.6.2
    Warning: The entity bean class must define a get accessor for each CMP field.
    Info : Field: service_id
    I'm presuming that this is because the bean which references the serviceid DB column with a field called serviceid is being mixed up with the other bean, which has a service_id field.
    Can anyone tell me if there is anything else that is required to get entity beans/EJBs in different applications but with the same names (and some overlapping fields, etc) deployed successfully on the same jboss server apart from editing jboss.xml for one of the applications?
    Is this a jbosscmp-jdbc.xml issue?
    Any help much appreciated,
    Maurice

    Hi Srinath
    Thanks for your response. Its not cloning, its like check-in file first, then check-out the file and do some editing and then again upload the same file with different revision number using RIDC. I got the solution now.
    Regards
    Raj

  • Build a EJB/ Application with Sun One Studio and deploy to Weblogic

    Dear all,
    My boss require me to use Sun One Studio 4 update 1 to do the development, but
    I find it's a nightmare to deploy the EJB/ application to the WebLogic 6.1.
    I've already installed the weblogic plug-in in the Sun One Studio.
    During deploying I could not find any setting that ask me for the weblogic-ejb-jar.xml.
    So I think the deployment will fail.
    Is there any others tutorial or e-book that can help me to familiar with the deployment
    process?
    Many Thanks for all of you.
    Ivan

    where do you get the weblogic plugin from ?
    i am intrested in doing the same thing
    thanx
    prem
    "Ivan" <[email protected]> wrote in message
    news:[email protected]..
    >
    Dear all,
    My boss require me to use Sun One Studio 4 update 1 to do the development,but
    I find it's a nightmare to deploy the EJB/ application to the WebLogic6.1.
    >
    I've already installed the weblogic plug-in in the Sun One Studio.
    During deploying I could not find any setting that ask me for theweblogic-ejb-jar.xml.
    So I think the deployment will fail.
    Is there any others tutorial or e-book that can help me to familiar withthe deployment
    process?
    Many Thanks for all of you.
    Ivan

  • Time Out error in deploying EJB in Sun's application server

    I am facing the problem of time out error in sun's application server when deploy tool and application server is running in the same system. can any one solve my problem

    Hi,
    How big is your EJB application? i.e. how many EJBs do you have?
    Would you please try to deploy your application using the command line tool "asadmin" and see if it is also hanging? This will help us to tell if the deployment process that is hanging or the deploytool itself that is hanging. The "asadmin" tool is located under $INSTALL_HOME/bin.
    Thanks,
    Q^2

  • Multiple ejb applications deployment

    Hi,I want to know whether it is possible to deploy ejb 2.0 and ejb 3.0 applications in the same server?If I deploy it in the same server,will multiple differnet versions od ejb create ay problems?

    Raspunz wrote:
    Hi,I want to know whether it is possible to deploy ejb 2.0 and ejb 3.0 applications in the same server?yes
    If I deploy it in the same server,will multiple differnet versions od ejb create ay problems?no

  • EJB Application Deployment Error

    Hi,
    I am trying to deploy an J2EE application ear, which contains both EJB modules and a WEB module, on NW 2004's SP10.  Here is the error message that is written out to the defaultTrace file in the server logs directory:
    #1.5#00137262AE6E006500000035000012CC000438363739A6D9#1187705412772#com.sap.engine.services.deploy##com.sap.engine.services.deploy#Administrator#27239####38a7ab104ff011dca12600137262ae6e#SAPEngine_Application_Thread[impl:3]_34##0#0#Error#1#/System/Server#Java#deploy_5029##Exception in operation deploy with application champtech.com/COINejb.#2#deploy#champtech.com/COINejb#
    #1.5#00137262AE6E006500000036000012CC000438363739B7D8#1187705412788#com.sap.engine.services.deploy##com.sap.engine.services.deploy#Administrator#27239####38a7ab104ff011dca12600137262ae6e#SAPEngine_Application_Thread[impl:3]_34##0#0#Error#1#/System/Audit#Java###Exception #1#com.sap.engine.services.deploy.exceptions.ServerDeploymentException: Exception in operation deploy with application champtech.com/COINejb.
         at com.sap.engine.services.deploy.server.application.ApplicationTransaction.rollbackPart(ApplicationTransaction.java:394)
         at com.sap.engine.services.deploy.server.application.ApplicationTransaction.makeAllPhasesOnOneServer(ApplicationTransaction.java:294)
         at com.sap.engine.services.deploy.server.application.ApplicationTransaction.makeAllPhases(ApplicationTransaction.java:326)
         at com.sap.engine.services.deploy.server.DeployServiceImpl.makeGlobalTransaction(DeployServiceImpl.java:3184)
         at com.sap.engine.services.deploy.server.DeployServiceImpl.deploy(DeployServiceImpl.java:552)
         at com.sap.engine.services.deploy.server.DeployRuntimeControlImpl.deploy(DeployRuntimeControlImpl.java:262)
         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:324)
         at com.sap.pj.jmx.introspect.DefaultMBeanInvoker.invoke(DefaultMBeanInvoker.java:58)
         at com.sap.pj.jmx.mbeaninfo.AdditionalInfoProviderMBean.invoke(AdditionalInfoProviderMBean.java:289)
         at com.sap.pj.jmx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:944)
         at com.sap.pj.jmx.server.interceptor.MBeanServerWrapperInterceptor.invoke(MBeanServerWrapperInterceptor.java:288)
         at com.sap.engine.services.jmx.CompletionInterceptor.invoke(CompletionInterceptor.java:409)
         at com.sap.pj.jmx.server.interceptor.BasicMBeanServerInterceptor.invoke(BasicMBeanServerInterceptor.java:277)
         at com.sap.jmx.provider.ProviderInterceptor.invoke(ProviderInterceptor.java:258)
         at com.sap.engine.services.jmx.RedirectInterceptor.invoke(RedirectInterceptor.java:340)
         at com.sap.pj.jmx.server.interceptor.MBeanServerInterceptorChain.invoke(MBeanServerInterceptorChain.java:330)
         at com.sap.engine.services.jmx.MBeanServerSecurityWrapper.invoke(MBeanServerSecurityWrapper.java:287)
         at com.sap.engine.services.jmx.MBeanServerInvoker.invokeMbs(MBeanServerInvoker.java:131)
         at com.sap.engine.services.jmx.ClusterInterceptor.invokeMbs(ClusterInterceptor.java:212)
         at com.sap.engine.services.jmx.ClusterInterceptor.invoke(ClusterInterceptor.java:766)
         at com.sap.engine.services.jmx.MBeanServerInterceptorInvoker.invokeMbs(MBeanServerInterceptorInvoker.java:102)
         at com.sap.engine.services.jmx.connector.p4.P4ConnectorServerImpl.invokeMbs(P4ConnectorServerImpl.java:61)
         at com.sap.engine.services.jmx.connector.p4.P4ConnectorServerImplp4_Skel.dispatch(P4ConnectorServerImplp4_Skel.java:64)
         at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:320)
         at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:198)
         at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:129)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
         at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
    Caused by: com.sap.engine.services.deploy.exceptions.ServerDeploymentException: Cannot deploy application champtech.com/COINejb.
         at com.sap.engine.services.deploy.server.application.DeployUtilTransaction.commonBegin(DeployUtilTransaction.java:330)
         at com.sap.engine.services.deploy.server.application.DeploymentTransaction.begin(DeploymentTransaction.java:307)
         at com.sap.engine.services.deploy.server.application.ApplicationTransaction.makeAllPhasesOnOneServer(ApplicationTransaction.java:292)
         ... 33 more
    Caused by: com.sap.engine.services.deploy.exceptions.ServerDeploymentException: Exception during generation of components of application champtech.com/COINejb in container EJBContainer.
         at com.sap.engine.services.deploy.server.application.DeploymentTransaction.makeComponents(DeploymentTransaction.java:612)
         at com.sap.engine.services.deploy.server.application.DeployUtilTransaction.commonBegin(DeployUtilTransaction.java:321)
         ... 35 more
    Caused by: java.lang.NullPointerException
         at com.sap.engine.services.ejb.deploy.verifier.entity.EntityBMPCheck.checkEJBLocalHome(EntityBMPCheck.java:83)
         at com.sap.engine.services.ejb.deploy.verifier.entity.EntityBMPCheck.check(EntityBMPCheck.java:63)
         at com.sap.engine.services.ejb.deploy.verifier.Verifier.checkBean(Verifier.java:95)
         at com.sap.engine.services.ejb.deploy.verifier.Verifier.check(Verifier.java:46)
         at com.sap.engine.services.ejb.deploy.DeployAdmin.generate(DeployAdmin.java:254)
         at com.sap.engine.services.ejb.EJBAdmin.deploy(EJBAdmin.java:2161)
         at com.sap.engine.services.deploy.server.application.DeploymentTransaction.makeComponents(DeploymentTransaction.java:606)
         ... 36 more
    #1.5#00137262AE6E006500000038000012CC00043836373AA34F#1187705412835#com.sap.engine.services.deploy##com.sap.engine.services.deploy#Administrator#27239####38a7ab104ff011dca12600137262ae6e#SAPEngine_Application_Thread[impl:3]_34##0#0#Error#1#/System/Server#Plain###
    Operation deploy over application champtech.com/COINejb finished with errors on server 9460450. For more detailed information see traces of Deploy Service.#
    #1.5#00137262AE6E00650000003B000012CC00043836373ACAFD#1187705412850#com.sap.engine.services.deploy##com.sap.engine.services.deploy#Administrator#27239####38a7ab104ff011dca12600137262ae6e#SAPEngine_Application_Thread[impl:3]_34##0#0#Error#1#/System/Server#Java#deploy_5047##Cannot deploy application champtech.com/COINejb.#1#champtech.com/COINejb#
    #1.5#00137262AE6E00650000003C000012CC00043836373ACCCB#1187705412850#com.sap.engine.services.deploy##com.sap.engine.services.deploy#Administrator#27239####38a7ab104ff011dca12600137262ae6e#SAPEngine_Application_Thread[impl:3]_34##0#0#Error#1#/System/Audit#Java###Exception #1#com.sap.engine.services.deploy.exceptions.ServerDeploymentException: Cannot deploy application champtech.com/COINejb.
         at com.sap.engine.services.deploy.server.application.DeployUtilTransaction.commonBegin(DeployUtilTransaction.java:330)
         at com.sap.engine.services.deploy.server.application.DeploymentTransaction.begin(DeploymentTransaction.java:307)
         at com.sap.engine.services.deploy.server.application.ApplicationTransaction.makeAllPhasesOnOneServer(ApplicationTransaction.java:292)
         at com.sap.engine.services.deploy.server.application.ApplicationTransaction.makeAllPhases(ApplicationTransaction.java:326)
         at com.sap.engine.services.deploy.server.DeployServiceImpl.makeGlobalTransaction(DeployServiceImpl.java:3184)
         at com.sap.engine.services.deploy.server.DeployServiceImpl.deploy(DeployServiceImpl.java:552)
         at com.sap.engine.services.deploy.server.DeployRuntimeControlImpl.deploy(DeployRuntimeControlImpl.java:262)
         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:324)
         at com.sap.pj.jmx.introspect.DefaultMBeanInvoker.invoke(DefaultMBeanInvoker.java:58)
         at com.sap.pj.jmx.mbeaninfo.AdditionalInfoProviderMBean.invoke(AdditionalInfoProviderMBean.java:289)
         at com.sap.pj.jmx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:944)
         at com.sap.pj.jmx.server.interceptor.MBeanServerWrapperInterceptor.invoke(MBeanServerWrapperInterceptor.java:288)
         at com.sap.engine.services.jmx.CompletionInterceptor.invoke(CompletionInterceptor.java:409)
         at com.sap.pj.jmx.server.interceptor.BasicMBeanServerInterceptor.invoke(BasicMBeanServerInterceptor.java:277)
         at com.sap.jmx.provider.ProviderInterceptor.invoke(ProviderInterceptor.java:258)
         at com.sap.engine.services.jmx.RedirectInterceptor.invoke(RedirectInterceptor.java:340)
         at com.sap.pj.jmx.server.interceptor.MBeanServerInterceptorChain.invoke(MBeanServerInterceptorChain.java:330)
         at com.sap.engine.services.jmx.MBeanServerSecurityWrapper.invoke(MBeanServerSecurityWrapper.java:287)
         at com.sap.engine.services.jmx.MBeanServerInvoker.invokeMbs(MBeanServerInvoker.java:131)
         at com.sap.engine.services.jmx.ClusterInterceptor.invokeMbs(ClusterInterceptor.java:212)
         at com.sap.engine.services.jmx.ClusterInterceptor.invoke(ClusterInterceptor.java:766)
         at com.sap.engine.services.jmx.MBeanServerInterceptorInvoker.invokeMbs(MBeanServerInterceptorInvoker.java:102)
         at com.sap.engine.services.jmx.connector.p4.P4ConnectorServerImpl.invokeMbs(P4ConnectorServerImpl.java:61)
         at com.sap.engine.services.jmx.connector.p4.P4ConnectorServerImplp4_Skel.dispatch(P4ConnectorServerImplp4_Skel.java:64)
         at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:320)
         at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:198)
         at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:129)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
         at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
    Caused by: com.sap.engine.services.deploy.exceptions.ServerDeploymentException: Exception during generation of components of application champtech.com/COINejb in container EJBContainer.
         at com.sap.engine.services.deploy.server.application.DeploymentTransaction.makeComponents(DeploymentTransaction.java:612)
         at com.sap.engine.services.deploy.server.application.DeployUtilTransaction.commonBegin(DeployUtilTransaction.java:321)
         ... 35 more
    Caused by: java.lang.NullPointerException
         at com.sap.engine.services.ejb.deploy.verifier.entity.EntityBMPCheck.checkEJBLocalHome(EntityBMPCheck.java:83)
         at com.sap.engine.services.ejb.deploy.verifier.entity.EntityBMPCheck.check(EntityBMPCheck.java:63)
         at com.sap.engine.services.ejb.deploy.verifier.Verifier.checkBean(Verifier.java:95)
         at com.sap.engine.services.ejb.deploy.verifier.Verifier.check(Verifier.java:46)
         at com.sap.engine.services.ejb.deploy.DeployAdmin.generate(DeployAdmin.java:254)
         at com.sap.engine.services.ejb.EJBAdmin.deploy(EJBAdmin.java:2161)
         at com.sap.engine.services.deploy.server.application.DeploymentTransaction.makeComponents(DeploymentTransaction.java:606)
         ... 36 more
    #1.5#00137262AE6E00650000003E000012CC00043836373ADBB9#1187705412850#com.sap.engine.services.jmx.MBeanServerInvoker##com.sap.engine.services.jmx.MBeanServerInvoker#Administrator#27239####38a7ab104ff011dca12600137262ae6e#SAPEngine_Application_Thread[impl:3]_34##0#0#Warning#1#/System/Server#Java###Exception occurred while processing external JMX request [ JMX request (java) v1.0 len: 551 |  src: 2 target-node: 9460450 req: invoke params-number: 4 params-bytes: 0 | :name=deploy,j2eeType=SAP_J2EEServiceRuntimePerNode,SAP_J2EEClusterNode=9460450,SAP_J2EECluster="" deploy [Ljava.lang.Object;@67beb7 [Ljava.lang.String;@11a0ebf ]
    [EXCEPTION]
    #1#javax.management.MBeanException: Exception invoking method deploy
         at com.sap.pj.jmx.introspect.DefaultMBeanInvoker.invoke(DefaultMBeanInvoker.java:80)
         at com.sap.pj.jmx.mbeaninfo.AdditionalInfoProviderMBean.invoke(AdditionalInfoProviderMBean.java:289)
         at com.sap.pj.jmx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:944)
         at com.sap.pj.jmx.server.interceptor.MBeanServerWrapperInterceptor.invoke(MBeanServerWrapperInterceptor.java:288)
         at com.sap.engine.services.jmx.CompletionInterceptor.invoke(CompletionInterceptor.java:409)
         at com.sap.pj.jmx.server.interceptor.BasicMBeanServerInterceptor.invoke(BasicMBeanServerInterceptor.java:277)
         at com.sap.jmx.provider.ProviderInterceptor.invoke(ProviderInterceptor.java:258)
         at com.sap.engine.services.jmx.RedirectInterceptor.invoke(RedirectInterceptor.java:340)
         at com.sap.pj.jmx.server.interceptor.MBeanServerInterceptorChain.invoke(MBeanServerInterceptorChain.java:330)
         at com.sap.engine.services.jmx.MBeanServerSecurityWrapper.invoke(MBeanServerSecurityWrapper.java:287)
         at com.sap.engine.services.jmx.MBeanServerInvoker.invokeMbs(MBeanServerInvoker.java:131)
         at com.sap.engine.services.jmx.ClusterInterceptor.invokeMbs(ClusterInterceptor.java:212)
         at com.sap.engine.services.jmx.ClusterInterceptor.invoke(ClusterInterceptor.java:766)
         at com.sap.engine.services.jmx.MBeanServerInterceptorInvoker.invokeMbs(MBeanServerInterceptorInvoker.java:102)
         at com.sap.engine.services.jmx.connector.p4.P4ConnectorServerImpl.invokeMbs(P4ConnectorServerImpl.java:61)
         at com.sap.engine.services.jmx.connector.p4.P4ConnectorServerImplp4_Skel.dispatch(P4ConnectorServerImplp4_Skel.java:64)
         at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:320)
         at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:198)
         at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:129)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
         at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
    Caused by: java.rmi.RemoteException: Cannot deploy application champtech.com/COINejb..
    Reason: Exception during generation of components of application champtech.com/COINejb in container EJBContainer.; nested exception is:
         com.sap.engine.services.deploy.exceptions.ServerDeploymentException: Exception during generation of components of application champtech.com/COINejb in container EJBContainer.
         at com.sap.engine.services.deploy.server.DeployServiceImpl.deploy(DeployServiceImpl.java:567)
         at com.sap.engine.services.deploy.server.DeployRuntimeControlImpl.deploy(DeployRuntimeControlImpl.java:262)
         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:324)
         at com.sap.pj.jmx.introspect.DefaultMBeanInvoker.invoke(DefaultMBeanInvoker.java:58)
         ... 24 more
    Caused by: com.sap.engine.services.deploy.exceptions.ServerDeploymentException: Exception during generation of components of application champtech.com/COINejb in container EJBContainer.
         at com.sap.engine.services.deploy.server.application.DeploymentTransaction.makeComponents(DeploymentTransaction.java:612)
         at com.sap.engine.services.deploy.server.application.DeployUtilTransaction.commonBegin(DeployUtilTransaction.java:321)
         at com.sap.engine.services.deploy.server.application.DeploymentTransaction.begin(DeploymentTransaction.java:307)
         at com.sap.engine.services.deploy.server.application.ApplicationTransaction.makeAllPhasesOnOneServer(ApplicationTransaction.java:292)
         at com.sap.engine.services.deploy.server.application.ApplicationTransaction.makeAllPhases(ApplicationTransaction.java:326)
         at com.sap.engine.services.deploy.server.DeployServiceImpl.makeGlobalTransaction(DeployServiceImpl.java:3184)
         at com.sap.engine.services.deploy.server.DeployServiceImpl.deploy(DeployServiceImpl.java:552)
         ... 30 more
    Caused by: java.lang.NullPointerException
         at com.sap.engine.services.ejb.deploy.verifier.entity.EntityBMPCheck.checkEJBLocalHome(EntityBMPCheck.java:83)
         at com.sap.engine.services.ejb.deploy.verifier.entity.EntityBMPCheck.check(EntityBMPCheck.java:63)
         at com.sap.engine.services.ejb.deploy.verifier.Verifier.checkBean(Verifier.java:95)
         at com.sap.engine.services.ejb.deploy.verifier.Verifier.check(Verifier.java:46)
         at com.sap.engine.services.ejb.deploy.DeployAdmin.generate(DeployAdmin.java:254)
         at com.sap.engine.services.ejb.EJBAdmin.deploy(EJBAdmin.java:2161)
         at com.sap.engine.services.deploy.server.application.DeploymentTransaction.makeComponents(DeploymentTransaction.java:606)
         ... 36 more
    caused by -
    java.rmi.RemoteException: Cannot deploy application champtech.com/COINejb..
    Reason: Exception during generation of components of application champtech.com/COINejb in container EJBContainer.; nested exception is:
         com.sap.engine.services.deploy.exceptions.ServerDeploymentException: Exception during generation of components of application champtech.com/COINejb in container EJBContainer.
         at com.sap.engine.services.deploy.server.DeployServiceImpl.deploy(DeployServiceImpl.java:567)
         at com.sap.engine.services.deploy.server.DeployRuntimeControlImpl.deploy(DeployRuntimeControlImpl.java:262)
         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:324)
         at com.sap.pj.jmx.introspect.DefaultMBeanInvoker.invoke(DefaultMBeanInvoker.java:58)
         at com.sap.pj.jmx.mbeaninfo.AdditionalInfoProviderMBean.invoke(AdditionalInfoProviderMBean.java:289)
         at com.sap.pj.jmx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:944)
         at com.sap.pj.jmx.server.interceptor.MBeanServerWrapperInterceptor.invoke(MBeanServerWrapperInterceptor.java:288)
         at com.sap.engine.services.jmx.CompletionInterceptor.invoke(CompletionInterceptor.java:409)
         at com.sap.pj.jmx.server.interceptor.BasicMBeanServerInterceptor.invoke(BasicMBeanServerInterceptor.java:277)
         at com.sap.jmx.provider.ProviderInterceptor.invoke(ProviderInterceptor.java:258)
         at com.sap.engine.services.jmx.RedirectInterceptor.invoke(RedirectInterceptor.java:340)
         at com.sap.pj.jmx.server.interceptor.MBeanServerInterceptorChain.invoke(MBeanServerInterceptorChain.java:330)
         at com.sap.engine.services.jmx.MBeanServerSecurityWrapper.invoke(MBeanServerSecurityWrapper.java:287)
         at com.sap.engine.services.jmx.MBeanServerInvoker.invokeMbs(MBeanServerInvoker.java:131)
         at com.sap.engine.services.jmx.ClusterInterceptor.invokeMbs(ClusterInterceptor.java:212)
         at com.sap.engine.services.jmx.ClusterInterceptor.invoke(ClusterInterceptor.java:766)
         at com.sap.engine.services.jmx.MBeanServerInterceptorInvoker.invokeMbs(MBeanServerInterceptorInvoker.java:102)
         at com.sap.engine.services.jmx.connector.p4.P4ConnectorServerImpl.invokeMbs(P4ConnectorServerImpl.java:61)
         at com.sap.engine.services.jmx.connector.p4.P4ConnectorServerImplp4_Skel.dispatch(P4ConnectorServerImplp4_Skel.java:64)
         at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:320)
         at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:198)
         at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:129)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
         at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
    Caused by: com.sap.engine.services.deploy.exceptions.ServerDeploymentException: Exception during generation of components of application champtech.com/COINejb in container EJBContainer.
         at com.sap.engine.services.deploy.server.application.DeploymentTransaction.makeComponents(DeploymentTransaction.java:612)
         at com.sap.engine.services.deploy.server.application.DeployUtilTransaction.commonBegin(DeployUtilTransaction.java:321)
         at com.sap.engine.services.deploy.server.application.DeploymentTransaction.begin(DeploymentTransaction.java:307)
         at com.sap.engine.services.deploy.server.application.ApplicationTransaction.makeAllPhasesOnOneServer(ApplicationTransaction.java:292)
         at com.sap.engine.services.deploy.server.application.ApplicationTransaction.makeAllPhases(ApplicationTransaction.java:326)
         at com.sap.engine.services.deploy.server.DeployServiceImpl.makeGlobalTransaction(DeployServiceImpl.java:3184)
         at com.sap.engine.services.deploy.server.DeployServiceImpl.deploy(DeployServiceImpl.java:552)
         ... 30 more
    Caused by: java.lang.NullPointerException
         at com.sap.engine.services.ejb.deploy.verifier.entity.EntityBMPCheck.checkEJBLocalHome(EntityBMPCheck.java:83)
         at com.sap.engine.services.ejb.deploy.verifier.entity.EntityBMPCheck.check(EntityBMPCheck.java:63)
         at com.sap.engine.services.ejb.deploy.verifier.Verifier.checkBean(Verifier.java:95)
         at com.sap.engine.services.ejb.deploy.verifier.Verifier.check(Verifier.java:46)
         at com.sap.engine.services.ejb.deploy.DeployAdmin.generate(DeployAdmin.java:254)
         at com.sap.engine.services.ejb.EJBAdmin.deploy(EJBAdmin.java:2161)
         at com.sap.engine.services.deploy.server.application.DeploymentTransaction.makeComponents(DeploymentTransaction.java:606)
         ... 36 more
    It seems that from the exception message that there is an issue loading or locating the EJB local home interface, however I am not exactly sure what is going as I can't find any additional information on this issue in the NW logs.  I have a previous ear that will deploy.  This earlier ear file only contains EJB remote interfaces.  In the newer ear I have implemented and added the EJB local interface and believe that I have the correct configurations, since the NW IDE doesn't show any errors and is able to generate the EJB archieves and the deployment EAR.
    Any assistance or help would be greatly appreciated as I have hit a wall on this.
    Thanks

    Here is one of my EJB modules ejb-jar.xml configuration files:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN"
                             "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
    <ejb-jar>
        <description>EJB JAR description</description>
        <display-name>EJB JAR</display-name>
        <enterprise-beans>
            <session>
                <ejb-name>AlertFacadeBean</ejb-name>
                <home>com.champtech.coin.alerts.session.remote.RemoteAlertFacadeHome</home>
                <remote>com.champtech.coin.alerts.session.remote.RemoteAlertFacade</remote>
                <local-home>com.champtech.coin.alerts.session.local.LocalAlertFacadeHome</local-home>
                <local>com.champtech.coin.alerts.session.local.LocalAlertFacade</local>
                <ejb-class>com.champtech.coin.alerts.session.AlertFacadeBean</ejb-class>
                <session-type>Stateful</session-type>
                <transaction-type>Container</transaction-type>
            </session>
            <entity>
                <ejb-name>AlertBean</ejb-name>
                <home>com.champtech.coin.alerts.entity.remote.RemoteAlertHome</home>
                <remote>com.champtech.coin.alerts.entity.remote.RemoteAlert</remote>
                <local-home>com.champtech.coin.alerts.entity.local.LocalAlertHome</local-home>
                <local>com.champtech.coin.alerts.entity.local.LocalAlert</local>
                <ejb-class>com.champtech.coin.alerts.entity.AlertBean</ejb-class>
                <persistence-type>Bean</persistence-type>
                <prim-key-class>java.lang.Long</prim-key-class>
                <reentrant>False</reentrant>
            </entity>
            <entity>
                <ejb-name>AlertInstanceBean</ejb-name>
                <home>com.champtech.coin.alerts.entity.remote.RemoteAlertInstanceHome</home>
                <remote>com.champtech.coin.alerts.entity.remote.RemoteAlertInstance</remote>
                <local-home>com.champtech.coin.alerts.entity.local.LocalAlertInstanceHome</local-home>
                <local>com.champtech.coin.alerts.entity.local.LocalAlertInstance</local>
                <ejb-class>com.champtech.coin.alerts.entity.AlertInstanceBean</ejb-class>
                <persistence-type>Bean</persistence-type>
                <prim-key-class>java.lang.Long</prim-key-class>
                <reentrant>False</reentrant>
            </entity>
            <entity>
                <ejb-name>AlertLogBean</ejb-name>
                <home>com.champtech.coin.alerts.entity.remote.RemoteAlertLogHome</home>
                <remote>com.champtech.coin.alerts.entity.remote.RemoteAlertLog</remote>
                <local-home>com.champtech.coin.alerts.entity.local.LocalAlertLogHome</local-home>
                <local>com.champtech.coin.alerts.entity.local.LocalAlertLog</local>
                <ejb-class>com.champtech.coin.alerts.entity.AlertLogBean</ejb-class>
                <persistence-type>Bean</persistence-type>
                <prim-key-class>java.lang.Long</prim-key-class>
                <reentrant>False</reentrant>
            </entity>
            <entity>
                <ejb-name>SubscriptionBean</ejb-name>
                <home>com.champtech.coin.alerts.entity.remote.RemoteSubscriptionHome</home>
                <remote>com.champtech.coin.alerts.entity.remote.RemoteSubscription</remote>
                <local-home>com.champtech.coin.alerts.entity.local.LocalSubscriptionHome</local-home>
                <local>com.champtech.coin.alerts.entity.local.LocalSubscription</local>
                <ejb-class>com.champtech.coin.alerts.entity.SubscriptionBean</ejb-class>
                <persistence-type>Bean</persistence-type>
                <prim-key-class>java.lang.Object</prim-key-class>
                <reentrant>False</reentrant>
            </entity>
        </enterprise-beans>
    </ejb-jar>

  • How to deploy a complex EJB application?

    Hi!
    I have 3 questions.
    1. Is it really possible to deploy complex EJB applications with Oracle 8.1.7 ( or 9i )?
    I mean, something like, for example, Sun's Java Pet Store. Because all examples that I've seen on Oracle's technet site contained not more that one enterprise bean.
    2. Am I allowed to use JDK1.3 when I develop
    applications that will run on Oracle JVM? When I compiled the "Customer" entity bean example having only JDK1.3 environment on my machine, the deployejb tool failed to deploy the bean. When I switched to JDK1.2.2 environment, the problem was solved ( I use Win2000 Professional OS )
    3. When will Oracle support Collection for finder methods return? It's so uggly, slowly and unpractical to work with Enumeration....
    Thanks a lot!

    OK. I know the Java 2 EE, and I work since 2 years with it. I know all the specifications, and API's. Of course I know that the XML files are deployment descriptors. In fact, the application that I want to deploy with Oracle App. Server was succesfully deployed an runned by me on Weblogic and on OrionServer. So I just wandered IF there is an example of a complex app deployment with Oracle App Server ( like, for exampe, BEA delivers it's App. Server with Java Pet Store deployed ), so that I can see how Oracle App. Server do O/R mapping and IF I am able to use their App Server for development purpouse also.
    Thanks a lot.

  • Exception during deployment of EJB application

    Hi Experts,
    I'm deploying one EJB application which is giving following warning.
    What's the cause of it?
    Caught exception during application startup from SAP J2EE Engine's deploy service:
    java.rmi.RemoteException: Error occurred while starting application asianpaints.com/bsApp and wait.
    Reason: Clusterwide exception: server ID 8216350:com.sap.engine.services.ejb.exceptions.deployment.EJBDeploymentException: The DataSource for PersistenceManager J2EDB is not created.
         at com.sap.engine.services.ejb.entity.pm.PersistenceManager.initDataSource(PersistenceManager.java:217)
         at com.sap.engine.services.ejb.EJBAdmin.commitLoad(EJBAdmin.java:1112)
         at com.sap.engine.services.ejb.EJBAdmin.prepareStart(EJBAdmin.java:2428)
         at com.sap.engine.services.deploy.server.application.StartTransaction.prepareCommon(StartTransaction.java:239)
         at com.sap.engine.services.deploy.server.application.StartTransaction.prepare(StartTransaction.java:187)
         at com.sap.engine.services.deploy.server.application.ApplicationTransaction.makeAllPhasesOnOneServer(ApplicationTransaction.java:301)
         at com.sap.engine.services.deploy.server.application.ParallelAdapter.makeAllPhasesImpl(ParallelAdapter.java:327)
         at com.sap.engine.services.deploy.server.application.ParallelAdapter.runInTheSameThread(ParallelAdapter.java:111)
         at com.sap.engine.services.deploy.server.application.ParallelAdapter.makeAllPhasesAndWait(ParallelAdapter.java:230)
         at com.sap.engine.services.deploy.server.DeployServiceImpl.startApplicationAndWait(DeployServiceImpl.java:4700)
         at com.sap.engine.services.deploy.server.DeployServiceImpl.startApplicationAndWait(DeployServiceImpl.java:4605)
         at com.sap.engine.services.deploy.server.DeployServiceImpl.startApplicationAndWait(DeployServiceImpl.java:4578)
         at com.sap.engine.services.deploy.server.DeployServiceImplp4_Skel.dispatch(DeployServiceImplp4_Skel.java:1163)
         at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:304)
         at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:193)
         at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:122)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
         at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
    Caused by: com.sap.engine.services.jndi.persistent.exceptions.NamingException: Exception during lookup operation of object with name ejbContainer/cmp/tx/asianpaints.com/bsApp/J2EDB, cannot resolve object reference. [Root exception is com.sap.engine.services.connector.exceptions.BaseResourceException: ConnectionFactory "J2EDB" does not exist. Possible reasons: the connector in which ConnectionFactory "J2EDB" is defined is not deployed or not started.]
         at com.sap.engine.services.jndi.implclient.ClientContext.lookup(ClientContext.java:529)
         at com.sap.engine.services.jndi.implclient.ClientContext.lookup(ClientContext.java:639)
         at javax.naming.InitialContext.lookup(InitialContext.java:347)
         at javax.naming.InitialContext.lookup(InitialContext.java:347)
         at com.sap.engine.services.ejb.entity.pm.PersistenceManager.initDataSource(PersistenceManager.java:185)
         ... 21 more
    Caused by: com.sap.engine.services.connector.exceptions.BaseResourceException: ConnectionFactory "J2EDB" does not exist. Possible reasons: the connector in which ConnectionFactory "J2EDB" is defined is not deployed or not started.
         at com.sap.engine.services.connector.ResourceObjectFactory.getObjectInstance(ResourceObjectFactory.java:207)
         at com.sap.engine.system.naming.provider.ObjectFactoryBuilderImpl._getObjectInstance(ObjectFactoryBuilderImpl.java:72)
         at com.sap.engine.system.naming.provider.ObjectFactoryBuilderImpl.access$100(ObjectFactoryBuilderImpl.java:31)
         at com.sap.engine.system.naming.provider.ObjectFactoryBuilderImpl$DispatchObjectFactory.getObjectInstance(ObjectFactoryBuilderImpl.java:210)
         at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:280)
         at com.sap.engine.services.jndi.implclient.ClientContext.lookup(ClientContext.java:414)
         ... 25 more
    Pls help as im waiting for your reply...
    regards,
    Amey

    Hi Yordan,
    This is where im specifying my datasource in persistent.xml file(that is  in "General tab"  of EJB DC)
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE persistent-ejb-map SYSTEM "persistent.dtd">
    <persistent-ejb-map>
         <locking
              type="Table"/>
         <db-properties>
              <data-source-name>J2EDB</data-source-name>
         </db-properties>
         <entity-beans>
              <entity-bean>
                   <ejb-name>OEMBean</ejb-name>

  • Deploying jdeveloper's jsf toplink ejb application to jboss4.0.4

    hi java/j2ee developers,
    we developed a application using jdeveloper ide using jsf,toplink and ejb technologies, when we deploying this application to jboss4.0.4 application server we are getting the following exception
    org.jboss.deployment.DeploymentException: Failed to parse WEB-INF/web.xml; - nested throwable: (org.jboss.deployment.DeploymentException: expected one local-home tag)
    at org.jboss.web.AbstractWebContainer.parseMetaData(AbstractWebContainer.java:749)
    at org.jboss.web.AbstractWebContainer.init(AbstractWebContainer.java:356)
    if anybody knows how to solv e this one, please give us the reply as soon as possible,Thanks In Advance.we are waiting for your kind information.Thank you once again.

    Basically I started to develop this system inside Oracle AS and then when it came time to passing a request to a new page, it crapped out on me on the App. Server. So instead of trying to fix the problem there and then I continued to develop outside Portal and inside Jdeveloper. After a week or two once all my stuff worked perfectly I try and take it back into Portal but only the first JSP of all my Portlets would show up, because as soon as I would submit a form and the action directed me to a new page and Portal would be lost/confused. Obviously I shouldn't have done it that way but none the less...
    So now I'm reading through the documentation you pointed me towards and it seems I have to qualify my parameters and then "attach" them to the url which the form will pass to the actioned page. I'm importing numerous classes (...urlUtils, etc) in order to qualify the parameters and then build this url without affecting any parameters currently present that my portlet does not own.
    What I'm rambling towards here is all this separation of logic and presentation and the whole nine, implies different people can develop different parts of a 'system' mostly independant of one another...so in my situation I shouldn't in huge trouble yet, since underlying everything is a working system. My issue is with oracle and the App Server. If I take my code which works great outside of the App. Server and I fully qualify parameters and make sure my form actions are constructed using the UrlUtils in order to fully qualify them as well, and then I make sure page parameters are mapped to the proper portlet parameter values....should my system work on the App Server (assuming everything is done properly)....or am I still missing something.

  • [UNSOLVED] deploy ejb-jsf application to jboss

    I have developed a very simple web application with jdev 10.1.3.1 j2ee edition (no adf). The application uses ejb 3.0 and jsf technology.
    The application follows the pattern of the ‘Java EE tutorial’ at this url:
    http://www.oracle.com/technology/obe/JavaEE_tutorial_10131/index.htm ,
    but it is much simpler and I don’t use security mechanisms.
    For instance I use a session façade.
    The application has two projects: Model and ViewController. To deploy the application I created an ejb jar deployment profile for the model project and a war deployment profile for the ViewController. Then I created a new ‘Deployment’ project with an ear deployment profile to assemble the ejb jar and war deployment profiles. In this way I was able to deploy to standalone oc4j.
    Now I want to deploy to jboss 4.0.4 GA, I mapped the jboss connection within jdev and selected ‘deploy to jboss’. The ear is transferred to the correct folder, but the application folder is not generated and the jboss log shows at least one error. As you can see below, it seems it expects the local-home tag for the session façade, but I deleted it as suggested in the tutorial.
    I really need help on this topic, thank you.
    Mauro
    2006-12-01 16:20:51,250 WARN [org.jboss.util.NestedThrowable] Duplicate throwable nesting of same base type: class org.jboss.deployment.DeploymentException is assignable from: class org.jboss.deployment.DeploymentException
    2006-12-01 16:20:51,250 DEBUG [org.jboss.web.tomcat.tc5.Tomcat5] Problem in init
    org.jboss.deployment.DeploymentException: Failed to parse WEB-INF/web.xml; - nested throwable: (org.jboss.deployment.DeploymentException: expected one local-home tag)
         at org.jboss.web.AbstractWebContainer.parseMetaData(AbstractWebContainer.java:749)
         at org.jboss.web.AbstractWebContainer.init(AbstractWebContainer.java:356)
    Message was edited by:
    mauro avon

    <?xml version = '1.0' encoding = 'windows-1252'?>
    <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee">
    <description>Empty web.xml file for Web Application</description>
    <servlet>
    <servlet-name>Faces Servlet</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>/faces/*</url-pattern>
    </servlet-mapping>
    <session-config>
    <session-timeout>35</session-timeout>
    </session-config>
    <mime-mapping>
    <extension>html</extension>
    <mime-type>text/html</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>txt</extension>
    <mime-type>text/plain</mime-type>
    </mime-mapping>
    <jsp-config/>
    <ejb-local-ref>
    <ejb-ref-name>ejb/ProvaScrFacade</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <local>provascr.business.ProvaScrFacadeLocal</local>
    <ejb-link>ProvaScrFacade</ejb-link>
    </ejb-local-ref>
    </web-app>

  • Error while deploying EJB 1.1 on Weblogic 10.3.0.0

    I am trying to deploy an EJB (1.1) jar which is succesfully running on JBoss5.0 on WebLogic 10.3.0.0; I am getting following Error while deploying the jar on weblogic;
    Exception preparing module: EJBModule(ejb_RemoteServicesEjb) Unable to deploy EJB: RemoteServicesEjb.jar from RemoteServicesEjb.jar: There are 1 nested errors: weblogic.ejb.container.compliance.ComplianceException: In EJB com.package.ejbimpl.RemoteServicesEjb, the throws clause for ejbCreate method ejbCreate() contains exceptions that are NOT in the throws clause of the corresponding home interface method. at weblogic.ejb.container.compliance.HomeInterfaceChecker.checkCreateMethodsMatchBeanCreates(HomeInterfaceChecker.java:365) 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:597) at weblogic.ejb.container.compliance.EJBComplianceChecker.check(EJBComplianceChecker.java:337) at weblogic.ejb.container.compliance.EJBComplianceChecker.checkDeploymentInfo(EJBComplianceChecker.java:286) at weblogic.ejb.container.ejbc.EJBCompiler.complianceCheckJar(EJBCompiler.java:952) at weblogic.ejb.container.ejbc.EJBCompiler.checkCompliance(EJBCompiler.java:920) at weblogic.ejb.container.ejbc.EJBCompiler.doCompile(EJBCompiler.java:246) at weblogic.ejb.container.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:552) at weblogic.ejb.container.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:519) at weblogic.ejb.container.deployer.EJBDeployer.runEJBC(EJBDeployer.java:393) at weblogic.ejb.container.deployer.EJBDeployer.compileJar(EJBDeployer.java:715) at weblogic.ejb.container.deployer.EJBDeployer.compileIfNecessary(EJBDeployer.java:618) at weblogic.ejb.container.deployer.EJBDeployer.prepare(EJBDeployer.java:1154) at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:425) at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:93) at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:387) at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37) at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:58) at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:42) at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.java:615) at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37) at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:191) at weblogic.application.internal.SingleModuleDeployment.prepare(SingleModuleDeployment.java:16) at weblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:155) at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:60) at weblogic.deploy.internal.targetserver.operations.ActivateOperation.createAndPrepareContainer(ActivateOperation.java:197) at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doPrepare(ActivateOperation.java:89) at weblogic.deploy.internal.targetserver.operations.AbstractOperation.prepare(AbstractOperation.java:217) at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentPrepare(DeploymentManager.java:723) at weblogic.deploy.internal.targetserver.DeploymentManager.prepareDeploymentList(DeploymentManager.java:1190) at weblogic.deploy.internal.targetserver.DeploymentManager.handlePrepare(DeploymentManager.java:248) at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.prepare(DeploymentServiceDispatcher.java:159) 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.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:516) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201) at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Does anybody knows what must be going wrong?
    Can't I deploy EJB 1.1 jar directly on Weblogic 10.3.0.0 or I need to change or configure something before doing it?

    Does the ejbCreate() method of the com.package.ejbimpl.RemoteServicesEjb class have an exception on it's throws clause that is not present on the ejbCreate() method of your home interface? If so, does the error go away if you add the exception to the home's ejbCreate() method? In general, you want checked exceptions in a throws clause to match between the interface declaration of the method and the implementation of the method on the bean class.
    - Matt

  • Calling a newly deployed EJB from an EJB gives a NoSuchMethod Exception if the jar of the newly deployed ejb is not in the classpath

    Hi ,
    I have an EJB A which is already deployed when the server starts. A second ejb
    B is deployed at a later time.
    EJB A calls methods in EJB B. I use reflection in EJB A to call methods in EJB
    B.
    I get a NoSuchMethodException when I call the create method in the Home object
    of EJB B. If I add the ejb jar file to the classpath before the server starts
    then it is able to resolve the method.
    The problem is the EJBs which are called from EJB A is not known before the server
    is started. New EJBs can be deployed at runtime and EJB A should be able call
    the methods in newly deployed EJB's.
    I also use the URLClassLoader to load all the classes in the jar file of the newly
    deployed EJB in EJB A and it still gives a NoSuchMethodException because it cannot
    resolve the stub class.
    My error log is shown below.
    This is an urgent issue.
    Thanks
    SampleConnector::testEJBService called
    In Key : P1 Value : Input2
    In Key : P3 Value : Input1
    In Key : P2 Value : SomeConst
    Loaded Class = com.bizwave.samples.rejb.SampleRemote
    Loaded Class = com.bizwave.samples.rejb.SampleRemoteEJB
    Loaded Class = com.bizwave.samples.rejb.SampleRemoteEJB_svq1df_EOImpl
    Loaded Class = com.bizwave.samples.rejb.SampleRemoteEJB_svq1df_HomeImpl
    Loaded Class = com.bizwave.samples.rejb.SampleRemoteEJB_svq1df_Impl
    Loaded Class = com.bizwave.samples.rejb.SampleRemoteHome
    java.lang.NoSuchMethodException
    at java.lang.Class.getMethod0(Native Method)
    at java.lang.Class.getDeclaredMethod(Class.java:1151)
    at com.bizwave.samples.ejb.SampleConnectorEJB.testEJBService(SampleCon
    ctorEJB.java:181)
    at com.bizwave.samples.ejb.SampleConnectorEJB_be5y1v_EOImpl.testEJBSer
    ce(SampleConnectorEJB_be5y1v_EOImpl.java:98)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.bizwave.fc.utils.ClassUtils.invokeEJBMethod(ClassUtils.java:109
    at com.bizwave.infra.fjet.engine.EJBServiceStepMgr.executeService(EJBS
    viceStepMgr.java:91)

    Hi,
    I am attaching a test case. This test case actually demonstrates a security bug.
    Unzip the file and modify the StartWeblogic.cmd in domainA to not refer to the
    SampleRemoteEJB.jar in the classpath. If u run the test client under the client
    dir u will see a NoSuchMethodException.
    The reason is it is not able to load the dynamically generated stub file.
    Initially I had the getMethod and it didn't work. You might have to modify the
    files to suit ur env. The easier way is to run th edomain wizard and create 2
    domains. Run the servers in development mode and place the jars under the applications
    dir
    Thanks
    Rajesh Mirchandani <[email protected]> wrote:
    Do you have any old EJB classes in your classpath? Did you recompile
    your EJBs if you
    upgraded from a old release or a Service pack?
    Bob Lee wrote:
    Hmmmm. That's an interesting problem.
    Why is it giving you a NoSuchMethodException instead of a
    ClassNotFoundException?
    Can you post the code from SampleConctorEJB.java, line 181?
    Try changing your call to getDeclaredMethod() to getMethod().
    getDeclaredMethod() searches only the class you called it on, whereas
    getMethod() traverses to the superclasses and interfaces. You onlyneed
    getDeclaredMethod() when you're accessing a nonpublic method.
    Not sure if this will help, but it's worth a shot.
    Bob
    Vasu wrote:
    Hi ,
    I have an EJB A which is already deployed when the server starts.
    A second ejb
    B is deployed at a later time.
    EJB A calls methods in EJB B. I use reflection in EJB A to call methodsin EJB
    B.
    I get a NoSuchMethodException when I call the create method in theHome object
    of EJB B. If I add the ejb jar file to the classpath before the serverstarts
    then it is able to resolve the method.
    The problem is the EJBs which are called from EJB A is not knownbefore the server
    is started. New EJBs can be deployed at runtime and EJB A shouldbe able call
    the methods in newly deployed EJB's.
    I also use the URLClassLoader to load all the classes in the jarfile of the newly
    deployed EJB in EJB A and it still gives a NoSuchMethodExceptionbecause it cannot
    resolve the stub class.
    My error log is shown below.
    This is an urgent issue.
    Thanks
    SampleConnector::testEJBService called
    In Key : P1 Value : Input2
    In Key : P3 Value : Input1
    In Key : P2 Value : SomeConst
    Loaded Class = com.bizwave.samples.rejb.SampleRemote
    Loaded Class = com.bizwave.samples.rejb.SampleRemoteEJB
    Loaded Class = com.bizwave.samples.rejb.SampleRemoteEJB_svq1df_EOImpl
    Loaded Class = com.bizwave.samples.rejb.SampleRemoteEJB_svq1df_HomeImpl
    Loaded Class = com.bizwave.samples.rejb.SampleRemoteEJB_svq1df_Impl
    Loaded Class = com.bizwave.samples.rejb.SampleRemoteHome
    java.lang.NoSuchMethodException
    at java.lang.Class.getMethod0(Native Method)
    at java.lang.Class.getDeclaredMethod(Class.java:1151)
    at com.bizwave.samples.ejb.SampleConnectorEJB.testEJBService(SampleCon
    ctorEJB.java:181)
    at com.bizwave.samples.ejb.SampleConnectorEJB_be5y1v_EOImpl.testEJBSer
    ce(SampleConnectorEJB_be5y1v_EOImpl.java:98)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.bizwave.fc.utils.ClassUtils.invokeEJBMethod(ClassUtils.java:109
    at com.bizwave.infra.fjet.engine.EJBServiceStepMgr.executeService(EJBS
    viceStepMgr.java:91)
    Rajesh Mirchandani
    Developer Relations Engineer
    BEA Support
    [user_projects.zip]

Maybe you are looking for

  • On a good screen is there ANY negative black effect?

    My iPhone is a replacement refurbished unit. Since my replacement, I am experiencing negative black effect and dead spot. Few weeks ago, I called Apple care and after explaining the problem, they sent me a loaner and shipped mine to Apple center for

  • Saving a slide show with the music

    I have set up a slide show in Iphoto '08 and selected the music to go with it, but when I try and select "Save Settings" it does not save the settings... well at least it does not save the song I put with it. How do I save the song to the slide show.

  • Change monitor pop-up menu to "On with feedback protection"

    I bought a GarageBand book, Apple Training Series: GarageBand '09, to guide me through the learning curve with GarageBand. In the book it says to "Change monitor pop-up menu to "On with feedback protection"" but my GarageBand does not have this optio

  • Problem with XK99 Mass Load Maintenance

    Hi all, While trying to use XK99 for Mass Load Maintenance, to mark suppliers for deletion at Co Code level (LFB1-LOEVM), we're getting the error 'Changes could not be saved' and we couldn't find the reason why. Can you give us a hand on this to figu

  • MYSQL data connection

    I have PHP working and test, but when I try to setup the MYSQL connect, I click the the select Database, I get an error " An unknow error has occured". Help!