JNDI Data Source Authentication

Why doesn't the following work?
public void getConnection(String dbuser, String dbpass) throws SQLException, NamingException {
Context context = new InitialContext();
DataSource ds = (DataSource)context.lookup(DATA_SOURCE_NAME);
return ds.getConnection(dbuser,dbpass);
It seems like this authenticates against the WebLogic security realm, and not the database (which is what the Java API specifies). Is this supposed to be the case? How can I work around this so that SQL calls are made in the dbuser's name and not the credentials I supplied for the Data Source?
Message was edited by:
bernerbits

Derek Berner wrote:
Why doesn't the following work?
public void getConnection(String dbuser, String dbpass) throws SQLException, NamingException {
Context context = new InitialContext();
DataSource ds = (DataSource)context.lookup(DATA_SOURCE_NAME);
return ds.getConnection(dbuser,dbpass);
It seems like this authenticates against the WebLogic security realm, and not the database
(which is what the Java API specifies). Is this supposed to be the case? How can I work
around this so that SQL calls are made in the dbuser's name and not the credentials I supplied for the Data Source?
Message was edited by:
bernerbitsHi. This is running as designed. The DataSource to a WebLogic JDBC connection
pool will be delivering one of the identically-made already existing connections
in the pool. As such the typical call is the no-argument getConnection() call.
We do implement weblogic security with the user/password form.
If you want a JDBC connection with a named user/password, you should
either have a pool with such ( and use the no-argument call) or you must
make a non-pooled direct connection. Note that you can have as many pools
as you want, each perhaps with only one connection, and you can dynamically
create pools.
For an upcoming release of WLS we will offer heterogenous (multiple DBMS
user) pools.
Joe

Similar Messages

  • 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

  • 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]

  • 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)

  • 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

  • Weblogic & JNDI Data Source with proxy user.

    We're trying to use Oracle proxy user authentication on a data source configured in WebLogic 10.3.6, however, we want to approach it in a programatic way. So we want to obtain the DataSource, and set the proxy related properties inside the application.
    We came up with the following snippet:
    Hashtable<String, Object> env = new Hashtable<String, Object>();
    env.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
    env.put(Context.PROVIDER_URL, "t3://10.1.1.10:7003");
    env.put(Context.SECURITY_PRINCIPAL, "weblogic");
    env.put(Context.SECURITY_CREDENTIALS, "weblogic");
    Context context = new InitialContext(env);
    javax.sql.DataSource ds = (javax.sql.DataSource) context.lookup("ds_puser");
    OracleConnection oconn = (OracleConnection) ds.getConnection();
    The problem comes up when we try to cast the connection to OracleConnection, the thing is that the returned type is actually a 1036_WLStub.
    How can we avoid that type or cast to it to something useful? I found this reference on Oracle forums and he's being able to cast it directly:
    Re: My problem in using weblogic Datasource and proxy user
    Can someone help us out?
    Thanks a lot in advance!
    Edited by: 990800 on 27-feb-2013 13:26

    A DataSource is an Interface. What the code gets from the jndi tree is some concrete object that
    the code doesn't need to know the name of, or anything specific about it, as long as it implements
    the DataSource Interface, which it successfully casts to, to allow calling the methods defined in the
    DataSource Interface. If you call for a plumber, you don't need to know his name as long as you
    can get a plumber, and can call the "Fix this leak" method, defined in the Plumber Interface.

  • 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.

  • HTTP XML Data Source authentication error

    Morning All,
    I have just started playing around with using XML as a data source for my CR4Ev2.0.1 reports.
    I have managed to create the local inline reports and change their data source loacation with no current
    issues.
    I am now trying to create the HTTPXML reports using code from Ted's BLOG.
    I manage to create a new report, and can open it in design, I can see the data source structure but as
    soon as I try browse the data or preview my report I get the following error
    Cannot Open file
    Server returned HTTP response code: 407 for URL:
    http://myserver/httpxml.xml
    I had a quick look up the 407 error and it seems to be a Proxy authentication error, we do have a proxy
    server setup which requires a username and password.
    Before I go through what I have tried I want to confess that for this httpxml.xml file all I did was take my
    inline.xml file and rename it and make it avaliable via a URL. So this might be the whole problem but I
    am sure this is ok.
    So I have tried turning off the proxy server as this URL is local so I dont need to go through the proxy.
    If I go to the URL in my browser it works fine and I do not need to enter any proxy details.
    Thats the problem with my HTTP XML attempt.
    If I use the code as is, from Ted's BLOG, for
    Crystal Reports off of HTTP XML data URL
    and try use the following 2 URLs
    propertyBag.put(
    "Http(s) XML URL", "http://resources.businessobjects.com/support/downloads/samples/cr/customer_db/orders.xml");
    propertyBag.put(
    "Http(s) Schema URL", "http://resources.businessobjects.com/support/downloads/samples/cr/customer_db/orders.xsd");
    propertyBag.put(
    "Http(s) XML URL", "http://resources.businessobjects.com/support/downloads/samples/cr/customer_db/customer.xml");
    propertyBag.put(
    "Http(s) Schema URL", "http://resources.businessobjects.com/support/downloads/samples/cr/customer_db/customer.xsd");
    But I get the following errors
    Exception in thread "main" com.crystaldecisions.sdk.occa.report.lib.ReportSDKLogonException: Logon
    Error: {0}---- Error code:-2147217393 Error code name:dbLogonFailed
         at com.businessobjects.reports.sdk.JRCCommunicationAdapter.a(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.DatabaseController.byte(Unknown
    Source)
         at com.crystaldecisions.sdk.occa.report.application.DatabaseController.addTable(Unknown
    Source)
         at com.businessobjects.samples.CreateHttpXML.main(CreateHttpXML.java:90)
    Caused by: com.crystaldecisions.reports.common.LogonFailureException: Logon Error:{0}
         at com.crystaldecisions.reports.queryengine.Connection.br(Unknown Source)
         at com.crystaldecisions.reports.queryengine.Connection.bs(Unknown Source)
    Any ideas as to what my issues are or what I am missing.
    Thanks in advance.
    Darren
    Edited by: Darren Jackson on Apr 28, 2009 2:12 PM
    Is there any documentation as to what entries I can use in the property bag.
    Like is there a ("ProxySet", false) or something along those lines?
    Edited by: Darren Jackson on Apr 28, 2009 5:28 PM
    I have made a little more head way.
    I saved the Orders.xml and Orders.xsd files onto my webserver and editied the code to only worry about
    the Orders and ignore the Customer files.
    I now create my reports, open them in Eclipse to design them, but when I try preview the data it is now
    asking me for a username and password. I have tried all combinations that I can think of for our systems
    but none work.
    Grrrrrrrrrrrrrrr

    I have subsequently determined that my main problem was my "cached" proxy settings within Eclipse.
    Even though I removed the proxy settings in Eclipse, it still required me to restart Eclipse after which it
    all started working ok.
    That was my main problem, but I am still interested in the Property Bag options that I mentioned before.
    If proxy settings are needed, how would one go about setting these details?
    Thanks
    Darren

  • WAS 6.1 JNDI data source connection CRXI R2 Developer

    Hi all,
    I've been tasked to get a JNDI connection from a WAS 6.1 server to a Oracle DB to use in developing a report.
    The CR developer I'm using is CR Developer;Product Type: Full Product Version: 11.0.0.1282
    I have created a simple Java 'main' class to test the JNDI connection using the following jars:
    com.ibm.ws.admin.client_6.1.0.jar
    com.ibm.ws.runtime_6.1.0.jar
    com.ibm.ws.webservices.thinclient_6.1.0.jar
    ibmorb.jar
    ojdbc-14.jar
    rsadbutils.jar
    rsahelpers.jar
    I have been able to retrieve data from the Oracle DB through the 'main' class and display it on the console.
    However, after I set the CRConfig.xml file's classpath to use these jars, along with a jar I created that contains a jndi.properties file that contains the org.omg.CORBA.ORBClass=com.ibm.CORBA.iiop.ORB property because the JVM that the CR developer is pointing at is a Sun 1.6 HotSpot JVM.
    When I try getting the connection, Database -> Database Expert -> Create New Connection -> JDBC (JNDI), select the JNDI Connection option and enter the relevant information, the developer finds the JNDI names that I'm looking for. Then I 'Click' the Finish button and receive the following error pop-up:
    Logon Failed.
    Details: SQL Exception: SQL State: null ERROR Message: Invalid argument(s) in callDSRA0010E: SQL State= null, Error Code = 17,068 Database Vendor Code: 17068
    I have noticed that I can replicate this error message, through the 'main' class I used to test the connection, if I remove the username/password arguments from the method I use to get the DB connection.
    Is there anything that I'm missing to successfully use this WAS data source?
    I have tested a WebLogic 10.3 connection and the CR Developer had no problem finding/using the connection?
    Any help that can be provided would be greatly appreciated.
    Below is the JDBC tag from the CRConfig.xml file that I'm using:
    <JDBC>
         <CacheRowSetSize>100</CacheRowSetSize>
         <JDBCURL></JDBCURL>
         <JDBCClassName></JDBCClassName>
         <JDBCUserName></JDBCUserName>
         <JNDIURL>iiop://server:bootstrap_address-port</JNDIURL>
         <JNDIConnectionFactory>com.ibm.websphere.naming.WsnInitialContextFactory</JNDIConnectionFactory>
         <JNDIInitContext>cell/clusters/clusterName/jdbc</JNDIInitContext>
         <JNDIUserName>schema-username</JNDIUserName>
         <GenericJDBCDriver>
              <Option>No</Option>
              <DatabaseStructure>catalogs,tables</DatabaseStructure>
              <StoredProcType>Standard</StoredProcType>
              <LogonStyle>Oracle</LogonStyle>
         </GenericJDBCDriver>
    </JDBC>
    Thanks in Advance
    Edited by: java_geek on Jul 28, 2010 3:31 AM

    Hi all,
    I've been tasked to get a JNDI connection from a WAS 6.1 server to a Oracle DB to use in developing a report.
    The CR developer I'm using is CR Developer;Product Type: Full Product Version: 11.0.0.1282
    I have created a simple Java 'main' class to test the JNDI connection using the following jars:
    com.ibm.ws.admin.client_6.1.0.jar
    com.ibm.ws.runtime_6.1.0.jar
    com.ibm.ws.webservices.thinclient_6.1.0.jar
    ibmorb.jar
    ojdbc-14.jar
    rsadbutils.jar
    rsahelpers.jar
    I have been able to retrieve data from the Oracle DB through the 'main' class and display it on the console.
    However, after I set the CRConfig.xml file's classpath to use these jars, along with a jar I created that contains a jndi.properties file that contains the org.omg.CORBA.ORBClass=com.ibm.CORBA.iiop.ORB property because the JVM that the CR developer is pointing at is a Sun 1.6 HotSpot JVM.
    When I try getting the connection, Database -> Database Expert -> Create New Connection -> JDBC (JNDI), select the JNDI Connection option and enter the relevant information, the developer finds the JNDI names that I'm looking for. Then I 'Click' the Finish button and receive the following error pop-up:
    Logon Failed.
    Details: SQL Exception: SQL State: null ERROR Message: Invalid argument(s) in callDSRA0010E: SQL State= null, Error Code = 17,068 Database Vendor Code: 17068
    I have noticed that I can replicate this error message, through the 'main' class I used to test the connection, if I remove the username/password arguments from the method I use to get the DB connection.
    Is there anything that I'm missing to successfully use this WAS data source?
    I have tested a WebLogic 10.3 connection and the CR Developer had no problem finding/using the connection?
    Any help that can be provided would be greatly appreciated.
    Below is the JDBC tag from the CRConfig.xml file that I'm using:
    <JDBC>
         <CacheRowSetSize>100</CacheRowSetSize>
         <JDBCURL></JDBCURL>
         <JDBCClassName></JDBCClassName>
         <JDBCUserName></JDBCUserName>
         <JNDIURL>iiop://server:bootstrap_address-port</JNDIURL>
         <JNDIConnectionFactory>com.ibm.websphere.naming.WsnInitialContextFactory</JNDIConnectionFactory>
         <JNDIInitContext>cell/clusters/clusterName/jdbc</JNDIInitContext>
         <JNDIUserName>schema-username</JNDIUserName>
         <GenericJDBCDriver>
              <Option>No</Option>
              <DatabaseStructure>catalogs,tables</DatabaseStructure>
              <StoredProcType>Standard</StoredProcType>
              <LogonStyle>Oracle</LogonStyle>
         </GenericJDBCDriver>
    </JDBC>
    Thanks in Advance
    Edited by: java_geek on Jul 28, 2010 3:31 AM

  • 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编辑过

  • SSRS 2008 R2 data source authentication issue

    Hello,
    End-users with Browser permissions for the necessary SSRS folders and reports are getting "The permissions denied to user [Windows user] are insufficient for performing this operation (rsAccessDenied)" even though the data source for the report is configured
    to use "credentials stored securely in the report server" and "Use as Windows credentials when connecting to the data source" is checked. Users who are members of the local admin machine hosting the Report Manager site don't get the error. But users with full
    control permissions to the SSRS directories, including the config files, do get the error. Obviously, the solution shouldn't entail giving end-users local admin or even full control permissions to the SQL Server SSRS folders.  Moreover, the error only
    occurs when using Windows credentials but not when using only a database credential, i.e. non Windows credentials.  This workaround doesn't work for me since I'm also using a data source connection to SSAS, which doesn't appear to use database logins
    - only Windows credentials that are added to roles.
    Please advise.
    Thanks,
    Ben Lezin

    Hi Ben,
    Generally, the error "The permissions denied to user [Windows user] are insufficient for performing this operation (rsAccessDenied)" should be caused
    by one of the following reasons:
    1. User Access Control (UAC). Windows Vista, Windows 7 and Windows Server 2008 limit the overuse of elevated permissions by removing administrator permissions
    when accessing applications. Because the operating system removes permissions, members of the local Administrators group run most applications as if they are using the Standard User account.
    If this issue is caused by UAC, please run Internet Explorer as administrator. From the Start menu, click All Programs, right-click Internet Explorer,
    and select Run as administrator. For more information about UAC, please refer to this document:
    http://msdn.microsoft.com/en-us/library/bb630430.aspx
    2. User has insufficient permissions to perform the operation. Please check the following items:
    a. End-users belong to "Browser" role. In Report Manager Home page, click "Folder Settings", make sure the end-users are in the security list and with
    Browser role permission.
    b. "Browser" role has permissions to perform the operation. You can use SSMS to connect to report server, expand Security/Roles, double click "Browser",
    and then check the tasks list.
    If there is anything unclear, please feel free to ask.
    Thanks,
    Albert Ye

  • Jndi data source problem

    I am starting up using Jdeveloper with the integrated WebLogic server. I immediately ran into the problem described in this thread:
    http://forums.oracle.com/forums/message.jspa?messageID=3348590#3348590
    I followed the instructions for the workaround, but i can't make it work. I have a couple of questions:
    1. Step one of the workaround, <name>-jdbc.xml, is the <scope>Application tag the key change here? If yes, my file already had it.
    2. As far as i can see, the weblogic-application.xml file is created automatically when i deploy. How do i edit the file?
    3. Adding <property name="eclipselink.target-server" value="WebLogic_10"/> to persistence.xml, as suggested in the thread, causes deployment to fail with no specific error message.
    4. What's the deal with the ".../jdbc/jdbc..." vs ".../jdbc..." part of the setup? I assume it should be ".../jdbc/jdbc...", but why the mix-up in the documentation?
    5. Is there a fix available if i upgrade my Jdeveloper? Am i wasting my time on a workaround for an error that's been solved?
    Can someone please help me out here?

    I ended up using a workaround instead.

  • How to create new JNDI Data source in Tomcat 5.0 server

    hi ...
    I have created new datasource but its giving an error like
    ERROR: org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null', cause: null
    Nested Exception: java.lang.NullPointerException
    please can anybody help me out to solve this bug ?
    regards
    djshivu

    This problem is due to your files server.xml and web.xml. Have you modified them???
    I ve the same problem, can you compare these files to mine (you can find my files here: http://forum.java.sun.com/thread.jspa?threadID=635640&tstart=0)

  • How to create JDBC data source w/o LDAP server

    I am trying to test using JDBC data source on a computer without a LDAP server. Is there an alterative JNDI solution? How about using file system or RMI registry JNDI service providers?

    Any J2EE container should be able to handle that. I use JNDI data sources with Tomcat 4.1.27. I'm sure any other J2EE app server (e.g., WebLogic, WebSphere, JBOSS, etc.) would be able to manage it, too. - MOD

  • Data source needs to be specified in context.xml instead of web.xml - why?

    Hi,
    I'm using a Spring JndiObjectFactoryBean to create my JNDI data source in my code:
    <bean id="jndiDataSource" class="org.springframework.jndi.JndiObjectFactoryBean" lazy-init="true">
              <property name="jndiName" value="java:comp/env/jdbc/DS_OURDB_DB2" />
              <property name="lookupOnStartup" value="false"/>
              <property name="proxyInterface" value="javax.sql.DataSource"/>
         </bean>I have the necessary Resource added to my Tomcat's server.xml:
    <Resource accessToUnderlyingConnectionAllowed="false"
                defaultAutoCommit="true" defaultReadOnly="false"
                driverClassName="com.ibm.db2.jcc.DB2Driver"
                factory="org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory"
                initialSize="0" logAbandoned="false" maxActive="8"
                maxIdle="8" maxOpenPreparedStatements="0" maxWait="-1"
                minEvictableIdleTimeMillis="1800000" minIdle="0"
                name="jdbc/DS_OURDB_DB2" numTestsPerEvictionRun="3"
                password="ourpass" poolPreparedStatements="false"
                removeAbandoned="false" removeAbandonedTimeout="300"
                testOnBorrow="true" testOnReturn="false"
                testWhileIdle="false" timeBetweenEvictionRunsMillis="-1"
                type="javax.sql.DataSource"
                url="jdbc:db2://machine1:60056/DBD1" username="ouruser"
                   validationQuery="SELECT current date FROM sysibm.sysdummy1"/>I then have the resource referenced in my web.xml:
    <resource-ref>
              <res-ref-name>jdbc/DS_OURDB_DB2</res-ref-name>
              <res-type>javax.sql.DataSource</res-type>
              <res-auth>Container</res-auth>
              <res-sharing-scope>Shareable</res-sharing-scope>
         </resource-ref>However, I'm getting JndiLookupFailureExceptions when I attempt to use this JNDI resource.
    I can resolve it by specifying the following in my META-INF/context.xml:
    <Context>
         <ResourceLink global="jdbc/DS_OURDB_DB2" name="jdbc/DS_OURDB_DB2" type="javax.sql.Datasource"/>
    </Context>I've read some of the JNDI/Tomcat documentation. However, I still do not understand why it doesn't work with the web.xml. Can anyone explain please? Thanks

    Can answer this myself after some more investigation. The reason I required the entry in the META-INF/context.xml was because I had specified the Resource as a Global Reference in the server.xml. By adding this Resource to my application's Context in the server.xml the configuration in the web.xml worked as expected.

Maybe you are looking for

  • Feature Request: Make RECENTS better with two more drill down options

    Hi everyone! I love my iPhone but - as with everything - one can make things get even better... Not sure where to post so I try here. Would love to hear if you feel the same need: I realize that RECENTS within the phone application could be improved

  • MB1C issues

    Hi, Can any one explain how to increase the line items in MB1C transaction. Because i have to upload the initial stock for about 150 material. I find there is only 12 lines available. How to increase the lines (rows)? Regards, abi

  • ORA-01653 unable to extend table.

    Hi All, I am Using oracle 9i on Windows XP box I got the following error messages . ORA-01653: unable to extend table SCOTT.EMP2 by 128 in tablespace ORADATA I was inserting 557056 rows from emp table to emp2 table , by issuing sql> insert into emp2

  • I need to re-install icloud. How do I do it?

    I had deleted icloud to fix the msvcr.dll problem. How do I restore icloud. My account works, but do I have to set up a new account to restore what I had before. I would imagine other users have had to uninstall and re-install before. Thank you.

  • Video-audio chat garbled received

    When the video chat is connection is established audio and video are oke. As soon as I start moving or talking the receiving party sees a garbled picture (small blocks) and hears a garbled sound. I can hear the other side perfectly and I can see the