-->
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: Could not load class org.hibernate.exception... Please help
PostPosted: Thu Oct 25, 2007 8:39 pm 
Newbie

Joined: Thu Oct 25, 2007 8:16 pm
Posts: 3
Location: Cebu, Philippines
Hi,

I'm stuck with this error when executing:

Code:
//from CustomerFacadeBean.class
public void save(Customer customer) {
        customer = new Customer();
        customer.setFirstName("JOHN");
        customer.setLastName("DOE");
        em.persist(customer);
    }

//from Main.class
public static void main(String[] args) {
        Main m = new Main();
        m.testCustomer();
    }
   
    public void testCustomer() {
        try {       
            InitialContext ic = new InitialContext();
            CustomerFacadeRemote cfr = (CustomerFacadeRemote) ic.lookup(
                    CustomerFacadeRemote.class.getName());           
            cfr.save(new Customer());           
        } catch (NamingException ex) {
            ex.printStackTrace();
        }
    }


Here's the error:

Code:
WARNING: "IOP00810257: (MARSHAL) Could not load class org.hibernate.exception.SQLGrammarException"


Anyway, here are the details.

I'm using: Hibernate 3.2.5 ga
Application Server: Sun Java System Application Server 9.1
IDE: NetBeans 5.5.1
Database: MySQL 5.1

I've already copied these files to the server's \lib directory:
* From Hibernate EntityManager:
o hibernate-entitymanager.jar
o lib/hibernate-annotations.jar
o lib/hibernate-commons-annotations.jar
o lib/jboss-archive-browsing.jar
* From Hibernate Core
o hibernate3.jar
o lib/antlr-2.7.6.jar
o lib/asm-attrs.jar
o lib/asm.jar
o lib/c3p0-0.9.1.jar
o lib/cglib-2.1.3.jar
o lib/commons-collections-2.1.1.jar
o lib/commons-logging-1.0.4.jar
o lib/concurrent-1.3.2.jar
o lib/dom4j-1.6.1.jar
o lib/ehcache-1.2.3.jar
o lib/javassist.jar
o lib/log4j-1.2.11.jar

I've also 'explicitly' declared the hibernate dialect in my persistence.xml:

Code:
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
  <persistence-unit name="hib-test3-ejbPU" transaction-type="JTA">
    <provider>org.hibernate.ejb.HibernatePersistence</provider>
    <jta-data-source>testdb</jta-data-source>
    <properties>
        <property name="hibernate.dialect" value="org.hibernate.dialect.OracleDialect"/>
      <property name="hibernate.hbm2ddl.auto" value="update"/>
    </properties>
  </persistence-unit>
</persistence>


I've also copied:
mysql-connector-java-5.0.7-bin.jar
to
<AppServer-dir>\SDK\domains\domain1\lib\ext

This is the full stack trace:



