New InitialContext() raises a NullPointerException

Hello gentlemen,
I have my code that is working nice under Weblogic 8.1 SP 2 and Service Pack 1 (Windows 2000, jdk141_03).
I switched to Service Pack 5 (no change in my code) and from then I face a strange NullPointerException when I make a call to
new InitialContext(hashtable).
(I am creating a Context for making a lookup on an EJB).
If I revert to Service Pack 2, everything works fine.
I checked Service Pack 6 too (jdk142_11) and I got the same NullPointerException.
I am quite in troubles...
thank you for your help.
Edited by [email protected] at 01/18/2007 3:34 AM

franco lazzari wrote:
Here it is:
java.lang.NullPointerException
at weblogic.rjvm.RJVMManager.findExisting(RJVMManager.java:326)
at weblogic.rjvm.RJVMManager.findOrCreateRemoteInternal(RJVMManager.java:210)
at weblogic.rjvm.RJVMManager.findOrCreate(RJVMManager.java:184)
at weblogic.rjvm.RJVMFinder.findOrCreateRemoteServer(RJVMFinder.java:223Odd. The line of code in 81sp5 that supposedly throws an NPE (line 326)
can't do that in the code I'm looking at. I suggest you open an official
support case showing this full stacktrace. It presents as a core WLS
issue.
Joe
at weblogic.rjvm.RJVMFinder.findOrCreate(RJVMFinder.java:188)
at weblogic.rjvm.ServerURL.findOrCreateRJVM(ServerURL.java:125)
at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLIni
tialContextFactoryDelegate.java:310)
at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLIni
tialContextFactoryDelegate.java:253)
at weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialCont
extFactory.java:135)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:6
62)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243
at javax.naming.InitialContext.init(InitialContext.java:219)
at javax.naming.InitialContext.<init>(InitialContext.java:195)
at mnse.securityserver.utenti.GestoreUtentiCentrale.getToken(GestoreUten
tiCentrale.java:798)
at mnse.securityserver.utenti.GestoreUtentiCentrale.<init>(GestoreUtenti
Centrale.java:82)
at mnse.securityserver.utenti.GestoreUtentiCentrale.createGestoreUtenti(
GestoreUtentiCentrale.java:72)
at mnse.securityserver.utenti.GestoreUtentiCentrale.getGestoreUtenti(Ges
toreUtentiCentrale.java:51)
at mnse.securityserver.utenti.GestoreFontiCentrale.caricaFonteUtenti(Ges
toreFontiCentrale.java:216)
at mnse.securityserver.utenti.GestoreFontiCentrale.<init>(GestoreFontiCe
ntrale.java:89)
at mnse.securityserver.utenti.GestoreFontiCentrale.createGestoreFonti(Ge
storeFontiCentrale.java:62)
at mnse.securityserver.utenti.GestoreFontiCentrale.getGestoreFonti(Gesto
reFontiCentrale.java:46)
at mnse.util.avvio.SecurityLoader.load(SecurityLoader.java:392)
at mnse.util.avvio.SecurityLoader.getMinosseLogfile(SecurityLoader.java:
118)
at mnse.securityserver.logger.MinosseLogger.<init>(MinosseLogger.java:52
at mnse.securityserver.logger.MinosseLogger.createLogger(MinosseLogger.j
ava:95)
at mnse.securityserver.logger.MinosseLogger.getLogger(MinosseLogger.java
:82)
at mnse.util.avvio.TimeStamper.getLDAPServerURL(TimeStamper.java:58)
at mnse.admin.dao.RacsDAO.<init>(RacsDAO.java:59)
at mnse.admin.impl.AdministratorEJB.getOperatore(AdministratorEJB.java:5
1)
at mnse.admin.impl.Administrator_ocrjs3_EOImpl.getOperatore(Administrato
r_ocrjs3_EOImpl.java:316)
at mnse.admin.impl.Administrator_ocrjs3_EOImpl_CBV.getOperatore(Unknown
Source)
at mnse.console.AdministratorProxy.getOperatore(AdministratorProxy.java:
85)
at mnse.console.Controllore.getOperatore(Controllore.java:122)
at mnse.console.Controllore.esegui(Controllore.java:89)
at mnse.console.Short.doPost(Short.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run
(ServletStubImpl.java:1077)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
pl.java:465)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
pl.java:348)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationActio
n.run(WebAppServletContext.java:7047)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authenticate
dSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:
121)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppSe
rvletContext.java:3902)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestIm
pl.java:2773)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:224)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:183)

