Git Product home page Git Product logo

Comments (9)

erajasekar avatar erajasekar commented on September 6, 2024 1

Which language are you coding and what build system you use? Make sure https://github.com/erajasekar/Astrosoft/blob/master/lib/swisseph.jar is in the classpath.

from astrosoft.

erajasekar avatar erajasekar commented on September 6, 2024 1

Since swisseph (also few other jars in libs dir) is not available in maven central. you will need to locally install that jar as dependency in gradle.

See
https://medium.com/@petehouston/compile-local-jar-files-with-gradle-a078e5c7a520
https://stackoverflow.com/questions/20700053/how-to-add-local-jar-file-dependency-to-build-gradle-file

Hope that helps.

Raja.

from astrosoft.

JhaSneha avatar JhaSneha commented on September 6, 2024

I am using Kotlin and Gradle ...

from astrosoft.

JhaSneha avatar JhaSneha commented on September 6, 2024

I want to use the calculateAll( ) under the horoscope.java class ,this time I have added all jars locally that were there under AstroSoft lib , below is the error that i am facing :

2018-07-20 16:46:15.526 ERROR 9358 --- [ main] app.astrosoft.pref.AstrosoftPref : Exception in flusing preferences
java.util.prefs.BackingStoreException: /etc/.java/.systemPrefs/app/astrosoft/pref create failed.
at java.util.prefs.FileSystemPreferences$7.run(FileSystemPreferences.java:619) ~[na:1.8.0_181]
at java.util.prefs.FileSystemPreferences$7.run(FileSystemPreferences.java:615) ~[na:1.8.0_181]
at java.security.AccessController.doPrivileged(Native Method) ~[na:1.8.0_181]
at java.util.prefs.FileSystemPreferences.writeBackCache(FileSystemPreferences.java:614) ~[na:1.8.0_181]
at java.util.prefs.FileSystemPreferences.syncSpiPrivileged(FileSystemPreferences.java:801) ~[na:1.8.0_181]
at java.util.prefs.FileSystemPreferences.access$2300(FileSystemPreferences.java:50) ~[na:1.8.0_181]
at java.util.prefs.FileSystemPreferences$12.run(FileSystemPreferences.java:771) ~[na:1.8.0_181]
at java.util.prefs.FileSystemPreferences$12.run(FileSystemPreferences.java:769) ~[na:1.8.0_181]
at java.security.AccessController.doPrivileged(Native Method) ~[na:1.8.0_181]
at java.util.prefs.FileSystemPreferences.syncSpi(FileSystemPreferences.java:768) ~[na:1.8.0_181]
at java.util.prefs.AbstractPreferences.sync2(AbstractPreferences.java:1338) ~[na:1.8.0_181]
at java.util.prefs.AbstractPreferences.sync(AbstractPreferences.java:1329) ~[na:1.8.0_181]
at java.util.prefs.FileSystemPreferences.sync(FileSystemPreferences.java:747) ~[na:1.8.0_181]

from astrosoft.

erajasekar avatar erajasekar commented on September 6, 2024

from astrosoft.

JhaSneha avatar JhaSneha commented on September 6, 2024

https://github.com/JhaSneha/Astrology

from astrosoft.

JhaSneha avatar JhaSneha commented on September 6, 2024

I have shared my github repo link where my code is added above.
This how I am trying to invoke your function (calculateAll) from Horoscope.java, the error I am facing is mentioned above, currently I am using Linux Os .
It will be a great help if u can visit to my code once and help me out with the issue.
Thank you

from astrosoft.

erajasekar avatar erajasekar commented on September 6, 2024

When you launch your app, set the jvm argument -Djava.util.prefs.PreferencesFactory=app.astrosoft.pref.UserPreferencesFactory. For e.g refer to RunAstroSoft.sh

from astrosoft.

JhaSneha avatar JhaSneha commented on September 6, 2024

I have added the jvm argument as you suggested above, still i am facing the issue.
Is there anything else that i need to set manually ?
Below are the errors
018-07-25 15:30:15.730 ERROR 22167 --- [ main] app.astrosoft.pref.AstrosoftPref : Exception in flusing preferences

java.util.prefs.BackingStoreException: Synchronization failed for node '/app/astrosoft/pref/'
at java.util.prefs.MacOSXPreferences.flush(MacOSXPreferences.java:230) ~[na:1.8.0_161]
at app.astrosoft.pref.AstrosoftPref.flush(Unknown Source) [AstroSoft.jar!/:na]
at app.astrosoft.pref.AstrosoftPref.setAstrosoftFilesDir(Unknown Source) [AstroSoft.jar!/:na]
at app.astrosoft.pref.AstrosoftPref.setDefaults(Unknown Source) [AstroSoft.jar!/:na]
at app.astrosoft.pref.AstrosoftPref.(Unknown Source) [AstroSoft.jar!/:na]
at app.astrosoft.ui.AstroSoft.(Unknown Source) [AstroSoft.jar!/:na]
at app.astrosoft.util.SwissHelper.(Unknown Source) [AstroSoft.jar!/:na]
at app.astrosoft.util.SwissHelper.(Unknown Source) [AstroSoft.jar!/:na]
at app.astrosoft.core.Horoscope.(Unknown Source) [AstroSoft.jar!/:na]
at com.example.gradle.GradleExternalJar.TestG.sample(GradleExternalJarApplication.kt:31) [classes!/:na]
at com.example.gradle.GradleExternalJar.GradleExternalJarApplicationKt.main(GradleExternalJarApplication.kt:18) [classes!/:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_161]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_161]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_161]
at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_161]
at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48) [GradleExternalJar-0.0.1-SNAPSHOT.jar:na]
at org.springframework.boot.loader.Launcher.launch(Launcher.java:87) [GradleExternalJar-0.0.1-SNAPSHOT.jar:na]
at org.springframework.boot.loader.Launcher.launch(Launcher.java:50) [GradleExternalJar-0.0.1-SNAPSHOT.jar:na]
at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:51) [GradleExternalJar-0.0.1-SNAPSHOT.jar:na]

Exception in thread "main" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:87)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:50)
at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:51)
Caused by: java.lang.ExceptionInInitializerError
at app.astrosoft.util.SwissHelper.(Unknown Source)
at app.astrosoft.util.SwissHelper.(Unknown Source)
at app.astrosoft.core.Horoscope.(Unknown Source)
at com.example.gradle.GradleExternalJar.TestG.sample(GradleExternalJarApplication.kt:31)
at com.example.gradle.GradleExternalJar.GradleExternalJarApplicationKt.main(GradleExternalJarApplication.kt:18)
... 8 more
Caused by: java.awt.HeadlessException
at sun.awt.HeadlessToolkit.getScreenSize(HeadlessToolkit.java:284)
at app.astrosoft.ui.AstroSoft.getScreenSize(Unknown Source)
at app.astrosoft.ui.AstroSoft.(Unknown Source)
... 13 more

from astrosoft.

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.