5 Replies Latest reply on Oct 30, 2009 1:56 PM by pschor

    context-root not working?

    pschor

      Hi, I'm running Jboss AS 4.2.3.GA and cannot make a context-root (myapp) to work, the server works fine but with the war base name (biplatformwar); I get warning messages when I start Jboss, saying that application.xml and jboss-app.xml cannot be deployed, I suspect that may be the reason.

      application.xml:
      <?xml version="1.0" encoding="UTF-8"?>



      <web-uri>biplatformwar.war</web-uri>
      <context-root>myapp</context-root>




      jboss-app.xml:
      <?xml version="1.0" encoding="UTF-8"?>
      <jboss-app>

      xxxtesthar.har

      </jboss-app>

      Jboss console log:

      04:39:07,040 INFO [Server] Starting JBoss (MX MicroKernel)...
      04:39:07,040 INFO [Server] Release ID: JBoss [Trinity] 4.2.3.GA (build: SVNTag=JBoss_4_2_3_GA date=200807181417)
      04:39:07,040 INFO [Server] Home Dir: C:\jboss-4.2.3.GA
      04:39:07,040 INFO [Server] Home URL: file:/C:/jboss-4.2.3.GA/
      04:39:07,040 INFO [Server] Patch URL: null
      04:39:07,040 INFO [Server] Server Name: default
      04:39:07,040 INFO [Server] Server Home Dir: C:\jboss-4.2.3.GA\server\default
      04:39:07,040 INFO [Server] Server Home URL: file:/C:/jboss-4.2.3.GA/server/default/
      04:39:07,040 INFO [Server] Server Log Dir: C:\jboss-4.2.3.GA\server\default\log
      04:39:07,040 INFO [Server] Server Temp Dir: C:\jboss-4.2.3.GA\server\default\tmp
      04:39:07,040 INFO [Server] Root Deployment Filename: jboss-service.xml
      04:39:07,414 INFO [ServerInfo] Java version: 1.6.0_16,Sun Microsystems Inc.
      04:39:07,414 INFO [ServerInfo] Java VM: Java HotSpot(TM) 64-Bit Server VM 14.2-b01,Sun Microsystems Inc.
      04:39:07,414 INFO [ServerInfo] OS-System: Windows Vista 6.0,amd64
      04:39:07,773 INFO [Server] Core system initialized
      04:39:09,630 INFO [WebService] Using RMI server codebase: http://127.0.0.1:8083/
      04:39:09,630 INFO [Log4jService$URLWatchTimerTask] Configuring from URL: resource:jboss-log4j.xml
      04:39:10,067 INFO [TransactionManagerService] JBossTS Transaction Service (JTA version) - JBoss Inc.
      04:39:10,067 INFO [TransactionManagerService] Setting up property manager MBean and JMX layer
      04:39:10,223 INFO [TransactionManagerService] Starting recovery manager
      04:39:10,333 INFO [TransactionManagerService] Recovery manager started
      04:39:10,333 INFO [TransactionManagerService] Binding TransactionManager JNDI Reference
      04:39:12,735 INFO [EJB3Deployer] Starting java:comp multiplexer
      04:39:14,764 INFO [NativeServerConfig] JBoss Web Services - Native
      04:39:14,764 INFO [NativeServerConfig] jbossws-3.0.1-native-2.0.4.GA (build=200803312044)
      04:39:15,639 INFO [Embedded] Catalina naming disabled
      04:39:15,763 INFO [AprLifecycleListener] The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jre6\bin;.;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:/Program Files (x86)/Java/jre6/bin/client;C:/Program Files (x86)/Java/jre6/bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program Files (x86)\Common Files\Roxio Shared\DLLShared\;C:\Program Files (x86)\Common Files\Roxio Shared\10.0\DLLShared\;C:\Program Files\MySQL\MySQL Server 5.1\bin;C:\Program Files\Java\jdk1.6.0_16\bin;C:\Program Files (x86)\Google\Google Apps Sync\
      04:39:15,826 INFO [Http11Protocol] Initializing Coyote HTTP/1.1 on http-127.0.0.1-8080
      04:39:15,841 INFO [AjpProtocol] Initializing Coyote AJP/1.3 on ajp-127.0.0.1-8009
      04:39:15,841 INFO [Catalina] Initialization processed in 201 ms
      04:39:15,841 INFO [StandardService] Starting service jboss.web
      04:39:15,841 INFO [StandardEngine] Starting Servlet Engine: JBossWeb/2.0.1.GA
      04:39:15,888 INFO [Catalina] Server startup in 47 ms
      04:39:15,983 INFO [TomcatDeployer] deploy, ctxPath=/, warUrl=.../deploy/jboss-web.deployer/ROOT.war/
      04:39:16,482 INFO [TomcatDeployer] deploy, ctxPath=/invoker, warUrl=.../deploy/http-invoker.sar/invoker.war/
      04:39:16,591 INFO [TomcatDeployer] deploy, ctxPath=/jbossws, warUrl=.../deploy/jbossws.sar/jbossws-context.war/
      04:39:16,685 INFO [TomcatDeployer] deploy, ctxPath=/jbossmq-httpil, warUrl=.../deploy/jms/jbossmq-httpil.sar/jbossmq-httpil.war/
      04:39:17,527 INFO [TomcatDeployer] deploy, ctxPath=/web-console, warUrl=.../deploy/management/console-mgr.sar/web-console.war/
      04:39:17,934 INFO [MailService] Mail Service bound to java:/Mail
      04:39:18,090 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jboss-ha-local-jdbc.rar
      04:39:18,121 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jboss-ha-xa-jdbc.rar
      04:39:18,152 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jboss-local-jdbc.rar
      04:39:18,183 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jboss-xa-jdbc.rar
      04:39:18,293 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jms/jms-ra.rar
      04:39:18,324 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/mail-ra.rar
      04:39:18,371 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/quartz-ra.rar
      04:39:18,371 INFO [QuartzResourceAdapter] start quartz!!!
      04:39:18,449 INFO [SimpleThreadPool] Job execution threads will use class loader of thread: main
      04:39:18,464 INFO [QuartzScheduler] Quartz Scheduler v.1.5.2 created.
      04:39:18,464 INFO [RAMJobStore] RAMJobStore initialized.
      04:39:18,464 INFO [StdSchedulerFactory] Quartz scheduler 'DefaultQuartzScheduler' initialized from default resource file in Quartz package: 'quartz.properties'
      04:39:18,464 INFO [StdSchedulerFactory] Quartz scheduler version: 1.5.2
      04:39:18,464 INFO [QuartzScheduler] Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED started.
      04:39:18,979 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=DefaultDS' to JNDI name 'java:DefaultDS'
      04:39:19,183 INFO [A] Bound to JNDI name: queue/A
      04:39:19,198 INFO [B] Bound to JNDI name: queue/B
      04:39:19,198 INFO [C] Bound to JNDI name: queue/C
      04:39:19,198 INFO [D] Bound to JNDI name: queue/D
      04:39:19,198 INFO [ex] Bound to JNDI name: queue/ex
      04:39:19,214 INFO [testTopic] Bound to JNDI name: topic/testTopic
      04:39:19,214 INFO [securedTopic] Bound to JNDI name: topic/securedTopic
      04:39:19,214 INFO [testDurableTopic] Bound to JNDI name: topic/testDurableTopic
      04:39:19,214 INFO [testQueue] Bound to JNDI name: queue/testQueue
      04:39:19,261 INFO [UILServerILService] JBossMQ UIL service available at : /127.0.0.1:8093
      04:39:19,276 INFO [DLQ] Bound to JNDI name: queue/DLQ
      04:39:19,448 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=ConnectionFactoryBinding,name=JmsXA' to JNDI name 'java:JmsXA'
      04:39:19,542 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=MySqlDB' to JNDI name 'java:MySqlDB'
      04:39:19,604 INFO [Environment] Hibernate 3.2.4.sp1
      04:39:19,604 INFO [Environment] hibernate.properties not found
      04:39:19,604 INFO [Environment] Bytecode provider name : javassist
      04:39:19,604 INFO [Environment] using JDK 1.4 java.sql.Timestamp handling
      04:39:19,666 INFO [Configuration] Reading mappings from file: C:\xxx\apps\biplatform\biplatformear.ear\biplatformhar.har\AdminDataDownload.hbm.xml
      04:39:19,822 INFO [HbmBinder] Mapping class: industry.AdminDataDownload -> admin_data_download
      04:39:19,838 INFO [Configuration] Reading mappings from file: C:\xxx\apps\biplatform\biplatformear.ear\biplatformhar.har\FdicChangeCode.hbm.xml
      04:39:19,869 INFO [HbmBinder] Mapping class: industry.FdicChangeCode -> vbk_ind_fdicid_change_codes
      04:39:19,885 INFO [Configuration] Reading mappings from file: C:\xxx\apps\biplatform\biplatformear.ear\biplatformhar.har\FedDistrict.hbm.xml
      04:39:19,916 INFO [HbmBinder] Mapping class: industry.FedDistrict -> vbk_ind_fed_districts
      04:39:19,916 INFO [Configuration] Reading mappings from file: C:\xxx\apps\biplatform\biplatformear.ear\biplatformhar.har\FedTreasuryRates.hbm.xml
      04:39:19,963 INFO [HbmBinder] Mapping class: industry.FedTreasuryRate -> vbk_ind_fed_treasury_rates
      04:39:20,035 INFO [NamingHelper] JNDI InitialContext properties:{}
      04:39:20,037 INFO [DatasourceConnectionProvider] Using datasource: java:/MySqlDB
      04:39:20,338 INFO [SettingsFactory] RDBMS: MySQL, version: 5.1.38-community
      04:39:20,338 INFO [SettingsFactory] JDBC driver: MySQL-AB JDBC Driver, version: mysql-connector-java-5.1.7 ( Revision: ${svn.Revision} )
      04:39:20,353 INFO [Dialect] Using dialect: org.hibernate.dialect.MySQLDialect
      04:39:20,353 INFO [TransactionFactoryFactory] Transaction strategy: org.hibernate.transaction.JTATransactionFactory
      04:39:20,353 INFO [NamingHelper] JNDI InitialContext properties:{}
      04:39:20,353 INFO [TransactionManagerLookupFactory] instantiating TransactionManagerLookup: org.hibernate.transaction.JBossTransactionManagerLookup
      04:39:20,416 INFO [TransactionManagerLookupFactory] instantiated TransactionManagerLookup
      04:39:20,416 INFO [TransactionManagerLookupFactory] instantiating TransactionManagerLookup: org.hibernate.transaction.JBossTransactionManagerLookup
      04:39:20,416 INFO [TransactionManagerLookupFactory] instantiated TransactionManagerLookup
      04:39:20,416 INFO [SettingsFactory] Automatic flush during beforeCompletion(): enabled
      04:39:20,416 INFO [SettingsFactory] Automatic session close at end of transaction: enabled
      04:39:20,416 INFO [SettingsFactory] JDBC batch size: 15
      04:39:20,416 INFO [SettingsFactory] JDBC batch updates for versioned data: disabled
      04:39:20,416 INFO [SettingsFactory] Scrollable result sets: enabled
      04:39:20,416 INFO [SettingsFactory] JDBC3 getGeneratedKeys(): enabled
      04:39:20,416 INFO [SettingsFactory] Connection release mode: after_statement
      04:39:20,416 INFO [SettingsFactory] Maximum outer join fetch depth: 2
      04:39:20,416 INFO [SettingsFactory] Default batch fetch size: 1
      04:39:20,416 INFO [SettingsFactory] Generate SQL with comments: disabled
      04:39:20,416 INFO [SettingsFactory] Order SQL updates by primary key: disabled
      04:39:20,416 INFO [SettingsFactory] Order SQL inserts for batching: disabled
      04:39:20,416 INFO [SettingsFactory] Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
      04:39:20,416 INFO [ASTQueryTranslatorFactory] Using ASTQueryTranslatorFactory
      04:39:20,416 INFO [SettingsFactory] Query language substitutions: {}
      04:39:20,416 INFO [SettingsFactory] JPA-QL strict compliance: disabled
      04:39:20,416 INFO [SettingsFactory] Second-level cache: enabled
      04:39:20,416 INFO [SettingsFactory] Query cache: disabled
      04:39:20,416 INFO [SettingsFactory] Cache provider: org.hibernate.cache.HashtableCacheProvider
      04:39:20,416 INFO [SettingsFactory] Optimize cache for minimal puts: disabled
      04:39:20,416 INFO [SettingsFactory] Structured second-level cache entries: disabled
      04:39:20,431 INFO [SettingsFactory] Statistics: disabled
      04:39:20,431 INFO [SettingsFactory] Deleted entity synthetic identifier rollback: disabled
      04:39:20,431 INFO [SettingsFactory] Default entity-mode: pojo
      04:39:20,431 INFO [SettingsFactory] Named query checking : enabled
      04:39:20,463 INFO [SessionFactoryImpl] building session factory
      04:39:20,790 INFO [SessionFactoryObjectFactory] Not binding factory to JNDI, no JNDI name configured
      04:39:20,790 INFO [NamingHelper] JNDI InitialContext properties:{}
      04:39:20,790 INFO [Hibernate] SessionFactory successfully built and bound into JNDI [java:/hibernate/HibernateSessionFactory]
      04:39:20,821 INFO [TomcatDeployer] deploy, ctxPath=/jmx-console, warUrl=.../deploy/jmx-console.war/
      04:39:21,024 INFO [TomcatDeployer] deploy, ctxPath=/biplatformwar, warUrl=file:/C:/xxx/apps/biplatform/biplatformear.ear/biplatformwar.war/
      04:39:21,072 WARN [config] Unable to process deployment descriptor for context '/biplatformwar'
      04:39:22,090 ERROR [URLDeploymentScanner] Incomplete Deployment listing:

      --- Packages waiting for a deployer ---
      org.jboss.deployment.DeploymentInfo@a59454b { url=file:/C:/xxx/apps/biplatform/biplatformear.ear/META-INF/application.xml }
      deployer: null
      status: null
      state: INIT_WAITING_DEPLOYER
      watch: file:/C:/xxx/apps/biplatform/biplatformear.ear/META-INF/application.xml
      altDD: null
      lastDeployed: 1256891962074
      lastModified: 1256891962074
      mbeans:

      org.jboss.deployment.DeploymentInfo@ae166666 { url=file:/C:/xxx/apps/biplatform/biplatformear.ear/META-INF/jboss-app.xml }
      deployer: null
      status: null
      state: INIT_WAITING_DEPLOYER
      watch: file:/C:/xxx/apps/biplatform/biplatformear.ear/META-INF/jboss-app.xml
      altDD: null
      lastDeployed: 1256891962074
      lastModified: 1256891962074
      mbeans:

      --- Incompletely deployed packages ---
      org.jboss.deployment.DeploymentInfo@a59454b { url=file:/C:/xxx/apps/biplatform/biplatformear.ear/META-INF/application.xml }
      deployer: null
      status: null
      state: INIT_WAITING_DEPLOYER
      watch: file:/C:/xxx/apps/biplatform/biplatformear.ear/META-INF/application.xml
      altDD: null
      lastDeployed: 1256891962074
      lastModified: 1256891962074
      mbeans:

      org.jboss.deployment.DeploymentInfo@ae166666 { url=file:/C:/xxx/apps/biplatform/biplatformear.ear/META-INF/jboss-app.xml }
      deployer: null
      status: null
      state: INIT_WAITING_DEPLOYER
      watch: file:/C:/xxx/apps/biplatform/biplatformear.ear/META-INF/jboss-app.xml
      altDD: null
      lastDeployed: 1256891962074
      lastModified: 1256891962074
      mbeans:


      04:39:22,215 INFO [Http11Protocol] Starting Coyote HTTP/1.1 on http-127.0.0.1-8080
      04:39:22,246 INFO [AjpProtocol] Starting Coyote AJP/1.3 on ajp-127.0.0.1-8009
      04:39:22,246 INFO [Server] JBoss (MX MicroKernel) [4.2.3.GA (build: SVNTag=JBoss_4_2_3_GA date=200807181417)] Started in 15s:206ms

        • 1. Re: context-root not working?
          pschor

          the application.xml and jboss-app.xml were pasted incorrectly, these are the correct contents:

          <?xml version="1.0" encoding="UTF-8"?>
          <application>
           <module>
           <web>
           <web-uri>biplatformwar.war</web-uri>
           <context-root>myapp</context-root>
           </web>
           </module>
          </application>
          
          <?xml version="1.0" encoding="UTF-8"?>
          <jboss-app>
           <module>
           <har>xxxtesthar.har</har>
           </module>
          </jboss-app>


          • 2. Re: context-root not working?
            jaikiran

             

            C:/xxx/apps/biplatform/


            Are you deploying this app outside the JBoss directory structure? If yes, please post the configuration you have used to do this.


            • 3. Re: context-root not working?
              pschor



              This is the configuration in jboss-service.xml:

              <attribute name="URLs">
               deploy/,file:/C:/xxx/apps/biplatform/biplatformear.ear/
              </attribute>
              


              • 4. Re: context-root not working?
                peterj

                Try changing it to:

                <attribute name="URLs">
                 deploy/,file:/C:/xxx/apps/biplatform/biplatformear.ear
                </attribute>


                Notice that I removed the trailing '/'. With the trailing '/',
                JBoss AS assumes that you are specifying a directory that must be scanned for apps to deploy. Without it, JBoss AS assumes that the path is to the app itself.

                Oh wait, I think that without the trailing slash, the path must reference an archive file, not a directory. So try this instead:

                <attribute name="URLs">
                 deploy/,file:/C:/xxx/apps/biplatform/
                </attribute>


                Now it will scan the C:/xxx/apps/biplatform/ directory and deploy the biplatformear.ear app.

                • 5. Re: context-root not working?
                  pschor

                  Thanks, it worked perfectly with deploy/,file:/C:/xxx/apps/biplatform/