R: R: R: R: App + ConnectorJ + MXJ deployment
"tech" <[email protected]>
| Newsgroups | gmane.comp.db.mysql.java |
|---|---|
| Organization | edoss consulenze |
| Message-ID | <[email protected]> |
Hi Eric, I turned to my application (still on my development pc), but I got the attached Console output. The name of the only table in rua142 is anlog00f. My app connects properly to anlog00f when it is unaware of connector-mxj. The Java runtime found Incorrect information in the file. I attached my Java class which manages the DB connection too. Cheers Roberto -----Messaggio originale----- Da: Eric Herman [mailto:[email protected]] Inviato: giovedì 28 settembre 2006 18.04 A: tech Oggetto: Re: R: R: R: App + ConnectorJ + MXJ deployment On Thu, 2006-09-28 at 16:21 +0200, tech wrote: > Hi, Eric > > I completed step 7. Below you have the console output. > Is it what you expected ? Yes! That looks good! So, let us review: * you have a custom database in your connector-mxj.jar * you have a custom program very similar to the "object example" * the program specifies a "data dir" * we see it can be connect to the rua142 database * the connection uses the utente142 user and password * we see that program is able to do a "select version()" Assuming all of that is correct, it sounds like you should have a working custom connector-mxj.jar and a working test application. I believe that should provide you everything you need to move forward with your main application. Please let us know if you still have questions. -Eric > > Cheers > Roberto > > > [MysqldResource] launching mysqld (getOptions) > [C:\roberto_test\mysql-mxj\bin\mysqld-nt.exe][--no-defaults][--console][--pi > d-file=C:\roberto_test\mysql-mxj\data\MysqldResource.pid][--socket=mysql.soc > k][--datadir=C:\roberto_test\mysql-mxj\data][--basedir=C:\roberto_test\mysql > -mxj][--port=3336] > [MysqldResource] launching mysqld (test-mysqld-thread) > [MysqldResource] mysqld running as process: 1284 > InnoDB: Error: log file .\ib_logfile0 is of different size 0 10485760 bytes > InnoDB: than specified in the .cnf file 0 5242880 bytes! > 060928 15:47:28 [Note] C:\roberto_test\mysql-mxj\bin\mysqld-nt.exe: ready > for connections. > Version: '5.0.22-community-nt' socket: '' port: 3336 MySQL Community > Edition (GPL) > MySQL is running. > ------------------------ > > 5.0.22-community-nt > > ------------------------ > [MysqldResource] stopping mysqld (process: 1284) > [MysqldResource] clearing options > [MysqldResource] shutdown complete > > > > > > > > > > -----Messaggio originale----- > Da: Eric Herman [mailto:[email protected]] > Inviato: mercoledì 27 settembre 2006 12.58 > A: tech > Cc: [email protected] > Oggetto: Re: R: R: App + ConnectorJ + MXJ deployment > > Hello Roberto, > > Please, let me suggest an alternative approach. > > Step 1: Copy ConnectorMXJObjectTestExample.java to something of your > own, like "RobertoTest.java > > Step 2: Alter RobertoTest to use a "basedir" and port of your choosing. > File ourAppDir = new File("C:\roberto_test"); > File databaseDir = new File(ourAppDir, "mysql-mxj"); > int port = 3336; > MysqldResource mysqldResource = startDatabase(databaseDir, port); > > Step 3: Confirm that "RobertoTest" succeeds. > > Step 4: delete all of C:\roberto_test\mysql-mxj > > Step 5: Follow paragraph 25.4.5.2 to jar up the "data" directory of the > Mysql database which you wish to include, and add that into your > connector-mxj.jar > > Step 6: alter RobertoTest to use the user name (utente142), password > (pulsar), and database name (rua142) that work match the settings from > the mysql data dir that you added to the connector-mxj jar file. > > Step 7: confirm that RobertoTest still succeeds. > > If that all works, then it should be a simple set of changes to your > small java app to use Connector/MXJ. > > Cheers, > -Eric > > > On Tue, 2006-09-26 at 10:56 +0200, tech wrote: > > > Hi Eric, > > > > > > > > I'm back to the development machine willing to start from scratch. > > > > > > > > > ============================================================================ > === > > > > STEP 1 > > > > > > > > My small Java app (unaware of Connector-MXJ) runs properly and > > connects > > > > to MySQL Server on the default port 3306: > > > > · to my database rua142 > > > > · with the username utente142 > > > > · with the password pulsar > > > > · with the following JDBC URL Connection (with no explicit port > > reference): > > > > > > > > Connection dbConn = > > > DriverManager.getConnection("jdbc:mysql://localhost/rua142?user=utente142&pa > ssword=pulsar"); > > > > > > > > > ============================================================================ > === > > > > > > > > STEP 2 > > > > > > > > I suppose I should make the Java app aware of Connector-MXJ by > > changing > > > > my Java class which manages the DB connection. > > > > Is the attached java file properly changed ? > > > > > > > > > ============================================================================ > === > > > > > > > > STEP 3 > > > > > > > > Is step # 3 > > > > Creating your own Connector/MXJ Package and Deploying Connector/MXJ > > with a pre-configured database > > > > Following paragraph 27.4.5.1 and 27.4.5.2 of the online manual ? > > > > > > > > > ============================================================================ > === > > > > > > > > Cheers > > > > Roberto > > > > > > > > > > > > > > > > > > > > > > > > > > > > -----Messaggio originale----- > > Da: Eric Herman [mailto:[email protected]] > > Inviato: lunedì 25 settembre 2006 14.03 > > A: tech > > Cc: [email protected] > > Oggetto: Re: R: App + ConnectorJ + MXJ deployment > > > > > > > > Hi Roberto, > > > > > > > > At first glance, the only serious issue I see is that it looks like > > the > > > > port was forgotten in the JDBC URL connection string: > > > > > > > > > dbConn = DriverManager.getConnection("jdbc:mysql://localhost/" + > > > > > DATABASE + "?user=" + USERID + "&password=" + PASSWORD); > > > > > > > > That should really look more like: > > > > > > > > "jdbc:mysql://localhost" + port + "/" + ... > > > > > > > > > > > > > -- > Eric Herman, Software Developer > MySQL AB, www.mysql.com > VoIP Ext: 6594 US: +1 408 213 6540 Europe: +46 18 174 400 > Mobile: +31 [0]6-20719662 > Are you MySQL certified? www.mysql.com/certification > > -- Eric Herman, Software Developer MySQL AB, www.mysql.com VoIP Ext: 6594 US: +1 408 213 6540 Europe: +46 18 174 400 Mobile: +31 [0]6-20719662 Are you MySQL certified? www.mysql.com/certification __________ Informazione NOD32 1.1782 (20060928) __________ Questo messaggio stato controllato dal Sistema Antivirus NOD32 http://www.nod32.it -- MySQL Java Mailing List For list archives: http://lists.mysql.com/java To unsubscribe: http://lists.mysql.com/[email protected]
ConsoleOutput_20060929.txt
(text/plain, 3.4 KB)
[MysqldResource] launching mysqld (getOptions) [C:\roberto_test\mysql-mxj\bin\mysqld-nt.exe][--no-defaults][--console][--pid-file=C:\roberto_test\mysql-mxj\data\MysqldResource.pid][--socket=mysql.sock][--datadir=C:\roberto_test\mysql-mxj\data][--basedir=C:\roberto_test\mysql-mxj][--port=3336] [MysqldResource] launching mysqld (mysql-thread) InnoDB: Error: log file .\ib_logfile0 is of different size 0 10485760 bytes InnoDB: than specified in the .cnf file 0 5242880 bytes! 060929 12:20:40 [Note] C:\roberto_test\mysql-mxj\bin\mysqld-nt.exe: ready for connections. Version: '5.0.22-community-nt' socket: '' port: 3336 MySQL Community Edition (GPL) [MysqldResource] mysqld running as process: 2708 060929 12:20:41 [ERROR] C:\roberto_test\mysql-mxj\bin\mysqld-nt.exe: Incorrect information in file: '.\rua142\anlog00f.frm' 060929 12:20:41 [ERROR] C:\roberto_test\mysql-mxj\bin\mysqld-nt.exe: Incorrect information in file: '.\rua142\anlog00f.frm' 060929 12:20:51 [ERROR] C:\roberto_test\mysql-mxj\bin\mysqld-nt.exe: Incorrect information in file: '.\rua142\anlog00f.frm' 060929 12:20:51 [ERROR] C:\roberto_test\mysql-mxj\bin\mysqld-nt.exe: Incorrect information in file: '.\rua142\anlog00f.frm' java.sql.SQLException: Incorrect information in file: '.\rua142\anlog00f.frm' at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:946) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2870) at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1573) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1665) at com.mysql.jdbc.Connection.execSQL(Connection.java:3124) at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1149) at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1262) at packageAntiriciclaggio.LogonAntiriciclaggio.controllaLogon(LogonAntiriciclaggio.java:241) at packageAntiriciclaggio.LogonAntiriciclaggio.access$3(LogonAntiriciclaggio.java:229) at packageAntiriciclaggio.LogonAntiriciclaggio$1.actionPerformed(LogonAntiriciclaggio.java:155) at javax.swing.AbstractButton.fireActionPerformed(Unknown Source) at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source) at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source) at javax.swing.DefaultButtonModel.setPressed(Unknown Source) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source) at java.awt.Component.processMouseEvent(Unknown Source) at javax.swing.JComponent.processMouseEvent(Unknown Source) at java.awt.Component.processEvent(Unknown Source) at java.awt.Container.processEvent(Unknown Source) at java.awt.Component.dispatchEventImpl(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source) at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source) at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Window.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source)