NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

Strange issue with a 3rd party JAR that works in eclipse but not netbeans...

 
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Users
View previous topic :: View next topic  
Author Message
Crypticdust



Joined: 17 Jul 2009
Posts: 1

PostPosted: Fri Jul 17, 2009 1:31 pm    Post subject: Strange issue with a 3rd party JAR that works in eclipse but not netbeans... Reply with quote

Hello everyone...

I have a question, as I am brand spanking new to NetBeans I tried the following:

Tools -> Libraries -> New Library... (Named it UniObjects)
Added an external JAR (asjava.zip) to this library.

(JAR is from UniVerse: http://www-01.ibm.com/software/data/u2/middleware/)

Created a JavaSE project -> Right clicked Libraries -> Import... -> UniObjects -> Import Library -> UniObjects -> Add Library.

After adding the JAR this way, all my dependencies in my class resolved, so I believed this was the correct way to do this. Upon Running a portion of my class:

Code:

// Create the UniJava Class
uJava = new UniJava();

if (bPool)   {
                    // Set the pooling option
                    UniJava.setUOPooling(true);
                    // Set the maximum and minimum size of pools
                    UniJava.setMinPoolSize(Integer.parseInt(strSession[4]));
                    UniJava.setMaxPoolSize(Integer.parseInt(strSession[5]));
                }

// Get a reference to the session
uSession = uJava.openSession();


The application exits the method and throws a "java.lang.NullPointerException" on the uSession line of code, back to the parent method.

If I put a watch on the uSession line of code:
Code:

>Exception occurred in target VM: 
java.lang.ExceptionInInitializerError:
   at asjava.uniclientlibs.UniConnection.<init>(UniConnection.java:797)
   at asjava.uniobjects.UniSession.<init>(UniSession.java:82)
   at asjava.uniobjects.UniJava.openSession(UniJava.java:303)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 3
   at asjava.uniclientlibs.UniTokens.<clinit>(UniTokens.java:109)
   ... 8 more
<


Since I don't have the source for this, I think this is due to something in the classes static constructor.

The thing that is really throwing me off is the fact that if I add this JAR (.zip) to an eclipse project with the same code, it works with no issues at all.

Some things that may help:

x64 machine with both x64 and x86 versions of JDK (1.6.0_14)..

Anybody notice anything strange about the way I set this up? Is there something that I am missing about importing JARS (in this case a .zip) into NetBeans?
Back to top
U2InGermany



Joined: 13 Nov 2009
Posts: 1

PostPosted: Fri Nov 13, 2009 10:24 pm    Post subject: Reply with quote

Hi there!

I was wondering if you managed to solve this. I am having exactly the same experience through netBeans and was wondering what might be causing it.

Best regards
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo