ASP/Java Class - register a Jar file.

lfabbric
lfabbric used Ask the Experts™
on
Well here is my first question I have to ask.  This is a tough one.

If you require more point let me know.  (200 seems correct though)

I am working on a server, that has both Coldfusion and asp.  So I needed to create a java class that could authenticate users against Novell.  (This isn't really important just a reference)

I have created simple objects in the past and I could call the object within ASP.  An example would be

<% Set SimpleObj = Server.CreateObject("Simple") %>
<% = SimpleObj.SimpleFn(10) %>

This all worked great.  The object was called and the function within the java object returned the value correctly.

But now this is where my problem starts.

************************
I have a class that uses a Novell api. "LDAP.jar" and I am having trouble registering the jar file so the object could use it.

<% Set personObj = Server.CreateObject("aguAuthenticate") %>
<% = personObj.getAuthenticated("cn=lfabbric", "password") %>

And the response is

Java Exception error '80004005'

java.lang.NoClassDefFoundError: com/novell/ldap/LDAPConnection
************************


The steps I have done.
I have set the class path correctly.  
c:\myclasses;c:\winnt\java\trustlib\ldap.jar

I have also registered all the elements within the application.

for example.
javareg /register /class:aguAuthenticate /progid:aguAuthenticate

javareg /register /class:com.novell.ldap.LDAPConnection /progid:LDAPConnection

Please let me know what you think.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
I remember I solved somebod'y similar problem few days back.

Here are the thigns you should do

1. Check permisions
The iusr_{yourservername} user should have enough permission to aguAuthenticate DLL  and other DLLs you will use. Youc an change/update permissions from windows explorer

2. I would suggest you to compile the java class in Visual J++ enviroment

3. Your MS JVM is outdated.

This link would be helpful too

http://search.support.microsoft.com/search/default.aspx?Catalog=LCID%3D1033%26CDID%3DEN-US-KB%26PRODLISTSRC%3DON&Product=&KeywordType=ALL&Titles=false&numDays=&maxResults=25&withinResults=&Queryl=NoClassDefFoundError&Query=NoClassDefFoundError&QuerySource=gsfxSearch_Query

Author

Commented:
1)All permissions are correct.
2)I am not sure why the Visual J++ Environment would help.  Could you explain why it would be beneficial.
3)The JVM is the newest one.

Author

Commented:
Ok, I found out how to do this.

I extracted the JAR file

jar xf ldap.jar

and then it worked.

thanks for you help.
First and foremost - I know NOTHING about java development :) (just wanted to make that clear)

I remember along time ago using the asp2htm java component which needed to registered differently...  Probably won't help...

Here's the original install.bat for asp2htm.class:

javareg /register /class:IISSample.CspBuilder /progid:IISSample.CspBuilder
javareg /register /class:IISSample.Asp2Htm /progid:IISSample.Asp2Htm
mkdir %SystemRoot%\Java\TrustLib\IISSample
copy CspBuilder.class %SystemRoot%\Java\TrustLib\IISSample
copy Asp2Htm.class %SystemRoot%\Java\TrustLib\IISSample
User resolved; points refunded and question closed.

Netminder
EE Admin

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial