Cannot use "java:" prefix in Context.lookup()

I have observed a NullPointer exception when the "java:" prefix
is used during a JNDI lookup with WL 5.1.0 Service Pack 4 on WinNT.
Context ctx = new InitialContext();
Object obj = ctx.lookup("java:comp/env/ejb/BeanHome");
The work-around of removing the "java:" prefix works fine:
Object obj = ctx.lookup("comp/env/ejb/BeanHome");
The "java:" prefix is suggested in the EJB 1.1 specification.
Here is the exception's stack trace:
java.lang.NullPointerException:
     at weblogic.jndi.factories.java.ReadOnlyContextWrapper.lookup(ReadOnlyContextWrapper.java:29)
     at weblogic.jndi.internal.AbstractURLContext.lookup(AbstractURLContext.java:117)
     at javax.naming.InitialContext.lookup(InitialContext.java:349)
     at com.foodcompliance.servlet.Library.getLibraryManager(Library.java)
     at com.foodcompliance.servlet.Library.doGet(Library.java, Compiled Code)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
     at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:124)
     at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:744)
     at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:692)
     at weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContextManager.java:251)
     at weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:363)
     at weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:263)
     at weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled Code)

I got the Java Embedding Activity working...,I used the following imports in my BPEL....
<bpelx:exec import="java.util.logging.Logger"/>
<bpelx:exec import="java.util.logging.Level"/>
<bpelx:exec import="oracle.fabric.logging.LogFormatter"/>
<bpelx:exec import="org.w3c.dom.*"/>
<bpelx:exec import="oracle.xml.parser.v2.XMLElement"/>
<bpelx:exec import="java.util.*"/>
<bpelx:exec import="java.lang.*"/>
<bpelx:exec import="java.math.*"/>
<bpelx:exec import="java.io.*"/>
<bpelx:exec import="oracle.soa.common.util.Base64Decoder"/>
Hope this helps anyone who have been struggling like me before...
Thanks,
N

