How to reinstall a web application that runs well in windows 32 bit environment on a 64 bit windows server. Tons of issues. It may be possible.

satya - Tuesday, August 24, 2010 10:38:55 AM

progress


D:\webpage_demos  
and d:\apache tomcat 

were copied from your server

satya - Tuesday, August 24, 2010 10:56:18 AM

tomcat homepage

tomcat homepage

satya - Tuesday, August 24, 2010 11:01:41 AM

tomcat 7 notes

tomcat 7 notes

satya - Tuesday, August 24, 2010 11:11:28 AM

Download tomcat 7 from here

Download tomcat 7 from here

look for 64bit windows zip

satya - Tuesday, August 24, 2010 11:21:50 AM

The equivalen JDK is: jdk-6u20-windows-x64.exe

The equivalen JDK is: jdk-6u20-windows-x64.exe

satya - Tuesday, August 24, 2010 11:22:13 AM

jdk-6u20-windows-x64.exe

Search for: jdk-6u20-windows-x64.exe

satya - Tuesday, August 24, 2010 11:24:46 AM

Here is the JDK install page from Oracle

Here is the JDK install page from Oracle

satya - Tuesday, August 24, 2010 11:26:40 AM

Verify if you are using 32-bit or 64-bit IE browser

Follow these steps to verify whether you are using 32-bit or 64-bit browser.

a.Launch Internet Explorer browser.

b.Click on the Help tab at the top.

c.Select About Internet Explorer which will bring up an information window. d.If version of IE displays 64-bit Edition, then it is 64-bit IE, otherwise it is 32-bit browser.

satya - Tuesday, August 24, 2010 11:28:05 AM

The above oracle links only gives you the jre

we need a full install of jdk

satya - Tuesday, August 24, 2010 11:31:51 AM

Here is a better link for JDk downloads

Here is a better link for JDk downloads

satya - Tuesday, August 24, 2010 11:34:31 AM

Here is a specific link for the jdk 16 downolad

Here is a specific link for the jdk 16 downolad

satya - Friday, August 27, 2010 11:04:09 AM

tomcat 7 faqs

tomcat 7 faqs

satya - Friday, August 27, 2010 11:05:59 AM

what is System.loadLibrary() in java

what is System.loadLibrary() in java

Search for: what is System.loadLibrary() in java

satya - Friday, August 27, 2010 11:07:15 AM

java endorsed libraries

java endorsed libraries

Search for: java endorsed libraries

satya - Friday, August 27, 2010 11:42:25 AM

Add these two nodes under the "host" tag


<Context path="" docBase="w:/akc" debug="0"/>
<Context path="/akc" docBase="w:/akc" debug="0">

satya - Friday, August 27, 2010 12:17:43 PM

Configuring a connection pool sample


<Resource name="jdbc/reportsdb"
               auth="Container"
               type="javax.sql.DataSource"/>

  <ResourceParams name="jdbc/reportsdb">
    <parameter>
      <name>factory</name>
      <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
    </parameter>

    <!-- Maximum number of dB connections in pool. Make sure you
         configure your mysqld max_connections large enough to handle
         all of your db connections. Set to 0 for no limit.
         -->
    <parameter>
      <name>maxActive</name>
      <value>10</value>
    </parameter>

    <!-- Maximum number of idle dB connections to retain in pool.
         Set to -1 for no limit.  See also the DBCP documentation on this
         and the minEvictableIdleTimeMillis configuration parameter.
         -->
    <parameter>
      <name>maxIdle</name>
      <value>5</value>
    </parameter>

    <!-- Maximum time to wait for a dB connection to become available
         in ms, in this example 10 seconds. An Exception is thrown if
         this timeout is exceeded.  Set to -1 to wait indefinitely.
         -->
    <parameter>
      <name>maxWait</name>
      <value>10000</value>
    </parameter>

    <!-- MySQL dB username and password for dB connections  -->
    <parameter>
     <name>username</name>
     <value>abc</value>
    </parameter>
    <parameter>
     <name>password</name>
     <value>some-pass-word</value>
    </parameter>

    <parameter>
       <name>driverClassName</name>
       <value>sun.jdbc.odbc.JdbcOdbcDriver</value>
    </parameter>
    
    <!-- The JDBC connection url for connecting to your MySQL dB.
         The autoReconnect=true argument to the url makes sure that the
         mm.mysql JDBC Driver will automatically reconnect if mysqld closed the
         connection.  mysqld by default closes idle connections after 8 hours.
         -->
    <parameter>
      <name>url</name>
      <value>jdbc:odbc:akc-reportsDB</value>
    </parameter>
  </ResourceParams>
