ExecuteQuery() error with MySQL

I have already followed all the steps recommended by OTN to create a connection with MySQL (most up-to-date files) in JDeveloper 10g. It works fine except when I try to find a view and execute a query using an Application Module in a jsp:
ApplicationModule appMod = appMod.getGenericAppMod();
ViewObject voTabEmployee = appMod.findViewObject("TabEmployee");
voTabEmployee.executeQuery();
It works ok when connected to Oracle DB but it raises the following exception when I move Business Components to a MySQL connection, exactly as recommended:
java.lang.ClassCastException: com.mysql.jdbc.ServerPreparedStatement
Any help would be highly appreciated.
Marcio

Hi Marcio
The ApplicationModule that you create in your source (utilApp.java) is created using the default configuration that uses the OracleSQLBuilder as the default SQLBuilder (configured to work with Oracle Databases). Thus, when you use MySQL or any other database (and I confirmed this using SQLServer), a ClassCastException is thrown.
Instead of using the following lines:
Context ic = new InitialContext(env);
String theAMDefName = "mysysjcom.MySysJComModule";
ApplicationModuleHome home = (ApplicationModuleHome) ic.lookup(theAMDefName);
ApplicationModule appMod = home.create();
appMod.getTransaction().connectToDataSource(null, "jdbc/MYSYSJCOMCoreDS", false);
can you use the following lines:?
Context ic = new InitialContext(env);
String theAMDefName = "mysysjcom.MySysJComModule";
ApplicationModule appMod = Configuration.createRootApplicationModule(theAMDefName, <config_name>);
ic.lookup(theAMDefName);
I got your sample working with the above change
This will ensure that you are using the same configuration that has the SQLBuilder correctly set to your Database type
Thanks
Prasanth

