Weblogic-ejb-extensions.xml not producing desired effect

weblogic-ejb-extensions.xml seems to have no effect on the output pstore
location when deploying a stateful bean.
i get the following errors...
weblogic.ejb.common.DeploymentException: ; nested exception is:
java.io.IOException: Could not make directory
/usr/local/weblogic/pstore/stateful.Browse
java.io.IOException: Could not make directory
/usr/local/weblogic/pstore/stateful.Browse
in the extensions xml i have the following:
<persistence-store-descriptor>
<persistence-store-file>
<persistence-store-directory-root>
/usr/local/weblogic/karson/pstore
</persistence-store-directory-root>
</persistence-store-file>
</persistence-store-descriptor>
as you can see from the above error the deployer is not using this
information.
any help is much appreciated.
i also do not see a dtd for the weblogic-ejb-extensions.xml install, but i
do for the more typical files such as weblogic-ejb-jar.xml . where is this
dtd located?
Karson

weblogic-ejb-extensions.xml seems to have no effect on the output pstore
location when deploying a stateful bean.
i get the following errors...
weblogic.ejb.common.DeploymentException: ; nested exception is:
java.io.IOException: Could not make directory
/usr/local/weblogic/pstore/stateful.Browse
java.io.IOException: Could not make directory
/usr/local/weblogic/pstore/stateful.Browse
in the extensions xml i have the following:
<persistence-store-descriptor>
<persistence-store-file>
<persistence-store-directory-root>
/usr/local/weblogic/karson/pstore
</persistence-store-directory-root>
</persistence-store-file>
</persistence-store-descriptor>
as you can see from the above error the deployer is not using this
information.
any help is much appreciated.
i also do not see a dtd for the weblogic-ejb-extensions.xml install, but i
do for the more typical files such as weblogic-ejb-jar.xml . where is this
dtd located?
Karson

