[JBoss Seam] - seam-gen vs. Oracle CHAR(n) and FLOAT
by steve_of_AR
A couple of type-mapping problems with seam-gen/hibernate and an Oracle database:
CHAR(200) in the database becomes a String entity property
FLOAT in the database becomes a double entity property
These cause exceptions during deployment. I can probably fix these in the seam-gen.reveng.xml file's typemapping section, but for the character field I'd really rather that it be a String in my entity instead of a Char[] (if that's what it wants). Is there a bettter way to fix these? Why's hibernate being so picky? I thought jdbc at least would silently do these conversions anyway...
The deployment exception (for the CHAR(200) column):
WARN [ServiceController] Problem starting service persistence.units:ear=Janus.ear,unitName=DevSchema
| javax.persistence.PersistenceException: org.hibernate.HibernateException: Wrong column type: CODE_CD, expected: varchar2(200 char)
| at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:698)
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4044447#4044447
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4044447
19 years, 1 month
[JBoss Seam] - a4j validation tutorial example bug
by beligum
Hi all,
I have some problems with the a4j validation, suggested in the seam tutorial:
| <s:decorate id="countryDecoration" template="edit.xhtml">
| <ui:define name="label">Country:</ui:define>
| <h:inputText value="#{location.country}" required="true">
| <a:support event="onblur" reRender="countryDecoration"/>
| </h:inputText>
| </s:decorate>
|
If I use this piece of code in my app, and I use a <h:commandButton ... type="submit"/> to submit the form, when I press enter while in the inputbox, the application crashes. The problem is probably because the form gets submitted (and redirects), while the ajax validation is still in progress.
This is the second time I encounter this kind of behaviour. My initial workaround was to disable ajax validation, but it's really user friendly and I'd like to use it.
Any solutions?
b.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4044446#4044446
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4044446
19 years, 1 month
[Remoting] - AccessControlException
by colomb
I've got a web start application that is trying to communicate with a server using jboss messaging. When trying to connect though, I'm getting this exception. Any clues on what I could do to alleviate this issue?
| Caused by: java.security.AccessControlException: access denied (java.lang.RuntimePermission createCl
| assLoader)
| at java.security.AccessControlContext.checkPermission(Unknown Source)
| at java.security.AccessController.checkPermission(Unknown Source)
| at java.lang.SecurityManager.checkPermission(Unknown Source)
| at java.lang.SecurityManager.checkCreateClassLoader(Unknown Source)
| at java.lang.ClassLoader.<init>(Unknown Source)
| at org.jboss.remoting.loading.ClassByteClassLoader.<init>(ClassByteClassLoader.java:62)
| at org.jboss.remoting.AbstractInvoker.<init>(AbstractInvoker.java:76)
| at org.jboss.remoting.MicroRemoteClientInvoker.<init>(MicroRemoteClientInvoker.java:52)
| at org.jboss.remoting.RemoteClientInvoker.<init>(RemoteClientInvoker.java:45)
| at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.<init>(MicroSocketClientInvoker.java:217)
| at org.jboss.remoting.transport.socket.SocketClientInvoker.<init>(SocketClientInvoker.java:72)
| at org.jboss.remoting.transport.bisocket.BisocketClientInvoker.<init>(BisocketClientInvoker.java:133)
| at org.jboss.remoting.transport.bisocket.TransportClientFactory.createClientInvoker(TransportClient
| Factory.java:44)
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4044445#4044445
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4044445
19 years, 1 month
[JBoss Messaging] - Can't run example (JBoss Messaging 2.1)
by tamaluna
I'm trying to make a MDB using JBoss 4.0.5.GA and JBoss Messaging 2.1. I started with the JBoss Messaging 1.2 User's Guide. First I installed the 2.1 package as per Chapter 4 "Download Software" and Chapter 5 "JBoss Messaging Non-Clustered Installation".
At first, the validation step (5.3 "Installation Validation) failed due to some weird server behavior, so I reinstalled JBoss (to a different directory, with new JBOSS_HOME environment var). Repeated installation steps (Ch. 5), and everything worked smoothly.
My next step was to create the MDB, as per Chapter 7.4 "Using EJB2.1 Message Driven Beans". I built my MDBExample.class and jar'd it up with my META-INF (with ejb-jar.xml and jboss.xml), and dropped it into my "messaging" server.
The first time I tried this, it failed with the following message:anonymous wrote : org.jboss.deployment.DeploymentException: ejb-jar.xml must either obey the right xml schema or define a valid DOCTYPE!
So I modified it as follows:<?xml version="1.0" encoding="UTF-8"?>
| <ejb-jar version="2.1" xmlns="http://java.sun.com/xml/ns/j2ee"
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
| xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
| http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd">
| <display-name>MDBExampleJAR</display-name>
| <enterprise-beans>
| <message-driven>
| <ejb-name>MDBExample</ejb-name>
| <ejb-class>org.jboss.example.jms.queue.MDBExample</ejb-class>
| <transaction-type>Container</transaction-type>
| </message-driven>
| </enterprise-beans>
| </ejb-jar>
When I ran it, I encountered the following error:anonymous wrote : WARN [org.jboss.ejb.plugins.jms.JMSContainerInvoker] JMS provider failure detected for MDBExample
|
| org.jboss.deployment.DeploymentException: Error during topic setup; - nested throwable: (javax.management.InstanceNotFoundException: jboss.mq:service=DestinationManager is not registered.)
| at org.jboss.deployment.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:53)
| etc...
I scoured the interweb for solutions to this, but no one seems to have the answer. Isn't this supposed to work "right out of the box"? Or is there something else I'm supposed to set up. Please advise.
TIA
Pauly T.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4044444#4044444
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4044444
19 years, 1 month
[JBoss Seam] - Enhancement to s:validateAll ?
by JohnEChesher
I have a case where s:validateAll was not firing hibernate validators for all fields on a page. We found a workaround, but believe we have found code used by the Seam s:validateAll tag that could be enhanced to properly validating all of the fields without the workaround. Here's the scenario:
I have an Institution class, with a @Role specified for name "currentInstitution".
However, institution could be one of many subclasses, for example, I have a school class that extends Institution.
For the page in question, I was updating a school. However, whether a school or any other kind of institution, I use currentInstitution as the backing bean (keeps the code really simple and non-redundant). s:validateAll was firing the validators for the fields that reside in the Institution class, but not those in the School subclass.
We found that the following code hit during the processing of s:validateAll was causing the school-specific fields to not be validated:
private static ClassValidator getValidator(Object instance, String componentName)
| {
| Component component = Component.forName(componentName);
| return ( component==null ? Model.forClass( instance.getClass() ) : component ).getValidator();
| }
The code first looks to see if currentInstitution is a defined Seam component. It is, by virtue of the @Role annotation, so it calls getValidator() for the Institution class, not the School class.
We resolved this issue by removing the @Role annotation and manually setting currentInstitution into the the Conversation context, as such: Contexts.getConversationContext().set("currentInstitution", currentInstitution);
Now, since the code in question does not recognize currentInstitution as a Seam component, it uses the Model for the School class, which returns the desired validators.
Long-winded way of getting here, but our question is if the s, instead of looking to see if the s:validateAll code can be made more sophisticated, such that it properly handles validators on the subclass? Is it necessary to look for the Seam component, or can the code just always use the model of the class of which the backing bean is an instance?
If the Seam developers agree with this proposed change, I'll add to the JIRA.
Thanks!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4044440#4044440
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4044440
19 years, 1 month