- This topic has 5 replies, 2 voices, and was last updated 17 years, 8 months ago by Loyal Water.
-
AuthorPosts
-
pcableMemberI initially started my project in MyEclipse and then deployed it to JBoss using the hibernate.cfg.xml – standard or normal hibernate setup used if deploying to websphere or weblogic. I got that deployed and working on JBoss but I had some concern about the Transaction manager since I could set that in the hibernate.cfg.xml.
So, then I read that JBoss wants hibernate deployed through a HAR. So using ANT scripts and other modification I have the Har file configuration deploying to JBoss properly.
Now, I have stepped back to get everything to work fine again inside MyEclispe IDE.
I have been reading some of the comments about having to create a basic java project name <projectName>.HAR so that you can get a har file created for going inside the EAR.
Is that still the way we need to do this or has HAR capabilities been added to MyEclipse?Thanks,
pcable
Loyal WaterMemberHAR capabilities have not been added to MyEclipse yet. You’ll have to use the same way of renaming the project as <projectname>.HAR to get the HAR file created for going inside the EAR.
Sorry about that.
pcableMember1. created a Java project named <projectName>.har and moved all the hibernate classes into that project.
2. moved the hibernate-service.xml from the EAR project to META-INF\* inside the <projectName>.har project
3. add this project as a dependancy for the EAR
4. changed windows–> Preferences –> MyEclipse –> J2EE Project –>EAR Project setting “Jar dependent Java projects”
5. the jboss-app.xml which specifies the name of the har is in the EAR projectHowever, when I deploy through MyEclipse to JBoss the app is not finding the Session Factory. Any Ideas?
pcableMemberTo add to the above. I had the code working yesterday on a JBoss server in out test environment. However, the same code (just rearranged) is not binding to the JBoss Session Factory when running through MyEclipse (it is not finding the session).
10:16:34,618 INFO [DLQ] Bound to JNDI name: queue/DLQ
10:16:34,757 INFO [ConnectionFactoryBindingService] Bound ConnectionManager ‘jboss.jca:service=ConnectionFactoryBinding,name=JmsXA’ to JNDI name ‘java:JmsXA’
10:16:34,866 INFO [WrapperDataSourceService] Bound ConnectionManager ‘jboss.jca:service=DataSourceBinding,name=jdbc/VendorExtranetMSSQL’ to JNDI name ‘jdbc/VendorExtranetMSSQL’
10:16:35,021 INFO [WrapperDataSourceService] Bound ConnectionManager ‘jboss.jca:service=DataSourceBinding,name=jdbc/drhweb’ to JNDI name ‘jdbc/drhweb’
10:16:35,036 INFO [WrapperDataSourceService] Bound ConnectionManager ‘jboss.jca:service=DataSourceBinding,name=jdbc/VendorExtranet’ to JNDI name ‘jdbc/VendorExtranet’
10:16:35,098 INFO [TomcatDeployer] deploy, ctxPath=/jmx-console, warUrl=…/deploy/jmx-console.war/
10:16:35,238 INFO [EARDeployer] Init J2EE application: file:/C:/Tools/jbossAS-4.0.5.GA/server/myEclipseJBossAS/deploy/EAR_HelloWorld.ear/
10:16:35,269 INFO [TomcatDeployer] deploy, ctxPath=/helloWorld, warUrl=…/deploy/EAR_HelloWorld.ear/GUI_HelloWorld.war/
10:16:35,362 INFO [EARDeployer] Started J2EE application: file:/C:/Tools/jbossAS-4.0.5.GA/server/myEclipseJBossAS/deploy/EAR_HelloWorld.ear/
10:16:35,362 INFO [EARDeployer] Init J2EE application: file:/C:/Tools/jbossAS-4.0.5.GA/server/myEclipseJBossAS/deploy/VendorExtranet_EAR.ear/
10:16:35,610 INFO [Environment] Hibernate 3.2.0.ga
10:16:35,610 INFO [Environment] hibernate.properties not found
10:16:35,610 INFO [Environment] Bytecode provider name : javassist
10:16:35,625 INFO [Environment] using JDK 1.4 java.sql.Timestamp handling
10:16:35,967 INFO [Configuration] Searching for mapping documents in jar: vendorextranet.har
10:16:35,967 INFO [Configuration] Found mapping document in jar: com/drhorton/ve/data/hibernate/mappings/Division.hbm.xml
10:16:36,184 INFO [HbmBinder] Mapping class: com.drhorton.ve.data.hibernate.mappings.Division -> Division
10:16:36,323 INFO [Configuration] Found mapping document in jar: com/drhorton/ve/data/hibernate/mappings/DivisionSchedule.hbm.xml
10:16:36,370 INFO [HbmBinder] Mapping class: com.drhorton.ve.data.hibernate.mappings.DivisionSchedule -> DivisionSchedule
10:16:36,370 INFO [Configuration] Found mapping document in jar: com/drhorton/ve/data/hibernate/mappings/ModuleSuppression.hbm.xml
10:16:36,385 INFO [HbmBinder] Mapping class: com.drhorton.ve.data.hibernate.mappings.ModuleSuppression -> ModuleSuppression
10:16:36,385 INFO [Configuration] Found mapping document in jar: com/drhorton/ve/data/hibernate/mappings/jde/JdeCommunity.hbm.xml
10:16:36,385 INFO [HbmBinder] Mapping class: com.drhorton.ve.data.hibernate.mappings.jde.JdeCommunity -> JDE_Community
10:16:36,385 INFO [Configuration] Found mapping document in jar: com/drhorton/ve/data/hibernate/mappings/jde/JdeDivision.hbm.xml
10:16:36,401 INFO [HbmBinder] Mapping class: com.drhorton.ve.data.hibernate.mappings.jde.JdeDivision -> JDE_Division
10:16:36,401 INFO [Configuration] Found mapping document in jar: com/drhorton/ve/data/hibernate/mappings/jde/JdeLot.hbm.xml
10:16:36,416 INFO [HbmBinder] Mapping class: com.drhorton.ve.data.hibernate.mappings.jde.JdeLot -> JDE_Lot
10:16:36,416 INFO [Configuration] Found mapping document in jar: com/drhorton/ve/data/hibernate/mappings/jde/JdeVendor.hbm.xml
10:16:36,432 INFO [HbmBinder] Mapping class: com.drhorton.ve.data.hibernate.mappings.jde.JdeVendor -> JDE_Vendor
10:16:36,432 INFO [Configuration] Found mapping document in jar: com/drhorton/ve/data/hibernate/mappings/lookup/ModuleType.hbm.xml
10:16:36,447 INFO [HbmBinder] Mapping class: com.drhorton.ve.data.hibernate.mappings.lookup.ModuleType -> ModuleType
10:16:36,447 INFO [Configuration] Found mapping document in jar: com/drhorton/ve/data/hibernate/mappings/lookup/ScheduleType.hbm.xml
10:16:36,463 INFO [HbmBinder] Mapping class: com.drhorton.ve.data.hibernate.mappings.lookup.ScheduleType -> ScheduleType
10:16:36,463 INFO [HbmBinder] Mapping collection: com.drhorton.ve.data.hibernate.mappings.Division.moduleSuppressions -> ModuleSuppression
10:16:36,463 INFO [HbmBinder] Mapping collection: com.drhorton.ve.data.hibernate.mappings.lookup.ScheduleType.divisionSchedules -> DivisionSchedule
10:16:36,478 INFO [NamingHelper] JNDI InitialContext properties:{}
10:16:36,478 INFO [DatasourceConnectionProvider] Using datasource: jdbc/VendorExtranetMSSQL
10:16:36,819 INFO [SettingsFactory] RDBMS: Microsoft SQL Server, version: 9.00.2047
10:16:36,819 INFO [SettingsFactory] JDBC driver: Microsoft SQL Server 2005 JDBC Driver, version: 1.1.1501.101
10:16:36,881 INFO [Dialect] Using dialect: org.hibernate.dialect.SQLServerDialect
10:16:36,897 INFO [TransactionFactoryFactory] Transaction strategy: org.hibernate.transaction.JTATransactionFactory
10:16:36,897 INFO [NamingHelper] JNDI InitialContext properties:{}
10:16:36,897 INFO [TransactionManagerLookupFactory] instantiating TransactionManagerLookup: org.hibernate.transaction.JBossTransactionManagerLookup
10:16:36,897 INFO [TransactionManagerLookupFactory] instantiated TransactionManagerLookup
10:16:36,897 INFO [TransactionManagerLookupFactory] instantiating TransactionManagerLookup: org.hibernate.transaction.JBossTransactionManagerLookup
10:16:36,897 INFO [TransactionManagerLookupFactory] instantiated TransactionManagerLookup
10:16:36,897 INFO [SettingsFactory] Automatic flush during beforeCompletion(): enabled
10:16:36,897 INFO [SettingsFactory] Automatic session close at end of transaction: enabled
10:16:36,897 INFO [SettingsFactory] Scrollable result sets: enabled
10:16:36,897 INFO [SettingsFactory] JDBC3 getGeneratedKeys(): enabled
10:16:36,897 INFO [SettingsFactory] Connection release mode: after_statement
10:16:36,897 INFO [SettingsFactory] Default schema: VendorExtranet
10:16:36,897 INFO [SettingsFactory] Default batch fetch size: 1
10:16:36,897 INFO [SettingsFactory] Generate SQL with comments: disabled
10:16:36,897 INFO [SettingsFactory] Order SQL updates by primary key: disabled
10:16:36,897 INFO [SettingsFactory] Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
10:16:36,912 INFO [ASTQueryTranslatorFactory] Using ASTQueryTranslatorFactory
10:16:36,912 INFO [SettingsFactory] Query language substitutions: {}
10:16:36,912 INFO [SettingsFactory] JPA-QL strict compliance: disabled
10:16:36,912 INFO [SettingsFactory] Second-level cache: enabled
10:16:36,912 INFO [SettingsFactory] Query cache: disabled
10:16:36,912 INFO [SettingsFactory] Cache provider: org.hibernate.cache.HashtableCacheProvider
10:16:36,912 INFO [SettingsFactory] Optimize cache for minimal puts: disabled
10:16:36,912 INFO [SettingsFactory] Structured second-level cache entries: disabled
10:16:36,928 INFO [SettingsFactory] Echoing all SQL to stdout
10:16:36,928 INFO [SettingsFactory] Statistics: disabled
10:16:36,928 INFO [SettingsFactory] Deleted entity synthetic identifier rollback: disabled
10:16:36,928 INFO [SettingsFactory] Default entity-mode: pojo
10:16:36,990 INFO [SessionFactoryImpl] building session factory
10:16:37,439 INFO [SessionFactoryObjectFactory] Not binding factory to JNDI, no JNDI name configured
10:16:37,439 INFO [NamingHelper] JNDI InitialContext properties:{}
10:16:37,439 INFO [Hibernate] SessionFactory successfully built and bound into JNDI [java:/hibernate/SessionFactory]
10:16:37,470 INFO [TomcatDeployer] deploy, ctxPath=/ve, warUrl=…/deploy/VendorExtranet_EAR.ear/VendorExtranet_GUI.war/
10:16:37,951 INFO [PropertyMessageResources] Initializing, config=’org.apache.struts.util.LocalStrings’, returnNull=true
10:16:37,951 INFO [PropertyMessageResources] Initializing, config=’org.apache.struts.action.ActionResources’, returnNull=true
10:16:38,137 INFO [PropertyMessageResources] Initializing, config=’ApplicationResources’, returnNull=true
10:16:38,153 INFO [ValidatorPlugIn] Loading validation rules file from ‘WEB-INF/validator-rules.xml’
10:16:38,199 INFO [ValidatorPlugIn] Loading validation rules file from ‘WEB-INF/validation.xml’
10:16:38,339 INFO [TilesPlugin] Tiles definition factory loaded for module ”.
10:16:38,354 INFO [EARDeployer] Started J2EE application: file:/C:/Tools/jbossAS-4.0.5.GA/server/myEclipseJBossAS/deploy/VendorExtranet_EAR.ear/
10:16:38,447 INFO [Http11BaseProtocol] Starting Coyote HTTP/1.1 on http-0.0.0.0-8080
10:16:38,587 INFO [ChannelSocket] JK: ajp13 listening on /0.0.0.0:8009
10:16:38,618 INFO [JkMain] Jk running ID=0 time=0/47 config=null
10:16:38,649 INFO [Server] JBoss (MX MicroKernel) [4.0.5.GA (build: CVSTag=Branch_4_0 date=200610162339)] Started in 17s:953ms
pcableMemberOk found the answer to the problem at the following link: http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3881015#3881015
Loyal WaterMemberGlad to know its working. Thanks for letting me know.
-
AuthorPosts