Similar Messages

  • Cannot use java

    not sure if i am in the right area but thought i would start here.
    i am trying to view a webcam to watch my dog at daycare, when i try viewing it i am told that i need to upgrade my java. did that java told me i downloaded it and ready to use.
    but everytime i log into the site and click on the webcam i get a blank screen. i then get a message that my security is blocking me from using java.
    can someone tell me step by step what my security should be set at in order to use java. as far as i can see i have everything right.
    but still cannot view it on my macbook pro. i have OS X 10.9.3.
    i can view the webcam on my iphone and ipad but i need to refresh every couple minutes.
    which then brings me to another question.
    when i sign into the daycare it ask me if i want to use JPEG, GIF or 3G. which is the correct one.
    thank you for all and any help.

    dogwalker 2,
    there are currently three “latest versions” available — one based on Java 6, which is distributed by Apple; one based on Java 7, which is distributed by Oracle; and one based on Java 8, which is also distributed by Oracle. Did you install the latest Java from Apple, or one of the latest versions from Oracle? If you’ve downloaded the latest Java 6 from Apple, then you’ll need to also download the latest Java applet plug-in from Oracle if your dog daycare’s webcam access is provided as a Java applet — and that plug-in comes as part of Java 7 or Java 8, either of which can be downloaded from Oracle here. Once one of these is installed, you’ll have the Java pane in System Preferences again, and you’ll need to adjust its settings appropriately.
    Any software can be the source of security problems. The keys are to only use what you need to, when you need to, and to stay on top of security updates as they’re released.

  • I cannot use JAVA with Firefox but I can use it with Internet Explorer WHY?

    I have never had a problem when JAVA 7 was needed to use a program. Until now. Firefox will not allow me to use Java. I have to open Internet Explorer when working with any program and it works.

    To protect Firefox users, Mozilla has blocked/disabled Java 7 u6 and below due to serious security flaws in the previous versions of Java 7. The security flaw would also apply to any other browser using the affected versions of Java 7. You can see the version of Java and whether it is disabled in Add-ons > Plugins; look for "Java Platform SE...". See - https://addons.mozilla.org/en-US/firefox/blocked/p138
    You can check your '''''enabled''''' Plugins at any time - https://www.mozilla.org/en-US/plugincheck/
    Information about Java, testing and updating it - https://support.mozilla.org/en-US/kb/use-java-plugin-to-view-interactive-content

  • I cannot use java jre in lion, I cannot use java jre in lion

    Hi I need to use an online banking service which requires Java - I have ensured that my Java is fully up to dat and even installed the developers version but I cannot access the online banking service.
    I am using Lion - any ideas?

    Uninstall any Java you have now and install this
    https://support.apple.com/kb/DL1421
    Reboot and see if that works, it could be your site isn't compatible with Lion/Safari yet.
    You can use Firefox or even Chrome web browers, see if those work.

  • Cannot use Java Mail in Oracle 8i

    I have loaded Sun's API Java Mail (and Java Activator) into
    an Oracle 8.1.5 server running on a Windows NT 4.0 server.
    I have also created a small Java-application that tries to
    send emails. The application is stored in database as a stored
    procedure.
    However, when I try to send a mail through my stored procedure
    I get the message:
    'ORA-01041 internal error. hostdef extension doesn't exist'
    followed by an end-of-channel error.
    It works fine when I run my Java-program stand-alone, without
    any database involved.
    I need some help with this one...
    Regards,
    Lars-Eric
    null

    I got the Java Embedding Activity working...,I used the following imports in my BPEL....
    <bpelx:exec import="java.util.logging.Logger"/>
    <bpelx:exec import="java.util.logging.Level"/>
    <bpelx:exec import="oracle.fabric.logging.LogFormatter"/>
    <bpelx:exec import="org.w3c.dom.*"/>
    <bpelx:exec import="oracle.xml.parser.v2.XMLElement"/>
    <bpelx:exec import="java.util.*"/>
    <bpelx:exec import="java.lang.*"/>
    <bpelx:exec import="java.math.*"/>
    <bpelx:exec import="java.io.*"/>
    <bpelx:exec import="oracle.soa.common.util.Base64Decoder"/>
    Hope this helps anyone who have been struggling like me before...
    Thanks,
    N

  • Cannot use Java on Firefox in Mac

    I'm Mac user. I have followed all the instruction to set up the java on firefox in my macbook. However, when I browsing those web site which request java, I still unable to open it.
    If I use Safari to open those web sites, that is absolutely fine.
    Does anyone can help me to solve this problem please?

    You can only use IE to display XPS files directly.
    Firefox doesn't know about this file.
    *http://windows.microsoft.com/en-us/windows/what-is-xps-viewer#what-is-xps-viewer=windows-vista
    *[https://bugzilla.mozilla.org/show_bug.cgi?id=358297 bug 358297] - MS-Windows: XPS Viewer incorrectly redirects to firefox (Vista, XP)

  • Cannot use Java Embedding in Jdeveloper 11.4

    Hi,
    I am using Jdeveloper 11.1.1.4.0 . I am using a Java Embedding Activity in my BPEL and when i compile the project, the error which is coming is SCAC 50012. The same is working in 11.1.1.3.0 Jdeveloper Version.
    The code i am using in Java Embedding activity is
    Logger logger = Logger.getLogger("oracle.soa.Logger");
    LogFormatter.configFormatter(logger);     
    String var1 = ((oracle.xml.parser.v2.XMLElement) getVariableData("inputVariable","payload","/client:process/client:input")).getFirstChild().getNodeValue();
    logger.info("Message from Logging level:Info"+var1 );
    Please help me with this...
    Thanks,
    N
    Edited by: Naresh on Jul 13, 2011 10:47 AM

    I got the Java Embedding Activity working...,I used the following imports in my BPEL....
    <bpelx:exec import="java.util.logging.Logger"/>
    <bpelx:exec import="java.util.logging.Level"/>
    <bpelx:exec import="oracle.fabric.logging.LogFormatter"/>
    <bpelx:exec import="org.w3c.dom.*"/>
    <bpelx:exec import="oracle.xml.parser.v2.XMLElement"/>
    <bpelx:exec import="java.util.*"/>
    <bpelx:exec import="java.lang.*"/>
    <bpelx:exec import="java.math.*"/>
    <bpelx:exec import="java.io.*"/>
    <bpelx:exec import="oracle.soa.common.util.Base64Decoder"/>
    Hope this helps anyone who have been struggling like me before...
    Thanks,
    N

  • Why OS X lion cannot use Java?

    why OS X lion Java got new update?

    This article may shed some light on it:
    http://jaxenter.com/apple-to-remove-java-from-mac-os-x-32293.html
    A Java update is available, and should appear when you first run a Java applet on Lion.

  • How to use java code in my forms.................

    Hi All,
    I want to use the below java code in my form 6i ..but don't know how????????
    related function is also given below..........
    Any idea .......Please
    Thanks
    Harry.....
    import java.awt.*;
    import javax.swing.*;
    import java.awt.event.*;
    import java.sql.*;
    public class MyProgram {
    private static Connection con = null;
    private static Statement st;
    public static ResultSet rs;
    public static String s;
    /* public void setlable(int n)
    rs = st.executeQuery("SELECT number_to_words("+n+") FROM dual");
    while (rs.next())
    output.setText(rs.getString(1));
    public static void main(String[] args) {
    try
    Class.forName("oracle.jdbc.driver.OracleDriver");
    Connection con = DriverManager.getConnection("jdbc:oracle:thin:@172.19.193.38:1525:ITSTIN", "scott", "tiger");
    st = con.createStatement();
    }catch(Exception exp){
    System.out.println("Error"+exp.toString());
    JFrame f = new JFrame("Conver Digit to Words..");
    JLabel input = new JLabel("Enter Numeric digits :");
    final JLabel output = new JLabel("Please enter value into TestBox.....",JLabel.CENTER);
    final JTextField TF1 = new JTextField(90);
    final JButton B1 = new JButton("Close");
    f.setSize(750, 250);
    f.setLocation(300,200);
    f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    Container contentPane = f.getContentPane();
    contentPane.setLayout(null);
    contentPane.setBackground(Color.CYAN);
    TF1.setLocation(300,25);
    TF1.setSize(150,30);
    input.setLocation(175,25);
    input.setSize(150,30);
    input.requestFocus();
    output.setLocation(15,100);
    output.setSize(650,30);
    output.setForeground(Color.RED);
    B1.setSize(100,32);
    B1.setLocation(620,175);
    contentPane.add(TF1);
    contentPane.add(input);
    contentPane.add(output);
    contentPane.add(B1);
    f.setVisible(true);
    B1.addMouseListener(new MouseAdapter(){
    public void mouseClicked(MouseEvent me)
    System.exit(0);
    TF1.addKeyListener(new KeyAdapter(){
    public void keyReleased(KeyEvent event){
    if (TF1.getText().equals("") )
    output.setText("Please enter value into TestBox.....");
    else
    try
    if (TF1.getText().length()<12)
    s = "SELECT initcap(number_to_words("+Long.parseLong(TF1.getText())+")) FROM dual";
    rs = st.executeQuery(s); //Function number_to_words exists in scott@itstin created by AMUY-IN
    while (rs.next())
    output.setText(rs.getString(1));
    }catch(Exception e)
    System.out.println("Error-2"+e.toString());
    ================================function===============
    CREATE OR REPLACE FUNCTION amuy_con_to_eng(nm2 NUMBER) RETURN VARCHAR2 IS
    nm1 NUMBER(10,0) := nm2;
    NM VARCHAR2(100):='';
    div NUMBER;
    BEGIN
    WHILE nm1>0 LOOP
    IF nm1>=20 THEN
    div :=Floor(nm1/10);
    NM := NM||' '||base_convert(div*10);
    nm1:=Mod(nm1,10);
    END IF;
    IF nm1>=1 AND nm1<20 THEN
    NM := NM||' '||base_convert(nm1);
    nm1:=nm1/10;
    END IF;
    nm1 :=Floor(nm1/10);
    END LOOP;
    RETURN NM;
    END;
    CREATE OR REPLACE FUNCTION number_to_words(inm NUMBER) RETURN VARCHAR2 IS
    /* Function that converts number's to word's*/
    /* Created buy amuy-in */
    l_inm NUMBER(35,0);
    NM VARCHAR2(1000):='';
    div NUMBER;
    BEGIN
    l_inm := inm;
    IF inm<=0 THEN
    RETURN 'ZERO';
    ELSE
    WHILE l_inm>0 LOOP
    case when Length(l_inm) >= 1 AND Length(l_inm)<=2
    then RETURN NM||' '||sf_num_to_words(l_inm);
    when Length(l_inm) = 3
    then div :=Floor(l_inm/RPad(1,3,0));
    l_inm := Mod(l_inm,RPad(1,3,0));
    NM :=NM||' '||sf_num_to_words(div)||' '||'HUNDRED';
    when Length(l_inm) >= 4 AND Length(l_inm) <= 5
    then div :=Floor(l_inm/RPad(1,4,0));
    l_inm := Mod(l_inm,RPad(1,4,0));
    NM :=NM||' '||sf_num_to_words(div)||' '||'THOUSAND';
    when Length(l_inm) >= 6 AND Length(l_inm) <= 7
    then div :=Floor(l_inm/RPad(1,6,0));
    l_inm := Mod(l_inm,RPad(1,6,0));
    NM :=NM||' '||sf_num_to_words(div)||' '||'LAKH';
    when Length(l_inm) >= 8 AND Length(l_inm) <= 9
    then div :=Floor(l_inm/RPad(1,8,0));
    l_inm := Mod(l_inm,RPad(1,8,0));
    NM :=NM||' '||sf_num_to_words(div)||' '||'CRORE';
    when Length(l_inm) >= 10 AND Length(l_inm) <= 11
    then div :=Floor(l_inm/RPad(1,10,0));
    l_inm := Mod(l_inm,RPad(1,10,0));
    NM :=NM||' '||sf_num_to_words(div)||' '||'ARAB';
    ELSE RETURN 'ERROR {Length of input value should be <12}';
    END CASE;
    END LOOP;
    RETURN NM ;
    END IF;
    END;
    /

    You cannot use java directly inside forms. You can either create a java-bean to enhance the GUI (as you have some UI-components in your java-code, i guess this would be the direction) or use the java-importer and call server-side-java. Both require that you are running forms in a web-version and not as client-server.
    What exactly is your requirement?

  • How to get the context data using java script in interactive forms

    Hi All,
    How to get the context data using java script in interactive forms by adobe,  am using web dynpro java
    thanks.

    Hi venkat,
    Please Refer this link.
      Populating one Drop-Down list from the selection of another Drop-down list
    Thanks,
    Raju.

  • XSLT Mapping : RFC Lookup using java helper class

    Hi All,
    I am doing RFC Lookup in xslt mapping using java helper class. I have found blog for the same (http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/05a3d62e-0a01-0010-14bc-adc8efd4ee14) However this blog is very advanced.
    Can anybody help me with step by step approach for the same?
    My basic questions are not answered in the blog as:
    1) where to add the jar file of the java class used in xslt mapping.
    I have added zip file of XSLT mapping in imported archived and using that in mapping.
    Thanks in advace.
    Regards,
    Rohan

    Hi,
    Can u please have look at this in detail , u can easily point out yourself the problem...
    http://help.sap.com/saphelp_nw04/helpdata/en/55/7ef3003fc411d6b1f700508b5d5211/content.htm
    Please observe the line,
    xmlns:javamap="java:com.company.group.MappingClass
    in XSLT mapping..
    The packagename of class and class name and XSLT namespace should be matching...
    Babu
    Edited by: hlbabu123 on Sep 29, 2010 6:04 PM

  • RFC Lookup using Java Mapping program - Examples

    Dear Experts,
    I am working on a scenario which is using 1:N mapping. For deciding the target message I have to use RFC Lookup to call the backend ERP system and there are 2 ERP systems involved in this integration. As I am using Java Mapping and never did a RFC Lookup in Java. I kindly request you to give me some examples which I could use for my RFC calls in my Java Mapping. Simple example will do.
    Client is adamant to use Java mapping, I could achieve this easily using XSLT or Graphical Mapping.
    Advance Thanks,
    Pradeep

    Hello,
    why don't you use Extended Receiver Determination Defining Extended (Dynamic) Receiver Determination - Integration Directory - SAP Library?
    What you can do is create a Message Mapping between your source message and Receivers message type. In this message mapping you can use your RFC to generate the target message.
    For example, lets say we have the function ZFM_GET_INTERFACE_INFO used to generate the List of Receivers given a source message. You could create a Message Mapping as below:
    In this case, the RFCLookup box look as below:
    The receiver determination configuration would look as follows:
    Afterwards, you will need two specific message mappings for the two ERP systems.
    Summarizing, you'll need:
    1.- A Message Mapping: Source Message to Receivers Message Type (This one uses the RFC Lookup)
    2.- A Message Mapping: Source Message to Target Message for ERP 1
    3.- A Message Mapping: Source Message to Target Message for ERP 2
    In Integration Directory you'll have 1 Receiver Determination(Source system, Target System determined Dynamically) and 2 Interface Determinations (Source System to ERP1, Source System to ERP2), etc.
    I hope you find it useful.
    Regards!

  • I cannot use my pogo account as it states firefox has a bug in it and will not let java open

    I cannot use my pogo account this is what it states, how do I fix this, it worked fine this morning and tonight it isn't working
    It looks like you’ve the new version of Firefox. Unfortunately, there is currently a bug that is preventing players from playing Java games with version 3.6.14 of Firefox.

    See this: <br />
    https://support.mozilla.com/en-US/kb/pogo-and-other-java-pages-dont-work

  • XI: How To Use JAVA generic Class to  perform SAP data Lookup........

    Hello All,
    I want to create a generic class which is used to perorm SAP data lookup.
    I don't want to use Jco or RFC channel..
    Is there any other way to do this?
    waiting for Reply 
    thank in advance.
    - AKSHAY.

    Hi,
    use RFC channel
    you can wrap it up like this:
    /people/morten.wittrock/blog/2006/03/30/wrapping-your-mapping-lookup-api-code-in-easy-to-use-java-classes
    why do you want to create something diffucult to maintin and non standard if
    you can use the RFC API ?
    Regards,
    michal
    <a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>

  • I am trying to use screens and it keeps telling me it cannot detect Java even though I have installed and updated Java?  What might be the problem?

    I am trying to use "screenr" and it keeps telling me it cannot detect Java even though I have downloaded and updated Java?  What is going on or what might I do to correct this?
    Thanks

    Firefox needs 32-bit plugins, so you'll need to install 32-bit Java for Firefox.
    No, you can't change Firefox from 32-bt to 64-bit. There is a Nightly 64-bit version (alpha) of Firefox, but it is used only to test for regressions until development is resumed.

Maybe you are looking for

  • Work contacts vs. personal contacts

    I am considering the purchase of an IPHONE but I have to work out some of the issues before I dive in. I was wondering if someone knows if you can keep your work contact lists separate from your personal contacts? My other question - If I say -- ente

  • Data import automation using webservices

    Hi, We have a requirement to load data into Oracle On demand monthly from an external application. We want to automate the task using webservices. Did anyone of you work on such automation? If yes, request you please provide me the details of the sam

  • An error has occurred while trying to access service

    This is the current error that I'm getting after I start converting. Does anybody know of a fix?

  • Converting RGB to CMYK

    When exporting a doc with CMYK graphics and text but RGB images, I have selected convert to dest (preserve numbers). It does that but it also converts 100% blk text and changes the numbers of non profiled colors. The description of the profile says t

  • Mac OS 10.8.5 and HP Photosmart 5514

    I upgraded my mac OS system and now my printer won't work. I have tried to reinstall and now it can't find the printer. Not sure what to do.