Problem using DataSource for JDBC applications

import javax.sql.*;
import java.sql.*;
import java.io.*;
import java.text.*;
import javax.naming.*;
public class CreateMovieTables {
     //static String driver="COM.cloudscape.core.JDBCDriver";
     //static String url="jdbc:cloudscape:";
     String leadActor,title,leadActress,type,dateOfRelease;
     Connection connection;
     Statement statement;
     DataSource dataSource;
     public void initialize() throws SQLException,NamingException{
          //Class.forName(driver);
          Context initialContext = new InitialContext();
          //connection = DriverManager.getConnection(url + "Movies;create=true");
          dataSource = (DataSource) initialContext.lookup("jdbc/Cloudscape");
          connection = dataSource.getConnection();
the code goes on
when i start the j2ee sdk server, the cloudscape server the message i get when i run the program is...
No local string for datasource.wrongclient
java.sql.SQLException:
at com.sun.enterprise.resource.JdbcDataSource.getConnection(JdbcDataSource.java:40)
at CreateMovieTables.initialize(CreateMovieTables.java:23)
at CreateMovieTables.main(CreateMovieTables.java:86)
can anyone please suggest as to where i may be going wrong
thanx
-NDK

I don't agree that a User or System DSN is needed - that's a Windows idiom.
I haven't used the J2EE SDK to set up a data source, but I know that when I do it in Tomcat I've got to put a <resource-ref> tag in the web.xml that identifies the JNDI lookup string, and then the JDBC driver/URL/username/password details under a <Resource> tag in the context.xml to tell the data source how to create the JDBC connection.
My <resource-ref> name is "jdbc/APIPrototype". My JNDI lookup string looks like "java:comp/env/jdbc/DataSourceName".
You've got to do more than just put the JNDI lookup string in the Context lookup. Your error message sounds like the server is saying you've haven't done that set-up work.
Just a guess - perhaps it's something else, but I couldn't tell from your note. - MOD

Similar Messages

  • Flex 4.5 problem using image in Mobile Application (Android)

    I have a problem using flex and mobile application...
    I have an image with path = "/mnt/sdcard/images/20120202172020990.jpg"
    Simply using
         <s:Image id="image" source="/mnt/sdcard/images/20120202172020990.jpg" />
    Get me an empty image on device, still using it on computer (desktop build / debug) it works fine...
    I have enabled every kind of permission in the app.xml
    Why I got this error?

    I actually solved the problem using:
    image.source = File.desktopDirectory.resolvePath(file_name).url;
    using instead this one it will work only under windows...
    image.source = File.desktopDirectory.resolvePath(file_name).nativePath;
    I don't know if it's a bug or whatelse, but I think that the source property of Image passing a filename that start with / (/ is root for unix based OS, android, linux, ios, etc), will take is as a relative path instead of complete path...

  • Unable to delete EPMA Planning app & re-use datasource for new app

    We have EPMA Planning application (v11.1.1.3)
    I am trying to delete a deployed planning application and try to use the same datasource for creating new application.
    I have deleted the application from EPMA application library and deleted it from Planning directory in Shared Services. But, still that datasource is not showing up as available datasource for new application.
    Any ideas to how I can re-use the datasource. Please advise.
    Thanks,
    DV

    You may need to update the planning system tables.
    Go into the planning system relational tables
    Table HSPSYS_APPLICATION, delete row relating to planning app, note the app_id.
    Table HSPSYS_PROPERTIES, delete records with id that you have just stored.
    Table HSPSYS_DATASOURCES, update app_id to -1 for the datasource you use for the planning app.
    Restart Planning.
    Try again.
    Ok?
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • I have an old (first generation) iMac that I still use sometimes for the applications that are on it. I was using it yesterday and unfortunately had a power cut. I went to turn it on today, and nothing at all happens. It's as though no power is getting to

    I have an old (first generation) iMac that I still use sometimes for the applications that are on it. I was using it yesterday and unfortunately had a power cut. I went to turn it on today, and nothing at all happens. It's as though no power is getting to it. I've checked the obvious things, changed the fuse, tried different cables, poked paperclips in reset holes, but nothing doing. I wonder if there is anyone who knows what might be wrong. I was hoping to get some of its content transferred soon, but I'm guessing that can't be done if it can't be started up. Many thanks, if you can help

    Hello,
    >It's as though no power is getting to it.
    Would it be correct to assume that no sounds at all can be heard? Also, no lights, not even green or amber at the power button?
    >unfortunately had a power cut.
    Was it possibly a power cut in connection with a thunderstorm? Any other evidence of higher than normal voltages (light bulbs, et cetera)? Has the line voltage been checked (measured with an appropriate voltmeter/multimeter)?
    If necessary, it would be possible to remove the hard drive, and then connect it to an external IDE/ATA to USB adapter (example below). That way you could gain access to files on the hard disk from another computer.
    http://www.newertech.com/products/usb3_universaldriveadap.php
    Jan

  • HT5312 My stops because of the wrong answer to the secret question, and I want to use it for evil application from Apple Store?

    My stops because of the wrong answer to the secret question, and I want to use it for evil application from Apple Store?

    Hello mr sami,
    Thank you for the details of the issue you are experiencing with your security questions.  I found an article with some useful information if you cannot remember the answers to your security questions:
    What should I do if I don't remember the answers to my Apple ID security questions?
    Try answering them at least once to see if you can get them right, even if you are not sure you remember the answers to your security questions.
    If you are confident you can't remember them, try one of the following:
    If you have three security questions and a rescue email address
    sign in to My Apple ID and select the Password and Security tab to send an email to your rescue email address to reset your security questions and answers.
    If you have one security question and you know your Apple ID passwordsign in to My Apple ID and select the Password and Security tab to reset your security question.
    If you have one security question, but don't remember your Apple ID password
    contact Apple Support for assistance. Learn more about creating a temporary support PIN to help Apple confirm your identity when you contact Apple Support.
    Note: If you have forgotten your password and answer your security questions incorrectly too many times in a row, you will be unable to try to answer your security questions for a period of time. During that time you will not be able to reset your password and will not have access to your account.
    You can find the full article here:
    Apple ID: All about Apple ID security questions
    http://support.apple.com/kb/HT5665
    If you continue to have issues, please contact our Account Security Team as outlined in this article:
    Apple ID: Contacting Apple for help with Apple ID account security
    http://support.apple.com/kb/HT5699
    Thank you for using Apple Support Communities.
    Best,
    Sheila M.

  • How to improve the load performance while using Datasources for the Invoice

    HI All,
    How to improve the  load performance while using Datasources for the Invoice . Actually my invoice load (Appx. 0.4 M records) is taking very long time nearly ~16 to 18 hrs  to update data from R/3 to 0ASA_DS01.
    If I load through flat file it will load with in ~20 Min for the same amount of data.
    Please suggest how to improve load performance.
    PS: I have done the Inpo package settings as per the OSS note.
    Regads
    Srininivasarao.Namburi.

    Hi Srinivas,
    Please refer to my blog posting [/people/divyesh.jain/blog/2010/07/20/package-size-in-spend-performance-management-extraction|/people/divyesh.jain/blog/2010/07/20/package-size-in-spend-performance-management-extraction] which gives the details about the package size setting for extractors. I am sure that will be helpful in your case.
    Thanks,
    Divyesh
    Edited by: Divyesh Jain on Jul 20, 2010 8:47 PM

  • I created an Apple ID but i can't able to use it for downloading applications from iTunes store on my 4s iPhone

    I have created an apple id on my 4S iPhone. But i can not able to use it for downloading applications from iTunes store on my phone

    can your computer?
    can your browser ?
    what error does it give you?

  • NullPointerException using @Resource for JDBC lookup

    I had the following working and am trying to convert to using @Resource and have been unsuccessful:
    First I had the following working, inside a jar within an ear deployed to glassfish v3 and no sun-ejb-jar.xml file:
    public CM
    public CM() {
    InitialContext ctx = new InitialContext();
    DataSource ds = (DataSource)ctx.lookup("jdbc/xDataSource");
    Connection conn = ds.getConnection();
    When I switched to the following I get a NullPointerException when I deploy, indicating that the resource could not be found
    @Stateful
    public CM
    @Resource(name="jdbc/xDataSource", mappedName="jdbc/xDataSource")
    private DataSource ds;
    public CM() {
    Connection conn = ds.getConnection();
    and added sun-ejb-jar.xml file to META-INF directory
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE sun-ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD GlassFish Application Server 3.0 EJB 3.1//EN"
    "http://www.sun.com/software/appserver/dtds/sun-ejb-jar_3_1-0.dtd">
    <sun-ejb-jar>
    <enterprise-beans>
    <ejb>
    <ejb-name>CM</ejb-name>
    <resource-ref>
    <res-ref-name>jdbc/xDataSource</res-ref-name>
    <jndi-name>jdbc/xDataSource</jndi-name>
    </resource-ref>
    </ejb>
    </enterprise-beans>
    </sun-ejb-jar>
    P.S. Sorry about not using code tags I'm not sure which tag to use to properly format it.

    Do you know what those authorizations should be when using a standard JDBC Lookup mapping function?  Currently we have a custom UDF that calls the table via a <schema>.<table name> and the current user in the Receiver Comm Channel works just fine.  It appears that when using the standard SAP JDBC Lookup function it calls the table directly and the user in the Comm Channel no longer has the correct permissions.
    I would expact that the JDBC Lookup function would allow for a standard "Read" on any table as long as the user has that level of access...but not in this case.  I am going to bring it up to our SAP XI software development team and see what they say, but wanted to get some views from our other experts as well.
    Thanks,
    Matt

  • Problem using Interactive Report  in Application Express 3.2.1.00.11

    Hi All ,
    I am using Interactive Report in Application Express 3.2.1.00.11
    I have made report as editable by using following query
    Select ROWID,
    APEX_ITEM.CHECKBOX(1,IDSKILL,'UNCHECKED') "Mark",
    APEX_ITEM.TEXT(2,IDSKILL)"IDSKILL",
    APEX_ITEM.TEXT(3,SKILL) "SKILL",
    APEX_ITEM.SELECT_LIST_FROM_LOV(4,IDBEARBEITER,'DIR_LOV'),
    APEX_ITEM.TEXT(5,ÄNDERUNGSDATUM)"ÄNDERUNGSDATUM"
    from SKILLS
    Problem :-
    When I click FILTER option in Interactive Report , It is taking under Expression "<input type="text" name="f03" size="20" maxlength="2000" value="ARIS" />" and displaying in search filter as
    Skill = '<input type="text" name="f03" size="20" maxlength="2000" value="ARIS" />'
    Can I make display like Skill ="ARIS"
    Any suggestion is welcom ..
    Thanks in advance
    Cheers
    Sachin Srivastava

    Hi,
    As I know there is no fix/workaround for that.
    Disable filtering and other stuff is only. But I think you of course like have filters and other nice thing of interactive report. Other vice you have done classic report.
    It is better use classic report and build own custom filers.
    Br, Jari

  • Weblogic.Deployer using -deploy for existing application

    I'm running on weblogic 8.1 SP3
    when I use -deploy for an existing application the documentation says it will do a redeploy.
    documentation for the targets option says that it will use existing targets for an application that is currently deployed.
    BUT it doesn't work. Is this a known issue ?
    I use the following options:
    -name fortune
    -source /data/bea81/applications/stg/fortune.ear
    -verbose -debug -deploy -stage

    Check to see if the problem is with the Deployer tool or myApp.war:
    1) Does myApp.war deploy using the console?
    2) Check myApp.war has all the classes it needs?
    If your app does deploy from the console then we can focus in on the Deploy tool. If not it may help give us a clue as to what is going on e.g. your war file missing classes.
    Hoos

  • Problems using third-party JDBC with JDeveloper

    Hi:
    I've tried to use an Informix's JDBC to access an Informix Online Workgroup v. 7.22 under Win NT 4.0, using JDeveloper. I tried Informix JDBC Driver V. 2.1 successfully with old-fashioned code using Connect, Statement and ResultSet objects, coding connections directly, but I couldn't define a connection so I can use wizards, 'cause I got an "Unable to find server: com.informix.jdbc.IfxDriver" error when I tried to test connection. I've probed this:
    * Create a library for Informix JDBC in my project. This step allowed me to make run my old-fashioned code.
    * When I created connection, I defined correct login, password and role parameters, then I selected "Other JDBC" on the JDBC Driver's combo, as classname I defined "com.informix.jdbc.IfxDriver" and as URL "jdbc:informix-sqli://127.0.0.1:1526/atlas:INFORMIXSERVER=produc_shm;".
    Classname I used is equals to classname I used in Class.forName method. URL use same format than DriverManager.getConnection method, adding pair user-password to it, and those parameters work ok coding connection directly using Connection method. By the other side, looking at Informix JDBC's Manual, it says Informix's JDBC supports connection using Datasource also.
    Which are steps I must follow?
    Omar Muqoz.
    null

    Hi,
    Unfortunately there was a regression bug around using the Generic JDBC connector to a Foreign Database in this Technology Preview (3). I'm not able to give you good news as I don't have a workaround for you either.
    You could use SQLDeveloper to connect to the database for live work, unfortunately that will not help if you wanted to create offline objects of some sort using JDeveloper.
    regards
    Susan
    http://www.susanduncan.blogspot.com

  • Using Password_verify_function for EBS Application Schemas

    HI,
    As you all know, EBS Application Schemas (ex: AP, AR, GL, HR, etc) are associated with the DEFAULT profile and DEFAULT profile PASSWORD_VERIFY_FUNCTION is set to NULL. If I alter DEFAULT profile and set PASSWORD_VERIFY_FUNCTION to make use of a complex password function as below or create a custom profile with a custom password function, I am not able to change the Schemas password using FNDCPASS.. it throws the below error:
    APP-FND-02704: Unable to alter user PRP to change password.
    APP-FND-01564: ORACLE error 1403 in changepassword
    Cause: changepassword failed due to ORA-01403: no data found.
    The SQL statement being executed at the time of the error was: and was executed from the file &ERRFILE.
    According to metalink note # 1306938.1, it is mentioned that the error can be resolved by setting PASSWORD_VERIFY_FUNCTION back to NULL, which I dont want to do as we wont be able to enforce complex password function for the application schemas.
    Please suggest
    Thanks & Regards
    Adarsha

    According to metalink note # 1306938.1, it is mentioned that the error can be resolved by setting PASSWORD_VERIFY_FUNCTION back to NULL, which I dont want to do as we wont be able to enforce complex password function for the application schemas.If the solution in this doc does not help then please log a SR.
    Thanks,
    Hussein

  • Problem using datasource in netbeans to get connection

    The method initialContext.lookup("java:comp/env/myDatabase");
    generated the following exception
    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
    at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:645)
    at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
    at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:284)
    at javax.naming.InitialContext.lookup(InitialContext.java:351)
    at enterprise.Test2.getMyDatabase2(Test2.java:54)
    at enterprise.Test2.doTest(Test2.java:36)
    at enterprise.Test2.main(Test2.java:46)
    How do i resolve this

    I t could be the right forum , since javamail uses DataSource.
    It could be you need to say
    javax.swing.Activation.DataSource at the variable declaration not simply import and assume.
    There are various "DataSource" classes in java.
    Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initialAs it is, it appears to be the server configuration file/application web.xml or a JNDI association/environment has not been constructed to point to the classes to load.
    Edited by: nicephotog on Oct 30, 2008 10:57 AM

  • Oracle Problem using Interactive Report in Application Express 4

    Hi All ,
    I am using Interactive Report in Application Express 3.2.1.00.11
    I have made report as editable by using following query
    Select ROWID,
    APEX_ITEM.CHECKBOX(1,IDSKILL,'UNCHECKED') "Mark",
    APEX_ITEM.TEXT(2,IDSKILL)"IDSKILL",
    APEX_ITEM.TEXT(3,SKILL) "SKILL",
    APEX_ITEM.SELECT_LIST_FROM_LOV(4,IDBEARBEITER,'DIR_LOV'),
    APEX_ITEM.TEXT(5,ÄNDERUNGSDATUM)"ÄNDERUNGSDATUM"
    from SKILLS
    Problem :-
    When I click FILTER option in Interactive Report , It is taking under Expression "<input type="text" name="f03" size="20" maxlength="2000" value="ARIS" />" and displaying in search filter as
    Skill = '<input type="text" name="f03" size="20" maxlength="2000" value="ARIS" />'
    Can I make display like Skill ="ARIS"
    Any suggestion is welcom ..

    Try making your column definition as "Remove HTML and escape special characters".
    I tried it and it make the column appear as editable as intended and also clicking on the column heading or on the filter in the IR bar behave properly.

  • Using AIR for all application.

    Hi to all!
    In this days i'm trying to use Adobe AIR with FLEX to build
    RIA on Desktop and other application (like company managment and
    other:) In past i used VB .NET, C++, C#, and JAVA. I know that this
    are the language for "antonomasia" to build company managment
    software, but for you, what is the negative aspect to use AIR in
    Desktop application? For example:
    - Performane? (Database handling is not optimal, or other
    issue....)
    - Using AIR interpreters means up RAM and CPU usage, or
    others?
    - Other..
    Thanks boys!

    Its possible but you would need to tell each movieclip and audioclip to play/pause. You can create a for loop inside your mouse event function to find each movieclip and pause/play its timeline and a separate for loop for audio clips. Also instead of setting fame rate to 0 for pause just use a stop() command.

Maybe you are looking for