Similar Messages

  • Communication packets error with MySQL

    Hi,
    I'm having a problem with executing a query on MySQL. It seems that I'm getting the communication packets error once in a while and I'm not sure whether the query is bad or the settings on the database server is bad. Could anyone give me an insight where to look after?
    Thank you,
    852825
    MySQL: 5.1.41-3ubuntu12.7
    JDBC: 5.1.12
    Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Got an error writing communication packets
         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
         at java.lang.reflect.Constructor.newInstance(Constructor.java:532)
         at com.mysql.jdbc.Util.handleNewInstance(Util.java:409)
         at com.mysql.jdbc.Util.getInstance(Util.java:384)
         at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1015)
         at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3562)
         at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3494)
         at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1960)
         at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2114)
         at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2696)
         at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2105)
         at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:2264)

    I've tried the community but no response so far. Any tips on where to look?

  • Connection error with mysql

    hi,
    i'm using j2sdk1.4.2 and mysql 3.x, and i'm having problems with the connection of these two. i used the latest connector which is mysql-connector-java-3.0.14-production-bin.jar, and i followed all the steps for installing this connector. my classpath is already set to where i placed the jar file. however, i still get this error :
    java.sql.SQLException : unable to connect to any hosts due to exception: java.net.ConnectException : Connection refused : connect
    what should i do?
    and by the way, here's the code :
    import java.sql.*;
    public class JdbcExample1 {
    public static void main(String args[]) {
    try {
    Class.forName("com.mysql.jdbc.Driver").newInstance();
    Connection con = DriverManager.getConnection("jdbc:mysql:///");
    if(!con.isClosed())
    System.out.println("Successfully connected to MySQL server...");
    } catch(Exception e) {
    System.err.println("Exception: " + e.getMessage());
         e.printStackTrace();
    } }

    Hi, I am new to all these.
    Recently I been trying to get Mysql and JSP and Tomcat working but try and try still cannot. Since you guys are on this topic and more knowledgeable I hope that you could help me out. Thanks.
    I have the same set up as you except mysql version 4.0
    MySQL is working fine by itself, JSP is working fine connecting to Apache Tomcat fine but cannot get MySQL data connected to show on Tomcat.
    Sample code as below
    import java.sql.*;
    import java.io.*;
    class StocksMy {
    public static void main (String args []) {
    try {
    Class.forName("com.mysql.jdbc.Driver").newInstance();
    try {
    } catch (Exception e) {
    System.out.println("StocksMy");
    System.exit(1);
    Connection conn =DriverManager.getConnection
    ("jdbc:mysql://:3306/StocksMy);
    Statement stmt = conn.createStatement();
    ResultSet rset = stmt.executeQuery ("select * from stocks");
    while (rset.next()) {
    String ticker=rset.getString(1).trim();
    String title=rset.getString(2).trim();
    String price=rset.getString(3).trim();
    String blanks=
    System.out.print (ticker);
    System.out.print(blanks.substring(1,8-ticker.length()));
    System.out.print (title);
    System.out.print(blanks.substring(1,41-title.length()));
    System.out.println (price);
    } catch (Exception e) {
    System.out.println("StocksMy: JDBC exception");
    System.exit(1);
    PLEASE is this correct?
    How to get this to show up in Tomcat (localhost:8080) ?
    I guess must convert to JSP first? How? Can show from sample above or a simple sample?
    All very confusing to me.
    Thanks guys.

  • ExecuteUpdate error with mysql

    Dear All:
    i have a wierd error right here, the code is working correctly for the first call to this jsp page but the error come out when second call to this page. the field was update wrongly, credit=credit-1 become credit=credit-2 and Point=Point+1 become Point=Point+2.
    I am using the mysql and tomcat
    <%
    String a1="update studentdetail Set credit=credit-1 where UserID = '"+UserID+"'";//deduct from student
    a=statement.executeUpdate(a1);
    out.println(a1+" "+a);
    String a2="update teacherinfo Set Point=Point+1 where TeacherID = '"+tID+"'";//add into teacherinfo table
    a=statement.executeUpdate(a2);
    out.println(a2+" "+a);
    String a3="update teachersubcription Set Point=Point+1 where ID = '"+myID+"'";//add into teacher subcription table
    a=statement.executeUpdate(a3);
    out.println(a3+" "+a);
    %>
    please help

    It's hard to tell from the code you provided, but it sounds like a classic case of not reinitializing variables. Depending on where this code lives and how it gets used, you'll update your database with credit-1 and that credit-1 value which now lives in your DB must be finding it's way back into the credit variable. Check everyplace you set that variable and everyplace you read the DB and I'll bet you find your answer.
    Cheers

  • ECM Connector + Turnkey Installation - Error with MySQL (NoClassDefFoundError)

    Twice I have installed LiveCycle ES for JBoss Using Turnkey (following the documentation)... W2K3 Server, 2GB RAM, 32GB Hard Drive, Java 1.5.0.15.
    The core services work good, but it's ECM Connector for Documentum that throws up an error. (Snippets of the server.log below)
    I searched for aspectj.org namespace and it belongs to MySql. Am I supposed to copy a jar file somewhere? I searched the docs but couldn't find any mention.
    Odd enough, the sample ECM Documentum Connector Services work, it's the standard ones that don't (Authentication, Connector, etc)
    EMCDocumentumContentRepositoryConnector: 1.0 Stopped com.adobe.livecycle.ConnectorforEMCDocumentum 8.0.3188.1.83522.8
    When I click start, I get internal error and server.log fills up with the class not found errors.
    Any insight you could provide would great helpful.
    Thanks in advance,
    Vikram
    2008-07-11 11:08:54,984 ERROR [org.jboss.ejb.plugins.LogInterceptor] Unexpected Error in method: public abstract java.lang.Object com.adobe.idp.dsc.transaction.impl.ejb.adapter.EjbTransactionCMTAdapterLocal.doRequiresNe w(com.adobe.idp.dsc.transaction.TransactionDefinition,com.adobe.idp.dsc.transaction.Transa ctionCallback) throws com.adobe.idp.dsc.DSCException
    java.lang.NoClassDefFoundError: org/aspectj/lang/Signature
    at com.adobe.livecycle.documentumservice.impl.util.DocumentumUtils.configureClient(Documentu mUtils.java:88)
    at com.adobe.livecycle.documentumservice.impl.DocumentumProviderServiceLifeCycleImpl.configu reDocbroker(DocumentumProviderServiceLifeCycleImpl.java:261)
    at com.adobe.livecycle.documentumservice.impl.DocumentumProviderServiceLifeCycleImpl.execute Once(DocumentumProviderServiceLifeCycleImpl.java:92)
    at com.adobe.livecycle.documentumservice.impl.DocumentumProviderServiceLifeCycleImpl.onStart (DocumentumProviderServiceLifeCycleImpl.java:53)
    at ...
    org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
    at java.lang.Thread.run(Thread.java:595)
    2008-07-11 11:08:55,000 INFO [STDOUT] Jul 11, 2008 11:08:55 AM com.adobe.idp.dsc.registry.service.impl.ServiceRegistryImpl start
    SEVERE: ServiceRegistryImpl:start(EMCDocumentumAuthProviderService, 1.0):com.adobe.idp.dsc.DSCRuntimeException(Internal error.)
    ALC-DSC-000-000: com.adobe.idp.dsc.DSCRuntimeException: Internal error.
    at com.adobe.idp.dsc.transaction.impl.ejb.EjbTransactionProvider.execute(EjbTransactionProvi der.java:207)
    at com.adobe.idp.dsc.transaction.impl.DefaultTransactionTemplate.execute(DefaultTransactionT emplate.java:79)
    at

    Using j2se 1.4.2_04, turnkey installation works perfectly.
    Bye,
    Dr.Channard

  • "Bad handshake" error with MySQL

    Hello,
    I'm having problems when I try to connect to DB using MySQL 4.1.1alpha.
    I have Conector/J 3.1 and Connector/ODBC 3.51.
    The exceptions occur when I try to connect with the sentence:
    conection = DriverManager.getConnection("jdbc:mysql://localhost:3306/mysql?user=root");
    the exception thrown is:
    Communication link failure: Bad handshake
    I can connect from mysql and from mysql Control Center but not from JAVA.
    Does Anyone know my problem?
    Greetings
    Mariano

    Did you try this?
    conection = DriverManager.getConnection("jdbc:mysql://localhost:3306 /mysql?user=root&password=");
    if still doesn't work, recompile the driver and try again. It happened to me once when I downloaded their binary [instead of recompiling their src myself].
    hope this helps

  • [SOLVED] Error with mysql/perl

    I am horribly ignorant of mysql/perl, I just know they have been working as I have a myth server and all works well, but currently I'm attempting to set up Torrentflux and mythrename.pl, both which give an error that in my eyes appears similar, hopefully someone can sort this out??
    Here is the command that is one step of setting up torrentflux:
    ~ # mysql_setpermission -u root
    Password for user root to connect to MySQL:
    install_driver(mysql) failed: Can't locate DBD/mysql.pm in @INC (@INC contains: /usr/lib/perl5/site_perl/5.10.0 /usr/share/perl5/site_perl/5.10.0 /usr/lib/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5/core_perl /usr/share/perl5/core_perl /usr/lib/perl5/current /usr/lib/perl5/site_perl/current .) at (eval 9) line 3, <STDIN> line 1.
    Perhaps the DBD::mysql perl module hasn't been fully installed,
    or perhaps the capitalisation of 'mysql' isn't right.
    Available drivers: DBM, ExampleP, File, Gofer, Proxy, Sponge.
    at /usr/bin/mysql_setpermission line 71
    ~ #
    And here's trying to run mythrename.pl:
    ~ # /usr/share/mythtv/contrib/mythrename.pl --link /media/mythtv/ --format %T/%T%-%S
    Net::UPnP::ControlPoint is not installed!
    install_driver(mysql) failed: Can't locate DBD/mysql.pm in @INC (@INC contains: /usr/lib/perl5/site_perl/5.10.0 /usr/share/perl5/site_perl/5.10.0 /usr/lib/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5/core_perl /usr/share/perl5/core_perl /usr/lib/perl5/current /usr/lib/perl5/site_perl/current .) at (eval 13) line 3.
    Perhaps the DBD::mysql perl module hasn't been fully installed,
    or perhaps the capitalisation of 'mysql' isn't right.
    Available drivers: DBM, ExampleP, File, Gofer, Proxy, Sponge.
    at /usr/share/perl5/site_perl/5.10.0/MythTV.pm line 337
    ~ #
    EDIT: Okay, I just got help from someone in IRC and it was perl-related. I set up cpan as per the wiki here: http://www.mythtv.org/wiki/index.php/Mythrename.pl. It works great now!
    Last edited by colbert (2008-08-01 21:28:54)

    I am horribly ignorant of mysql/perl, I just know they have been working as I have a myth server and all works well, but currently I'm attempting to set up Torrentflux and mythrename.pl, both which give an error that in my eyes appears similar, hopefully someone can sort this out??
    Here is the command that is one step of setting up torrentflux:
    ~ # mysql_setpermission -u root
    Password for user root to connect to MySQL:
    install_driver(mysql) failed: Can't locate DBD/mysql.pm in @INC (@INC contains: /usr/lib/perl5/site_perl/5.10.0 /usr/share/perl5/site_perl/5.10.0 /usr/lib/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5/core_perl /usr/share/perl5/core_perl /usr/lib/perl5/current /usr/lib/perl5/site_perl/current .) at (eval 9) line 3, <STDIN> line 1.
    Perhaps the DBD::mysql perl module hasn't been fully installed,
    or perhaps the capitalisation of 'mysql' isn't right.
    Available drivers: DBM, ExampleP, File, Gofer, Proxy, Sponge.
    at /usr/bin/mysql_setpermission line 71
    ~ #
    And here's trying to run mythrename.pl:
    ~ # /usr/share/mythtv/contrib/mythrename.pl --link /media/mythtv/ --format %T/%T%-%S
    Net::UPnP::ControlPoint is not installed!
    install_driver(mysql) failed: Can't locate DBD/mysql.pm in @INC (@INC contains: /usr/lib/perl5/site_perl/5.10.0 /usr/share/perl5/site_perl/5.10.0 /usr/lib/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5/core_perl /usr/share/perl5/core_perl /usr/lib/perl5/current /usr/lib/perl5/site_perl/current .) at (eval 13) line 3.
    Perhaps the DBD::mysql perl module hasn't been fully installed,
    or perhaps the capitalisation of 'mysql' isn't right.
    Available drivers: DBM, ExampleP, File, Gofer, Proxy, Sponge.
    at /usr/share/perl5/site_perl/5.10.0/MythTV.pm line 337
    ~ #
    EDIT: Okay, I just got help from someone in IRC and it was perl-related. I set up cpan as per the wiki here: http://www.mythtv.org/wiki/index.php/Mythrename.pl. It works great now!
    Last edited by colbert (2008-08-01 21:28:54)

  • Reconnect policy with MySQL failing because of autoCommit error

    This related to this issue, but I didn't see any responses to it: Reconnecting a dead connection from a UnitOfWork commit - Autocommit error
    I'm testing with MySQL 4.1 and I have a reconnect policy that does the following (I believe this is a pretty standard approach):
    session.setExceptionHandler( new ExceptionHandler() {
    public Object handleException(RuntimeException exception) {
         if (exception instanceof DatabaseException) {          
    dbex.getAccessor().reestablishConnection(dbex.getSession());
    However, when it reestablishes the connection (and I have traced this and can verify that this code is executing and a reconnect is performed), I get the following error for any updates:
    Internal Exception: java.sql.SQLException: Can't call rollback when autocommit=trueError Code: 0
    at oracle.toplink.exceptions.DatabaseException.sqlException(DatabaseException.java:277)
    at oracle.toplink.internal.databaseaccess.DatabaseAccessor.basicRollbackTransaction(DatabaseAccessor.java:1090)
    at oracle.toplink.internal.databaseaccess.DatasourceAccessor.rollbackTransaction(DatasourceAccessor.java:486)
    at oracle.toplink.internal.databaseaccess.DatabaseAccessor.rollbackTransaction(DatabaseAccessor.java:1075)
    at oracle.toplink.publicinterface.Session.basicRollbackTransaction(Session.java:377)
    I only have this problem with the MySQL JDBC drivers. I can continue to read normally, but I can't perform any transactions.
    This isn't so much of a question about MySQL specifically, but rather a question about how reestablishConnection() connects to the database differently from my initial login using DatabaseLogin. Obviously, I don't have this error connecting normally. I only get it after a reconnect is applied.
    Specific questions are: Is there another handler I can add to ensure JDBC Connections returned by ServerSession are always setAutoCommit(false)? Am I reestablishing the JDBC connections incorrectly?
    Nate

    Nate,
    This does appear to be MySQL JDBC specific but is most likely related to a general issue.
    When the connection drops and you receive the notification through the exception handler I would typically recommend looking at the session in us (isUnitOfWork) or the query type (isWriteObjectQuery) to see if the operation that failed was involved in a transaction (UnitOfWork commit).
    In these transaction cases you need to do more then just re-connect and retry. You need to ensure after reconnection that an application exception is raised so the UnitOfWork operation(s) can be retried completely. I would simply add to this case to ensure that the JDBC connection is put back in a state where it can be managed properly.
    There is no special operation or any case I know of where any special auto-commit needs to be set on a connection after it has dropped and before it is re-connected.
    Doug

  • MySQL syntax error with TestStand 4.0 database logging

    I had been using MS Access database to log results which worked fine but the access database is too limited. Switched to MySql. Database works fine and I can query it from Visual C++ and was able to create all my result tables fine from TestStand.
    I get a syntax error when actually trying to log results and it has to do with either a missing quote or and extra quote, I can't quite tell. I thought I saw a post on this somewhere but can't find it now. Here is the complaint from TestStand:
    An error occurred calling 'LogOneResult' in 'ITSDBLog' of 'zNI TestStand Database Logging'
    An error occurred executing a statement.
    Statement: UUT_RESULT.
    [MySQL][ODBC 3.51 Driver][mysqld-5.0.45-community-nt]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 'DEFAULT VALUES' at line 1
    Description: [MySQL][ODBC 3.51 Driver][mysqld-5.0.45-community-nt]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 'DEFAULT VALUES' at line 1
    Number: -2147467259
    NativeError: 1064
    SQLState: 37000
    Reported by: Microsoft OLE DB Provider for ODBC Drivers
    Description: Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.
    Number: -2147217887
    NativeError: 0
    SQLState: 37000
    Reported by: Microsoft OLE DB Provider for ODBC Drivers
    Source: TSDBLog
    And here is all that appears in the MySql logfile:
    INSERT INTO UUT_RESULT DEFAULT VALUES
    070914
    You can't see it here but the string is truncated after the word VALUES. The next line starts with the odd number.
    Any ideas?
    Thanks,
    Bill Peters
    BAE SYSTEMS

    Sure. There were two bugs in the ini file that contains the default TS schemas (I think it was Default_Database_Options.ini or like that...).
    Anyway the table description for STEP_NUMERICLIMIT had for it's command line INSERT INTO MEAS_NUMERICLIMIT. I guess TestStand looked at that and said hmm I better create that table too. Then later down the page when you try to create MEAS_NUMERICLIMIT it says the table already exists even though it is empty. The generate SQL button builds a bad file and then the database viewer creates a bad database. I would have to go into MySql and drop the database. I had to save the schema under a custom name, edit it read it back in, generate a new SQL file, but then it would still fail validation because the ini files don't get updated until you exit TestStand. So basically I did this process 3 times before I got it right.
    It's wasn't a big deal but it's amazing how a little thing can cause a lot of work.
    The second bug, I'm not certain was initially in the file or somehow got set on the fly. There was a random int statement at the very end of the SQL table description for UUT_RESULT. It was also in the schema INI file. Since the int had no name and occurred in a odd place, it created a syntax error in MySql. Same fix as above.
    But like I said it's working great now. I like this approach because I serve it to the net with Apache and parse the database with simple PHP scripts.
    Thanks,
    Bill Peters
    BAE SYSTEMS

  • Mysql.sock error with php

    Hi,
    I'm trying to get MySQL working on my Mac running OS X 10.5.1
    The server runs and I have imported one of my databases into
    it. However when I run Dreamweaver and try and add the new database
    I get this error in Dreamweaver;
    Can't connect to local MySQL server through socket
    '/var/mysql/mysql.sock' (38)
    Speaking with MySQL they have said that file is found in
    /tmp/
    I have copied it and added it where DW wants it but still no
    joy.

    there seems to be a simpler perm fix farther down the page-
    It can be much simpler.
    sudo cp /etc/php.ini.default /etc/php.ini
    sudo chmod 777 /etc/php.ini
    Open the file with a nice Editor, like PathFinder or BBEdit.
    Find the line for the mysql.default.host
    ; Default socket name for local MySQL connects. If
    empty, uses the built-in
    ; MySQL defaults.
    mysql.default_socket = /tmp/mysql.sock
    and enter: /tmp/mysql.sock
    You will then have:
    ; Default socket name for local MySQL connects. If
    empty, uses the built-in
    ; MySQL defaults.
    mysql.default_socket = /tmp/mysql.sock
    save it, go back to terminal and enter:
    sudo chmod 644 /etc/php.ini
    You then can restart Apache and SQL, or do a normal restart.
    It should work
    afterwards.
    Alan
    Adobe Community Expert, dreamweaver
    http://www.adobe.com/communities/experts/

  • UML to DB Diagram Transformation: Error with primary key in MySQL

    Hi,
    I am new in JDeveloper and I am following an Oracle tutorial to transform an UML class Diagram into a DB diagram http://docs.oracle.com/cd/E18941_01/tutorials/jdtut_11r2_81/jdtut_11r2_81_2.html.
    My idea is to create a real DB form this DB diagram.
    I am now trying to transform a simple UML class into a DB class. I want to use a MYSql transformation and I want to define my self primary key, so I done the following steps:
    - Create a UML class diagram
    - Create a class "Person" with an attribute "ID:String"
    - Define a Database profile
    - Define a stereotype in my primary key attribute where:
    + I have checked box "Is Primary Key?"
    + I set in property "Data Type MySql Database Server) to "Varchar(20) NOT NULL"
    Now when I try to do the transfromation:
    - I set option "UML to Offline Database Objects"
    - I create a new Offline DB which emulates a "MySQL Dataserver 5.x"
    - When I click "Finish" I become a popup error which says: "*Invalid name PERSON_PK. Must use `PRIMARY`for MYSQL Primary Key*"
    I don't really now how to solve this problem...I have tried all I have read and google but nothing works...I think I am forgotting something basic but I do not know what!
    I am working with JDeveloper 11.1.2.1.0 and with MySql Server 5.5.
    Thanks in advance!

    Result of that table issue fix is that migration went ahead, finished both uptime and downtime run. Now i am trying to login to SAP and system is unable to log me in as DOKTL doesnt exist at all
    But i see another table called DTELDOKTL in HANA, which same as DOKTL but no entries in it.
    I have created a message to SAP , But what should i be doing now ?
    Can i create this table in HANA ?
    Can i do export/import of table ? Table structure should be there in system already for this option i guess.
    Would i be able to replicate this table if i setup SLT ?
    Please advise
    C Mon Sep  8 11:02:30 2014
    C  *** ERROR =>   prepare() of C_0341, rc=1, rcSQL=259
    [dbsdbsql.cpp 1397]
    C  {root-id=00505680721D1EE48DE09241702FF193}_{conn-id=00000000000000000000000000000000}_0
    C  *** ERROR => PREPARE C_0341 on connection 0, rc=259
    [dbslsdb.cpp  9138]
    C  SQLCODE    : 259
    C  SQLERRTEXT : invalid table name:  Could not find table/view DOKTL in schema SAPECS: line 1 col 97 (at pos 96)
    C  sc_p=7f28f48cfac8,no=341,idc_p=7f28f3f87388,con=0,act=0,slen=254,smax=256,#vars=5,stmt=7a45980,table=DOKTL
    C  stmtid = <0/SAPMSYST                                /50334994/20140907170329>
    C  SELECT "ID" , "OBJECT" , "LANGU" , "TYP" , "DOKVERSION" , "LINE" , "DOKFORMAT" , "DOKTEXT" FROM "DOK\
    C  TL" WHERE "LANGU" = ? AND "ID" = ? AND "OBJECT" = ? AND "TYP" = ? AND "DOKVERSION" = ? ORDER BY "ID"\
    C   , "OBJECT" , "LANGU" , "TYP" , "DOKVERSION" , "LINE" ;
    B  ***LOG BZA=> table DOKTL does not exist on database R/3 [dbdbslst     3580]
    M  ThPerformDeleteThisSession: switch of statistics
    D  GuiStatus clear generate inline ts >20140908030105,195<
    M  ***LOG R47=> ThResFreeSession, delete () [thxxmode.c   1078]
    M  *** WARNING => ThrtGuiDeleteScreen: rscpGetUserLoginLang failed (128), use system language [thrtGuiHandl 469]
    Thanks,
    GR

  • Errors trying to compile PHP for use with MySQL

    I have installed and am using the GNU based tools from the Sunfreeware site to compile PHP. I already have Apache, MySQL, and Oracle compiled and working properly. Below is my configure string for my PHP build:
    ./configure --prefix=/usr/local/php5 \
    --with-config-file-scan-dir=/usr/local/php5/php.d \
    --with-apxs2=/var/apps/apache/bin/apxs \
    --with-ldap \
    --with-mysql=/var/apps/mysql \
    --with-mysqli=/var/apps/mysql/bin/mysql_config \
    --with-xsl=/usr/local/include/libxslt \
    --with-ncurses \
    --enable-xslt \
    --with-xslt-sablot \
    --with-bz2=/usr \
    --with-gd \
    --with-gdbm=/usr/local/lib \
    --with-openssl \
    --with-imap=/usr/local/imap-2006e \
    --with-imap-ssl \
    --with-freetype-dir=/usr/local/include/freetype2/freetype/freetype.h \
    --with-expat-dir \
    --with-tiff-dir \
    --with-zlib \
    --with-jpeg-dir=/usr/local/include/jpeglib.h \
    --with-png-dir=/usr/include/libpng12/png.h \
    --with-mcrypt \
    --with-curl \
    --with-curlwrappers \
    --with-gettext \
    --disable-short-tags \
    --disable-debug \
    --enable-calendar \
    --enable-ctype \
    --enable-discard-path \
    --enable-exif \
    --enable-ftp \
    --enable-memory-limit \
    --enable-sysvem \
    --enable-sysvshm \
    --enable-gd-native-ttf \
    --enable-soap \
    --enable-shmop \
    --enable-sockets \
    --enable-xslt \
    --enable-mbstring \
    --with-sqlite=shared \
    --with-pdo-sqlite=shared \
    --with-pdo-mysql=shared,/var/apps/mysql \
    --enable-pdo=shared \
    --enable-bcmath \
    --with-oci8=sharedI have ld, make, and various tools linked to /usr/local/bin/<toolname>. The configure string completes with no issue and the make runs for about 30 minutes before it stops with the following warnings/errors:
    /usr/ccs/bin/ld: warning: libssl.so.0.9.8, needed by /usr/local/lib/libldap.so, may conflict with libssl.so.0.9.7
    /usr/ccs/bin/ld: warning: libssl.so.0.9.8, needed by /usr/local/lib/libldap.so, may conflict with libssl.so.0.9.7
    /usr/ccs/bin/ld: warning: libssl.so.0.9.8, needed by /usr/local/lib/libldap.so, may conflict with libssl.so.0.9.7
    /usr/ccs/bin/ld: warning: libssl.so.0.9.8, needed by /usr/local/lib/libldap.so, may conflict with libssl.so.0.9.7
    /usr/ccs/bin/ld: warning: libssl.so.0.9.8, needed by /usr/local/lib/libldap.so, may conflict with libssl.so.0.9.7
    /usr/ccs/bin/ld: warning: libssl.so.0.9.8, needed by /usr/local/lib/libldap.so, may conflict with libssl.so.0.9.7
    /usr/ccs/bin/ld: warning: libcrypto.so.0.9.8, needed by /usr/local/lib/libldap.so, may conflict with libcrypto.so.0.9.7
    /usr/ccs/bin/ld: warning: libcrypto.so.0.9.8, needed by /usr/local/lib/libldap.so, may conflict with libcrypto.so.0.9.7
    /usr/ccs/bin/ld: warning: libcrypto.so.0.9.8, needed by /usr/local/lib/libldap.so, may conflict with libcrypto.so.0.9.7
    /usr/ccs/bin/ld: warning: libcrypto.so.0.9.8, needed by /usr/local/lib/libldap.so, may conflict with libcrypto.so.0.9.7
    /usr/ccs/bin/ld: warning: libcrypto.so.0.9.8, needed by /usr/local/lib/libldap.so, may conflict with libcrypto.so.0.9.7
    /usr/ccs/bin/ld: warning: libcrypto.so.0.9.8, needed by /usr/local/lib/libldap.so, may conflict with libcrypto.so.0.9.7
    <snip>....
    /var/apps/php-5.2.5/ext/mysqli/mysqli_nonapi.c:209: undefined reference to `mysql_sqlstate'
    /var/apps/php-5.2.5/ext/mysqli/mysqli_nonapi.c:200: undefined reference to `mysql_set_server_option'
    /var/apps/php-5.2.5/ext/mysqli/mysqli_nonapi.c:212: undefined reference to `mysql_set_server_option'
    ext/mysqli/.libs/mysqli_nonapi.o: In function `zif_mysqli_query':
    /var/apps/php-5.2.5/ext/mysqli/mysqli_nonapi.c:251: undefined reference to `mysql_set_server_option'
    ext/mysqli/.libs/mysqli_nonapi.o: In function `zif_mysqli_get_warnings':
    /var/apps/php-5.2.5/ext/mysqli/mysqli_nonapi.c:298: undefined reference to `mysql_warning_count'
    ext/mysqli/.libs/mysqli_nonapi.o: In function `zif_mysqli_stmt_get_warnings'
    /var/apps/php-5.2.5/ext/mysqli/mysqli_warning.c:195: undefined reference to `mysql_warning_count'
    collect2: ld returned 1 exit status
    make: *** [sapi/cli/php] Error 1:
    There are many, many more "undefined reference" messages all mysql related.
    Here is my environment and crle output:
    LD_LIBRARY_PATH=/usr/local/ssl/lib:/usr/local/lib:/usr/local/BerkeleyDB.4.2/lib:/var/apps/mysql/lib/mysql
    PATH=/usr/local/bin:/usr/bin:/usr/sbin:/usr/local/sbin:/opt/sfw/bin:/usr/local/ssl/bin:/usr/ucb:/usr/ccs/bin:/opt/VRTS/bin:/etc:/opt/EMCpower/bin:/opt/EMCpower/bin/sparcv9:/etc/emc/bin:/opt/VRTSagents/ha/bin:/usr/local/include:/usr/include:/usr/platform/`uname -i`/sbin:/var/apps/mysql/bin:/var/apps/mysql/include/mysql:/opt/RICHPse/bin:/usr/local/php5/bin:/opt/sfw/sbin
    crle output
    Configuration file [version 4]: /var/ld/ld.config
    Default Library Path (ELF): /lib:/usr/lib:/usr/local/lib
    Trusted Directories (ELF): /lib/secure:/usr/lib/secure (system default)
    Any ideas as to how I can get around the MySQL errors, etc. would be appreciated.

    Here are the requirments for 10.5.8:
    Mac computer with an Intel, PowerPC G5, or PowerPC G4 (867MHz or faster) processor
    512MB of memory
    DVD drive for installation
    9GB of available disk space
    You have to purchase the upgrade from Apple for $129. You ned to call and order ti since it is not listed in their on-line store. You can also try eBay or Craig's List. 

  • Need help with MySQL connection error _mmServerScripts

    Trying to create insert a recordset I got the message:
    "The files from the _mmServerScripts folder are for the server model PHP-MySQL. You try to connect to a database using a different server model .Please remove this folder outside the Dreamweaver environment on both local and testing machines and try again."
    I've searched the net and have seen this message hunting people since dw8...
    I could not find a "cure".
    Things to notice:
    0 - Yes the whole thing is apache/php/mysql... just DW thinks it's not.
    1 - Both the connection and the Recordset actualy works. I have a whole site based on this connection and the recorsets I've created manualy based on it.
    2 - It does not matter if we erase or not the _mmServerScripts folder the message stands still allover.
    3 - The problem seems to show up when you split servers...
    3.1 - If I test in a WAMP environment where apache and mysql are in the same machine I can use DW to create data objects for me.
    3.2 - If I test in my real test environment which have web server and db server separated from each other then I can't use DW to create data objects, see bindings, behaviours etc... all I get is this message.... while the code itself runs fine anyway.
    Does any one already knows how to work around or fix this?
    Thanks,
    Julio

    Thanks PZ,
    Yes everything is fine with the site definition.
    everything works. I can upload, run, test all ok.
    The only thing that does not work is to insert any sort of data object through DW interface. If I declare my reordsets by hands or even If I use the ones DW created in my local test server all works fine.
    Then if I use the site definition and try to see any bindings or create a recordset or create a new connection using dw... then the messages come up and dw can't go any further in that task.
    By spli servers I mean one phisical linux server with apache/php but without mySQL + one physical Linux server with mySQL but without apache/php.
    So when I use a site definition that points either to a WAMP or LAMP i.e. when everything is in the same machine DW goes happy and does whatever it's asked to do.
    When I try that on the real mccoy environment (with the two separated servers)... It looks like DW gets confused...

  • Can' t connect Java with MySQL

    My goal is to connect Java with MySQL. I found many solutions on Internet, but I always get the same mistake:
    SQLException: No suitable driver
    SQLState: 08001
    VendorError: 0MySQL works fine alone or with php.Only thing left me to think is that the installed versions are not compatible for this mysql-connector-java-5.0.4
    I don't believe that could be a reason.
    Installed versions are:
    Apache Tomcat 5.5.20 Server
    Apache HTTP Server 2.2.4
    PHP 5.2.0
    MySQL 5.2
    jre 1.5.0_11
    jdk1.5.0_11
    Apache Tomacat JK2 connector Version: 1.2.20 File Name: mod_jk-apache-2.2.3.so
    mysql-connector-java-5.0.4
    I also set connector in class path: C:\mysql-connector-java-5.0.4;C:\mysql-connector-java-5.0.4\mysql-connector-java-5.0.4-bin.jar;C:\mysql-connector-java-5.0.4\src\com\mysql\jdbc
    For installation I used manulas from:
    http://apacheguide.org/jsp.php
    http://doc.51windows.net/mysql/?url=/MySQL/ch23s03.html
    Here is also a test code in java:
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.SQLException;
       public class Connect
           public static void main (String[] args)
               Connection conn = null;
               try {
        conn =
           DriverManager.getConnection("jdbc:mysql://localhost/first_test" +
                                       "user=monty&password=greatsqldb");
        // Do something with the Connection
    } catch (SQLException ex) {
        // handle any errors
        System.out.println("SQLException: " + ex.getMessage());
        System.out.println("SQLState: " + ex.getSQLState());
        System.out.println("VendorError: " + ex.getErrorCode());
       }i'm desperate, please help or tell me someone who'll know the answer.
    Thank You in advance

    hey buddy .. it seems yr code is wrong .. in getconnection () method u should also specify the port ,which u r not doing ...
    the default port for MySQL is 3306 ... see below i am giving you a sample code ... its working fine .. and dont forget to put the MySQL driver jar path in to classpath and also copy the jar into common/lib folder of your tomcat ....
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import java.sql.Statement;
    public class MySQLConnectionTest {
         public static void main(String[] args) {
    new MySQLConnectionTest().connTest();
    public void connTest() {
              String tableName = "portfolio"; //change as per setting
              String hostName = "10.81.9.39"; // please change for the target database ip or hostname
              String dbPort = "3306"; //change if not using the default
              String dbName = "tradingsystem"; //change as per the given DB name
              String username = "root"; //change as per setting
              String password = "password"; //change as per setting
              System.out.println("before try");
              Double data=0.0;
         Double data1=0.0;
              try {
    Class.forName("org.gjt.mm.mysql.Driver");
                   System.out.println("before driver manager");
    Connection conn = DriverManager.getConnection("jdbc:mysql://"+hostName+":"+dbPort+"/"+dbName, username, password);
    String query1 = "select * from "+tableName+" where User_id='trader1' and Stock_Type='Equity'";
    System.out.println("quesry1="+query1);
    Statement stmt = conn.createStatement();
    ResultSet rs1 = stmt.executeQuery(query1);
    while(rs1.next())
         System.out.println("hiiiiii for rs1");
         System.out.println(rs1);
         Quantity=(Integer)rs1.getObject(5);
         MarketPrice=(Double) rs1.getObject(8);
         data=Quantity*MarketPrice;
         data1+=data;
         System.out.println("data1="+data1);
         i=0;
    rs1.close();
    stmt.close();
    conn.close();
    } catch (ClassNotFoundException e) {
    e.printStackTrace(System.err);
    } catch (SQLException e) {
    e.printStackTrace(System.err);
    i hope it will work for u...
    cheers,

  • Connectivity java with mySql

    Hi
    Can any one tell me how should i connect my java application with mySql database here is the small code which i written.
    import java.sql.*;
    class tryjdbc
         public static void main(String[] args) throws Exception
         try
              Class.forName("com.mysql.jdbc.Driver").newInstance();
              String connectionURL = "jdbc:mysql://localhost:3306/learn?user=root;password=";
              Connection connection = DriverManager.getConnection(connectionURL, "root", "");
              Statement statement = connection.createStatement();
              ResultSet rs = statement.executeQuery("Select ecode from emp");
              while (rs.next())
                   System.out.println(rs.getString("ecode"));
              catch (Exception e){
                   System.out.println(e);
    Can any one please tell me the error there is no eror in compiling but at run time it gives error
    java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
    Thanks in advance
    Dhiraj

    Hi Dhiraj,
    String connectionURL = "jdbc:mysql://localhost:3306/learn?user=root;password=";
    Connection connection = DriverManager.getConnection(connectionURL, "root", "");
    It seems to be your trying to pass twice of your properties details. One from through URL and another from by pasing the parameters on getConnection() method. Better to avoid to use two place in same application. and one more thing I want to confirm r u using "stable" Driver or "alpha" Driver.
    Raju

Maybe you are looking for