MYSQL + JDEVELOPER

My friends, i need rum ADF BC and faces with mysql or postgree.
I followed this link http://www.oracle.com/technology/products/jdev/howtos/10g/MySql/MySQL_and_BC_HowTo.html
to configure the Jdeveloper.
I create a test.jspx put a table into this page by datacontrol when a run, the log show the follow error:
==============================
[Starting OC4J using the following ports: HTTP=8988, RMI=23891, JMS=9227.]
C:\Documents and Settings\asrf0\Dados de aplicativos\JDeveloper\system11.1.1.0.17.45.24\o.j2ee\embedded-oc4j\config>
"C:\Documents and Settings\asrf0\Desktop\jdevstudio1111\jdk\bin\javaw.exe" -client "-Doracle.home=C:\Documents and Settings\asrf0\Desktop\jdevstudio1111" -classpath "C:\Documents and Settings\asrf0\Desktop\jdevstudio1111\j2ee\home\oc4j.jar;C:\Documents and Settings\asrf0\Desktop\jdevstudio1111\jdev\lib\jdev-oc4j-embedded.jar" -Xverify:none -XX:MaxPermSize=256m -DcheckForUpdates=adminClientOnly -Doracle.application.environment=development -Doracle.j2ee.dont.use.memory.archive=true -Doracle.j2ee.http.socket.timeout=500 -Doc4j.jms.usePersistenceLockFiles=false oracle.oc4j.loader.boot.BootStrap -config "C:\Documents and Settings\asrf0\Dados de aplicativos\JDeveloper\system11.1.1.0.17.45.24\o.j2ee\embedded-oc4j\config\server.xml"
[waiting for the server to complete its initialization...]
23/05/2007 08:37:50 oracle.dms.trace.TraceManager record_config
INFO: TransactionTracing is enabled at MIN level
23/05/2007 08:38:01 oracle.j2ee.util.LoggingUtils logAndReturnMessage
WARNING: Exception creating connection pool. Exception: oracle.oc4j.sql.config.DataSourceConfigException: Unable to create : com.mysql.jdbc.Driver
23/05/2007 08:38:01 oracle.j2ee.connector.logging.JCADeploymentMessages severeInitConnector
SEVERE: Ocorreu um erro ao inicializar os conectores.
07/05/23 08:38:01 WARNING: Application.setConfig Application: current-workspace-app is in failed state as initialization failed.
java.lang.InstantiationException: Exception creating connection pool. Exception: oracle.oc4j.sql.config.DataSourceConfigException: Unable to create : com.mysql.jdbc.Driver
     at com.evermind.server.ApplicationStateRunning.initConnector(ApplicationStateRunning.java:1418)
     at com.evermind.server.ApplicationStateRunning.initConnectors(ApplicationStateRunning.java:362)
     at com.evermind.server.ApplicationStateRunning.initializeApplication(ApplicationStateRunning.java:188)
     at com.evermind.server.Application.setConfig(Application.java:501)
     at com.evermind.server.Application.setConfig(Application.java:399)
     at com.evermind.server.ApplicationServer.addApplication(ApplicationServer.java:2039)
     at com.evermind.server.ApplicationServer.initializeDeployedApplications(ApplicationServer.java:1795)
     at com.evermind.server.ApplicationServer.setConfig(ApplicationServer.java:1146)
     at com.evermind.server.ApplicationServerLauncher.run(ApplicationServerLauncher.java:129)
     at java.lang.Thread.run(Thread.java:595)
23/05/2007 08:38:01 com.evermind.server.ServerMessages warningApplicationInitializationFailed
WARNING: Exception initializing deployed application: current-workspace-app. Application: current-workspace-app is in failed state as initialization failed
23/05/2007 08:38:11 com.evermind.server.http.HttpMessages internalErrorWhileTryingToInstantiate
SEVERE: Internal error raised tyring to instantiate web-application: Application2-ViewController-webapp defined in web site OC4J 10g (10.1.3) Default Web Site. Application: current-workspace-app does not exist. Error creating Web application: Application2-ViewController-webapp
Ready message received from Oc4jNotifier.
Embedded OC4J startup time: 34797 ms.
Target URL -- http://127.0.0.1:8988/Application2-ViewController-context-root/faces/teste.jspx
07/05/23 08:38:11 Oracle Containers for Java EE (11.1.1.0.0) Technology Preview initialized
Someone can help me ?

Unable to create : com.mysql.jdbc.Driver
Add the MySQL JDBC JAR file to the C:\JDeveloper\BC4J\lib

