[jboss-jira] [JBoss JIRA] Closed: (JBAS-5015) Deploy entity beans in Oracle 11g on JBoss 4.2.1 and JBoss 4.2.1

Steve Ebersole (JIRA) jira-events at lists.jboss.org
Wed Nov 28 10:58:46 EST 2007


     [ http://jira.jboss.com/jira/browse/JBAS-5015?page=all ]

Steve Ebersole closed JBAS-5015.
--------------------------------

    Resolution: Deferred

Need to ascertain whether the 10g directed dialect will work with 11g in all cases or whether we need a new dialect.

> Deploy entity beans in Oracle 11g on JBoss 4.2.1 and JBoss 4.2.1
> ----------------------------------------------------------------
>
>                 Key: JBAS-5015
>                 URL: http://jira.jboss.com/jira/browse/JBAS-5015
>             Project: JBoss Application Server
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: Hibernate service
>    Affects Versions: JBossAS-4.2.1.GA, JBossAS-4.2.2.GA
>         Environment: JAva 1.5
> JBoss 4.2.1 and JBoss4.2.2
>            Reporter: Georges Goebel
>         Assigned To: Steve Ebersole
>            Priority: Critical
>             Fix For: JBossAS-4.2.3.GA
>
>
> It is not possible to deploy entity beans to an Oracle 11g Datasource because the HibernateException :
> unknown Oracle major version [11] occurs
> If I check in the hibernate 3.2.4sp1 distribution the class org.hibernate.dialect.DialectFactory there I find the following definition which is correct (in my eyes)
> private static final Map MAPPERS = new HashMap();
> 	static {
> 		// TODO : this is the stuff it'd be nice to move to a properties file or some other easily user-editable place
> 		MAPPERS.put( "HSQL Database Engine", new VersionInsensitiveMapper( "org.hibernate.dialect.HSQLDialect" ) );
> 		MAPPERS.put( "DB2/NT", new VersionInsensitiveMapper( "org.hibernate.dialect.DB2Dialect" ) );
> 		MAPPERS.put( "MySQL", new VersionInsensitiveMapper( "org.hibernate.dialect.MySQLDialect" ) );
> 		MAPPERS.put( "PostgreSQL", new VersionInsensitiveMapper( "org.hibernate.dialect.PostgreSQLDialect" ) );
> 		MAPPERS.put( "Microsoft SQL Server Database", new VersionInsensitiveMapper( "org.hibernate.dialect.SQLServerDialect" ) );
> 		MAPPERS.put( "Microsoft SQL Server", new VersionInsensitiveMapper( "org.hibernate.dialect.SQLServerDialect" ) );
> 		MAPPERS.put( "Sybase SQL Server", new VersionInsensitiveMapper( "org.hibernate.dialect.SybaseDialect" ) );
> 		MAPPERS.put( "Informix Dynamic Server", new VersionInsensitiveMapper( "org.hibernate.dialect.InformixDialect" ) );
> 		MAPPERS.put( "Apache Derby", new VersionInsensitiveMapper( "org.hibernate.dialect.DerbyDialect" ) );
> 		
> 		MAPPERS.put(
> 		        "Oracle",
> 		        new DatabaseDialectMapper() {
> 			        public String getDialectClass(int majorVersion) {
> 			            return majorVersion > 8
> 			                    ? "org.hibernate.dialect.Oracle9Dialect"
> 				                : "org.hibernate.dialect.OracleDialect";
> 			        }
> 		        }
> 		);
> 	}
> The JBoss 4.2.2 distribution shows during startup the usage of hibernate 3.2.4sp1 (also according the Manifest file in the jar) but when I decompile the class org.hibernate.dialect.DialectFactory in the JBoss distribution it shows the old implementation:
> static 
>     {
>         MAPPERS = new HashMap();
>         MAPPERS.put("HSQL Database Engine", new VersionInsensitiveMapper("org.hibernate.dialect.HSQLDialect"));
>         MAPPERS.put("DB2/NT", new VersionInsensitiveMapper("org.hibernate.dialect.DB2Dialect"));
>         MAPPERS.put("DB2/LINUX", new VersionInsensitiveMapper("org.hibernate.dialect.DB2Dialect"));
>         MAPPERS.put("MySQL", new VersionInsensitiveMapper("org.hibernate.dialect.MySQLDialect"));
>         MAPPERS.put("PostgreSQL", new VersionInsensitiveMapper("org.hibernate.dialect.PostgreSQLDialect"));
>         MAPPERS.put("Microsoft SQL Server Database", new VersionInsensitiveMapper("org.hibernate.dialect.SQLServerDialect"));
>         MAPPERS.put("Microsoft SQL Server", new VersionInsensitiveMapper("org.hibernate.dialect.SQLServerDialect"));
>         MAPPERS.put("Sybase SQL Server", new VersionInsensitiveMapper("org.hibernate.dialect.SybaseDialect"));
>         MAPPERS.put("Adaptive Server Enterprise", new VersionInsensitiveMapper("org.hibernate.dialect.SybaseDialect"));
>         MAPPERS.put("Informix Dynamic Server", new VersionInsensitiveMapper("org.hibernate.dialect.InformixDialect"));
>         MAPPERS.put("Apache Derby", new VersionInsensitiveMapper("org.hibernate.dialect.DerbyDialect"));
>         MAPPERS.put("Oracle", new DatabaseDialectMapper() {
>             public String getDialectClass(int majorVersion)
>             {
>                 switch(majorVersion)
>                 {
>                 case 8: // '\b'
>                     return (DialectFactory.class$org$hibernate$dialect$Oracle8iDialect != null ? DialectFactory.class$org$hibernate$dialect$Oracle8iDialect : (DialectFactory.class$org$hibernate$dialect$Oracle8iDialect = DialectFactory._mthclass$("org.hibernate.dialect.Oracle8iDialect"))).getName();
>                 case 9: // '\t'
>                     return (DialectFactory.class$org$hibernate$dialect$Oracle9iDialect != null ? DialectFactory.class$org$hibernate$dialect$Oracle9iDialect : (DialectFactory.class$org$hibernate$dialect$Oracle9iDialect = DialectFactory._mthclass$("org.hibernate.dialect.Oracle9iDialect"))).getName();
>                 case 10: // '\n'
>                     return (DialectFactory.class$org$hibernate$dialect$Oracle10gDialect != null ? DialectFactory.class$org$hibernate$dialect$Oracle10gDialect : (DialectFactory.class$org$hibernate$dialect$Oracle10gDialect = DialectFactory._mthclass$("org.hibernate.dialect.Oracle10gDialect"))).getName();
>                 }
>                 throw new HibernateException("unknown Oracle major version [" + majorVersion + "]");
>             }
>         });
>     }
> Perhaps there is something wrong by integration the different components in JBoss during packaging.
> Replacing the hibernate3.jar in the JBoss distribution by the hibernate3.jar from the hibernate 3.2.4sp1 distribution solved the problem.

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

        



More information about the jboss-jira mailing list