You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Todd Grigsby <st...@tgrigsby.com> on 2009/12/12 00:01:41 UTC

"specified DSN contains an architecture mismatch"

Configuration:
   Windows 7 64 bit
   Tomcat 6
   Struts 2
   MySQL 5.1.36 for Win64
   MySQL ODBC 5.1 Driver 5.01.06.00

I've created a valid ODBC alias that I can see from other Windows native 
applications with no problem.  When I attempt the following:

import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import javax.sql.DataSource;
import java.sql.Connection;

...

    Context context = new InitialContext();
    DataSource ds = 
(DataSource)context.lookup("java:/comp/env/jdbc/odbc/tgecorp");
    Connection conn = datasource.getConnection();

...

The last line throws an exception with the following message:  "The 
specified DSN contains an architecture mismatch between the Driver and 
Application."

I reinstalled the driver, redefined the System DSN's in the ODBC 
administrator, and I still get the same message.  Anybody have any idea 
how to fix this?

Todd

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: "specified DSN contains an architecture mismatch"

Posted by Todd Grigsby <st...@tgrigsby.com>.
The application runs on Oracle, MySQL, or SQL Server, depending on the 
distro, and on various versions of these depending on the version and 
type of OS.  MySQL is our preferred database.  We use JDBC to simplify 
the connection process.

TG

Wes Wannemacher wrote:
> Why use odbc? Mysql has a top notch jdbc driver.
>
> On 12/11/09, Todd Grigsby <st...@tgrigsby.com> wrote:
>   
>> Yes, thank you, I know that.  My question has to do with the
>> architecture mismatch.  All the documentation I've seen on this
>> indicates that there is a 32-bit/64-bit issue, but I'll be darned if I
>> know which piece is at fault.  Given the versions of the various parts,
>> does anyone have any idea what I need to do to be able to talk to MySQL?
>>
>> TG
>>
>> Martin Gainty wrote:
>>     
>>> you're using InitialContext to lookup a DataSource registered to JNDI
>>> registry
>>>
>>> Martin Gainty
>>>
>>>       
>>>>>   Context context = new InitialContext();
>>>>>   DataSource ds =
>>>>> (DataSource)context.lookup("java:/comp/env/jdbc/odbc/tgecorp");
>>>>>   Connection conn = datasource.getConnection();
>>>>>
>>>>> ...
>>>>>
>>>>> The last line throws an exception with the following message:  "The
>>>>> specified DSN contains an architecture mismatch between the Driver and
>>>>> Application."
>>>>>
>>>>>           
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
>>     
>
>
>   


Re: "specified DSN contains an architecture mismatch"

Posted by Wes Wannemacher <we...@wantii.com>.
Why use odbc? Mysql has a top notch jdbc driver.

On 12/11/09, Todd Grigsby <st...@tgrigsby.com> wrote:
>
> Yes, thank you, I know that.  My question has to do with the
> architecture mismatch.  All the documentation I've seen on this
> indicates that there is a 32-bit/64-bit issue, but I'll be darned if I
> know which piece is at fault.  Given the versions of the various parts,
> does anyone have any idea what I need to do to be able to talk to MySQL?
>
> TG
>
> Martin Gainty wrote:
>> you're using InitialContext to lookup a DataSource registered to JNDI
>> registry
>>
>> Martin Gainty
>>
>>>>   Context context = new InitialContext();
>>>>   DataSource ds =
>>>> (DataSource)context.lookup("java:/comp/env/jdbc/odbc/tgecorp");
>>>>   Connection conn = datasource.getConnection();
>>>>
>>>> ...
>>>>
>>>> The last line throws an exception with the following message:  "The
>>>> specified DSN contains an architecture mismatch between the Driver and
>>>> Application."
>>>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


-- 
Wes Wannemacher

Head Engineer, WanTii, Inc.
Need Training? Struts, Spring, Maven, Tomcat...
Ask me for a quote!

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: "specified DSN contains an architecture mismatch"

Posted by Todd Grigsby <st...@tgrigsby.com>.
Yes, thank you, I know that.  My question has to do with the 
architecture mismatch.  All the documentation I've seen on this 
indicates that there is a 32-bit/64-bit issue, but I'll be darned if I 
know which piece is at fault.  Given the versions of the various parts, 
does anyone have any idea what I need to do to be able to talk to MySQL?

TG

Martin Gainty wrote:
> you're using InitialContext to lookup a DataSource registered to JNDI registry
>
> Martin Gainty 
>   
>>>   Context context = new InitialContext();
>>>   DataSource ds =
>>> (DataSource)context.lookup("java:/comp/env/jdbc/odbc/tgecorp");
>>>   Connection conn = datasource.getConnection();
>>>
>>> ...
>>>
>>> The last line throws an exception with the following message:  "The
>>> specified DSN contains an architecture mismatch between the Driver and
>>> Application."
>>>       


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


RE: "specified DSN contains an architecture mismatch"

Posted by Martin Gainty <mg...@hotmail.com>.
you're using InitialContext to lookup a DataSource registered to JNDI registry

