M
mtanquary
I am working on an Axis project. This project is using Axis2 under
Tomcat5, Java is 1.5.
I built a web service and all went fine. Then I added some error
handling and some additional utility functions...nothing complex.
Now, when I call the web service, Axis throws the following exception:
Exception in thread "-4db4b134:110e45e880c:-7fff"
java.lang.UnsatisfiedLinkError: create
at com.firstlogic.rapid.ace.AceJobApp.create(Native Method)
at com.firstlogic.rapid.ace.AceJobApp.<init>( AceJobApp.java:
26)
at com.amazingmail.cass.rt.provider.RT_AceCleanse
$AceApp.<init>(RT_AceCleanse.java:564)
Amazingly, this link error does not occur in a previous version of the
JAVA code from the same project which is only slight less complicated
than the current (ie. I have no idea why it should affect anything at
the native level).
Also, I created the code with a Main() method to test the java and it
works!
I did run nm on the .so file and the
Java_com_firstlogic_rapid_ace_AceJobApp_create symbol is there, which
I expected, since it worked before.
I have carefully examined my deployment of the code to make sure
everything is where it should be. The CLASSPATH and LIB PATH all
contain paths that are required for this to work.
This is thrown in the super() method of the AceJobApp class when it is
instantiated.
I have been reading posts and getting ideas for several days, but
nothing is working. Because it works outside of Axis, I am tempted to
think something is going on in Axis. Yet, as I stated earlier,
previous incantations of the same code (inside Axis) work just fine.
I suspect that somehow there is some level of corruption going on,
although peppering trace messages in the code is working, so it seems
healthy up to the point where the native code comes in.
I just wonder if somehow the symbols are getting buried or mangled.
The native code is commercial, so I have no access to it, nor do I
believe that there is really an issue with the native code itself as I
have used it in many other projects over the years.
I need some help thinking out of the box here. Any and all ideas are
greatly appreciated.
Here are snippets from working and then breaking code to give you an
idea of what the code looks like.
<-----Original Working Code------->
....
if (p != null) {
//Get ID
sId = uid.toString();
//Return thread identification
RT_AceCleanse AC =
new RT_AceCleanse(getProperties("rtAce.properties"),
addresses);
//Get a new thread
Thread t = new Thread(AC, sId);
//Creat a new message handler
threadHash.put(sId, new RT_Message());
//Start the thread
t.start();
//Return the process ID to the caller
}
{t.start() invokes the following}
public void run() {
try {
if (getProperties()) {
doBatch();
} else {
System.err.println(getDateStamp() + " - Thread " +
Thread.currentThread().getName() + " unable to set program
variables.");
}
.....
{and finally, here's doBatch}
private boolean doBatch() {
// Return code
boolean bRetVal = true;
// Open the main log
openLog(MAIN_LOG);
// Log the start of the processing
writeLog(MAIN_LOG, "ACE started");
ProgDb inDb = null;
try {
// Open the log
openLog(ACE_LOG);
// Create the firstlogic applications to process the data
AceApp aceApp = new AceApp(m_aceJobFile); {mtanquary: at
this point the new code fails}
<-----Non-working Code (in Axis, works in Main())------->
if (p != null) {
//Get a class instance
RT_AceCleanse AC =
new RT_AceCleanse(p, addresses);
//Get a new thread
Thread t = new Thread(AC, sId);
//Start the thread
t.start();
//Return the process ID to the caller
RT_Message mssg = new RT_Message();
setThreadStatus(sId, mssg.T_INITIATED);
}
.....
{t.start() invokes}
public void run() {
try {
//Set the Class State variables to get started
if (getProperties()) {
//Assuming all went well, process
m_Msg.setThreadStatus(m_Msg.T_STARTED);
if(doBatch() == false) {
m_Msg.setThreadStatus(m_Msg.T_FAILED);
}
{doBatch - identical to previous version}
Tomcat5, Java is 1.5.
I built a web service and all went fine. Then I added some error
handling and some additional utility functions...nothing complex.
Now, when I call the web service, Axis throws the following exception:
Exception in thread "-4db4b134:110e45e880c:-7fff"
java.lang.UnsatisfiedLinkError: create
at com.firstlogic.rapid.ace.AceJobApp.create(Native Method)
at com.firstlogic.rapid.ace.AceJobApp.<init>( AceJobApp.java:
26)
at com.amazingmail.cass.rt.provider.RT_AceCleanse
$AceApp.<init>(RT_AceCleanse.java:564)
Amazingly, this link error does not occur in a previous version of the
JAVA code from the same project which is only slight less complicated
than the current (ie. I have no idea why it should affect anything at
the native level).
Also, I created the code with a Main() method to test the java and it
works!
I did run nm on the .so file and the
Java_com_firstlogic_rapid_ace_AceJobApp_create symbol is there, which
I expected, since it worked before.
I have carefully examined my deployment of the code to make sure
everything is where it should be. The CLASSPATH and LIB PATH all
contain paths that are required for this to work.
This is thrown in the super() method of the AceJobApp class when it is
instantiated.
I have been reading posts and getting ideas for several days, but
nothing is working. Because it works outside of Axis, I am tempted to
think something is going on in Axis. Yet, as I stated earlier,
previous incantations of the same code (inside Axis) work just fine.
I suspect that somehow there is some level of corruption going on,
although peppering trace messages in the code is working, so it seems
healthy up to the point where the native code comes in.
I just wonder if somehow the symbols are getting buried or mangled.
The native code is commercial, so I have no access to it, nor do I
believe that there is really an issue with the native code itself as I
have used it in many other projects over the years.
I need some help thinking out of the box here. Any and all ideas are
greatly appreciated.
Here are snippets from working and then breaking code to give you an
idea of what the code looks like.
<-----Original Working Code------->
....
if (p != null) {
//Get ID
sId = uid.toString();
//Return thread identification
RT_AceCleanse AC =
new RT_AceCleanse(getProperties("rtAce.properties"),
addresses);
//Get a new thread
Thread t = new Thread(AC, sId);
//Creat a new message handler
threadHash.put(sId, new RT_Message());
//Start the thread
t.start();
//Return the process ID to the caller
}
{t.start() invokes the following}
public void run() {
try {
if (getProperties()) {
doBatch();
} else {
System.err.println(getDateStamp() + " - Thread " +
Thread.currentThread().getName() + " unable to set program
variables.");
}
.....
{and finally, here's doBatch}
private boolean doBatch() {
// Return code
boolean bRetVal = true;
// Open the main log
openLog(MAIN_LOG);
// Log the start of the processing
writeLog(MAIN_LOG, "ACE started");
ProgDb inDb = null;
try {
// Open the log
openLog(ACE_LOG);
// Create the firstlogic applications to process the data
AceApp aceApp = new AceApp(m_aceJobFile); {mtanquary: at
this point the new code fails}
<-----Non-working Code (in Axis, works in Main())------->
if (p != null) {
//Get a class instance
RT_AceCleanse AC =
new RT_AceCleanse(p, addresses);
//Get a new thread
Thread t = new Thread(AC, sId);
//Start the thread
t.start();
//Return the process ID to the caller
RT_Message mssg = new RT_Message();
setThreadStatus(sId, mssg.T_INITIATED);
}
.....
{t.start() invokes}
public void run() {
try {
//Set the Class State variables to get started
if (getProperties()) {
//Assuming all went well, process
m_Msg.setThreadStatus(m_Msg.T_STARTED);
if(doBatch() == false) {
m_Msg.setThreadStatus(m_Msg.T_FAILED);
}
{doBatch - identical to previous version}