ccavanaugh / jgnash

jGnash Personal Finance
http://ccavanaugh.github.io/jgnash/
Other
139 stars 80 forks source link

Build issue on macOS #16

Closed asaladino closed 7 years ago

asaladino commented 7 years ago

I'm having trouble building on macOS. The other network tests are passing but encryptedNetworkedTest is failing. I tried installing Java Cryptography Extension (JCE) Unlimited Strength but no change. Any suggestions on a possible solution?

[INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary: [INFO] [INFO] jGnash ............................................. SUCCESS [ 0.003 s] [INFO] jGnash Bayes ....................................... SUCCESS [ 10.426 s] [INFO] jGnash Help ........................................ SUCCESS [ 11.863 s] [INFO] jGnash Resources ................................... SUCCESS [ 6.541 s] [INFO] jGnash Core ........................................ FAILURE [ 50.032 s] [INFO] jGnash Report Core ................................. SKIPPED [INFO] jGnash Convert ..................................... SKIPPED [INFO] jGnash Plugin ...................................... SKIPPED [INFO] JIDE Software ...................................... SKIPPED [INFO] jGnash Swing ....................................... SKIPPED [INFO] jGnash JavaFx ...................................... SKIPPED [INFO] mt940 Plugin ....................................... SKIPPED [INFO] jGnash Test Plugin ................................. SKIPPED [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 01:19 min [INFO] Finished at: 2016-10-19T10:48:51-04:00 [INFO] Final Memory: 93M/975M

Oct 19, 2016 10:48:49 AM jgnash.engine.FileTransferTest encryptedNetworkedTest SEVERE: Connection refused: localhost/127.0.0.1:5301 io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: localhost/127.0.0.1:5301 at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717) at io.netty.channel.socket.nio.NioSocketChannel.doFinishConnect(NioSocketChannel.java:347) at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:340) at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:627) at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:551) at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:465) at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:437) at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:873) at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:144) at java.lang.Thread.run(Thread.java:745)

Tests run: 2, Failures: 1, Errors: 1, Skipped: 0, Time elapsed: 11.491 sec <<< FAILURE! encryptedNetworkedTest(jgnash.engine.FileTransferTest) Time elapsed: 11.49 sec <<< FAILURE! java.lang.AssertionError at org.junit.Assert.fail(Assert.java:86) at org.junit.Assert.fail(Assert.java:95) at jgnash.engine.FileTransferTest.encryptedNetworkedTest(FileTransferTest.java:133) 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.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) at org.junit.runners.ParentRunner.run(ParentRunner.java:363) at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252) at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141) at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112) 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.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189) at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165) at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85) at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)

ccavanaugh commented 7 years ago

The last few releases of Java broke SSL.

Workarounds were put into place a few jGnash releases ago as a result of this. Are you certain you are working from the latest commits?

asaladino commented 7 years ago

The output says it is building for 2.26.1 and I have JDK 1.8.0_91 [INFO] ------------------------------------------------------------------------ [INFO] Building jGnash 2.26.1 [INFO] ------------------------------------------------------------------------

I've not worked with a maven project like this. Do you have any debugging tips or preferred IDE so I can add some breakpoints?

ccavanaugh commented 7 years ago

Intellij is my favorite and works well.

It's been compiling well under an OSX virtual machine, so the failure is strange. Linux and Windows compiles with issue as well.

Check to see if port 5301 is restricted on your system. A firewall may be causing the failure.

Oct 19, 2016 10:48:49 AM jgnash.engine.FileTransferTest encryptedNetworkedTest SEVERE: Connection refused: localhost/127.0.0.1:5301 io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: localhost/127.0.0.1:5301

asaladino commented 7 years ago

I managed to package on ubuntu, with a couple of issues.

Packaging fails on Help with:

[ERROR] Failed to execute goal org.asciidoctor:asciidoctor-maven-plugin:1.5.3:process-asciidoc (generate-pdf-doc) on project jgnash-help: Execution generate-pdf-doc of goal org.asciidoctor:asciidoctor-maven-plugin:1.5.3:process-asciidoc failed: org.jruby.exceptions.RaiseException: (NotImplementedError) fstat unimplemented unsupported or native support failed to load -> [Help 1]

but can be fixed it by adding a link: ln -s /lib/x86_64-linux-gnu/libcrypt.so.1 /usr/lib/x86_64-linux-gnu/libcrypt.so

There is also an error with the swing package:

[ERROR] Failed to execute goal com.akathist.maven.plugins.launch4j:launch4j-maven-plugin:1.7.11:launch4j (l4j-gui) on project jgnash-swing: Failed to build the executable; please verify your configuration. net.sf.launch4j.ExecException: java.io.IOException: Cannot run program "/home/asaladin/.m2/repository/net/sf/launch4j/launch4j/3.9/launch4j-3.9-workdir-linux/bin/windres": error=2, No such file or directory -> [Help 1]

windres needed /lib/ld-linux.so.2 which you can install with: apt-get install lib32z1

After that it finished the package and I was able to run jgnash/jgnash-fx/target/jgnashFx.jar

While it doesn't build on macOS, I'll play around with the source on linux.

Thanks.