You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by David kerber <dc...@verizon.net> on 2011/04/07 23:50:29 UTC

Re: Trouble with jdbc drivers in TC 7 - fixed

To close this loop, I got it fixed.  The issue was a (apparently very 
slightly) corrupt jodbc.jar file.  I say very slightly because I could 
open it with windows explorer's .zip handling functionality and 
everything looked fine, but tomcat choked on it when trying to open it 
with java.util.zip.  Tomcat was throwing exceptions at startup, but they 
were quite a bit further up in the log from the one I posted here, and I 
didn't see them for the longest time.

The CNFE was due to the .jar containing the class not being opened 
because of the unzipping error.  Reinstalling the software update got me 
a good .jar file, and now it all works.

Thanks for your patience!

D


On 4/7/2011 5:05 PM, David kerber wrote:
> On 4/7/2011 5:01 PM, Filip Hanik - Dev Lists wrote:
>> The config has changed from
>>
>> <Resource ...>
>> <param>
>>
>>
>> to
>> <Resource
>> driverClassName="...."
>
> I don't use any of those, because TC isn't managing the pool; the app
> handles its own pool. The file layout that works in 5.5 doesn't seem to
> work in 7.0, unless there's some very subtle difference I'm not seeing.
>
>
>>
>>
>> that could be your culprit
>>
>> On 4/7/2011 12:08 PM, David kerber wrote:
>>> System: Windows Server 2008 R2 Standard (64-bit)
>>> JRE: 1.6.0_24 x64
>>> TC: 7.0.11, installed in c:\Program Files\..., so it detected an x64
>>> installation
>>> DB: Sybase ASA 9.0.2.3951, x64 version
>>>
>>> DB server and TC are both installed on this same machine.
>>>
>>> I'm trying to port my app from tc 5.5.something late, to 7.0, and
>>> can't get my app to find the driver class. It all works fine under TC
>>> 5.5.
>>>
>>> All my database pooling is done in the application, so I thought
>>> putting the jodbc.jar in the WEB-INF/lib of the app would work with no
>>> need to edit my configuration files, but I'm still getting the class
>>> not found error below. I have also tried moving jodbc.jar to
>>> %catalina_home%/lib, but that didn't help either.
>>>
>>> RtData64 is the 64-bit ODBC DSN, which test ok in ODBC admin. I have
>>> opened jodbc.jar to be sure it has ianywhere.ml.jdbcodbc.IDriver
>>> inside it.
>>>
>>> Am I missing some configuration requirements? I can't find anything in
>>> the online docs that would indicate I need to do anything, since I'm
>>> not having TC handle the connection pooling.
>>>
>>> Dave
>>>
>>>
>>> Thu Apr 07 12:09:56 EDT 2011: Exception in class:
>>> com.wra.websira.WraAdmin, Msg: 'Initialization', Exception:
>>> java.lang.ClassNotFoundException: ianywhere.ml.jdbcodbc.IDriver
>>> Thu Apr 07 12:09:56 EDT 2011: Exception in class:
>>> com.wra.websira.WraJdbc, Msg: 'Creating database: RtData64',
>>> Exception: java.lang.ClassNotFoundException:
>>> ianywhere.ml.jdbcodbc.IDriver
>>> java.lang.ClassNotFoundException: ianywhere.ml.jdbcodbc.IDriver
>>> at
>>> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1676)
>>>
>>>
>>> at
>>> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1521)
>>>
>>>
>>> at java.lang.Class.forName0(Native Method)
>>> at java.lang.Class.forName(Unknown Source)
>>> at com.wra.websira.WraDatabase.open(WraDatabase.java:64)
>>> at com.wra.websira.WraJdbc.<init>(WraJdbc.java:46)
>>> at com.wra.websira.WraAdmin.init(WraAdmin.java:257)
>>> at com.wra.websira.WraAdmin.validateUser(WraAdmin.java:594)
>>> at com.wra.websira.WraAdmin.validateUser(WraAdmin.java:451)
>>> at eddsrv.LoginBean.verifyUser(LoginBean.java:41)
>>> at org.apache.jsp.Login_jsp._jspService(Login_jsp.java:144)
>>> at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
>>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
>>> at
>>> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:419)
>>>
>>>
>>> at
>>> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:391)
>>> at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
>>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
>>> at
>>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)
>>>
>>>
>>> at
>>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
>>>
>>>
>>> at
>>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240)
>>>
>>>
>>> at
>>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:164)
>>>
>>>
>>> at
>>> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:498)
>>>
>>>
>>> at
>>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
>>>
>>>
>>> at
>>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
>>>
>>>
>>> at
>>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
>>>
>>>
>>> at
>>> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:394)
>>>
>>>
>>> at
>>> org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:284)
>>>
>>>
>>> at
>>> org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:322)
>>>
>>>
>>> at
>>> org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1714)
>>>
>>>
>>> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown
>>> Source)
>>> at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
>>> at java.lang.Thread.run(Unknown Source)
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Trouble with jdbc drivers in TC 7 - fixed

