1) JBoss 4.2.1 as the app server. 2) Development of an n-tier J2EE app using Netbeans 5.5.1 3) The back-end stuff: A Sybase-15 database my company had some dba gurus set up / populate with data.
Ok, that being said. I've managed to create a JSF standalone app that calls simple JDBC to the database just to test connectivity / proof of concept.
I'm now going through an effort to separate out the database logic and create a proper J2EE solution. (all this in EJB3)
The steps I've taken so far in this effort : 1) Netbeans has a very nice tool that allows me to map all the database tables / relationships to their java object counterparts. (Took all the business objects and put them inside their own business object package.)
2) Created a simple set of DAO classes that references a combination of business objects created from item #1.
3) In the setup, told Netbeans that I'm having Hibernate to handle the persistence within JBoss.
4) Created a set of test EJB remote interfaces / beans to talk to the DAOs and implement the business logic.
Here's where I'm starting to get a little lost.
Netbeans created a jboss.xml file within its configuration files. Yet, that file has no content associated with it. (Looking at the literature, Netbeans says if you're going to use JBoss / WebLogic you got to provide this information. However, I'm not sure what goes in this file.)
I'm not bundling the application as a full-fleged EAR file. (Basically, I want to take the EJB portion and hosting this on a separate JBoss 4.2.1 server. Then, writing a set of web applications to talk to that server via a JNDI lookup where it will be housed from a different server. Essentially, I want to take my JSF app and re-factor the JDBC calls to deal with the EJBs directly.)
At this point, I'm not entirely sure whether this is an appropriate question for Netbeans 5.5.1 or JBoss. I havent put anything into JBoss.xml just yet.
When I bundle the .jar file and deploy to a JBoss 4.2.1 server, JBoss complains about not being able to find the persistence unit. So, I'm a little stuck here.
I'll send a stack trace here shortly. This is what I have so far.
Again, appreciate your help.
Thanks, Chad [ December 03, 2007: Message edited by: Chad Foor ]
posted 12 years ago
I had to sanitize this a bit, but here's the start of the error stack trace that I'm getting when I try to deploy the EJB to a jboss-4.2.1 server.
----------------------- 13:24:56, 266 INFO [ConnectionFactoryBindingService] Bound ConnectionManager
'jboss.jca:service=DataSourceBinding, name=MyApp' to JNDI name 'java:MyApp' 13:24:45, 806 INFO [ConnecttionFactoryBindingService] Bound ConnectionManager
'jboss.jca:service=ConnectionFactoryBinding, name=JmsXA' to JNDI name 'java:JmsXA'
... 13:24:58, 318 INFO [PersistenceUnitDeployment] Starting persistence unit
persistence.units:jar=MyAppDataTier.jar, unitName=MyAppDataTierPU 13:24:58, 609 WARN [ServiceController] Problem starting persistence unit
persistence.units:jar=MyAppDataTier.jar, unitName=MyAppDataTierPU javax.naming.NameNotFoundException: MyApp not bound at org.jnp.server.NamingServer.getBinding(NamingServer.java:529) at org.jnp... at org.jboss.ejb3.entity.persistenceunitDeployment.start(PersistenceUnitDeployment.java:216) ... 13:24:59, 650 INFO [JmxKernelAbstraction] creating wrapper delegate for: org.jboss.ejb3.
stateless.StatelessContainer 13:24:59, 650 INFO [JmxKernelAbstraction] installing MBean: jboss.j2ee:jar=MyAppDataTier.jar,
name=ChadEJBBean, service=EJB3 with dependencies: 13:24:59, 650 INFO [JmxkernelAbstraction] -----------------------------------