Skip to main content
 
developerWorks
AIX and UNIX
Information Mgmt
Lotus
New to Lotus
Products
How to buy
Downloads
Live demos
Technical library
Training
Support
Forums & community
Events
Rational
Tivoli
WebSphere
Java™ technology
Linux
Open source
SOA and Web services
Web development
XML
My developerWorks
About dW
Submit content
Feedback



developerWorks  >  Lotus  >  Forums & community  >  Lotus Expeditor Forum

Lotus Expeditor Forum

developerWorks

  

Sign in to participate PreviousPrevious NextNext


Arunagiri K 14.Apr.09 06:47 AM a Web browser
Client for Devices 6.2 Windows XP


Hi All,

I am using Lotus XPD Client For Devices.
When I am trying to connect with Derby through JNDI, I am getting following exception.

An exception occurred when looking up SampleDataSourceDerby
javax.naming.NoInitialContextException: Failed to create InitialContext using factory specified in hashtable {java.naming.factory.initial=com.ibm.pvc.jndi.provider.java.InitialContextFactory}. The stack trace of the root exception is: java.lang.ClassCastException: com.ibm.pvc.jndi.provider.java.InitialContextFactory incompatible with javax.naming.spi.InitialContextFactory
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:231)
at javax.naming.InitialContext.initializeDefaultInitCtx(InitialContext.java:237)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:262)
at javax.naming.InitialContext.internalInit(InitialContext.java:208)
at javax.naming.InitialContext.<init>(InitialContext.java:148)
at com.test.ercp.gsl.composites.Jndi.lookupDataSource(Jndi.java:135)
at com.test.ercp.gsl.composites.Jndi.run(Jndi.java:51)
at com.test.ercp.gsl.composites.LoginComposite$1.widgetSelected(LoginComposite.java:74)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:89)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:477)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1550)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1405)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1581)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1545)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:270)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:143)
at com.ibm.ercp.hworkbench.eWorkbench.run(Unknown Source)
at java.lang.reflect.AccessibleObject.invokeL(AccessibleObject.java:213)
at java.lang.reflect.Method.invoke(Method.java:278)
at org.eclipse.equinox.internal.app.EclipseAppContainer.callMethodWithException(EclipseAppContainer.java:574)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:195)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:382)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at java.lang.reflect.AccessibleObject.invokeL(AccessibleObject.java:213)
at java.lang.reflect.Method.invoke(Method.java:278)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:549)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
at org.eclipse.equinox.launcher.Main.run(Main.java:1236)
at org.eclipse.equinox.launcher.Main.main(Main.java:1212)

This is my code.

Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY, "com.ibm.pvc.jndi.provider.java.InitialContextFactory");

InitialContext context = new InitialContext(env);

DataSource ds = (DataSource) context.lookup("SampleDataSourceDerby");


This is my plugin.xml extension

<extension
point="com.ibm.pvc.jndi.provider.java.binding">
<binding
jndi-name="SampleDataSourceDerby"
objectFactory-id="com.ibm.pvc.jndi.provider.java.GenericObjectFactory">
</binding>
</extension>
<extension
point="com.ibm.pvc.jndi.provider.java.genericobject">
<object
class="org.apache.derby.jdbc.EmbeddedDataSource"
jndi-name="SampleDataSourceDerby">
<method
name="setDatabaseName">
<method-parameter
type="String"
value="${_workspace}/jndiSampleDatabaseDerby">
</method-parameter>
</method>
</object>
</extension>

What is the wrong in the code? How can I fix this?

Thanks and Regards
-arun






How to connect with Derby in Lotus ... (Arunagiri K 14.Apr.09)
. . RE: How to connect with Derby in Lo... (John Ormerod 14.Apr.09)
. . . . RE: How to connect with Derby in Lo... (Arunagiri K 15.Apr.09)
. . . . . . RE: How to connect with Derby in Lo... (John Ormerod 15.Apr.09)
. . . . . . . . RE: How to connect with Derby in Lo... (Arunagiri K 15.Apr.09)
. . . . . . . . . . RE: How to connect with Derby in Lo... (John Ormerod 16.Apr.09)





  Document options
Print this pagePrint this page

 Search this forum

  Forum views and search
Date (threaded)
Date (flat)
With excerpt
Author
Category
Platform
Release
Advanced search

 Sign In or Register
Sign in
Forgot your password?
Forgot your user name?
Create new registration

 RSS feedsRSS
All forum posts RSS
All main topics RSS
More Lotus RSS feeds

Resources

 Resources
Forum use and etiquette
Native Notes Access
Web site Feedback

Lotus Support

 Lotus Support
IBM Support Portal - Lotus software
Lotus Support documents
Lotus support by product
Lotus support downloads
Lotus support RSS feeds

Wikis

 Wikis
IBM Composite Applications
IBM Mashup Center
IBM Connections
IBM Docs
IBM Forms
IBM Mobile Connect
IBM Sametime
IBM SmartCloud for Social Business
IBM Web Experience Factory
Lotus Domino
Lotus Domino Designer
Lotus Expeditor
Lotus Foundations
Lotus iNotes
Lotus Instructor Community Courseware
Lotus Notes
Lotus Notes & Domino Application Development
Lotus Notes Traveler
Lotus Protector
Lotus Quickr
Lotus Symphony
IBM Web Content Manager
WebSphere Portal

Lotus Forums


 Lotus Forums
Notes/Domino 9.0
Notes/Domino 8.5 + Traveler
Notes/Domino XPages development forum
Notes/Domino 8
Notes/Domino 6 and 7
Notes/Domino 4 and 5
IBM Connections
IBM Forms
IBM Mobile Connect
IBM Sametime
IBM SmartCloud Notes
IBM SmartCloud Meetings
IBM Web Content Manager
Lotus Domino Document Manager
Lotus e-learning
Lotus Enterprise Integration
Lotus Expeditor
Lotus Protector
Lotus Quickr
Lotus SmartSuite
Lotus Symphony
Lotus Symphony Developer Toolkit Support
Lotus Workflow