Need help:Urgent:MS SQL Server and J2EE Server

Hello,
i am developing simple bean managed persistence bean. i want to know how could i use microsoft SQL Server as my database with ejb's in J2EE. i don't want to use cloudscape rather i want to connect through jdbc bridge with sql server. can any body help me out ?
i have developed DSN for my database with the name of DsnProduct and user name for DB is guest and password is guest123.
so do i have to change configuration is my J2EE server . or put some additional code. so far i have added the following line in my implementation class
private String dbName= "java:comp/env/jdbc/ProductDB";
DataSource ds = (DataSource) ic.lookup(dbName);
con = ds.getConnection("guest","guest123");
moreover in server configuration i have added driver
sun.jdbc.odbc.JdbcOdbcDriver
and also provide the following JNDI Name
jdbc/ProductDB
and
it's url is
jdbc:odbc:DsnProduct
i am thankfull for your support.
[email protected]

hi llturro,
Thanks for answering my question. I have tried out what you suggested, but I still can't fix my problem. The following are the messages that display when I try to run my servlet. It seems that the DataSource, Connection and Statement are ok, however when it comes to the ResultSet the error message appear. What's wrong with my ResultSet coding ?
ResultSet rs = stat.executeQuery("SELECT ISBN FROM BOOKSINFO WHERE ISBN='"+primarykey+"'");
setEntityContext Method
Find by primary key
DataSource OK
Connection OK
Primary Key = 013-00-675721-9
Statement OK
java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
java.rmi.RemoteException: Unknown Exception/Error thrown by EJB method.; nested exception is:
java.lang.NullPointerException
java.rmi.RemoteException: Unknown Exception/Error thrown by EJB method.; nested exception is:
java.lang.NullPointerException
java.lang.NullPointerException
<<no stack trace available>>

