[JBoss Seam] - Seam CRUD: Search results columns blank only Select, need he
by KimLord
I have a website created using seam generate-entities and am having a problem with blank search results when all the columns in the associated database table do not contain data. The search results list only displays the Select link. If all table fields contain data then the proper display is rendered. Not all the table fields are required so blanks are acceptable. The following is the code I am using:
SubHndbkTextView.javapackage com.sonalysts.acintinterface;
| // Generated Aug 30, 2007 1:25:53 PM by Hibernate Tools 3.2.0.b9
|
| import javax.persistence.AttributeOverride;
| import javax.persistence.AttributeOverrides;
| import javax.persistence.Column;
| import javax.persistence.EmbeddedId;
| import javax.persistence.Entity;
| import javax.persistence.Table;
| import org.hibernate.validator.NotNull;
|
| /**
| * SubHndbkTextView generated by hbm2java
| */
| @Entity
| @Table(name = "SUB_HNDBK_TEXT_VIEW")
| public class SubHndbkTextView implements java.io.Serializable {
|
| private SubHndbkTextViewId id;
|
| public SubHndbkTextView() {
| }
|
| public SubHndbkTextView(SubHndbkTextViewId id) {
| this.id = id;
| }
|
| @EmbeddedId
| @AttributeOverrides({
| @AttributeOverride(name = "platformId", column = @Column(name = "PLATFORM_ID", nullable = false, precision = 38, scale = 0)),
| @AttributeOverride(name = "typeText", column = @Column(name = "TYPE_TEXT", length = 25)),
| @AttributeOverride(name = "textRmks", column = @Column(name = "TEXT_RMKS", length = 2000)),
| @AttributeOverride(name = "metadataId", column = @Column(name = "METADATA_ID", nullable = false, precision = 38, scale = 0))})
| @NotNull
| public SubHndbkTextViewId getId() {
| return this.id;
| }
|
| public void setId(SubHndbkTextViewId id) {
| this.id = id;
| }
|
| }
|
SubHndbkTextViewHome.java:package com.sonalysts.acintinterface;
|
| import java.math.BigDecimal;
| import org.jboss.seam.annotations.Name;
| import org.jboss.seam.framework.EntityHome;
|
| @Name("subHndbkTextViewHome")
| public class SubHndbkTextViewHome extends EntityHome<SubHndbkTextView> {
|
| public void setSubHndbkTextViewId(SubHndbkTextViewId id) {
| setId(id);
| }
|
| public SubHndbkTextViewId getSubHndbkTextViewId() {
| return (SubHndbkTextViewId) getId();
| }
|
| public SubHndbkTextViewHome() {
| setSubHndbkTextViewId(new SubHndbkTextViewId());
| }
|
| @Override
| public boolean isIdDefined() {
| if (getSubHndbkTextViewId().getPlatformId() == null)
| return false;
| if (getSubHndbkTextViewId().getTypeText() == null)
| return false;
| if (getSubHndbkTextViewId().getTextRmks() == null)
| return false;
| if (getSubHndbkTextViewId().getMetadataId() == null)
| return false;
| return true;
| }
|
| @Override
| protected SubHndbkTextView createInstance() {
| SubHndbkTextView subHndbkTextView = new SubHndbkTextView();
| subHndbkTextView.setId(new SubHndbkTextViewId());
| return subHndbkTextView;
| }
|
| public void wire() {
| }
|
| public boolean isWired() {
| return true;
| }
|
| public SubHndbkTextView getDefinedInstance() {
| return isIdDefined() ? getInstance() : null;
| }
|
| }
|
SubHndbkTextViewId.java:package com.sonalysts.acintinterface;
| // Generated Aug 30, 2007 1:25:53 PM by Hibernate Tools 3.2.0.b9
|
| import java.math.BigDecimal;
| import javax.persistence.Column;
| import javax.persistence.Embeddable;
| import org.hibernate.validator.Length;
| import org.hibernate.validator.NotNull;
|
| /**
| * SubHndbkTextViewId generated by hbm2java
| */
| @Embeddable
| public class SubHndbkTextViewId implements java.io.Serializable {
|
| private BigDecimal platformId;
| private String typeText;
| private String textRmks;
| private BigDecimal metadataId;
|
| public SubHndbkTextViewId() {
| }
|
| public SubHndbkTextViewId(BigDecimal platformId, BigDecimal metadataId) {
| this.platformId = platformId;
| this.metadataId = metadataId;
| }
| public SubHndbkTextViewId(BigDecimal platformId, String typeText,
| String textRmks, BigDecimal metadataId) {
| this.platformId = platformId;
| this.typeText = typeText;
| this.textRmks = textRmks;
| this.metadataId = metadataId;
| }
|
| @Column(name = "PLATFORM_ID", nullable = false, precision = 38, scale = 0)
| @NotNull
| public BigDecimal getPlatformId() {
| return this.platformId;
| }
|
| public void setPlatformId(BigDecimal platformId) {
| this.platformId = platformId;
| }
|
| @Column(name = "TYPE_TEXT", length = 25)
| @Length(max = 25)
| public String getTypeText() {
| return this.typeText;
| }
|
| public void setTypeText(String typeText) {
| this.typeText = typeText;
| }
|
| @Column(name = "TEXT_RMKS", length = 2000)
| @Length(max = 2000)
| public String getTextRmks() {
| return this.textRmks;
| }
|
| public void setTextRmks(String textRmks) {
| this.textRmks = textRmks;
| }
|
| @Column(name = "METADATA_ID", nullable = false, precision = 38, scale = 0)
| @NotNull
| public BigDecimal getMetadataId() {
| return this.metadataId;
| }
|
| public void setMetadataId(BigDecimal metadataId) {
| this.metadataId = metadataId;
| }
|
| public boolean equals(Object other) {
| if ((this == other))
| return true;
| if ((other == null))
| return false;
| if (!(other instanceof SubHndbkTextViewId))
| return false;
| SubHndbkTextViewId castOther = (SubHndbkTextViewId) other;
|
| return ((this.getPlatformId() == castOther.getPlatformId()) || (this
| .getPlatformId() != null
| && castOther.getPlatformId() != null && this.getPlatformId()
| .equals(castOther.getPlatformId())))
| && ((this.getTypeText() == castOther.getTypeText()) || (this
| .getTypeText() != null
| && castOther.getTypeText() != null && this
| .getTypeText().equals(castOther.getTypeText())))
| && ((this.getTextRmks() == castOther.getTextRmks()) || (this
| .getTextRmks() != null
| && castOther.getTextRmks() != null && this
| .getTextRmks().equals(castOther.getTextRmks())))
| && ((this.getMetadataId() == castOther.getMetadataId()) || (this
| .getMetadataId() != null
| && castOther.getMetadataId() != null && this
| .getMetadataId().equals(castOther.getMetadataId())));
| }
|
| public int hashCode() {
| int result = 17;
|
| result = 37
| * result
| + (getPlatformId() == null ? 0 : this.getPlatformId()
| .hashCode());
| result = 37 * result
| + (getTypeText() == null ? 0 : this.getTypeText().hashCode());
| result = 37 * result
| + (getTextRmks() == null ? 0 : this.getTextRmks().hashCode());
| result = 37
| * result
| + (getMetadataId() == null ? 0 : this.getMetadataId()
| .hashCode());
| return result;
| }
|
| }
SubHndbkTextViewList.java:package com.sonalysts.acintinterface;
|
| import org.jboss.seam.annotations.Name;
| import org.jboss.seam.framework.EntityQuery;
| import java.util.List;
| import java.util.Arrays;
|
| @Name("subHndbkTextViewList")
| public class SubHndbkTextViewList extends EntityQuery {
|
| private static final String[] RESTRICTIONS = {
| "lower(subHndbkTextView.id.typeText) like concat(lower(#{subHndbkTextViewList.subHndbkTextView.id.typeText}),'%')",
| "lower(subHndbkTextView.id.textRmks) like concat(lower(#{subHndbkTextViewList.subHndbkTextView.id.textRmks}),'%')",};
|
| private SubHndbkTextView subHndbkTextView;
|
| public SubHndbkTextViewList() {
| subHndbkTextView = new SubHndbkTextView();
| subHndbkTextView.setId(new SubHndbkTextViewId());
| }
|
| @Override
| public String getEjbql() {
| return "select subHndbkTextView from SubHndbkTextView subHndbkTextView";
| }
|
| @Override
| public Integer getMaxResults() {
| return 25;
| }
|
| public SubHndbkTextView getSubHndbkTextView() {
| return subHndbkTextView;
| }
|
| @Override
| public List<String> getRestrictions() {
| return Arrays.asList(RESTRICTIONS);
| }
|
| }
|
Thanks for your help,
Kim
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4082731#4082731
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4082731
18 years, 7 months
[Tomcat, HTTPD, Servlets & JSP] - Apache HTTPD + mod_jk +ssl+Jboss
by igain
Hi,
I have been trying to configure with apache and jboss server with mod_jk and SSL in a clustered environment.
Apache is being used as loadbalancer on top of my jboss app server nodes
I have doubt here
1) I have a seprate web server machine and a 2 seprate app server machine.
I am not sure where should i install self signed SSL certificate.
At Apache web server or inside tomcat container using server.keystore file?
First I configured self signed SSL certificate in embeded tomcat in jboss, and tried to access the application.
It works when my apache httpd and jboss is on same machine but it doesn't if i have apache httpd and jboss on 2 different machine.
mod_jk doesn't forward the request to https port if my jboss app server is on different machine.
Is there any specific configuration that i need to do in apache httpd to forward my request to https port on jboss ?
Ideally certificate should be installed at a single location which is at apache web server, this way if add more nodes of jboss i need not to configure them atleast for SSL.
So I tried to install SSL certificate on apache web server using mod_ssl and i was able to configure self signed certificate.
This combination works fine and SSL request being forwarded to jboss correctly on remote jboss machine. but when apache forward the request it forward to http:// URL not https:// url on jboss.
Which i don't know is correct or not.
Moreover the moment when i configure loadbalancer using mod_jk along with mod_ssl apache gives error page 500 when i try access the application.
Any help would greatly appreciated ?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4082728#4082728
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4082728
18 years, 7 months
[Management, JMX/JBoss] - !jmx.loading:UCL is not registered
by mining99
I don't know if it is the right group to post my question. I run a default jboss server4.0.3 and I got the error as below. Anyone has any idea about it? Thanks a lot!
ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].
[localhost].[/jmx-console].[HtmlAdaptor]] Servlet.service() for servlet HtmlAdaptor threw exception
javax.management.InstanceNotFoundException: jmx.loading:UCL=4f682a53 is not registered.
at org.jboss.mx.server.registry.BasicMBeanRegistry.get(BasicMBeanRegistry.
java:508)
at org.jboss.mx.server.MBeanServerImpl.getMBeanInfo(MBeanServerImpl.java:6
51)
at org.jboss.jmx.adaptor.control.Server.getMBeanData(Server.java:83)
at org.jboss.jmx.adaptor.html.HtmlAdaptorServlet.inspectMBean(HtmlAdaptorS
ervlet.java:186)
at org.jboss.jmx.adaptor.html.HtmlAdaptorServlet.processRequest(HtmlAdapto
rServlet.java:81)
at org.jboss.jmx.adaptor.html.HtmlAdaptorServlet.doGet(HtmlAdaptorServlet.
java:62)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic
ationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil
terChain.java:173)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilt
er.java:81)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic
ationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil
terChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVal
ve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextVal
ve.java:178)
at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincip
alValve.java:39)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityA
ssociationValve.java:159)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.
java:59)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.jav
a:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.jav
a:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve
.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:
148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:8
56)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process
Connection(Http11Protocol.java:744)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoin
t.java:527)
at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorke
rThread.java:112)
at java.lang.Thread.run(Thread.java:595)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4082727#4082727
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4082727
18 years, 7 months
[JBoss Portal] - Re: HOWTO: Replace portal authentication and authorization
by NM-156
anonymous wrote : PostPosted: Tue Feb 13, 2007 04:56 AM Post subject: Re: HOWTO: Replace portal authentication and authorization
|
| arnieAustin: UserModule and RoleModule are interfaces that you need to implement. UserModuleImpl and RoleModuleImpl are JBP implementation you can use as an example. To plug in your implementation change those class names in core/src/resources/portal-sar/META-INF/jboss-service.xml
|
| dleerob: Did you try using LdapLoginModule from JBossSX and adding all the users in LDAP to a role called "Authenticated"?
|
| JBoss Portal 2.6 will come with some ready implementations of user/roles modules for LDAP
|
I am looking at the jboss-service.xml file under my portal .sar directory (JBP 2.6.1), but I am not getting any matches when I scan for UserModuleImpl or RoleModuleImpl. Which entries have to be changed to plug in custom login/role implementations?
Thanks.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4082723#4082723
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4082723
18 years, 7 months