Oct 26, 2007 8:10:39 AM com.sun.corba.ee.impl.encoding.CDRInputStream_1_0 read_value
WARNING: "IOP00810257: (MARSHAL) Could not load class org.hibernate.exception.SQLGrammarException"
org.omg.CORBA.MARSHAL: vmcid: SUN minor code: 257 completed: Maybe
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.couldNotFindClass(ORBUtilSystemException.java:9684)
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.couldNotFindClass(ORBUtilSystemException.java:9699)
at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:1042)
at com.sun.corba.ee.impl.encoding.CDRInputStream.read_value(CDRInputStream.java:475)
at com.sun.corba.ee.impl.io.IIOPInputStream.inputObjectField(IIOPInputStream.java:1974)
at com.sun.corba.ee.impl.io.IIOPInputStream.inputClassFields(IIOPInputStream.java:2199)
at com.sun.corba.ee.impl.io.IIOPInputStream.inputObject(IIOPInputStream.java:1211)
at com.sun.corba.ee.impl.io.IIOPInputStream.simpleReadObject(IIOPInputStream.java:422)
at com.sun.corba.ee.impl.io.ValueHandlerImpl.readValueInternal(ValueHandlerImpl.java:362)
at com.sun.corba.ee.impl.io.ValueHandlerImpl.readValue(ValueHandlerImpl.java:328)
at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.readRMIIIOPValueType(CDRInputStream_1_0.java:966)
at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:1052)
at com.sun.corba.ee.impl.encoding.CDRInputStream.read_value(CDRInputStream.java:475)
at com.sun.corba.ee.impl.io.IIOPInputStream.inputObjectField(IIOPInputStream.java:1974)
at com.sun.corba.ee.impl.io.IIOPInputStream.inputClassFields(IIOPInputStream.java:2199)
at com.sun.corba.ee.impl.io.IIOPInputStream.inputObject(IIOPInputStream.java:1211)
at com.sun.corba.ee.impl.io.IIOPInputStream.simpleReadObject(IIOPInputStream.java:422)
at com.sun.corba.ee.impl.io.ValueHandlerImpl.readValueInternal(ValueHandlerImpl.java:362)
at com.sun.corba.ee.impl.io.ValueHandlerImpl.readValue(ValueHandlerImpl.java:328)
at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.readRMIIIOPValueType(CDRInputStream_1_0.java:966)
at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:1052)
at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:896)
at com.sun.corba.ee.impl.encoding.CDRInputStream.read_value(CDRInputStream.java:466)
at com.sun.corba.ee.impl.servicecontext.UEInfoServiceContextImpl.<init>(UEInfoServiceContextImpl.java:65)
at com.sun.corba.ee.spi.servicecontext.ServiceContextDefaults$5.create(ServiceContextDefaults.java:200)
at com.sun.corba.ee.impl.servicecontext.ServiceContextsImpl.unmarshal(ServiceContextsImpl.java:276)
at com.sun.corba.ee.impl.servicecontext.ServiceContextsImpl.get(ServiceContextsImpl.java:459)
at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.processResponse(CorbaClientRequestDispatcherImpl.java:511)
at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.marshalingComplete(CorbaClientRequestDispatcherImpl.java:363)
at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.invoke(CorbaClientDelegateImpl.java:219)
at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.privateInvoke(StubInvocationHandlerImpl.java:192)
at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.invoke(StubInvocationHandlerImpl.java:152)
at com.sun.corba.ee.impl.presentation.rmi.bcel.BCELStubBase.invoke(BCELStubBase.java:225)
at com.hib.entity.__CustomerFacadeRemote_Remote_DynamicStub.save(com/hib/entity/__CustomerFacadeRemote_Remote_DynamicStub.java)
at com.hib.entity._CustomerFacadeRemote_Wrapper.save(com/hib/entity/_CustomerFacadeRemote_Wrapper.java)
at hibtest3.Main.testCustomer(Main.java:37)
at hibtest3.Main.main(Main.java:19)
Oct 26, 2007 8:10:40 AM com.sun.corba.ee.impl.servicecontext.UEInfoServiceContextImpl <init>
WARNING: "IOP00810261: (MARSHAL) Could not read exception from UEInfoServiceContext"
org.omg.CORBA.MARSHAL: vmcid: SUN minor code: 261 completed: Maybe
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.couldNotReadInfo(ORBUtilSystemException.java:9798)
at com.sun.corba.ee.impl.servicecontext.UEInfoServiceContextImpl.<init>(UEInfoServiceContextImpl.java:70)
at com.sun.corba.ee.spi.servicecontext.ServiceContextDefaults$5.create(ServiceContextDefaults.java:200)
at com.sun.corba.ee.impl.servicecontext.ServiceContextsImpl.unmarshal(ServiceContextsImpl.java:276)
at com.sun.corba.ee.impl.servicecontext.ServiceContextsImpl.get(ServiceContextsImpl.java:459)
at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.processResponse(CorbaClientRequestDispatcherImpl.java:511)
at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.marshalingComplete(CorbaClientRequestDispatcherImpl.java:363)
at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.invoke(CorbaClientDelegateImpl.java:219)
at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.privateInvoke(StubInvocationHandlerImpl.java:192)
at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.invoke(StubInvocationHandlerImpl.java:152)
at com.sun.corba.ee.impl.presentation.rmi.bcel.BCELStubBase.invoke(BCELStubBase.java:225)
at com.hib.entity.__CustomerFacadeRemote_Remote_DynamicStub.save(com/hib/entity/__CustomerFacadeRemote_Remote_DynamicStub.java)
at com.hib.entity._CustomerFacadeRemote_Wrapper.save(com/hib/entity/_CustomerFacadeRemote_Wrapper.java)
at hibtest3.Main.testCustomer(Main.java:37)
at hibtest3.Main.main(Main.java:19)
Caused by: org.omg.CORBA.MARSHAL: vmcid: SUN minor code: 257 completed: Maybe
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.couldNotFindClass(ORBUtilSystemException.java:9684)
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.couldNotFindClass(ORBUtilSystemException.java:9699)
at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:1042)
at com.sun.corba.ee.impl.encoding.CDRInputStream.read_value(CDRInputStream.java:475)
at com.sun.corba.ee.impl.io.IIOPInputStream.inputObjectField(IIOPInputStream.java:1974)
at com.sun.corba.ee.impl.io.IIOPInputStream.inputClassFields(IIOPInputStream.java:2199)
at com.sun.corba.ee.impl.io.IIOPInputStream.inputObject(IIOPInputStream.java:1211)
at com.sun.corba.ee.impl.io.IIOPInputStream.simpleReadObject(IIOPInputStream.java:422)
at com.sun.corba.ee.impl.io.ValueHandlerImpl.readValueInternal(ValueHandlerImpl.java:362)
at com.sun.corba.ee.impl.io.ValueHandlerImpl.readValue(ValueHandlerImpl.java:328)
at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.readRMIIIOPValueType(CDRInputStream_1_0.java:966)
at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:1052)
at com.sun.corba.ee.impl.encoding.CDRInputStream.read_value(CDRInputStream.java:475)
at com.sun.corba.ee.impl.io.IIOPInputStream.inputObjectField(IIOPInputStream.java:1974)
at com.sun.corba.ee.impl.io.IIOPInputStream.inputClassFields(IIOPInputStream.java:2199)
at com.sun.corba.ee.impl.io.IIOPInputStream.inputObject(IIOPInputStream.java:1211)
at com.sun.corba.ee.impl.io.IIOPInputStream.simpleReadObject(IIOPInputStream.java:422)
at com.sun.corba.ee.impl.io.ValueHandlerImpl.readValueInternal(ValueHandlerImpl.java:362)
Caught an exception: null
at com.sun.corba.ee.impl.io.ValueHandlerImpl.readValue(ValueHandlerImpl.java:328)
at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.readRMIIIOPValueType(CDRInputStream_1_0.java:966)
at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:1052)
at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:896)
at com.sun.corba.ee.impl.encoding.CDRInputStream.read_value(CDRInputStream.java:466)
at com.sun.corba.ee.impl.servicecontext.UEInfoServiceContextImpl.<init>(UEInfoServiceContextImpl.java:65)
... 13 more



Why is it saying "Could not load class org.hibernate.exception.SQLGrammarException"? Did I miss something here? Is there anymore jar file I need to copy to my server?

Hope someone can help me... I've been trying to find a solution for this problem for days now. Thanks.
[/code]


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.