• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

[WSAD] jndi problem with java client

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi everybody,

I have an application that has EJBs and a web interface. I'm trying to build a java enterprise application that can use the same datasource as the web interface.
In order to do that I have created references to my datasource (its jndi name is jdbc/datasource) in application-client.xml
However, when I try lauching the client I get this error message before the program is even executed:



The client continues to launch and I get the expected exception : Name comp/env/jdbc not found in context "java:".

Looking for WSCL0220E on the web gives me this information :



my values are the same, I don't understand. Did anyone experience this kind of problem?
[ November 18, 2004: Message edited by: Raphas theMan ]
 
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
while running the server wether the datasource is binded or not.

if yes then in application-client.xml u have added the datasource as

resource ref or resource environment ref.
 
Raphas theMan
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

thanks for your help siva! I have changed my resource definition from normal ton environment reference. Therefore I get rid of the warning message.
Unfortunately, now I get a security error that the datasource can't be created :


This problem is referenced here :
http://www-1.ibm.com/support/docview.wss?rs=203&context=SW000&q1=CannotInstantiateObjectException&uid=swg21170003&loc=en_US&cs=utf-8&lang=en

I haven't been able to solution this problem yet.
 
siva kumar
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You just check the declaration in web.xml

<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
 
Raphas theMan
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have the same thing in web.xml :

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">


it seems I can't obtain a reference to the datasource from outside the container (my standalone client). The server and the application are using WSAD 5.1 JRE.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic