Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash on Connect (ExceptionInInitializerError) #49

Closed
yepher opened this issue Aug 28, 2013 · 7 comments
Closed

Crash on Connect (ExceptionInInitializerError) #49

yepher opened this issue Aug 28, 2013 · 7 comments

Comments

@yepher
Copy link

yepher commented Aug 28, 2013

HRider crashes every time I try and connect to my remote HBase server.

Steps to reproduce

This is how I reproduce the problem:
1 install HRider from 28 August, 2013: Release 1.0.8.0 available (with dependencies) - http://bit.ly/15g13BO
2 Run "java -jar h-rider-1.0.8.0.jar"
3 Enter my hbase server address "hbase01.mydomain.net"
4 App crashes with the following stack trace

I tried this on 5 other machines and the same crash happens on each.

h-rider-all.log

Empty

h-rider.log

2013-08-28 11:11:51,988 INFO  [AWT-EventQueue-0] RunnableAction                 : Action 'compare-versions' started.
2013-08-28 11:11:53,163 INFO  [compare-versions] RunnableAction                 : Action 'compare-versions' completed.
2013-08-28 11:12:08,829 INFO  [AWT-EventQueue-0] RunnableAction                 : Action 'hbase01.mydomain.net' started.
2013-08-28 11:12:09,585 INFO  [hbase01.mydomain.net] RunnableAction                 : Action 'hbase01.mydomain.net' completed.
2013-08-28 11:12:09,938 INFO  [AWT-EventQueue-0] JavaPackage                    : Loading classes from package 'hrider.converters'
2013-08-28 11:12:09,939 INFO  [AWT-EventQueue-0] JavaPackage                    : Loading classes from jar '/Users/myname/Downloads/h-rider-1.0.8.0-hbase-0.94.1/Users/myname/Downloads/h-rider-1.0.8.0-hbase-0.94.1/h-rider-1.0.8.0.jar'
2013-08-28 11:12:09,939 INFO  [AWT-EventQueue-0] JavaPackage                    : Loading classes from folder '/Users/myname/Downloads/h-rider-1.0.8.0-hbase-0.94.1/converters/classes'
2013-08-28 11:12:34,182 INFO  [AWT-EventQueue-0] RunnableAction                 : Action 'compare-versions' started.
2013-08-28 11:12:35,389 INFO  [compare-versions] RunnableAction                 : Action 'compare-versions' completed.
2013-08-28 11:12:50,519 INFO  [AWT-EventQueue-0] RunnableAction                 : Action 'hbase01.mydomain.net' started.
2013-08-28 11:12:51,228 INFO  [hbase01.mydomain.net] RunnableAction                 : Action 'hbase01.mydomain.net' completed.
2013-08-28 11:12:51,627 INFO  [AWT-EventQueue-0] JavaPackage                    : Loading classes from package 'hrider.converters'
2013-08-28 11:12:51,628 INFO  [AWT-EventQueue-0] JavaPackage                    : Loading classes from jar '/Users/myname/Downloads/h-rider-1.0.8.0-hbase-0.94.1/Users/myname/Downloads/h-rider-1.0.8.0-hbase-0.94.1/h-rider-1.0.8.0.jar'
2013-08-28 11:12:51,629 INFO  [AWT-EventQueue-0] JavaPackage                    : Loading classes from folder '/Users/myname/Downloads/h-rider-1.0.8.0-hbase-0.94.1/converters/classes'

Console

