0 Replies Latest reply on Oct 24, 2008 6:20 PM by deanhiller2000

    NameNotFound: tomcat to JBoss migration

    deanhiller2000

      I am migrating tomcat to JBoss.  Ideally I would like to deploy an EJB3 jar with it's META-INF/persistence.xml file.  Then, I would like to deploy TWO war files that use that ORM layer.


      1. Is this possible?
      2. Are there instructions for this setup anywhere? (maybe 
      I will write one up if I can figure it out)



      I have been slowly making progress working through Exception after Exception and fixing it for JBoss.  Then I ran into this one which has me stumped....


      org.jboss.seam.InstantiationException: Could not instantiate Seam component: startup
              at org.jboss.seam.Component.newInstance(Component.java:1986)^M
              at org.jboss.seam.contexts.Contexts.startup(Contexts.java:304)^M
      .....
      Caused by: javax.naming.NameNotFoundException: webrates not bound^M
              at org.jnp.server.NamingServer.getBinding(NamingServer.java:564)
              at org.jnp.server.NamingServer.getBinding(NamingServer.java:572)
      



      I do see login being bound in the logs like so


      2008-10-24 10:00:43,218 INFO  [org.jboss.seam.Component] (main) Component: login, scope: STATELESS, type: STATELESS_SESS
      ION_BEAN, class: net.voicelog.agent.designer.LoginAction, JNDI: webrates/LoginAction/local^M



      Here is my components.xml from webrates.war/WEB-INF/components.xml



      <?xml version="1.0" encoding="UTF-8"?>
      <components xmlns="http://jboss.com/products/seam/components"
                  xmlns:core="http://jboss.com/products/seam/core"
                  xmlns:persistence="http://jboss.com/products/seam/persistence"
                  xmlns:transaction="http://jboss.com/products/seam/transaction"
                  xmlns:security="http://jboss.com/products/seam/security"
                  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                  xmlns:mail="http://jboss.com/products/seam/mail"
                  xsi:schemaLocation=
                      "http://jboss.com/products/seam/core http://jboss.com/products/seam/core-2.1.xsd 
                       http://jboss.com/products/seam/persistence http://jboss.com/products/seam/persistence-2.1.xsd 
                       http://jboss.com/products/seam/transaction http://jboss.com/products/seam/transaction-2.1.xsd 
                       http://jboss.com/products/seam/security http://jboss.com/products/seam/security-2.1.xsd
                       http://jboss.com/products/seam/mail http://jboss.com/products/seam/mail-2.1.xsd
                       http://jboss.com/products/seam/components http://jboss.com/products/seam/components-2.1.xsd">
      
           <core:init jndi-pattern="webrates/#{ejbName}/local" debug="true"/>
          <core:manager conversation-timeout="900000" 
                        concurrent-request-timeout="4000"
                        conversation-id-parameter="cid"/>
      
          <transaction:ejb-transaction/>
          <persistence:managed-persistence-context name="mgr"
                persistence-unit-jndi-name="java:/oracleSource" />
                
          <security:identity authenticate-method="#{login.authenticate}"/>  
          
          <event type="org.jboss.seam.security.notLoggedIn">
                <action execute="#{redirect.captureCurrentView}"/>
           </event>
           <event type="org.jboss.seam.security.postAuthenticate">
                <action execute="#{redirect.returnToCapturedView}"/>
           </event>
      </components>
      
      



      Anyone know how to get a war file working in JBoss?  Right now, I am just putting my EJB3 jar in war/WEB-INF/lib and just trying to get a war file to work.


      oh, and if you ask why not ear......There are two reasons.  The first is I hate all the descriptors that are needed.  The second is buildtemplate project on sourceforge has ONE directory structure for wars, jars, and osgi bundles.  If I do an ear, I have to modify the build.xml file which makes it harder to upgrade buildtemplate later.  It is quite nice as the directory structure for my war and my EJB3 jar are the same unlike most projects out there.  BuildTemplate


      Extreme Software