Request: IDEA EJB 3.0 Configuration Flash Demo

I have read the "The Java EE 5 Tutorial" ( and tried out the examples but without any success.
It seems that IDEA itself is aware of EJB 3.0, annotations, etc.
When I create a new IDEA project, attach JBoss 4.0.5 GA and copy some of the above examples, they do not appear to work in IDEA. To me it looks like a configuration issue (what am I doing wrong?) rather than any IDEA- or Sun- related problems.
As I would like to recommend a IDEA EJB 3.0 Configuration Flash Demo I would very much appreciate to get educated.

Comment actions Permalink

Could you please give some more details about what exactly doesn't work?

Comment actions Permalink

For the project-structure please refer to my first post (cf. Attachment)

My EAR file looks like this:

IDEA does handle the files application.xml and persistence.xml.
At the moment, I do not yet handle web.xml.
I just deal with JSP and jbosscmp-jdbc.xml

When I start JBoss, the following appears on the console

There is no LOG-statement about any EjbModule or any SessionContainer in the console.
When I try to lookup an EJB in the JMX-console I cannot find it.

When I start my client the following exception is raised:

I have added a dependency in the WEB module settings to import the session-bean interface.
When I try to lookup this session-bean, it already fails during the make process (cf. attachment).

Comment actions Permalink

Just to exclude the most obvious: did you install the (non-certified) EJB3 preview version of JBoss 4.0.5?

Comment actions Permalink

I checked the availability and the version of JBoss several times.
But I read over this phrase:

I have downloaded the ZIP package :D
Back to the drawing board!

Comment actions Permalink

Ok... I have installed JBoss and have configured it to EJB3.
Ejb3Deployment startes, but Hibernate blocks:

: file:/D:/Data/bin/jboss-4.0.5.GA/bin/MyEjb.jar
	at org.hibernate.ejb.Ejb3Configuration.scanForClasses(

Why looks Hibernate to D:/Data/bin/jboss-4.0.5.GA/bin/MyEjb.jar?

Comment actions Permalink

Works now! I had to modify the <jar-file> tag to a relative URL.




 SELECT l FROM LineItem l
10:01:20,379 INFO  [EntityBinder] Bind entity order.entity.LineItem on table EJB_ORDER_LINEITEM
10:01:20,738 INFO  [AnnotationBinder] Binding entity from annotated class: order.entity.Order
10:01:20,738 INFO  [QueryBinder] Binding Named query: findAllOrders => SELECT o FROM Order o
10:01:20,738 INFO  [EntityBinder] Bind entity order.entity.Order on table EJB_ORDER_ORDER
10:01:20,801 INFO  [AnnotationBinder] Binding entity from annotated class: order.entity.Part
10:01:20,801 INFO  [EntityBinder] Bind entity order.entity.Part on table EJB_ORDER_PART
10:01:20,801 INFO  [EntityBinder] Adding secondary table to entity order.entity.Part -> EJB_ORDER_PART_DETAIL
10:01:20,832 INFO  [AnnotationBinder] Binding entity from annotated class: order.entity.Vendor
10:01:20,832 INFO  [QueryBinder] Binding Named query: findVendorsByPartialName => SELECT v FROM Vendor v WHERE LOCATE(:name, > 0
10:01:20,832 INFO  [QueryBinder] Binding Named query: findVendorByOrder => SELECT DISTINCT l.vendorPart.vendor FROM Order o, IN(o.lineItems) l WHERE o.orderId = :id ORDER BY
10:01:20,832 INFO  [EntityBinder] Bind entity order.entity.Vendor on table EJB_ORDER_VENDOR
10:01:20,848 INFO  [AnnotationBinder] Binding entity from annotated class: order.entity.VendorPart
10:01:20,848 INFO  [QueryBinder] Binding Named query: findAverageVendorPartPrice => SELECT AVG(vp.price) FROM VendorPart vp
10:01:20,848 INFO  [QueryBinder] Binding Named query: findTotalVendorPartPricePerVendor => SELECT SUM(vp.price) FROM VendorPart vp WHERE vp.vendor.vendorId = :id
10:01:20,848 INFO  [EntityBinder] Bind entity order.entity.VendorPart on table EJB_ORDER_VENDOR_PART
10:01:20,957 INFO  [CollectionBinder] Mapping collection: order.entity.Order.lineItems -> EJB_ORDER_LINEITEM
10:01:20,973 INFO  [CollectionBinder] Mapping collection: -> EJB_ORDER_PART
10:01:20,973 INFO  [CollectionBinder] Mapping collection: order.entity.Vendor.vendorParts -> EJB_ORDER_VENDOR_PART
10:01:21,332 INFO  [ConnectionProviderFactory] Initializing connection provider: org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider
10:01:21,347 INFO  [InjectedDataSourceConnectionProvider] Using provided datasource
10:01:31,717 INFO  [SettingsFactory] RDBMS: Oracle, version: Oracle Database 10g Enterprise Edition Release - 64bit Production
With the Partitioning, Oracle Label Security, OLAP and Data Mining Scoring Engine options
10:01:31,717 INFO  [SettingsFactory] JDBC driver: Oracle JDBC driver, version:
10:01:31,733 INFO  [Dialect] Using dialect: org.hibernate.dialect.Oracle9Dialect
10:01:31,749 INFO  [TransactionFactoryFactory] Transaction strategy: org.hibernate.ejb.transaction.JoinableCMTTransactionFactory
10:01:31,749 INFO  [TransactionManagerLookupFactory] instantiating TransactionManagerLookup: org.hibernate.transaction.JBossTransactionManagerLookup
10:01:31,764 INFO  [TransactionManagerLookupFactory] instantiated TransactionManagerLookup
10:01:31,764 INFO  [SettingsFactory] Automatic flush during beforeCompletion(): disabled
10:01:31,764 INFO  [SettingsFactory] Automatic session close at end of transaction: disabled
10:01:31,764 INFO  [SettingsFactory] JDBC batch size: 15
10:01:31,764 INFO  [SettingsFactory] JDBC batch updates for versioned data: disabled
10:01:31,764 INFO  [SettingsFactory] Scrollable result sets: enabled
10:01:31,764 INFO  [SettingsFactory] JDBC3 getGeneratedKeys(): disabled
10:01:31,764 INFO  [SettingsFactory] Connection release mode: auto
10:01:31,764 INFO  [SettingsFactory] Default batch fetch size: 1
10:01:31,764 INFO  [SettingsFactory] Generate SQL with comments: disabled
10:01:31,764 INFO  [SettingsFactory] Order SQL updates by primary key: disabled
10:01:31,764 INFO  [SettingsFactory] Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
10:01:31,764 INFO  [ASTQueryTranslatorFactory] Using ASTQueryTranslatorFactory
10:01:31,764 INFO  [SettingsFactory] Query language substitutions: {}
10:01:31,764 INFO  [SettingsFactory] JPA-QL strict compliance: enabled
10:01:31,764 INFO  [SettingsFactory] Second-level cache: enabled
10:01:31,764 INFO  [SettingsFactory] Query cache: disabled
10:01:31,764 INFO  [SettingsFactory] Cache provider: org.hibernate.cache.HashtableCacheProvider
10:01:31,764 INFO  [SettingsFactory] Optimize cache for minimal puts: disabled
10:01:31,764 INFO  [SettingsFactory] Structured second-level cache entries: disabled
10:01:31,780 INFO  [SettingsFactory] Statistics: disabled
10:01:31,780 INFO  [SettingsFactory] Deleted entity synthetic identifier rollback: disabled
10:01:31,780 INFO  [SettingsFactory] Default entity-mode: pojo
10:01:31,858 INFO  [SessionFactoryImpl] building session factory
10:01:32,264 INFO  [SessionFactoryObjectFactory] Not binding factory to JNDI, no JNDI name configured
10:01:32,576 INFO  [NamingHelper] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
10:01:33,998 INFO  [JmxKernelAbstraction] installing MBean: jboss.j2ee:ear=MyApplication.ear,jar=MyEjb.jar,name=ConverterBeanEJB,service=EJB3 with dependencies:
10:01:34,779 INFO  [EJBContainer] STARTED EJB: com.sun.tutorial.javaee.ejb.ConverterBean ejbName: ConverterBeanEJB
10:01:34,982 INFO  [JmxKernelAbstraction] installing MBean: jboss.j2ee:ear=MyApplication.ear,jar=MyEjb.jar,name=RequestBean,service=EJB3 with dependencies:
10:01:34,982 INFO  [JmxKernelAbstraction] 	persistence.units:ear=MyApplication.ear,jar=MyEjb.jar,unitName=OrderManagement
10:01:35,247 INFO  [EJBContainer] STARTED EJB: order.request.RequestBean ejbName: RequestBean
10:01:35,325 INFO  [SimpleStatefulCache] Initializing SimpleStatefulCache with maxSize: 100000 timeout: 300 for jboss.j2ee:ear=MyApplication.ear,jar=MyEjb.jar,name=RequestBean,service=EJB3
10:01:35,325 INFO  [EJB3Deployer] Deployed: file:/D:/Data/bin/jboss-4.0.5.GA/server/default/tmp/deploy/tmp16016MyApplication.ear-contents/MyEjb.jar
10:01:35,325 INFO  [TomcatDeployer] deploy, ctxPath=/MyWebApp, warUrl=.../tmp/deploy/tmp16016MyApplication.ear-contents/MyWebApp-exp.war/
10:01:35,778 INFO  [EARDeployer] Started J2EE application: file:/D:/Data/src/JavaTestProject/MyApplication/MyApplication.ear
[2007-01-12 10:01:35,778] Module MyApplication: Module is deployed successfully]]>


Please sign in to leave a comment.