stevelondon
New Member.
449 views

Association Utility Issues

I'm setting up a JDBC driver for MSSQL Server and (trying) to follow the directions. After setting a few of the vars in the utility and then running the utility, I get a Java exception:
[INDENT]Exception in thread "main" java.lang.NoClassDefFoundError: com/novell/nds/dirxml/util/LocalizedMessageSource
at com.novell.nds.dirxml.driver.Trace.<clinit>(Trace.java:481)
at com.novell.nds.dirxml.driver.jdbc.util.RuntimeContext.<init>(Unknown Source)
at com.novell.nds.dirxml.driver.jdbc.util.JDBCAssociationUtility.<init>(Unknown Source)
at com.novell.nds.dirxml.driver.jdbc.util.JDBCAssociationUtility.main(Unknown Source)
Caused by: java.lang.ClassNotFoundException: com.novell.nds.dirxml.util.LocalizedMessageSource
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 4 more
[/INDENT]
Suffice it to say I'm stuck and cant figure this part out. I'm pretty certain my paths are correct and versions are all up to snuff but if I'm reading this correctly, I am may have an issue with a path somewhere (which I've triple checked). Anyone have some ideas/pointers on this?
Labels (1)
0 Likes
9 Replies
Knowledge Partner
Knowledge Partner

Re: Association Utility Issues

It may help to see your actual steps, commands, etc. It seems pretty
clear that something is wrong with your command or arguments to it, but
what is wrong is hard to deduce without knowing a bit more. You could
search for the missing class in .class or .jar files
(LocalizedMessageSource.class) to see if, wherever it is, it is available
to your command, because that is probably the issue. JARs are just
zip-compressed files.

You can see what the association.sh script is doing by calling it like this:


bash -xv association.sh


--
Good luck.

If you find this post helpful and are logged into the web interface,
show your appreciation and click on the star below.

If you want to send me a private message, please let me know in the
forum as I do not use the web interface often.
0 Likes
stevelondon
New Member.

Re: Association Utility Issues

Thanks for the reply. I agree with your evaluation though I wasn't sure if the missing class was something that should have been in the classpath or was referenced within one of the JARs. I'm not familiar enough with all of the install files and components to know if that's required somewhere or not (or if its a difference in a version or another package or file). In any case, this was the output (good tip with the -xv args):

[INDENT]bash -xv association.sh
#!/bin/sh

############################################################################
#BEGIN VARIABLE DECLARATION SECTION

# You may need to adjust this path to math your DirXML installation.
#DXML_CLASSPATH=/usr/lib/dirxml/classes
DXML_CLASSPATH=/opt/novell/eDirectory/lib/dirxml/classes
+ DXML_CLASSPATH=/opt/novell/eDirectory/lib/dirxml/classes

# You'll need to adjust the name and path to the third-party JDBC driver
# jar files you are using.
#THIRD_PARTY_JARS=$DXML_CLASSPATH/pg74.215.jdbc3.jar
THIRD_PARTY_JARS=$DXML_CLASSPATH/mssql-jdbc-6.4.0.jre8.jar
+ THIRD_PARTY_JARS=/opt/novell/eDirectory/lib/dirxml/classes/mssql-jdbc-6.4.0.jre8.jar

# You'll need to adjust the properties filename to match the database you
# are using.
#PROPERTIES_FILE=properties_pg.txt
PROPERTIES_FILE=properties_ms.txt
+ PROPERTIES_FILE=properties_ms.txt

JAVA_CLASSPATH=$DXML_CLASSPATH/JDBCUtil.jar:\
$DXML_CLASSPATH/CommonDriverShim.jar:\
$DXML_CLASSPATH/collections.jar:\
$DXML_CLASSPATH/nxsl.jar:\
$DXML_CLASSPATH/dirxml.jar:\
ldap.jar:\
$THIRD_PARTY_JARS
+ JAVA_CLASSPATH=/opt/novell/eDirectory/lib/dirxml/classes/JDBCUtil.jar:/opt/novell/eDirectory/lib/dirxml/classes/CommonDriverShim.jar:/opt/novell/eDirectory/lib/dirxml/classes/collections.jar:/opt/novell/eDirectory/lib/dirxml/classes/nxsl.jar:/opt/novell/eDirectory/lib/dirxml/classes/dirxml.jar:ldap.jar:/opt/novell/eDirectory/lib/dirxml/classes/mssql-jdbc-6.4.0.jre8.jar
############################################################################

