Problems accessing tables in oracle database with ejb entity bean

I have created a simple server application that uses an entity bean (version 2.0) for an existing table in oracle database, and a session bean that is used as an outside interface for performing operations on that table.
after deploying the server and client application the client attempts to perform an operation with the session bean remote interface it obtained.
The session bean uses a locale interface to communicate with the entity bean, but when it tries to use its methods (create, findByXXX) it always get the following Exception: java.sql.SQLException: ORA-00942: table or view does not exist.
the table of course exists, and the username password I'm using has all the permissions needed for this table.
note - I'm using the Forte enterprise edition 4.0 as developer tool.
I'll be glad to get some help.
Here is the full stack trace of the exception:
javax.ejb.TransactionRolledbackLocalException: Exception thrown from bean; nested exception is: javax.ejb.EJBException: nested exception is: java.sql.SQLException: ORA-00942: table or view does not exist
javax.ejb.EJBException: nested exception is: java.sql.SQLException: ORA-00942: table or view does not exist
java.sql.SQLException: ORA-00942: table or view does not exist
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:168)
at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:208)
at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:543)
at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1405)
at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteDescribe(TTC7Protocol.java:643)
at oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java:1674)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1870)
at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:363)
at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:314)
at com.sun.ejb.persistence.SQLEngine.ejb20Finder(SQLEngine.java:226)
at com.sun.ejb.persistence.PartitionImpl.ejbFinder(PartitionImpl.java:736)
at com.cti2.telco.core.ejb.entity.userInfo.UserInfoEJB_PM.ejbFindByEmail(UserInfoEJB_PM.java:393)
at com.cti2.telco.core.ejb.entity.userInfo.UserInfoEJB_PM_LocalHomeImpl.findByEmail(UserInfoEJB_PM_LocalHomeImpl.java:64)
at com.cti2.telco.core.ejb.UserManagerEJB.authenticate(UserManagerEJB.java:77)
at com.cti2.telco.core.ejb.UserManagerEJB.authenticate(UserManagerEJB.java:68)
at com.cti2.telco.core.ejb.UserManagerEJB_EJBLocalObjectImpl.authenticate(UserManagerEJB_EJB
LocalObjectImpl.java:63)
at com.cti2.telco.core.ejb.dispatch.TelcoFacadeEJB.userLogin(TelcoFacadeEJB.java:80)
at com.cti2.telco.core.ejb.dispatch.TelcoFacadeEJB_EJBObjectImpl.userLogin(TelcoFacadeEJB_EJBObjectImpl.java:24)
at com.cti2.telco.core.ejb.dispatch._TelcoFacadeEJB_EJBObjectImpl_Tie._invoke(Unknown Source)
at com.sun.corba.ee.internal.POA.GenericPOAServerSC.dispatchToServant(GenericPOAServerSC.java:519)
at com.sun.corba.ee.internal.POA.GenericPOAServerSC.internalDispatch(GenericPOAServerSC.java:204)
at com.sun.corba.ee.internal.POA.GenericPOAServerSC.dispatch(GenericPOAServerSC.java:112)
at com.sun.corba.ee.internal.iiop.ORB.process(ORB.java:273)
at com.sun.corba.ee.internal.iiop.RequestProcessor.process(RequestProcessor.java:84)
at com.sun.corba.ee.internal.orbutil.ThreadPool$PooledThread.run(ThreadPool.java:99)
...