Similar Messages

  • Problem in using new InitialContext when running client application

    Hi All,
    We are having a web application which runs on weblogic server 6.1.
    We are loading a servelet at startup which will load the application specific
    properties file and bind it with the context.
    In one of the classes in the .ear file we are looking up the data source like
    this
    InitialContext _initialContext = new InitialContext();
    dataSource = (DataSource)
    initialContext.lookup(ClaimsConstants.CLAIMSRDBMS);
    con = dataSource.getConnection();
    This works fine through the jsp.
    But when I run a separate client program this lookup is failing.
    I tried another way of looking up like this
         Properties h = new Properties();
         h.put(Context.INITIAL_CONTEXT_FACTORY,
              "weblogic.jndi.WLInitialContextFactory");
         h.put(Context.PROVIDER_URL, url);
         Context _initialContext = new InitialContext(h);
    dataSource = (DataSource)
    initialContext.lookup(ClaimsConstants.CLAIMSRDBMS);
    But the weblogic server got hanged for some time after it gave no messages coming
    idle exception.
    If any body knows the solution for this please reply. I am trying to develop an
    application client but I don't know hoe to proceed. Any examples I can get for
    writing a application client using weblogic is very much welcome.
    Please give your valuable suggestions.

    Hi Krishna,
    servlet/jsp programs will work successfully in getting initial context of
    application server, because they runs at server side, and server
    automatically loaded the client library.
    If you are using application client, you need to point the weblogic.jar the
    application client classpath.What is the exception it is throwing?
    Can you test the weblogic samples from the following location of your
    installation
    \bea\wlserver6.1\samples\examples
    Thanks
    Kumar
    "Krishna Kumar" <[email protected]> wrote in message
    news:3def5758$[email protected]..
    >
    Hi All,
    We are having a web application which runs on weblogic server 6.1.
    We are loading a servelet at startup which will load the applicationspecific
    properties file and bind it with the context.
    In one of the classes in the .ear file we are looking up the data sourcelike
    this
    InitialContext _initialContext = new InitialContext();
    dataSource = (DataSource)
    initialContext.lookup(ClaimsConstants.CLAIMSRDBMS);
    con = dataSource.getConnection();
    This works fine through the jsp.
    But when I run a separate client program this lookup is failing.
    I tried another way of looking up like this
    Properties h = new Properties();
    h.put(Context.INITIAL_CONTEXT_FACTORY,
    "weblogic.jndi.WLInitialContextFactory");
    h.put(Context.PROVIDER_URL, url);
    Context _initialContext = new InitialContext(h);
    dataSource = (DataSource)
    initialContext.lookup(ClaimsConstants.CLAIMSRDBMS);
    But the weblogic server got hanged for some time after it gave no messagescoming
    idle exception.
    If any body knows the solution for this please reply. I am trying todevelop an
    application client but I don't know hoe to proceed. Any examples I can getfor
    writing a application client using weblogic is very much welcome.
    Please give your valuable suggestions.

  • 4.51 new InitialContext never returns

    4.51 new InitialContext never returns
    When I do a "new InitialContext" in my client test program, it never
    returns
    when run on solaris or linux, it works fine on NT.
    Another symptom of the same problem is that a LIST command of
    weblogic.Admin works
    on NT but never returns on Solaris or Linux.
    VERSION and SHUTDOWN work on NT, Solaris and Linux.
    also note that on linux with ibm 1.1.8 jdk, I completely re-loaded the
    weblogic
    with only the system password changed in the weblogic.properties file
    (just to
    make sure I did not accidently put something in the properties file to
    cause
    the problem)
    here is the some raw data, I do relaize that some of these combinations
    are not certified (none of the Solaris or Linux combinations worked).
    Sun Ultra10 2.5.1 with jdk1.1.8 no service pack
    Sun Ultra10 2.5.1 with jdk1.1.8 service pack 8
    Sun Ultra10 2.5.1 with jdk1.1.7 service pack 8
    Windows NT 4.0 service pack 6a javasoft jdk1.2.2 weblogic service pack 7
    linux (redhat 6.2 with blackdown jdk1.2.2)
    linux (redhat 6.2 with ibm1.1.8 jdk)
    changes to weblogic.properties:
    weblogic.system.password=syspword
    to startup weblogic:
    export PATH=$PATH:/usr/local/jdk118/bin
    export JDK_HOME=/usr/local/jdk118
    export
    CLASSPATH=./classes:./lib/weblogicaux.jar:./myserver/serverclasses
    ./startWebLogic.sh
    code segment from client program:
    static public Context getInitialContext()
    Context returnValue = null;
    Properties p;
    p = new Properties();
    p.put(Context.INITIAL_CONTEXT_FACTORY,
    "weblogic.jndi.TengahInitialContextFactory");
    p.put(Context.PROVIDER_URL,"t3://207.112.33.206:7001");
    try
    System.out.println("getting initial context");
    returnValue = new InitialContext(p);
    System.out.println("got initial context");
    catch (NamingException ex)
    System.out.println("exception");
    System.out.println("NamingException " +
    ex.getMessage())
    ex.printStackTrace();
    catch (Exception ex)
    System.out.println("exception");
    return returnValue;
    results of running the client program:
    getting initial context
    the client program never returns
    check linux version:
    [jack@linux01 test]$ uname -a
    Linux linux01.delfour.com 2.2.14-5.0 #1 Tue Mar 7 20:53:41 EST 2000 i586
    unknown
    check weblogic version on NT:
    [jack@linux01 test]$ java weblogic.Admin t3://207.112.33.203:7001
    VERSION
    WebLogic Build: 4.5.1 Service Pack 7 02/16/2000 15:17:50 #63218
    check weblogic version on linux:
    [jack@linux01 test]$ java weblogic.Admin t3://localhost:7001 VERSION
    WebLogic Build: 4.5.1 09/30/1999 17:41:18 #53704
    test one: linux client to linux server:
    [jack@linux01 test]$ java weblogic.Admin t3://localhost:7001 PING 1 1
    Sending 1 ping of 1 byte.
    RTT = ~741 milliseconds, or ~741 milliseconds/packet
    test two: linux client to linux server:
    [jack@linux01 test]$ java weblogic.Admin t3://localhost:7001 LIST
    weblogic system bogus
    Setting credentials
    An AuthenticationException occurred that prevented access to the given
    name in the naming service. The username/password you supplied is not
    authorized for thi
    s operation.
    test three: linux client to linux server:
    [jack@linux01 test]$ java weblogic.Admin t3://localhost:7001 LIST
    weblogic syste
    m syspword
    Setting credentials
    after 5 minutes, still no response
    test four: linux client to NT server:
    [jack@linux01 test]$ java weblogic.Admin t3://207.112.33.203:7001 LIST
    weblogic system password
    Setting credentials
    Contents of weblogic
    fileSystem:
    weblogic.jndi.toolkit.ReplicatedWLContext:weblogic.jndi.toolkit.WL
    [email protected]:[7001,7001,7002,7002,-1]
    NameBas
    edFailOverHandler (name: weblogic.fileSystem, env:
    weblogic.jndi.Environment@806
    05d5
    ejb:
    weblogic.jndi.toolkit.ReplicatedWLContext:weblogic.jndi.toolkit.WLContext
    [email protected]:[7001,7001,7002,7002,-1]
    NameBasedFailO
    verHandler (name: weblogic.ejb, env: weblogic.jndi.Environment@80605d5
    common:
    weblogic.jndi.toolkit.ReplicatedWLContext:weblogic.jndi.toolkit.WLCont
    [email protected]:[7001,7001,7002,7002,-1]
    NameBasedFa
    ilOverHandler (name: weblogic.common, env:
    weblogic.jndi.Environment@80605d5
    jdbc:
    weblogic.jndi.toolkit.ReplicatedWLContext:weblogic.jndi.toolkit.WLContex
    [email protected]:[7001,7001,7002,7002,-1]
    NameBasedFail
    OverHandler (name: weblogic.jdbc, env: weblogic.jndi.Environment@80605d5
    jts:
    weblogic.jndi.toolkit.ReplicatedWLContext:weblogic.jndi.toolkit.WLContext
    [email protected]:[7001,7001,7002,7002,-1]
    NameBasedFailO
    verHandler (name: weblogic.jts, env: weblogic.jndi.Environment@80605d5
    server:
    weblogic.jndi.toolkit.ReplicatedWLContext:weblogic.jndi.toolkit.WLCont
    [email protected]:[7001,7001,7002,7002,-1]
    NameBasedFa
    ilOverHandler (name: weblogic.server, env:
    weblogic.jndi.Environment@80605d5
    rmi:
    weblogic.jndi.toolkit.ReplicatedWLContext:weblogic.jndi.toolkit.WLContext
    [email protected]:[7001,7001,7002,7002,-1]
    NameBasedFailO
    verHandler (name: weblogic.rmi, env: weblogic.jndi.Environment@80605d5
    jms:
    weblogic.jndi.toolkit.ReplicatedWLContext:weblogic.jndi.toolkit.WLContext
    [email protected]:[7001,7001,7002,7002,-1]
    NameBasedFailO
    verHandler (name: weblogic.jms, env: weblogic.jndi.Environment@80605d5
    jndi:
    weblogic.jndi.toolkit.ReplicatedWLContext:weblogic.jndi.toolkit.WLContex
    [email protected]:[7001,7001,7002,7002,-1]
    NameBasedFail
    OverHandler (name: weblogic.jndi, env: weblogic.jndi.Environment@80605d5
    here is the end of the weblogic traces after a single LIST on linux:
    Sun May 07 09:40:34 EDT 2000:<I> <WebLogicServer> Server loading from
    weblogic.c
    lass.path. EJB redeployment enabled.
    Sun May 07 09:40:44 EDT 2000:<I> <WebLogicServer> Event handler log
    started (reg
    id: 1)
    Sun May 07 09:40:44 EDT 2000:<I> <WebLogicServer> Invoking main-style
    startup we
    blogic.jdbc.common.internal.JdbcStartup
    weblogic.jdbc.common.internal.JdbcStartu
    p
    Sun May 07 09:40:48 EDT 2000:<S> <SSLListenThread> 2 certificate(s):
    fingerprint = 88dae49f1a3122e62e7a94a3dc76fbf0, not before = Tue Oct
    26 15:03:
    00 EDT 1999, not after = Tue Oct 24 15:03:00 EDT 2000, holder = C=US
    SP=Californ
    ia L=San Francisco O=WebLogic CN=weblogic.beasys.com
    [email protected]
    , issuer = C=US SP=California L=San Francisco O=WebLogic OU=Security
    CN=Demonstr
    ation Certificate Authority [email protected] , key = modulus =
    65 byte
    Bignum
    value=00959b5668811e78a28a018631455f5bd4f51b0e3e77b79dcb7a4c67c31a8f94b0
    4bce347b731121da27918dd36bce8f1f0b77cd7944ecbd3d517baa3a83dcce8b,
    exponent = 3 b
    yte Bignum value=010001
    fingerprint = f1c530f7211410a2220c7e9d3152b496, not before = Tue Oct
    26 14:18:
    53 EDT 1999, not after = Wed Oct 25 14:18:53 EDT 2000, holder = C=US
    SP=Californ
    ia L=San Francisco O=WebLogic OU=Security CN=Demonstration Certificate
    Authority
    [email protected] , issuer = C=US SP=California L=San
    Francisco O=WebL
    ogic OU=Security CN=Demonstration Certificate Authority
    [email protected]
    om , key = modulus = 65 byte Bignum
    value=00b6743b62ce13992324b18d8061d24457ff90
    5b7e8aaceef6bef802b6f8a1e176f9791d571f14df79e9dd40f1f8e83e9e41048f05f931fe07dc06
    2f19ac20fa93, exponent = 3 byte Bignum value=010001
    Sun May 07 09:40:48 EDT 2000:<I> <SSLListenThread> Using exportable
    strength
    SSL
    Sun May 07 09:40:50 EDT 2000:<I> <JMS> Beginning startup process
    Sun May 07 09:40:50 EDT 2000:<I> <JMS> Init JMS Security
    Sun May 07 09:40:51 EDT 2000:<I> <JMS> Startup process complete. JMS is
    active
    Sun May 07 09:40:51 EDT 2000:<I> <WebLogicServer> Invoking main-style
    startup RM
    I Registry weblogic.rmi.internal.RegistryImpl
    Sun May 07 09:40:51 EDT 2000:<I> <RMI> Registry started
    Sun May 07 09:40:52 EDT 2000:<I> <EJB> 0 EJBs were deployed using .ser
    files.
    Sun May 07 09:40:52 EDT 2000:<I> <EJB> 0 EJBs were deployed using .jar
    files.
    Sun May 07 09:40:53 EDT 2000:<I> <ZAC> ZAC ACLs initialized
    Sun May 07 09:40:53 EDT 2000:<I> <ZAC> ZAC packages stored in local
    directory ex
    ports
    Sun May 07 09:40:54 EDT 2000:<I> <ListenThread> Listening on port: 7001
    Sun May 07 09:40:57 EDT 2000:<I> <SSLListenThread> Listening on port:
    7002
    Sun May 07 09:40:58 EDT 2000:<I> <WebLogicServer> WebLogic Server
    started
    Sun May 07 09:41:09 EDT 2000:<I> <ListenThread> Adding address:
    linux01.delfour.
    com/207.112.33.206 to licensed client list
    Sun May 07 09:41:12 EDT 2000:<I> <RJVM> Creating connection to
    localhost/127.0.0
    .1 -1260680115049870327
    I hope someone can shed some light on this...
    - Rob (jack) Lapensee

    It looks like you are modifying the object you are iterating over while you are iterating... not good. Say your gp only had one element, a LINE_TO. It will run through and call another LINE_TO in the switch, thus when it comes back to the while, there is a newly added point to interpret, so the iterator will never finish. Usually, most components throw a ConcurrentModificationException when this happens for this type of case. I'm not sure why the PathIterator doesn't.
    In short, use a different reference in the loop then the one you are iterating over.
    -JBoeing

  • New InitialContext() gets String index out of bounds

    Context ctx = null;
    ctx = new InitialContext();
    DataSource dataSource = (DataSource) ctx.lookup("jdbc/datasource");
    connection = dataSource.getConnection();
    I get:
    String index out of range: -1
    weblogic.jndi.Environment.getContext(Environment.java:308)
    weblogic.jndi.Environment.getContext(Environment.java:285)
    weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFactory.java:117)
    javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
    javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
    javax.naming.InitialContext.init(InitialContext.java:223)
    javax.naming.InitialContext.<init>(InitialContext.java:175)
    Earlier when I had provider_url specified I didn't get this problem, but it should be working without specifing provider_url...
    And well now it doesn't work with provider_url localhost since they set -Djava.net.preferIPv4Stack=true
    Which made so it stopped listening to localhost:port...
    Does someone know a possible solution for:
    1. String index of range
    2. the preferIPv4Stack thingy, which makes the listeners to stop listening to localhost:port

    Be sure values contains data.
    Then make sure that size = values.length
    Either you don't have any data to iterate through, or the size variable is too big. So it's trying to search in parts of the array that don't exist.

  • New initialContext hangs

    Hello, below is the piece of code which i am trying.
                      String server = System.getenv("NNM_HOSTNAME"); //host where jboss is running
                      String nnmiprotocol = System.getenv("NNM_PROTOCOL"); //http default
                      String nnmi_port = System.getenv("NNM_PORT"); //80 default
    final Hashtable<Object, Object> env = new Hashtable<Object, Object>();
    env.put(Context.PROVIDER_URL, nnmiprotocol+"://"+server+":"+nnmi_port+"/invoker/restricted/JNDIFactory");
    env.put(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.naming.HttpNamingContextFactory");
    env.put(InitialContext.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");
    env.put(Context.SECURITY_PROTOCOL, "nnm");
    env.put(Context.SECURITY_PRINCIPAL, m_jUsername);
    env.put(Context.SECURITY_CREDENTIALS, m_jPasswd);
    env.put("jnp.disableDiscovery", "true");
    ic =  new InitialContext(env); //hangs here
    When i try this on Linux RHEL 6.4 machine it works fine. But when i try the same on Windows Server 2008 it hangs. When i searched online about this, i found that all the classes mentioned in "env" should be part of class path. I have all of them in java class path. I am using JDK 1.7. What could be the issue ?

    Hello, below is the piece of code which i am trying.
                      String server = System.getenv("NNM_HOSTNAME"); //host where jboss is running
                      String nnmiprotocol = System.getenv("NNM_PROTOCOL"); //http default
                      String nnmi_port = System.getenv("NNM_PORT"); //80 default
    final Hashtable<Object, Object> env = new Hashtable<Object, Object>();
    env.put(Context.PROVIDER_URL, nnmiprotocol+"://"+server+":"+nnmi_port+"/invoker/restricted/JNDIFactory");
    env.put(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.naming.HttpNamingContextFactory");
    env.put(InitialContext.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");
    env.put(Context.SECURITY_PROTOCOL, "nnm");
    env.put(Context.SECURITY_PRINCIPAL, m_jUsername);
    env.put(Context.SECURITY_CREDENTIALS, m_jPasswd);
    env.put("jnp.disableDiscovery", "true");
    ic =  new InitialContext(env); //hangs here
    When i try this on Linux RHEL 6.4 machine it works fine. But when i try the same on Windows Server 2008 it hangs. When i searched online about this, i found that all the classes mentioned in "env" should be part of class path. I have all of them in java class path. I am using JDK 1.7. What could be the issue ?

  • New InitialContext() in WL6.1sp2

    It seems to me that all Context's have to be closed after use so they are
    not reused when some other application creates a new InitialContext().
    What bothers me is this scenario:
    - A server has deployed X applications who closes all Contexts after use
    - Deploy one component that doesn't close the context it us using - and this
    context is 'wrong' for the other components.
    The result is that the X deployed 'nice' applications will get the unclosed
    context when they perform a new InitialContext()
    I really hope I've missed something basic here...
    Mala

    "Rob Woollen" <[email protected]> wrote in message
    news:[email protected]..
    Tor Mala wrote:
    It seems to me that all Context's have to be closed after use so they
    are
    not reused when some other application creates a new InitialContext().No, not unless you are pooling the InitialContexts or something. Whatmakes
    you think this is true?
    If I create a context talking to a remote system and don't close it after
    use - new contexts being created will get an authentication failure when
    trying to be used for a lookup. This problem goes away when I close the
    context.
    What are the rules for which credentials/contextsettings to be used when
    creating new contexts?

  • New InitialContext in every method?

    Hello all... I have a reallly quick question...
    Should I, or should I not instanciate an InitialContext object at the top of
    almost every business method that interacts with another bean, or should I
    have only one InitialContext object for the BeanInstance (Instanciated once
    during setEntityContext callback) ???
    Thanks,
    dave

    You can have one global InitialContext for use by all your server-side code (taglibs,
    servlets, jsps, beans etc...) - that's what we do and it works just fine, including
    interacting properly with security.
    simon.
    "David Phillips" <[email protected]> wrote:
    Hello all... I have a reallly quick question...
    Should I, or should I not instanciate an InitialContext object at the
    top of
    almost every business method that interacts with another bean, or should
    I
    have only one InitialContext object for the BeanInstance (Instanciated
    once
    during setEntityContext callback) ???
    Thanks,
    dave

  • NullPointer when invoke InitialContext  in standard application sip server

    I am unable to do a new InitialContext() in an application that does not have any sipservlets , but is deployed on sip server engine tier
    When an application is deployed in weblogic engine server (sip server 3.1 ) without a sip.xml as the application does
    Not have any sip servlets , a new InitialContext() throws a NullpointerException . The stack trace is below .
    This error is not encountered in weblogic 9.2 server (non sip server)
    InitialContext ic = new InitialContext();
    javax.naming.NamingException [Root exception is java.lang.NullPointerException: SIP Servlet context not found]
    at javax.naming.spi.NamingManager.getURLObject(NamingManager.java:588)
    at javax.naming.spi.NamingManager.getURLContext(NamingManager.java:533)
    at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:279)
    at javax.naming.InitialContext.lookup(InitialContext.java:351)
    at

    Hi B.,
    have you managed to find the solution for this problem? I'm facing same issue.
    I also tried to publish the WS in standalone app (via javax.xml.ws.Endpoint.publish()) and it worked with no problem that way. However, when I moved this to servlet definition, it failed.
    Thanks a lot.
    Regards,
    F.

  • Creation of InitialContext fails when i hot-deploy scheduler-service.xml

    Creation of InitialContext fails when i hot-deploy scheduler-service.xml
    I configured scheduler-service as follows in Jboss 3.2:
    scheduler-service.xml
    <mbean code="org.jboss.varia.scheduler.Scheduler"
         name=":service=Scheduler">
    <attribute name="StartAtStartup">true</attribute>
    <attribute name="SchedulableClass">com.beta.my.utils.FMScheduler</attribute>
    <attribute name="SchedulableArguments">Schedulabe Test,12345</attribute>
    <attribute name="SchedulableArgumentTypes">java.lang.String,int</attribute>
    <attribute name="InitialStartDate">0</attribute>
    <attribute name="SchedulePeriod">10000</attribute>
    <attribute name="InitialRepetitions">-1</attribute>
    </mbean>
    Schedulable Class
    package com.beta.my.utils;
    import java.util.Date;
    import org.jboss.varia.scheduler.Schedulable;
    public static class FMScheduler
    implements Schedulable
    private String mName;
    private int mValue;
    public FMScheduler(String pName,int pValue)
    mName = pName;
    mValue = pValue;
    public void perform(Date pTimeOfCall,long pRemainingRepetitions)
    try {
              Context context = new InitialContext();//properties taken from jndi.properties file
              } catch (Exception e){
                   e.printStackTrace();
    I started my jboss..,FMScheduler created successfully, perform method in FMScheduler called succesfully after SchedulePeriod(1000)
    The problem occurs(NullPointerException) while i changed SchedulePeriod time and hot-deployed(just saved scheduler-service.xml).
    The following Exception occures due to InitialContext creation fails*(Context context = new InitialContext();)* in FMScheduler.
    17:46:27,361 ERROR [STDERR] java.lang.NullPointerException
    17:46:27,361 ERROR [STDERR] at org.jboss.mx.loading.UnifiedClassLoader.findR
    esources(UnifiedClassLoader.java:374)
    17:46:27,361 ERROR [STDERR] at java.lang.ClassLoader.getResources(ClassLoade
    r.java:825)
    17:46:27,361 ERROR [STDERR] at com.sun.naming.internal.VersionHelper12$5.run
    (VersionHelper12.java:145)
    17:46:27,361 ERROR [STDERR] at java.security.AccessController.doPrivileged(N
    ative Method)
    17:46:27,377 ERROR [STDERR] at com.sun.naming.internal.VersionHelper12.getRe
    sources(VersionHelper12.java:142)
    17:46:27,377 ERROR [STDERR] at com.sun.naming.internal.ResourceManager.getAp
    plicationResources(ResourceManager.java:468)
    17:46:27,377 ERROR [STDERR] at com.sun.naming.internal.ResourceManager.getIn
    itialEnvironment(ResourceManager.java:159)
    17:46:27,377 ERROR [STDERR] at javax.naming.InitialContext.init(InitialConte
    xt.java:215)
    17:46:27,377 ERROR [STDERR] at javax.naming.InitialContext.<init>(InitialCon
    text.java:195)
    17:46:27,377 ERROR [STDERR] at com.beta.my.utils.FMScheduler.perform
    (FMScheduler.java:42)
    17:46:27,392 ERROR [STDERR] at org.jboss.varia.scheduler.Scheduler$Listener.
    handleNotification(Scheduler.java:1263)
    17:46:27,392 ERROR [STDERR] at org.jboss.mx.server.NotificationListenerProxy
    .handleNotification(NotificationListenerProxy.java:69)
    17:46:27,392 ERROR [STDERR] at javax.management.NotificationBroadcasterSuppo
    rt.sendNotification(NotificationBroadcasterSupport.java:95)
    17:46:27,392 ERROR [STDERR] at javax.management.timer.Timer.sendNotification
    s(Timer.java:441)
    17:46:27,392 ERROR [STDERR] at javax.management.timer.Timer.access$000(Timer
    .java:31)
    17:46:27,408 ERROR [STDERR] at javax.management.timer.Timer$RegisteredNotifi
    cation.doRun(Timer.java:612)
    17:46:27,408 ERROR [STDERR] at org.jboss.mx.util.SchedulableRunnable.run(Sch
    edulableRunnable.java:164)
    17:46:27,408 ERROR [STDERR] at org.jboss.mx.util.ThreadPool$Worker.run(Threa
    dPool.java:225)
    please help me if u have any idea,thanks

    Hi Hamsa,
    Did you also create and configure an "Execution Destination"?
    You can test the Metadata destination configuration on Web Service Navigator.
    On the web service navigator (http://hostname:portnumber/wsnavigator) search in the metatda destination you have created for the service you imported in web dynpro as a model. If you can find it there test it on the ws navigator.
    Best regards,
    Yasar

  • New to jsp, login page errors

    Hi
    I'm totally new to using jsp and as part of a project I need to create a login page which compares the
    entered email and password with those contained in a database.
    I've created the java code and jsp pages, there's no obvious errors (to me anyway) but everytime I try to run it I get the same error.
    The code for the login page is:
    <%@page contentType="text/html" pageEncoding="UTF-8"%>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <body>
    <form action="validate.jsp" method="POST">
    email address - <input type="text" name="emailAddress">
    <br>
    password - <input type="password" name="passWord">
    <input type="submit" value="Submit">
    <input type="reset" value="Reset">
    </form>
    <br>
    new customer? To sign up <a href="new%20customer.jsp">Click here</a>
    </body>
    </html>The validation page code is:
    <%@page contentType="text/html"%>
    <%@page pageEncoding="UTF-8"%>
    <%@page import="java.util.*" %>
    <jsp:useBean id="idHandler" class="org.login" scope="request">
        <jsp:setProperty name="idHandler" property="*"/>
    </jsp:useBean>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
        <head>
            <body>
                <%
                String username=(String) session.getAttribute("username");
                String password = (String) session.getAttribute("password");
                String emailAddress = request.getParameter("emailAddress");
                String passWord = request.getParameter("passWord");
                if (idHandler.authenticate(emailAddress, passWord)) {
                    response.sendRedirect("index.jsp");
                } else {
                    response.sendRedirect("login.jsp");
                %>
        </body>
        </head>
    </html>and the java code is:
    package org;
    import java.io.IOException;
    import java.sql.Connection;
    import java.sql.PreparedStatement;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import javax.naming.NamingException;
    import javax.sql.DataSource;
    public class login {
        private DataSource getJdbcConnectionPool() throws NamingException {
            Context c = new InitialContext();
            return (DataSource) c.lookup("java:comp/env/jdbc/connectionPool");
    //method that is called from validateuser.jsp and this checks for the authentic user and
        public boolean authenticate(String emailAdd, String pass)
                throws SQLException, IOException, IOException, NamingException {
            String emailAddress = null, Password = null;
            // connection instance
            Connection connection = null;
            try {
                DataSource dataSource = getJdbcConnectionPool();
                connection = dataSource.getConnection();
                String sql = "SELECT emailAdd, pword FROM customer WHERE emailAdd='" + emailAdd + "'" + "AND pword='" + pass + "'";
                PreparedStatement ps = connection.prepareStatement(sql);
                ResultSet rs = ps.executeQuery();
                if (rs.next()) {
                    emailAddress = rs.getString("emailAdd");
                    Password = rs.getString("pword");
                if (emailAddress != null && Password != null && emailAddress.equals(emailAddress) && pass.equals(Password)) {
                    return true;
                } else {
                    return false;
            }finally  {
                // close the connection so it can be returned to
                // the connection pool then return the list           
                connection.close();
    }finally the error message I get is:
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    org.apache.jasper.JasperException
         org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:460)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    root cause
    java.lang.NullPointerException
         org.login.authenticate(login.java:56)
         org.apache.jsp.validate_jsp._jspService(validate_jsp.java:76)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    note The full stack trace of the root cause is available in the Apache Tomcat/5.5.26 logs.
    help?

    login.java:56 is:
    connection.close();right? So, it looks like the call to getJdbcConnectionPool within authenticate throws an exception and control is passed to the finally block where connection is still null, resulting in the NPE. You should probably catch any exceptions thrown by the lookup for your datasource so you can see what the "real' error is.

  • Java.lang.NullPointerException in session bean

    Hi !
    I am trying to get a Entity bean through "LocalHome.findByPrimaryKey".I get an error:java.lang.NullPointerException.
    this is session bean:
    public class LoginBean implements javax.ejb.SessionBean {
    private javax.ejb.SessionContext mySessionCtx;
    public UsersLocal usersBean = null;
    public List list_app = null,list_userapp = null,list_userappmd = null;
    public List list_userapppg = null,list_rol = null,list_rolapp = null;
    public UsersLocalHome usersLocalHome = null;
    public Hashtable getUsersLocal(String id){
    Hashtable usersLocal = null;
    UsersLocal usersLocaltmp = null;
    UsersKey primarykey = new UsersKey(id);
    System.out.println("id="+id);
    System.out.println("primarykey="+primarykey.toString());
    try {
    InitialContext initialContext = new InitialContext();
    usersLocalHome = (UsersLocalHome)initialContext.lookup("local:ejb/ejb/pingtai/UsersLocalHome");
    System.out.println("usersLocalHome="+usersLocalHome);
    try {
    usersLocaltmp = usersLocalHome.findByPrimaryKey(primarykey);
    usersLocal.put("id",id);
    usersLocal.put("mm",usersLocaltmp.getMm());
    } catch (FinderException e1) {
    } catch (NamingException e) {
    e.printStackTrace();
    System.out.println(usersLocal.get("mm"));
    return usersLocal;
    Thanks!

    Hi aniseed !
    The occurring at "usersLocaltmp =
    usersLocalHome.findByPrimaryKey(primarykey);"I would guess that your lookup for the local home is returning null. Did you check that?
    If that is the case, you might want to check your JNDI URL.

  • Java.lang.NullPointerException and ConnectionPool problem

    refresh page , problem gone
    java.lang.NullPointerException
    at Deferment.UpdatePostgraduate.getStatus(UpdatePostgraduate.java:278)
    at Deferment.UpdatePostgraduate.doPost(UpdatePostgraduate.java:175)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    at org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.java:402)
    at org.apache.catalina.servlets.InvokerServlet.doPost(InvokerServlet.java:170)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    UpdatePostgraduate.java:278
    ->while (rs.next()) {
    175-> tarCount=getStatus(userid);
    now I have
    Connection conn = null;
    CallableStatement calstat=null;
    ResultSet rs = null;
    in every of my function
    and my
    public Connection getConnection()         throws SQLException, ServletException       {           Connection conn = null;           try{           pool.getConnection();           }catch (SQLException sqle) {             throw new ServletException(sqle.getMessage());         }           return conn;       }

    private DataSource pool = null; 
        int tarCount;
        int sendMail;
        @Override
        public void init() throws ServletException {
            Context env = null;
            try {
                env = (Context) new InitialContext().lookup("java:comp/env");
                pool = (DataSource) env.lookup("jdbc/test");
                if (pool == null) {
                    throw new ServletException(
                            "'jdbc/test' is an unknown DataSource");            }
            } catch (NamingException ne) {
                throw new ServletException(ne);
          public Connection getConnection()
            throws SQLException, ServletException
              Connection conn = null;
              try{
             conn=pool.getConnection();
              }catch (SQLException sqle) {
                System.out.println("JDBC error:" + sqle.getMessage());
                sqle.printStackTrace();
              return conn;
          }then on every function I call it like
    private int getFound(String UNumber) throws Exception {
            Connection conn = null;
            CallableStatement calstat=null;
            ResultSet rs = null;
            try {
                conn = pool.getConnection();
                calstat = (CallableStatement) conn.prepareCall("{call DuplicatePost(?)}");
                calstat.setString(1, UNumber);
                rs = calstat.executeQuery();
                tarCount = 0;
                while (rs.next()) {
                    tarCount++;
            } catch (SQLException se) {
                System.out.println("JDBC error:" + se.getMessage());
                se.printStackTrace();
            } catch (Exception e) {
                System.out.println("other error:" + e.getMessage());
                e.printStackTrace();
            } finally {
                try {
                    if (rs != null) {
                        rs.close();
                    if (calstat != null) {
                        calstat.close();
                } catch (SQLException e) {
                    e.printStackTrace();
            } //end finally
            return tarCount;
        }// end function
    }// end

  • Java.lang.NullPointerException on connection

    it always prompt me this error. pls help. if need more detial info pls let me know.
    java.lang.NullPointerException
         at com.maint.support.model.Model.connect(Model.java:34)
         at com.maint.support.model.WebModel.init(WebModel.java:32)
         at org.apache.jsp.userMenu$jsp._jspService(userMenu$jsp.java:102)
    //in my initialize jsp page
    <jsp:useBean
    id="model"
    scope="session"
    class="com.maint.support.model.WebModel">
    <% model.init(application); %>
    </jsp:useBean>
    // in model.init()
    try {
    connect()
    // in Model class
    public void connect() throws SQLException,NamingException
    try {
         Context initCtx = new InitialContext();
         Context envCtx = (Context) initCtx.lookup("java:comp/env");
         DataSource ds = (DataSource) envCtx.lookup("jdbc/maint");
         Connection con = ds.getConnection();
         con.setAutoCommit(false);
    etc...........

    close u r connection in finally block
    something like this
    <%
    try{}
    catch(exception e){}
    finally{
    try
    if (stmt != null)
    stmt.close();
    catch(Exception e)
    try
    if (conn!= null)
    conn.close();
    catch (Exception e)
    %>
    regds

  • Jax-ws deployed in standalone client fails with nullpointerexception

    I have a project which has deployed successfully as a standalone client with deployed jar files wlfullclient.jar, etc. When I add the jax-ws functions that I require, the deployed client fails with a nullpointerexception that is generated from the constructor of the Service class. The project runs successfully within the JDeveloper 11.1.1.5 environment and on a weblogic 10.3 server platform, but fails when I deploy as a standalone client with the wlfullclient.jar. I'm using JDK 1.6.0_24. In testing, the error occurs when I replace the {WLHome}\server\lib\weblogic.jar entry in the classpath with the wlfullclient.jar.
    I tested from another angle by creating my jax-ws functions in a standalone deployment, and it works successfully communicates with the webservices. No additional entries on the classpath besides my deployed jar. I then added to my deployment a simple JMS context lookup:
    Hashtable ht = new Hashtable();
    ht.put(Context.INITIAL_CONTEXT_FACTORY, contextFactoryProvider);
    ht.put(Context.PROVIDER_URL, urlString);
    Context context = new InitialContext(ht);
    This test runs without error in the JDeveloper environment. As soon as I add the wlfullclient.jar in the standalone environment, I get the following exception:
    Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/xml/ws/spi/ProviderImpl
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClassCond(ClassLoader.java:630)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:614)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
    at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:305)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:246)
    at javax.xml.ws.spi.FactoryFinder.safeLoadClass(FactoryFinder.java:150)
    at javax.xml.ws.spi.FactoryFinder.newInstance(FactoryFinder.java:30)
    at javax.xml.ws.spi.FactoryFinder.find(FactoryFinder.java:90)
    at javax.xml.ws.spi.Provider.provider(Provider.java:83)
    at javax.xml.ws.Service.<init>(Service.java:56)
    Interestingly, there is a class com/sun/xml/internal/ws.spi/ProviderImpl in the {JAVA_HOME}/jre/lib/rt.jar file, and I suppose this is what is used by the jax-ws classes when the wlfullclient.jar is not present on the classpath.
    So, what is it that I am missing in how to get the jax-ws classes and the jms classes to work in the standalone deployment environment (outside of the JDeveloper environment).
    Edited by: user3653687 on Jan 9, 2012 1:38 PM
    Edited by: user3653687 on Jan 9, 2012 2:49 PM

    Here is how I solved this problem to execute the application from a jar file (using Oracle Fusion Middleware 11.1.1.5.0 distribution). The key seems to be to extract the contents of the wseeclient.zip file into the same directory as the wlfullclient.jar and ws.api_1.1.0.0.jar files and then ensure that these 2 jars are on the classpath.
    In JDeveloper, create a project that has the jms/jax-ws classes.
    Put the following text entries to form the classpath (along with other dependent jars, e.g. org.eclipse.persistence...) into a file which will be included in the manifest for the client jar. Be sure to separate entries with a space.
    lib/wlfullclient.jar lib/wseeclient.jar lib\ws.api_1.1.0.0.jar lib\org.eclipse.persistence_1.1.0.0_2-1.jar
    In the Edit Deployment Profile Properties, select Include Manifest File, specify the main class to execute, and Add the classpath file to be included in the manifest.
    Deploy the jar file.
    In a deployment area, create the directory that will contain all the classpath jars (e.g. ./lib).
    Within the directory ./lib, extract all files from wseeclient.zip (found in {weblogic home}/server/lib)
    Copy wlfullclient.jar into the directory ./lib from the {weblogic home}/server/lib
    Copy ws.api_1.1.0.0.jar into the directory ./lib from {oracle middleware home}modules
    Copy org.eclipse.persistence_1.1.0.0_2-1.jar (for jaxb support) itno the directory ./lib from {oracle middleware home}/modules
    Copy the deployed client jar to the deployment area and execute, e.g.:
    java -jar ClientTest.jar myArguments

  • NullPointerException in WebServiceProxy.getServiceAt

    Hi,
    I've created a .jsp file with the following code to access a
    WSDL file:
    WebServiceProxy ServiceProxy = WebServiceProxy.getServiceAt(new URL("http://myurl"));
    When running it under BEA WebLogic 6.1 SP1, I get this exception:
    java.lang.NullPointerException at weblogic.soap.wsdl.binding.Operation.getOutputName
    (Operation.java:39) at
    weblogic.soap.wsdl.binding.BindingOperation.populate(BindingOperation.java:50)
    at weblogic.soap.wsdl.binding.Binding.populate(Binding.java:48)
    at weblogic.soap.wsdl.binding.Definition.populate(Definition.java:116)
    at weblogic.soap.WebServiceProxy.getServiceAt(WebServiceProxy.java:176)
    at weblogic.soap.http.SoapContext.lookup(SoapContext.java:76)
    at javax.naming.InitialContext.lookup(InitialContext.java:350)
    at jsp_servlet._soap.__createservice._jspService(__createservice.java:97)
    at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:265)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:200)
    at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2456)
    at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2039)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
    I tried a sample code found on the BEA web site, and I still got the same issue.
    Can anyone help me?
    Thanks,
    Miguel

    Miguel,
    I don't know what "http://myurl" points to, but I'm assuming whatever it is, it
    is running WebLogic Server 6.1. If this is true, your code should looks something
    like:
    <%
    CodecFactory factory = CodecFactory.newInstance();
    factory.register(new SoapEncodingCodec());
    factory.register(new LiteralCodec());
    WebServiceProxy webserviceproxy = WebServiceProxy.getServiceAt(wsdlURL, factory,
    true);
    // use webserviceproxy to "do yo' thang!"
    %>
    Notice that I didn't do the "JNDI lookup hat dance" here. Also, I used the getServiceAt(URL,
    CodecFactory, boolean) call, not getServiceAt(URL), which blows up because it
    calls getServiceAt(URL, CodecFactory, boolean) method with (URL,null,false).
    If this is what you have, and it doesn't work, you probably have to do the "JNDI
    lookup hat dance", from inside your JSP :-)
    The code should look like:
    <%
    CodecFactory factory = CodecFactory.newInstance();
    factory.register(new SoapEncodingCodec());
    factory.register(new LiteralCodec());
    Properties h = new Properties();
    h.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.soap.http.SoapInitialContextFactory");
    h.put(Context.URL_PKG_PREFIXES, "");
    h.put("weblogic.soap.encoding.factory", factory);
    h.put("weblogic.soap.verbose", true);
    Context context = new InitialContext(h);
    WebServiceProxy webserviceproxy = (WebServiceProxy)context.lookup(wsdlURLString);
    // use webserviceproxy to "do yo' thang!"
    %>
    HTH,
    Mike Wooten
    "Miguel Juston" <[email protected]> wrote:
    >
    Hi,
    I've created a .jsp file with the following code to access a
    WSDL file:
    WebServiceProxy ServiceProxy = WebServiceProxy.getServiceAt(new URL("http://myurl"));
    When running it under BEA WebLogic 6.1 SP1, I get this exception:
    java.lang.NullPointerException at weblogic.soap.wsdl.binding.Operation.getOutputName
    (Operation.java:39) at
    weblogic.soap.wsdl.binding.BindingOperation.populate(BindingOperation.java:50)
    at weblogic.soap.wsdl.binding.Binding.populate(Binding.java:48)
    at weblogic.soap.wsdl.binding.Definition.populate(Definition.java:116)
    at weblogic.soap.WebServiceProxy.getServiceAt(WebServiceProxy.java:176)
    at weblogic.soap.http.SoapContext.lookup(SoapContext.java:76)
    at javax.naming.InitialContext.lookup(InitialContext.java:350)
    at jsp_servlet._soap.__createservice._jspService(__createservice.java:97)
    at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:265)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:200)
    at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2456)
    at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2039)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
    I tried a sample code found on the BEA web site, and I still got the
    same issue.
    Can anyone help me?
    Thanks,
    Miguel

Maybe you are looking for

  • Tell me it's not true... only 1 app at a time???

    I never even thought to ask before purchasing. Seemed like a no-brainer, like not bothering to ask if your new car comes with a steering wheel. There's no way that Apple would have omitted something so basic as multitasking. There's got to be a way.

  • Slideshow

    Slideshow 60 images with 4 buttons. I am looking for some help or guidance on something I would hope would be easy to do. I have 60 images 600x400px that I would like to play in a slide show. I want to have 4 buttons. ButtonA= previous image ButtonB

  • P.O Pricing Condition Record

    Hi Which Tcode to maintain the Purchase order condition record (Specifically for the Tax Condition). Rgds RG.

  • LabVIEW FPGA: An internal software error in the LabVIEW FPGA Module has occurred

    Hi, I am trying to build a LabView FPGA VI. During compilation, I always get error stating "LabVIEW FPGA:  An internal software error in the LabVIEW FPGA Module has occurred.  Please contact National Instruments technical support at ni.com/support".

  • ALV: Filter Dates

    Hello, I use ALV report. I have a column type DATE. I use edit_mask to PDATE in the field catalog. The problem is that in the ALV report when I filter this column it sometimes gives an error the 'Date is invalid' and it doesn't filter. Does any one k