# You may need to set the path to the root directory of your java
# installation.
if [ -z "$JAVA_HOME" ] #-z = zero length
then echo "the JAVA_HOME environmental variable is not set"; exit
fi
+ '[' -z /opt/novell/jdk1.8.0_112/jre ']'

if [ -n "$1" ] #-n = non-zero length
then FLAG="-o"; OP=$1
fi
+ '[' -n '' ']'

$JAVA_HOME/bin/java -classpath $JAVA_CLASSPATH com.novell.nds.dirxml.driver.jdbc.util.JDBCAssociationUtility $FLAG $OP -p $PROPERTIES_FILE
+ /opt/novell/jdk1.8.0_112/jre/bin/java -classpath /opt/novell/eDirectory/lib/dirxml/classes/JDBCUtil.jar:/opt/novell/eDirectory/lib/dirxml/classes/CommonDriverShim.jar:/opt/novell/eDirectory/lib/dirxml/classes/collections.jar:/opt/novell/eDirectory/lib/dirxml/classes/nxsl.jar:/opt/novell/eDirectory/lib/dirxml/classes/dirxml.jar:ldap.jar:/opt/novell/eDirectory/lib/dirxml/classes/mssql-jdbc-6.4.0.jre8.jar com.novell.nds.dirxml.driver.jdbc.util.JDBCAssociationUtility -p properties_ms.txt
Exception in thread "main" java.lang.NoClassDefFoundError: com/novell/nds/dirxml/util/LocalizedMessageSource
at com.novell.nds.dirxml.driver.Trace.<clinit>(Trace.java:481)
at com.novell.nds.dirxml.driver.jdbc.util.RuntimeContext.<init>(Unknown Source)
at com.novell.nds.dirxml.driver.jdbc.util.JDBCAssociationUtility.<init>(Unknown Source)
at com.novell.nds.dirxml.driver.jdbc.util.JDBCAssociationUtility.main(Unknown Source)
Caused by: java.lang.ClassNotFoundException: com.novell.nds.dirxml.util.LocalizedMessageSource
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 4 more
[/INDENT]

I did a file search for "LocalizedMessageSource.class" but did not find it. I'll search some on this. I appreciate your help and any further suggestions you may have.
0 Likes
stevelondon
New Member.

Re: Association Utility Issues

stevelondon;2480120 wrote:
I did a file search for "LocalizedMessageSource.class" but did not find it. I'll search some on this. I appreciate your help and any further suggestions you may have.


