Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version:
3.1
Mapping documents:
Follwing is the entry in the hibernate.cfg.xml file
<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<property name="show_sql">true</property>
<property name="connection.datasource">java:/comp/env/jdbc/test</property>
<property name="dialect">org.hibernate.dialect.Sybase11Dialect</property>
</session-factory>
</hibernate-configuration>
Code between sessionFactory.openSession() and session.close():
Full stack trace of any exception that occurs:
Caused by: java.lang.AbstractMethodError: supportsResultSetType
at weblogic.jdbc.wrapper.DatabaseMetaData_com_sybase_jdbc_SybDatabaseMetaData.supportsResultSetType(I)Z(Unknown Sourc
e)
at org.hibernate.cfg.SettingsFactory.buildSettings(Ljava/util/Properties;)Lorg/hibernate/cfg/Settings;(SettingsFactor
y.java:80)
at org.hibernate.cfg.Configuration.buildSettings()Lorg/hibernate/cfg/Settings;(Configuration.java:1463)
at org.hibernate.cfg.Configuration.buildSessionFactory()Lorg/hibernate/SessionFactory;(Configuration.java:1004)
at com.lehman.startup.StartUpServlet.init()V(StartUpServlet.java:64)
at javax.servlet.GenericServlet.init(Ljavax/servlet/ServletConfig;)V(GenericServlet.java:258)
at weblogic.servlet.internal.ServletStubImpl$ServletInitAction.run()Ljava/lang/Object;(ServletStubImpl.java:1094)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Lweblogic/security/subject/AbstractSubject;Ljava/security
/PrivilegedAction;)Ljava/lang/Object;(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(Lweblogic/security/acl/internal/AuthenticatedSubject;Lweblogic/sec
urity/acl/internal/AuthenticatedSubject;Ljava/security/PrivilegedAction;)Ljava/lang/Object;(SecurityManager.java:121)
at weblogic.servlet.internal.ServletStubImpl.createServlet()Ljavax/servlet/Servlet;(ServletStubImpl.java:970)
... 19 more
>
Name and version of the database you are using:
Sybase 12.5.2
The generated SQL (show_sql=true):
Debug level Hibernate log excerpt:
Quote:
Hi I am using Hibernate 3.1 with Sybase database and Using Weblogic 8.1. I am able to successfully run the application by specifying the JDBC driver and URL in the hibernate.cfg.xml file (i.e w/o making a look up for the datasource).
But when i tried making a lookup for the datasource using the configuration settings as shown above (in the "Mapping documents:" part)
i started getting the AbstractMethodError supportsResultSetType. The complete stacktrace is as shown above. I am using jconn2.jar for Sybase drivers. I checked the jar. It consists of a class named "SybDatabaseMetaData.java" which has the implementation of the method "supportsResultSetType". But i am still getting the AbstractMethodError.
Has somebody already faced this problem? If yes please give me the solution to this. If not can somebody please suggest what i should be doing.