Similar Messages

  • MySQL/JDeveloper JDBC - Losing Connection

    I am working on a Java Web Application project using JDeveloper (9.0.5.1 Build 1605) while connecting to a mySQL database (4.0.18-max-nt). My application works fine up a certain number of connection. After that, I receive the following error message:
    -<snip>-
    java.sql.SQLException: Unable to connect to any hosts due to exception: java.lang.NullPointerException
    at com.mysql.jdbc.Connection.createNewIO(Connection.java:1719)
    at com.mysql.jdbc.Connection.<init>(Connection.java:432)
    at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:400)
    at java.sql.DriverManager.getConnection(DriverManager.java:512)
    at java.sql.DriverManager.getConnection(DriverManager.java:193)
    at model.NodeSummary.makeConnection(NodeSummary.java:229)
    at model.NodeSummary.getIDs(NodeSummary.java:391)
    -<snip>-
    Based on some testing I've done, I can make up to a certain number of connections, than the next one fails. I've searched the web and it appears others have had this same problem. One person fixed the problem by switching to Tomcat.
    Is there a solution to this? Do I also have to switch to Tomcat?
    Thanks,
    Mark

    I'd check the bug reports for the mysql jdbc driver to see if this is a known issue, if not send them a bug report, it sounds like one.
    Rob
    Team JDev

  • MySQL Jdeveloper 10.1.3 Create Entity Object problem

    Hi,
    when I try to add new Entity Object in model i get:
    Error returning tables
    com.mysql.jdbc.Ststement
    Exception: java.lang.ClassCastException
    Exception Stack Trace:
    java.lang.ClassCastException: com.mysql.jdbc.Statement
         at oracle.jbo.server.OracleSQLBuilderImpl.getTables(OracleSQLBuilderImpl.java:2852)
         at oracle.jbo.dt.ui.main.DtuUtil.getTableList(DtuUtil.java:1061)
         at oracle.jbo.dt.ui.pkg.PKTableOptionPanel.getTableList(PKTableOptionPanel.java:482)
         at oracle.jbo.dt.ui.entity.EOTableListThread.run(EONamePanel.java:1300)
    If i want to create bussines component from table everything is ok. But there is a
    problem if I want to add some new Entity Object.
    Any solutions?
    Thnx.

    This works ok for me so I don't think its a Jdev 10.1.3 issue - more likely a configuration / version issue.
    I'm using MySQL 10.0.15; mysql-connector-java-3.3.11-bin.jar
    Below are my configuration notes - I never encountered this error, but thought I would share my config notes to possibly help review a config that is working:
    Oracle Jdeveloper – Tools | Default Project Properties
    1.     Set up MySQL User Library - Configure JDeveloper to work with MySQL Connector/J Download MySQL Connector/J 3.0.11 and copy the JDBC driver JAR file to a known location, such as /jdev/lib From the Tools menu, select Default Project Properties. In the tree view, select Libraries. In the right pane, select New. The Create Library dialog will be displayed. Name the library MySQL JDBC. Set the location to Users Libraries. Click Edit for the Class Path. The Edit Class Path dialog is displayed. Click Add Entry. The Select Path Entry dialog is displayed. Navigate to the JAR file for the MySQL Connect/J JDBC driver (it should be called something like mysql-connector-java- -bin.jar). Click on the .jar file and click Select. Click OK; Under Libraries, ensure MySQL JDBCchecked
    2. To use MySQL with BC4J: Add the MySQL JDBC JAR file to <JDeveloper10.1.3>\BC4J\lib directory (note there are some other posts on this topic)
    thanks
    Tom
    PS - also noticed in your message:
    com.mysql.jdbc.Ststement
    probabley should be 'Statement' - was this something you typed in your config - if so, could possibly be a type-o

  • Can't get JDeveloper/OC4J to auto-create MySQL table

    My EJB 3.0 based application is failing to create the MySQL table specified by the @TableGenerator annotation.
    Following are the details of my setup and application:
    System Setup:
    - JDeveloper 10.1.3.1.0
    - JDK 1.5.0_07
    - Ubuntu Linux kernel 2.6.15-27-k7
    - MySQL 5.0
    - MySQL ConnectorJ 3.1.13
    - Using the embedded OC4J server.
    I have done the following so far:
    1. Created a database in MySQL called, "test". Did not create any tables.
    2. Created a JDeveloper library whose classpath contains the MySQL ConnectorJ JAR file, and tested a database connection from JDeveloper successfully.
    3. Added the MySQL/JDeveloper library to my ejb project, "Test1/Model", and selected the database connection from the project properties EJB panel. The database connector is called, "SmashDB". Selecting the database connector on the EJB panel resulted in JDeveloper setting "SmashDBDS" as the default datasource.
    A JSF managed bean calls an EJB Session Bean, CustomerFacadeBean.persistEntity(Customer customer) with a Customer object as a parameter to save in the database. OC4J successfully connects to the MySQL "test" database, but fails when trying to access the ID_GENERATOR table, which is specified in an @TableGenerator annotation. The class-level annotations in the Customer entity are as follows:
    @Entity
    @NamedQuery(name = "Customer.findAll", query = "select o from Customer o")
    @TableGenerator(name = "BasicIDGen", table = "ID_GENERATOR", pkColumnName = "GEN_KEY",
    pkColumnValue = "CUSTOMER_ID", valueColumnName = "GEN_VALUE")
    public class Customer implements Serializable {
    private Long id;
    private Integer version;
    private String firstName;
    private String lastName;
    private String emailAddr;
    My persistence.xml file contains:
    <?xml version="1.0" encoding="UTF-8" ?>
    <persistence xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
    version="1.0" xmlns="http://java.sun.com/xml/ns/persistence">
    <persistence-unit name="Model">
    <properties>
    <property name="toplink.ddl-generation" value="drop-and-create-tables"/>
    </properties>
    </persistence-unit>
    </persistence>
    With the above definition for Customer and persistence.xml, I expected the ID_GENERATOR and CUSTOMER tables to be created automatically, but this doesn't seem to be happening.
    Instead, I get the following error message and stack trace:
    2006-09-27 12:25:29.564 ERROR J2EE EJB-08006 [CustomerFacade:public java.lang.Object facade.CustomerFacadeBean.persistEntity(java.lang.Object)] exception occurred during method invocation: oracle.oc4j.rmi.OracleRemoteException: Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2006.7 (Build 060720)): oracle.toplink.essentials.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: Table 'test.ID_GENERATOR' doesn't existError Code: 1146
    Call:UPDATE ID_GENERATOR SET GEN_VALUE = GEN_VALUE + ? WHERE GEN_KEY = ?
         bind => [50, CUSTOMER_ID]
    Query:DataModifyQuery(); nested exception is:
         Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2006.7 (Build 060720)): oracle.toplink.essentials.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: Table 'test.ID_GENERATOR' doesn't existError Code: 1146
    Call:UPDATE ID_GENERATOR SET GEN_VALUE = GEN_VALUE + ? WHERE GEN_KEY = ?
         bind => [50, CUSTOMER_ID]
    etc.....
    Help would be greatly appreciated. I've gotten to this point, which appears to be one error away from success (I hope) but don't have a clue what this problem is caused by.
    Thanks,
    Rick Horowitz

    darby wrote:
    I can't get this to compile. help!
    You can not issue DDL in PL/SQL. You need to use dynamic SQL for that:
    create or replace
    PROCEDURE CREATE_STAGING_TABLES as
    BEGIN
      -- I CAN'T GET THIS TO WORK BUT I CAN COPY THESE LINES AND RUN THEM AND THEY WORK! WHATUP?
      DBMS_OUTPUT.PUT_LINE('Begin Create Import Tables');
      EXECUTE IMMEDIATE 'Create table FAC_STAGING_PROJECTS As select * from FAC_PROJECTS where 1=2';
        EXECUTE IMMEDIATE 'alter table FAC_STAGING_PROJECTS add(ERROR_DESCRIPTION VARCHAR2(4000 CHAR))';
        EXECUTE IMMEDIATE 'alter table FAC_STAGING_PROJECTS add(bImported NUMBER)';
        EXECUTE IMMEDIATE 'alter table FAC_STAGING_PROJECTS add(dteImported DATE)';
      EXECUTE IMMEDIATE 'Create table FAC_STAGING_PURCHASE_ORDERS As select * from FAC_PURCHASE_ORDERS where 1=2';
        EXECUTE IMMEDIATE 'alter table FAC_STAGING_PURCHASE_ORDERS add(ERROR_DESCRIPTION VARCHAR2(4000 CHAR))';
        EXECUTE IMMEDIATE 'alter table FAC_STAGING_PURCHASE_ORDERS add(bImported NUMBER)';
        EXECUTE IMMEDIATE 'alter table FAC_STAGING_PURCHASE_ORDERS add(dteImported DATE)';
      DBMS_OUTPUT.PUT_LINE('End Create Import Tables'); 
      EXCEPTION
       WHEN OTHERS THEN
         raise_application_error(-20022,substr(SQLERRM,1,255));
    END CREATE_STAGING_TABLES;SY.
    P.S. I am not questioning why do you need to create tables from a stored procedure.

  • JDeveloper 10.1.2 with MySQL and PostgreSQL

    I'm testing JDeveloper 10.1.2 business components with mysql or postgresql because my company needs to connect also to these non-oracle DBs. ADF suits our developement needs, in speed and functionalities; anyway to make it our main developement system we need it to be compatible.
    I made three tests and they were all disappointing.
    At first, I installed MySQL 4.0 on my windows machine. I used the stable Connector/J 3.1
    and then MySQL Connector/J 3.0, but in both cases JDeveloper had a strange behaviour: I can make the connection, I can navigate correctly through all tables in the connection-navigator, I see all the column names etc... Anyway, as I try to build a "new Entity Object" from a table, there are no available table properties, like if the table had no columns.
    In this forum I only found documentation about rowid problems with mysql, but nothing about Entity Object wizard issues.
    Then I switched to PostgreSQL. I installed it locally, so I had to choose the 8.01 since I'm on a windows machine. JDBC driver: postgresql-8.0-310 jdbc3
    The developement test phase went ok, it is possible to use this DB just as if it was a Oracle, all the business components wizards works perfectly.
    The problem is at runtime, unfortunately. I built a simple datapage on the struts-config diagram and I dragged on it a "read-only table" from the data control palette.
    As I run the application, the embedded OC4J immediately returns this error:
    oracle.jbo.JboException: JBO-29000: JBO-29000: JBO-29000: JBO-26061: Errore durante lapertura della connessione JDBC.
    at oracle.jbo.JboException.<init>(JboException.java:343)
    (in english: Error during JDBC connection)
    There are no other available JDBC drivers for JVM 1.4x so I see no solution...
    I also tried to connect to an older PostgresSQL with its (older) JDBC but I get same the result.
    Anyone can help? Is it a JDev 10.1.2 issue?

    Hi Paolo.
    I'm also doing such tests.
    I did not ran into these problems because I created the busisness componentes using an Oracle connection first.
    After that, I switched the datatype of the table columns in the entity object to meet the SQL92 criteria ( like changing NUMBER(n) to INTEGER ).
    And then, I switched the connection to the postgreSQL or MySQL. This worked fine for me.
    But, the other big problem you will face is related to updating records using postgreSQL connection.
    Please see my post "Problem updating records using BC4J with foreign data sources" Problem updating records using BC4J with foreign data sources
    It would by fine if we help each other to solve this problems.
    Thanks
    Denis

  • Unable to create : com.mysql.jdbc.Driver error with JDeveloper 10.1.3

    Hi all,
    I got this error when I tried to execute a simple JSF app. I am using JDeveloper 10.1.3 release edition. Please advice
    [Starting OC4J using the following ports: HTTP=8988, RMI=23891, JMS=9227.]
    **** Unable to obtain password from principals.xml. Using default.
    C:\JDeveloper10g\jdev\system\oracle.j2ee.10.1.3.36.73\embedded-oc4j\config>
    C:\JDeveloper10g\jdk\bin\javaw.exe -ojvm -classpath C:\JDeveloper10g\j2ee\home\oc4j.jar;C:\JDeveloper10g\jdev\lib\jdev-oc4j-embedded.jar -Xverify:none -DcheckForUpdates=adminClientOnly -Doracle.application.environment=development -Doracle.j2ee.dont.use.memory.archive=true -Doracle.j2ee.http.socket.timeout=500 -Doc4j.jms.usePersistenceLockFiles=false oracle.oc4j.loader.boot.BootStrap -config C:\JDeveloper10g\jdev\system\oracle.j2ee.10.1.3.36.73\embedded-oc4j\config\server.xml
    [waiting for the server to complete its initialization...]
    2006-01-31 21:40:47.062 NOTIFICATION Auto-unpacking C:\JDeveloper10g\jdev\system\oracle.j2ee.10.1.3.36.73\embedded-oc4j\applications\dms.war...
    2006-01-31 21:40:47.093 NOTIFICATION Unjar C:\JDeveloper10g\jdev\system\oracle.j2ee.10.1.3.36.73\embedded-oc4j\applications\dms.war in C:\JDeveloper10g\jdev\system\oracle.j2ee.10.1.3.36.73\embedded-oc4j\applications\dms
    2006-01-31 21:40:47.093 NOTIFICATION Finished auto-unpacking C:\JDeveloper10g\jdev\system\oracle.j2ee.10.1.3.36.73\embedded-oc4j\applications\dms.war
    2006-01-31 21:40:47.156 NOTIFICATION Auto-unpacking C:\JDeveloper10g\jdev\system\oracle.j2ee.10.1.3.36.73\embedded-oc4j\connectors\datasources\datasources.rar...
    2006-01-31 21:40:47.156 NOTIFICATION Unjar C:\JDeveloper10g\jdev\system\oracle.j2ee.10.1.3.36.73\embedded-oc4j\connectors\datasources\datasources.rar in C:\JDeveloper10g\jdev\system\oracle.j2ee.10.1.3.36.73\embedded-oc4j\connectors\datasources\datasources
    2006-01-31 21:40:47.171 NOTIFICATION Finished auto-unpacking C:\JDeveloper10g\jdev\system\oracle.j2ee.10.1.3.36.73\embedded-oc4j\connectors\datasources\datasources.rar
    2006-01-31 21:40:47.218 NOTIFICATION Auto-unpacking C:\JDeveloper10g\jdev\system\oracle.j2ee.10.1.3.36.73\embedded-oc4j\applications\bc4j.ear...
    2006-01-31 21:40:47.281 NOTIFICATION Unjar C:\JDeveloper10g\jdev\system\oracle.j2ee.10.1.3.36.73\embedded-oc4j\applications\bc4j.ear in C:\JDeveloper10g\jdev\system\oracle.j2ee.10.1.3.36.73\embedded-oc4j\applications\bc4j
    2006-01-31 21:40:47.359 NOTIFICATION Finished auto-unpacking C:\JDeveloper10g\jdev\system\oracle.j2ee.10.1.3.36.73\embedded-oc4j\applications\bc4j.ear
    2006-01-31 21:40:47.375 NOTIFICATION Auto-unpacking C:\JDeveloper10g\jdev\system\oracle.j2ee.10.1.3.36.73\embedded-oc4j\applications\bc4j\webapp.war...
    2006-01-31 21:40:47.375 NOTIFICATION Unjar C:\JDeveloper10g\jdev\system\oracle.j2ee.10.1.3.36.73\embedded-oc4j\applications\bc4j\webapp.war in C:\JDeveloper10g\jdev\system\oracle.j2ee.10.1.3.36.73\embedded-oc4j\applications\bc4j\webapp
    2006-01-31 21:40:59.296 NOTIFICATION Finished auto-unpacking C:\JDeveloper10g\jdev\system\oracle.j2ee.10.1.3.36.73\embedded-oc4j\applications\bc4j\webapp.war
    2006-01-31 21:41:08.421 WARNING J2EE OJR0107 Exception creating connection pool. Exception: oracle.oc4j.sql.config.DataSourceConfigException: Unable to create : com.mysql.jdbc.Driver
    06/01/31 21:41:08 SEVERE: ApplicationStateRunning.initConnector Error occurred initializing connectors. Exception is: Exception creating connection pool. Exception: oracle.oc4j.sql.config.DataSourceConfigException: Unable to create : com.mysql.jdbc.Driver
    Jan 31, 2006 9:41:08 PM com.evermind.server.ApplicationStateRunning initConnector
    SEVERE: Error occurred initializing connectors. Exception is: Exception creating connection pool. Exception: oracle.oc4j.sql.config.DataSourceConfigException: Unable to create : com.mysql.jdbc.Driver
    06/01/31 21:41:08 SEVERE: ApplicationStateRunning.initConnector Stack trace: oracle.oc4j.sql.DataSourceException: Exception creating connection pool. Exception: oracle.oc4j.sql.config.DataSourceConfigException: Unable to create : com.mysql.jdbc.Driver
         at com.evermind.server.ApplicationStateRunning.initDataSourceConnectionPool(ApplicationStateRunning.java:2016)
         at com.evermind.server.ApplicationStateRunning.initDataSourceConnector(ApplicationStateRunning.java:1961)
         at com.evermind.server.ApplicationStateRunning.initConnector(ApplicationStateRunning.java:1220)
         at com.evermind.server.ApplicationStateRunning.initConnectors(ApplicationStateRunning.java:356)
         at com.evermind.server.ApplicationStateRunning.initializeApplication(ApplicationStateRunning.java:208)
         at com.evermind.server.Application.setConfig(Application.java:391)
         at com.evermind.server.Application.setConfig(Application.java:309)
         at com.evermind.server.ApplicationServer.addApplication(ApplicationServer.java:1771)
         at com.evermind.server.ApplicationServer.initializeDeployedApplications(ApplicationServer.java:1532)
         at com.evermind.server.ApplicationServer.setConfig(ApplicationServer.java:939)
         at com.evermind.server.ApplicationServerLauncher.run(ApplicationServerLauncher.java:113)
         at java.lang.Thread.run(Thread.java:595)
    Caused by: javax.resource.ResourceException: oracle.oc4j.sql.config.DataSourceConfigException: Unable to create : com.mysql.jdbc.Driver
         at oracle.oc4j.sql.spi.ResourceAdapterImpl.createDataSourceConnectionPool(ResourceAdapterImpl.java:106)
         at oracle.oc4j.sql.DataSourceUtils.getDataSourceConnectionPool(DataSourceUtils.java:322)
         at com.evermind.server.ApplicationStateRunning.initDataSourceConnectionPool(ApplicationStateRunning.java:1997)
         ... 11 more
    Caused by: oracle.oc4j.sql.config.DataSourceConfigException: Unable to create : com.mysql.jdbc.Driver
         at oracle.oc4j.sql.config.DataSourceConfigUtils.createConnectionFactory(DataSourceConfigUtils.java:247)
         at oracle.oc4j.sql.DataSourceConnectionPoolImpl.<init>(DataSourceConnectionPoolImpl.java:107)
         at oracle.oc4j.sql.spi.ResourceAdapterImpl.createDataSourceConnectionPool(ResourceAdapterImpl.java:99)
         ... 13 more
    Caused by: oracle.classloader.util.AnnotatedClassNotFoundException:
         Missing class: com.mysql.jdbc.Driver
         Dependent class: oracle.oc4j.sql.config.DataSourceConfigUtils
         Loader: oc4j:10.1.3
         Code-Source: /C:/JDeveloper10g/j2ee/home/lib/oc4j-internal.jar
         Configuration: <code-source> in META-INF/boot.xml in C:\JDeveloper10g\j2ee\home\oc4j.jar
    This load was initiated at current-workspace-app.root:0.0.0 using the Class.forName() method.
    The missing class is not available from any code-source or loader in the system.
         at oracle.classloader.PolicyClassLoader.handleClassNotFound(PolicyClassLoader.java:2061)
         at oracle.classloader.PolicyClassLoader.internalLoadClass(PolicyClassLoader.java:1665)
         at oracle.classloader.PolicyClassLoader.loadClass(PolicyClassLoader.java:1621)
         at oracle.classloader.PolicyClassLoader.loadClass(PolicyClassLoader.java:1606)
         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Class.java:242)
         at oracle.oc4j.sql.config.DataSourceConfigUtils.createConnectionFactory(DataSourceConfigUtils.java:244)
         ... 15 more
    Jan 31, 2006 9:41:08 PM com.evermind.server.ApplicationStateRunning initConnector
    SEVERE: Stack trace: oracle.oc4j.sql.DataSourceException: Exception creating connection pool. Exception: oracle.oc4j.sql.config.DataSourceConfigException: Unable to create : com.mysql.jdbc.Driver
         at com.evermind.server.ApplicationStateRunning.initDataSourceConnectionPool(ApplicationStateRunning.java:2016)
         at com.evermind.server.ApplicationStateRunning.initDataSourceConnector(ApplicationStateRunning.java:1961)
         at com.evermind.server.ApplicationStateRunning.initConnector(ApplicationStateRunning.java:1220)
         at com.evermind.server.ApplicationStateRunning.initConnectors(ApplicationStateRunning.java:356)
         at com.evermind.server.ApplicationStateRunning.initializeApplication(ApplicationStateRunning.java:208)
         at com.evermind.server.Application.setConfig(Application.java:391)
         at com.evermind.server.Application.setConfig(Application.java:309)
         at com.evermind.server.ApplicationServer.addApplication(ApplicationServer.java:1771)
         at com.evermind.server.ApplicationServer.initializeDeployedApplications(ApplicationServer.java:1532)
         at com.evermind.server.ApplicationServer.setConfig(ApplicationServer.java:939)
         at com.evermind.server.ApplicationServerLauncher.run(ApplicationServerLauncher.java:113)
         at java.lang.Thread.run(Thread.java:595)
    Caused by: javax.resource.ResourceException: oracle.oc4j.sql.config.DataSourceConfigException: Unable to create : com.mysql.jdbc.Driver
         at oracle.oc4j.sql.spi.ResourceAdapterImpl.createDataSourceConnectionPool(ResourceAdapterImpl.java:106)
         at oracle.oc4j.sql.DataSourceUtils.getDataSourceConnectionPool(DataSourceUtils.java:322)
         at com.evermind.server.ApplicationStateRunning.initDataSourceConnectionPool(ApplicationStateRunning.java:1997)
         ... 11 more
    Caused by: oracle.oc4j.sql.config.DataSourceConfigException: Unable to create : com.mysql.jdbc.Driver
         at oracle.oc4j.sql.config.DataSourceConfigUtils.createConnectionFactory(DataSourceConfigUtils.java:247)
         at oracle.oc4j.sql.DataSourceConnectionPoolImpl.<init>(DataSourceConnectionPoolImpl.java:107)
         at oracle.oc4j.sql.spi.ResourceAdapterImpl.createDataSourceConnectionPool(ResourceAdapterImpl.java:99)
         ... 13 more
    Caused by: oracle.classloader.util.AnnotatedClassNotFoundException:
         Missing class: com.mysql.jdbc.Driver
         Dependent class: oracle.oc4j.sql.config.DataSourceConfigUtils
         Loader: oc4j:10.1.3
         Code-Source: /C:/JDeveloper10g/j2ee/home/lib/oc4j-internal.jar
         Configuration: <code-source> in META-INF/boot.xml in C:\JDeveloper10g\j2ee\home\oc4j.jar
    This load was initiated at current-workspace-app.root:0.0.0 using the Class.forName() method.
    The missing class is not available from any code-source or loader in the system.
         at oracle.classloader.PolicyClassLoader.handleClassNotFound(PolicyClassLoader.java:2061)
         at oracle.classloader.PolicyClassLoader.internalLoadClass(PolicyClassLoader.java:1665)
         at oracle.classloader.PolicyClassLoader.loadClass(PolicyClassLoader.java:1621)
         at oracle.classloader.PolicyClassLoader.loadClass(PolicyClassLoader.java:1606)
         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Class.java:242)
         at oracle.oc4j.sql.config.DataSourceConfigUtils.createConnectionFactory(DataSourceConfigUtils.java:244)
         ... 15 more
    06/01/31 21:41:08 WARNING: Application.setConfig Application: current-workspace-app is in failed state as initialization failedjava.lang.InstantiationException: Error occurred initializing connectors. Exception is: Exception creating connection pool. Exception: oracle.oc4j.sql.config.DataSourceConfigException: Unable to create : com.mysql.jdbc.Driver
    Jan 31, 2006 9:41:08 PM com.evermind.server.Application setConfig
    WARNING: Application: current-workspace-app is in failed state as initialization failedjava.lang.InstantiationException: Error occurred initializing connectors. Exception is: Exception creating connection pool. Exception: oracle.oc4j.sql.config.DataSourceConfigException: Unable to create : com.mysql.jdbc.Driver
    2006-01-31 21:41:08.531 WARNING J2EE 0JR0013 Exception initializing deployed application: current-workspace-app. Error occurred initializing connectors. Exception is: Exception creating connection pool. Exception: oracle.oc4j.sql.config.DataSourceConfigException: Unable to create : com.mysql.jdbc.Driver
    Ready message received from Oc4jNotifier.
    Embedded OC4J startup time: 29125 ms.

    I did what Manu suggested with no success. Alternatively, I registered the driver jar with embedded OC4J preferences > global > libraries. Still does not work. Please, note, that when I run JUnit tests against my BC4J application modules with JDBC URL as connection type, everything works just fine. The problem comes while running the JSF application when the application module is using JDBC DataSource as connection type.

  • Using MySQL database in Jdeveloper

    I am using MySQl database in my applicaion.I have successfully created connection to the database and have created entity beans from the tables and a session bean as well to use the entity beans
    now when i am trying to call persistEntity(object obj) of session bean, basically to insert records into tables.
    i am getting following exception :
    Internal Exception: com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '"tdmce_approval_status" (APPROVALLEVEL, DOCREFNO, STATUS, COMMEError Code: 1064
    Call:INSERT INTO "tdmce_approval_status" (APPROVALLEVEL, DOCREFNO, STATUS, COMMENTS, DMCETYPE, ACTIONDATE) VALUES (?, ?, ?, ?, ?, ?)
         bind => [1, 12355, Approved, abcd, import, 12/03/2008]
    i believe this insert query is automatically generated by Jdeveloper. have tried executing the same query in sql sheet it has worked perfectly fine.
    Can any one please suggest on this ?

    Hi Frank,
    thanks for your response, there are only setters & getters method in my entity
    my entity look like this
    package buslogic;
    import java.io.Serializable;
    import javax.persistence.Column;
    import javax.persistence.Entity;
    import javax.persistence.Id;
    import javax.persistence.IdClass;
    import javax.persistence.NamedQuery;
    import javax.persistence.Table;
    @Entity
    @NamedQuery(name = "TdmceApprovalStatus.findAll",
    query = "select o from TdmceApprovalStatus o")
    @Table(name = "\"tdmce_approval_status\"")
    @IdClass(TdmceApprovalStatusPK.class)
    public class TdmceApprovalStatus implements Serializable {
    @Column(nullable = false)
    private String actiondate;
    @Id
    @Column(nullable = false)
    private Integer approvallevel;
    private String comments;
    @Column(nullable = false)
    private String dmcetype;
    @Id
    @Column(nullable = false)
    private String docrefno;
    @Id
    @Column(nullable = false)
    private String status;
    public TdmceApprovalStatus() {
    public String getActiondate() {
    return actiondate;
    public void setActiondate(String actiondate) {
    this.actiondate = actiondate;
    public Integer getApprovallevel() {
    return approvallevel;
    public void setApprovallevel(Integer approvallevel) {
    this.approvallevel = approvallevel;
    public String getComments() {
    return comments;
    public void setComments(String comments) {
    this.comments = comments;
    public String getDmcetype() {
    return dmcetype;
    public void setDmcetype(String dmcetype) {
    this.dmcetype = dmcetype;
    public String getDocrefno() {
    return docrefno;
    public void setDocrefno(String docrefno) {
    this.docrefno = docrefno;
    public String getStatus() {
    return status;
    public void setStatus(String status) {
    this.status = status;
    & session bean class to call the same
    package buslogic;
    import buslogic.persistance.TdmceApprovalsFlow;
    import buslogic.persistance.TdmceApprovalsFlowPK;
    import buslogic.persistance.TdmceUserDetails;
    import java.util.List;
    import javax.ejb.Stateless;
    import javax.persistence.EntityManager;
    import javax.persistence.PersistenceContext;
    @Stateless(name = "FirstCheckFacade")
    public class FirstCheckFacadeBean implements FirstCheckFacade {
    @PersistenceContext(unitName = "SOAServices")
    private EntityManager em;
    public FirstCheckFacadeBean() {
    public Object mergeEntity(Object entity) {
    return em.merge(entity);
    public Object persistEntity(Object entity) {
    em.persist(entity);
    return entity;
    /** <code>select o from TdmceApprovalsFlow o</code> */
    public List<TdmceApprovalsFlow> queryTdmceApprovalsFlowFindAll() {
    return em.createNamedQuery("TdmceApprovalsFlow.findAll").getResultList();
    public void removeTdmceApprovalsFlow(TdmceApprovalsFlow tdmceApprovalsFlow) {
    tdmceApprovalsFlow =
    em.find(TdmceApprovalsFlow.class, new TdmceApprovalsFlowPK(tdmceApprovalsFlow.getApprovallevel(),
    tdmceApprovalsFlow.getDmcetype()));
    em.remove(tdmceApprovalsFlow);
    /** <code>select o from TdmceUserDetails o</code> */
    public List<TdmceUserDetails> queryTdmceUserDetailsFindAll() {
    return em.createNamedQuery("TdmceUserDetails.findAll").getResultList();
    public void removeTdmceUserDetails(TdmceUserDetails tdmceUserDetails) {
    tdmceUserDetails =
    em.find(TdmceUserDetails.class, tdmceUserDetails.getUserid());
    em.remove(tdmceUserDetails);
    Where else can i look for the query?or for mysql i have to configure some property.

  • JDeveloper/MySql: 'access denied'

    I'm trying to develop a web application using JDeveloper/MySql...
    My 'try-out' servlet ends here:
    conn = DriverManager.getConnection("jdbc:mysql://localhost/eyes?user=me&password=pwd");
    saying
    "Access denied for user 'me'@'localhost.localdomain' (using password: YES) 11045 228000"
    user me has been granted 'all' and the database eyes is accessible via the commandline.
    Any help is appreciated!

    This is MySQL issue not JDeveloper.
    Anyway this problem usually occurs when:
    1. there is not localhost or hostname in "user" table (mysql).
    So check whether user table contains two rows for user, one row for "localhost" and the second row for hostname or single row where "%" (any host) is in hostname column.
    Example:
    mysql -u root -p
    Enter password:
    Welcome to the MySQL monitor.  Commands end with ; or \g.
    Your MySQL connection id is 1810 to server version: 4.1.5-gamma-standard
    Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
    mysql> \u mysql
    Reading table information for completion of table and column names
    You can turn off this feature to get a quicker startup with -A
    Database changed
    mysql> select * from user where user = 'test2';
    | Host      | User  | Password         | Select_priv | Insert_priv | Update_priv | Delete_priv | Create_priv | Drop_priv | Reload_priv | Shutdown_priv | Process_priv | File_priv | Grant_priv | References_priv | Index_priv | Alter_priv | Show_db_priv | Super_priv | Create_tmp_table_priv | Lock_tables_priv | Execute_priv | Repl_slave_priv | Repl_client_priv | ssl_type | ssl_cipher | x509_issuer | x509_subject | max_questions | max_updates | max_connections |
    | localhost | test2 | 35a7d8163f9d93b2 | Y           | Y           | Y           | Y           | N           | N         | N           | N             | N            | N         | N          | N               | N          | N          | N            | N          | N                     | N                | N            | N               | N                |          |            |             |              |             0 |           0 |               0 |
    | machinename  | test2 | 35a7d8163f9d93b2 | Y           | Y           | Y           | Y           | N           | N         | N           | N             | N            | N         | N          | N               | N          | N          | N            | N          | N                     | N                | N            | N               | N                |          |            |             |              |             0 |           0 |               0 |
    --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------2. common mistake is when user is created and privileges granted and administrator didn't flush hosts and privileges.
    So login as root and execute "flush hosts" and "flush privileges" commands.
    Example:
    mysql -u root -p
    Enter password:
    Welcome to the MySQL monitor.  Commands end with ; or \g.
    Your MySQL connection id is 1812 to server version: 4.1.5-gamma-standard
    Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
    mysql> flush hosts;
    Query OK, 0 rows affected (0.00 sec)
    mysql> flush privileges;
    Query OK, 0 rows affected (0.00 sec)

  • MySQL JNDI in JDeveloper

    Hi All,
    I am developing an application in struts and using JNDI for the connection string lookup. The Driver is loading up and I'm getting the data from the database at the first time, but when I try to add some new records, it doesn't do so. It neither throws any exception nor it shows any other problem. The query gets executed. I checked it with the following condition
    if( preparedStatement.executeUpdate() > 0 )This condition is always evaluated to true but there is no data entered in the database. Could the problem be with the SQL syntax as JDeveloper may be using it's own SQL syntax as compared to MySQL SQL syntax.
    I am totally cnofused as to why this is happening.
    Can someone please help me out soon..!!
    Thanks

    >>
    action"action1.do?method=showData&dataId=${dataList.DataId}" property="method"/>
    This would not work with a Struts tag. You need to
    prepare the String first and the set it in the tag. A
    scriptlet would work here.The same code is working if I geenrate a war file from Eclispe and deploy it to JBoss application server. I had tried this multiple times and without even changing a single word, it works fine in JBoss. There should be some other reason or if there is a problem, there might be some solution to overcome this situation.
    The JSTL is also working fine while I'm using it to populate the drop down menu.
    Any idea why there is difference between application running in JBoss and in JDeveloper?
    Thanks

  • MYSQL error in JDeveloper 10g using ADF Swing

    I am trying to update data in mysql database. But the following error appears in JDeveloper 10g using ADF Swing
    Mysql library is mysql-connector-java-3.1.12
    What is the problem ? INSERT and SELECT queries do not give errors. But UPDATE has problem.
    Thank you in advance.
    Sony Kalkan
    (oracle.jbo.DMLException) JBO-26041: Failed to post data to database during "Update": SQL Statement "UPDATE banner Banner SET imptotal=? WHERE bid=?".
    ----- LEVEL 1: DETAIL 0 -----
    (java.sql.SQLException) You have an error in your SQL syntax near 'Banner SET imptotal=22 WHERE bid=1' at line 1

    After i put a jtable,navigator on the form using appmoduledatacontrol on the top-right side of the jdeveloper, i run the form. Everything goes ok listing rows of data. But the error appears when i change the value of a field on the table and updating it using navigator.
    Thank you very much.

  • Connecting to MySQL with JDeveloper

    Hi,
    I built a small test projcet, based on default (Struts) technology with JDeveloper and MySQL. I configured the project to work with MySql connector, and when I test the connection I craeted it works fine, and the same is true when I test the model projcet by selectig TEST on the applicaton module pop up manue. However, when I try to run the view-controler project, uix DataPage I bulit, I get the follwing error message: Error initializing data-source 'jdbc/MySQL-orderentryCoreDS': DriverManagerDataSource driver 'com.mysql.jdbc.Driver' not found.
    Can anyone help?
    Thanks
    Uri Baruch

    Uri,
    A couple of articles that might help you setup your environment:
    http://www.developer.com/db/article.php/3492406
    and
    http://otn.oracle.com/products/jdev/howtos/10g/MySql/MySQL_and_BC_HowTo.html

  • CONNECTING TO MySql DATABASE FROM Jdeveloper

    Hi,
    How can i connect to MySql database form Oracle Jdeveloper version 11.1.2.0.0.
    I was trying to create connection using create database connection dialog box but it is giving this error:
    Test failed: Driver class not found.
    Verify the Driver location
    Please can I get step by step procedure on how to create this connection.
    Thanks.

    Connect JDeveloper to a MySQL database - YouTube
    http://people.cis.ksu.edu/~hankley/d764/tut06/Ross_mySQL/mySQL.htm
    Hil &amp;amp; Co IT Solutions: Connecting to MySQL in JDeveloper

  • Mysql w/ JDeveloper EJB Named Query Error

    I have the following named query:
    @NamedQuery(name = "Node.topParent", query = "select o from Node o where o.node is null")
    However, when converted to a SQL query (connected to MySQL) it shows:
    select * from "node" where (parentId IS NULL)
    The "node" causes MySQL to error however if I manually remove them then it works. Why is the query using "" and how can I configure it to by MySQL compliant?
    Thanks in advance,
    Kris

    Appears that by default JDeveloper uses \" in the annotations for table name.

  • Jdeveloper 10g and MySQL

    Have any one try to connect to MySQL using Jdeveloper 10g?
    Any pointers?
    Thanks

    I have a mysql connection and everything works good. I have the "SQL flavor" set to SQL92 and the "Type" to Java. I can create business components from the connection and test them. "SELECTS" work fine, but if I try to update or insert, I get an error stating that "Callable Statements not supported". Why on earth would it try and use a "CallableStatement" for INSERT and UPDATE statements??
    Here is the full trace:
    oracle.jbo.SQLStmtException: JBO-27123: SQL error during call statement preparation. Statement: UPDATE tax Tax SET tax=? WHERE TAX_ID=?
         at oracle.jbo.server.DBTransactionImpl.createCallableStatement(DBTransactionImpl.java:2725)
         at oracle.jbo.server.DBTransactionImpl2.createCallableStatement(DBTransactionImpl2.java:407)
         at oracle.jbo.server.BaseSQLBuilderImpl.doEntityDML(BaseSQLBuilderImpl.java:248)
         at oracle.jbo.server.EntityImpl.doDML(EntityImpl.java:4592)
    ## Detail 0 ##
    java.sql.SQLException: Callable statments not supported.
         at com.mysql.jdbc.Connection.prepareCall(Connection.java:1201)
         at oracle.jbo.server.DBTransactionImpl.createCallableStatement(DBTransactionImpl.java:2690)
    Any help would be appreciated.
    Thanks.

  • MySQL Connection with JDeveloper

    Hi,
    How can i retrieve records from MySQL database in JDeveloper. Is it possible to access database through Java code?
    Thanks

    HI,
    Check following will useful
    http://www.oracle.com/technetwork/developer-tools/jdev/mysql-and-bc-howto-082060.html

Maybe you are looking for