How to map a resource-ref in Jdev11 deployment plan editor

Hi all,
I have a ADF/BC web application where the BC4J application module does connect to a JNDI data source.
The ViewController project does declare the Datasource as needed resource in its web.xml:
<resource-ref>
<res-ref-name>jdbc/wlogDS</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
Now i need to map that resouurce-ref to an actual data source that exist in the application container at deploy time.
As already in JDev 10.1.3 the deployment-plan editor provided during deployment from JDeveloper does not provide any means to enter the deployment mapping for that resourc-ref (When clicking on the node (which is named resouce-ref - that becomes very confusing in case you have defined three resource-refs in your web.xml) the right pane shows a gray pane without any edit controls) So I cannot enter the resource-ref-mapping unsing the Jdev UI.
My workaround in 10.1.3 was to save the deployment plan to disk and manually edit it, adding
<resource-ref-mapping name="jdbc/wlogDS" location="jdbc/wlogTestEnvDS">
</resource-ref-mapping>
to the orion-web-app document for that webapp
But in Jdev 11 the deployment plan file format changed (including some binary inline checksums???)and when doing exactly the same thing, the loading of the manually edited file into Jdev Deployment plan editor fails with
oracle.oc4j.admin.deploy.spi.exceptions.ExtendedConfigurationException: invalid entry size (expected 1886413103 but got 846 bytes)
     at oracle.oc4j.admin.deploy.spi.DeplConfiguration.restore(DeplConfiguration.java:1002)
     at oracle.oc4j.admin.deploy.spi.DeplConfiguration.restore(DeplConfiguration.java:738)
     at oracle.jdevimpl.deploy.jsr88.ConfigModel.loadConfig(ConfigModel.java:201)
     at oracle.jdevimpl.deploy.jsr88.Jsr88ConfigurationPanel.actionPerformed(Jsr88ConfigurationPanel.java:212)
     at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
     at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
     at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
     at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
     at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:234)
     at java.awt.Component.processMouseEvent(Component.java:5488)
     at javax.swing.JComponent.processMouseEvent(JComponent.java:3126)
     at java.awt.Component.processEvent(Component.java:5253)
     at java.awt.Container.processEvent(Container.java:1966)
     at java.awt.Component.dispatchEventImpl(Component.java:3955)
     at java.awt.Container.dispatchEventImpl(Container.java:2024)
     at java.awt.Component.dispatchEvent(Component.java:3803)
     at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
     at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
     at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
     at java.awt.Container.dispatchEventImpl(Container.java:2010)
     at java.awt.Window.dispatchEventImpl(Window.java:1774)
     at java.awt.Component.dispatchEvent(Component.java:3803)
     at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
     at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
     at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
     at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:153)
     at java.awt.Dialog$1.run(Dialog.java:515)
     at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
     at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
     at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
     at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
     at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
     at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
     at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
Caused by: oracle.oc4j.admin.jmx.shared.exceptions.JMXRuntimeException: invalid entry size (expected 1886413103 but got 846 bytes)
     at oracle.oc4j.admin.jmx.shared.util.JarTool.readJar(JarTool.java:240)
     at oracle.oc4j.admin.deploy.spi.DeplConfiguration.parseDeploymentPlan(DeplConfiguration.java:1464)
     at oracle.oc4j.admin.deploy.spi.DeplConfiguration.restore(DeplConfiguration.java:761)
     ... 33 more
Caused by: java.util.zip.ZipException: invalid entry size (expected 1886413103 but got 846 bytes)
     at java.util.zip.ZipInputStream.readEnd(ZipInputStream.java:368)
     at java.util.zip.ZipInputStream.read(ZipInputStream.java:141)
     at java.util.jar.JarInputStream.read(JarInputStream.java:171)
     at java.io.FilterInputStream.read(FilterInputStream.java:90)
     at oracle.oc4j.admin.jmx.shared.util.JarTool.copy(JarTool.java:1343)
     at oracle.oc4j.admin.jmx.shared.util.JarTool.readEntry(JarTool.java:255)
     at oracle.oc4j.admin.jmx.shared.util.JarTool.readJar(JarTool.java:232)
     ... 35 more
oracle.oc4j.admin.jmx.shared.exceptions.JMXRuntimeException: invalid entry size (expected 1886413103 but got 846 bytes)
     at oracle.oc4j.admin.jmx.shared.util.JarTool.readJar(JarTool.java:240)
     at oracle.oc4j.admin.deploy.spi.DeplConfiguration.parseDeploymentPlan(DeplConfiguration.java:1464)
     at oracle.oc4j.admin.deploy.spi.DeplConfiguration.restore(DeplConfiguration.java:761)
     at oracle.oc4j.admin.deploy.spi.DeplConfiguration.restore(DeplConfiguration.java:738)
     at oracle.jdevimpl.deploy.jsr88.ConfigModel.loadConfig(ConfigModel.java:201)
     at oracle.jdevimpl.deploy.jsr88.Jsr88ConfigurationPanel.actionPerformed(Jsr88ConfigurationPanel.java:212)
     at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
     at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
     at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
     at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
     at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:234)
     at java.awt.Component.processMouseEvent(Component.java:5488)
     at javax.swing.JComponent.processMouseEvent(JComponent.java:3126)
     at java.awt.Component.processEvent(Component.java:5253)
     at java.awt.Container.processEvent(Container.java:1966)
     at java.awt.Component.dispatchEventImpl(Component.java:3955)
     at java.awt.Container.dispatchEventImpl(Container.java:2024)
     at java.awt.Component.dispatchEvent(Component.java:3803)
     at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
     at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
     at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
     at java.awt.Container.dispatchEventImpl(Container.java:2010)
     at java.awt.Window.dispatchEventImpl(Window.java:1774)
     at java.awt.Component.dispatchEvent(Component.java:3803)
     at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
     at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
     at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
     at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:153)
     at java.awt.Dialog$1.run(Dialog.java:515)
     at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
     at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
     at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
     at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
     at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
     at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
     at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
