totally unexplainable tomcat mystery!

I

ian ward

Either tomcat is mad or I am!
I have finally got my webapp to run with, most importantly, some
awkward dlls, together with the application jar, installed in the
WEB-INF\lib folder.
All runs fine until I shutdown and restart tomcat. The only way I can
get my app to work again is the following:
remake my dlls and their jni classes - move these to eclipse so I can
recreate the jar - move the jar and the dlls to the WEB-INF\lib -
restarting tomcat then usually results in the app running ok.
There may well be some redundancy between my steps but I can't leave
any of them out, I have to go back to the beginning and I am utterly
mystified.

Please enlighten me if you can - or at least suggest what I might try
to cure this.

Thanks
Ian
 
I

ian ward

thanks -is that a url you've given me? (and what's a catnip!?)

Actually, I'm trying it 'the long way round', or at least, the other
way round, and I've put my full directory tree of classes in
WEB-INF\classes instead. Now I get a good old NoClassDefFoundError!
I know that the class in question is there where it should be
I know that, where I copied the whole directory structure from (an
eclipse workspace) it works
I know that if I try to access it from the console in its new location
(with WEB-INF\classes on the classpath) it works

But, when I try to access it via Tomcat from a jsp page I get the
error. I know that this error has a hundred possible causes but maybe
someone can suggest a shorter list with the clues offered.

One last clue - this class is a JNI class which I've compiled
separately and I wonder if that has anything to do with it - in any
case, I'm not surprised that this is the one giving me the headache!

Thanks
Ian
 
A

Andrew Thompson

L

Lucy

..(and what's a catnip!?)

..perhaps a reference to "Either tomcat is mad or I am!"?
[ From vague memory, catnip either cures madness in cats
(shrugs) ..or causes it! ]


cat·nip
cat·nip (kàt¹nîp´) noun
1. A hairy, aromatic perennial herb (Nepeta cataria) in the mint family,
native to Eurasia and containing an aromatic oil to which cats are strongly
attracted.
2. Any of various other mostly aromatic plants in the genus Nepeta,
cultivated for their ornamental foliage and clusters of blue, lavender, or
white flowers.

[cat + nip, catnip (variant of nep, from Middle English nept, nep, from Old
English nepte, from Latin nepeta, aromatic herb, perhaps of Etruscan
origin).]
 
A

Andrew Thompson

..(and what's a catnip!?)

..perhaps a reference to "Either tomcat is mad or I am!"?
[ From vague memory, catnip either cures madness in cats
(shrugs) ..or causes it! ]

cat·nip
cat·nip (kàt¹nîp´) noun ... (snip)
..perhaps of Etruscan origin).]

Aaah, those Etruscans..

Well - ..get all technical on me, why not?!? [ ;-) ]
 
I

ian ward

Right, fascinating, but meanwhile, back 'on-subject'....thanks for the
explanation of what Seamus indicated, however, having just posted my
query I've noticed that it is pretty dead down there so I won't be
holding my breath waiting for an answer. Is there any chance of being
pointed in the right direction for my NoClassDefFoundError - and I was
only joking about Tomcat ok? I'm just new round here, as you know.

Thanks, hopefully
Ian
 
A

Andrew Thompson

...Is there any chance of being
pointed in the right direction for my NoClassDefFoundError -

At this stage the information you have provided is
not specific enough (especially in relation to paths)
for me to understand what is happening. But then - I
am no web app. or JNI expert, in any case.
 
I

ian ward

I thought that Tomcat had its own system of classpaths etc and it was
only a question of putting the classes, jars, libraries etc in the
right place?
But if you're not an expert then I'll wait for someone who is....thanks
Ian
 
I

ian ward

Here is some clarification for anyone who is listening...
The NoClassDefFoundError is a red herring.
My real problem, badly explained at the top of this thread boils down
to this.....

An unexpected exception has been detected in native code outside the
VM.
Unexpected Signal : EXCEPTION_ACCESS_VIOLATION occurred at
PC=0x67462713
Function=[Unknown.]

I did seem to manage to get the thing to work but usually this is where
I finish up.
Without going in to long, badly expressed, explanations I'll just say
that I believe my problem is that my dlls, accessed from my java
classes, can't talk to each other - passing a pointer to one as a
method argument to another causes this crash.
When I run something out of my app from the (windows) command line I
get the same crash if I am not positioned in the directory holding the
dlls - this may or may not be called the 'working directory'.
I need to be able, when running the app from jsp pages via Tomcat, to
ensure that I am effectively 'anchored' so that my dlls don't get lost.
Any help greatly appreciated
Ian
 
R

Roma Efremov

Hi Ian,

Is it your 1-st try to run servlet under Tomcat?
Did you try to run it on your own computer or in Internet/Intranet?
Also, see below...

Vlad

ian ward said:
Here is some clarification for anyone who is listening...
The NoClassDefFoundError is a red herring.
My real problem, badly explained at the top of this thread boils down
to this.....

An unexpected exception has been detected in native code outside the
VM.

Take a look to follow string you provided: "ACCESS_VIOLATION"
Unexpected Signal : EXCEPTION_ACCESS_VIOLATION occurred at
PC=0x67462713
Function=[Unknown.]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top