It appears to be apart of the "com.novell.nds.dirxml.util" package but I do not see that as a specific JAR in the classes directory (then again, I'm assuming it would be somewhat self-decribed in the file name such as "dirxml-util.jar"). It seems apparent however that its not in the "dirxml.jar" class in the script above (which was apart of the original script).
0 Likes
Knowledge Partner
Knowledge Partner

Re: Association Utility Issues

stevelondon wrote:

> It appears to be apart of the "com.novell.nds.dirxml.util" package but I
> do not see that as a specific JAR in the classes directory (then again,
> I'm assuming it would be somewhat self-decribed in the file name such as
> "dirxml-util.jar").


That class is contained in dirxml_misc.jar in my test system, which file/rpm
version do you have installed? Does is match the engine/RL version?

--
http://www.is4it.de/en/solution/identity-access-management/

(If you find this post helpful, please click on the star below.)
______________________________________________
https://www.is4it.de/identity-access-management
0 Likes
stevelondon
New Member.

Re: Association Utility Issues

Awesome, so that got me a step closer (the error output changed). Once I added the dirxml_misc.jar to the classpath, I now get:
[INDENT]
Exception in thread "main" java.lang.Error: Unable to find a TraceInterface implementation
at com.novell.nds.dirxml.driver.Trace.<init>(Trace.java:64)
at com.novell.nds.dirxml.driver.jdbc.util.RuntimeContext.<init>(Unknown Source)
at com.novell.nds.dirxml.driver.jdbc.util.JDBCAssociationUtility.<init>(Unknown Source)
at com.novell.nds.dirxml.driver.jdbc.util.JDBCAssociationUtility.main(Unknown Source)
[/INDENT]
So, sounds like we're on the right track?

This is all on my eDirectory server (remote loader is not on this server). In any case, this is for IDM 4.6 and I assume the package versions are all correct as this was installed by Microfocus.
0 Likes
Knowledge Partner
Knowledge Partner

Re: Association Utility Issues

stevelondon wrote:

> So, sounds like we're on the right track?


So now IDM is missing another class, which makes me think you are missing the
whole path /opt/novell/eDirectory/lib/dirxml/classes in your classpath or
$PATH. Have a look at
https://www.netiq.com/documentation/identity-manager-46/setup/data/b188r3xc.html
and verify system variables are set up correctly.

--
http://www.is4it.de/en/solution/identity-access-management/

(If you find this post helpful, please click on the star below.)
______________________________________________
https://www.is4it.de/identity-access-management
0 Likes
stevelondon
New Member.

Re: Association Utility Issues

Thanks for your reply.
lhaeger;2480135 wrote:

So now IDM is missing another class, which makes me think you are missing the
whole path /opt/novell/eDirectory/lib/dirxml/classes in your classpath or
$PATH.


In my previous post, I already have that path configured:
[INDENT]DXML_CLASSPATH=/opt/novell/eDirectory/lib/dirxml/classes[/INDENT]
0 Likes
Knowledge Partner
Knowledge Partner

Re: Association Utility Issues

On 05/01/2018 09:54 AM, stevelondon wrote:
>
> Thanks for your reply.
> lhaeger;2480135 Wrote:
>>
>> So now IDM is missing another class, which makes me think you are
>> missing the
>> whole path /opt/novell/eDirectory/lib/dirxml/classes in your classpath
>> or
>> $PATH.

>
> In my previous post, I already have that path configured:
>
> DXML_CLASSPATH=/opt/novell/eDirectory/lib/dirxml/classes


That variable means nothing on its own unless something actually uses it
in the 'java' command by feeding it to the classpath argument. In your
script output (bash -xv) I do not see it being used other than as a prefix
for actual JARs, so that's not helping because ultimately the
JAVA_CLASSPATH variable (also meaningless unless used, but thankfully it
is actually used) does not include that other DXML_CLASSPATH on its own.

It looks like the script itself is incorrect if this is how it always
behaves for others. Not all JARs are needed for it to do what it needs to
do, but some that are required are missing, so we're up against this other
issue. Perhaps change the first line below for the second one below to
brute force through this just to get going and confirmation of a possible
workaround:


#old way
JAVA_CLASSPATH=$DXML_CLASSPATH/JDBCUtil.jar:

#new way
JAVA_CLASSPATH=$DXML_CLASSPATH:$DXML_CLASSPATH/JDBCUtil.jar:


Better still would be to identify the JAR that contains the trace class,
probably something like dirxml_misc.jar, and include that, but at least
this way everything the engine or Remote Loader (RL) has should be
available meaning we have all classes possible. That can cause its own
problems, but I am guessing it will work for you. If not, post the bash
debug output again, please.

--
Good luck.

If you find this post helpful and are logged into the web interface,
show your appreciation and click on the star below.

If you want to send me a private message, please let me know in the
forum as I do not use the web interface often.
0 Likes
Knowledge Partner
Knowledge Partner

Re: Association Utility Issues

The class is almost certainly contained within a JAR file, so you'd need
to check those in the classpath specified to the 'java' command:


for onejar in /opt/novell/eDirectory/lib/dirxml/classes/JDBCUtil.jar
/opt/novell/eDirectory/lib/dirxml/classes/CommonDriverShim.jar
/opt/novell/eDirectory/lib/dirxml/classes/collections.jar
/opt/novell/eDirectory/lib/dirxml/classes/nxsl.jar
/opt/novell/eDirectory/lib/dirxml/classes/dirxml.jar:ldap.jar; do
echo "Testing ${onejar...};
unzip -t "${onejar}" | grep LocalizedMessageSource;
echo;


If any of those show up, then that's the right file. I'm guessing, based
on your error, that you will not find it any of those files, since those
would be the right ones. Next, test every JAR on your system:


for onejar in $(find /opt/novell/eDirectory/lib/dirxml/ -type f -iname
'*.jar'); do
echo "${onejar}";
unzip -t "${onejar}" | grep LocalizedMessageSource
echo;
done


Maybe that last command will get you something other than a list of JARs,
but if not then we need to find out why that class is missing.

--
Good luck.

If you find this post helpful and are logged into the web interface,
show your appreciation and click on the star below.

If you want to send me a private message, please let me know in the
forum as I do not use the web interface often.
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.