[h-rider-1.0.8.0-hbase-0.94.1]$ java -jar h-rider-1.0.8.0.jar 
2013-08-28 11:12:34,182 INFO  [AWT-EventQueue-0] RunnableAction                 : Action 'compare-versions' started.
2013-08-28 11:12:35,389 INFO  [compare-versions] RunnableAction                 : Action 'compare-versions' completed.
2013-08-28 11:12:50,519 INFO  [AWT-EventQueue-0] RunnableAction                 : Action 'hbase01.mydomain.net' started.
2013-08-28 11:12:50.709 java[26805:1340b] Unable to load realm info from SCDynamicStore
2013-08-28 11:12:51,228 INFO  [hbase01.mydomain.net] RunnableAction                 : Action 'hbase01.mydomain.net' completed.
2013-08-28 11:12:51,627 INFO  [AWT-EventQueue-0] JavaPackage                    : Loading classes from package 'hrider.converters'
2013-08-28 11:12:51,628 INFO  [AWT-EventQueue-0] JavaPackage                    : Loading classes from jar '/Users/myname/Downloads/h-rider-1.0.8.0-hbase-0.94.1/Users/myname/Downloads/h-rider-1.0.8.0-hbase-0.94.1/h-rider-1.0.8.0.jar'
2013-08-28 11:12:51,629 INFO  [AWT-EventQueue-0] JavaPackage                    : Loading classes from folder '/Users/myname/Downloads/h-rider-1.0.8.0-hbase-0.94.1/converters/classes'
Exception in thread "AWT-EventQueue-0" java.lang.ExceptionInInitializerError
    at hrider.data.ColumnQualifier.<clinit>(ColumnQualifier.java:32)
    at hrider.ui.views.DesignerView.initializeColumnsTable(DesignerView.java:1323)
    at hrider.ui.views.DesignerView.<init>(DesignerView.java:168)
    at hrider.ui.forms.Window.loadView(Window.java:442)
    at hrider.ui.forms.Window.loadViews(Window.java:424)
    at hrider.ui.forms.Window.createAndShowGUI(Window.java:272)
    at hrider.ui.forms.Window.access$1400(Window.java:57)
    at hrider.ui.forms.Window$7.run(Window.java:257)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:715)
    at java.awt.EventQueue.access$400(EventQueue.java:82)
    at java.awt.EventQueue$2.run(EventQueue.java:676)
    at java.awt.EventQueue$2.run(EventQueue.java:674)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:86)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:685)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Caused by: java.lang.IllegalArgumentException: converter cannot be null
    at hrider.data.ColumnType.<init>(ColumnType.java:60)
    at hrider.data.ColumnType.<init>(ColumnType.java:55)
    at hrider.data.ColumnType.<clinit>(ColumnType.java:33)
    ... 22 more
[h-rider-1.0.8.0-hbase-0.94.1]$

System Info

Java Version

[logs]$ java -version
java version "1.6.0_51"
Java(TM) SE Runtime Environment (build 1.6.0_51-b11-457-11M4509)
Java HotSpot(TM) 64-Bit Server VM (build 20.51-b01-457, mixed mode)

OS

Mac Book Pro OSX 10.8.4

@icher-g
Copy link

icher-g commented Aug 29, 2013

Hi,
It happens only on linux machines and I still didn't check why because I don't have linux environment at a time.
You can do a workaround for the issue.

In the log you can see that the path for the jar where it tries to load converters from is incorrect: '/Users/myname/Downloads/h-rider-1.0.8.0-hbase-0.94.1/Users/myname/Downloads/h-rider-1.0.8.0-hbase-0.94.1/h-rider-1.0.8.0.jar'. It was duplicated by some reason. You can create this path and copy there the jar so it will find it.

Did you have similar problem in previous versions?

@yepher
Copy link
Author

yepher commented Aug 29, 2013

I did some testing and here is something I found.

If I add a "/" to filePath it works for me on my Mac:

file: hrider.reflection.JavaPackage line: 91

          if (!filePath.startsWith("/") ) { // or maybe check if file does not exist and add the / as another check
                filePath = "/" + filePath;
          }
          if (filePath.endsWith(".jar")) {
                classes.addAll(getClassesFromJar(loader, new File(filePath), packageName));
            }
            else {
                classes.addAll(getClassesFromFolder(loader, new File(filePath), packageName));
            }

I traced through the code and the root of the problem appears to be in "hrider.io.PathHelper.normalise(String)" when it removes the leading "/". But I am not sure what all the path manipulation is about so it is likely to cause some other problem if I just remove that code.

@icher-g
Copy link

icher-g commented Sep 1, 2013

Hi Chris,

Thanks for pointing me out to the root cause. I did some changes in the PathHelper and JavaPackage classes and updated the zip files so hopefully it should work now.

I will really appreciate if you download the last release (the same you downloaded before 1.0.8.0) and try it again on your MAC. Let me know if the problem was fixed.

Thanks,
Igor.

@yepher
Copy link
Author

yepher commented Sep 4, 2013

