[JBoss Portal] - Errors when trying to edit JSF admin pages with custom compo
by jl7791
I have successfully added an attribute to the user profile object, but I want to be able to pull a list from a database and display it back to the user so that they may select from it.
| <h:selectOneMenu id="company" value="#{manager.uiUser.attribute.company}" required="#{metadataservice.company.required}">
| <f:selectItems value="#{customerManager.customerNames}" />
| </h:selectOneMenu>
|
Backing bean:
| package com.mycompany.ui;
|
| import java.util.ArrayList;
| import java.util.List;
|
| import javax.faces.model.SelectItem;
|
| import com.mycompany.data.Customer;
| import com.mycompany.service.CustomerManager;
|
| public class CustomerBean {
|
| private List<SelectItem> customerNames;
|
| public void setCustomerNames(List<SelectItem> customerNames) {
| this.customerNames = customerNames;
| }
|
| public List<SelectItem> getCustomerNames() {
| if (customerNames == null) {
| customerNames = initNames();
| }
|
| return customerNames;
| }
|
| private List<SelectItem> initNames() {
| List<SelectItem> custNamesSelectItem = new ArrayList<SelectItem>();
| try {
| List<Customer> customerListFromDb = CustomerManager.getAllCustomers();
| for (Customer c : customerListFromDb) {
| custNamesSelectItem.add(new SelectItem(c.getId(), c.getName()));
| }
| } catch (Exception e) {
| // TODO Auto-generated catch block
| e.printStackTrace();
| }
|
| return custNamesSelectItem;
| }
| }
|
When I access the page, I get the following exception. What causes this, since I am returning a list of SelectItem objects?
| Caused by: java.lang.IllegalArgumentException: Collection referenced by UISelectItems with binding '#{customerManager.customerNames}' and Component-Path : {Component-Path : [Class: javax.faces.component.UIViewRoot,ViewId: /WEB-INF/jsf/admin/editProfile.xhtml][Class: javax.faces.component.html.HtmlForm,Id: _id26jbpns_2fadmin_2fMembers_2fIdentityAdminPortletWindowsnpbj][Class: javax.faces.component.html.HtmlPanelGrid,Id: _id43jbpns_2fadmin_2fMembers_2fIdentityAdminPortletWindowsnpbj][Class: javax.faces.component.html.HtmlSelectOneMenu,Id: company][Class: javax.faces.component.UISelectItems,Id: _id85jbpns_2fadmin_2fMembers_2fIdentityAdminPortletWindowsnpbj]} does not contain Objects of type SelectItem
| at org.apache.myfaces.shared_impl.util.SelectItemsIterator.next(SelectItemsIterator.java:184)
| at org.apache.myfaces.shared_impl.renderkit.RendererUtils.internalGetSelectItemList(RendererUtils.java:451)
| at org.apache.myfaces.shared_impl.renderkit.RendererUtils.getSelectItemList(RendererUtils.java:428)
| at org.apache.myfaces.shared_impl.renderkit.html.HtmlRendererUtils.internalRenderSelect(HtmlRendererUtils.java:294)
| at org.apache.myfaces.shared_impl.renderkit.html.HtmlRendererUtils.renderMenu(HtmlRendererUtils.java:267)
| at org.apache.myfaces.shared_impl.renderkit.html.HtmlMenuRendererBase.encodeEnd(HtmlMenuRendererBase.java:59)
| at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:539)
| at org.apache.myfaces.shared_impl.renderkit.RendererUtils.renderChild(RendererUtils.java:419)
| at org.apache.myfaces.shared_impl.renderkit.html.HtmlGridRendererBase.renderChildren(HtmlGridRendererBase.java:229)
| at org.apache.myfaces.shared_impl.renderkit.html.HtmlGridRendererBase.encodeEnd(HtmlGridRendererBase.java:101)
| at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:539)
| at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:242)
| at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:239)
| at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:239)
| at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:540)
| at org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:41)
| at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:132)
| at org.apache.myfaces.portlet.MyFacesGenericPortlet.facesRender(MyFacesGenericPortlet.java:498)
| ... 236 more
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4139738#4139738
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4139738
16 years, 9 months
[Security & JAAS/JBoss] - Client Certificate using Keytool and OpenSSL
by sunnym_a
Environment:
JBoss-4.2.1.GA
Java 1.5.0_11
OpenSSL 0.9.8g
Is there a way to set Netscape Cert Type property to SSL Client while exporting it to PKCS12 certificate using OpenSSL?
I created a client certificate using the following steps:
a. Generated key pair using Keytool
b. Generated CSR and got it signed by the CA (Verisign)
c. Imported signed certificate and all Root + Intermediate authorities in client keystore for proper certificate chaining
d Exported private key from the keystore
e. Used OpenSSL command to export pkcs12 certificate:
openssl pkcs12 - export -out client.p12 -inkey client.pem -in client.cer - passout pass:*********
This certificate gets installed in both IE and Firefox successfully, however the Netscape Cert Type attribute shows: SSL Server Authentication This causes the following exception on the server side (Sun JVM) when passed through the browser:
javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: Netscape cert type does not permit use for SSL client
When I used a another pkcs12 certificate generated by IIS, that worked fine as its Netscape Cert Type attribute was set correctly to SSL Client.
I came across nscerttype attribute but it seems it's only applicable to openssl commands: ca, req and x509.
TIA
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4139734#4139734
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4139734
16 years, 9 months
[JBoss Tools (users)] - Re: JBoss Tools AS 1.0.0.GA update for JBoss 5 AS ?
by dlmiles
"max.andersen(a)jboss.com" wrote : anonymous wrote : I agree with the issue on the other error being due to not using the rest of the nightly build, I did not download and take apart the nightly build to see why it did not gel. Also why does Content Assist require access to IJBossRuntime (when I've not runtimes setup) and also why does Type Hierachy fail to work at all when IJBossRuntime class is apparently missing! So what!
| |
| You need to explain that to me a bit better ;)
|
| What kind of content assist is failing ?
All kinds, in all contexts I tried, on all artifacts I tried. Simply unzip JBossTools-AS-*-nightly over your GA installation and bootup and try to do some Java work.
I really would not be so concerned about it, I'm pretty sure the issue is not with JBoss Tools but the way in which Eclipse hunts/looks/finds things.
anonymous wrote : anonymous wrote : < rant > Gee it would be really good when you booted eclipse and it detected a change in plugins if it diagnosed problems an tell you which things were new and which things have become disconnected/disabled < / rant >
|
| start eclipse with -debug and you get the disconnected/disabled info in the Error Log view.
|
G-r-e-a-t A-d-v-i-c-e T-h-a-n-k Y-o-u!
< sarcasm >Hey with that content assist problem (if you really wanna knock yourself out on that bug), try attaching GDB to the process and looking a look at the disassemble view.< /sarcasm >
G-rr-eee-aaaa-ttttt-!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4139730#4139730
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4139730
16 years, 9 months
[Beginners Corner] - Running JbossAS
by gregory.carlin
I'm a newbie in Jboss, and I have problems to run it :
I've download Jboss-4.2.2.GA.zip and follow the online installation guide. The problem is nothing appears on http://localhost:8080...
JDK 1.6 is installed. JAVA_HOME and JBOSS_HOME are defined. Java and Jboss are both in /usr. I'm working under Red Hat Linux Entreprise 4.5.
I have some remarks : is that normal that i have to put ANT_HOME if ant isn't on my computer... ? It seems that just Java DK is needed.
Hope u'll be able to help me :)
I let you the log :
[root@pdocu1 bin]# ./run.sh
=========================================================================
JBoss Bootstrap Environment
JBOSS_HOME: /usr/jboss
JAVA: /usr/java/bin/java
JAVA_OPTS: -Dprogram.name=run.sh -server -Xms128m -Xmx512m -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djava.net.preferIPv4Stack=true
CLASSPATH: /usr/jboss/bin/run.jar:/usr/java/lib/tools.jar
=========================================================================
17:39:01,099 INFO [Server] Starting JBoss (MX MicroKernel)...
17:39:01,100 INFO [Server] Release ID: JBoss [Trinity] 4.2.2.GA (build: SVNTag=JBoss_4_2_2_GA date=200710221139)
17:39:01,101 INFO [Server] Home Dir: /usr/jboss
17:39:01,101 INFO [Server] Home URL: file:/usr/jboss/
17:39:01,102 INFO [Server] Patch URL: null
17:39:01,102 INFO [Server] Server Name: default
17:39:01,102 INFO [Server] Server Home Dir: /usr/jboss/server/default
17:39:01,102 INFO [Server] Server Home URL: file:/usr/jboss/server/default/
17:39:01,102 INFO [Server] Server Log Dir: /usr/jboss/server/default/log
17:39:01,102 INFO [Server] Server Temp Dir: /usr/jboss/server/default/tmp
17:39:01,103 INFO [Server] Root Deployment Filename: jboss-service.xml
17:39:01,327 INFO [ServerInfo] Java version: 1.6.0_05,Sun Microsystems Inc.
17:39:01,328 INFO [ServerInfo] Java VM: Java HotSpot(TM) Server VM 10.0-b19,Sun Microsystems Inc.
17:39:01,328 INFO [ServerInfo] OS-System: Linux 2.6.9-55.ELsmp,i386
17:39:01,599 INFO [Server] Core system initialized
17:39:02,910 INFO [WebService] Using RMI server codebase: http://127.0.0.1:8083/
17:39:02,911 INFO [Log4jService$URLWatchTimerTask] Configuring from URL: resource:jboss-log4j.xml
17:39:03,166 INFO [TransactionManagerService] JBossTS Transaction Service (JTA version) - JBoss Inc.
17:39:03,166 INFO [TransactionManagerService] Setting up property manager MBean and JMX layer
17:39:03,267 INFO [TransactionManagerService] Starting recovery manager
17:39:03,321 INFO [TransactionManagerService] Recovery manager started
17:39:03,321 INFO [TransactionManagerService] Binding TransactionManager JNDI Reference
17:39:04,711 INFO [EJB3Deployer] Starting java:comp multiplexer
17:39:04,872 INFO [STDOUT] no object for null
17:39:04,874 INFO [STDOUT] no object for null
17:39:04,892 INFO [STDOUT] no object for null
17:39:04,904 INFO [STDOUT] no object for {urn:jboss:bean-deployer}supplyType
17:39:04,910 INFO [STDOUT] no object for {urn:jboss:bean-deployer}dependsType
17:39:05,960 INFO [NativeServerConfig] JBoss Web Services - Native
17:39:05,961 INFO [NativeServerConfig] jbossws-native-2.0.1.SP2 (build=200710210837)
17:39:06,404 INFO [Embedded] Catalina naming disabled
17:39:06,492 INFO [AprLifecycleListener] The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/java/jre/lib/i386/server:/usr/java/jre/lib/i386:/usr/java/jre/../lib/i386:/usr/java/packages/lib/i386:/lib:/usr/lib
17:39:06,525 INFO [Http11Protocol] Inicializando Coyote HTTP/1.1 en puerto http-127.0.0.1-8080
17:39:06,525 INFO [AjpProtocol] Initializing Coyote AJP/1.3 on ajp-127.0.0.1-8009
17:39:06,525 INFO [Catalina] Initialization processed in 121 ms
17:39:06,525 INFO [StandardService] Arrancando servicio jboss.web
17:39:06,526 INFO [StandardEngine] Starting Servlet Engine: JBossWeb/2.0.1.GA
17:39:06,551 INFO [Catalina] Server startup in 25 ms
17:39:06,618 INFO [TomcatDeployer] deploy, ctxPath=/, warUrl=.../deploy/jboss-web.deployer/ROOT.war/
17:39:06,952 INFO [TomcatDeployer] deploy, ctxPath=/invoker, warUrl=.../deploy/http-invoker.sar/invoker.war/
17:39:07,034 INFO [TomcatDeployer] deploy, ctxPath=/jbossws, warUrl=.../deploy/jbossws.sar/jbossws-context.war/
17:39:07,103 INFO [TomcatDeployer] deploy, ctxPath=/jbossmq-httpil, warUrl=.../deploy/jms/jbossmq-httpil.sar/jbossmq-httpil.war/
17:39:07,482 INFO [TomcatDeployer] deploy, ctxPath=/web-console, warUrl=.../deploy/management/console-mgr.sar/web-console.war/
17:39:07,730 INFO [MailService] Mail Service bound to java:/Mail
17:39:07,806 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jboss-ha-local-jdbc.rar
17:39:07,848 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jboss-ha-xa-jdbc.rar
17:39:07,875 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jboss-local-jdbc.rar
17:39:07,889 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jboss-xa-jdbc.rar
17:39:07,967 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jms/jms-ra.rar
17:39:07,992 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/mail-ra.rar
17:39:08,015 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/quartz-ra.rar
17:39:08,020 INFO [QuartzResourceAdapter] start quartz!!!
17:39:08,054 INFO [SimpleThreadPool] Job execution threads will use class loader of thread: main
17:39:08,067 INFO [QuartzScheduler] Quartz Scheduler v.1.5.2 created.
17:39:08,069 INFO [RAMJobStore] RAMJobStore initialized.
17:39:08,070 INFO [StdSchedulerFactory] Quartz scheduler 'DefaultQuartzScheduler' initialized from default resource file in Quartz package: 'quartz.properties'17:39:08,070 INFO [StdSchedulerFactory] Quartz scheduler version: 1.5.2
17:39:08,070 INFO [QuartzScheduler] Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED started.
17:39:08,369 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=DefaultDS' to JNDI name 'java:DefaultDS'
17:39:08,539 INFO [A] Bound to JNDI name: queue/A
17:39:08,540 INFO [B] Bound to JNDI name: queue/B
17:39:08,541 INFO [C] Bound to JNDI name: queue/C
17:39:08,549 INFO [D] Bound to JNDI name: queue/D
17:39:08,550 INFO [ex] Bound to JNDI name: queue/ex
17:39:08,561 INFO [testTopic] Bound to JNDI name: topic/testTopic
17:39:08,563 INFO [securedTopic] Bound to JNDI name: topic/securedTopic
17:39:08,565 INFO [testDurableTopic] Bound to JNDI name: topic/testDurableTopic17:39:08,566 INFO [testQueue] Bound to JNDI name: queue/testQueue
17:39:08,587 INFO [UILServerILService] JBossMQ UIL service available at : /127.0.0.1:8093
17:39:08,607 INFO [DLQ] Bound to JNDI name: queue/DLQ
17:39:08,679 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=ConnectionFactoryBinding,name=JmsXA' to JNDI name 'java:JmsXA'
17:39:08,694 INFO [TomcatDeployer] deploy, ctxPath=/jmx-console, warUrl=.../deploy/jmx-console.war/
17:39:08,866 INFO [Http11Protocol] Arrancando Coyote HTTP/1.1 en puerto http-127.0.0.1-8080
17:39:08,916 INFO [AjpProtocol] Starting Coyote AJP/1.3 on ajp-127.0.0.1-8009
17:39:08,924 INFO [Server] JBoss (MX MicroKernel) [4.2.2.GA (build: SVNTag=JBoss_4_2_2_GA date=200710221139)] Started in 7s:820ms
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4139726#4139726
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4139726
16 years, 9 months