Problem  of  javafx2   remote  call  ejb3 and jndi data source

netbean7.2 javafx2 glassfish3.1.2.2
My javafx2 project through jndi remote access the ejb and data source,
I select to run as an independent in netbeans ,without problems!
However, When I select it to run as the web start. Or in the browser inside always error!
Want a lot of ways it is not solved, especially to help!
Caused by: java.lang.ClassNotFoundException: com.sun.enterprise.naming.SerialInitContextFactory
at sun.plugin2.applet.Plugin2ClassLoader $ 2.run (Unknown Source)
at java.security.AccessController.doPrivileged (Native Method)
at sun.plugin2.applet.Plugin2ClassLoader.findClassHelper (Unknown Source)
at sun.plugin2.applet.JNLP2ClassLoader.findClass (Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass0 (Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass (Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass (Unknown Source)
at java.lang.ClassLoader.loadClass (ClassLoader.java: 356)
at java.lang.Class.forName0 (Native Method)
at java.lang.Class.forName (Class.java: 264)
at com.sun.naming.internal.VersionHelper12.loadClass (VersionHelper12.java: 63)
at javax.naming.spi.NamingManager.getInitialContext (NamingManager.java: 671)
... 47 more

The program has been signed (unlimited access). This is jvm tracking information, What can I do?
java.io.FileNotFoundException: \D:\eejj\JavaFXApplication18\dist\modules\jsr173_1.0_api.jar
     at com.sun.deploy.security.DeployURLClassPath$JarLoader.getJarFile(Unknown Source)
     at com.sun.deploy.security.DeployURLClassPath$JarLoader.access$1000(Unknown Source)
     at com.sun.deploy.security.DeployURLClassPath$JarLoader$1.run(Unknown Source)
     at java.security.AccessController.doPrivileged(Native Method)
     at com.sun.deploy.security.DeployURLClassPath$JarLoader.ensureOpen(Unknown Source)
     at com.sun.deploy.security.DeployURLClassPath$JarLoader.<init>(Unknown Source)
     at com.sun.deploy.security.DeployURLClassPath$3.run(Unknown Source)
     at java.security.AccessController.doPrivileged(Native Method)
     at com.sun.deploy.security.DeployURLClassPath.getLoader(Unknown Source)
     at com.sun.deploy.security.DeployURLClassPath.getLoader(Unknown Source)
     at com.sun.deploy.security.DeployURLClassPath.access$000(Unknown Source)
     at com.sun.deploy.security.DeployURLClassPath$1.next(Unknown Source)
     at com.sun.deploy.security.DeployURLClassPath$1.hasMoreElements(Unknown Source)
     at java.net.URLClassLoader$3$1.run(Unknown Source)
     at java.net.URLClassLoader$3$1.run(Unknown Source)
     at java.security.AccessController.doPrivileged(Native Method)
     at java.net.URLClassLoader$3.next(Unknown Source)
     at java.net.URLClassLoader$3.hasMoreElements(Unknown Source)
     at sun.misc.CompoundEnumeration.next(Unknown Source)
     at sun.misc.CompoundEnumeration.hasMoreElements(Unknown Source)
     at com.sun.naming.internal.VersionHelper12$InputStreamEnumeration$1.run(Unknown Source)
     at java.security.AccessController.doPrivileged(Native Method)
     at com.sun.naming.internal.VersionHelper12$InputStreamEnumeration.getNextElement(Unknown Source)
     at com.sun.naming.internal.VersionHelper12$InputStreamEnumeration.hasMore(Unknown Source)
     at com.sun.naming.internal.ResourceManager.getApplicationResources(Unknown Source)
     at com.sun.naming.internal.ResourceManager.getInitialEnvironment(Unknown Source)
     at javax.naming.InitialContext.init(Unknown Source)
     at javax.naming.InitialContext.<init>(Unknown Source)
java.io.FileNotFoundException: \D:\eejj\JavaFXApplication18\dist\lib\grizzly-websockets.jar
java.io.FileNotFoundException: \D:\eejj\JavaFXApplication18\dist\lib\grizzly-http-ajp.jar
eg.....(<font color=red > a lot of *.jar find nothing </font> )
java.lang.RuntimeException: java.lang.ExceptionInInitializerError
     at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(GlassViewEventHandler.java:251)
     at com.sun.glass.ui.View.handleMouseEvent(View.java:528)
     at com.sun.glass.ui.View.notifyMouse(View.java:922)
     at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
     at com.sun.glass.ui.win.WinApplication.access$100(WinApplication.java:29)
     at com.sun.glass.ui.win.WinApplication$2$1.run(WinApplication.java:67)
     at java.lang.Thread.run(Unknown Source)
<font color=red >
Caused by: java.lang.ExceptionInInitializerError
</font>
     at com.sun.enterprise.module.single.SingleModulesRegistry.<init>(SingleModulesRegistry.java:79)
     at com.sun.enterprise.module.single.SingleModulesRegistry.<init>(SingleModulesRegistry.java:67)
     at com.sun.enterprise.module.single.StaticModulesRegistry.<init>(StaticModulesRegistry.java:66)
     at org.glassfish.internal.api.Globals.getStaticHabitat(Globals.java:84)
     at com.sun.enterprise.naming.impl.SerialInitContextFactory.<init>(SerialInitContextFactory.java:236)
     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
     at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
     at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
     at java.lang.reflect.Constructor.newInstance(Unknown Source)
     at java.lang.Class.newInstance0(Unknown Source)
     at java.lang.Class.newInstance(Unknown Source)
     at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
     at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
     at javax.naming.InitialContext.init(Unknown Source)
     at javax.naming.InitialContext.<init>(Unknown Source)
     at javafxapplication18.NewClass.v(NewClass.java:51)
     at javafxapplication18.JavaFXApplication18$1.handle(JavaFXApplication18.java:50)
     at javafxapplication18.JavaFXApplication18$1.handle(JavaFXApplication18.java:42)
     at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:69)
     at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:217)
     at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:170)
     at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:38)
     at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:37)
     at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:92)
     at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:35)
     at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:92)
     at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:53)
     at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:28)
     at javafx.event.Event.fireEvent(Event.java:171)
     at javafx.scene.Node.fireEvent(Node.java:6863)
     at javafx.scene.control.Button.fire(Button.java:179)
     at com.sun.javafx.scene.control.behavior.ButtonBehavior.mouseReleased(ButtonBehavior.java:193)
     at com.sun.javafx.scene.control.skin.SkinBase$4.handle(SkinBase.java:336)
     at com.sun.javafx.scene.control.skin.SkinBase$4.handle(SkinBase.java:329)
     at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:64)
     at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:217)
     at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:170)
     at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:38)
     at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:37)
     at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:92)
     at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:35)
     at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:92)
     at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:35)
     at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:92)
     at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:53)
     at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:33)
     at javafx.event.Event.fireEvent(Event.java:171)
     at javafx.scene.Scene$MouseHandler.process(Scene.java:3324)
     at javafx.scene.Scene$MouseHandler.process(Scene.java:3164)
     at javafx.scene.Scene$MouseHandler.access$1900(Scene.java:3119)
     at javafx.scene.Scene.impl_processMouseEvent(Scene.java:1559)
     at javafx.scene.Scene$ScenePeerListener.mouseEvent(Scene.java:2261)
     at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(GlassViewEventHandler.java:228)
     ... 6 more
