Java Stacktrace and exception is swallowed
------------------------------------------

                 Key: JRUBY-3271
                 URL: http://jira.codehaus.org/browse/JRUBY-3271
             Project: JRuby
          Issue Type: Bug
          Components: Java Integration
    Affects Versions: JRuby 1.1.6, JRuby 1.1.3
         Environment: Fedory Linux, Java 1.6, JRuby 
            Reporter: Sebastian Hennebrueder
         Attachments: sample.zip

A Java exception and stacktrace was swallowed by JRuby.

My expected behaviour is that the Java exception is shown

I had an error in a Hibernate mapping. When the code is called from a Java 
class, I get the following exception and stacktrace:
Exception in thread "main" java.lang.ExceptionInInitializerError
        at de.laliluna.Sample.main(Sample.java:13)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)
Caused by: org.hibernate.MappingException: Could not determine type for: 
java.util.List, at table: Article, for columns: 
[org.hibernate.mapping.Column(options)]

I used the following Ruby code to call the Java class
require('java')
include_class 'de.laliluna.util.SessionFactoryUtil'
SessionFactoryUtil.getInstance

JRuby prints only
 (eval):1:in `include_class': cannot initialize Java class 
de.laliluna.util.SessionFactoryUtil (NameError)

----
The following mapping provokes the exception (annotations are missing) in front 
of the list

I attached my Java and JRuby classes

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to