Posted by David Kerber <dc...@verizon.net>.
On 4/7/2011 8:02 PM, Konstantin Kolinko wrote:
> 2011/4/8 David Kerber<dc...@verizon.net>:
>> On 4/7/2011 5:57 PM, Konstantin Kolinko wrote:
>>> 2011/4/8 David kerber<dc...@verizon.net>:
>>>> To close this loop, I got it fixed.  The issue was a (apparently very
>>>> slightly) corrupt jodbc.jar file.  I say very slightly because I could
>>>> open
>>>> it with windows explorer's .zip handling functionality and everything
>>>> looked
>>>> fine, but tomcat choked on it when trying to open it with java.util.zip.
>>>>   Tomcat was throwing exceptions at startup, but they were quite a bit
>>>> further up in the log from the one I posted here, and I didn't see them
>>>> for
>>>> the longest time.
>>> Congratulations.
>>>
>>> Were the messages clear enough, or maybe something may need improving
>>> there?
>> The error message was fine, once I actually saw it.  It was just quite a
>> ways up the log file from the final exception that I originally posted.
>>   Once I saw the startup error, it's obvious that the CNFE was just a
>> cascading error from the root problem.
>>
>> The only thing I question is whether java.util.zip might be too picky, and
>> failing to open .jar files that could have actually been usable.  Windows
>> had no trouble unzipping the .jar.  That's obviously an Oracle issue,
>> though, and not a Tomcat one.
>>
> If a jar is truncated I wouldn't call it useful, and it is better to fail early.
>
>
> IIRC,in zip format there is header for each zipped entry, plus a
> master index at the end.
> Reading the archive sequentially vs. accessing a random file will be
> implemented differently.  And it looks as if Windows integrated
> support of zip files is loose in error handling. (A thing to beware if
> anyone will encounter the same issue as you did).
Windows is well known to have issues in its .zip handling, especially 
with large files.  I have seen many times where windows would demand a 
password for a .zip file, when one was not actually required.  Switching 
to a real unzipper like 7zip or equivalent fixed the problem.

D


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Trouble with jdbc drivers in TC 7 - fixed

Posted by Konstantin Kolinko <kn...@gmail.com>.
2011/4/8 David Kerber <dc...@verizon.net>:
> On 4/7/2011 5:57 PM, Konstantin Kolinko wrote:
>>
>> 2011/4/8 David kerber<dc...@verizon.net>:
>>>
>>> To close this loop, I got it fixed.  The issue was a (apparently very
>>> slightly) corrupt jodbc.jar file.  I say very slightly because I could
>>> open
>>> it with windows explorer's .zip handling functionality and everything
>>> looked
>>> fine, but tomcat choked on it when trying to open it with java.util.zip.
>>>  Tomcat was throwing exceptions at startup, but they were quite a bit
>>> further up in the log from the one I posted here, and I didn't see them
>>> for
>>> the longest time.
>>
>> Congratulations.
>>
>> Were the messages clear enough, or maybe something may need improving
>> there?
>
> The error message was fine, once I actually saw it.  It was just quite a
> ways up the log file from the final exception that I originally posted.
>  Once I saw the startup error, it's obvious that the CNFE was just a
> cascading error from the root problem.
>
> The only thing I question is whether java.util.zip might be too picky, and
> failing to open .jar files that could have actually been usable.  Windows
> had no trouble unzipping the .jar.  That's obviously an Oracle issue,
> though, and not a Tomcat one.
>

If a jar is truncated I wouldn't call it useful, and it is better to fail early.


IIRC,in zip format there is header for each zipped entry, plus a
master index at the end.
Reading the archive sequentially vs. accessing a random file will be
implemented differently.  And it looks as if Windows integrated
support of zip files is loose in error handling. (A thing to beware if
anyone will encounter the same issue as you did).

Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Trouble with jdbc drivers in TC 7 - fixed

Posted by David Kerber <dc...@verizon.net>.
On 4/7/2011 5:57 PM, Konstantin Kolinko wrote:
> 2011/4/8 David kerber<dc...@verizon.net>:
>> To close this loop, I got it fixed.  The issue was a (apparently very
>> slightly) corrupt jodbc.jar file.  I say very slightly because I could open
>> it with windows explorer's .zip handling functionality and everything looked
>> fine, but tomcat choked on it when trying to open it with java.util.zip.
>>   Tomcat was throwing exceptions at startup, but they were quite a bit
>> further up in the log from the one I posted here, and I didn't see them for
>> the longest time.
> Congratulations.
>
> Were the messages clear enough, or maybe something may need improving there?
The error message was fine, once I actually saw it.  It was just quite a 
ways up the log file from the final exception that I originally posted.  
Once I saw the startup error, it's obvious that the CNFE was just a 
cascading error from the root problem.

The only thing I question is whether java.util.zip might be too picky, 
and failing to open .jar files that could have actually been usable.  
Windows had no trouble unzipping the .jar.  That's obviously an Oracle 
issue, though, and not a Tomcat one.

Dave


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Trouble with jdbc drivers in TC 7 - fixed

Posted by Konstantin Kolinko <kn...@gmail.com>.
2011/4/8 David kerber <dc...@verizon.net>:
> To close this loop, I got it fixed.  The issue was a (apparently very
> slightly) corrupt jodbc.jar file.  I say very slightly because I could open
> it with windows explorer's .zip handling functionality and everything looked
> fine, but tomcat choked on it when trying to open it with java.util.zip.
>  Tomcat was throwing exceptions at startup, but they were quite a bit
> further up in the log from the one I posted here, and I didn't see them for
> the longest time.

Congratulations.

Were the messages clear enough, or maybe something may need improving there?

>
> The CNFE was due to the .jar containing the class not being opened because
> of the unzipping error.  Reinstalling the software update got me a good .jar
> file, and now it all works.
>
> Thanks for your patience!
>
> D
>

Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org