• 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

exception is thrown "mydb is not bound"(needs urgent help)

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
We r three students and our final project is a BPM(Business peocess Management)system.

BPM is actually a workflow system(managing the business processes)and all the rules and constraints are applied from the Rule Management System.
we have started the implementation, and therefore we need some help related to the implementation.
We r using EJB2.0 with JBuilder9, JBoss3.2 as the application server and tomcate as the web server.

problem:
I want to create manual database connection using DataSource,
I am using mysql and database name is mydb.
I have done all the reqiured configration of mysql with Joss and it is working.
After getting the initial context, when i try to lookup the datasource, exception is thrown "mydb is not bound"
Initial context is correct because i have tried entity beans asd it works well.
code is
////////////////////////////
Hashtable contextValues = new Hashtable();
contextValues.put(Context.PROVIDER_URL, "jnp://loopback:1099");
contextValues.put(Context.INITIAL_CONTEXT_FACTORY,
"org.jnp.interfaces.NamingContextFactory");
Context context = new InitialContext(contextValues);
context.lookup("java://mydb");

/////////////////////////////

Kindly help me if u find time,

Regards
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Adn how did you define your datasource, in the XXX-ds.xml file you can define the JNDI name, and use that name as the lookup.

Mark
 
reply
    Bookmark Topic Watch Topic
  • New Topic