Caused by: java.util.zip.ZipException: invalid entry size (expected 1886413103 but got 846 bytes)
     at java.util.zip.ZipInputStream.readEnd(ZipInputStream.java:368)
     at java.util.zip.ZipInputStream.read(ZipInputStream.java:141)
     at java.util.jar.JarInputStream.read(JarInputStream.java:171)
     at java.io.FilterInputStream.read(FilterInputStream.java:90)
     at oracle.oc4j.admin.jmx.shared.util.JarTool.copy(JarTool.java:1343)
     at oracle.oc4j.admin.jmx.shared.util.JarTool.readEntry(JarTool.java:255)
     at oracle.oc4j.admin.jmx.shared.util.JarTool.readJar(JarTool.java:232)
     ... 35 more
---- Embedded exception
java.util.zip.ZipException: invalid entry size (expected 1886413103 but got 846 bytes)
     at java.util.zip.ZipInputStream.readEnd(ZipInputStream.java:368)
     at java.util.zip.ZipInputStream.read(ZipInputStream.java:141)
     at java.util.jar.JarInputStream.read(JarInputStream.java:171)
     at java.io.FilterInputStream.read(FilterInputStream.java:90)
     at oracle.oc4j.admin.jmx.shared.util.JarTool.copy(JarTool.java:1343)
     at oracle.oc4j.admin.jmx.shared.util.JarTool.readEntry(JarTool.java:255)
     at oracle.oc4j.admin.jmx.shared.util.JarTool.readJar(JarTool.java:232)
     at oracle.oc4j.admin.deploy.spi.DeplConfiguration.parseDeploymentPlan(DeplConfiguration.java:1464)
     at oracle.oc4j.admin.deploy.spi.DeplConfiguration.restore(DeplConfiguration.java:761)
     at oracle.oc4j.admin.deploy.spi.DeplConfiguration.restore(DeplConfiguration.java:738)
     at oracle.jdevimpl.deploy.jsr88.ConfigModel.loadConfig(ConfigModel.java:201)
     at oracle.jdevimpl.deploy.jsr88.Jsr88ConfigurationPanel.actionPerformed(Jsr88ConfigurationPanel.java:212)
     at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
     at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
     at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
     at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
     at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:234)
     at java.awt.Component.processMouseEvent(Component.java:5488)
     at javax.swing.JComponent.processMouseEvent(JComponent.java:3126)
     at java.awt.Component.processEvent(Component.java:5253)
     at java.awt.Container.processEvent(Container.java:1966)
     at java.awt.Component.dispatchEventImpl(Component.java:3955)
     at java.awt.Container.dispatchEventImpl(Container.java:2024)
     at java.awt.Component.dispatchEvent(Component.java:3803)
     at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
     at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
     at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
     at java.awt.Container.dispatchEventImpl(Container.java:2010)
     at java.awt.Window.dispatchEventImpl(Window.java:1774)
     at java.awt.Component.dispatchEvent(Component.java:3803)
     at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
     at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
     at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
     at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:153)
     at java.awt.Dialog$1.run(Dialog.java:515)
     at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
     at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
     at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
     at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
     at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
     at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
     at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
So no chance here to add a resource-ref-mapping. The alternative way of specifying a resource-ref-mapping using the web-based deployment proces of the Enterprise manager is impossible because the 11g preview OC4j does not include an enterprise manger web-application.
So how do I deploy the application correctly other that manually modifying the deployed orion-web-app.xml file in j2ee/home/application-deployments/earName/warName/orion-web-app.xml after deploying the app without a resource-ref-mapping? Because doing that step manually each time is quite annoying.
Greetings,
Thomas

Seems i'm slowly answering my own questions :-) I finally got my RMI service, even using several methods. But ...
It doesnt help me as the lookups are not done on the context classloader it seems. That means i need to add all my service jars to the global class path causing massive sealing issues with the war contained jars. Pretty useless. All the needed stubs etc are in the war.
But as it seems that the web app needs to contain deployment site info (sun-web.xml) anyway, i could just as easy read my own web xml from the context and resolve the services myself. But i do wonder how this is supposed to work with EJB and CORBA stuff. The samples actually also needed to add stuff to the global class path.
I'm probably not the easiest customer as i write this kind of middle ware for a living but i really like sjsws. It makes my own one partly obsolete as it is almost as fast and has all the fancy deployment stuff (in my case i use an in-house mobile agent frame work and agents that travel the various networks ) and infinitely easier to learn to work with and understand In case anyone is wondering i wrote Uhura because 1. i needed speed so it is a servlet based webserver and not a web server with a servlet module. 2. could not wait on ibm to fix bugs in webspere and we only used the servlet bit. 2. i needed full J2EE security and 3. i needed it to run on many OS'es
That is why i still need the same war files to be able to be deployed in both systems as i still need my systems going on IBM iservers etc.
Again i would welcome some feed back on such and related issues
Cheers,
Peter