<font color=red>
Caused by: java.security.AccessControlException: access denied ("java.util.PropertyPermission" "java.class.path" "read")
</font>
     at java.security.AccessControlContext.checkPermission(Unknown Source)
     at java.security.AccessController.checkPermission(Unknown Source)
     at java.lang.SecurityManager.checkPermission(Unknown Source)
     at java.lang.SecurityManager.checkPropertyAccess(Unknown Source)
     at java.lang.System.getProperty(Unknown Source)
     at com.sun.enterprise.module.single.ProxyModuleDefinition.<clinit>(ProxyModuleDefinition.java:185)
     ... 59 more
帖子经 user7993481编辑过
帖子经 user7993481编辑过
帖子经 user7993481编辑过
帖子经 user7993481编辑过

Similar Messages

  • I used firefox 3.6.14 on windows 7 x64 (firxfox x32). I found a problem when I develop my website and alert data or value via javascript , firefox hang (not response) every time. What's happend? How to solve is problem?

    I used firefox 3.6.14 on windows 7 x64 (firxfox x32). I found a problem when I develop my website and alert data or value via javascript , firefox hang (not response) every time. What's happend? How to solve is problem?
    Thank you for help
    Lohkaeo

    Oops - for some reason, this problem now seems to have gone away. May have had something to do with Flash. I'll keep my fingers crossed.

  • Referencing JNDI data source: Tomcat 6 vs WebSphere 6.1

    Hi,
    I've noticed a problem whereby there is a difference in the way I have to specify my JNDI data source depending on the application server I deploy it on.
    In Tomcat my code specifies "java:comp/env/DB_NAME" and this works fine.
    This doesn't work though in WebSphere and I have to remove the "java:comp/env" prefix to get it to work.
    Is there a common solution for this whereby my code/properties can specify the same JNDI value?
    Thanks

    jwenting wrote:
    mycoffee wrote:
    ted_hankey wrote:
    Hi,
    I've noticed a problem whereby there is a difference in the way I have to specify my JNDI data source depending on the application server I deploy it on.
    In Tomcat my code specifies "java:comp/env/DB_NAME" and this works fine.
    This doesn't work though in WebSphere and I have to remove the "java:comp/env" prefix to get it to work.
    Is there a common solution for this whereby my code/properties can specify the same JNDI value?
    ThanksShould not be different
    wrong. There's nothing in any specification stating that jndi resource names should be identical between platforms.
    On weblogic for example it would be jdbc/DB_NAME :)No
    Tomcat, websphere or weblogic are not different in that term
    The differences are about configuration of the servers. If the servers are configured the same, it should be the same. (Check all the config xml files)
    This post is more clear
    http://www.theserverside.com/discussions/thread.tss?thread_id=42158
    I wrote my code like this
    Context intC = new InitialContext();
    Context c = (Context )intC.lookup("java:comp/env");
    DataSource ds = (DataSource)c.lookup("myDataBase");
    con = ds.getConnection();and it works for Tomcat + Websphere (did not try on Weblogic yet but believe it should be OK)

  • ADF BC standalone app and JDBC data source

    Hi,
    I have created a small ADF BC (swing) application that is not using ANY application server. It's just a small rich client app. It's using a table on an Oracle database. In JDeveloper I have set the Connection Type in the AppModule to JDBC URL and thsi works just fine.
    However, using that method makes it impossible to deploy the app sinice the JDBC URL is hardcoded. I thought changing the Connection Type to JDBC DataSource would solve my problem. But now I get the message that the JNDI data source could not be found.
    What do I need to do to make this work? I just want to have the app not being bound to a specific database/host.
    Thank you for any help!
    /Bruno
    (oracle.jbo.common.ampool.ApplicationPoolException) JBO-30003: The application pool (oracle.model.AppModuleLocal) failed to checkout an application module due to the following exception:
    ----- LEVEL 1: DETAIL 0 -----
    (oracle.jbo.JboException) JBO-29000: Unexpected exception caught: oracle.jbo.DMLException, msg=JBO-27200: JNDI failure. Unable to lookup Data Source at context FWRK
    ----- LEVEL 2: DETAIL 0 -----
    (oracle.jbo.DMLException) JBO-27200: JNDI failure. Unable to lookup Data Source at context FWRK
    ----- LEVEL 3: DETAIL 0 -----
    (javax.naming.NoInitialContextException) Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial

    Hi,
    as mentioned in the original post there is no application server involved. It's a standalone rich client application which is running locally on the client computer. It just needs to read some data from a database.
    /Bruno

  • SQL LOADER , EXTERNAL  TABLE and ODBS DATA SOURCE

    hello
    Can any body help loading data from dbase file .dbt to an oracle 10g table.
    I tried last day with SQL LOADER, EXTERNAL table , and ODBC data source.
    Why all of these utilities still failing to solve my problem ?
    Is there an efficient way to reach this goal ?
    Thanks in advance

    export the dbase data file to text file,
    then you have choice of using either sql loader or external table option to use.
    regards

  • JNDI data source

    I'm trying to use a JNDI data source in CF 10. We used to do it in CF 8 in the JRun admin, and was able to use data sources across coldFusion and java code. Any ideas on how to make it work in CF 10? I've tried several online resources, setting up a resource in Context.xml:
      <Resource name="mydatasource" auth="Container" type="javax.sql.DataSource"
                   maxActive="100" maxIdle="30" maxWait="10000"
                   username="myuser" password="mypass" driverClassName="macromedia.jdbc.MacromediaDriver"
                   url="jdbc:macromedia:sqlserver://127.0.0.1:1433;databaseName=mydb;SendStringParametersAsU nicode=false;SendStringAsUnicode=false"/>
    then a resource-ref in web.xml
    <resource-ref>
          <description>DB Connection</description>
          <res-ref-name>mydatasource</res-ref-name>
          <res-type>javax.sql.DataSource</res-type>
          <res-auth>Container</res-auth>
                </resource-ref>
    but I'm getting errors
    java.lang.IllegalArgumentException: Cannot convert value of type [jav
    a.lang.String] to required type [javax.sql.DataSource] for property 'dataSource'
    : no matching editors or conversion strategy found

    If you want to turn your application into a provider, refer to the Developer's Guide at http://docs.sun.com/source/816-6362-10/index.html

  • Jndi data source references at deployment time

    hi,
    i have been thinking and trying for days now, so any hint is greatly appreciated.
    we have an enterprise java application with adf faces, bc4j and jpa all in one ear which runs on weblogic 10.3. we want several instances of the same application running on the same weblogic server, with different context-root's and database connections. what I don't know how to do is how I could create an application-wide jndi link to a jdbc data source at deployment time - because the data source jndi name is listed in bc4j application modules and persistence.xml - so one global jndi link for the application would be great.
    e.g.
    jndi names of data sources installed in the weblogic server:
    jdbc/customer1
    jdbc/customer2
    deployment1:
    context-path: /app-customer1
    local data source name: java:comp/env/jdbc/customer
    deployment 2:
    context-path: /app-customer2
    local data source name: java:comp/env/jdbc/customer
    so the goal is, at deployment time, to create a link to jdbc/customer1 for the first deployment and jdbc/customer2 for the second deployment using .. ?
    thank you very much,
    matt

    hi Anand,
    thank you for your answer. It is indeed a part of the solution I would need to apply - resource references in web.xml to have the bc4j application modules reference a jndi data source under java:comp/env. The other part to it is that we have an ejb jar in our jee application, built with hibernate and a persistence.xml file (yes we are crazy enough to use both bc4j and jpa in one ear). The jndi name of the data source specified in persistence.xml would not pick up a resource reference specified in web.xml would it - actually i should just try this out. So that's the 2nd part of the solution.
    cheers,
    Matt

  • Posting date in AFRU and 2lis_04_p_arbpl data source is not matching

    Hi Experts,
    We are facing an issue with 2LIS_04_P_ARBPL data source, posting date in AFRU table and in data source is not matching.
    For example: we booked an activity confirmation of value 100 on 01.01.2015 posting date, Counter 1, Operation 10
    For the same operation another counter is confirmed on 01.02.2015 posting date.
    So, in AFRU table:
    Prod Order     Operation     Confirmation Number     Counter     PostingDate     Activity
    1001               10               8001                             1              01.01.2015       100
    1001               10               8001                             2              01.02.2015       0
    In 2lis_04_p_arbpl data source, counter field is missing due to which only 1 record is coming which is:
    Prod Order     Operation     Confirmation Number     Counter     PostingDate     Activity
    1001               10               8001                             1              01.02.2015       100
    In data source, activity of value 100 is coming on 01.02.2015 date instead in AFRU table it is booked on 01.01.2015 posting date by which we are unable to match the value in query which is based on posting date.
    Please help on this.
    Thanks,
    Sameer

    Hi Sameer,
    Please check on which date the production order has status as "completed".
    It could be on 01.02.2015.
    Thanks,
    Vimal

  • Difference between 0FI_AP_30 and 0FI_AP_4 Data source

    HI,
    What is the difference between 0FI_AP_30 and 0FI_AP_4 Data source.
    Thanks in advance

    Hi,
    In addition to above differences. Below is the functional difference between 0FI_AP_30 & 0FI_AP_4:
    0FI_AP_4 gives you accounts payable line items in your report. Here GL account shows the balances of particular types of  vendors/payables to which that particular GL account is been assigned.
    And If subledger is activated in ECC, then by using 0FI_AP_30 you can get the break up of that particular GL balance according to vendors.
    To make use of datasource 0FI_AP_30, subledger accounting must be activated in ECC.
    Regards,
    Pradip

  • BOXI3.0: Universe and Local Data Source Selection

    Hi all. I am Alias.
    I have one question. For the full XI3.0 installation, one of the products is Web Intelligence Rich Client.
    In Web Intelligence Rich Client, we can have Data Source Selection which is Universe and Local Data Source. But for Web Intelligence/InfoView, we can only select universe, or maybe canu2026 I need to explore more but still could not find it.
    Hope you guys can help me on this matter.
    Best regards,
    Alias

    Hi Jacques.
    Thanks for the link.
    WRC we need to install for every user desktop right? But for Webi/inforview we only install at server.
    In term of licensing, how it works?
    Regards,
    Alias

  • OBIEE report with HFM and Essbase Data source

    Hi All,
    Just want your though can we get the data from HFM and Essbase data source in a single report i.e. for some account i want to show budget data from HFM and Forecast data from essbase in a single OBIEE report? If yes how can we model both Data source in rpd?

    It possible but the challenge is to try to align the account hierarchy and the entity hierarchy between Essbase and HFM. HFM is looking the data at a top side consolidation level where planning will have more granular details to forecast correctly. The best solution is either to build a custom table in to import both sources, or to use HFM data into Essbase, or to use EPMA. The best in class solution stays to align hierarchies and metadata across applications. We implemented BI Financials Dashboard for the General Ledger, built a custom Dashboard connected in Real Time to Planning and are installing OFMA to connect HFM. Once done, you can rationalize metadata if not done before and start to link the different data into single reports. You will also have to ensure the data is refreshed at the same time to avoid inconsistency.

  • MM and SD data source

    <Moderator Message: First place to start for you should be the [help|http://help.sap.com]. In case you have some specific issues come back and ask>
    HI,
        please help me what are all master and transaction data source for MM and SD
    Regards,
    siva.
    Edited by: Siegfried Szameitat on Feb 19, 2009 11:26 AM

    Hi
    for purchasing
    2lis_02_cdr
    2lis_02_hdr
    2lis_02_itm
    2lis_02_scl
    2lis_02_scn
    2lis_02_scr
    for FI
    FI_AP
    0FI_AP_1 , 0FI_AP_3, 0FI_AP_4, 0FI_AP_6, 0FI_AP_7.       
    FI_AR
    0FI_AR_1, 0FI_AR_3, 0FI_AR_4, 0FI_AR_5, 0FI_AR_6, 0FI_AR_7, 0FI_AR_8,0FI_AR_9, 0FI_AR_10
    FI_GL
    0FI_GL_1, 0FI_GL_2, 0FI_GL_4, 0FI_GL_7, 0FI_GL_10

  • How to create JNDI data source name in Tomcat 6.0.18 server?

    Hai,
    How to create JNDI data source name in Tomcat 6.0.18 server?
    Regards,
    MariMuthu.A

    [http://google.com/search?q=jndi+site:tomcat.apache.org+6.0]

  • Difference between SP datasource and object data source

    Hi,
    I have a requirement  to query large list and display data in a view similar to SPlist view(Including Filtering, Sorting, Paging).
    I have implemented the same using SPGridview and Object data source.
    Can you please comment on the performance of the spgridview's(soritng, filterting and paging) using object data source and spdatasource.
    Thanks,
    Sunitha

    Hi,
    Kindly Prefer SPDatasource over Object datasource
    http://www.sharepointnutsandbolts.com/2008/06/spdatasource-every-sharepoint-developer.html
    Please remember to click 'Mark as Answer' on the answer if it helps you

  • JNDI, Data Source and Tomcat

    Hi,
    I am using Tomcat 4.1
    I am using JDBC to connect to to SQL 2000.
    In the past I use JDBC 2.0 standsrd package to connect to it and it was fine.
    Now, for some reason, I need to use DataSource via JNDI.
    Here is my server.xml
    <Resource name="jdbc/SQLNorthwind" scope="Shareable" type="javax.sql.DataSource"/>
    <ResourceParams name="jdbc/SQLNorthwind">
    <parameter>
    <name>validationQuery</name>
    <value>select * from Products</value>
    </parameter>
    <parameter>
    <name>url</name> <value>jdbc:microsoft:sqlserver://W2KSERVER1:1433;DatabaseName=Northwind</value>
    </parameter>
    <parameter>
    <name>password</name>
    <value>george</value>
    </parameter>
    <parameter>
    <name>maxActive</name>
    <value>20</value>
    </parameter>
    <parameter>
    <name>maxWait</name>
    <value>5000</value>
    </parameter>
    <parameter>
    <name>driverClassName</name>
    <value>com.microsoft.jdbcx.sqlserver.SQLServerDataSource</value>
    </parameter>
    <parameter>
    <name>username</name>
    <value>george</value>
    </parameter>
    <parameter>
    <name>maxIdle</name>
    <value>2</value>
    </parameter>
    </ResourceParams>
    It was generated by the Tomcat admin tools via the web browser.
    It is my web.xml
    <servlet>
    <servlet-name>JNDIDatabase</servlet-name>
    <display-name>JNDIDatabase</display-name>
    <description>JNDIDatabase</description>
    <servlet-class>com.testing.servlet.jdbc.jndi.JNDIDatabase</servlet-class>
    </servlet>
    Now here is my servlet source code for connection testing
    private Connection conn;
    private Statement stmt;
    private ResultSet rs;
    public void init(ServletConfig config) throws ServletException {
    super.init(config);
    try {
    Context ctx = new InitialContext();
    DataSource ds = (DataSource) ctx.lookup("jdbc/SQLNorthwind");
    conn = ds.getConnection("george", "george");
    } catch(NamingException e) {
    this.log("Naming exception in JNDIDatabase init", e);
    e.printStackTrace();
    } catch(SQLException e) {
    this.log("SQL exception in JNDIDatabase init", e);
    e.printStackTrace();
    The problem is no connection is obtained in init(). So what's wrong with my setting/code? Please help me to fix my setting/code.
    Thank you in advance.

    Follow what you said, no more NamingException. Thanks, Dave.
    now I receive another error.....
    2002-10-18 00:34:12 JNDIDatabase: SQL exception in JNDIDatabase init
    java.sql.SQLException: Cannot load JDBC driver class 'com.microsoft.jdbcx.sqlserver.SQLServerDataSource'
         at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:529)
         at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:329)
         at hk.com.scope.servlet.jdbc.jndi.JNDIDatabase.init(JNDIDatabase.java:37)
         at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:924)
         at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:658)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2388)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:405)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:380)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:508)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:533)
         at java.lang.Thread.run(Thread.java:536)
    I am sure msutil.jar, mssqlserver.jar and msbase.jar are stored in /WEB-INF/lib directory and using them in standard JDBC is OK!
    This is an extraction from MS JDBC help file.....
    The data source class for the SQL Server driver is:
    com.microsoft.jdbcx.sqlserver.SQLServerDataSource
    For information on SQL Server 2000 Driver for JDBC data sources, see "Connecting Through Data Sources".
    The driver class for the SQL Server driver is:
    com.microsoft.jdbc.sqlserver.SQLServerDriver
    com.microsoft.jdbc.sqlserver.SQLServerDriver is working properly, I am sure.

