Giter Club home page Giter Club logo

Comments (7)

icher-g avatar icher-g commented on August 18, 2024

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?

from hrider.

yepher avatar yepher commented on August 18, 2024

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.

from hrider.

icher-g avatar icher-g commented on August 18, 2024

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.

from hrider.

yepher avatar yepher commented on August 18, 2024

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

from hrider.

yepher avatar yepher commented on August 18, 2024

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);

from hrider.

icher-g avatar icher-g commented on August 18, 2024

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.

from hrider.

yepher avatar yepher commented on August 18, 2024

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

Thank you Igor.

from hrider.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.