-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Problem deploying service (using Hibernate ) on Ubuntu
PostPosted: Sat Nov 14, 2009 4:47 pm 
Newbie

Joined: Sat Nov 14, 2009 4:40 pm
Posts: 1
Hello,

I have a web service that works perfectly fine when I deploy it on Mac Os X and Windows XP. Now I'm deploying it on a virtual machine with Ubuntu and I get this exception when I try to use it:

Code:
java.lang.ExceptionInInitializerError
   at ve.usb.HibernateUtil.<clinit>(HibernateUtil.java:28)
   at ve.usb.TestHelper.<init>(TestHelper.java:21)
   at ve.usb.USB_RegCivil.USB_RegCivil_consulta(USB_RegCivil.java:28)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke


TestHelper at line 21

Code:
this.session = HibernateUtil.getSessionFactory().getCurrentSession();


USB_RegCivil at line 28

Code:
TestHelper helper = new TestHelper();


HibernateUtil

Code:
package ve.usb;


import org.hibernate.cfg.AnnotationConfiguration;
import org.hibernate.SessionFactory;

/**
* Hibernate Utility class with a convenient method to get Session Factory object.
*
* @author rafa
*/
public class HibernateUtil {
    private static final SessionFactory sessionFactory;

    static {
        try {
            // Create the SessionFactory from standard (hibernate.cfg.xml)
            // config file.
            sessionFactory = new AnnotationConfiguration().configure().buildSessionFactory();
        } catch (Throwable ex) {
            // Log the exception.
            System.err.println("Initial SessionFactory creation failed." + ex);
            throw new ExceptionInInitializerError(ex);
        }
    }


I also found this:

Code:
 
Caused by: java.lang.NoClassDefFoundError
        at ve.usb.TestHelper.<init>(TestHelper.java:21)
        at ve.usb.USB_RegCivil.USB_RegCivil_consulta(USB_RegCivil.java:28)


I also tried with a simple web service (with no hibernate nor connection to a db) and it worked fine.
It is only the web service with hibernate that doesn't work on my Ubuntu installation.

Any of you have any idea of what may be happening?

Im using Glassfish, and I'm using a SUN JVM.

Thank you very much guys.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.