Martin Gainty 
______________________________________________ 
Jogi és Bizalmassági kinyilatkoztatás/Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
 Ez az
üzenet bizalmas.  Ha nem ön az akinek szánva volt, akkor kérjük, hogy
jelentse azt nekünk vissza. Semmiféle továbbítása vagy másolatának
készítése nem megengedett.  Ez az üzenet csak ismeret cserét szolgál és
semmiféle jogi alkalmazhatósága sincs.  Mivel az electronikus üzenetek
könnyen megváltoztathatóak, ezért minket semmi felelöség nem terhelhet
ezen üzenet tartalma miatt.

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.




> Date: Fri, 11 Dec 2009 15:46:56 -0800
> Subject: Re: "specified DSN contains an architecture mismatch"
> From: musachy@gmail.com
> To: user@struts.apache.org
> 
> O_o
> 
> On Fri, Dec 11, 2009 at 3:01 PM, Todd Grigsby <st...@tgrigsby.com> wrote:
> >
> > Configuration:
> >  Windows 7 64 bit
> >  Tomcat 6
> >  Struts 2
> >  MySQL 5.1.36 for Win64
> >  MySQL ODBC 5.1 Driver 5.01.06.00
> >
> > I've created a valid ODBC alias that I can see from other Windows native
> > applications with no problem.  When I attempt the following:
> >
> > import javax.naming.Context;
> > import javax.naming.InitialContext;
> > import javax.naming.NamingException;
> > import javax.sql.DataSource;
> > import java.sql.Connection;
> >
> > ...
> >
> >   Context context = new InitialContext();
> >   DataSource ds =
> > (DataSource)context.lookup("java:/comp/env/jdbc/odbc/tgecorp");
> >   Connection conn = datasource.getConnection();
> >
> > ...
> >
> > The last line throws an exception with the following message:  "The
> > specified DSN contains an architecture mismatch between the Driver and
> > Application."
> >
> > I reinstalled the driver, redefined the System DSN's in the ODBC
> > administrator, and I still get the same message.  Anybody have any idea how
> > to fix this?
> >
> > Todd
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
 		 	   		  
_________________________________________________________________
Hotmail: Trusted email with Microsoft’s powerful SPAM protection.
http://clk.atdmt.com/GBL/go/177141664/direct/01/

Re: "specified DSN contains an architecture mismatch"

Posted by Musachy Barroso <mu...@gmail.com>.
O_o

On Fri, Dec 11, 2009 at 3:01 PM, Todd Grigsby <st...@tgrigsby.com> wrote:
>
> Configuration:
>  Windows 7 64 bit
>  Tomcat 6
>  Struts 2
>  MySQL 5.1.36 for Win64
>  MySQL ODBC 5.1 Driver 5.01.06.00
>
> I've created a valid ODBC alias that I can see from other Windows native
> applications with no problem.  When I attempt the following:
>
> import javax.naming.Context;
> import javax.naming.InitialContext;
> import javax.naming.NamingException;
> import javax.sql.DataSource;
> import java.sql.Connection;
>
> ...
>
>   Context context = new InitialContext();
>   DataSource ds =
> (DataSource)context.lookup("java:/comp/env/jdbc/odbc/tgecorp");
>   Connection conn = datasource.getConnection();
>
> ...
>
> The last line throws an exception with the following message:  "The
> specified DSN contains an architecture mismatch between the Driver and
> Application."
>
> I reinstalled the driver, redefined the System DSN's in the ODBC
> administrator, and I still get the same message.  Anybody have any idea how
> to fix this?
>
> Todd
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: "specified DSN contains an architecture mismatch"

Posted by Patrick J Kobly <pa...@kobly.com>.
Todd Grigsby wrote:
>
> I'm trying to get an all 64-bit environment going, but if I have to 
> step down to 32 bit, then that's what I have to do to get going.  As 
> for addressing the right crowd, I think you may be right.  Except for 
> you, it's been a frustrating exercise.  I'm already going through the 
> MySQL forums, but there don't seem to be a lot of posts there from 
> people working with Java+Struts on Win7 64-bit.
Broaden your horizons a bit from Java+Struts with MySQL on Win7 
64-bit...  This is an error message from the ODBC system.  It is _not_ 
coming from Struts.  It is _not_ coming from MySQL.  It was present on 
64-bit versions of Windows prior to Win 7.

- The MSDN forums have some info on installing 32-bit ODBC drivers under 
a 64-bit platform.
- The Tomcat guys probably have info on running Tomcat in a 64-bit JRE.

Your solution will likely lie in one of those two places.

