-
-
Notifications
You must be signed in to change notification settings - Fork 17
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
JAVA 8 #28
Comments
I'm using it in a Java 8 environment without problems. What kind of issue do you have? Andreas |
Using JAVA_VERSION="1.8.0_45" (with JAVA 1.7, all works as expected) Exception in thread "main" java.lang.RuntimeException: Invalid bundled javascript file |
You are right. I'm using citeproc java together with Rhino in Java 1.8. However in case you don't bundle Rhino citeproc-java uses the bundled JS engine which is Nashorn in Java 1.8 - I think this is the reason for your problem and yes it should remain open. |
Yes, at the moment you need Rhino to run citeproc-java under Java 8. This should be a workaround though and not a permanent solution. I guess in future versions I will only support Java 8 and remove support for Java 6/7 and Rhino. This will make maintaining the library much easier. Please let me know if you have any objections. |
Using rhino solved my problem. No objection to your solution. Many thanks for the help! |
+1 to move to Java 8 only solution. Are there any pull requests to make it work with Nashorn? |
Thanks to all for the feedback. I just uploaded a new snapshot: It requires Java 8 and works with Nashorn. If you want to test it I would be happy to get your feedback. I hope I can release version 1.0.0 soon. Michel |
Thanks Michel, I will try this out this week. One small thing, the OSGI Manifest still contains Rhino: https://github.com/michel-kraemer/citeproc-java/blob/master/citeproc-java/build.gradle#L154 |
Thanks, @uschindler! I didn't notice that. |
We can't get the new version running. We get a bug running some test cases. It seems an incompatibility between nashorn and rhino. I added the stack trace at the end. Maybe someone recognizes the problem at a glance, and can give us a little hint. It would be great, if the next implementation iteration would get a new version (e.g. 1.0.1) too, as we are already using citeproc-java in our production environment. Here is the stack trace: [main] ERROR de.mpg.mpdl.inge.cslmanager.CitationStyleLanguageManagerDefaultImpl - Error getting output |
@walterMPDL I've reopened this issue. Thanks for reporting. Could you please give me a bit more information.
Why do you think this? I don't see Rhino in the stacktrace.
Sure thing! I'm currently updating the documentation and then I'll release version 1.0.0. Currently, we only have snapshots and they can change at any time, but I will use semantic versioning for the releases. Cheers, |
I meant not directly, as rhino is no more in our classpath. To me it seems more like nashorn is not capable of something designed for rhino in that point. But I might be wrong in that point. Best Regards, |
I checked your stack trace again:
The error happens in line 1748 in citeproc.js. As far as I can see citeproc.js tries to parse XML but the input is null (or undefined). It seems like your style XML or your locale XML is null when you call the constructor of the CSL class - or the files that you try to load do not exist. Can you check this please? In order to be able to do further debugging I think I'd need some kind of running code. It would be perfect if you could prepare a minimal running example that demonstrates the issue, so that I can reproduce it. Cheers, |
I will check that, but it seems a little strange, as the test is running with the older version. It may take a one or two days to prepare the example, as we got a problem with our live system. Sorry for that in advance. Best Regards, |
No worries. It's me who must apologise for the delay :-) Michel |
Sorry for the late response, but as I said, we had some issues with our production system... I uploaded an excerpt from our environment. Best Regards, |
No worries. Anything is better than nothing. I'll try to reproduce the issue and get back to you. |
@walterMPDL Your unit test loads a style file I changed citeproc-java so it throws an Exception instead of failing with this cryptic error. I hope this helps! Let me know if you need anything else. |
I just published version 1.0.0 by the way. Please use this version from now on and report any problems with Java 8 here. Cheers, |
@michel-kraemer Thanks a lot for your help! Such a stupid mistake... So sorry for wasting your time |
It wasn't a waste of time at all. It actually revealed the issue that |
Seems like not working with JAVA 8. Is this true?
The text was updated successfully, but these errors were encountered: