3 Replies Latest reply on Nov 22, 2004 9:54 AM by cparsons

    Editing HTML menus??

    cparsons

      Pretty basic question, but how does one maintain the HTML menu?

      I have gone into the JBoss web-console and opened the JMX MBean View for nukes.blocks:name=menu as suggested but can't see any reference to the XML mentioned in the docs?

      There are lots of attributes that look as if they affect the menu block itself not the components within it - or am I missing something obvious?? (probably!)

      A pointer would be appreciated (I have JBoss 3.2.3 and Nukes 1.1.0 RC3)

      Cheers

      Chris

        • 1. Exercise 6.1 with Ingres database
          cparsons

          I try to connect Database Ingres version 3.0 (0404) to jboss-4.0.0RC1. Therefore I use an example from the book 'Enterprise JavaBeans 4th Edition' I try to start Exercise 6.1 with my own made Ingress data source:

          ingres-ds.xml:

          <?xml version="1.0" encoding="UTF-8"?>
          
          <datasources>
           <local-tx-datasource>
           <jndi-name>IngresDS</jndi-name>
           <connection-url>jdbc:edbc://gea:21072/gea::titan</connection-url>
           <driver-class>ca.edbc.jdbc.EdbcDriver</driver-class>
           <user-name>USER_NAME</user-name>
           <password>USER_PASSWORD</password>
           <min-pool-size>1</min-pool-size>
           <max-pool-size>4</max-pool-size>
           <idle-timeout-minutes>0</idle-timeout-minutes>
           <track-statements>true</track-statements>
           </local-tx-datasource>
          </datasources>
          


          Within jbosscmp-jdbc.xml I specify:

          <?xml version="1.0" encoding="UTF-8"?>
          
          <!DOCTYPE jbosscmp-jdbc PUBLIC
           "-//JBoss//DTD JBOSSCMP-JDBC 3.0//EN"
           "http://www.jboss.org/j2ee/dtd/jbosscmp-jdbc_3_0.dtd">
          
          <jbosscmp-jdbc>
          
           <enterprise-beans>
           <entity>
           <ejb-name>CustomerEJB</ejb-name>
           <datasource>IngresDS</datasource>
           <create-table>true</create-table>
           <remove-table>true</remove-table>
           <table-name>Customer</table-name>
           <cmp-field>
           <field-name>id</field-name>
           <column-name>ID</column-name>
           </cmp-field>
           <cmp-field>
           <field-name>lastName</field-name>
           <column-name>LAST_NAME</column-name>
           </cmp-field>
           <cmp-field>
           <field-name>firstName</field-name>
           <column-name>FIRST_NAME</column-name>
           </cmp-field>
           <cmp-field>
           <field-name>hasGoodCredit</field-name>
           <column-name>HAS_GOOD_CREDIT</column-name>
           </cmp-field>
           </entity>
           </enterprise-beans>
          
          </jbosscmp-jdbc>
          

          I did not change the other files. When I try to start this configuration (with Ingress up and running):

          11:23:57,359 ERROR [EntityContainer] Starting failed jboss.j2ee:jndiName=CustomerHomeRemote,service=EJB
          java.lang.ArrayIndexOutOfBoundsException: 2
          at org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCFunctionMappingMetaData.getFunctionSql(JDBCFunctionMappingMetaDa
          a.java:137)
          at org.jboss.ejb.plugins.cmp.jdbc.JDBCStartCommand.getEntityCreateTableSQL(JDBCStartCommand.java:715)
          at org.jboss.ejb.plugins.cmp.jdbc.JDBCStartCommand.execute(JDBCStartCommand.java:184)
          at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.startStoreManager(JDBCStoreManager.java:492)
          at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.start(JDBCStoreManager.java:396)
          at org.jboss.ejb.plugins.CMPPersistenceManager.start(CMPPersistenceManager.java:157)
          at org.jboss.ejb.EntityContainer.startService(EntityContainer.java:348)
          at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:271)
          at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:221)
          at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
          at java.lang.reflect.Method.invoke(Method.java:324)
          at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
          at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
          at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
          at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:230)
          at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
          at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:844)
          at $Proxy18.start(Unknown Source)
          at org.jboss.system.ServiceController.start(ServiceController.java:369)
          at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
          at java.lang.reflect.Method.invoke(Method.java:324)
          at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
          at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
          at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
          at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:230)
          at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
          at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
          at $Proxy49.start(Unknown Source)
          at org.jboss.ejb.EjbModule.startService(EjbModule.java:394)
          at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:271)
          at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:221)
          at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
          at java.lang.reflect.Method.invoke(Method.java:324)
          at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
          at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
          at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
          at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:230)
          at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
          at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:844)
          at $Proxy18.start(Unknown Source)
          at org.jboss.system.ServiceController.start(ServiceController.java:369)
          at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
          at java.lang.reflect.Method.invoke(Method.java:324)
          at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
          at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
          at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
          at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:230)
          at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)

          [skipped the other lines]


          It it does not matter if the table Customer exist or not. Do I have to change the datasource? Or, do I have to specify more/other properties?

          Roland Beuker


          • 2. Re: Editing HTML menus??

            Hi Chris,

            The menu items are all listed in the mbean view of menu in the JMX console like you chose, but they are in the "Before" field. When you add an blah you have to make sure to add permissions to the item in the permissions area (either above in the Security field or in the permissions module in Nukes).

            I usually create a menu item and then link it to an html page i've uploaded into Nukes. Every time you create another menu block you automatically get all the modules too. Which ones you decide to set as viewable or not depends on the permissions you set. You really do have to study the permission patterns a bit to get comfortable with Nukes's permissions schema.

            Matt

            • 3. Re: Editing HTML menus??
              cparsons

              Thanks for the response - yes, I had read this, but when I use the jmx-console and the MBean inspector, the 'before' field contains the value '' only, and I cannot see any way of expanding this to make the amendments you suggest - I think this is more a lack of understanding on my part about JBoss and in particular the jmx-console and what it does!

              Regards

              Chris