</Resource>

satya - Friday, August 27, 2010 12:19:26 PM

Concisely


<Resource name="jdbc/reportsdb"
               auth="Container"
               type="javax.sql.DataSource"/>

  <ResourceParams name="jdbc/reportsdb">
    <parameter>
      <name>factory</name>
      <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
    </parameter>
    <parameter>
      <name>maxActive</name><value>10</value>
    </parameter>
    <parameter>
      <name>maxIdle</name><value>5</value>
    </parameter>
    <parameter>
      <name>maxWait</name><value>10000</value>
    </parameter>

    <parameter>
     <name>username</name><value>abc</value>
    </parameter>
    <parameter>
     <name>password</name><value>some-pass-word</value>
    </parameter>

    <parameter>
       <name>driverClassName</name><value>sun.jdbc.odbc.JdbcOdbcDriver</value>
    </parameter>
    <parameter>
      <name>url</name><value>jdbc:odbc:akc-reportsDB</value>
    </parameter>
  </ResourceParams>
</Resource>

satya - Friday, August 27, 2010 12:19:42 PM

Resource is a child node of context

Resource is a child node of context

satya - Friday, August 27, 2010 12:20:13 PM

Put a link to configuring tomcat connection pool in aspire

Put a link to configuring tomcat connection pool in aspire

satya - Friday, August 27, 2010 12:31:56 PM

I am not using dbcp in akc at the moment


request.AppObjects.connectionManager.className
=com.ai.db.cp4.ConnectionPoolConnectionManager4

The facility is available I believe.

satya - Friday, August 27, 2010 12:38:57 PM

windows 7 The specified DSN contains an architecture mismatch

windows 7 The specified DSN contains an architecture mismatch

Search for: windows 7 The specified DSN contains an architecture mismatch

satya - Friday, August 27, 2010 12:44:44 PM

Looks like there are issues with


64bit java
32bit office
32/64 bit access db

satya - Friday, August 27, 2010 12:48:31 PM

More mumbo jumbo on odbc 64 bit

More mumbo jumbo on odbc 64 bit

satya - Friday, August 27, 2010 12:57:52 PM

java 64 bit odbc 32bit driver

java 64 bit odbc 32bit driver

Search for: java 64 bit odbc 32bit driver

satya - Friday, August 27, 2010 1:01:35 PM

more to read

more to read

satya - Friday, August 27, 2010 1:15:19 PM

how to create a tomcat service

how to create a tomcat service

Search for: how to create a tomcat service

satya - Friday, August 27, 2010 1:30:16 PM

how to install tomcat service

how to install tomcat service

Search for: how to install tomcat service

look at service.bat. (maybe)

satya - Friday, August 27, 2010 4:03:28 PM

Odbcad32.exe

Odbcad32.exe

Search for: Odbcad32.exe

\windows\syswow64\odbcad32.exe

satya - Friday, August 27, 2010 4:04:09 PM

prunsrv.c tomcat service install failed

prunsrv.c tomcat service install failed

Search for: prunsrv.c tomcat service install failed

satya - Friday, August 27, 2010 4:48:33 PM

install 32 bit tomcat on windows 64 bit machine

install 32 bit tomcat on windows 64 bit machine

Search for: install 32 bit tomcat on windows 64 bit machine

satya - Friday, August 27, 2010 5:01:46 PM

See if these instructions help

See if these instructions help

satya - Friday, August 27, 2010 5:35:33 PM

tomcat service on 64 bit windows

tomcat service on 64 bit windows

Search for: tomcat service on 64 bit windows

satya - Friday, August 27, 2010 5:37:11 PM

This seems promising

This seems promising

satya - Friday, August 27, 2010 6:21:26 PM

This might help

This might help

satya - Friday, August 27, 2010 6:26:43 PM

configure tomcat7 service for jdk 32bit

configure tomcat7 service for jdk 32bit