Similar Messages

  • How to map Resource related billing through sap pm

    Hi all,
    I have a new requirement from one of my client.
    one plant(says A) provides the maintenance workers to other plant(Says B).
    Plant A charge on hourly basis to plant B. Workers fill time sheet daily.
    Then how to map this scenario through sap pm.
    i guess it should be done through work center. kindly share.

    For scenarios where the plants share the same company code, then you execute and settle your work orders as per normal.
    Typically this involves the sending (from work centre) and receiving (settlement) costs centres posting actual costs.
    The cost centre managers can then determine how much to back-charge. This task is often performed by the Finance Team.
    For scenarios where the plants do not share the same company code, then you have a few options:
    Resource related billing (see link above)
    Plant A creates a PR/PO against Plant B. Then plant B creates a Sales Order against Plant A. This can be automated. The PR/PO could be linked to the order directly, or via a contract, or not at all..
    PeteA

  • How to Map Proces form field with Resource form field?

    Hi,
    How to Map Proces form field with Resource form field while creating Process form in Form designer

    Are you talking about Provisioning ?
    then you do that in Data Flow under Process Defintion in OIM 10g
    In OIM 11g you use Request Dataset. In that you can directly map fields to process form.

  • Some doubts in using resource-ref,connection pool n Data-source

    Hi all ,
    I need little bit clarification in the following points.
    1) Does the connection pool which is created can be displayed in JNDI Tree???
    I am seeing only DataSOurce in the JNDI Tree Only.
    2)In case of Bean Managed Persistance, in ejb-jar.xml,
    I had given the following info.
    <resource-ref>
             <res-ref-name>ramukkDataSource</res-ref-name>
             <res-type>javax.sql.DataSource</res-type>
             <res-auth>Container</res-auth>
         </resource-ref>Does the <res-ref-name> refers to Datasource Name??
    In weblogic-ejb-jar.xml
    <reference-descriptor>
           <resource-description>
              <res-ref-name>ramukkDataSource</res-ref-name>
              <jndi-name>ramukkpool</jndi-name>
           </resource-description>
         </reference-descriptor>Here <jndi-name> refers to connection pool as per weblogic bible book.
    If so when i deployed my ejb into the server iam getting Datasource cant be found.
    If i had given like the following,
    In ejb-jar.xml
    <resource-ref>
              <res-ref-name>jdbc/ramuJndi</res-ref-name>
              <res-type>javax.sql.DataSource</res-type>
              <res-auth>Container</res-auth>
         </resource-ref> In weblogic-ejb-jar.xml
         <reference-descriptor>
              <resource-description>
               <res-ref-name>jdbc/ramuJndi</res-ref-name>
               <jndi-name>jdbc/ramuJndi</jndi-name>
           </resource-description>
        </reference-descriptor>Then only my ejb code is successfully deploying doing some work which is as per xpectation.
    Can any body tell why I have to give the same name for <res-ref-name> n <jndi-name>??
    I am working on this problem from last one week. Still not found the solution.
    Connection Pool Creation
    GENERAL::
    Name : ramukkpool
    url : jdbc:mysql://localhost:3306/test
    Driver Classname: com.mysql.jdbc.Driver
    Properties :
    user = root
    Password = XXX
    create
    TARGETS::
    i had shifted myServer from left side to right side n clicked >>Apply
    (Techncially can we say this as deploying the connection pool into server ???????????
    If not how to deploy the connection pool into server??)
    I did not get any errors in the console.
    Now i am creating a datasource
    CONFIGURATION:
    Name : ramukkDataSource
    JNDIName: jdbc/ramuJndi(Does we have to follow this convention only?? i.e JNDIName should start with jdbc/ only)
    PoolName: ramukkpool
    create
    TARGETS::
    I had shifed myServer from left to right n >>Apply.
    Now also i did not get any errors in the console.Thanx(in advance),
    ramu

    I have read the documentation.
    I changed my class to oracle.jdbc.pool.OracleConnectionCacheImpl from
    oracle.jdbc.pool.OracleConnectionPoolDataSource
    I observed in the EM that the Open JDBC Connections and Total JDBC Connections are the same. When I used oracle.jdbc.pool.OracleConnectionPoolDataSource my Total JDBC Connections was increasing and Open JDBC Connections remains 0.
    My question still remains unanswered, could some kindly help.
    Q? I have defined a data source in JDeveloper using
    oracle.jdbc.pool.OracleConnectionCacheImpl
    In my java bean I am using the code pasted below to make a connection to database.
    Can some one tell whether I am using the correct method of connection pooling mechanism or do I need to make some changes? This application uses JSP and used by lots of people which hits database very frequently.
    Any help is highly appreciable.
    Thanks in advance.
    *******Code to make connection*********
    private javax.naming.InitialContext context = null;
    private javax.sql.DataSource jdbcURL = null;
    private static final String url = "jdbc/ProdCoreDS";
    public boolean openConnection()
    try
        DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    context = new javax.naming.InitialContext();
    jdbcURL = (javax.sql.DataSource)context.lookup(url);
    con =  jdbcURL.getConnection();
    return true;
      catch(Exception e)
           System.out.println("Error in the Connection  "+e);
        e.printStackTrace();
                 return false;
         }}

  • How to access JDBC Resource registered in Sun Java System App Server ?

    I want to create a stand-alone JDBC application with Java SE using Swing technologies and JNDI technology. The purpose of using JNDI technology is to avoid change of Java Source Code every time I move the database to different location. This Java application will be used in a standalone PC installed with Windows XP Professional with no LAN / WAN connection. Of course, Internet connection is available with the PC.
    I use JavaDB to store the data tables and the location of the database is D:\E-DRIVE\SAPDEV. Tomorrow, if I move this database to C:\SAPDEV or any network drive, I do not want to change the Java Source code. I want to use JNDI which, if I am not wrong, helps developers to avoid manual change of Java source code whenever the database location is changed. Changes have to be made only in the JNDI Name which contains all relevant information about the database in order to get connection no matter where the database SAPDEV is stored; it can be placed under D:\E-DRIVE directory or C:\ directory of the hard disk. To implement my intention, I started developing Java application as per the steps mentioned below:
    Step 1:
    To proceed, first, I sought the help of Sun Java System Application Server Admin Console. I created JNDI object for Connection Pool using the menu path Common Tasks->Resources->JDBC->Connection Pools.
    JNDI Name : ABAPRPY
    Resource Type : javax.sql.DataSource
    Datasource class : org.apache.derby.jdbc.ClientDataSource
    Description : ABAP Program Repository
    The Connection Pool creation has options for General, Advanced and Additional Settings tabs and I made all the settings relevant to the database I created in D:\E-DRIVE\SAPDEV.
    To confirm whether the above settings are correct, I pressed the Ping push button which is available in the General tab of the connection pool creation screen. The system responded with the message Ping Succeeded.
    Step 2:
    I created a JDBC Resource using the menu path Common Tasks->Resources->JDBC->JDBC Resources.
    JNDI Name : jdbc/SAPDEV
    Pool Name : ABAPRPY
    Description : Database Connection for SAPDEV database
    Status : Enabled
    I can see all the above settings recorded in the domain.xml which is placed in the folder
    C:\Sun\AppServer\domains\domain1\config
    Step 3:
    I have made sure that Sun Java System Application Server is up and running in the background with JavaDB server. I created a Java Program making sure the following JAR files are included in the classpath:
    appserv-admin.jar
    appserv-ee.jar
    appserv-rt.jar
    javaee.jar
    fscontext.jar
    Plus, the lib directory of JDK 1.6 & C:\Sun\AppServer\domains\domain1\config
    Source code of the program is as follows: I used NetBeans IDE to create my project file.
    import java.util.logging.Level;
    import java.util.logging.Logger;
    import javax.naming.*;
    import javax.activation.DataSource;
    public class JNDILookup {
    public static void main(String[] args) {
    try {
    InitialContext initCtx = new InitialContext();
    DataSource ds = (DataSource) initCtx.lookup("java:comp/env/jdbc/sapdev>");
    } catch (NamingException ex) {
    Logger.getLogger(JNDILookup.class.getName()).log(Level.SEVERE, null, ex);
    When I attempted to compile the above program in NetBeans IDE ,no compilation error reported. But while executing the program, I got the following run-time error message:
    SEVERE: null
    javax.naming.NameNotFoundException: No object bound for java:comp/env/jdbc/sapdev> [Root exception is java.lang.NullPointerException]
    at com.sun.enterprise.naming.java.javaURLContext.lookup(javaURLContext.java:224)
    at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:396)
    at javax.naming.InitialContext.lookup(InitialContext.java:392)
    at SAPConnect.JNDILookup.main(JNDILookup.java:21)
    Caused by: java.lang.NullPointerException
    at com.sun.enterprise.naming.java.javaURLContext.lookup(javaURLContext.java:173)
    ... 3 more
    Now, I want to come out of this situation; at the same time, I want to preserve the settings I have made in the Sun Java System Application Server Admin Console. That is, I want to programmatically access the data source using Connection Pool created in Sun Java System Application Server Admin Console.
    I request dear forum members to provide me an appropriate solution.
    Thanks and regards,
    K. Rangarajan.

    jay44 wrote:
    Bare in mind I am attempting the context.lookup() from inside the container (my code is in a session bean). I have accessed the server and have my bean "say hello" first to verify the bean works OK, then I call a method with this rather standard code:
    String jndiDataSourceName ="Second_EJB_Module_DataBase";
    Logger.getLogger(DynamicPU.class.getName()).log(Level.INFO,"Programatically acquiring JNDI DataDource: "+ jndiDataSourceName);
    InitialContext ctx;
    try {
    ctx = new InitialContext();
    ds =(DataSource)ctx.lookup("java:comp/env/jdbc/"+jndiDataSourceName);
    } catch (NamingException ex) {
    Logger.getLogger(DynamicPU.class.getName()).log(Level.SEVERE, null, ex);
    return "Exception generated trying to preform JDBC DataSource lookup. \n"+ex.toString();
    But when I run the code the server log shows the initial context is created Ok, but an exception is thrown becasue the resource name is not found:
    (and i have tried vriations of ctx.lookup("jdbc/"+jndiDataSourceName) etc etc
    You are fine here. It works in container because the InitialContext properties have been supplied already. That was the link I forwarded earlier. The InitialContext you create locally needs to locate the container JNDI. That is what the properties specify.
    Where I am confused is where you indicate the stack below is from the server log. So, you initiate a standalone (java main method) application, create an InitialContext, and you see the results in your app server log?
    LDR5010: All ejb(s) of [EJB_Module_1] loaded successfully!
    Programatically acquiring JNDI DataDource: Second_EJB_Module_DataBase
    The log message is null.
    javax.naming.NameNotFoundException: Second_EJB_Module_DataBase not found
    at com.sun.enterprise.naming.TransientContext.doLookup(TransientContext.java:216)
    at com.sun.enterprise.naming.TransientContext.lookup(TransientContext.java:188)
    at com.sun.enterprise.naming.TransientContext.lookup(TransientContext.java:192)...
    at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:555)
    This is strange since I can see this resource (a JDBC connection named Second_EJB_Module_DataBase) is configured on the server from the server's admin console.
    That is why you can obtain a lookup from within the container (app server).
    For this lookup to work it may be that one must map the name inside an ejb-jar.xml deployed with the application, but I have also read some resources like jdbc connection should have a default name. Does anyone know if my lookup() should work without using an ejb-jar.xml mfile to explcitly map the reource for my application?
    Both EBJ's and data sources can be referenced via JNDI. It's a remote lookup (that is normally optimized if it is running in the same JVM). You should not have any dependencies on a JDBC data source being set-up on ejb-jar.xml. That file can of course impact your EJB's. However, data sources are normally set-up on a container-specific basis (e.g., you probably did it through a console, but there is a spec somewhere about how to set up a data source via a resource the app server looks for; it varies from app server to app server). However, once you have that container-specific data source set-up, JNDI operates vendor-neutral. You should be able to take the code above and move it to JBoss or Weblogic or Tomcat or whatever (this is an ideal, in practice, the vendors sometimes put a data source in a name you would not expect, but again, you can use their JMX console to see what the JNDI name is).
    (As I stated above if I have to use a deployment discriptor to get at this JNDI datasource, then solution is not "programmatic" as newly configured datasources could not be accessed without redeploying the entire application).
    As JSchell alluded to, you will always have at least something vendor-specific. JNDI itself (the code you wrote) is totally portable. However, you have to set the various JNDI environment properties to a given vendor's spec. Ideally, you should not need a vendor's actual InitialContext application, but it's a possibility. Once you can safely cast to Context, you should be vendor-neutral (if not, demand your money back).
    So that is exactly where I am stuck, trying to get the lookup to work and wondering if it should work without and xml file mapping the resource for my app.
    What we ended up doing for standalone was to provide our own JNDI. If you look at the open source project JOTM, there are examples on how to use that with XBean (if integrating with Spring, as we did), you can easily set up a data source that runs standalone exactly as you get in the container. Another benefit is you get full JTA/JTS support and the ability to run XA transactions. (This might all be alphabet soup, but the app server gives it to you, and this is the way we ended up doing the same: JNDI + JTA + JTS + XA). It ends up the same application code uses a "vanilla" InitialContext and all we have to do is write one or two xml files (one for our app server, a couple for JOTM), and our actual code works the same.
    I still think you have a shot at getting to the container's JNDI, just not using their full-blown app server JAR.
    I think there must be a simple way to do this with an ejb-jar.xml, I am no expert in JNDI, I could be missing something simple, I will keep at it and post an answer here if I come up with it.
    Thanks, jayIt is simple to code. Getting it to integrate with your app server, yes, that can be challenging. But it has nothing to do with EJB's. Write a simple test. Using nothing but DataSource and InitialContext. Let us know where you get stuck.
    - Saish

  • How to map roles by using JAAS

    Dear all,
    i am implementing JAAS by using my own custom LoginModule, which will access to my database and get user login and password and do verification myself.
    and i know that i need to set the secruity roles, secruity constraint in web.xml, and i have set Login Configuration to Form-Based Authentication.
    here is part of my web.xml:
    <security-constraint>
    <web-resource-collection>
    <web-resource-name>LogonMain</web-resource-name>
    <url-pattern>*.do</url-pattern>
    </web-resource-collection>
    <auth-constraint>
    <role-name>manager</role-name>
    <role-name>sales</role-name>
    </auth-constraint>
    <user-data-constraint>
    <transport-guarantee>NONE</transport-guarantee>
    </user-data-constraint>
    </security-constraint>
    <login-config>
    <auth-method>FORM</auth-method>
    <form-login-config>
    <form-login-page>LogonMain.jsp</form-login-page>
    <form-error-page>LogonMain.jsp</form-error-page>
    </form-login-config>
    </login-config>
    <security-role>
    <role-name>manager</role-name>
    </security-role>
    <security-role>
    <role-name>sales</role-name>
    </security-role>
    <security-role>
    <role-name>staff</role-name>
    </security-role>
    here is my question, it seems that all data action in my pages are protected, and i dont know how to map a particular user to the role that i define in web.xml.
    so even though i logged in, i still cannot perform data action.
    could anyone nice to tell me what could i do in this case for custom login module which accessing the database to get user login and password ?
    i am appreicated your help !
    thanks
    Kenny

    Hi Matthew,
    so the mapping is defined in orion-application.xml , right ?
    i have something like this
    <?xml version = '1.0' encoding = 'windows-1252'?>
    <!DOCTYPE orion-application PUBLIC "-//Evermind//DTD J2EE Application runtime 1.2//EN" "http://xmlns.oracle.com/ias/dtds/orion-application.dtd">
    <orion-application>
    <web-module id="dbLoginModule" path="dbLoginModule.war"/>
    <library path="d:\oc4j904\jdbc\lib"/>
    <!-- mapping for DB Login Module -->
         <security-role-mapping name="manager">
              <user name="ITAH01" />
         </security-role-mapping>
    <jazn provider="XML">
    <property name="role.mapping.dynamic" value="true"/>
    </jazn>
    <log>
              <file path="application.log"/>
         </log>
    <data-sources path="./data-sources.xml"/>
         <namespace-access>
              <read-access>
                   <namespace-resource root="">
                        <security-role-mapping name="&lt;jndi-user-role>">
                             <group name="administrators"/>
                        </security-role-mapping>
                   </namespace-resource>
              </read-access>
              <write-access>
                   <namespace-resource root="">
                        <security-role-mapping name="&lt;jndi-user-role>">
                             <group name="administrators"/>
                        </security-role-mapping>
                   </namespace-resource>
              </write-access>
         </namespace-access>
    </orion-application>
    just wondering the library path should point to where ?
    <library path="d:\oc4j904\jdbc\lib"/> this is the default path

  • How to Map Fomulas for Float Glass Process

    Hi All,
    Can anybody suggest how to map formulas for float glass process.
    As in float Glass process continuous production is going on single line, within that continuous ingredients are added in furnace and molten glass mass is coming out. this molten glass is now adjusted to particular thickness and then finally cut into specific sizes as per cusotmer requirment.
    Final product is in various thickness, width and length.
    Entire process is automated.
    If anybody already implemented same scenario, please share knowledge.

    Hi
    The following is the mapping process and it is tricky process need to map carefully.
    You can define this as a single formula.
    Output: Packed - cut to size - Finished Good Item.
    Input: All the Raw materials (Sand, Dolamite, Limestone, Soda Ash, Sodium Sulphate, Carbon, Iron Oxide)
    Packaging materials + Labels + Boxes etc.
    Define Routing:
    Resource: Furnace, Any other importance resource like Equipment that controls thickness, cutter etc, Labor, Associated Overhead
    Create recipe using the formula and routing.
    Various factors that can affect the mapping:
    1) Formula maintenance: You have to define formula for each output item.
    2) Possibility of dynamic determination of output item: If it is possible to produce different combination of thickness/width (and hence different FG item) in the same batch, then this won't be the right mapping.
    3) Process variations: Also formula mapping depends on how accurate is production process. If user wants to produce item X (say thickness 10mm) but due to quality issue produced item Y (say thickness 9mm) and such cases happens very often, this won't be right solution.
    4) Inventory measurement: This will determine the break-points. If you cannot measure the quantity (or even estimate) then you cannot define it as an intermediate item.
    I will explain how point 4 can lead to different way of formula mapping.
    Say you have a furnace that needs to run continuously for better quality or throughput. Hence you will be continuously adding raw materials to furnace and produce different outputs. You can break the single formula into multiple formulas as -
    Formula 1) Output: Molten mass of glass
    Input: All the Raw materials (Sand, Dolamite, Limestone, Soda Ash, Sodium Sulphate, Carbon, Iron Oxide)
    Formula 2) Output: Packed - cut to size - Finished Good Item.
    Input: Molten mass of glass
    To have formula in such fashion you should have a way to measure or estimate the weight of Molten mass of glass.
    If you are estimating the weight, there should be historical data available to determine what should be realistic output quantity for given input quantity. How much will be process loss and loss due to unwanted by product such as slag etc.
    Further you can break formula 2 as
    Output: One large sheet of give thickness
    Input: Molten mass of glass
    Output: Packed - cut to size - Finished Good Item.
    Input: The large sheet of give thickness.
    This kind of different mapping is possible which normally depends on:
    1) Complexity of process
    2) How complex BOM structure user wants to have
    3) Are there any benefits of maintaining such complex system - like accurate costing or accurate production monitoring or facilitating planning process.
    4) Can user maintain the complex system? Are they ready to capture data at finer level. Is it possible to capture the data.
    5) And most important thing is how to handle exceptions. If every thing goes smoothly as planned (less exceptions) then user can have and afford any level of complexity. But if there are many exceptions to the normal process you have to concentrate more on how to handle the exceptions.
    6) Satisfy all users: Accounting, Planning, Production, Quality, Inventory handling. Formula/Recipe touches all these modules.
    Regards
    Raj
    Sierra

  • Adding resource-ref  in web.xml

    dos it make any difference adding
         <resource-ref>
               <description>Application Datasource </description>
               <res-ref-name>jdbc/myDataSource</res-ref-name>
               <res-type>javax.sql.DataSource</res-type>
               <res-auth>Container</res-auth>
         </resource-ref>inside web.xml , it works with or without , please tell me the importance of this

    The optional resource-ref element defines a reference lookup name to an external resource. This allows the servlet code to look up a resource by a "virtual" name that is mapped to the actual location at deployment time.
    http://www.chariotsolutions.com/geronimo/geronimo-1.1/database-mapping.html

  • Correction: Mapping external resources

    I am trying to build a web application that would connect to different
    database upon different deployment.
    To get this done, i am using external resource mapping.
    My weblogic properties contains the following line:
    weblogic.jdbc.TXDataSource.wapayPrdDataSource=bwapaySunThinPool
    My application web.xml file is:
    <web-app>
    <display-name>Wapay's customer application</display-name>
    <welcome-file-list>
    <welcome-file>index.htm</welcome-file>
    </welcome-file-list>
    <resource-ref>
    <description>My testing</description>
    <res-ref-name>wapayPrdDataSource</res-ref-name>
    <res-type>javax.sql.TXDataSource</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    </web-app>
    My application weblogic.xml file is:
    <weblogic-web-app>
    <reference-descriptor>
    <resource-description>
    <res-ref-name>wapayPrdDataSource</res-ref-name>
    <jndi-name>wapayDataSource</jndi-name>
    </resource-description>
    </reference-descriptor>
    </weblogic-web-app>
    Now when i am trying to lookup for "wapayDataSource" i get
    NamingException:
    javax.naming.NameNotFoundException: 'wapayDataSource'; remaining name
    'wapayDataSource'
    If anyone has any idea pleas advise!!!
    [att1.html]

    Hi,
    Chcek the below links
    [http://help.sap.com/saphelp_nw04s/helpdata/en/43/6ee85d99506fcfe10000000a1553f6/content.htm]
    And chcek portal Navigation in the below Link
    [https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/b085e86e-2353-2910-0c96-9f6ab693d0e6]
    Plz Check the belwo link or SAP Note No: 1116669
    [https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes/sdn_oss_ep_pi/~form/handler%7b5f4150503d3030323030363832353030303030303031393732265f4556454e543d444953504c4159265f4e4e554d3d31313136363639%7d]
    Regards,
    Govindu

  • Mapping external resources

    I am trying to build a web application that would connect to different
    database upon different deployment.
    To get this done, i am using external resource mapping.
    My weblogic properties contains the following line:
    weblogic.jdbc.TXDataSource.wapayPrdDataSource=bwapaySunThinPool
    My application web.xml file is:
    <web-app>
    <display-name>Wapay's customer application</display-name>
    <welcome-file-list>
    <welcome-file>index.htm</welcome-file>
    </welcome-file-list>
    <resource-ref>
    <description>My testing</description>
    <res-ref-name>wapayPrdDataSource</res-ref-name>
    <res-type>javax.sql.TXDataSource</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    </web-app>
    My application weblogic.xml file is:
    [att1.html]

    Hi,
    Chcek the below links
    [http://help.sap.com/saphelp_nw04s/helpdata/en/43/6ee85d99506fcfe10000000a1553f6/content.htm]
    And chcek portal Navigation in the below Link
    [https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/b085e86e-2353-2910-0c96-9f6ab693d0e6]
    Plz Check the belwo link or SAP Note No: 1116669
    [https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes/sdn_oss_ep_pi/~form/handler%7b5f4150503d3030323030363832353030303030303031393732265f4556454e543d444953504c4159265f4e4e554d3d31313136363639%7d]
    Regards,
    Govindu

  • How to map this scenario..?

    Hi,
    I have one requirement to map in SAP,
    Scenario:
    1)PO will be raised for a material A.
    2)Material A contains 5 different component materials( ie by assembling 5 components we will get Material A)
    3)When I do GR for Material A against that PO, stock has to be updated only for 5 components not for material A.
    Can you pls tel me how to map this in SAP.
    Your inputs are rewardable.
    Regds

    Hi ,
    pls follow this process;
    As Charu said, you can create material A as non-stock material and create BOM and assign the  five
    components.
    1.Create Subcontracting PO, item category as L.
    2.Use MB1B to transfer post the components to subcontractor(vendor) and assign the PO.
    (Make sure that you have enough stock of your components in your unrestricted stock.)
    If not increase the initial stock balance for the  components using 561 movement type, using MB1C Tcode.
    3.Create subcontracting challan against this mat doc.Tcode J1if01.
    4.Now  do Migo. In the excise tab you can select as refer subcontracting challan, a pop-up will appear.
    enter the challan no .Mat doc will be posted.
    5.Reconcile the challan using J1ifQ tcode, against the Migo doc.
    6.If its fully  reconciled, i.e if you have received full quantity,the challan would be fully reconciled
    and you can complete the challan using J1if13.
    You can print the challan by clicking print immediately check box.
    7.Then MIRo.
    Award points if useful.
    Regards
    Kumar

  • How to map adc chanel to an axis

    Hello every body.
    According with "Ni Motion User Manual", it seems possible to use analog feedback. But I can't find how to map  an ADC channel to the axis in concern, as appears in comment of the sample program in page 13-5.I also did not know how to select this mode as the sample given use the same commands as in chapter 5 (straight line move)
    Another question about Ni-Motion: is there any instruction list or glossary?
    Thank you for your help.
    Best regards
    Jean-François COUPAT
    FABRICOM Systèmes d'Assemblage

    Jean-François,
    even without the hardware you can download and install the NI-Motion driver which will install the documentation. The documented that I have linked to my first post describes the configuration in MAX. NI-Motion allows to set or change all parameters that you have entered in MAX at runtime. E. g. if you want to change the feedback you can use flex_config_axis() for this purpose. Please note, that the axis needs to be stopped at the time you change the feedback resource. Additionally you will have to adjust the PID parameters with flex_load_pid_parameters() when switching the feedback type.
    I have referenced to the C function calls. Of course the same functionality is availble for LabVIEW.
    Regards,
    Jochen

  • How to map n x m to  i

    how to map  all the items to another node (0...unbounded)?
    head (0...unbounded)
      --  t1
        --t2
        --t2
       -- item (0....unbounded)
       i1
       i2
      i3
    Edited by: Shen Peng on Dec 7, 2010 9:28 AM

    Hi Shen,
    If the version of your PI system is less than 7.1, then you need to go for Java mapping to achieve this requirement.
    Here is a smple Java mapping code.
    import com.sap.aii.mapping.api.StreamTransformation;
    import com.sap.aii.mapping.api.AbstractTrace;
    import com.sap.aii.mapping.api.StreamTransformationConstants;
    import java.util.Map;
    import java.io.*;
    public class PayloadToXMLField implements StreamTransformation {
        String strXML = new String();
         //Declare the XML tag for your XML message
         String StartXMLTag = "<Payload>";
         String EndXMLTag = "</Payload>";
        AbstractTrace trace;
        private Map param = null;
        public void setParameter(Map param) {
            this.param = param;
        public void execute(InputStream in, OutputStream out) {
            trace =
                (AbstractTrace) param.get(
                    StreamTransformationConstants.MAPPING_TRACE);
            trace.addInfo("Process Started");
            try {
                StringBuffer strbuffer = new StringBuffer();
                byte[] b = new byte[4096];
                for (int n;(n = in.read(b)) != -1;) {
                    strbuffer.append(new String(b, 0, n));
                strXML = strbuffer.toString();
            } catch (Exception e) {
                System.out.println("Exception Occurred");
            outputPayload =
                "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
                   + StartXMLTag
                   + strXML
                   + EndXMLTag;
            try {
                out.write(outputPayload.getBytes());
                   trace.addInfo("Process Completed");;
            } catch (Exception e) {
                trace.addInfo("Process Terminated: Error in writing out payload");;
    If you have PI 7.1, then refer the below link:
    /people/jyothi.anagani/blog/2010/06/17/convert-the-input-xml-to-string-in-pi-71-using-standard-graphical-mapping
    Thanks,

  • What's resource-ref for?

    I'm a JNDI newbie, so I hope this isn't too dumb. :-)
    I have a web app that I'm running in Tomcat 4.1.10 against a MySQL database. The app gets the DB using JNDI as described in the JNDI howto that comes with Tomcat. Everything works fine. Question is this: when I remove the <resource-ref> element from web.xml and restart the server, it still runs fine--yet every set of instructions I've seen on using JNDI from Tomcat says that I need to have <resource-ref> in web.xml. What's it for?
    Thanks,
    Willie

    Here's my take:
    The JNDI binding are done when the Tomcat parses server.xml.
    The resource-ref is used to declare to the container how the application is going to use the named resource. The container will 'default' to a standard use; say 'Container' authentication and 'Shareable' which it will use if there are no overides provided in web.xml.
    Each application can overide this 'default' behavior by specifying the appropriate settings for <res-auth> and <res-sharing-scope>.
    Just an educated guess.
    Dave

  • How to map the node which i have created dynamically into the view

    Hi All,
    Many thanks to all ur answers in advance.
    I have created a node dynamically.I want to display the fields which i have fetched in that node.
    i dont know how to map the node which i have created dynamically into the layout of the view.
    Other than Using ALV is there any other way to do.
    for example usin table control

    Hi,
    use the reference variable of view to access the corresponding UI element and then use the method of that UI element to do data binding with context node.
    for ex:
    Context node = flights
    element = inputfield, ID = inp_name
    data view type ref to if_wd_view.
    data lr_inp type ref to cl_wd_input_field.
    lr_inp ?= view->get_child_element( ' INP_NAME' ).
    use following methods of input field to define the data binding.
    SET__DDIC_BINDING( )
    BOUND__PROPERTY( ).
    BOUND__PRIMARY_PROPERTY( ). " for input field it is value property.
    Get the reference of view from wddomodifyview method as importing parameter(view). Store this parameter as controller attribute.
    Thanks,
    Rahul

Maybe you are looking for

  • Please help, someone please, this is a big issue

    2nd g-thouch owner................. ok, well I have been downlowding my songs, right, for about a week now. But i dont use itunes to get my songs,I use MP3 Rocket to get all my songs and then I put the songs that i got onto the itunes. well I did tha

  • Central Output Server View Manager on Windows 7, need patch for jfPreview.exe

    Where can I obtain the latest version of JfPreView.exe? According to the following webpage: http://helpx.adobe.com/legacy/kb/central-central-pro-output-server-1.html Adobe Central and Central Pro Output Server 5.7, Windows support extended to Windows

  • Itunes on windows wont load

    I can not install itunes... it says verify permissions...also service mobile apple device failed to start....I had itunes on my computer and after an update I could not open itunes anymore and when I tried to reinstall i received the above error mess

  • How to write DML operation in a function

    Hi Its very urgent for me. I am writing DML operation directly in a function and is being called from select statement, it is getting error as "DML Operations cannot be performed inside a query". How to write a DML operation inside a function. My obj

  • Parallax scrolling website with navigation menu.

    I am making a website with parallax scolling. It is going to be a story from top to bottom. The story is going to be quite long, so my idea was to put in a fixed navigation menu. If you click on buttons in the menu you go directly to different parts