Hi Gavin.
I'm sorry, but that does not solve the problem.
It's not possible to get the EntityManager via JNDI lookup!
Here is the logging of JBoss-4.0.4RC1 when deploying my JAR files:
08:14:57,178 INFO [JkMain] Jk running ID=0 time=0/141 config=null
| 08:14:57,178 INFO [Server] JBoss (MX MicroKernel) [4.0.4RC1 (build:
CVSTag=JBoss_4_0_4_RC1 date=200601230248)] Started in 29s:706ms
| 08:15:32,347 INFO [Ejb3AnnotationHandler] found EJB3: ejbName=LibraryBean,
class=control.LibraryBean, type=STATELESS
| 08:15:32,456 INFO [Ejb3Deployment] EJB3 deployment time took: 265
| 08:15:32,550 INFO [JmxKernelAbstraction] installing MBean:
jboss.j2ee:service=EJB3,jar=library.jar,name=LibraryBean with dependencies:
| 08:15:33,206 INFO [EJB3Deployer] Deployed:
file:/D:/EnterpriseApplications/JBoss/4.0.4RC1/server/default/deploy/library.jar
| 08:15:33,253 FATAL [PersistenceXmlLoader] LibraryDB1 JTA
| 08:15:33,268 INFO [Ejb3Deployment] EJB3 deployment time took: 46
| 08:15:33,268 INFO [JmxKernelAbstraction] installing MBean:
persistence.units:unitName=LibraryDB1 with dependencies:
| 08:15:33,268 INFO [JmxKernelAbstraction]
jboss.jca:name=PostgresDS#LibraryDB1,service=DataSourceBinding
| 08:15:33,409 INFO [Environment] Hibernate 3.1
| 08:15:33,409 INFO [Environment] hibernate.properties not found
| 08:15:33,425 INFO [Environment] using CGLIB reflection optimizer
| 08:15:33,425 INFO [Environment] using JDK 1.4 java.sql.Timestamp handling
| 08:15:33,674 INFO [Ejb3Configuration] found EJB3 Entity bean:
business.Article
| 08:15:33,690 INFO [Ejb3Configuration] found EJB3 Entity bean:
business.Author
| 08:15:34,143 INFO [AnnotationBinder] Binding entity from annotated class:
business.Article
| 08:15:34,284 INFO [EntityBinder] Bind entity business.Article on table
ARTICLES
| 08:15:34,471 INFO [AnnotationBinder] Binding entity from annotated class:
business.Author
| 08:15:34,471 INFO [EntityBinder] Bind entity business.Author on table
AUTHORS
| 08:15:34,721 INFO [CollectionBinder] Mapping collection:
business.Author.articles -> ARTICLES
| 08:15:34,815 INFO [ConnectionProviderFactory] Initializing connection
provider: org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider
| 08:15:34,815 INFO [InjectedDataSourceConnectionProvider] Using provided
datasource
| 08:15:35,549 INFO [SettingsFactory] RDBMS: PostgreSQL, version: 8.1.0
| 08:15:35,564 INFO [SettingsFactory] JDBC driver: PostgreSQL Native Driver,
version: PostgreSQL 8.1devel JDBC3 with SSL (build 403)
| 08:15:35,611 INFO [Dialect] Using dialect:
org.hibernate.dialect.PostgreSQLDialect
| 08:15:35,627 INFO [TransactionFactoryFactory] Using default transaction
strategy (direct JDBC transactions)
| 08:15:35,642 INFO [TransactionManagerLookupFactory] instantiating
TransactionManagerLookup:
org.hibernate.transaction.JBossTransactionManagerLookup
| 08:15:35,642 INFO [TransactionManagerLookupFactory] instantiated
TransactionManagerLookup
| 08:15:35,642 INFO [SettingsFactory] Automatic flush during
beforeCompletion(): enabled
| 08:15:35,642 INFO [SettingsFactory] Automatic session close at end of
transaction: disabled
| 08:15:35,642 INFO [SettingsFactory] JDBC batch size: 15
| 08:15:35,642 INFO [SettingsFactory] JDBC batch updates for versioned data:
disabled
| 08:15:35,642 INFO [SettingsFactory] Scrollable result sets: enabled
| 08:15:35,642 INFO [SettingsFactory] JDBC3 getGeneratedKeys(): disabled
| 08:15:35,642 INFO [SettingsFactory] Connection release mode:
after_statement
| 08:15:35,658 INFO [SettingsFactory] Default batch fetch size: 1
| 08:15:35,658 INFO [SettingsFactory] Generate SQL with comments: disabled
| 08:15:35,658 INFO [SettingsFactory] Order SQL updates by primary key:
disabled
| 08:15:35,658 INFO [SettingsFactory] Query translator:
org.hibernate.hql.ast.ASTQueryTranslatorFactory
| 08:15:35,673 INFO [ASTQueryTranslatorFactory] Using
ASTQueryTranslatorFactory
| 08:15:35,673 INFO [SettingsFactory] Query language substitutions: {}
| 08:15:35,673 INFO [SettingsFactory] Second-level cache: enabled
| 08:15:35,673 INFO [SettingsFactory] Query cache: disabled
| 08:15:35,673 INFO [SettingsFactory] Cache provider:
org.hibernate.cache.HashtableCacheProvider
| 08:15:35,673 INFO [SettingsFactory] Optimize cache for minimal puts:
disabled
| 08:15:35,673 INFO [SettingsFactory] Structured second-level cache entries:
disabled
| 08:15:35,689 INFO [SettingsFactory] Statistics: disabled
| 08:15:35,689 INFO [SettingsFactory] Deleted entity synthetic identifier
rollback: disabled
| 08:15:35,689 INFO [SettingsFactory] Default entity-mode: pojo
| 08:15:35,767 INFO [SessionFactoryImpl] building session factory
| 08:15:36,657 INFO [SessionFactoryObjectFactory] Not binding factory to
JNDI, no JNDI name configured
| 08:15:36,673 INFO [SchemaUpdate] Running hbm2ddl schema update
| 08:15:36,673 INFO [SchemaUpdate] fetching database metadata
| 08:15:37,298 INFO [SchemaUpdate] updating schema
| 08:15:37,797 INFO [TableMetadata] table found: public.articles
| 08:15:37,797 INFO [TableMetadata] columns: [title, articleid, authorid,
body]
| 08:15:37,797 INFO [TableMetadata] foreign keys: [fke566c23dd993b37f]
| 08:15:37,797 INFO [TableMetadata] indexes: [articles_pkey]
| 08:15:37,844 INFO [TableMetadata] table found: public.authors
| 08:15:37,844 INFO [TableMetadata] columns: [userid, authorid, name]
| 08:15:37,844 INFO [TableMetadata] foreign keys: []
| 08:15:37,844 INFO [TableMetadata] indexes: [authors_pkey]
| 08:15:37,844 INFO [SchemaUpdate] schema update complete
| 08:15:37,844 INFO [NamingHelper] JNDI InitialContext
properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory,
java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
| 08:15:37,860 INFO [EJB3Deployer] Deployed:
file:/D:/EnterpriseApplications/JBoss/4.0.4RC1/server/default/deploy/postgres.LibraryDB1.jar
| 08:15:37,954 INFO [TomcatDeployer] deploy, ctxPath=/library,
warUrl=.../tmp/deploy/tmp13643library-exp.war/
Holger
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3919743#3919743
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3919743
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user