Well it seems like the problems has a simple explanation. The Forte assigns a default table name (<entityName>EJBTable) when creating an entity bean from an existsing table in DB (which is not the same as the one it was created from !!!). Also, for reason unknown, when you deploy these entity beans, it doesn't even create the new table under its new name (even if instructed to).
So using the Forte we managed to use successfuly only entity beans that were created "from scretch" (when deployed their tables are created).
Does anyone know how to change the default name the Forte uses, and make it work properly with entity beans created from an existsing table (without going over the xml's) ?

Similar Messages

  • Access to reach Oracle database with ODBC

    Hello oracle community,
    Oracle 11.1.0.7.0, Access 2007:
    We have an ODBC driver to connect to the oracle database over access. it is working fine, just when we open two instance of access on the same machine, two connections (over same ODBC) to different schema/users and starting a query, he is not able to find the tables of the second connection. it seems like he is using the wrong user. is there any solution or anything we are doing wrong ?
    Ikrischer

    I tried all three options: "use US setttings", "use Microsoft regional settings" and "use Oracle NLS settings", none worked (hope I dont need to reboot for that). When I am working with Toad and make an insert, I can perform an insert statement with '1,5' for a numeric column, everything is fine. When I am trying the same in the access programm (I can enter values there directly into the linked table) I get an error message ora-01722 for the value '1,5'. But if I try to insert 1.5 into access, he is converting it to 15.
    PS: just made another test, not inserting values, just reading records from the table. I opened the table in Excel over the same ODBC driver, everything is fine, the value '1,5' for one record. When I use the same ODBC driver in Access, the vlaue is 15, that is funny. is there a problem in access ?
    Ikrischer
    Edited by: Ikrischer on Mar 23, 2010 2:56 PM

  • Copy access tables to oracle

    Hi, I want to copy access tables to oracle database.
    Till now I have opened the connections to both of them.
    Can anyone explain me what are the next steps?
    Here is the code that I wrote till now:
    String connString = "User Id=******* ;Password=******* ;Data Source=******* ";
    String connString2= " Provider=Microsoft.Jet.OLEDB.4.0;Data Source=E:\\temp.mdb" ;
    OracleConnection oraConnection = new OracleConnection(connString);
    DbConnection accessConnection = new OleDbConnection(connString2);
    // openning the oracle connection
    try
    oraConnection.Open();
    Console.WriteLine("\nHello, Oracle Here!\n");
    Console.WriteLine("Connection String: ");
    Console.WriteLine(oraConnection.ConnectionString.ToString() + "\n");
    Console.WriteLine("Current Connection State: ");
    Console.WriteLine(oraConnection.State.ToString() + "\n");
    Console.WriteLine("Oracle Database Server Version: ");
    Console.WriteLine(oraConnection.ServerVersion.ToString());
    catch (Exception ex)
    Console.WriteLine("Error occured: " + ex.Message);
    finally
    if (oraConnection.State == System.Data.ConnectionState.Open)
    oraConnection.Close();
    //openning the access connection
    try
    accessConnection.Open();
    Console.WriteLine("\nHello, Access Here!\n");
    Console.WriteLine("Connection String: ");
    Console.WriteLine(accessConnection.ConnectionString.ToString() + "\n");
    Console.WriteLine("Current Connection State: ");
    Console.WriteLine(accessConnection.State.ToString() + "\n");
    Console.WriteLine("Microsoft Access Version: ");
    Console.WriteLine(accessConnection.ServerVersion.ToString());
    catch (DbException e)
    Console.WriteLine( "Unable to open database:" + e.Message);
    throw;
    }

    Hi Peter,
    Thanks for the feedback.
    I have replicated the issue also.
    Basically Dutch is not a supported language in SQL Developer.
    SQL Developer fell back on English as the default , but obviously this component, the Apply Button, has an issue.
    Your workaround is correct as it specifically tells SQL Developer to run English rather than waiting for it to fall back to the default language.
    Thanks,
    Dermot.
    SQL Developer Team.

  • EJB entity beans and BC4J

    I have looked at BC4J and it looks good. Buy my question is that isn't this frame work in direct conflict with EJB entity beans. I know lot of stuff that is there in BC4J should have been in EJB enitiy beans, but as a developer why should I go with BC4J and not the standard EJB stuff considering the fact that BC4J is properietery to Oracle?Any thoughts?

    Vimal,
    Without going into exhaustive detail here, I would like to recommend that you take a look at the BC4J Technical White Paper available from the JDeveloper page on OTN (in the 3.0 Technical Information section):
    http://technet.oracle.com/products/jdev/info/techwp20/wp.html
    Amoung other things to note, BC4J is based on pure Java, and is what we consider a 'white box', meaning, you as a developer have complete control over what is going on. You can extend any of the code generated to customize it.
    Primarily though, the major benefit of BC4J is that we have taken care of most of the complicated communication code for you. Communication between the client and the data server, transaction handling, row locking, etc are already written for you. You just use, extend, customize what we have provided.
    In addition, BC4J allows you flexibility in your deployment environment decision. Regardless of where and how you deploy your BC4J Application Module, the client is unchanged.
    Those are the key advantages. Again, for more details, I would take a look at the white paper to see if it more fully addresses your questions.

  • To connect oracle database with ms access database

    i want to connect oracle database with ms access database
    i have follow the following steps
    1. create ms access database.
    2. create system dsn.
    3. make change in listener.ora.
    4. make change in hs folder.
    5.change the tnsname.ora.
    6. lsnrctl stop and lsnrct start.
    7. create database link in oracle sql*plus.
    8.select the table of ms access
    but i have return the foloowing error.
    ORA-12154: TNS:could not resolve the connect identifier specified
    using window 2000, oracle 10g

    Have a look on ths thread, may it helps ...
    Re: copy access data into oracle with form builder 9i

  • Linking Access tables, creating a query with using both Access and Oracle

    Hello,
    I am using 3.0.04.34 version Oracle Developer. I am supposed to create a script/procedure to use both Access tables and oracle tables together. There is an option in developer to copy the access tables into oracle. But it doesn't help me. Because when we updated the access tables
    the copied ones are not be updated. How can I created a linked access tables to oracle and create a query with using both access and oracle table together.
    I will appreciate if you guys help me. I look forward to hearing from you guys.
    Thanks,
    Pinar

    Pinar,
    to be able to query MS Access tables in Oracle you need an additional product, the Oracle Database Gateway for ODBC. It allows you to link any foreign database into an Oracle database using a suitable ODBC driver. You can then access the MS Access tables through a database link based on the Database Gateway for ODBC. This will also allow you to join local Oracle and remote MS Access tables from your Oracle database.
    There's a note on My Oracle Support which gives you more details:Document 233876.1 Options for Connecting to Foreign Data Stores and Non-Oracle Databases - For example - DB2, SQL*Server, Sybase, Informix, Teradata, MySQL
    And there's also a dedicated Forum: Heterogeneous Connectivity

  • Can you access non-Oracle database with HTML DB?

    Can you access non-Oracle database with HTML DB? If not, will this be possible in the future?
    I realize HTML DB is not an open-source product. However, it is necessary sometimes to get non-Oracle database info. JDeveloper supports this. It does not appear to me that HTML DB does. This is a major drawback to it being a product for more potential applications that rely on other database technology such as MySQL, etc.
    If it is possible, is this brain surgery to do it. HTML DB offers fast simplified development and it would be good if it was built in. Does anyone know of an example of accessing non-Oracle database that is available?

    12282,
    In general, HTML DB gives you access to Oracle database facilities. These include heterogeneous services. Please search this forum for keyword "heterogeneous" and you can follow the threads that interest you.
    As for the comparison with brain surgery, I'd rank them about the same in terms of raw thrill.
    Scott

  • Connect ORACLE database with sysdba privileges

    Hi Guru,
    I am connecting to my ORACLE database with my VB application.
    I have problem with connecting to the database with SYSDBA privileges. i.e it is not connecting to the database with SYSDBA privileges.
    If I connect my db from SQLPLUS. Its worked like this..
    Connected to:
    Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.1.0 - Production
    SQL> select Name from v$datafile;
    select Name from v$datafile
    ERROR at line 1:
    ORA-00942: table or view does not exist
    SQL> connect as sysdba;
    Enter user-name: user_1
    Enter password: ****
    Connected.
    SQL> select Name from v$datafile;
    NAME
    C:\NEW\ORADATA\ITPL\SYSTEM01.DBF
    C:\NEW\ORADATA\ITPL\UNDOTBS01.DBF
    C:\NEW\ORADATA\ITPL\CWMLITE01.DBF
    C:\NEW\ORADATA\ITPL\DRSYS01.DBF
    C:\NEW\ORADATA\ITPL\EXAMPLE01.DBF
    C:\NEW\ORADATA\ITPL\INDX01.DBF
    C:\NEW\ORADATA\ITPL\ODM01.DBF
    C:\NEW\ORADATA\ITPL\TOOLS01.DBF
    C:\NEW\ORADATA\ITPL\USERS01.DBF
    C:\NEW\ORADATA\ITPL\XDB01.DBF
    10 rows selected.
    SQL>
    Now in my VB application if I am using following string to connect the database.
    m_adoCnn.ConnectionString = Provider=MSDAORA;Password=pass;User ID=user_1;DBA Privilege=SYSDBA;Data Source=ITPL
    It will connect properly to the database but gives error while executing the query select Name from v$datafile;
    as,
    ORA-00942: table or view does not exist
    Can any body help me in this or provide me proper connection string.

    Hello,
    I am getting below error when i kust Clic k on Test Connection in SSMS:
    TITLE: Microsoft SQL Server Management Studio
    The test connection to the linked server failed.
    ADDITIONAL INFORMATION:
    An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)
    Cannot initialize the data source object of OLE DB provider "OraOLEDB.Oracle" for linked server "test".
    OLE DB provider "OraOLEDB.Oracle" for linked server "test" returned message "ORA-12154: TNS:could not resolve the connect identifier specified". (Microsoft SQL Server, Error: 7303)
    For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.50.4000&EvtSrc=MSSQLServer&EvtID=7303&LinkId=20476
    BUTTONS:
    OK
    Can you please guide is there any other setting i need to do after install Oracle Client ?
    Best Regards,
    Tushar Malvi

  • Connect to oracle database with php script

    Hello!
    How can I connect to an Oracle database with a PHP script? I read about it at www.php.net:
    "Oracle 8 functions; These functions allow you to access Oracle8 and Oracle7 databases. It uses the Oracle8 Call-Interface (OCI8). You will need the Oracle8 client libraries to use this extension."
    Where can I get these libraries from?
    Who knows more about the issue?
    Thanks a lot for your help!
    Martin
    null

    Hello
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by mheibel([email protected]):
    Hello!
    How can I connect to an Oracle database with a PHP script? I read about it at www.php.net:
    "Oracle 8 functions; These functions allow you to access Oracle8 and Oracle7 databases. It uses the Oracle8 Call-Interface (OCI8). You will need the Oracle8 client libraries to use this extension."
    Where can I get these libraries from?
    Who knows more about the issue?
    Thanks a lot for your help!
    Martin<HR></BLOCKQUOTE>
    Install and put working a sqlnet working client (install the Oracle Client option of the Oracle Database CD ROM). Than compile php with the --oci option. Than try the samples in php.net (oci function in the help).
    These are the steps... Put everything working is a little more complicated...
    FS
    null

  • How to connect oracle database with JAVA

    how to connect oracle database with JAVA....
    using j2sdk and Jcreator . which connector to use .. what are the code for that ..

    PLEASE .... Ask in an Oracle Java forum.
    And read the documentaiton. There is a whole document devoted to doing that. http://download.oracle.com/docs/cd/B19306_01/java.102/b14355/toc.htm has examples.
    PLEASE ... do not ask product questions in a forum which clearly has a title saying it is devoted to assisting with download problems.

  • How to copy sql database tables to oracle database

    hii everybody,
    i have 50 sql databse tables and i want to copy these tables into oracle database,how can i achive this?.Any help highly appreciated.
    thanks.

    Hi,
    You haven't said if this is a one-off copy of the data or if it is comething you want to do on a regular basis.
    If it is a one-off move of the data then you could use the SQL*Developer migration workbench, see here for more details -
    SQL*Developer main page -
    http://www.oracle.com/technetwork/developer-tools/sql-developer/overview/index.html
    Database Migration technology -
    http://www.oracle.com/technetwork/database/migration/index-084442.html
    If it is something you want to do on a regular basis then you could use a gateway to make a connection between SQL*Server and Oracle and then copy or select from the remote tables.
    The following page has more detail -
    http://www.oracle.com/technetwork/database/gateways/index.html
    and this note if you have access to My Oracle Support -
    Master Note for Oracle Gateway Products (Doc ID 1083703.1)
    You could also use GoldenGate which allows real-time replication between Oracle and non-Oracle databases -
    http://www.oracle.com/technetwork/middleware/goldengate/overview/index.html
    Regards,
    Mike

  • Data in access tables to oracle tables

    Hi
    I want to load data from MS Access tables to oracle tables .
    Can any on help me to in this
    regards
    rajesh

    If you only want to export a few tables from Access to Oracle once, I would suggest to use the export functionality of MS Access. To do this you need to install an Oracle Client and further use ODBC to export the data/tables to your Oracle database.
    To avoid failures concerning the datatype transformation, I suggest to use the Oracle ODBC driver.

  • HOW TO APPEND TABLE ON ORACLE DATABASE?

    DEAR ALL,
    CAN ANY ONE SUGGEST ME WITH SOME SAMPLE CODE AS TO HOW TO UPDATE AND APPEND TABLE ON ORACLE DATABASE USING SQL.
    EXEC SQL.
    APPEND TABLE FROM INT-TABLE.
    END EXEC.
    WILL THIS WORK.

    Check the sample code:
    DATA Y TYPE I VALUE 300.
    DATA Z TYPE I.
    EXEC SQL.
      INSERT INTO AVERI_CLNT (CLIENT, ARG1, ARG2, ARG3)
             VALUES ('000', 9, 2, 47)
    ENDEXEC.
    DATA: F1(3), F2(3), F3(3).
    F3 = ' 1 '.
    EXEC SQL PERFORMING WRITE_AVERI_CLNT.
      SELECT CLIENT, ARG1 INTO :F1, :F2 FROM AVERI_CLNT
             WHERE ARG2 = :F3
    ENDEXEC.
    FORM WRITE_AVERI_CLNT.
      WRITE: / F1, F2.
    ENDFORM.
    Check the below link:
    http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3b8b358411d1829f0000e829fbfe/frameset.htm
    Regards,
    Prakash.

  • Driver problem to connect the oracle database

    sir
    i want to use oracle 8.0 database at the backend in my project
    i want that it is platform indpendent but
    so i access that it is achive when i am not use the odbc driver
    In xp the oracle not connect with my application
    and in win98 some time it is connected to the application by
    the odbc driver.
    can it is possible that i use oracle database with out use of ODBC bridge in all Microsoft opertaing system types that is win 98,2000,XP
    and NT
    if yes how please help me and where i found the driver for oracle
    with no price.
    also how can i made the connection with my application.
    thanks in advance

    First:
    post this in the approriate forum. This is for Swing questions, not for database driver questions. You have more luck in the JDBC forum, but still this isn't really a Java/JDBC question.
    Second:
    try to use the search before posting a question. Questions regarding the ODBC bridge are posted about 5 times a day (in the JDBC forum)!
    Third:
    to answer your question: download the Type 4 JDBC driver from otn.oracle.com. You can use it with every JDK on every platform.

  • Querying SQL server table from Oracle database 11g

    Hi all
    We are using oracle database 11g R2 on REL 5 and i have an SQL server database used by one of our application.
    In my Oracle database, i want to query one table in my SQL server database and to link it in a table in Oracle database to compare data.
    Is there a way like database link or something else to do this need>
    Please send a link or pots here step by step the way on how to accomplish my query.
    Thank you.

    Yes, you can set up your SQL Server as an external database link, using Oracle Heterogeneous Services with SQL Server as an ODBC connection (easier to do if your Oracle server is a Windows server, a little more tricky if your Oracle server is *nix based)
    Here's the documentation... for 11gR2
    http://www.oracle.com/pls/db112/search?remark=quick_search&word=heterogeneous+services

Maybe you are looking for