PK
>
> Thanks for the suggestions.  I'll keep digging.
>
> TG
>
>
> Patrick J Kobly wrote:
>> Perhaps try using a 64-bit JVM or installing the 32-bit ODBC 
>> driver...  The first couple of Google hits when searching for the 
>> error message provided seem to suggest hints for installing the 
>> 32-bit ODBC driver under 64-bit Windows.  You are likely to get more 
>> traction on this question asking it of
>>
>> a) Tomcat folks
>> b) Microsoft folks
>> c) Java folks
>> d) MySQL folks
>>
>> Rather than Struts folks.
>>
>> PK
>> Todd Grigsby wrote:
>>>
>>> Configuration:
>>>   Windows 7 64 bit
>>>   Tomcat 6
>>>   Struts 2
>>>   MySQL 5.1.36 for Win64
>>>   MySQL ODBC 5.1 Driver 5.01.06.00
>>>
>>> I've created a valid ODBC alias that I can see from other Windows 
>>> native applications with no problem.  When I attempt the following:
>>>
>>> import javax.naming.Context;
>>> import javax.naming.InitialContext;
>>> import javax.naming.NamingException;
>>> import javax.sql.DataSource;
>>> import java.sql.Connection;
>>>
>>> ...
>>>
>>>    Context context = new InitialContext();
>>>    DataSource ds = 
>>> (DataSource)context.lookup("java:/comp/env/jdbc/odbc/tgecorp");
>>>    Connection conn = datasource.getConnection();
>>>
>>> ...
>>>
>>> The last line throws an exception with the following message:  "The 
>>> specified DSN contains an architecture mismatch between the Driver 
>>> and Application."
>>>
>>> I reinstalled the driver, redefined the System DSN's in the ODBC 
>>> administrator, and I still get the same message.  Anybody have any 
>>> idea how to fix this?
>>>
>>> Todd
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>> For additional commands, e-mail: user-help@struts.apache.org
>>>
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: "specified DSN contains an architecture mismatch"

Posted by Todd Grigsby <st...@tgrigsby.com>.
I'm trying to get an all 64-bit environment going, but if I have to step 
down to 32 bit, then that's what I have to do to get going.  As for 
addressing the right crowd, I think you may be right.  Except for you, 
it's been a frustrating exercise.  I'm already going through the MySQL 
forums, but there don't seem to be a lot of posts there from people 
working with Java+Struts on Win7 64-bit.

Thanks for the suggestions.  I'll keep digging.

TG


Patrick J Kobly wrote:
> Perhaps try using a 64-bit JVM or installing the 32-bit ODBC 
> driver...  The first couple of Google hits when searching for the 
> error message provided seem to suggest hints for installing the 32-bit 
> ODBC driver under 64-bit Windows.  You are likely to get more traction 
> on this question asking it of
>
> a) Tomcat folks
> b) Microsoft folks
> c) Java folks
> d) MySQL folks
>
> Rather than Struts folks.
>
> PK
> Todd Grigsby wrote:
>>
>> Configuration:
>>   Windows 7 64 bit
>>   Tomcat 6
>>   Struts 2
>>   MySQL 5.1.36 for Win64
>>   MySQL ODBC 5.1 Driver 5.01.06.00
>>
>> I've created a valid ODBC alias that I can see from other Windows 
>> native applications with no problem.  When I attempt the following:
>>
>> import javax.naming.Context;
>> import javax.naming.InitialContext;
>> import javax.naming.NamingException;
>> import javax.sql.DataSource;
>> import java.sql.Connection;
>>
>> ...
>>
>>    Context context = new InitialContext();
>>    DataSource ds = 
>> (DataSource)context.lookup("java:/comp/env/jdbc/odbc/tgecorp");
>>    Connection conn = datasource.getConnection();
>>
>> ...
>>
>> The last line throws an exception with the following message:  "The 
>> specified DSN contains an architecture mismatch between the Driver 
>> and Application."
>>
>> I reinstalled the driver, redefined the System DSN's in the ODBC 
>> administrator, and I still get the same message.  Anybody have any 
>> idea how to fix this?
>>
>> Todd
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: "specified DSN contains an architecture mismatch"

Posted by Patrick J Kobly <pa...@kobly.com>.
Perhaps try using a 64-bit JVM or installing the 32-bit ODBC driver...  
The first couple of Google hits when searching for the error message 
provided seem to suggest hints for installing the 32-bit ODBC driver 
under 64-bit Windows.  You are likely to get more traction on this 
question asking it of

a) Tomcat folks
b) Microsoft folks
c) Java folks
d) MySQL folks

Rather than Struts folks.

PK
Todd Grigsby wrote:
>
> Configuration:
>   Windows 7 64 bit
>   Tomcat 6
>   Struts 2
>   MySQL 5.1.36 for Win64
>   MySQL ODBC 5.1 Driver 5.01.06.00
>
> I've created a valid ODBC alias that I can see from other Windows 
> native applications with no problem.  When I attempt the following:
>
> import javax.naming.Context;
> import javax.naming.InitialContext;
> import javax.naming.NamingException;
> import javax.sql.DataSource;
> import java.sql.Connection;
>
> ...
>
>    Context context = new InitialContext();
>    DataSource ds = 
> (DataSource)context.lookup("java:/comp/env/jdbc/odbc/tgecorp");
>    Connection conn = datasource.getConnection();
>
> ...
>
> The last line throws an exception with the following message:  "The 
> specified DSN contains an architecture mismatch between the Driver and 
> Application."
>
> I reinstalled the driver, redefined the System DSN's in the ODBC 
> administrator, and I still get the same message.  Anybody have any 
> idea how to fix this?
>
> Todd
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org