• Post Reply Bookmark Topic Watch Topic
  • New Topic

[WSAD] jndi problem with java client  RSS feed

 
Raphas theMan
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • 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 ]
 
siva kumar
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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
  • 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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!