EJB 3.0 with MS Access
karlgruber Jan 11, 2006 7:35 AMHello,
I tried the jboss-ide-trailblazer with a MSAccess2000-Database. But I always get the same error while deploying, here is the code from the Eclipse-Console:
13:09:28,843 INFO [JaccHelper] Initialising JACC Context for deployment: authors-beans.ejb3
13:09:29,531 INFO [Ejb3AnnotationHandler] found EJB3: ejbName=org.jboss.ejb3demo.AuthorsBean, class=org.jboss.ejb3demo.AuthorsBean, type=STATELESS
13:09:30,390 INFO [JaccHelper] org.jboss.ejb3demo.AuthorsBean has no @SecurityDomain - skipping JACC configuration
13:09:30,437 INFO [Ejb3Deployment] Found persistence.xml file in EJB3 jar
13:09:30,671 INFO [Environment] Hibernate 3.1
13:09:30,687 INFO [Environment] hibernate.properties not found
13:09:30,703 INFO [Environment] using CGLIB reflection optimizer
13:09:30,703 INFO [Environment] using JDK 1.4 java.sql.Timestamp handling
13:09:31,109 INFO [Ejb3Configuration] found EJB3 Entity bean: org.jboss.ejb3demo.Article
13:09:31,109 INFO [Ejb3Configuration] found EJB3 Entity bean: org.jboss.ejb3demo.Author
13:09:32,578 INFO [Configuration] processing extends queue
13:09:32,578 INFO [Configuration] processing collection mappings
13:09:32,578 INFO [CollectionBinder] Mapping collection: org.jboss.ejb3demo.Author.articles -> ARTICLES
13:09:32,593 INFO [Configuration] processing association property references
13:09:32,593 INFO [Configuration] processing foreign key constraints
13:09:32,734 INFO [Configuration] processing extends queue
13:09:32,734 INFO [Configuration] processing collection mappings
13:09:32,734 INFO [Configuration] processing association property references
13:09:32,734 INFO [Configuration] processing foreign key constraints
13:09:32,765 INFO [ConnectionProviderFactory] Initializing connection provider: org.hibernate.ejb.InjectedDataSourceConnectionProvider
13:09:32,781 INFO [InjectedDataSourceConnectionProvider] Using provided datasource
13:09:33,765 INFO [SettingsFactory] RDBMS: ACCESS, version: 04.00.0000
13:09:33,765 INFO [SettingsFactory] JDBC driver: JDBC-ODBC Bridge (odbcjt32.dll), version: 2.0001 (04.00.6304)
13:09:33,875 INFO [Dialect] Using dialect: org.hibernate.dialect.SQLServerDialect
13:09:33,921 INFO [TransactionFactoryFactory] Using default transaction strategy (direct JDBC transactions)
13:09:33,953 INFO [TransactionManagerLookupFactory] instantiating TransactionManagerLookup: org.hibernate.transaction.JBossTransactionManagerLookup
13:09:33,968 INFO [TransactionManagerLookupFactory] instantiated TransactionManagerLookup
13:09:33,968 INFO [SettingsFactory] Automatic flush during beforeCompletion(): disabled
13:09:33,968 INFO [SettingsFactory] Automatic session close at end of transaction: disabled
13:09:33,968 INFO [SettingsFactory] Scrollable result sets: enabled
13:09:33,968 INFO [SettingsFactory] JDBC3 getGeneratedKeys(): disabled
13:09:33,968 INFO [SettingsFactory] Connection release mode: after_statement
13:09:33,968 INFO [SettingsFactory] Default batch fetch size: 1
13:09:33,968 INFO [SettingsFactory] Generate SQL with comments: disabled
13:09:33,968 INFO [SettingsFactory] Order SQL updates by primary key: disabled
13:09:33,984 INFO [SettingsFactory] Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
13:09:34,000 INFO [ASTQueryTranslatorFactory] Using ASTQueryTranslatorFactory
13:09:34,000 INFO [SettingsFactory] Query language substitutions: {}
13:09:34,000 INFO [SettingsFactory] Second-level cache: enabled
13:09:34,000 INFO [SettingsFactory] Query cache: disabled
13:09:34,000 INFO [SettingsFactory] Cache provider: org.hibernate.cache.HashtableCacheProvider
13:09:34,000 INFO [SettingsFactory] Optimize cache for minimal puts: disabled
13:09:34,000 INFO [SettingsFactory] Structured second-level cache entries: disabled
13:09:34,031 INFO [SettingsFactory] Statistics: disabled
13:09:34,031 INFO [SettingsFactory] Deleted entity synthetic identifier rollback: enabled
13:09:34,031 INFO [SettingsFactory] Default entity-mode: POJO
13:09:34,656 INFO [SessionFactoryImpl] building session factory
13:09:36,765 INFO [SessionFactoryObjectFactory] Not binding factory to JNDI, no JNDI name configured
13:09:36,781 INFO [Configuration] processing extends queue
13:09:36,781 INFO [Configuration] processing collection mappings
13:09:36,781 INFO [Configuration] processing association property references
13:09:36,781 INFO [Configuration] processing foreign key constraints
13:09:36,781 INFO [Configuration] processing extends queue
13:09:36,781 INFO [Configuration] processing collection mappings
13:09:36,796 INFO [Configuration] processing association property references
13:09:36,796 INFO [Configuration] processing foreign key constraints
13:09:36,796 INFO [SchemaExport] Running hbm2ddl schema export
13:09:36,796 INFO [SchemaExport] exporting generated schema to database
13:09:37,218 ERROR [SchemaExport] Unsuccessful: create table ARTICLES (articleId int identity not null, title varchar(255) null, body varchar(255) null, authorId int null, primary key (articleId))
13:09:37,218 ERROR [SchemaExport] [Microsoft][ODBC Microsoft Access Driver] Syntaxfehler in CREATE TABLE-Anweisung.
13:09:37,234 ERROR [SchemaExport] Unsuccessful: create table AUTHORS (authorId int identity not null, name varchar(255) null, primary key (authorId))
13:09:37,234 ERROR [SchemaExport] [Microsoft][ODBC Microsoft Access Driver] Syntaxfehler in CREATE TABLE-Anweisung.
13:09:37,281 ERROR [SchemaExport] Unsuccessful: alter table ARTICLES add constraint FKE566C23D843A2A25 foreign key (authorId) references AUTHORS
13:09:37,281 ERROR [SchemaExport] [Microsoft][ODBC Microsoft Access Driver] Tabelle/Einschränkung kann nicht gefunden werden.13:09:37,281 INFO [SchemaExport] schema export complete
13:09:37,296 INFO [Configuration] processing extends queue
13:09:37,296 INFO [Configuration] processing collection mappings
13:09:37,296 INFO [Configuration] processing association property references
13:09:37,296 INFO [Configuration] processing foreign key constraints
13:09:37,296 INFO [Configuration] processing extends queue
13:09:37,296 INFO [Configuration] processing collection mappings
13:09:37,296 INFO [Configuration] processing association property references
13:09:37,296 INFO [Configuration] processing foreign key constraints
13:09:37,296 INFO [NamingHelper] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
13:09:37,312 INFO [SessionFactoryImpl] Checking 0 named queries
13:09:37,312 INFO [Ejb3Deployment] Create EntityManager with JNDI name: MSAccessTestDS
13:09:37,343 INFO [JaccHelper] JACC Policy Configuration for deployment has been put in service
13:09:37,359 INFO [Ejb3Deployment] EJB3 deployment time took: 8531
13:09:37,937 INFO [ProxyDeployer] no declared remote bindings for : org.jboss.ejb3demo.AuthorsBean
13:09:37,984 INFO [ProxyDeployer] there is remote interfaces for org.jboss.ejb3demo.AuthorsBean
13:09:37,984 INFO [ProxyDeployer] default remote binding has jndiName of org.jboss.ejb3demo.Authors
13:09:38,312 INFO [EJB3Deployer] Deployed: file:/C:/Apps/jboss-4.0.3SP1/server/all/deploy/authors-beans.ejb3
13:09:38,453 INFO [TomcatDeployer] deploy, ctxPath=/authors, warUrl=.../tmp/deploy/tmp50691authors-exp.war/
Can someone help me please??? I'm new in JBoss.
I have:
I'm using the following persistence.xml:
<?xml version="1.0" encoding="UTF-8"?>
<entity-manager>
MSAccessTestDS
<jta-data-source>java:/TestDB</jta-data-source>
</entity-manager>
I think this is not enough, or???
Thanks a lot
Karl