Similar Messages

  • New To Oracle.. Needs Help:: Conversion from SQL Server to Oracle 11g

    I am new to Oracle 11g and badly need the conversion of SQL Server Functions to Oracle.. Sample Pasted Code not working .. end with error.. pls help
    Create Table TempT (ID1 Varchar (10),
    ID2 Varchar (10)
    CREATE OR REPLACE PACKAGE GLOBALPKG
    AS
    TYPE RCT1 IS REF CURSOR;
    TRANCOUNT INTEGER := 0;
    IDENTITY INTEGER;
    END;
    CREATE OR REPLACE FUNCTION fTempT
    i IN VARCHAR2 DEFAULT NULL
    RETURN GLOBALPKG.RCT1
    IS
    REFCURSOR GLOBALPKG.RCT1;
    BEGIN
    OPEN REFCURSOR FOR
    SELECT TT.*
    FROM TempT TT
    WHERE (fTempT.i = ''
    OR TT.ID1 = fTempT.i)
    RETURN REFCURSOR;
    END;
    CREATE OR REPLACE FUNCTION fTempTF
    i IN VARCHAR2 DEFAULT NULL
    RETURN GLOBALPKG.RCT1
    IS
    REFCURSOR GLOBALPKG.RCT1;
    BEGIN
    OPEN REFCURSOR FOR
    SELECT *
    FROM TABLE(fTempT(i))
    RETURN REFCURSOR;
    END;
    LAST FUNCTION ENDs WITH ERROR
    Error(13,7): PL/SQL: ORA-22905: cannot access rows from a non-nested table item

    2. The major purpose is to get a simplest way to create a parameterized function who can return a table like output. 2nd function has no use instead i was testing the result of First Function like thisIf you just want to select from a select, you should use a view not a function.
    1. which program is more help ful for writing and executing queries bcoz after using Query Analyzer of Microsoft It seems difficult to work on SQL Developer.
    sqlplus? If you are having difficulty learning new tools because of an old one you used, probably best to forget the old one and concentrate on learning the new one because it will be different. This goes for the database itself also.
    2. Can DMLs be used within a Function.Yes, you just can't execute the function in another SQL statement if it modifies data and this is a good thing.
    3. Can temporary tables be used within a function.Unfortunately yes, but they shouldn't be unless you are in a slowest application competition.
    5. Each Function which is a Table Function must be accompanied with Type Definitions?? its a bit longer way of doing the things than SQL ServerThat is why it is better to use views instead, is there any reason you want a select that you can select from inside a function?
    SQL Server for last 9 years thats why i refer this toolThat is not in itself a problem, if you try and do what you did in SQLServer in Oracle, that will be a problem though.

  • Need help urgently with OS X and Windows 7

    I need help urgently.
    I installed Windows 7 on my macbook pro with OS X Lion. After installing Windows7, I accidently converted the basic volumes to dynamic volumes and now i can't even boot to OS X.
    Please help me how to recover my OS X Lion. If I have to delete Windows and bootcamp partitions, it is OK.
    I just want to get back my OS X bootable.
    Thanks

    thihaoo wrote:
    Sorry
    I can't even see the OS X partition when I hold down the "Option" key.
    I could see OS X and Windows partitions if I hold down Option key before changing the partitions to Dynamic partitions from Basic in Windows 7.
    Now can't see OS X partiton and only see Winodws partition but when I tried to boot onto Windows7 , I got BSOD and macbook pro restart.
    Please help
    The usual reason for the OSX partition to be invisible under these circumstances is that it has been trashed by Windows.
    Do you have a backup?

  • Need help understanding MS SQL Server 2008R2 and Report Builder 3.0 and user access / priviledges.

    Having Problems with connections and access.  I have spent the last 2 days reading various threads regarding SQL Reporting Services pertaining to access and connections.
    First, let me explain what I have done to date.
    1)  I am using Windows 7 - Home Premium.
    2)  I downloaded and installed MS SQL Server 2008 R2 Express.  This was successful.
    3)  I downloaded Report Server 3.0 - This was successful.
    4)  In IE, I tried logging onto http://servername/reports, but this failed.  After logging into IE
    via ' Run Administrator', I was able to access URL.  
           Next, I updated the security / trust sites as explained in the
    threads
    Next, I went to Folder Setting and added my user name and granted all roles (Browser,
    Content Manager, My
    Reports, Publisher and Report Builder).
    5)  Now, I can log into Http://servername/reports using my normal windows 7 user account.
    6)  Next, I opened Report Builder 3.0.  However, I am having trouble connecting to report  
    server.  I tried connecting with
    http://servername/reports, but this failed. 
           However, If I change URL to http://servername/reportserver, it works.  BUT NOW, I have
    another problem.  When I
    execute the RUN button to create report, I get a  permission
    error.  "PERMISSION GRANTED TO USER ARE
    INSUFFICIENT FOR  PERFORMING THIS OPERATION".
    7)  Finally, I can not save reports to http://servername/reportserver when I select "Recent
    Site and Servers".  ERROR
    MESSAGE:  UNABLE TO OPEN OR SAVE REPORT
    8)  In my Reporting Services Configuration Manager:
    Web URL = http://servername:80/ReportServer
    Report Manager URL = http://servername:80/reports.
                What is strange, the Report Manager URL works for IE URL and WEB URL works for
    Report Builder connect (Even though it really does not work). 
    THREE QUESTIONS:
    1)  What URL should I use to connect in Report Builder.  
    2)  How do I update my normal Windows 7 user so I can run reports when I connect to report
    builder.        
    3)  How can I save my reports so they are displayed in IE Reporting services.  Note:  I was
    able to save report to
    documents folder and import into IE Reporting Services.
    4)  And finally, is it possible to add report builder 3.0 as a tab in my IE Reporting Services.  I
    save seen samples of Reporting Services screens where the instructor has Report Builder
    tab.
    Thanks
    Dan

    To answer question 1... it should connect through /ReportServer
    http://bretstateham.com/reporting-services-architecture-diagram%E2%80%A6/
    Report Builder 3.0 is not a web application, it is a client side application can be used using the click-once or downloaded from Microsoft's website.  If you are having issues, you might download and install it and try running it as an administrator.

  • Need help with MS SQL server JDBC driver

    Anyone has experience getting ACS working with SQL2005? We keep getting ‘com.adobe.adept.persist.DatabaseException: java.sql.SQLException: No suitable driver’
    We’re using sqljdbc.jar and sqljdbc4.jar that downloaded from Microsoft website. We added this to every library folder under tomcat, JRE and SDK but it did not help. Any suggestion will be helpful.
    Thanks-

    Hi,
    We have ACS with SQL Server 2005 Std correctly working.
    We have this settings:
    ############ SQL Server Connection ############
    com.adobe.adept.persist.sql.driverClass=com.microsoft.sqlserver.jdbc.SQLServerDriver
    com.adobe.adept.persist.sql.connection=jdbc:sqlserver://ip-addressSQL:PortSQL;databaseName =Adept
    com.adobe.adept.persist.sql.dialect=microsoft
    com.adobe.adept.persist.sql.user=userSQL
    com.adobe.adept.persist.sql.password=passSQL
    Wi use Microsoft SQL Server JDBC Driver 3.0 downloaded from Microsoft website (http://www.microsoft.com/download/en/details.aspx?id=21599)
    Good luck,

  • Username and password- Need help urgently!

    Hi
    1) First of all, i have received an email stating that my account under Removed personal information to comply withCommunity GuidelinesandTerms and Conditions of Use.
    is being banned as there is multiple obsence post. I need to clarify that i have never used my account to post in BBM forum before. Even if i did, is when i need help urgently for my BBM application. Currently i am holding 4 bbms now. Have never came across this issue. Pls check and advise
    2) I urgently need to setup my email accounts. But this time round, when i logged in, they required for my email id and password. And yes my email id is Removed personal information to comply withCommunity GuidelinesandTerms and Conditions of Use. all the while for the past 4 years. I am unable to log in. I tried all kinds of password but unable to log into my mobile settings
    Verfiy Blackberry ID
    This application requires u to verify ur blackberry id to continue.
    blackberry ID username:
    Removed personal information to comply withCommunity GuidelinesandTerms and Conditions of Use.
    password:
    I went to the forget password option, unfortunately as i have never retrieved my password before, i am unable to remember the security question as i did not use it for the past 4 years.
    Pls advise.
    Urgent and thanks

    Hi,
    I have been trying this technique for the past 4 days. It doesnt work no matter how i change the password at the link that u gave me. Even though it's being reset accordingly, i am still unable to log in the password at my mobile. i am 100% sure that i have entered the correct password at my mobile. ( verify blackberry id) . I want to setup new email accounts under "setup" . Upon me clicking " email accounts", it prompt for the one key password. I have never faced this issue before. I am very very sure that my password is correct. Pls advise as i need to add email accounts. Other programs are working fine without any password required being prompt. ie. blackberry world
    This is very very urgent to be resolved. Pls help.

  • I need help authenticating my outgoing server settings in setting up my work email on my Galaxy S5.  It says unable to authenticate or connect to server and I even called helpdesk at my email support and they tried every possible port (80, 25, 3535 or 465

    I need help authenticating my outgoing server settings in setting up my work email on my Galaxy S5.  It says unable to authenticate or connect to server and I even called helpdesk at my email support and they tried every possible port (80, 25, 3535 or 465 SSL) and none of them work. Please help!

    You will need to get the required info to create/access the account with an email client from your school.
    Are you currently accessing the account with an email client on your computer - if you have a Mac with the Mail.app, or if you have a PC with Outlook Express, etc.? If so, you can get the required account settings there.

  • I need to syncronize MS SQL Server 2000 with Oracle DB

    Hello
    I need to syncronize MS SQL Server 2000 with Oracle Database. I have created both DB connections succesfully.
    1. Oracle DB: Oracle (JDBC)
    2. SQL Server JDBC-ODBC (bridge)
    When i create a partner link and select a DB Adapter i try to query SQL Server but it never brings the tables back to me.
    I´ve tried to configure connection 2 (MSSQL) using thrid party but i really don´t know how.
    Driver Class??
    Library?
    Library Name??
    Location??
    Class Path?
    Source Path??
    Doc Path??
    URL??
    help is appreciated. Thank you.
    F.

    Here is my setup:
    Driver Class: com.microsoft.jdbc.sqlserver.SQLServerDriver
    Library: SQLSERVER
    ClassPath: Depends on where your jar file is.
    URL: jdbc:microsoft:sqlserver://your ip address or DNS name goes here.
    The above is how my database connection is defined.
    When I create a partner link and it gets to the screen where it imports tables it takes a while for the "Querying Database Ojects..." to finish. When it does I have not tables. I then select <all schemas> AGAIN and this time I get the tables.
    If you get succeed when you do a test on the connection then I assume the connection is setup right. Perhaps the problem is like mine above and you have to select <all schemas> a second time.

  • Need help urgently, I upgraded my iPhone 4 with new OS 5, but at the last restore failed. Apple Customer Care helped me to resynch my phone with all that available in Library. I've got all back except my Contact no. Pls help guys, thnx

    Need help urgently, I upgraded my iPhone 4 with new OS 5, but at the last restore failed. Apple Customer Care helped me to resynch my phone with all that available in Library. I've got all back except my Contact no. Pls help guys, thnx Plz guys anyone can help plzz....I've lost all contact and I dont even have any secondary back up also...!!!

    If you've had it for less than a year, then it's still under warranty.  Take it to an Apple store or an authorized service facility.  See http://support.apple.com/kb/HT1434

  • BB Curve 8900 need help urgently!!!!!

    hey my blackberry 8900 rebooted but now it says "Reload Software:552" and no matter what buttons I press it just won't work, please tel me what to do I really need help urgently!!
    Solved!
    Go to Solution.

    Before you do anything else:  Do a simple reboot on the BlackBerry in this manner: With the BlackBerry device POWERED ON, remove the battery for a minute, and then reinsert the battery to reboot. A reboot in this manner is prescribed for most glitches and operating system errors, and you will lose no data on the device doing this.
    Please let us know if that reboots the device properly or not.
    1. If any post helps you please click the below the post(s) that helped you.
    2. Please resolve your thread by marking the post "Solution?" which solved it for you!
    3. Install free BlackBerry Protect today for backups of contacts and data.
    4. Guide to Unlocking your BlackBerry & Unlock Codes
    Join our BBM Channels (Beta)
    BlackBerry Support Forums Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • I tried to buy the  WhatsApp app. The card has been charged. but the app wasnt downloaded.i need help Urgently.

    I tried to buy the  WhatsApp app. The card has been charged. but the app wasnt downloaded.i need help Urgently.

    Downloading past purchases from the App Store, iBookstore, and iTunes Store
    To see which iOS version is installed, tap Settings > General > About

  • Sound trouble need help urgent please

    Could somebody tell me how i can fix my problem.
    problem: when my curve 8520 is in silence profile en i start typing in a phnoe number i hear nothing,
    but when my phone is in normal profile i hear i beep with every number of the phone number i enter.
    so i want to know how i can stop my bb from making this noise

    My friend it is a fillable form, can i email you the pdf that iam trying to fill out? then would you be able to tell me how to do it please mate?
    I have attached the form, i need to fill in those boxes so that everything is accuratly height + spacing is correct, and to do it fast, thats all im after.
    Date: Sun, 27 Jun 2010 18:31:58 -0600
    From: [email protected]
    To: [email protected]
    Subject: Need Help Urgent Please
    If is a fillable form, just tab to the next field. What we do not understand from you is IF it is a fillable form or not. If it is not, then the 3 options I gave can be used. Placing text is always a problem. You might find it useful to turn on the grid to help in placing your typewriter fields. However, if it is fillable you do not have to create any fields to type in, you just leave the tool as the hand tool and select the predefined fields with the cursor or the tab key and type accordingly. If the field is a checkbox, then you just use the space key to activate it.
    So, are we talking about a fillable form or something that has the appearance of a form, but not fields to fill in. This is what Bernd has been try to find out and you keep suggesting it is fillable as we read what you have said.
    >

  • Need help with my iPhone 5 and my Macbook Pro.

    Need help with my iPhone 5 and my Macbook Pro.  I was purchased some music on itunes at my mac. Some reason I deleted those music from both on Mac and iPhone 5.  Today, I went to my iPhone iTunes store inside of iCloud to redownload my puchased. But those song won't able to sync back to my iTunes library on my Mac.  Can anyone help me with that ??....
    iPhone 5, iOS 6.0.1

    You've posted to the iTunes Match forum, which your question does not appear to be related to. You'll get better support responses by posting to either the iTunes for Mac or iTunes for Windows forum. Which ever is more appropriate for your situation.

  • TS4268 I need help getting my face time and imessage to work.

    I need help getting my face time and imessage to work. It is saying wating for activation. I just got my iphone 5 2 days ago. I have reset it from the phone and from itunes on the computer, made sure I'm attached to wifi.

    The 3 basic troubleshooting steps are these in order: 1. Restart your iphone  2.  Reset your settings/iphone  3.  Restore your iphone.  Since your iphone is only a couple of days old, you should backup your device before restoring.  If you don't have anything on your iphone that you care to lose, then simply restoring without a backup is fine.  A quick reset of pressing the sleep/wake button (top of iphone) and your home button simultaneously and holding it until the silver Apple logo appears. 

  • Need help urgent,my iphone is stuck at connect to itunes screen.when i restore with itunes it shows error -1. please help me

    need help urgent, my iphone is stuck at connect to itunes screen, when i restore it using itunes, it shows error -1...may someone help me plz....

    See:
    iOS: Unable to Update or Restore
    http://support.apple.com/kb/ht1808

Maybe you are looking for

  • "Save As" window ONLY opens as full screen and is not sizeable

    I am using Reader X version 10.1.6, I just upgraded today HOPING that my issue was addressed, but it was not. Now that Adobe -in it's brilliance - has disabled the "Save" button, users have to be inconvenienced by going to File>>Save As.  When I do t

  • IPhoto organization

    I'm wondering how some other users with lots of photos organize them in iPhoto. I've been struggling with finding the right way for me for a while now and am debating if iPhoto is for me or not. I'm used to and enjoy the 'Windows' way of sorting by h

  • Tech Preview 2: Windows Update

    Since installing an update for Win10 when it changed Windows update to update and recovery in settings. I am no longer able to update through update and recovery. I'm running a completely clean build of Win10 with all the updates (that were installle

  • What is use of chronological key

    hi all when i was trying to perform Time series functions ..why we have to select the chronological key..? i have created time dimension..and i have created year,month,week,day...levels in year level i have added calendar_yaer and calendar_year_id,..

  • I don't have wifi connection.I need to update my software to ios 8.0.2.How can I download it using cellular data?Please help

    I don't have wifi connection.I need to update my software to ios 8.0.2 using cellular data.How can I download using cellular data?.Please help.