Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Scout » Websphere - access datasource in server start(startup code on wrong thread)
Websphere - access datasource in server start [message #1270855] Thu, 13 March 2014 16:56
Rene Eigenheer is currently offline Rene EigenheerFriend
Messages: 109
Registered: July 2009
Senior Member
Dear all

Deploying a scout application to IBM Websphere (8.5) I face an error, when I try to connect via JNDI to a datasource out of the ServerApplication class.

The error I get is the following:

Caused by: javax.naming.ConfigurationException: A JNDI operation on a "java:" name cannot be completed because the server runtime is not able to associate the operation's thread with any J2EE application component. This condition can occur when the JNDI client using the "java:" name is not executed on the thread of a server application request. Make sure that a J2EE application does not execute JNDI operations on "java:" names within static code blocks or in threads created by that J2EE application. Such code does not necessarily run on the thread of a server application request and therefore is not supported by JNDI operations on "java:" names. [Root exception is javax.naming.NameNotFoundException: Name comp/env/jdbc not found in context "java:".]

I'll guess that Scout starts the ServerAppliccation on a new Thread - correct?

Is there a possibility to add some startup code somewhere on a scout extension which is executed on a thread which makes Websphere happy to connect to JNDI?

TIA
Rene
Previous Topic:Proposal: additional field layout in group boxes
Next Topic:Proposal: ToolButtons in a form
Goto Forum:
  


Current Time: Tue Apr 16 17:33:22 GMT 2024

Powered by FUDForum. Page generated in 0.33036 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top