I checked out "ab68eb2069a3475c43fea3c10946398c4f288b5f" and ran it. I still see the same error.

Here is the console output:

[target (master)]$ java -jar h-rider-1.0.8.0.jar 
2013-09-04 10:22:01,202 INFO  [AWT-EventQueue-0] RunnableAction                 : Action 'compare-versions' started.
2013-09-04 10:22:02,152 INFO  [compare-versions] RunnableAction                 : Action 'compare-versions' completed.
2013-09-04 10:22:08,353 INFO  [AWT-EventQueue-0] RunnableAction                 : Action 'myserver' started.
2013-09-04 10:22:08.535 java[90512:10e07] Unable to load realm info from SCDynamicStore
2013-09-04 10:22:09,071 INFO  [myserver] RunnableAction                 : Action 'myserver' completed.
2013-09-04 10:22:09,480 INFO  [AWT-EventQueue-0] JavaPackage                    : Loading classes from package 'hrider.converters'
2013-09-04 10:22:09,481 INFO  [AWT-EventQueue-0] JavaPackage                    : Loading classes from jar '/Users/myname/working/hrider/target/Users/myname/working/hrider/target/h-rider-1.0.8.0.jar'
2013-09-04 10:22:09,482 INFO  [AWT-EventQueue-0] JavaPackage                    : Loading classes from folder '/Users/myname/working/hrider/target/converters/classes'
Exception in thread "AWT-EventQueue-0" java.lang.ExceptionInInitializerError
    at hrider.data.ColumnQualifier.<clinit>(ColumnQualifier.java:32)
    at hrider.ui.views.DesignerView.initializeColumnsTable(DesignerView.java:1323)
    at hrider.ui.views.DesignerView.<init>(DesignerView.java:168)
    at hrider.ui.forms.Window.loadView(Window.java:442)
    at hrider.ui.forms.Window.loadViews(Window.java:424)
    at hrider.ui.forms.Window.createAndShowGUI(Window.java:272)
    at hrider.ui.forms.Window.access$1400(Window.java:57)
    at hrider.ui.forms.Window$7.run(Window.java:257)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:715)
    at java.awt.EventQueue.access$400(EventQueue.java:82)
    at java.awt.EventQueue$2.run(EventQueue.java:676)
    at java.awt.EventQueue$2.run(EventQueue.java:674)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:86)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:685)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Caused by: java.lang.IllegalArgumentException: converter cannot be null
    at hrider.data.ColumnType.<init>(ColumnType.java:60)
    at hrider.data.ColumnType.<init>(ColumnType.java:55)
    at hrider.data.ColumnType.<clinit>(ColumnType.java:33)
    ... 22 more

@yepher
Copy link
Author

yepher commented Sep 4, 2013

I did a little more debugging and here is what I see.

Fail Case:

  1. Check out latest version of hrider
  2. cd to the hrider source root
  3. mvn -P0.94.1 clean install ; cd target ; java -jar h-rider-1.0.8.0.jar ; cd ..

The error I get is the previously mentioned stack trace.

Success Case:

  1. Check out latest version of hrider
  2. cd to the hrider source root
  3. mvn -P0.94.1 clean install ; cd target/classes ; java -cp .:../h-rider-1.0.8.0.jar hrider.ui.forms.Window ; cd ..

This method will work just fine.

Thoughts

Again I am not 100% just what all the path and classpath stuff is doing in HRider but it appears something is not getting setup properly.

I do know that when you run "java -jar ..." that and "-classpath" arguments are ignored. Not sure if this is related somehow.

Also, I tried this path with the latest code base and it no longer solves the error:

File classesPath = new File(path);
if (!classesPath.isDirectory()) {
    path = "/" + path;
}
System.out.println("Path: " + path);

@icher-g
Copy link

icher-g commented Sep 8, 2013

Hi Chris,

Thanks for your time and help. I think I found a problem. I checked in the fix and hope it will work fine now. In addition I added an ability to see metadata tables so you might want to check it out.

Thanks.

@icher-g icher-g closed this as completed Sep 11, 2013
@yepher
Copy link
Author

yepher commented Sep 11, 2013

Sorry for the slow reply. Yes, I was able to confirm this morning that HRider is working properly on MAC now.

Thank you Igor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants