- This topic has 6 replies, 2 voices, and was last updated 19 years, 7 months ago by
Riyad Kalla.
-
AuthorPosts
-
bfarnikMemberI’ve got 2 projects which are supposed to do the same thing:
Initialize and access external ActiveX. The 1st project is Standard Java Application and the code starts like this:import com.develop.jawin.*;
import MyBeans.*;
public class Test {public static void main(String[] args) {
MyBeans.JavaNativeBridge oJNB;
try
{
oJNB = new MyBeans.JavaNativeBridge();
str = oJNB.toString();
System.out.println(str);
… some Java stuff calling oJNB methodsThis works fine, I only had to specify -Djava.library.path in project Run VM Arguments, which point to the jawin.dll necessary to access my ActiveX.
Now in the 2nd project I am doing the same thing, but from JSP (running in Tomcat 5.5/JRE 1.5), which header looks like this:
<%@ page language=”java” contentType=”text/html;charset=ISO-8859-1″ import=”MyBeans.*”%>
<jsp:useBean id=”oJNB” scope=”session” class=”MyBeans.JavaNativeBridge” />
… some JSP stuff calling oJNB methodsThis passes MyEclipse JSP project validation and initializes the Bean (my ActiveX specific logon dialog is invoked when the validation starts), but when I try to open it with MyEclipse browser, I am getting error NoClassDefFound, which I am almost sure is because the jawin.dll was not found.
Where should I put -Djava.library.path in this case, to make sure the DLL is found? Tomcat 5 VM settings are suggesting to avoid it and even if I ignored it it did not help.
December 6, 2005 at 10:25 am #242716
Riyad KallaMemberUnder the Tomcat 5 > Paths settings, the last box is for appending resources to your Library Path, you will want to add the dir that has your DLL in it there.
December 7, 2005 at 2:33 am #242740
bfarnikMemberThanks for the prompt reply.
Unfortunately this did not help. I am still getting an exception
java.lang.NoClassDefFoundError
at com.develop.jawin.IdentityManager.registerProxy(IdentityManager.java:259)which for all I have learned before is symptomatic for jawin.dll not found.
I was getting the same error in my Java Application, before I added -Djava.library.path=… to the application VM arguments, so I wonder why it doesn’t work in Tomcat environment 😕
December 7, 2005 at 10:49 am #242755
Riyad KallaMemberjava.lang.NoClassDefFoundError
at com.develop.jawin.IdentityManager.registerProxy(IdentityManager.java:259)which for all I have learned before is symptomatic for jawin.dll not found.
The class, IdentityManager, is contained in a JAR somewhere, you need to find that JAR and append it to your Tomcat classpath, using the top box on the Paths panel. Making additions to the Library path is not going to help that. Check the directory you appended to the library path, it may also contain the JAR you need in addition ot the DLL.
December 8, 2005 at 2:15 am #242832
bfarnikMemberCorrect, jawin comes as a pair: jawin.jar and jawin.dll.
I’ve put C:\bscdev\njawin\lib\jawin.jar to Tomcat5 Prepend to classpath
and
C:\bscdev\njawin\lib to Tomcat5 Append to library path.In a despair I have already put the jawin dll+jar almost
everywhere in my system.It is now in:
C:\bscdev\njawin1.2\lib – this is where I configured MyEclipse Tomcat 5 to look for it
Then in:
<Tomcat_Home>
bin
common\lib
server\lib
shared\lib
webapps\myjawinapp\WEB-INF\lib
<Winows_Home>
system32Still getting gthe exception …
December 8, 2005 at 3:54 am #242834
bfarnikMemberOK I made it working, but not sure how.
I have reinstalled Java 1.5 and Tomcat 5.5 into simple (non-default) directory structure, reconfigured Eclipse workbench and the application properties accordingly, applied jawin classpath and library paths as suggested, re-deployed the application and – the bean initialization passes when the JSP page is opened with MyEclipse browser (sadly it is failing on another place, but it is not Eclipse problem I think)Thanks for your help.
December 8, 2005 at 8:54 am #242847
Riyad KallaMemberGlad to hear it is working now, thank you for following up.
-
AuthorPosts