Maybe you are looking for

  • Follow-up to - Is there any way to annotate this document?

    http://ncfp.files.wordpress.com/2013/05/fleecer_mtn_order.pdf The first answer helped me get rid of PDF/a so that I can now annotate the headers (the tools show up on the task bar), but not the body of the text.  Again - could not convert to Word w/e

  • Messages sent from pc nokia browser not stored

    I have a nokia 6131, windows xp mce 2002 sp2 on an asus s6 portable and nokia pc suite 6.83.14.1 and a toshiba stack bluetooth connection. Language on the pc and the phone is Swedish in all cases. When I send messages from the nokia phone browser win

  • Maximum Size of bind variables/model names in a SPARQL query

    I was wondering what the maximum field size is for a bind variable (?'' being used in the subject or object within a triple) in a SPARQL query using the Jena Adapter for Oracle? The reason for this is that I keep getting Oracle exception (ORA-00972:

  • How do you access full printer settings for printing?

    I wanted to print something for the first time yesterday. I've got 3 printers attached used for different things. When I selected print it brought up a basic print box that let me choose printer, paper type and size, but I couldn't access any more sp

  • Where is my reading list

    I Dow n loaded a small ebook and sent it to my reading list where is it? I also put the icon in. Y home page and it does appear there and it does open.