Search for: configure tomcat7 service for jdk 32bit

satya - Friday, August 27, 2010 6:28:44 PM

will this help

will this help

satya - Friday, August 27, 2010 8:04:02 PM

tomcat7w access denied

tomcat7w access denied

Search for: tomcat7w access denied

satya - Friday, August 27, 2010 8:21:32 PM

tomcat unable to open service windows

tomcat unable to open service windows

Search for: tomcat unable to open service windows

satya - Friday, August 27, 2010 8:26:39 PM

windows setup notes

windows setup notes

satya - Friday, August 27, 2010 8:27:15 PM

windows service howto

windows service howto

satya - Friday, August 27, 2010 9:20:01 PM

windows7 how to run a batch file with admin privileges

windows7 how to run a batch file with admin privileges

Search for: windows7 how to run a batch file with admin privileges

satya - Saturday, August 28, 2010 9:39:49 AM

What do I want to run


Windows 2008 server - 64 bit
Jdk 16 - 32 bit
tomcat 6 - 32 bit
odbc driver - 32 bit
ms access - 32 bit

satya - Saturday, August 28, 2010 9:45:10 AM

Problem 1: There are no 64 bit drivers easily available for ms access

Apparently on a 64 bit windows system, the default is to show/create only 64 bit odbc drivers. So when I open up the console to set up an odbc driver for msaccess, one is not listed

As the research above shows there seem to be a work around by running c:\windows\syswow64\odbcad32.exe.

This version of drvier setup in windows allows the right datasource to msaccess to be created.

Importantly this proves that one can access msaccess in 32bit from java and jdbc on a 64 bit machine. A relief

I was able to test this driver against previously installed tomcat5 and jdk15. works fine from a command line.

satya - Saturday, August 28, 2010 10:03:10 AM

Problem 2: I cannot create a tomcat service in 32 bit environment on a 64 bit machine

This problem has been much talked about on the net going back a few years. Most of that chatter is right except that windows 7 seem to introduce a new wrinkle by way of "User Account Control".

Tomcat comes in three main flavors. 32 bit core, 64 bit core, or installable windows service executable.

The cores are just zip files that you unzip. They work beautifully if you match up your operating system environment. This means on a 32bit machine, the 32 bit core works fine including setting up a service. Same is true with 64 bit machine as long as you use the respective "JVMs"

Same is true with the executable service installation.

Problem comes when you try to use the 32/64 bit windows executable to install on a 64bit box but want to specify 32 bit jvm. You just can't. It can do one or the other but not a mix.

so the windows service executale as an installable option is ruled out for mixed environments.

we are back to the cores. I needed a 32 bit tomcat core. So I need to download the 32 bit tomcat 6 core and unzip it.

To install tomcat as a service the instructions tell us to use the "bin/service.bat" command file to install one. When you try to run this it will refuse to run.

Apparently it uses two executable files to make this work. they are also available in "bin" as tomcat7.exe and tomcat7w.exe. Both of these are "bit" specific compiled executables. So when I downloaded 32 bit core I got 32 bit executables which will not run on a 64 bit machine.

The solution is to preserve the 32 bit core tomcat but replace these two executables. There are some links on the net that will point you to the 64 bit versions of this executable in the "svn" repositories. I will try to put a link later here for tomcat6.

I have used a slightly different approach to get these executables. This is very round about, so if you can locate these two executables by other means you are better off.

I have first installed a jdk16 64 bit jdk 16 vm. I do recommend to install both 32 bit and 64 bit versions of the JDK in that order. This allows you to experiment with versions of tomcat if need be.

Importantly they don't seem to conflict. I also strongly recommend to instal these ina more accessible location such as

c:\i\jdk16-32
c:\i\jdk16-64

This will allow you to configure your tomcat service easier.

So back to how I got the 64bit tomcat service executables. I have downoladed the windows service install of tomcat 6 which is one executable for both 32bit and 64 bit.

I went ahead and installed the 64 bit tomcat using 64 bit jvm. This automatically created a service successfully. Also try to install this to a simpler directory such as

c:\i\tomcat6-64

Now I copy the tomcat-64 directory to tomcat6-64-bkp. Remember to copy and not rename. Then goahead and uninstall tomcat6 either through control panel or through the uninstall exe that comes with tomcat.