Similar Messages

  • Weblogic.ejb.extensions.LockTimedOutException: Bean could not be locked, current owner: '1068220908390_17680', new owner: '1068220908390_17748', timeout: '300000' ms

    Hi All,
    Again, Since yesterday (11/11/2003) , I started getting the Bean Lock error as
    below (I am using weblogic 4.5.1) :
    Note: We are using Stateless beans.
    Tue Nov 11 14:15:11 CET 2003:<I> <EJB> Transaction: '1068220908390_17748' rolled
    back due to EJB exception:
    com.sgs.common.framework.exception.EPlatformSystemException: An unexpected error
    occurs when trying to perform your request (RemoteException).
    weblogic.ejb.extensions.LockTimedOutException: Bean could not be locked, current
    owner: '1068220908390_17680', new owner: '1068220908390_17748', timeout: '300000'
    ms
         at com.sgs.ecertificate.CertificateSessionBean.getCertificate(CertificateSessionBean.java:1866)
         at com.sgs.ecertificate.CertificateSessionBean.approveCertificate(CertificateSessionBean.java:2617)
         at com.sgs.ecertificate.CertificateSessionBeanEOImpl.approveCertificate(CertificateSessionBeanEOImpl.java:936)
         at com.sgs.ecertificate.CertificateSessionBeanEOImpl_ServiceStub.approveCertificate(CertificateSessionBeanEOImpl_ServiceStub.java:1761)
         at com.sgs.ecertificate.ProcessApproveCertificateServlet.processRequest(ProcessApproveCertificateServlet.java:219)
         at com.sgs.common.framework.servlet.EPlatformServlet.doPost(EPlatformServlet.java:189)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:747)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:840)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:99)
         at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:311)
         at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:257)
         at weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:550)
         at weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:284)
         at weblogic.t3.srvr.ExecuteThread.run(ExecuteThread.java:105)
    Tue Nov 11 14:15:11 CET 2003: ERR #-3# com.sgs.ecertificate.ProcessApproveCertificateServlet
    An unexpected error occurs when trying to perform your request (RemoteException).
    com.sgs.common.framework.exception.EPlatformSystemException: An unexpected error
    occurs when trying to perform your request (RemoteException).
    weblogic.ejb.extensions.LockTimedOutException: Bean could not be locked, current
    owner: '1068220908390_17680', new owner: '1068220908390_17748', timeout: '300000'
    ms
         at weblogic.ejb.internal.StatefulEJBCache.bind(StatefulEJBCache.java:310)
         at weblogic.ejb.internal.StatefulEJBObject.getContextForInvoke(StatefulEJBObject.java:128)
         at weblogic.ejb.internal.BaseEJBObject.preInvoke(BaseEJBObject.java:182)
         at com.sgs.ecertificate.entity.CertificateEntityBeanEOImpl.getData(CertificateEntityBeanEOImpl.java:4645)
         at com.sgs.ecertificate.CertificateSessionBean.getCertificate(CertificateSessionBean.java:1743)
         at com.sgs.ecertificate.CertificateSessionBean.approveCertificate(CertificateSessionBean.java:2617)
         at com.sgs.ecertificate.CertificateSessionBeanEOImpl.approveCertificate(CertificateSessionBeanEOImpl.java:936)
         at com.sgs.ecertificate.CertificateSessionBeanEOImpl_ServiceStub.approveCertificate(CertificateSessionBeanEOImpl_ServiceStub.java:1761)
         at com.sgs.ecertificate.ProcessApproveCertificateServlet.processRequest(ProcessApproveCertificateServlet.java:219)
         at com.sgs.common.framework.servlet.EPlatformServlet.doPost(EPlatformServlet.java:189)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:747)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:840)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:99)
         at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:311)
         at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:257)
         at weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:550)
         at weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:284)
         at weblogic.t3.srvr.ExecuteThread.run(ExecuteThread.java:105)
    Thanks a lot in advance.
    Regards,
    Nilesh.

    Hi All,
    Again, Since yesterday (11/11/2003) , I started getting the Bean Lock error as
    below (I am using weblogic 4.5.1) :
    Note: We are using Stateless beans.
    Tue Nov 11 14:15:11 CET 2003:<I> <EJB> Transaction: '1068220908390_17748' rolled
    back due to EJB exception:
    com.sgs.common.framework.exception.EPlatformSystemException: An unexpected error
    occurs when trying to perform your request (RemoteException).
    weblogic.ejb.extensions.LockTimedOutException: Bean could not be locked, current
    owner: '1068220908390_17680', new owner: '1068220908390_17748', timeout: '300000'
    ms
         at com.sgs.ecertificate.CertificateSessionBean.getCertificate(CertificateSessionBean.java:1866)
         at com.sgs.ecertificate.CertificateSessionBean.approveCertificate(CertificateSessionBean.java:2617)
         at com.sgs.ecertificate.CertificateSessionBeanEOImpl.approveCertificate(CertificateSessionBeanEOImpl.java:936)
         at com.sgs.ecertificate.CertificateSessionBeanEOImpl_ServiceStub.approveCertificate(CertificateSessionBeanEOImpl_ServiceStub.java:1761)
         at com.sgs.ecertificate.ProcessApproveCertificateServlet.processRequest(ProcessApproveCertificateServlet.java:219)
         at com.sgs.common.framework.servlet.EPlatformServlet.doPost(EPlatformServlet.java:189)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:747)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:840)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:99)
         at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:311)
         at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:257)
         at weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:550)
         at weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:284)
         at weblogic.t3.srvr.ExecuteThread.run(ExecuteThread.java:105)
    Tue Nov 11 14:15:11 CET 2003: ERR #-3# com.sgs.ecertificate.ProcessApproveCertificateServlet
    An unexpected error occurs when trying to perform your request (RemoteException).
    com.sgs.common.framework.exception.EPlatformSystemException: An unexpected error
    occurs when trying to perform your request (RemoteException).
    weblogic.ejb.extensions.LockTimedOutException: Bean could not be locked, current
    owner: '1068220908390_17680', new owner: '1068220908390_17748', timeout: '300000'
    ms
         at weblogic.ejb.internal.StatefulEJBCache.bind(StatefulEJBCache.java:310)
         at weblogic.ejb.internal.StatefulEJBObject.getContextForInvoke(StatefulEJBObject.java:128)
         at weblogic.ejb.internal.BaseEJBObject.preInvoke(BaseEJBObject.java:182)
         at com.sgs.ecertificate.entity.CertificateEntityBeanEOImpl.getData(CertificateEntityBeanEOImpl.java:4645)
         at com.sgs.ecertificate.CertificateSessionBean.getCertificate(CertificateSessionBean.java:1743)
         at com.sgs.ecertificate.CertificateSessionBean.approveCertificate(CertificateSessionBean.java:2617)
         at com.sgs.ecertificate.CertificateSessionBeanEOImpl.approveCertificate(CertificateSessionBeanEOImpl.java:936)
         at com.sgs.ecertificate.CertificateSessionBeanEOImpl_ServiceStub.approveCertificate(CertificateSessionBeanEOImpl_ServiceStub.java:1761)
         at com.sgs.ecertificate.ProcessApproveCertificateServlet.processRequest(ProcessApproveCertificateServlet.java:219)
         at com.sgs.common.framework.servlet.EPlatformServlet.doPost(EPlatformServlet.java:189)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:747)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:840)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:99)
         at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:311)
         at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:257)
         at weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:550)
         at weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:284)
         at weblogic.t3.srvr.ExecuteThread.run(ExecuteThread.java:105)
    Thanks a lot in advance.
    Regards,
    Nilesh.

  • "Could not locate the bean with the ejb-name XYZ in weblogic-ejb-jar.xml

    Hi,
    Please someone help me on this...
    I'm trying to deploy an application on WLS 8.1 SP4
    on HPUX IA64 arch. From the ear file WLS is able to
    deploy 3 jars but for the last two jars it's throwing
    the below error:
    Could not locate the bean with the ejb-name xyz in weblogic-ejb-jar.xml
    But ejb with name xyz is defined in the the weblogic-ejb-jar.xml file and it's also present in the
    META-INF/ejb-jar.xml file.
    I have no clue what's going wrong.
    Any help is appreciated.
    Thanks
    Mouli

    oops! Pls ignore my previous mail. It was for a different problem.
    FOr the original problem of "couldn ot locate the bean with the ejb-name XZY in weblogic-ejb-jar.xml":
    This happens if you don't have the below files defined
    for a JAR/EAR file:
    weblogic-ejb-jar.xml and weblogic-cmp-rdbms-jar.xml (needed if you have any Datasource mapped)
    These two are basic files required for any JAR/EAR file.
    If you dont' have it already you can generate them using
    $WLS_HOME/bin/startWLBuilder.sh GUI tool bundled along
    with WLS (I used 8.1 SP4) to generate these files ! This tool is really helpful.
    - Mouli

  • Problem deploying connector: META-INF/ejb-jar.xml not found in jar file

              Has anyone seen this problem:
              I built Sun's Blackbox implementation and packaged
              it identical to the BlackBoxNoTx.rar included with
              Weblogic's 'jconnector' sample (even using the same
              ra.xml and weblogic-ra.xml). When I try to deploy
              it, the server reports:
              java.io.FileNotFoundException:
              META-INF/ejb-jar.xml not found in jar file
              I have no idea why the server thinks my connector
              is an EJB. If I deploy the BlackBoxNoTx.rar included
              with the sample, everything works without a hitch.
              The only variable that I'm changing in my BlackBoxNoTx.rar
              is that I build the Blackbox classes myself--otherwise,
              the RAR packagings are identical. Any assistance is
              greatly appreciated since I'm banging my head against
              a wall...
              Thanks,
              -jason
              

              I was finally able to resolve this one. On the odd chance that someone else encounters
              the same problem, here's what went wrong:
              My RAR file had two directories: 'META-INF' and 'meta-inf'. The first was created
              by the jar tool and contained the manifest.mf file. The second I created manually
              and it contained my ra.xml and weblogic-ra.xml. When I examined the RAR using
              any tools or I extracted the contents, it looked like it only contained one directory:
              META-INF (because NT is case-insensitive).
              "Jason L" <[email protected]> wrote:
              >
              >Has anyone seen this problem:
              >
              >I built Sun's Blackbox implementation and packaged
              >it identical to the BlackBoxNoTx.rar included with
              >Weblogic's 'jconnector' sample (even using the same
              >ra.xml and weblogic-ra.xml). When I try to deploy
              >it, the server reports:
              >
              >java.io.FileNotFoundException:
              >META-INF/ejb-jar.xml not found in jar file
              >
              >I have no idea why the server thinks my connector
              >is an EJB. If I deploy the BlackBoxNoTx.rar included
              >with the sample, everything works without a hitch.
              >The only variable that I'm changing in my BlackBoxNoTx.rar
              >is that I build the Blackbox classes myself--otherwise,
              >the RAR packagings are identical. Any assistance is
              >greatly appreciated since I'm banging my head against
              >a wall...
              >
              >Thanks,
              >
              >-jason
              

  • Failed to load weblogic-ejb-jar.xml

    Hi,
    I try to deploy an EJB on Weblogic 9.1, but the weblogic-ejb-jar seems to cause this exception :
    ======================================================
    [wlappc] <30 oct. 2006 12 h 13 CET> <Error> <J2EE> <BEA-160187> <weblogic.appc failed to compile your application. Recompile with the -verbose option for more details. Please see the error message(s) below.>
    [wlappc] com.bea.xml.XmlException: failed to load java type corresponding to e=weblogic-ejb-jar@http://www.bea.com/ns/weblogic/910
    [wlappc] at com.bea.staxb.runtime.internal.UnmarshalResult.getPojoBindingType(UnmarshalResult.java:325)
    [wlappc] at com.bea.staxb.runtime.internal.UnmarshalResult.determineTypeForGlobalElement(UnmarshalResult.java:292)
    [wlappc] at com.bea.staxb.runtime.internal.UnmarshalResult.determineTypeForGlobalElement(UnmarshalResult.java:302)
    [wlappc] at com.bea.staxb.runtime.internal.UnmarshalResult.determineRootType(UnmarshalResult.java:283)
    [wlappc] at com.bea.staxb.runtime.internal.UnmarshalResult.unmarshalDocument(UnmarshalResult.java:153)
    [wlappc] at com.bea.staxb.runtime.internal.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:65)
    [wlappc] at weblogic.descriptor.internal.MarshallerFactory$1.createDescriptor(MarshallerFactory.java:138)
    [wlappc] at weblogic.descriptor.DescriptorManager.createDescriptor(DescriptorManager.java:271)
    [wlappc] at weblogic.descriptor.DescriptorManager.createDescriptor(DescriptorManager.java:240)
    [wlappc] at weblogic.descriptor.DescriptorManager.createDescriptor(DescriptorManager.java:300)
    [wlappc] at weblogic.application.descriptor.AbstractDescriptorLoader.createDescriptor(AbstractDescriptorLoader.java:344)
    [wlappc] at weblogic.application.descriptor.CachingDescriptorLoader.createDescriptor(CachingDescriptorLoader.java:188)
    [wlappc] at weblogic.application.descriptor.AbstractDescriptorLoader.createDescriptor(AbstractDescriptorLoader.java:328)
    [wlappc] at weblogic.application.descriptor.AbstractDescriptorLoader.getDescriptor(AbstractDescriptorLoader.java:237)
    [wlappc] at weblogic.application.descriptor.AbstractDescriptorLoader.getRootDescriptorBean(AbstractDescriptorLoader.java:217)
    [wlappc] at weblogic.ejb.spi.EjbJarDescriptor.parseWeblogicEjbJarBean(EjbJarDescriptor.java:171)
    [wlappc] at weblogic.ejb.container.dd.xml.DDUtils.processWLEjbJarXMLWithSchema(DDUtils.java:706)
    [wlappc] at weblogic.ejb.container.dd.xml.DDUtils.parseWLDD(DDUtils.java:535)
    [wlappc] at weblogic.ejb.container.dd.xml.DDUtils.createDescriptorFromJarFile(DDUtils.java:358)
    [wlappc] at weblogic.ejb.container.dd.xml.DDUtils.createReadOnlyDescriptorFromJarFile(DDUtils.java:141)
    [wlappc] at weblogic.ejb.container.ejbc.EJBCompiler.parseDescriptors(EJBCompiler.java:1345)
    [wlappc] at weblogic.ejb.container.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:431)
    [wlappc] at weblogic.application.compiler.AppcUtils.compileEJB(AppcUtils.java:292)
    [wlappc] at weblogic.application.compiler.EJBCompiler.compile(EJBCompiler.java:95)
    [wlappc] at weblogic.application.compiler.flow.AppCompilerFlow.compileInput(AppCompilerFlow.java:113)
    [wlappc] at weblogic.application.compiler.flow.AppCompilerFlow.compile(AppCompilerFlow.java:43)
    [wlappc] at weblogic.application.compiler.FlowDriver$FlowStateChange.next(FlowDriver.java:55)
    [wlappc] at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
    [wlappc] at weblogic.application.compiler.FlowDriver.run(FlowDriver.java:24)
    [wlappc] at weblogic.application.compiler.Appc.runBody(Appc.java:151)
    [wlappc] at weblogic.utils.compiler.Tool.run(Tool.java:158)
    [wlappc] at weblogic.utils.compiler.Tool.run(Tool.java:115)
    ======================================================
    Here is my weblogic-ejb-jar.xml file :
    ======================================================
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <weblogic-ejb-jar xmlns="http://www.bea.com/ns/weblogic/910"
              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
              xsi:schemaLocation="http://www.bea.com/ns/weblogic/910
              http://www.bea.com/ns/weblogic/910/weblogic-ejb-jar.xsd">
    <weblogic-enterprise-bean>
    <ejb-name>MyMDB</ejb-name>
    <message-driven-descriptor>
         <resource-adapter-jndi-name>ActiveMQRA</resource-adapter-jndi-name>
         <connection-factory-jndi-name>myQCF</connection-factory-jndi-name>
    </message-driven-descriptor>
    <resource-description>
    <res-ref-name>jms/factory</res-ref-name>
    <jndi-name>myQCF</jndi-name>
    </resource-description>
    <resource-env-description>
    <resource-env-ref-name>jms/queue</resource-env-ref-name>
    <jndi-name>queue.out</jndi-name>
    </resource-env-description>
    </weblogic-enterprise-bean>
    </weblogic-ejb-jar>
    ======================================================
    So, it looks like this problem : http://forums.bea.com/bea/message.jspa?messageID=600018030&tstart=0
    I just need a confirmation :
    - is the "res-ref-name" format incorrect with '/' character ?
    - is the jndi-name format incorrect with '.' character ?
    Else, what is the problem with this DD ?
    Thanks,
    Rudy

    "shubha" <[email protected]> wrote:
    >
    hi ,
    Ejb with ejb-name 'hellobean' in ejb-jar.xml
    should be specified in weblogic-ejb-jar.xml with <weblogic-enterprise-bean></weblogic-enterprise-bean>
    i am having problem in deploying the most simple bean on wls7.0 .
    when i try to open the bean module with the weblogic builder i get the
    following
    message
    weblogic.ejb20.WLDeploymentException: Could not locate bean with ejb-name
    'hellobean'
    in weblogic-ejb-jar.xml
         at weblogic.ejb20.deployer.CompositeMBeanDescriptor.initialize60(CompositeMBeanDescriptor.java:249)
         at weblogic.ejb20.deployer.CompositeMBeanDescriptor.init(CompositeMBeanDescriptor.java:180)
         at weblogic.ejb20.deployer.CompositeMBeanDescriptor.<init>(CompositeMBeanDescriptor.java:171)
         at weblogic.marathon.model.EJBJarCMBean.setup(EJBJarCMBean.java:408)
         at weblogic.marathon.tasks.OpenModuleTask.figureOutModule(OpenModuleTask.java:76)
         at weblogic.marathon.tasks.OpenModuleTask.figureOutModule(OpenModuleTask.java:109)
         at weblogic.marathon.tasks.OpenModuleTask.runBackground(OpenModuleTask.java:64)
         at weblogic.jellybeans.core.task.TaskThread.execute(TaskThread.java:114)
         at weblogic.jellybeans.core.task.TaskThread.run(TaskThread.java:55)
    Could not locate bean with ejb-name 'hellobean' in weblogic-ejb-jar.xml
    Module hello1 descriptors failed to load
    if anyone has come across the same problem and have debugged it please
    help me
    out
    thanks in advance

  • Dynamic jndi-name in weblogic-ejb-jar.xml

    Is there a way to create dynamic (i.e. runtime) jndi-names for EJBs instead of
    (or in addition to) "hard coding" them in the weblogic-ejb-jar.xml file? What
    I'm trying to do is have one WebLogic instance (JVM) host multiple environments
    (our Beta and Training environments) and I simply want to deploy the same .ear
    file twice but have each environment (application - .ear) reference a different
    database schema (jdbc connection pool). I have everything working just fine for
    this scenario except when I define jndi-names for our ejbs. The problem is that
    I am really deploying the same ejbs (jndi-names and actually code base) in each
    applicatoin instance and I get an exception when the WebLogic is trying to deploy
    the second application (.ear) because the jndi-names in it have already been deployed
    by the first application instance. I recieve a jndi error stating that the name
    is already deployed.
    Or is there a better path to go down for what I am trying to do to have one WebLogic
    instance support our beta and training environments? Usually (but not always)
    our code base is the for same for both of these environments, I simply need to
    have each environment use a different database schema.
    Thanks

    A little birdie tells me that BEA does this very thing. Looking at the
    descriptors for WebLogic Portal I see:
    <weblogic-enterprise-bean>
    <ejb-name>LoaderEJB</ejb-name>
    <enable-call-by-reference>True</enable-call-by-reference>
    <jndi-name>${APPNAME}.BEA_content.LoaderHome</jndi-name>
    </weblogic-enterprise-bean>
    Yes, the ${APPNAME} token really is expanded into the J2EE application
    name at deployment time!
    Sincerely,
    Daniel Selman
    Bryan Dixon wrote:
    Rewriting our build process isn't really much of an option for me. Our current
    build process is too complex and time consuming right now to convert to Ant (we
    eventually will do this but not for a while). So are there any other ideas that
    aren't build related?
    Thanks
    "Eric Ma" <[email protected]> wrote:
    You don't need run-time dynamism in JDNI names and it can't be done anyways.
    You
    need token substitution in XML configuration files when building the
    app. If
    you are using Ant for building, then it is a breeze. If not, first convert
    your
    build process to use Ant.
    Also, a single WLS instance hosting multiple environments sounds really
    INTRIGUING
    to me.
    Eric Ma
    "Bryan Dixon" <[email protected]> wrote:
    Is there a way to create dynamic (i.e. runtime) jndi-names for EJBsinstead
    of
    (or in addition to) "hard coding" them in the weblogic-ejb-jar.xml file?
    What
    I'm trying to do is have one WebLogic instance (JVM) host multiple environments
    (our Beta and Training environments) and I simply want to deploy the
    same .ear
    file twice but have each environment (application - .ear) referencea
    different
    database schema (jdbc connection pool). I have everything working just
    fine for
    this scenario except when I define jndi-names for our ejbs. The problem
    is that
    I am really deploying the same ejbs (jndi-names and actually code base)
    in each
    applicatoin instance and I get an exception when the WebLogic is trying
    to deploy
    the second application (.ear) because the jndi-names in it have already
    been deployed
    by the first application instance. I recieve a jndi error stating that
    the name
    is already deployed.
    Or is there a better path to go down for what I am trying to do to have
    one WebLogic
    instance support our beta and training environments? Usually (but not
    always)
    our code base is the for same for both of these environments, I simply
    need to
    have each environment use a different database schema.
    Thanks

  • Use of externally-defined/ in weblogic-ejb-jar.xml

    I am trying to use Global Roles defined via the Weblogic console to control access to EJB methods.
    I am using the <externally-defined/> tag in security role assignments, however when I deploy to Weblogic I get the following error :
    <8/09/2004 04:21:42 PM GMT+10:00> <Error> <Deployer> <BEA-149205> <Failed to initialize the application appsdirmars-marketdata_ear due to error weblogic.manag
    ement.ApplicationException: Prepare failed. Task Id = null
    Module Name: ejb-marketdata.jar, Error: [EJB:011024]The XML parser encountered an error in your deployment descriptor. Please ensure that your deployment descriptor corresponds to the format in the DTD. The error was:
    Error parsing file 'META-INF/weblogic-ejb-jar.xml' at line: 51 column: 26. Element type "externally-defined" must be declared..
    at weblogic.j2ee.J2EEApplicationContainer.checkForErrors(J2EEApplication
    Container.java:1612)
    at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContain
    er.java:1207)
    at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContain
    er.java:1051)
    at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContain
    er.java:823)
    at weblogic.management.deploy.slave.SlaveDeployer$Application.prepare(Sl
    aveDeployer.java:2925)
    at weblogic.management.deploy.slave.SlaveDeployer.prepareAllApplications
    (SlaveDeployer.java:967)
    at weblogic.management.deploy.slave.SlaveDeployer.resume(SlaveDeployer.j
    ava:349)
    at weblogic.management.deploy.DeploymentManagerServerLifeCycleImpl.resum
    e(DeploymentManagerServerLifeCycleImpl.java:229)
    at weblogic.t3.srvr.SubsystemManager.resume(SubsystemManager.java:131)
    at weblogic.t3.srvr.T3Srvr.resume(T3Srvr.java:966)
    at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:361)
    at weblogic.Server.main(Server.java:32)
    I am running Weblogic 8.1 SP3 on Windows XP Pro.
    The XML is valid for the specified DTD according to my XML editor.
    The relevevant fragment from weblogic-ejb-jar.xml is included below.
    Any help much appreciated.
    Gavin.
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE weblogic-ejb-jar PUBLIC "-//BEA Systems, Inc.//DTD WebLogic 8.1.0 EJB//EN" "http://www.bea.com/servers/wls810/dtd/weblogic-ejb-jar.dtd">
    <weblogic-ejb-jar>
    <security-role-assignment>
    <role-name>MarsAdmin</role-name>
    <externally-defined/>
    </security-role-assignment>
    <security-role-assignment>
    <role-name>MarsViewer</role-name>
    <externally-defined/>
    </security-role-assignment>
    </weblogic-ejb-jar>

    I tried using the <global-role/> tag instead - this does deploy without any errors - but when I call the secure EJB method I get the Security Violation error below.
    The DTD says using the <global-role/> tag is fine, albeit deprecated, but the Weblogic 8.1 manual says this has been replaced by <externally-defined/>, so I'm not sure if this should work or not.
    [EJB:010160]Security Violation: User: 'ghughes' has insufficient permission to access EJB: type=<ejb>, application=_appsdir_mars-marketdata_ear, module=ejb-marketdata.jar, ejb=marketdata.MarketDataManager, method=getEnergyOverview, methodInterface=Remote, signature={java.util.Date}.
    So on the whole I'd prefer to work out why Weblogic isn't recognising <externally-defined/> - I've included the full deployment descriptor below - I'm generating it using the latest snapshot of XDoclet - is the DTD specified correct for Weblogic 8.1 SP3 ? (It matches the one specified in http://e-docs.bea.com/wls/docs81/ejb/DDreference-ejb-jar.html - but I can't think of anything else that could be wrong).
    Any tips much appreciated as I need to enable an administrator to customise these roles at runtime rather than hard-coding the role - group mappings into the deployment descriptors.
    Thanks,
    Gavin.
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE weblogic-ejb-jar PUBLIC "-//BEA Systems, Inc.//DTD WebLogic 8.1.0 EJB//EN" "http://www.bea.com/servers/wls810/dtd/weblogic-ejb-jar.dtd">
    <weblogic-ejb-jar>
    <description><![CDATA[Generated by XDoclet]]></description>
    <weblogic-enterprise-bean>
    <ejb-name>marketdata.MarketDataManager</ejb-name>
    <stateless-session-descriptor>
    </stateless-session-descriptor>
    <reference-descriptor>
    </reference-descriptor>
    <jndi-name>marketdata.MarketDataManager</jndi-name>
    <local-jndi-name>marketdata.MarketDataManagerLocal</local-jndi-name>
    </weblogic-enterprise-bean>
    <weblogic-enterprise-bean>
    <ejb-name>marketdata.MessageManager</ejb-name>
    <message-driven-descriptor>
    <pool>
    <max-beans-in-free-pool>5</max-beans-in-free-pool>
    <initial-beans-in-free-pool>1</initial-beans-in-free-pool>
    </pool>
    <destination-jndi-name>FileTopic</destination-jndi-name>
    <connection-factory-jndi-name>JMSConnectionFactory</connection-factory-jndi-name>
    <jms-polling-interval-seconds>10</jms-polling-interval-seconds>
    <jms-client-id>1</jms-client-id>
    </message-driven-descriptor>
    <transaction-descriptor>
    <trans-timeout-seconds>10</trans-timeout-seconds>
    </transaction-descriptor>
    <reference-descriptor>
    </reference-descriptor>
    <enable-call-by-reference>True</enable-call-by-reference>
    </weblogic-enterprise-bean>
    <!--
    To add enterprise beans that you have deployment descriptor info for, add
    a file to your XDoclet merge directory called weblogic-enterprise-beans.xml that contains
    the <weblogic-enterprise-bean></weblogic-enterprise-bean> markup for those beans.
    -->
    <!-- xdoclet merge file -> weblogic-ejb-jar.xml -->
    <security-role-assignment>
    <role-name>MarsAdmin</role-name>
    <externally-defined/>
    </security-role-assignment>
    <security-role-assignment>
    <role-name>MarsViewer</role-name>
    <externally-defined/>
    </security-role-assignment>
    <idempotent-methods>
    </idempotent-methods>
    </weblogic-ejb-jar>
    Message was edited by [email protected] at Sep 8, 2004 8:45 PM

  • Deployment issues, how is weblogic-ejb-jar.xml linked to ejb-jar.xml

    Hey guys,
    I'm getting the following error I think because i have something configured incorrectly in my xml files. Instead of yousing activationConfig properties in my MDB I wanted to set them in the ejb-jar.xml file manually. The following error I'm getting is...
    Unable to deploy EJB: MyMDB from MDBtest2:
    [EJB:011026]The EJB container failed while creating the java:/comp/env namespace for this EJB deployment.
    weblogic.deployment.EnvironmentException: [EJB:010176]The resource-env-ref 'inQueue' declared in the ejb-jar.xml descriptor has no JNDI name mapped to it. The resource-ref must be mapped to a JNDI name using the resource-description element of the weblogic-ejb-jar.xml descriptor.
         at weblogic.ejb.container.deployer.EnvironmentBuilder.addResourceEnvReferences(EnvironmentBuilder.java:641)
         at weblogic.ejb.container.deployer.EJBDeployer.setupEnvironmentContext(EJBDeployer.java:330)
         at weblogic.ejb.container.deployer.EJBDeployer.setupEnvironmentFor(EJBDeployer.java:1097)
         at weblogic.ejb.container.deployer.EJBDeployer.setupBeanInfos(EJBDeployer.java:991)
         at weblogic.ejb.container.deployer.EJBDeployer.prepare(EJBDeployer.java:1273)
         at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:372)
    ejb-jar.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <ejb-jar id="ejb-jar_ID" version="2.1" xmlns="http://java.sun.com/xml/ns/j2ee" 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/ejb-jar_2_1.xsd">
         <display-name>MDBtest2</display-name>
         <enterprise-beans>
              <message-driven>
                   <ejb-name>MyMDB</ejb-name>
                   <ejb-class>cms.crown.mdb.MyMDB</ejb-class>
                   <transaction-type>Container</transaction-type>
                   <message-destination-link>omg</message-destination-link>
                   <resource-ref>
                        <res-ref-name>weblogic.jms.XAConnectionFactory</res-ref-name>
                        <res-type>javax.jms.XAConnectionFactory</res-type>
                        <res-auth>Container</res-auth>
                   </resource-ref>
                   <resource-env-ref>
                        <resource-env-ref-name>inQueue</resource-env-ref-name>
                        <resource-env-ref-type>javax.jms.Queue</resource-env-ref-type>
                   </resource-env-ref>
              </message-driven>
         </enterprise-beans>
         <assembly-descriptor>
              <container-transaction>
                   <method>
                        <ejb-name>MyMDB</ejb-name>
                        <method-name>onMessage</method-name>
                        <method-params>
                             <method-param>javax.jms.Message</method-param>
                        </method-params>
                   </method>
                   <trans-attribute>Required</trans-attribute>
              </container-transaction>
         </assembly-descriptor>
    </ejb-jar>
    weblogic-ejb-jar.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <wls:weblogic-ejb-jar xmlns:wls="http://www.bea.com/ns/weblogic/10.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd http://www.bea.com/ns/weblogic/10.0 http://www.bea.com/ns/weblogic/10.0/weblogic-ejb-jar.xsd">
    <!--weblogic-version:10.0-->
    <wls:message-destination-descriptor>
    <!--lookup-method:JNDI-->
    <wls:message-destination-name>omg</wls:message-destination-name>
    <wls:destination-jndi-name>inQueue</wls:destination-jndi-name>
    <wls:initial-context-factory>weblogic.jms.XAConnectionFactory</wls:initial-context-factory>
    <wls:provider-url>http://localhost:8010</wls:provider-url>
    </wls:message-destination-descriptor>
    </wls:weblogic-ejb-jar>
    Hope this is readable, thanks for any assistance

    Hi,
    It looks like first thing you are using EJB3 but your XML files are still pointing to version="2.1" and very old.
    <font color=red>
    <ejb-jar id="ejb-jar_ID" version="2.1" xmlns="http://java.sun.com/xml/ns/j2ee" 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/ejb-jar_2_1.xsd">
    </font><br>
    *try this: In below "ejb-jar.xml" file*
    QCF = your Connection factory JNDI Name
    TestQ = your Queue JNDI Name
    Transaction Attribute is ByDefault = Required ...so no need to add it here.
    <?xml version='1.0' encoding='UTF-8'?>
    <ejb-jar xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" metadata-complete="true">
    <enterprise-beans>
    <message-driven>
    <ejb-name>MyMDB</ejb-name>
    <mapped-name>TestQ</mapped-name>
    <ejb-class>cms.crown.mdb.MyMDB</ejb-class>
    <messaging-type>javax.jms.MessageListener</messaging-type>
    <transaction-type>Container</transaction-type>
    <activation-config>
    <activation-config-property>
    <activation-config-property-name>destinationType</activation-config-property-name>
    <activation-config-property-value><b><font color=maroon>javax.jms.Queue</font></b></activation-config-property-value>
    </activation-config-property>
    <activation-config-property>
    <activation-config-property-name>connectionFactoryJndiName</activation-config-property-name>
    <activation-config-property-value><b><font color=maroon>QCF</font></b></activation-config-property-value>
    </activation-config-property>
    <activation-config-property>
    <activation-config-property-name>destinationJndiName</activation-config-property-name>
    <activation-config-property-value><b><font color=maroon>TestQ</font></b></activation-config-property-value>
    </activation-config-property>
    </activation-config>
    </message-driven>
    </enterprise-beans>
    <assembly-descriptor></assembly-descriptor>
    </ejb-jar>
    "weblogic-ejb-jar.xml":
    <weblogic-ejb-jar xmlns="http://www.bea.com/ns/weblogic/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">
    <font color=maroon><b> Now u need to Just define the Provider URL here...if you want a remote provider...else not required<BR> JNDI names are already defined in the ejb-jar.xml file</b></font><BR>
    </weblogic-ejb-jar>
    Some Links which you can refer:
    To Generate the Deployment Descriptors ...in case of EJB3 Applications: *http://jaysensharma.wordpress.com/2010/04/02/generating-ejb3-clientjar/*
    MDB3.0 Sample: *http://jaysensharma.wordpress.com/2009/08/17/mdb3-0-sample-for-weblogic-application-server/*
    Thanks
    Jay SenSharma

  • Sample weblogic-ejb-jar.xml for Resource-ref EJB 3.0

    I am trying to create an MDB that can be re-used under different names.
    @MessageDriven(description = "An MDB that transfers messages from one Queue to another", activationConfig = { @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue") })
    @TransactionAttribute(TransactionAttributeType.REQUIRED)
    public class TransferMdb implements MessageListener {
    private static final Logger LOG = Logger.getLogger(TransferMdb.class);
    @Resource(name = "jms/connfactory")
    private ConnectionFactory connectionFactory;
    @Resource(name = "jms/targetDestination")
    private Queue targetDestination;
    <ejb-jar version="3.0" 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/ejb-jar_3_0.xsd">
    <enterprise-beans>
    <message-driven>
    <ejb-name>TransferMdb</ejb-name>
    <ejb-class>TransferMdb</ejb-class>
    </message-driven>
    </enterprise-beans>
    </ejb-jar>
    <weblogic-ejb-jar>
    <weblogic-enterprise-bean>
    <ejb-name>TransferMdb</ejb-name>
    <message-driven-descriptor>
    <pool>
    <max-beans-in-free-pool>200</max-beans-in-free-pool>
    <initial-beans-in-free-pool>5</initial-beans-in-free-pool>
    </pool>
    <destination-jndi-name>test_queue</destination-jndi-name>
    <transaction-descriptor>
    <trans-timeout-seconds>20</trans-timeout-seconds>
    </transaction-descriptor>
    </message-driven-descriptor>
    <reference-descriptor>
    <resource-description>
    <res-ref-name>jms/connectionfactory</res-ref-name>
    <jndi-name>connectionfactory</jndi-name>
    </resource-description>
    <resource-description>
    <res-ref-name>jms/targetDestination</res-ref-name>
    <jndi-name>reply_queue</jndi-name>
    </resource-description>
    </reference-descriptor>
    </weblogic-enterprise-bean>
    </weblogic-ejb-jar>
    However when I deploy the above, I get exceptions such as:
    problem: cvc-complex-type.2.4a: Expected elements 'initial-context-factory@http://www.bea.com/ns/weblogic/weblogic-ejb-jar provider-url@http://www.bea.com/ns/weblogic/weblogic-ejb-jar connection-factory-jndi-name@http://www.bea.com/ns/weblogic/weblogic-ejb-jar jms-polling-interval-seconds@http://www.bea.com/ns/weblogic/weblogic-ejb-jar jms-client-id@http://www.bea.com/ns/weblogic/weblogic-ejb-jar generate-unique-jms-client-id@http://www.bea.com/ns/weblogic/weblogic-ejb-jar durable-subscription-deletion@http://www.bea.com/ns/weblogic/weblogic-ejb-jar max-messages-in-transaction@http://www.bea.com/ns/weblogic/weblogic-ejb-jar distributed-destination-connection@http://www.bea.com/ns/weblogic/weblogic-ejb-jar use81-style-polling@http://www.bea.com/ns/weblogic/weblogic-ejb-jar init-suspend-seconds@http://www.bea.com/ns/weblogic/weblogic-ejb-jar max-suspend-seconds@http://www.bea.com/ns/weblogic/weblogic-ejb-jar security-plugin@http://www.bea.com/ns/weblogic/weblogic-ejb-jar' instead of 'transaction-descriptor@http://www.bea.com/ns/weblogic/weblogic-ejb-jar' here in element message-driven-descriptor@http://www.bea.com/ns/weblogic/weblogic-ejb-jar:<null>
    problem: cvc-complex-type.2.4a: Expected elements 'transaction-descriptor@http://www.bea.com/ns/weblogic/weblogic-ejb-jar iiop-security-descriptor@http://www.bea.com/ns/weblogic/weblogic-ejb-jar resource-description@http://www.bea.com/ns/weblogic/weblogic-ejb-jar resource-env-description@http://www.bea.com/ns/weblogic/weblogic-ejb-jar ejb-reference-description@http://www.bea.com/ns/weblogic/weblogic-ejb-jar service-reference-description@http://www.bea.com/ns/weblogic/weblogic-ejb-jar enable-call-by-reference@http://www.bea.com/ns/weblogic/weblogic-ejb-jar network-access-point@http://www.bea.com/ns/weblogic/weblogic-ejb-jar clients-on-same-server@http://www.bea.com/ns/weblogic/weblogic-ejb-jar run-as-principal-name@http://www.bea.com/ns/weblogic/weblogic-ejb-jar create-as-principal-name@http://www.bea.com/ns/weblogic/weblogic-ejb-jar remove-as-principal-name@http://www.bea.com/ns/weblogic/weblogic-ejb-jar passivate-as-principal-name@http://www.bea.com/ns/weblogic/weblogic-ejb-jar jndi-name@http://www.bea.com/ns/weblogic/weblogic-ejb-jar local-jndi-name@http://www.bea.com/ns/weblogic/weblogic-ejb-jar dispatch-policy@http://www.bea.com/ns/weblogic/weblogic-ejb-jar remote-client-timeout@http://www.bea.com/ns/weblogic/weblogic-ejb-jar stick-to-first-server@http://www.bea.com/ns/weblogic/weblogic-ejb-jar' instead of 'reference-descriptor@http://www.bea.com/ns/weblogic/weblogic-ejb-jar' here in element weblogic-enterprise-bean@http://www.bea.com/ns/weblogic/weblogic-ejb-jar:<null>
    at weblogic.descriptor.internal.MarshallerFactory$1.evaluateResults(MarshallerFactory.java:234)
    at weblogic.descriptor.internal.MarshallerFactory$1.evaluateResults(MarshallerFactory.java:221)
    at weblogic.descriptor.internal.MarshallerFactory$1.createDescriptor(MarshallerFactory.java:146)
    at weblogic.descriptor.BasicDescriptorManager.createDescriptor(BasicDescriptorManager.java:306)
    at weblogic.application.descriptor.AbstractDescriptorLoader2.getDescriptorBeanFromReader(AbstractDescriptorLoader2.java:788)
    Truncated. see log file for complete stacktrace
    I am clearly missing items in the weblogic-ejb-jar.xml. If anyone has a sample or tips, that would be awesome as a starting point.

    Those tags just declare that you are using our CMP provider and that
    your descriptor is in META-INF/weblogic-cmp-rdbms-jar.xml.
    FWIW, you might also want to check out EJBGen. It tends to keep more up
    to date with WLS than xdoclet.
    -- Rob
    Gen wrote:
    I am using xdoclets to generate descriptor file weblogic-ejb-jar.xml
    for a BMP entity bean. Xdoclet is generating the descriptor file
    alright, but is putting the following extra tags. This happens even
    for samples which come with the download, so my tags in java file are
    not wrong.
    My question is, are the extra tags below harmless, or should I
    manually go to each desciptor file and remove them?
    Thanks.
    ----------- EXTRA TAGS GENERATED START ---------
    persistence> <persistence-type>
    <type-identifier>WebLogic_CMP_RDBMS</type-identifier>
    <type-version>6.0</type-version>
    <type-storage>META-INF/weblogic-cmp-rdbms-jar.xml</type-storage>
    </persistence-type>
    <persistence-use>
    <type-identifier>WebLogic_CMP_RDBMS</type-identifier>
    <type-version>6.0</type-version>
    </persistence-use>
    </persistence>
    ----------- EXTRA TAGS GENERATED END ---------
    ----------- TAGS I PUT IN JAVA CLASS START --------
    * @ejb:bean name="com.ejb.entity.Customer"
    * jndi-name="com.ejb.entity.CustomerHome"
    * view-type="remote"
    * type="BMP"
    * primkey-field="com.ejb.entity.CustomerPK"
    * reentrant="false"
    * @weblogic:cache
    * max-beans-in-cache="1000"
    * read-timeout-seconds="900"
    * concurrency-strategy="ReadOnly"
    ----------- TAGS I PUT IN JAVA CLASS END --------

  • Role- group in weblogic-ejb-jar.xml?

    How do I map a security role, defined in ejb-jar.xml, to a group (e.g., not just a single Principal)?
    For example, I'd like to have the following in weblogic-ejb-jar.xml:
    <security-role-assignment>
    <role-name>EJBAdministrator</role-name>
    <principal-name>admins</principal-name>
    </security-role-assignment>
    where 'admins' is a user group in my directory.
    I'm using the Active Directory authenticator on WLS7, and when I set 'principal-name' to a user-type entry, it works fine. But I really don't want to hardcode all the authorized usernames into the weblogic-ejb-jar.xml. Is there a way around it?

    Just use the name of the group instead of the user. Remember a group is
    a principal too. so in your example:
    <security-role-assignment>
    <role-name>EJBAdministrator</role-name>
    <principal-name>admin group</principal-name>
    </security-role-assignment>
    Hope that helps...
    Kitten wrote:
    How do I map a security role, defined in ejb-jar.xml, to a group (e.g., not just a single Principal)?
    For example, I'd like to have the following in weblogic-ejb-jar.xml:
    <security-role-assignment>
    <role-name>EJBAdministrator</role-name>
    <principal-name>admins</principal-name>
    </security-role-assignment>
    where 'admins' is a user group in my directory.
    I'm using the Active Directory authenticator on WLS7, and when I set 'principal-name' to a user-type entry, it works fine. But I really don't want to hardcode all the authorized usernames into the weblogic-ejb-jar.xml. Is there a way around it?

  • ERROR: Error parsing 'META-INF/weblogic-ejb-jar.xml'

    I have this error while compiling session bean (Stateful). my weblogic-ejb-jar.xml
    file looks like this. Could anyone tell me what I'm doing wrong.
    <weblogic-ejb-jar>
    <weblogic-enterprise-bean>
    <ejb-name>TransactionAgent</ejb-name>
    <stateless-session-descriptor>
         <pool>10</pool>
         <stateless-clustering>false</stateless-clustering>
    </stateless-session-descriptor>
    <ejb-ref-name>ejb/Transaction</ejb-ref-name>
    <jndi-name>Transaction</jndi-name>
    </weblogic-enterprise-bean>
    </weblogic-ejb-jar>

    <pool> should not have any value. Instead it shud have the child nodes
    <max-beans-in-free-pool> and/or <initial-beans-in-free-pool>
    it will look like
    <pool>
    <max-beans-in-free-pool> 500 </max-beans-in-free-pool>
    <initial-beans-in-free-pool>100 </initial-beans-in-free-pool>
    </pool>
    Also, <ejb-ref-name> and <jndi-name> goes under <ejb-reference-descriptor>
    which is under <reference-descriptor>
    So it would look like
    <reference-descriptor>
    <ejb-reference-description>
    <ejb-ref-name> .. </ejb-ref-name>
    <jndi-name> .. </jndi-name>
    <ejb-reference-description>
    </reference-descriptor>
    The jndi name should also be defined for the bean. Also note that ejb-refs
    are defined under a bean which is referring other beans. Like Transaction
    should not refer to itself. Rather if it is referring to Customer, then
    ejb-ref will be defined for CustomerBean.
    Hope it helps.
    Rupesh.
    Owen <[email protected]> wrote in message
    news:3c614fb0$[email protected]..
    >
    I have this error while compiling session bean (Stateful). myweblogic-ejb-jar.xml
    file looks like this. Could anyone tell me what I'm doing wrong.
    <weblogic-ejb-jar>
    <weblogic-enterprise-bean>
    <ejb-name>TransactionAgent</ejb-name>
    <stateless-session-descriptor>
    <pool>10</pool>
    <stateless-clustering>false</stateless-clustering>
    </stateless-session-descriptor>
    <ejb-ref-name>ejb/Transaction</ejb-ref-name>
    <jndi-name>Transaction</jndi-name>
    </weblogic-enterprise-bean>
    </weblogic-ejb-jar>

  • Deployment Plan / weblogic-ejb-jar.xml:  Problem

    Hello,
    I am trying to use a deployment plan to override the principal name in the weblogic-ejb-jar.xml.
    The deployment-plan looks like this (showing only the important sections)
    <variable-definition>
    <variable>
    <name>SecurityRoleAssignment_ejbRole_PrincipalNames_1</name>
    <value>MY PRINCIPAL 1</value>
    </variable>
    </variable-definition>
    <variable-assignment>
    <name>SecurityRoleAssignment_ejbRole_PrincipalNames_1</name>
    <xpath>/weblogic-ejb-jar/security-role-assignment/[role-name="View-Role"]/externally-defined</xpath>
    <operation>replace</operation>
    </variable-assignment>
    The security-role assignment in the weblogic-ejb-jar.xml looks like this:
    <security-role-assignment>
    <role-name>View-Role</role-name>
         <externally-defined/>
    </security-role-assignment>
    I 've tried to override the element-value of <externally-defined> (a valid tag in the weblogic-ejb-jar.xml ) with help of a deployment-plan.
    When trying to deploy my application (which is organised in the directory-structure: inst_dir/APP inst_dir/PLAN
    the following error occurs:
    VALIDATION PROBLEMS WERE FOUND problem: cvc-complex-type.2.4a: Expected element 'principal-name@http://www.bea.com/ns/weblogic/10.0' instead of 'externally-defined@http://www.bea.com/ns/weblogic/10.0' here in element security-role-assignment@http://www.bea.com/ns/weblogic/10.0:
    This has surprised me, as externally-defined is (according to the documentation) a valid tag.
    I have tried to replace <externally-defined> with an empty <principal-name> tag (which works fine when deploying the application), but causes a security exception, when trying to use the EJB.
    Has anybody an idea if there is a workaround for this problem?
    IMHO the Validatio Problem is not justified at this place then why should an otherwise valid weblogic-ejb-jar.xml (when not using a deployment-plan) suddenly become invalid when a deployment plan is used?
    Thanx a lot in advance!
    Edited by: user10672779 on 02.12.2008 04:09

    Hi again,
    I tried it with the weblogic 10 Namespace Declaration but got then this error:
    failed to load java type corresponding to e=weblogic-ejb-jar@http://www.bea.com/ns/weblogic/weblogic-ejb-jar/1.0/weblogic-ejb-jar.xsd
    and following Exception:
    <02.12.2008 20.00 Uhr CET> <Error> <J2EE> <BEA-160197> <Unable to load descriptor D:\exportapps\tb.ear\app\tb_flowcontrol.jar/META-INF/weblogic-ejb-jar.xml of module tb_flowcontrol.jar. The error is weblogic.descriptor.DescriptorException: Unmarshaller failed
    at weblogic.descriptor.internal.MarshallerFactory$1.createDescriptor(MarshallerFactory.java:152)
    at weblogic.descriptor.BasicDescriptorManager.createDescriptor(BasicDescriptorManager.java:292)
    at weblogic.descriptor.BasicDescriptorManager.createDescriptor(BasicDescriptorManager.java:260)
    at weblogic.application.descriptor.AbstractDescriptorLoader2.getDescriptorBeanFromReader(AbstractDescriptorLoader2.java:774)
    at weblogic.application.descriptor.AbstractDescriptorLoader2.createDescriptorBean(AbstractDescriptorLoader2.java:395)
    at weblogic.application.descriptor.AbstractDescriptorLoader2.loadDescriptorBeanWithoutPlan(AbstractDescriptorLoader2.java:745)
    Caused by: com.bea.xml.XmlException: failed to load java type corresponding to e=weblogic-ejb-jar@http://www.bea.com/ns/weblogic/weblogic-ejb-jar/1.0/weblogic-ejb-jar.xsd
    at com.bea.staxb.runtime.internal.UnmarshalResult.getPojoBindingType(UnmarshalResult.java:329)
    at com.bea.staxb.runtime.internal.UnmarshalResult.determineTypeForGlobalElement(UnmarshalResult.java:296)
    at com.bea.staxb.runtime.internal.UnmarshalResult.determineTypeForGlobalElement(UnmarshalResult.java:306)
    at com.bea.staxb.runtime.internal.UnmarshalResult.determineRootType(UnmarshalResult.java:287)
    at com.bea.staxb.runtime.internal.UnmarshalResult.unmarshalDocument(UnmarshalResult.java:153)
    at com.bea.staxb.runtime.internal.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:65)
    at weblogic.descriptor.internal.MarshallerFactory$1.createDescriptor(MarshallerFactory.java:141)
    Searching the net couldn't supply me with another answer as to use the 90 Namespace Declaration again...
    I think I forgot to mention I am using an exploded directory.
    This all seems very strange.
    cheers.

  • Help: weblogic.ejb.extensions.LockTimedOutException

    Dear All:
              I got this exception in our EJB app:
              weblogic.ejb.extensions.LockTimedOutException. Please see attached error
              message below. It is not happening every time you call the bean. It is
              reproducable with patience.
              Have you had this kind of problem and more importantly, how to avoid it?
              Our env is: Wl51 with sp 10, jdk1.3.02, Sun Solaris Unix, a cluster contains
              2 wl instance
              Thanks.
              Wed Jun 19 14:26:53 EDT 2002:<I> <TX> Transaction (TxC (5488304, xid =
              1024502557372_6636, timeout = 300, txState = Marked Rollback, root = null)
              rolled back after 300 sec.
              [GC 99080K->85533K(130688K), 0.0227977 secs]
              Wed Jun 19 14:26:54 EDT 2002:<I> <EJB JAR deployment
              /webapp/dtshc/dts/nmc/ejb/nmcejb.jar> Transaction: '1024502557372_6636'
              rolled back due to EJB exception:
              weblogic.ejb.extensions.LockTimedOutException: Lock for
              primaryKey:com.mm.nmc.entity.ProducerOneYearPlanPK@1700fc timed out after
              300000 ms.
              at
              weblogic.ejb.internal.LockManagerImpl.waitForLock(LockManagerImpl.java:53)
              at weblogic.ejb.internal.LockManagerImpl.lock(LockManagerImpl.java:146)
              at weblogic.ejb.internal.LockManagerImpl.lock(LockManagerImpl.java:81)
              at weblogic.ejb.internal.StatefulEJBCache.bind(StatefulEJBCache.java:456)
              at
              weblogic.ejb.internal.StatefulEJBObject.getContextForInvoke(StatefulEJBObjec
              t.java:162)
              at weblogic.ejb.internal.BaseEJBObject.preInvoke(BaseEJBObject.java:476)
              at
              com.mm.nmc.entity.ProducerOneYearPlanEJBEOImpl.getData(ProducerOneYearPlanEJ
              BEOImpl.java:979)
              at
              com.mm.nmc.session.PersonalTacticalSessionEJB.getTacticalPlanGoals(PersonalT
              acticalSessionEJB.java:200)
              at
              com.mm.nmc.session.PersonalTacticalSessionEJB.getPersonalTacticalPlan(Person
              alTacticalSessionEJB.java:165)
              at
              com.mm.nmc.session.PersonalTacticalSessionEJB.getPersonalTacticalPlan(Person
              alTacticalSessionEJB.java:155)
              at
              com.mm.nmc.session.PersonalTacticalSessionEJBEOImpl.getPersonalTacticalPlan(
              PersonalTacticalSessionEJBEOImpl.java:340)
              at
              com.mm.nmc.session.PersonalTacticalSessionEJBEOImpl_WLSkel.invoke(PersonalTa
              cticalSessionEJBEOImpl_WLSkel.java:167)
              at
              weblogic.rmi.extensions.BasicServerObjectAdapter.invoke(BasicServerObjectAda
              pter.java:347)
              at
              weblogic.rmi.extensions.BasicRequestHandler.handleRequest(BasicRequestHandle
              r.java:86)
              at
              weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:1
              5)
              at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:129)
              Jiancai He
              http://www.hefamily.com
              

    Thanks for your message:
              In our case, it is entity EJB. The problem only happens in clustered env,
              and only happens in one of the servers.
              Question: can wl51 use database to manage the concurrent access of entity
              EJBs?
              Thanks.
              Jiancai
              Jiancai He
              http://www.hefamily.com
              "ludovic le goff" <[email protected]> wrote in message
              news:[email protected]...
              > Hello,
              >
              > Basically, it means two (or more) different threads are trying to get an
              > exclusive lock on the same entity bean or stateful session bean at the
              same
              > time. One of the locks eventually times out and this exception is thrown.
              >
              > There are several things that could cause this, for instance:
              >
              > - Two threads trying to invoke a method on the same stateful session bean
              at
              > the same time. The EJB 1.1 spec states that the server must detect this
              > condition and throw a RemoteException to all subsequent callers.
              > LockTimedOutException is a sub-class of java.rmi.RemoteException.
              >
              > - Two threads are trying to access the same entity bean instance inside a
              > single server in the cluster, and the caller holding the lock does not
              > finish fast enough.
              >
              > You might want to check if you have declared the Remote and home interface
              > in your jsp/servlet as global variable. And since it's global, instance
              > getting overridden every time. That's why both the two request end up in
              > using the same EJBObject.
              >
              > You should changed your code and make the remote/home interface variable
              > declaration as local i.e. within the scope of a single request.
              > Then you should not see any problem. Both the threads will use different
              > EJBObjects and hence you should not see any exceptions.
              >
              > You need to code in such a way as to avoid deadlocks. For instance, if
              > more than one client accesses the EJBs in different order, a deadlock may
              > occur. This deadlock is detected and after a certain timeout (5 minutes by
              > default), the deadlock is removed and one of the clients gets a
              > LockTimedOutException. For example, if one request in your application has
              > entity Account 1 (by doing an ejbFindByPrimaryKey) and is then about to
              get
              > Customer 1, and if at the same time another request in another business
              > method has got Customer 1 and is waiting for Account 1, you'll get a
              > deadlock and a LockTimedOutException after 5 minutes. You could avoid
              this
              > by include the code in a synchronized block. You could also get a
              deadlock
              > if you're making a reentrant call, e.g., A calls B which calls back to A.
              >
              > If you haven't already seen this, here's a blurb from "Locking Model for
              > Entity EJBs" at
              >
              http://www.weblogic.com/docs51/classdocs/API_ejb/EJB_environment.html#108796
              > 7 that you might find interesting:
              >
              > The EJB 1.1 container in WebLogic Server Version 5.1 uses a pessimistic
              > locking mechanism for entity EJB instances. As clients enlist an EJB or
              EJB
              > method in a transaction, WebLogic Server places an exclusive lock on the
              EJB
              > instance or method for the duration of the transaction. Other clients
              > requesting the same EJB or method block until the current transaction
              > completes.
              >
              > This method of locking provides reliable access to EJB data, and avoids
              > unnecessary calls to ejbLoad() to refresh the EJB instance's persistent
              > fields. However, in certain circumstances pessimistic locking may not
              > provide the best model for concurrent access to the EJB's data. Once a
              > client has locked an EJB instance, other clients are blocked from the
              EJB's
              > data even if they intend only to read the persistent fields.
              >
              > In a Nutshell the first exception is a consequence of the second.
              >
              > Hope this helps,
              > Ludovic.
              > Developer Relations Engineer
              > BEA Customer Support
              > "newsgroups.bea.com" <[email protected]> a écrit dans le message news:
              > [email protected]...
              > > Dear All:
              > >
              > > I got this exception in our EJB app:
              > > weblogic.ejb.extensions.LockTimedOutException. Please see attached error
              > > message below. It is not happening every time you call the bean. It is
              > > reproducable with patience.
              > >
              > > Have you had this kind of problem and more importantly, how to avoid it?
              > >
              > > Our env is: Wl51 with sp 10, jdk1.3.02, Sun Solaris Unix, a cluster
              > contains
              > > 2 wl instance
              > >
              > > Thanks.
              > >
              > >
              > >
              > >
              > >
              > >
              > >
              > >
              > >
              > >
              > >
              > > Wed Jun 19 14:26:53 EDT 2002:<I> <TX> Transaction (TxC (5488304, xid =
              > > 1024502557372_6636, timeout = 300, txState = Marked Rollback, root =
              null)
              > > rolled back after 300 sec.
              > >
              > > [GC 99080K->85533K(130688K), 0.0227977 secs]
              > >
              > > Wed Jun 19 14:26:54 EDT 2002:<I> <EJB JAR deployment
              > > /webapp/dtshc/dts/nmc/ejb/nmcejb.jar> Transaction: '1024502557372_6636'
              > > rolled back due to EJB exception:
              > >
              > > weblogic.ejb.extensions.LockTimedOutException: Lock for
              > > primaryKey:com.mm.nmc.entity.ProducerOneYearPlanPK@1700fc timed out
              after
              > > 300000 ms.
              > >
              > > at
              > >
              weblogic.ejb.internal.LockManagerImpl.waitForLock(LockManagerImpl.java:53)
              > >
              > > at weblogic.ejb.internal.LockManagerImpl.lock(LockManagerImpl.java:146)
              > >
              > > at weblogic.ejb.internal.LockManagerImpl.lock(LockManagerImpl.java:81)
              > >
              > > at
              weblogic.ejb.internal.StatefulEJBCache.bind(StatefulEJBCache.java:456)
              > >
              > > at
              > >
              >
              weblogic.ejb.internal.StatefulEJBObject.getContextForInvoke(StatefulEJBObjec
              > > t.java:162)
              > >
              > > at weblogic.ejb.internal.BaseEJBObject.preInvoke(BaseEJBObject.java:476)
              > >
              > > at
              > >
              >
              com.mm.nmc.entity.ProducerOneYearPlanEJBEOImpl.getData(ProducerOneYearPlanEJ
              > > BEOImpl.java:979)
              > >
              > > at
              > >
              >
              com.mm.nmc.session.PersonalTacticalSessionEJB.getTacticalPlanGoals(PersonalT
              > > acticalSessionEJB.java:200)
              > >
              > > at
              > >
              >
              com.mm.nmc.session.PersonalTacticalSessionEJB.getPersonalTacticalPlan(Person
              > > alTacticalSessionEJB.java:165)
              > >
              > > at
              > >
              >
              com.mm.nmc.session.PersonalTacticalSessionEJB.getPersonalTacticalPlan(Person
              > > alTacticalSessionEJB.java:155)
              > >
              > > at
              > >
              >
              com.mm.nmc.session.PersonalTacticalSessionEJBEOImpl.getPersonalTacticalPlan(
              > > PersonalTacticalSessionEJBEOImpl.java:340)
              > >
              > > at
              > >
              >
              com.mm.nmc.session.PersonalTacticalSessionEJBEOImpl_WLSkel.invoke(PersonalTa
              > > cticalSessionEJBEOImpl_WLSkel.java:167)
              > >
              > > at
              > >
              >
              weblogic.rmi.extensions.BasicServerObjectAdapter.invoke(BasicServerObjectAda
              > > pter.java:347)
              > >
              > > at
              > >
              >
              weblogic.rmi.extensions.BasicRequestHandler.handleRequest(BasicRequestHandle
              > > r.java:86)
              > >
              > > at
              > >
              >
              weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:1
              > > 5)
              > >
              > > at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:129)
              > >
              > >
              > >
              > >
              > >
              > >
              > > --
              > > Jiancai He
              > > http://www.hefamily.com
              > >
              > >
              >
              >
              

  • Application deployment order with weblogic-ejb-jar.xml and jndi-name

    I have two applicatation working on Weblogic server v. 10.3.6.
    First of them creating one ejb stateless bean and creates JNDI maping for it (in weblogic-ejb-jar.xml file):
    <weblogic-enterprise-bean>
         <ejb-name>ConfigMenegerBean</ejb-name>
         <stateless-session-descriptor>
         <stateless-session-descriptor>
              <business-interface-jndi-name-map>
              <business-remote>package.ConfigurationSessionRemote</business-remote>
              <jndi-name>ConfigMeneger</jndi-name>
              </business-interface-jndi-name-map>
         </stateless-session-descriptor>
         <enable-call-by-reference>true</enable-call-by-reference>
         <jndi-name>ConfigMeneger</jndi-name>
    </weblogic-enterprise-bean>
    Second appication have to refer for this bean by JNDI using spring been lookup :
    <jee:jndi-lookup id="configManager" jndi-name="ConfigMeneger"/>
    I changed deployment order parameter for both apllication(first=100 and second=500) in order to first app start first and share bean by jndi to another application. Unfortuantelly I got an error :
    javax.naming.NameNotFoundException: Unable to resolve 'ConfigMeneger'. Resolved ''; remaining name 'ConfigMeneger'
    How can I configure deployment order that first application make jndi mapping for bean, before the second application will use it ?

    Ok in a way I have solved my problem (even if I am not completely satisfied by the way on how to proceed...). So thanks to message "JBuilder7.0 and Weblogic6.1" on EJB sun forum :
    http://forum.java.sun.com/thread.jsp?thread=285735&forum=13&message=1255488
    I have tried the following actions (mentionned in the other forum messages):
    - To preserve changes to weblogic*.xml, the safest way is to change the ejb-borland.xml.
    (I am not sure that I have applied this advice correctly, because I suppose that syntax is not similar in weblogic file or borland file).
    And you can MANUALLY update the weblogic file in your JAR archive.
    1. Open the EJB JAR file in Winzip and extract the weblogic-ejb-jar.xml file, so that a copy exists in your
    project directory.
    2. Open this file (in Notepad), add the WebLogic specific information, and then save the file.
    3. Now, when you are finished with the build cycle and are ready to deploy, you may open the EJB jar file
    and swap in the weblogic-ejb-jar.xml file."
    Good Luck.

  • Storing ejb-jar.xml and weblogic-ejb-jar.xml

    We are using Weblogic Integration 9.2 on a 2 cluster system sharing the same domain directory.
    1) I am wondering if I can store these files somewhere in the domains directory instead of the EJB's archive - call it MyEjb.jar?
    2) Are there any benefits to storing these files outside of the MyEjb.jar file? I am thinking to make it easier to update the configurations such as number of MDB consumers and such to avoid having to recreate the MyEjb.jar with the new config and redeploy the application. A simple text edit and bounce could be fine if the files can be stored outside.
    2b) Can another application in the same domain read these files to find out the connection factory and queue information?
    3) Are there any disadvantages to storing those files outside of the jar file? One issue I can think of here is how to deal with them on a cluster environment.
    4) Any other feedback apprecaited.

    If you look at the contents of a deployment plan (Plan.xml) when you have it generated
    <deployment-plan ...>
      <module-override>
        <module-name>ejb.jar</module-name>
        <module-type>ejb</module-type>
        <module-descriptor external="true">
          <root-element>weblogic-ejb-jar</root-element>
          <uri>META-INF/weblogic-ejb-jar.xml</uri>
        </module-descriptor>
        <module-descriptor external="false">
          <root-element>ejb-jar</root-element>
          <uri>META-INF/ejb-jar.xml</uri>
        </module-descriptor>
        <module-descriptor external="true">
          <root-element>persistence-configuration</root-element>
          <uri>META-INF/persistence-configuration.xml</uri>
        </module-descriptor>
        <module-descriptor external="false">
          <root-element>persistence</root-element>
          <uri>META-INF/persistence.xml</uri>
        </module-descriptor>
      </module-override>
    </deployment-plan>You can see which files can be external and which can be not. The weblogic-ejb-jar.xml can be external
    but in this case you need a deployment plan to point weblogic to the file. The ejb-jar.xml cannot be
    external (see external=false)
    The benefit of storing the weblogic-ejb-jar.xml is that your administrator can fine tune certain
    configurations by using a deployment plan, instead of having to extract the contents from the jar file
    and then repackage it again.
    No need to worry about a clustered environment, you can place the jar and the deployment plan
    on the server where the admin server is located, when you deploy an application you deploy it to
    the cluster and everything is taken care off.
    More information on deployment plans can be found here: http://download.oracle.com/docs/cd/E11035_01/wls100/deployment/config.html

Maybe you are looking for

  • Dump error when posting through F-02.

    Greetings everyone, When posting G/L act through F-02 we are facing a dump error in QUALITY system and in DEVELOPMENT we are able to post succesfully. From my primary analysis one standard program is calling and that program has syntax error. When i

  • Memory is supposedly Full, deleted some files, and now I can't open Itunes.

    I have a Macbook Pro but I don't play any games, I've never downloaded movies, but I do download music approx. 16GB and pictures...though not sure how to see how much memory these take up. Recently I've had trouble because my computer keeps notifying

  • Plz help me in pse 7

    hi when i open the edit crash and give me  [unable to continue because of av hardware or syatim error.sorry ,but this error is unrecoverable] i use xp 32

  • Temp segment

    Why am i getting this error in a select statement which does not even use a temporary table of any kind? unable to extend temp segment in tablespace TEMP

  • How do I stop email alerts when I make an iCal entry?

    Every time I enter anything or change anything on my calendar, an email is sent to my wife with whom I share my calendar. She doesn't like the stream of emails, and I can't figure out how to make them go away. iCal is linked between my iMac, my iPhon