Using WLDF and a custom class preprocessor

I'm already using a class preprocessor for instrumenting classes during class loading with the java option "weblogic.classloader.preprocessor". When I run this in Weblogic 9.2.2 with WLDF enabled, on the MedRec server, I get the following exception and the medrec app fails to deploy. Can anyone help? My preprocessor adds some byte code to get method execution times. It works fine when I do not have WLDF turned on. But when WLDF is enabled, this exception occurs. I've tried to disable it on a class by class basis, but it will happen on the next class it tries to load which I have already instrumented.
Unable to deploy EJB: C:\bea\922\weblogic92\samples\server\medrec\src\medrecEar\sessionEjbs from sessionEjbs:
Unable to load a class specified in your ejb-jar.xml: Class bytes found but defineClass()failed for: 'com.bea.medrec.controller.PatientSessionEJB'
weblogic.application.ModuleException: Exception preparing module: EJBModule(sessionEjbs)
Unable to deploy EJB: C:\bea\922\weblogic92\samples\server\medrec\src\medrecEar\sessionEjbs from sessionEjbs:
Unable to load a class specified in your ejb-jar.xml: Class bytes found but defineClass()failed for: 'com.bea.medrec.controller.PatientSessionEJB'
     at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:381)
     at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:93)
     at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:360)
     at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
     at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:56)
     at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:46)
     at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.java:615)
     at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
     at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:191)
     at weblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:147)
     at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:61)
     at weblogic.deploy.internal.targetserver.AppDeployment.prepare(AppDeployment.java:137)
     at weblogic.management.deploy.internal.DeploymentAdapter$1.doPrepare(DeploymentAdapter.java:38)
     at weblogic.management.deploy.internal.DeploymentAdapter.prepare(DeploymentAdapter.java:177)
     at weblogic.management.deploy.internal.AppTransition$1.transitionApp(AppTransition.java:21)
     at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:233)
     at weblogic.management.deploy.internal.ConfiguredDeployments.prepare(ConfiguredDeployments.java:165)
     at weblogic.management.deploy.internal.ConfiguredDeployments.deploy(ConfiguredDeployments.java:122)
     at weblogic.management.deploy.internal.DeploymentServerService.resume(DeploymentServerService.java:173)
     at weblogic.management.deploy.internal.DeploymentServerService.start(DeploymentServerService.java:89)
     at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
     at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
     at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)
weblogic.ejb.container.deployer.DeploymentDescriptorException: Unable to load a class specified in your ejb-jar.xml: Class bytes found but defineClass()failed for: 'com.bea.medrec.controller.PatientSessionEJB'
     at weblogic.ejb.container.deployer.MBeanDeploymentInfoImpl.initializeBeanInfos(MBeanDeploymentInfoImpl.java:600)
     at weblogic.ejb.container.deployer.MBeanDeploymentInfoImpl.<init>(MBeanDeploymentInfoImpl.java:221)
     at weblogic.ejb.container.deployer.EJBDeployer.prepare(EJBDeployer.java:1156)
     at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:354)
     at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:93)
     at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:360)
     at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
     at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:56)
     at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:46)
     at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.java:615)
     at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
     at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:191)
     at weblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:147)
     at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:61)
     at weblogic.deploy.internal.targetserver.AppDeployment.prepare(AppDeployment.java:137)
     at weblogic.management.deploy.internal.DeploymentAdapter$1.doPrepare(DeploymentAdapter.java:38)
     at weblogic.management.deploy.internal.DeploymentAdapter.prepare(DeploymentAdapter.java:177)
     at weblogic.management.deploy.internal.AppTransition$1.transitionApp(AppTransition.java:21)
     at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:233)
     at weblogic.management.deploy.internal.ConfiguredDeployments.prepare(ConfiguredDeployments.java:165)
     at weblogic.management.deploy.internal.ConfiguredDeployments.deploy(ConfiguredDeployments.java:122)
     at weblogic.management.deploy.internal.DeploymentServerService.resume(DeploymentServerService.java:173)
     at weblogic.management.deploy.internal.DeploymentServerService.start(DeploymentServerService.java:89)
     at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
     at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
     at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)