This uninstall will remove the tomcat6-64 and the service. now you have a clear machine again.

Now from the tomcat6-64-bkp\bin\ copy the tomcat6.exe and tomcat6w.exe to teh tomcat6-32\bin directory.

Now the tomcat6 32 bit version is ready to work for service installation.

Now I run into the next problem.

satya - Saturday, August 28, 2010 10:08:50 AM

Problem 3: User Acccount Control of windows 7

Tomcat instructions indicate that one needs to use the "bin/service.bat" to set up the install and remove of the tomcat service.

you will also use the batch file to setup the java home and catalina home appropriately.

However the service.bat continues to fail with "access" denied.

I have tried running as an "admin" by right clicking on the command file and run as admin. Didnt' work.

I have turned off mcafee. didn't work.

Finally based on some post I have disabled the User Account Control by setting it to the lowest setting. This forced me to reboot.

Once this pesky security is off then the 32 bit service.bat worked with the 64 bit executales. service is installed. As part of this installation I am also able to set the explicit JVM path via java home and also the explicit catalina home.

Then I turned the user account control back up to its default level.

satya - Saturday, August 28, 2010 10:10:52 AM

Here is an example of how I have used the tomcat 6 service.bat


set java_home=c:\satya\i\jdk16
set catalina_home=c:\satya\i\tomcat632
@rem service.bat remove Tomcat6
service.bat install Tomcat6

satya - Saturday, August 28, 2010 11:04:55 AM

update conf/tomcat-users.xml

You will need something like this to access the manager application.


<user username="satya" password="satya" roles="standard,manager"/>

Then http://localhost:8080, and you will see the home page with access to manager application.

satya - Saturday, August 28, 2010 12:38:39 PM

tomcat service will not run in a 32 bit jvm

tomcat service will not run in a 32 bit jvm

Search for: tomcat service will not run in a 32 bit jvm

satya - Saturday, August 28, 2010 12:39:43 PM

I may have to understand procrun first

I may have to understand procrun first

satya - Saturday, August 28, 2010 4:09:03 PM

32bit tomcat service will not start if the

I had to change this to Java. Then it won't stop. I have to change the stop setting to Java as well.

Even then I have to set the system level java_home to point to the 32 bit jdk

satya - Saturday, August 28, 2010 4:20:13 PM

New bottom line


instal jdk16 32 bit
install jdk64 32 bit
unzip tomcat 6 32 bit
install tomcat 6 windows service (requires jdk64)
   (give the directory a new name tomcat664)
Copy tomcat664 as a backup
uninstall tomcat 6 64 bit
copy tomcat6.exe and tomcat6w.exe to tomcat 32 bit
Reduce the windows account control to minimum
set system environment variable java_home to jdk 32 bit
restart
install a service using service.bat
start tomcat6w.exe
change the "start" to Java from jvm
change the "stop" to Java from jvm
This should let you start and stop the service

I have spent over 15 hours on this so far. I have just managed to make it work on windows 7 64 bit. I hate to see someone else go through this. If you need assistance in this matter send me an email. satya.komatineni@gmail.com

satya - Saturday, August 28, 2010 9:27:10 PM

microsoft access drivers

microsoft access drivers

satya - Saturday, August 28, 2010 9:33:14 PM

2010 driver

2010 driver

satya - Sunday, August 29, 2010 8:05:01 AM

jdbc driver for ms access

jdbc driver for ms access

Search for: jdbc driver for ms access

satya - Sunday, August 29, 2010 8:14:16 AM

stelsmdb may be an option

stelsmdb may be an option

satya - Tuesday, August 31, 2010 10:46:00 AM

windows 2008 exposing port 80

windows 2008 exposing port 80

Search for: windows 2008 exposing port 80

satya - Tuesday, August 31, 2010 10:47:58 AM

It is called windows firewall with advanced security

you can use new windows search to locate this

satya - Tuesday, August 31, 2010 10:55:12 AM

enabling a port

enabling a port

satya - Tuesday, August 31, 2010 10:59:51 AM

basics of windows firewall

basics of windows firewall

satya - Tuesday, August 31, 2010 11:00:14 AM

in windows 2008 the firewall is on and blocks by default

in windows 2008 the firewall is on and blocks by default