AsciidoctorJ 1.5 and Java EE

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

AsciidoctorJ 1.5 and Java EE

mgreau
Hi,

For my realtime editor app, I use asciidoctorJ 0.1.4 with WildFly 8 thanks to JBoss module.
You can read the doc that I wrote some months ago (https://github.com/asciidoctor/asciidoctorj#running-on-wildfly-as) which explains how to do it so that you can use AsciidoctorJ with Java EE without GEM_PATH.

It works like a charm :)

I tried to upgrade my app with asciidoctorJ 1.5.0 in order to use all the awesome new features (AST...).
I tried with both asciidoctor-java-integration-1.5.0.preview1.jar and asciidoctorJ-1.5.0-preview2.jar (I adapted my code according to the version) but it doesn't work anymore.

I have the Java exception below :
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException

When I debugged, I can debug until :

return JRubyAsciidoctor.create();  (in the Factory class https://github.com/asciidoctor/asciidoctorj/blob/master/src/main/java/org/asciidoctor/Asciidoctor.java)

Then I have the exception but no other message.
Between asciidoctorJ 0.1.4 and 1.5.0, I noted that JRuby was upgrade from 1.7.4 to 1.7.9.

I will be interested to know how to get more information during debug mode with AsciidoctorJ/JRuby

Thanks

Maxime
mgreau.com/posts => HubPress Blog :)
Reply | Threaded
Open this post in threaded view
|

Re: AsciidoctorJ 1.5 and Java EE

asotobu
I am not sure that the change of JRuby can affected in the exception you are receiving. But you can try for example to exclude the jruby dependency of asciidoctorj and include the previous one in your project and see if it works or not so we can discard a jruby problem.

Also you can put a point of debug on JRubyAsciidoctor class on method create() and see in which line is exactly throw the exception.

BTW do you have any extension on classpath? Extensions has changed on 1.5.0 so maybe there is a problem there. If you are using any extension try first to remove from classpath too.
Reply | Threaded
Open this post in threaded view
|

Re: AsciidoctorJ 1.5 and Java EE

mgreau
thanks Alex,

Ok so it's a problem with JRuby version.
It works with JRuby 1.7.4 but it doesn't work with JRuby 1.7.9

FYI, my first problem was due to a missing JAR (log4j-1.2.17.jar) in my JBoss module for the slf4J implementation that I use (slf4j-log4j12-1.7.5 ) because JRubyAsciidoctor depends on slf4j since the 1.5.0 version.
mgreau.com/posts => HubPress Blog :)
Reply | Threaded
Open this post in threaded view
|

Re: AsciidoctorJ 1.5 and Java EE

asotobu
Strange :S In fact I was thinking to update to JRuby 1.7.11, if you have time can you include that version instead of 1.7.4 and see if it works? If not maybe we can downgrade the jruby version again


2014-03-30 23:12 GMT+02:00 mgreau [via Asciidoctor :: Discussion] <[hidden email]>:
thanks Alex,

Ok so it's a problem with JRuby version.
It works with JRuby 1.7.4 but it doesn't work with JRuby 1.7.9

FYI, my first problem was due to a missing JAR (log4j-1.2.17.jar) in my JBoss module for the slf4J implementation that I use (slf4j-log4j12-1.7.5 ) because JRubyAsciidoctor depends on slf4j since the 1.5.0 version.
mgreau.com => awestruct + asciidoctor website/blog



If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/AsciidoctorJ-1-5-and-Java-EE-tp1651p1653.html
To unsubscribe from AsciidoctorJ 1.5 and Java EE, click here.
NAML



--
+----------------------------------------------------------+
  Alex Soto Bueno - Computer Engineer
  www.lordofthejars.com
+----------------------------------------------------------+
Reply | Threaded
Open this post in threaded view
|

Re: AsciidoctorJ 1.5 and Java EE

mgreau
Unfortunately it doesn't work with JRuby 1.7.11.

I debugged with JRuby 1.7.4 and 1.7.9.

So with JRuby 1.7.9, I can debug until the Ruby.newInstance(RubyInstanceConfig) method and then I have a java.lang.reflect.InvocationTargetException when the Ruby(RubyInstanceConfig) constructor is called.

The problem seems to be with this Ruby class variable :

private EnumMap<RubyThread.Status, RubyString> threadStatuses = new EnumMap<RubyThread.Status, RubyString>(RubyThread.Status.class);

Then into the EnumMap class constructor EnumMap(Class<K>), my debugger failed on this line :
 keyUniverse = getKeyUniverse(keyType);

I hope that this informations will help you.

mgreau.com/posts => HubPress Blog :)
Reply | Threaded
Open this post in threaded view
|

Re: AsciidoctorJ 1.5 and Java EE

asotobu
Well not much :) maybe we should open an issue to jruby. Can you send me all information it may be useful (for example how you are building the webapp in jboss (I think it is a simple war)), or for example the full stack trace, and I will open the issue, it is strange because it works standalone. Also I will compliment the issue with configuration options used.

BTW you are calling the no args method to create the instance right?