>

Hello,
If you can capture and post the output of your class-preprocessor, we can take a look at it.
Incidently, WLDF provides the TraceElapsedTimeAction library action which provides method execution time data.
Thanks,
rinamdar

Similar Messages

  • When to use interface and when Abstract Class?

    In a recent interview I was asked "When to use interface and when Abstract Class?" Explain with an example.
    Also in what situations a class should be made final(real time example)

    Interface is a pure contract with no implementation. Typically used to define a communication contract between two different sub-systems. Example EJB home interface. This also allows the design to change as long as the contract is met.
    Abstract class is when there exists a lot of common functionality already known and can be coded. However, a few unknowns exists (typically about data) for which abstract methods need to be defined and implemented by the sub class.
    Example: Consider a workflow engine. A great example for abstract class. The workflow process has lot of common code that is independent of the workflow type (vendor flow, contract flow, payment flow etc). However, certain decisions on the route to take will depend on value of data being submitted. So the base class will define a abstract Data getData() method and proceed assuming data will come. The implementing subclass will provide the actual logic for getting the data.
    Also see the "Template" design pattern.
    Note: To some extent the common code design drives the behavior of the abstract methods. So if the design changes then so "might" the behavior expected from the abstract methods.

  • Need help calling and looping custom classes

    Hi, I am writing a code with custom classes in it and another program that calls upon all of the classes in the first program. I can get the second one (L6) to call upon and execute all of the classes of the first (Foreign). However, I need the second one to loop until quit is selected from the menu on Foreign and I can't seem to figure out how to do it. Here are the codes:
    L6:
    public class lab6
    public static void main(String[] args)
    Foreign camount = new Foreign();
    camount = new Foreign();
    camount.get();
    camount.print();
    camount.intake();
    camount.convert();
    camount.vertprint();
    System.out.println(camount);
    Foreign:
    import java.util.Scanner;
    public class Foreign
    private String country;
    private int choice;
    private float dollars;
    private float conversionValue;
    private float conversionAmount;
    public Foreign()
    country = "null";
    choice = 0;
    dollars = 0;
    conversionValue = 0;
    conversionAmount = 0;
    public void get()
         Scanner Keyboard = new Scanner(System.in);
              System.out.println("Foreign Exchange\n\n");
    System.out.println("1 = U.S. to Canada");
    System.out.println("2 = U.S. to Mexico");
    System.out.println("3 = U.S. to Japan");
    System.out.println("4 = U.S. to Euro");
    System.out.println("0 = Quit");
    System.out.print("\nEnter your choice: ");
    choice = Keyboard.nextInt();
    public void print()
    System.out.print("\nYou chose " + choice);
    public void intake()
         Scanner Keyboard = new Scanner(System.in);
              if (choice >= 1 && choice <= 4)
    switch (choice)
              case 1: System.out.println("\nU.S. to Canada");
                        conversionValue = 1.1225f;
                        country = ("Canadian Dollars");
                        break;
              case 2: System.out.println("\nU.S. to Mexico");
                        conversionValue = 10.9685f;
                        country = ("Mexican Pesos");
    break;
              case 3: System.out.println("\nU.S. to Japan");
                        conversionValue = 118.47f;
                        country = ("Japanese Yen");
    break;
              case 4: System.out.println("\nU.S. to Euro");
                        conversionValue = 0.736377f;
                        country = ("European Union Euros");
    break;
                   System.out.print("\nEnter U.S. dollar amount: ");
              dollars = Keyboard.nextFloat();
    public void convert()
    conversionAmount = conversionValue * dollars;
    public void vertprint()
    System.out.println("\nCountry = " + country);
    System.out.println("Rate = " + conversionValue);
    System.out.println("Dollars = " + dollars);
    System.out.println("Value = " + conversionAmount);
    public String toString()
    String line;
    line = "\n" + country + " " + conversionValue + " " + dollars + " " + conversionAmount;
    return line;
    I appreciate any help anyone can give me. This is driving me crazy. Thanks.

    1. first you need to write method to get choice value from Foreign class.
    simply add this method.
       public class Foreign {
          // ... Add this
          public int getChoice() {
             return choice;
       }2. Then in your main, you can obtain with previos method.
    public static void main(String[] args) {
       Foreign camount = new Foreign();
       // remove this. you alredy create an instance in last statement.
       //camount = new Foreign();
       int choice = 0;
       do {
          camount.get();
          choice = camount.getChoice();
          // your process...
       } while (choice != 0);
    }

  • Check PIN using keypad and some smartcardio-classes are different?

    Hello,
    I started testing with javacards a few weeks ago. I started using the OCF in my application, but now I want to use the Java6-classes, but I am new to this.
    My first problem: there are different classes in the java docs online then in my java6. E.g. I do not have a class called CardTerminals. factory.terminals() returns a List<CardTerminal>.
    Do I use the wrong Environment?
    My second question: how can I ask for my cards PIN? For entering it I want to use my card-readers (Kobil Kaan Advanced) pinpad.
    Thank you in advance for any help,
    Susanne

    Oh...ok, my misunderstanding. But....is this way secure? Perhaps "prompt" was the wrong expression. I want, that the user has to enter his PIN with the build-in pinpad. I am not sure, but isn'T it that way, that the entered pin is not send back to my application? Because then the pinpad would be senseless and i could use the pcs keyboard.
    So I thought there is an (apdu)command, that "says" to the cardreader: let the user enter his PIN (my cardreader then makes a "beep" and you can enter the pin via pinpad). After that the card sends back "ok" (90 00 or so). So the application can continue.
    The "prompt" I thought of, should never get the real numbers from the pinpad, but only displays * or so when a key is pressed on keypad.

  • Is it possible to get Exchange emails downloaded to SharePoint document library using Powershell and or Custom Workflow?

    I have been asked to see if it would be possible to get  exchange emails downloaded and or sent to a document library .
    I know of the sitemail box app. but we are not running Exchange 2013.
    and setting up the lists and or document library to receive emails using the built in doesn't seem to be working...( maybe not configured correctly, i would need to see what the prior admin/developer did)
    But is there a way to get the emails downloaded to a document library using a workflow and or a powershell script that is triggered via  workflow?

    Hi,
    Since workflow can only work on items in SharePoint sites, they cannot get Exchange emails, let alone download emails to SharePoint library. However, you could manually save email to local and upload it to SharePoint list/library.
    I'd suggest you toubleshooting the incoming email settings in SharePoint. Please refer to the article below and check your configuration:
    https://technet.microsoft.com/en-us/library/cc262947.aspx
    http://blogs.technet.com/b/harmeetw/archive/2012/12/29/sharepoint-2013-configure-incoming-emails-with-exchange-server-2013.aspx
    Regards,
    Rebecca Tu
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • Send email (c#) using ews and set custom display name (from)

    How to connect to exchange service via exchange web services send a mail and the display name is custom ?
    With this code, just connect to exchange server (ews) and send a mail.
    How to change my code ?
    private void t() {
    const string subjectBody = "test email ";
    const string username = "username";
    const string password = "password";
    const string domain = "domain";
    const string ewsURL = "http://exchangesrv/ews/exchange.asmx";
    unews.ExchangeServiceBinding esb = new unews.ExchangeServiceBinding();
    esb.Credentials = new System.Net.NetworkCredential( username, password, domain );
    esb.Url = ewsURL;
    unews.CreateItemType newItem = new unews.CreateItemType();
    newItem.MessageDisposition = unews.MessageDispositionType.SendAndSaveCopy;
    newItem.MessageDispositionSpecified = true;
    unews.MessageType msg = new unews.MessageType();
    msg.Subject = subjectBody;
    msg.Body = new unews.BodyType();
    msg.Body.BodyType1 = unews.BodyTypeType.Text;
    msg.Body.Value = subjectBody;
    msg.ToRecipients = new unews.EmailAddressType[1];
    msg.ToRecipients[0] = new unews.EmailAddressType();
    msg.ToRecipients[0].EmailAddress = "[email protected]";
    newItem.Items = new unews.NonEmptyArrayOfAllItemsType();
    newItem.Items.Items = new unews.ItemType[1];
    newItem.Items.Items[0] = msg;
    try {
    unews.CreateItemResponseType createItemResponse = esb.CreateItem( newItem );
    if (createItemResponse.ResponseMessages.Items[0].ResponseClass == unews.ResponseClassType.Error) {
    throw new Exception( createItemResponse.ResponseMessages.Items[0].MessageText );
    else {
    Console.WriteLine( "Item was created" );
    catch (Exception ex) {
    Console.WriteLine( ex.ToString() );
    With this code, can connect to a exchange server (smtp) and send a mail, with a custom display name.
    System.Net.Mail.SmtpClient smtpc = new System.Net.Mail.SmtpClient( "exchangesrv" );
    System.Net.Mail.MailMessage mm = new System.Net.Mail.MailMessage( "CustomDisplayName <[email protected]>", "[email protected]", "test email", "test email" );
    smtpc.Credentials = new System.Net.NetworkCredential( "username", "password", "domain" );
    smtpc.Send( mm );

    That won't work the way you want it in EWS, like when you send via Outlook or OWA when you send a messages via EWS it's submitted via the Exchange store so the Sender Address will be resolved back to the default Reply address for whatever account your trying
    to send as. If you need some sort of custom display name I would suggest you stick to SMTP or possible create a Transport Agent that would rewrite the address before its sent externally.
    Cheers
    Glen

  • Use of events and interface in class

    Dear All,
    Could you please explain why we use events and interface in class.
    Also please tell me the use of TRY and ENDTRY.
    Regards,
    Amar

    Events may be a way of communication b/w classes. Imagine you want to call certain code from one class, you would need for that public method, but you don't want to expose it to external user. So you may use events for that. Also events are used to notify that certain state of class has changed (tiggering event). Then all handlers of this event executes and react accordingly.
    Interfaces are a way of provide a service to class which implements it. Imagine that you have class office and hotel and gas station . They don't seems to have something in common. However, there can be some external energy provider which will be an interface. Each class which want to have a lease with this energy provided can implement it (the implementation can differ in some way), so he can provided energy to different classes. This way you will achieve polimorphism (meaning you call one interface method, but code behind it differs from class to class).
    Interfaces are also means of multiple inheritance. One class can implement several service (interfaces). In contrary it can oly inherit from one class.
    Try endtry are just new way of handling exceptions .
    Try to search a litte bit you will find lots of info on the above.
    Regards
    Marcin

  • How do I close a JInternalFrame when using subclasses and a separate cla...

    The heading should be: How do I close a JInternalFrame when using subclasses and a separate class for the actionListener?
    I have just created a JInternalFrame appclication and now I want to structure up my code. I have a Superclass that contains the usual settings for the two JInternalFrame:s, and the two subclasses with frame specific information. Both the JInternalFrames use the same OK button. I want to have the actionListener outside the classes to avoid repetition of code. But the dispose()-function does not work properly, it does not close the opened JInternalFrame. What�s wrong?
    class Superclass extends JFrame
         JButton b= new JButton("ok");    
         Superclass()
    class Subclass1 extends Superclass
         Subclass1 ()
              add(ok);
           ok.addActionListener(new Listener());
    class Subclass2 extends Superclass
         Subclass2 ()
              add(ok);
           ok.addActionListener(new Listener());
    class Listener extends Superclass implements ActionListener
         public void actionPerformed(ActionEvent e)
                   dispose();
    }How do I controll in the Listener class that the button in Subclass1 is beeing pressed?

    First of all I think I misunderstood your question. You said you had two internal frames, so I thought you wanted to close the internal frame.
    It now looks to me like you want to close the entire JFrame, which makes the code even a little easier. Something like:
    JComponent component = (JComponent)event.getSource();
    JFrame frame = (JFrame)SwingUtilities.windowForComponent( component );
    frame.dispose();
    Ok, I will make a try:
    public static Container getAncestorOfClass(Class c, Component comp)
    w.getAncestorOfClass(w, this); Fiirst you need to learn the basics of reading the API.
    "getAncestorOfClass()" is a static method. That means you don't use a variable to invoke the method. You use the class itself.
    "w" is a variable, which is a JFrame, but that is not what the first parameter should be. The first parameter is a "Class".
    "this" will refer to your Listener class, but you need the Component that generated the ActionEvent.
    When I thought you wanted to close an internal frame then the code would have been something like:
    JComponent component = (JComponent)event.getSource();
    Container container = SwingUtilities.getAncesterOfClass( JInternalFrame.class, component );
    JInternalFrame internalFrame = (JInternalFrame)container;
    internalFrame.invokeSomeMethodHere();If you need further help then you need to create a "Short, Self Contained, Compilable and Executable, Example Program (SSCCE)", that demonstrates the incorrect behaviour.
    http://homepage1.nifty.com/algafield/sscce.html

  • Creating event dispatching in custom class

    I have been trying to create an event dispatcher in a custom
    data transfer object class. It's a simple class and I don't know
    how to make it dispatch an event. I tried extending the
    EventDispatcher class but that doesn't appear to work either. Any
    help would be greatly appreciated.

    I have attached the code for the application and the custom
    class. This should work from what I have read, but I can not get
    the application to catch the event.
    APPLICATION
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    creationComplete="initThis()" layout="absolute">
    <mx:Script>
    <![CDATA[
    import mx.controls.Alert;
    private var _tester:TestClass = new TestClass();
    private function initThis():void{
    addEventListener(TestClass.TEST_ACTION, onTestHandler);
    private function onTestHandler(event:Event):void{
    Alert.show("Event Dispatched");
    ]]>
    </mx:Script>
    <mx:Button x="312" y="150" label="Button"
    click="{_tester.testEvents()}"/>
    </mx:Application>
    CLASS
    package
    import flash.events.EventDispatcher;
    import flash.events.Event;
    public class TestClass extends EventDispatcher
    public static const TEST_ACTION:String = "test";
    public function testEvents():void{
    dispatchEvent(new Event(TestClass.TEST_ACTION));
    }

  • Appbuilder and a custom menu ?

    Hi, when I build an app that uses a custom menu the installed
    program is missing the menu. In the builder I have added it
    as an aux file. Can anyone tell me how I'm suppose to use
    AppBuilder and a custom menu.
    Regards,
    Steve Drake

    On Fri, 19 May 2000 17:41:59 GMT, Steve Drake
    wrote:
    >Hi, when I build an app that uses a custom menu the installed
    >program is missing the menu. In the builder I have added it
    >as an aux file. Can anyone tell me how I'm suppose to use
    >AppBuilder and a custom menu.
    I really hate this, but I found my own stupid mistake. In the
    windows executable from the icon I forgot to put on the menu handling.
    Enable that and everything is ok.
    Regards,
    Me

  • EventDispatcher on Custom Class

    I have been trying to create an event dispatcher in a custom
    data transfer object class. It's a simple class and I don't know
    how to make it dispatch an event. I tried extending the
    EventDispatcher class but that doesn't appear to work either. Any
    help would be greatly appreciated.
    I have attached the code for the application and the custom
    class. This should work from what I have read, but I can not get
    the application to catch the event.
    APPLICATION
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    creationComplete="initThis()" layout="absolute">
    <mx:Script>
    <![CDATA[
    import mx.controls.Alert;
    private var _tester:TestClass = new TestClass();
    private function initThis():void{
    addEventListener(TestClass.TEST_ACTION, onTestHandler);
    private function onTestHandler(event:Event):void{
    Alert.show("Event Dispatched");
    ]]>
    </mx:Script>
    <mx:Button x="312" y="150" label="Button"
    click="{_tester.testEvents()}"/>
    </mx:Application>
    CLASS
    package
    import flash.events.EventDispatcher;
    import flash.events.Event;
    public class TestClass extends EventDispatcher
    public static const TEST_ACTION:String = "test";
    public function testEvents():void{
    dispatchEvent(new Event(TestClass.TEST_ACTION));

    I did however find an alternative, though I still don't
    exactly understand. If I add the event listener directly to the
    class in the apps creationComplete (initThis()) like:
    _tester.addEventListener(TestClass.TEST_ACTION,
    onTestHandler);
    The app catches the event, though it's not really the app,
    now is it? It's the actual class, right? I am confused about
    this.

  • When I use Firefox and Hotmail at startup, Firefox freezes for about 1 minute, and then I can continue. First I though it was my computer but 2 other girls in my class have the same problem with Hotmail and Firefox. What can I do to change this?

    When I start Firefox, about 15 seconds after I start it, my Firefox freezes for about 1 minute. I found out that it is my Hotmail that makes Firefox freeze.
    First I thought it was my computer, but I have 2 other girls in my class that use Hotmail and Firefox and their computer also freezes for 1 full minute.
    This is very annoying, what can I do to change this?
    xxx ellen
    p.s. I am from the Netherlands, maybe that has something to do with it?

    Try deleting cookies and cache:
    1. Tools| Clear recent history
    2. Time range to clear: Everything
    3. If it isn't already selected, select '''Cookies''' and '''Cache'''
    4. '''Clear now'''
    '''Check cookie exceptions'''
    1. Tools | Options | Privacy Panel
    2. Set '''Firefox will: Use custom settings for history.''' '''Insure Accept cookies for sites and accept third-party cookies''' is selected
    3. Click '''Exceptions'''. If the misbehaving site is in that list, select it and click '''Remove site'''
    '''Safe Mode'''
    Add-ons can cause problems with not being able to log into certain websites. To see if this is the case with your issue, run [[Safe mode]]. When you get to the safe mode window, select Continue in Safe Mode. If this resolves your problem, see [[Troubleshooting extensions and themes]] and [[Troubleshooting plugins]]
    Also see [[Updating Firefox]] and [[Cannot log in to websites]]

  • Use of deployment classpath or shared-libraries to pick-up "custom" classes

    Hi,
    I’m trying to determine an approach to dealing with how classes are found in a deployed ADF application via classpath, etc. I’ve tried to explain the situation below as best I can so it’s clear. If you have any comments/suggestions as to how this could be done, it would be much appreciated
    Current Application structure:
    Consists of an application initially deployed to OC4J 10.1.3.4 using an alesco-wss.ear file
    Application contains a single Web Module, initially deployed as wss.war file within the alesco-wss.ear file above.
    The Web Module (wss) was built in JDeveloper 10.1.3.4 using 2 projects, a Model and ViewController project, and uses ADFBC.
    The Model project seems to also generate an alesco-model.jar file in the /WEB-INF/lib/ folder, even though Model classes are in the /WEB-INF/classes/ folder below?
    Exploded structure of application on application server looks something like:
    applications/alesco-wss/META-INF/
    /application.xml <- specifies settings for the Application such as Web Module settings
    /wss/
    /app/ <- directory containing application .jspx pages protected by security
    /images/ <- directory containing application images
    /infrastructure/ <- directory containing .jspx files for login, logout and error reduced security
    /skins/ <- directory containing Skin image, CSS and other files
    /WEB-INF/
    /classes/ <- directory containing application runtime class files as per package sub-directories
    /lib/ <- JAR files used by application (could move some to shared-libaries?) – seems to contain alesco-model.jar
    /regions/ <- directory containing .jspx pages used for Regions within JSPX template page
    /templates/ <- directory containing template .jspx pages used for development (not really required for deployment)
    /adf-faces-config.xml
    /adf-faces-skins.xml
    /faces-config.xml
    /faces-config-backing.xml
    /faces-config-nav.xml
    /region-metadata.xml
    /web.xml
    testpage.jspx <- Publicly accessible page just to test
    The application runs successfully using the above deployment structure.
    We plan to use the exploded deployment structure so that updates to pages, etc. can be applied individually rather than requiring construction and re-deployment of complete .EAR or .JAR files.
    What I’m trying to determine/establish is whether there is a mechanism to cater for a customisation of a class, where such a class would be used instead of the original class, perhaps using a classpath mechanism or shared library?
    For example, say there is a class “talent2.alesco.model.libraries.ModelUtil.class”, this would in the above structure be found under:
    applications/alesco-wss/META-INF/classes/talent2/alesco/model/libraries/ModelUtil.class
    Classes using the above class would import “talent2.alesco.model.libraries.ModelUtil”, so they effectively use that full-reference to the class (talent2.alesco.model.libraries as a path, either expanded or within a JAR).
    From the Oracle Containers for J2EE Developer’s Guide 10.1.3 page 3-17, it lists the following:
    Table 3–1 Configuration Options Affecting Class Visibility
    Classloader Configuration Option
    Configured shared library <code-source> in server.xml
    <import-shared-library> in server.xml
    app-name.root <import-shared-library> in orion-application.xml
    <library> jars/directories in orion-application.xml
    <ejb> JARs in orion-application.xml
    RAR file: all JARs at the root.
    RAR file: <native-library> directory paths.
    Manifest Class-Path of above JARs
    app-name.web.web-mod-name WAR file: Manifest Class-Path
    WAR file: WEB-INF/classes
    WAR file: WEB-INF/lib/ all JARs
    <classpath> jars/directories in orion-web.xml
    Manifest Class-Path of above jars.
    search-local-classes-first attribute in orion-web.xml
    Shared libraries are inherited from the app root.
    We have reasons why we prefer not to use .JAR files for these “non-standard” or “replaced” classes, so prefer an option that doesn’t involve creating a .JAR file.
    Our ideal solution would be to have such classes placed in an alternate directory that is referred to in a classpath such that IF a class exists in that location, it will be used instead of the one in the WEB-INF/classes/ directories, and if not such class is found it would then locate it in the WEB-INF/classes/ directories.
    - Can a classpath be set to look for such classes in a directory?
    - Do the classes have to replicate the original package directory structure within that directory (<dir>/talent2/alesco/model/libraries)?
    - If the class were put in such a directory, without replicating the original package directory structure, I assume the referencing “import” statements would not locate it correctly.
    - Is the classpath mechanism “clever” enough to search the package directory structure to locate the class (i.e. just points to <dir>)?
    - Or would the classpath mechanism require each individual path replicating the package structure to be added (i.e. <dir>/talent2/alesco/model/libraries/ and any other such package path)?
    If we are “forced” to resort to the use of JAR files, does a JAR file used for the purpose of overwrite/extending a sub-set of classes in the original location need to contain ALL related package classes? Or does it effectively “superset” classes it finds in all JAR files, etc. in the whole classpath? That is, it finds talent2.alesco.model.libraries.ModelUtil in the custom.jar file and happily goes on to get the remainder of talent2.alesco.model.libraries classes in the other core JAR/location. Or does it need all of them to be in the first JAR file for that package?
    Any help would be appreciated to understand how these various class visibility mechanisms could be used to achieve what is required would be appreciated.
    Gene

    So, nobody's had any experience with deploying an ADF application, and providing a means for a client to place custom classes in such a way as they're used in preference to the standard application class, effectively to implement a customised class without overwriting the original "standard" class?
    Gene

  • Build app with ODT and Oracle UDT - Error while creating custom class

    Hello CShay,
    I am testing you sample code to create UDT with ASP.Net app. It is also published in Oracle magazine.
    The article is also published at following link:
    http://www.oracle.com/technology/oramag/oracle/08-may/o38net.html
    I am able to successfully implement all the steps before "Using Custom Class Wizard". When I right click on any of the object (CUSTOMER_OBJ, PHONELIST_OBJ, and ADDRESS_OBJ) and select Generate Custom Class, I get the following error:
    Oracle custom class wizard.
    Class can be generated only for either C#, VB or Managed C++ projects.
    Am I missing any thing?
    Thanks in advance for your help.

    Yes I confirm that I choose File->New Website.
    I don't see the following option
    File -> New Project, and then under Visual C#, select ASP.NET Web Application
    I am using VS2005 Professional Edition.
    The options I see under Visual C# are:
    If I click on
    Windows tab:
    Windows Application
    Windows Control Library
    Console Application
    Empty Project
    Class Library
    Web Control Library
    Window Servcie
    Crystal Report Application
    and Search Online Templates in My Templates tab.
    Couple of options for Smart Device which also doesn't include ASP.Net
    then Database, Starter kits and Office tabs which also doesn't include ASP.net thing.
    I don't know how did you see that option or you might be using different version of VS (Enterprise).
    But right now I am stuck.
    Please provide me your valuable comments.
    Thanks for your help.

  • SE24 or In-line Declaration of Custom Class to be Used in a Custom Exit ???

    After our implementation of a custom screen in EXIT_SAPLIE01_007, the function-group XQSM contained the following custom elements:
    XQSM
        Function Modules
          EXIT_SAPLIE01_007     (this just includes ZXQSMU06)
        PBO Modules
          STATUS_9000
        PAI Modules
          USER_COMMAND_9000
        SCREENS
          9000                  (custom screen (modal dialog box))   
        GUI_STATUS
          9000                  (status for custom screen) 
        INCLUDES
          ZXQSMI01              (contains PAI module) 
          ZXQSMO01              (contains PBP module)
          ZXQSMTOP              (declares custom global variables)
          ZXQSMZZZ              (this just includes ZXQSMI01/ZXQSMO01
          ZXQSMU06              (this calls custom screen 9000)
    Then the users decided they wanted an editable ALV on custom screen 9000 (to handle multi-item GR postings in MIGO, not just single-item postings.)
    Since I never coded an editable ALV before, I first created a working editable ALV program from the SAP demo program BCALV_EDIT_03 plus some additions/modifications kindly provided by Uwe Schieferstein down in the ABAP Objects Forum.
    But now I'm stuck because I don't know which components of the XQSM function group I should put the following pieces of code in:
    1)
    class lcl_event_receiver definition deferred.
    data: g_event_receiver type ref to lcl_event_receiver.
    2)
    class lcl_event_receiver definition.
      public section.
      private section.
    endclass.
    3)
    class lcl_event_receiver implementation.
    endclass.
    Can someone please tell me where (1-3) belong inside XQSM - what components they should be put into?
    Or should I just build a custom class in SE24 and use it in the exit ???  (By "use it", I mean instantiate it and call its methods.)
    It seems to me that if I could define the class in SE24,it would be a lot easier, because everything else except (1-3) above clearly belongs in the PBO or PAIof the screen.

    Hello David
    In thread
    how to activate or deactivate a user-exit based a specific condition
    I have described a general strategy for implementing CMOD/SMOD exits. In your case, I would create a function group <b>ZXQSM</b> having two function modules:
    - <b>Z_EXIT_SAPLIE01_007</b> (= copy of EXIT_SAPLIE01_007) => calls the following fm
    - <b>Z_EXIT_SAPLIE01_007_SPEC</b> (-> specific exit that is executed only if certain conditions are fulfilled
    All you implementations for you editable ALV grid belong into your customer function group ZXQSM.
    Regards
      Uwe

Maybe you are looking for