Redeploying of exploded EJBs within an exploded EAR

Hi all,
I've an exploded EAR application which has an exploded EJB. Inside my exploded EJB, I've a META-INF folder with a REDEPLOY file, if I update my EJB & touches the REDEPLOY file inside the META-INF, the EJB doesn't get redeployed. I'd to touched the REDEPLOY inside the META-INF folder of the exploded EAR, is this behavior correct?
Or am I missing something here?
Thanks!

Hi,
If you are only attempting to read the file, you should read the file as a resource. If you are planning on writing to this file, then it is not a good idea that you depend on where this file is deployed, just place it anywhere else.
Anyhow, if you have to do it, the best way is to obtain the resource URL, and from that the file name. BTW, there is no warranty that the war will get exploded, that you may be able to freely modify the file, nor that the file name be null :-S
{the Classloader of your choice}.getResource(<Resource name>).getFile()
should do the trick.
Regards,
LG

Similar Messages

  • Re: Exploded directory format in an EAR

              I am now trying to deploy the ear file in v6.1 sp2. Has anyone managed to deploy
              an ear where util / third party classes are stored in a lib directory of the ear
              and referenced in EJB-jar manifest.mf files using the classpath header?
              ie as documented in bea weblogic server bible on page 614/615
              EntApp/
              accountEJB.jar
              accountManager.war
              /lib/
              xerces.jar
              xalan.jar
              log4j.jar
              /META-INF/
              application.xml
              "erik" <[email protected]> wrote:
              >
              >This is hearsay but I was recommended to use v 6.1 SP 2.
              >/erik
              >
              >"Ivan" <[email protected]> wrote:
              >>
              >>I have a problem wrapping up an exploded directory format application
              >>into an ear
              >>file running weblogic 6.0sp2 on winnt 4. One of the things I would like
              >>to do
              >>is load a config file from a helper class without specifying a path.
              >>
              >>
              >>EAR APP statementapp.ear contains: META-INF/MANIFEST.MF statement.jar
              >>statementwebapp.war
              >>META-INF/application.xml lib/log4j.jar (and other third party jar files
              >>crimson.jar,
              >>jaxp.jar etc.)
              >>
              >>The third party jar files have been manually unjar'ed and re-jar'ed
              >without
              >>compression
              >>(after reading that a suggestion to someone else).
              >>
              >>WEB APP statementwebapp.war contains: all my jsp's at root level WEB-INF/classes/uk/.../servlets
              >>- servlets WEB-INF/classes/uk/.../util - helper classes WEB-INF/tlds
              >>- tag library
              >>descriptors WEB-INF/web.xml & weblogic.xml - deployment descriptors
              >
              >>
              >>Some of the helper classes make use of configuration files (for example
              >>I have
              >>a Logger class that uses Log4j). Here is how I would like to access
              >the
              >>config
              >>file
              >>
              >>... private static final String config = "config.properties" ; PropertyConfigurator.configure(
              >>config ) ; ...
              >>
              >>I have tried putting the config.properties file in the WEB-INF/classes
              >>directory
              >>and in the WEB-INF directory, however they don't seem to be found by
              >>the class
              >>loader.
              >>
              >>EJB statement.jar contains an ejb with the following: uk...business.statement...
              >>- Statement ejb classes with ejbc generated stub and skeleton classes
              >>uk...util
              >>- Several Helper classes
              >>
              >>One such helper is Logger for which the Log4j jar file is needed. I
              >deploy
              >>the
              >>statement.jar file in the ear (as listed above). Weblogic throws an
              >error
              >>message
              >>saying cannot deploy statement (NoClassDefFound...): java.lang.NoClassDefFoundError:
              >>org/apache/log4j/Category ie it cannot find the log4j package which
              >is
              >>referenced
              >>in the Class-Path header of the manifest.mf file and located in the
              >ear
              >>file under
              >>the lib directory.
              >>
              >>The manifest.mf file contains a line with the following: Class-Path:
              >>lib/log4j.jar
              >>lib/crimson.jar lib/jaxp.jar which I have read should allow the enterprise
              >>classloader
              >>to pick up the log4j.jar and xml parsing classes (ref. weblogic server
              >>bible chap
              >>18) without needing to be referenced in the weblogic start up class
              >path.
              >>
              >>
              >>Can manifest class-path references be used like this in weblogic 6.0?
              >>Where should
              >>I put the application properties files in the war and jar files?
              >>
              >>Clarification much appreciated. Ivan.
              >>
              >>PS: I had this application working in exploded directory format with
              >>the jar files
              >>in the system classpath and the properties file locations hardcoded
              >in
              >>the class
              >>files. (not ideal for a clustered production environment!)
              >>
              >
              

              This is hearsay again.
              These people did as you did no compression etc. they were able to put the application's
              utility classes in a lib but not the third party jars. They suspected that the
              ear where to big to deploy so they put all thirdparty jars in the system classpath
              and then the internal utility classes were loaded by using CLASSPATH in the manifest
              file.
              I gave up because I could deploy everything except servlets and I went back to
              exploded deployment. That bloody EAR thing took to much time.
              If you succeed in everything including warfiles with JSPs and servlets (those
              I was talking about only had EJBs)
              let me know.
              I also had a peculiar problem with EARs that a cascading stylesheet was not found
              in the ear but it worked in an exploded it worked fine
              Otherwise I must recommend Orion, which I had up and running in a matter of days
              when ported from WLS 5.1.
              Good luck.
              "Ivan" <[email protected]> wrote:
              >
              >I am now trying to deploy the ear file in v6.1 sp2. Has anyone managed
              >to deploy
              >an ear where util / third party classes are stored in a lib directory
              >of the ear
              >and referenced in EJB-jar manifest.mf files using the classpath header?
              >
              >ie as documented in bea weblogic server bible on page 614/615
              >EntApp/
              > accountEJB.jar
              > accountManager.war
              > /lib/
              > xerces.jar
              > xalan.jar
              > log4j.jar
              > /META-INF/
              > application.xml
              >
              >"erik" <[email protected]> wrote:
              >>
              >>This is hearsay but I was recommended to use v 6.1 SP 2.
              >>/erik
              >>
              >>"Ivan" <[email protected]> wrote:
              >>>
              >>>I have a problem wrapping up an exploded directory format application
              >>>into an ear
              >>>file running weblogic 6.0sp2 on winnt 4. One of the things I would
              >like
              >>>to do
              >>>is load a config file from a helper class without specifying a path.
              >>>
              >>>
              >>>EAR APP statementapp.ear contains: META-INF/MANIFEST.MF statement.jar
              >>>statementwebapp.war
              >>>META-INF/application.xml lib/log4j.jar (and other third party jar files
              >>>crimson.jar,
              >>>jaxp.jar etc.)
              >>>
              >>>The third party jar files have been manually unjar'ed and re-jar'ed
              >>without
              >>>compression
              >>>(after reading that a suggestion to someone else).
              >>>
              >>>WEB APP statementwebapp.war contains: all my jsp's at root level WEB-INF/classes/uk/.../servlets
              >>>- servlets WEB-INF/classes/uk/.../util - helper classes WEB-INF/tlds
              >>>- tag library
              >>>descriptors WEB-INF/web.xml & weblogic.xml - deployment descriptors
              >>
              >>>
              >>>Some of the helper classes make use of configuration files (for example
              >>>I have
              >>>a Logger class that uses Log4j). Here is how I would like to access
              >>the
              >>>config
              >>>file
              >>>
              >>>... private static final String config = "config.properties" ; PropertyConfigurator.configure(
              >>>config ) ; ...
              >>>
              >>>I have tried putting the config.properties file in the WEB-INF/classes
              >>>directory
              >>>and in the WEB-INF directory, however they don't seem to be found by
              >>>the class
              >>>loader.
              >>>
              >>>EJB statement.jar contains an ejb with the following: uk...business.statement...
              >>>- Statement ejb classes with ejbc generated stub and skeleton classes
              >>>uk...util
              >>>- Several Helper classes
              >>>
              >>>One such helper is Logger for which the Log4j jar file is needed. I
              >>deploy
              >>>the
              >>>statement.jar file in the ear (as listed above). Weblogic throws an
              >>error
              >>>message
              >>>saying cannot deploy statement (NoClassDefFound...): java.lang.NoClassDefFoundError:
              >>>org/apache/log4j/Category ie it cannot find the log4j package which
              >>is
              >>>referenced
              >>>in the Class-Path header of the manifest.mf file and located in the
              >>ear
              >>>file under
              >>>the lib directory.
              >>>
              >>>The manifest.mf file contains a line with the following: Class-Path:
              >>>lib/log4j.jar
              >>>lib/crimson.jar lib/jaxp.jar which I have read should allow the enterprise
              >>>classloader
              >>>to pick up the log4j.jar and xml parsing classes (ref. weblogic server
              >>>bible chap
              >>>18) without needing to be referenced in the weblogic start up class
              >>path.
              >>>
              >>>
              >>>Can manifest class-path references be used like this in weblogic 6.0?
              >>>Where should
              >>>I put the application properties files in the war and jar files?
              >>>
              >>>Clarification much appreciated. Ivan.
              >>>
              >>>PS: I had this application working in exploded directory format with
              >>>the jar files
              >>>in the system classpath and the properties file locations hardcoded
              >>in
              >>>the class
              >>>files. (not ideal for a clustered production environment!)
              >>>
              >>
              >
              

  • Exploded EJB jar

    Can you develop EJBs in an exploded format, or will WL only distribute them
    to target servers if they are in a jar?

    Well, I'm guessing this isn't possible because ejbc doesn't understand how
    to take a directory as an input instead of a jar file.
    "Eric F" <[email protected]> wrote in message
    news:3c20e777$[email protected]..
    Can you develop EJBs in an exploded format, or will WL only distributethem
    to target servers if they are in a jar?

  • Redeploying classes and EJBs into a running, external WeblogicServer6.1 application

    Is it possible to debug, edit, compile and deploy the new class and/or EJB using
    jBuilder5 on Win2k and WeblogicServer6.1 on Solaris WITHOUT restarting the app
    server? Is there solid documentation, where? I can debug, but the 'documentation'
    concerning re-deployment on an external WLS application server is vague at best.
    For example, from Borland...."If the EJB already exists in WebLogic Server, it
    may be necessary either to use re-deploy or to remove it from WebLogic Server
    before deployment." From BEA, "...create an empty file named REDEPLOY in the directory
    where the exploded application resides. ... After copying the new files, touch
    the REDEPLOY ...."

    I think i figured this one out. Thanks to everyone who looked at it. Have yourselves a good one.
    WOO HOO

  • Help !!  how to redeploy only an ejb using weblogic.Deployer ?

    Hi everyone, how to redeploy only one ejb (not the entire application) using weblogic.Deployer ? I executed the following command and getting wiered error !!! :
    java weblogic.Deployer -adminurl http://myadmin:7000 -username system -password weblogic -name myApp.ear -activate -targets testEJB.jar@jytServer -source myApp.ear
    I am getting the following error :
    weblogic.management.ApplicationException:
    [J2EE:160043]Missing deployment descriptor "META-INF/application.xml" at myApp.ear".
    The ear file very much contains the application.xml under META-INF directory and in the application.xml, there is an entry for myBean.jar.
    However if i try the following command, it will redeploy the EJB but it will deploy it as a separate application :
    java weblogic.Deployer -adminurl http://myadmin:10720 -username system -password weblogic -targets jytServer deploy testEJB.jar
    But I want to redeploly it as a part of .ear application.
    I would highly appreicate your help. (assume that admin console access is denied and i will have to use weblogic.Deployer to redeploy).
    thanks,
    jyothi

    Where do I specify the order of deployment? I have 2 EJB jar files and Web module, the order need to be Web module first, 2 EJB then EAR. In WebSphere it is defined in Deployment.xml file, where do I define Deployment.xml in WebLogic

  • Exploded Vs Archive form of EAR file

    Hi
    I have 3 JSPs named one.jsp, two.jsp, three.jsp.
    one.jsp includes two.jsp in 4 places.
    two.jsp includes three.jsp in 3 places.
    All the three jsps uses JSTL to load the values from sql server database.
    When I load the one.jsp file from an Archived ear file, it is taking 7 to 10 seconds to load the file. But, When I try to load it from an exploded ear file, it is loading within a second.
    What is the difference between loading the same file in exploded and archived forms?
    what are the adavantages and disadvantages of Exploded Vs Archive form of an web application?
    Please, help to know this information.
    Thanks,
    JavaBuddy.

    When I load the one.jsp file from an Archived ear
    file, it is taking 7 to 10 seconds to load the file.
    But, When I try to load it from an exploded ear file,
    it is loading within a second.Could you clarify what do you mean by load the file? Do you mean redeploy the application?
    And how did you deploy the web application? Through autodeploy, cli deploy or admin console, netbeans?
    Do you have precompilejsp option set to same value for both archive and directory deployment (what you referred as the exploded)? This option is used to dermine whether we compile jsp files during deployment time or runtime when the jsp is invoked the first time..
    >
    What is the difference between loading the same file
    in exploded and archived forms?
    what are the adavantages and disadvantages of
    Exploded Vs Archive form of an web application?Directory deployment has less overhead than archive deployment (no need to explode the archive etc) so it's usually faster.
    Directory deployment is targeting developers who need to change the contents of their application often and redeploy. It is faster and also developer doesn't need to repackage the archive each time after modifying the contents.
    Directory deployment has some limitations: currently it is not supported on EE platform (cluster). If you don't need to use the cluster feature and always use the PE version, there should be no problem just always doing directory deployment.

  • Exploded directory format in an EAR

              I have a problem wrapping up an exploded directory format application into an ear
              file running weblogic 6.0sp2 on winnt 4. One of the things I would like to do
              is load a config file from a helper class without specifying a path.
              EAR APP statementapp.ear contains: META-INF/MANIFEST.MF statement.jar statementwebapp.war
              META-INF/application.xml lib/log4j.jar (and other third party jar files crimson.jar,
              jaxp.jar etc.)
              The third party jar files have been manually unjar'ed and re-jar'ed without compression
              (after reading that a suggestion to someone else).
              WEB APP statementwebapp.war contains: all my jsp's at root level WEB-INF/classes/uk/.../servlets
              - servlets WEB-INF/classes/uk/.../util - helper classes WEB-INF/tlds - tag library
              descriptors WEB-INF/web.xml & weblogic.xml - deployment descriptors
              Some of the helper classes make use of configuration files (for example I have
              a Logger class that uses Log4j). Here is how I would like to access the config
              file
              .. private static final String config = "config.properties" ; PropertyConfigurator.configure(
              config ) ; ...
              I have tried putting the config.properties file in the WEB-INF/classes directory
              and in the WEB-INF directory, however they don't seem to be found by the class
              loader.
              EJB statement.jar contains an ejb with the following: uk...business.statement...
              - Statement ejb classes with ejbc generated stub and skeleton classes uk...util
              - Several Helper classes
              One such helper is Logger for which the Log4j jar file is needed. I deploy the
              statement.jar file in the ear (as listed above). Weblogic throws an error message
              saying cannot deploy statement (NoClassDefFound...): java.lang.NoClassDefFoundError:
              org/apache/log4j/Category ie it cannot find the log4j package which is referenced
              in the Class-Path header of the manifest.mf file and located in the ear file under
              the lib directory.
              The manifest.mf file contains a line with the following: Class-Path: lib/log4j.jar
              lib/crimson.jar lib/jaxp.jar which I have read should allow the enterprise classloader
              to pick up the log4j.jar and xml parsing classes (ref. weblogic server bible chap
              18) without needing to be referenced in the weblogic start up class path.
              Can manifest class-path references be used like this in weblogic 6.0? Where should
              I put the application properties files in the war and jar files?
              Clarification much appreciated. Ivan.
              PS: I had this application working in exploded directory format with the jar files
              in the system classpath and the properties file locations hardcoded in the class
              files. (not ideal for a clustered production environment!)
              

              This is hearsay but I was recommended to use v 6.1 SP 2.
              /erik
              "Ivan" <[email protected]> wrote:
              >
              >I have a problem wrapping up an exploded directory format application
              >into an ear
              >file running weblogic 6.0sp2 on winnt 4. One of the things I would like
              >to do
              >is load a config file from a helper class without specifying a path.
              >
              >
              >EAR APP statementapp.ear contains: META-INF/MANIFEST.MF statement.jar
              >statementwebapp.war
              >META-INF/application.xml lib/log4j.jar (and other third party jar files
              >crimson.jar,
              >jaxp.jar etc.)
              >
              >The third party jar files have been manually unjar'ed and re-jar'ed without
              >compression
              >(after reading that a suggestion to someone else).
              >
              >WEB APP statementwebapp.war contains: all my jsp's at root level WEB-INF/classes/uk/.../servlets
              >- servlets WEB-INF/classes/uk/.../util - helper classes WEB-INF/tlds
              >- tag library
              >descriptors WEB-INF/web.xml & weblogic.xml - deployment descriptors
              >
              >Some of the helper classes make use of configuration files (for example
              >I have
              >a Logger class that uses Log4j). Here is how I would like to access the
              >config
              >file
              >
              >... private static final String config = "config.properties" ; PropertyConfigurator.configure(
              >config ) ; ...
              >
              >I have tried putting the config.properties file in the WEB-INF/classes
              >directory
              >and in the WEB-INF directory, however they don't seem to be found by
              >the class
              >loader.
              >
              >EJB statement.jar contains an ejb with the following: uk...business.statement...
              >- Statement ejb classes with ejbc generated stub and skeleton classes
              >uk...util
              >- Several Helper classes
              >
              >One such helper is Logger for which the Log4j jar file is needed. I deploy
              >the
              >statement.jar file in the ear (as listed above). Weblogic throws an error
              >message
              >saying cannot deploy statement (NoClassDefFound...): java.lang.NoClassDefFoundError:
              >org/apache/log4j/Category ie it cannot find the log4j package which is
              >referenced
              >in the Class-Path header of the manifest.mf file and located in the ear
              >file under
              >the lib directory.
              >
              >The manifest.mf file contains a line with the following: Class-Path:
              >lib/log4j.jar
              >lib/crimson.jar lib/jaxp.jar which I have read should allow the enterprise
              >classloader
              >to pick up the log4j.jar and xml parsing classes (ref. weblogic server
              >bible chap
              >18) without needing to be referenced in the weblogic start up class path.
              >
              >
              >Can manifest class-path references be used like this in weblogic 6.0?
              >Where should
              >I put the application properties files in the war and jar files?
              >
              >Clarification much appreciated. Ivan.
              >
              >PS: I had this application working in exploded directory format with
              >the jar files
              >in the system classpath and the properties file locations hardcoded in
              >the class
              >files. (not ideal for a clustered production environment!)
              >
              

  • Read XML file in WEB-INF works in exploded format but fails in EAR

    I'm able to read an XML file stored in the WEB-INF when my application is deployed in the exploded format, but when its deployed in an EAR, the reading fails.
              I read from forums that getRealPath could fail, so I added in the getResourceAsStream to fall back on. But in the EAR format, both fails.
              What did I miss out?
              Here's my codes:
                          StringBuffer configFileName = new StringBuffer();
                configFileName.append(File.separatorChar).append("WEB-INF");
                configFileName.append(File.separatorChar).append("app-config.xml");
                String fileName = getServletContext().getRealPath(configFileName.toString());
                if (fileName == null) {
                  request.setAttribute("efs/xmlmappings-is", getServletContext().getResourceAsStream(configFileName.toString()));
                } else {
                  request.setAttribute("efs/xmlmappings-str", fileName);
              

    Hi          > Thread.currentThread().getContextClassLoader().getReso
              > urceAsStream()
              >
              > getClass().getClassLoader().getResourceAsStream()
              > should also work
              > if the file is in WEB-INF/classes
              >
              > regards
              > deepak
              It works, thanks!

  • EJB deployment problems using ear

    Hi,
    I am able to deploy the ejbs in exploded format, but when I deploy
    them in an ear, I see 'EJB Deployed message' on the start up console.
    But when my servlet is trying to create the EJB, I am getting
    CreateException. What is the reason for that?
    Thanks,
    Mark Pluta

    Mark
    You'll probably receive more help if you print out the stack trace... in the meanwhile..
    there are some things to make sure.. verify that in the application.xml of your
    ear file you have your ejb's declared, in the console view the JNDI tree and make
    sure that the ejb's are on there as well.. viewing the stacktrace might be able
    to get you more help though
    Chris
    Mark Pluta <[email protected]> wrote:
    Hi,
    I am able to deploy the ejbs in exploded format, but when I deploy
    them in an ear, I see 'EJB Deployed message' on the start up console.
    But when my servlet is trying to create the EJB, I am getting
    CreateException. What is the reason for that?
    Thanks,
    Mark Pluta

  • Redeploying an Individual EJB Implementation Class

    Hi all,
    Read from the documentation http://edocs.bea.com/wls/docs81/ejb/deploy.html#1088643 that WLS 8.1 is supporting deploying of an individual EJB implementation class, but sadly no further examples or steps are shown to illustrate this.
    If I have a few entity & session beans inside my EJB JAR, how could I proceed to recompile & regenerate just the needed files for a specific EJB?
    Could someone help me with this?
    Many thanks!

    This will work only in case of exploded applications where you can just
    update the implementation classes. You can use the weblogic.Deployer tool to
    redeploy just the implementation class.
    --Sathish
    <Cheng Wei Lee> wrote in message news:[email protected]..
    Hi all,
    Read from the documentation
    http://edocs.bea.com/wls/docs81/ejb/deploy.html#1088643 that
    WLS 8.1 is supporting deploying of an individual EJB implementation class,
    but sadly no further examples or steps are shown to illustrate this.
    If I have a few entity & session beans inside my EJB JAR, how could I
    proceed to recompile & regenerate just the needed files for a specific
    EJB?
    Could someone help me with this?
    Many thanks!

  • Deploying EJB JAR and Application EAR, META-INF directory name

    To all:
    I had a problem the last couple of days with deploying an EJB and application.
    I'm new to WebLogic, maybe this is common knowledge, but I researched it and
    didn't find any reference to what I discovered.
    I'm using WebLogic Server 7 Service Pack 2 (7.02), on Windows 2000.
    My problem was that the application that I was trying to deploy would not deploy
    successfully, because a dependent class was not found for the EJB. I tried everything,
    but the only thing I could get to work was placing the dependent jar files in
    the classpath of the WebLogic server, within the start script. I correctly had
    the Class-Path manifest line correct, but the dependent classes were not being
    found.
    Through trial and error I discovered that the META-INF directory within the JAR
    and EAR archives HAS TO BE ALL UPPERCASE for the app server to successfully find
    the manifest.mf file and the application.xml file.
    As soon as I changed the directory name in both the EJB JAR file and the application
    EAR file, the EJB deployed successfully, all dependent classes were then found.
    I'm posting this here to help anybody that might have the same problem. There
    is not any documentation that I could find that had this directory name requirement
    explicitly stated.
    Regards,
    JD

    What does the manual for the OC4J application server have to say about it all?

  • EJB deployement: jar versus ear

    WLS 6.1 SP2, NT4
    Hi,
    if I deploy an ejb-jar-1 to be used by a Java client for instance and
    have requirements for a new web client using ejb-jar-1 and a new ejb-jar-2
    six months later,
    what should I do ?
    1/ Deploy a newapp.ear including my war file, my ejb-jar-2 and again
    ejb-jar-1.
    This ejb-jar-1 will be referenced as newapp.ear\ejb-jar-1.jar compared
    to the one previously deployed (ejb-jar-1)
    In this case, how does JNDI work if I lookup "MyBean" especially if both
    ejb-jar-1
    and newapp.ear\ejb-jar-1 have one common JNDI entry. Do have I to
    include a new ejb-jar-1-bis instead and change the
    jndi entry in its descriptor ?
    2/ Deploy a newapp.ear including my war file and only my new ejb-jar-2.
    3/ Deploy a newapp.ear including my war file and only my new ejb-jar-2 but
    referencing/attaching the ejb-jar-1.
    4/ Anything else ?
    Generally speaking, I am a bit confused when comes the deployment of several
    applications
    potentially using common components. Can we have duplicate deployed
    components ? Is there any JNDI issues
    associated with such practice ?
    Could somebody clarify how does it work when comes to deploy single EJBs
    versus applications including EJB ?
    What is the best practice etc ... ?
    Thanks
    Arnaud

    STARTMODE is only available in WLS 6.1 and not WLS 6.0.
    Deepak Vohra wrote:
    Tom
    Edit the startWeblogic Command Script.
    set STARTMODE=false
    Deepak
    Tom Gerber wrote:
    Is STARTMODE available in 6.0??? I thought that was new to 6.1.
    I'm running on NT so do I set this on the Java command line as a
    -DSTARTMODE=false or is it a regular environment variable?
    Tom
    Deepak Vohra wrote:
    Tom
    In startWebLogic script set STATRTMODE=false
    STARTMODE=false starts server in development mode.
    Deepak
    Tom Gerber wrote:
    We are using wl 6.0 sp2 rp2 - with 2 WL instances on the same box.
    We have always seemed to have had this headache with WL - getting EJB's
    to reload consistently.
    Does anyone have a sequence of steps they follow to get good consistent
    reloading results from both an EJB in its own JAR or an EAR file?
    If we just copy the file over sometimes it seems to reload and sometimes
    not.
    If we try to use the console to "install an application" again sometimes
    it deploys the EJB's to the wrong server instance!
    Also is there anyway in the Weblogic deployment descriptor to specify
    which instance the EJB should be deployed against?
    Thanks
    Tom
    Rajesh Mirchandani
    Developer Relations Engineer
    BEA Support

  • Problem if trying to invoke a EJB from outside the .ear in which its deploy

    Hi,
    I have deployed an ear containing an EJB and a sample JSP to invoke it. Its working fine.
    But when i m trying to invoke this same EJB from a standalone java program it is able to identify home and remote interface but its not entering into the bean class.
         Hashtable myEnv = new Hashtable();
              myEnv.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");
              myEnv.put(Context.PROVIDER_URL,"t3://localhost:7001");
              try{
              Context ctx = new InitialContext(myEnv);
              SampleHome home = (SampleHome)ctx.lookup("com.beanfolder.SampleHome");
              System.out.println("Home: " + home.getClass().getName());
              Sample sample = home.create();
              System.out.println("Remote: "+sample.getClass().getName());
              sampleResponse = sample.getMessage(sampleRequest);
              String result = sampleResponse.getAirportName().toString();
              }catch(Exception ex){
    where sampleRequest and SampleResponse are the jaxb interfaces of this EJB.
    Its successfully printing the SOPs ie home and the remote class but not entering in the bean.
    Any clues???

    Hi,
    I wud suggest you to make a jar of ur java class and include it in the project libraries of BPEL and make use of java embedded activity this way it works.
    have a luk at below link:
    http://niallcblogs.blogspot.com/search/label/embedded%20Java

  • Service Call EJB Error : "caf~runtime~ear doesnu2019t run"

    Hi,
    NW 7.0
    The development structure We develop an Enterprise portal DC with a Service whose configuration starup=true. That service calls an EJB object which is in a custom Component Application Service project, when it initializes. Appearance When we start the J2EE engine(NetWeaver 7.0), the log is u201Ccafruntimeear doesnu2019t runu201D, this cause the service gets exception. So our question is how to run cafruntimeear before the Service starting ???
    thanks a lot~~~
    Edited by: wei yan on Sep 23, 2009 8:35 AM

    Dear Rutt,
    I have fixed the issue.
    I took the CAF component out  and deployed all other components first.
    The deployment finished successfully.
    After the deployment, I have restarted the CAF component and all is running fine.
    The error log provided a login exception for the administrator account, but this account was working and the passwaord was synchronized between configtool and http access. I was not able to understand this message.
    I have tried to force the deplyment with sdm. Did not work. I have done this way in the past too.
    SAP supports only JSPM as tool to deploy SPS.
    Thanks for your support.
    Best Regards,
    Olaf Reiss

  • How to propagate JSP-Container-Login and EJB-Lookup?

    I think I have a very common problem which should be solved by multitudes of developers, but still I can't find sufficient info how to solve it. Here is my problem:
    - My App consists of 2 different EARs, one Web-EAR and one EJB-EAR
    - The Webapp uses digest authentication through web.xml security-constraint
    - Currently both EARs are using xml-based security-provider (jazn)
    - Any user has to log in to the webapp (this works)
    - the webapp delegates business-logic to EJB3 stateless SessionBeans
    - as long as I hardcode principal and password on the creation of the InitialContext, the authentication on the EJB-container works also fine
    - what I need is a propagation of the logged in webapp user to the EJB-container
    - I switched on subject-propagation as described in OC4J security guide chapter 18
    The problem: The propagation doesnt seem to work as expected. I still have to use (hardcoded) user/password credentials upon InitalContext-creation.
    - How can I reassure that subjectpropagation is switched in?
    - How do I have to instantiate the InitialContext in order to use propagation?
    This is what I do now:
    Properties p = new Properties();
    p.put(Context.INITIAL_CONTEXT_FACTORY, "oracle.j2ee.rmi.RMIInitialContextFactory");
    p.put(Context.PROVIDER_URL, ormi://localhost:23791/EJB-EAR);
    p.put(Context.SECURITY_PRINCIPAL, "myuser");
    p.put(Context.SECURITY_CREDENTIALS, "mypassword");
    Context = new InitialContext(p);
    When loggin into the web-container, the password of the logged-in user is not accessible anymore. Because of that I thought automatic subject-propagation shouold solve my problem. Did I misunderstood the concept of subjectpropagation (using ORMI)

    So far I have achived the following, but my problem is not really solved:
    As long as I use EJBs within the same EAR of my webapp everthing is fine.
    No need to proved credentials with the instantiation of the InitialContext. Also subject-propagation is not needed.
    At the moment I split ejb and webapp into separate EAR on the same OC4J-instance, I have to use the RMIInitialcontextFactory, to get acces to the EJBs at all. Subject-Propagation is obviusly on, because without the call of Subject.getSubject(AccessController.getContext) delivers null!
    So the remaining question is, how do I initiate the subject-propagation over RMI? Is there a special name under which I have to put my subject? Do I have to execute the actual ejb-method-call by subject.doAs.. and thus have to provide a wrapper for my EJB as a ProtectedObject?
    Anybody?

Maybe you are looking for

  • Opening a video playback app causes a system-wide stutter...

    I've been experiencing a very odd bug, and I can't find anyone else who's had it, let alone had a solution to it. When I open any app that plays back video (iTunes, QuickTime, VLC, DVD Player, etc.), it causes the display to hang up every few seconds

  • How do I fill a gap with silence, at the beginning of a track, in multi-track mode?

    Hey everybody! I have 2 tracks in multi-track mode ... one is Music and the other is Vocals. The music starts at the beginning and lasts 3 minutes. The vocals don't begin until 10 seconds into the music. I need to insert silence in the beginning of t

  • Query on Ipad mini 2 usage

    Hello - I am planning to buy a ipad mini 2 (wifi + cellular) model and will be using it in India. Please let me know which carrier model should I buy so it can be changed to local India carrier? Also let me know if these ipad model are unlocked versi

  • Upgraded to 4.2 and lost text clicking.

    I upgraded to 4.2 and lost text clicking. I checked my settings, sounds, and made sure keyboard clicks was checked. I did a couple hard restarts to no avail. Any ideas?

  • I can't remove full tilt poker from my mac. Can you help?

    I installed Full Tilt Poker on my mac. I don't really like it and want to delete the program. When I drag it to the trash, it pops out. Any suggestions?