[JBoss Seam] - Re: Can't find Stateful Bean...
by pdpantages
I think I have finally sorted this out.
This seems to be due to my use of the following in my editor's "apply" method:
| ...
| Conversation.instance().end();
| Conversation.instance().pop();
|
| // We are in the parent conversation now ...
| serviceMgmt.refresh();
|
| serviceEndPointMgmt.refresh(); // This is the bug
|
| ...
|
I used this instead of the normal @End as I wanted to update the
serviceMgmt in the parent's conversation to reflect the edit.
Since componet serviceMgmt is "read-only" in the nested conversation, I have to get back to the parent to update it.
The reference to serviceEndPointMgmt must have caused a re-instantiation of this
component, in the parent conversation, since I am using @In(create=true)
This reference is just a bug; it was completely unnecessary.
This is how the parent conversation obtained a reference to the ID of a cached serviceEndPointMgmt object. It also explains what I saw in the logs.
Since the parent's conversation's beans don't touch serviceEndPointMgmt, it timed out of the cache.
The next edit session (a new nested conversation) inherited the reference from the parent, tried to get the bean from the cache and caused the stateful bean error.
Once I removed the reference, my application behaved properly.
It looks like Peter was right about the root cause of this....
Can anyone confirm/deny this explanation?
Hopefully this will help someone, somewhere...
PdP
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4070828#4070828
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4070828
18Â years, 8Â months
[JBoss jBPM] - Re: Bypass Form Validation For Certain Operations?
by khamburg
I also don't see the point of requiring a value but allowing it to be an empty string. The point of requiring a value is so that you obtain the required user input. In addition, sometimes you need to verify that the non-empty value meets additional validation requirements (such as being a valid date).
As you pointed out, specifying the validation in the PDL is preferable to performing validation in the UI. I would recommend that the jpdl schema be enhanced to support more validation.
As a work-around, I have written an action handler that validates based on "rules" read from the tag content. It is not very sophisticated, but it supports my current needs. I can add the action handler to a node-leave event which enforces validation on all transitions, or I can add the handler to just a single transition event so that other transitions do not require validated input. When a validation error occurs, an exception is thrown which results in a message being displayed to the user in the jbpm console.
Here's an example of it's use:
| <task-node name="GetData">
| <task name="GetDataTask">
| <transition to="NextTask" name="Accept Data">
| <action class="mypackage.AssertRequiredVariables">
| <assertions>
| <entry><key>MyDate</key><value>date</value></entry>
| <entry><key>MyString</key><value>string not-empty</value></entry>
| </assertions>
| </action>
| </transition>
| <transition to="AlternateStep" name="Date Not Required"></transition>
| </task-node>
|
In this case, the data is only required on the Accept Data transition. This allows canceling or going to a step that doesn't require the input without forcing the user to enter data that passes the normal validation.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4070823#4070823
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4070823
18Â years, 8Â months
[Clustering/JBoss] - web clustering - fail over, http state replication
by konkimalla
I created a cluster of two windows nodes and they both are visible. With the help of a stand alone java application I successfully tested loadbalancing and fail over capabilities. However, I am having problems while testing the same through a web client. I have downloaded apache(2.2.4) and mod_jk (1.2.20) and configured as per the document.
I am using jboss 4.2.1 version and did the following things:
1)I ran both machines using
run -c all -b <respective ip address>
2)I pointed http://<nodeip1>:8080 and got the result - servlet calls statefull ejb.
3) I had shutdown node having ip1 and tried to invoke the opeation and got the page not found. I thought I will get the information from node2.
I might be dumb in testing, but can some body please let me know as what I am missing and the procedure to test the web client.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4070818#4070818
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4070818
18Â years, 8Â months
[JBossWS] - Deploying WebServices JBoss 4.0.5 + JDK 1.5
by goodvin
I have been trying to make a simple web service work for a while with different errors. I follow examples I found on the web. Can someone tell me what am I doing wrong?
I use JBoss 4.0.5 with JDK 1.5 as it's the latest officially supported version by JBoss.
My test client returns:
[Fatal Error] :-1:-1: Premature end of file.
Receiving: null
And the error I get in the JBoss console executing my test web service is:
ERROR -> [[HelloBean]] Servlet.service() for servlet HelloBean threw exception
java.lang.AbstractMethodError: org.jboss.ws.soap.SOAPMessageImpl.setProperty(Ljava/lang/String;Ljava/lang/Object;)V
at org.jboss.ws.soap.SOAPMessageImpl.(SOAPMessageImpl.java:65)
at org.jboss.ws.soap.MessageFactoryImpl.createMessageInternal(MessageFactoryImpl.java:209)
at org.jboss.ws.soap.MessageFactoryImpl.createMessage(MessageFactoryImpl.java:142)
at org.jboss.ws.server.ServiceEndpoint.handleRequest(ServiceEndpoint.java:190)
at org.jboss.ws.server.ServiceEndpointManager.processSOAPRequest(ServiceEndpointManager.java:355)
at org.jboss.ws.server.StandardEndpointServlet.doPost(StandardEndpointServlet.java:115)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.jboss.ws.server.StandardEndpointServlet.service(StandardEndpointServlet.java:76)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
................................................................
The files below is what I use for testing.
Hello.java:
package test;
import java.rmi.Remote;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
import javax.jws.soap.SOAPBinding.Style;
@WebService
@SOAPBinding(style=Style.RPC)
public interface Hello extends Remote {
String sayHello(String name);
}
HelloBean.java:
package test;
import javax.ejb.Remote;
import javax.ejb.Stateless;
import javax.jws.WebService;
@Stateless
@WebService(endpointInterface = "test.Hello")
@Remote(Hello.class)
public class HelloBean implements Hello {
public String sayHello(String name) {
return "Hello " + name;
}
}
And my test client HelloClient:
package test;
import java.net.URL;
import javax.xml.namespace.QName;
import javax.xml.rpc.Service;
import javax.xml.rpc.ServiceFactory;
public class HelloClient {
public static void main(String[] args) throws Exception {
System.out.println("Starting Test Client");
URL url = new URL("http://rad-mobile1:8080/test/HelloBean?wsdl");
QName qname = new QName("http://test/jaws", "HelloService");
System.out.println("Creating a service Using: \n\t" + url + " \n\tand " + qname);
ServiceFactory factory = ServiceFactory.newInstance();
Service remote = factory.createService(url, qname);
System.out.println("Obtaining reference to a proxy object");
Hello proxy = (Hello) remote.getPort(Hello.class);
System.out.println("Accessed local proxy: " + proxy);
String name = "John";
System.out.println("Sending: name=" + name);
System.out.println("Receiving: " + proxy.sayHello("John"));
}
}
Any help is greatly appreciated!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4070817#4070817
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4070817
18Â years, 8Â months
[Installation, Configuration & DEPLOYMENT] - Reading properties file in webapp under JBoss/Tomcat
by ddog
Hi,
I'm trying to read a properties file that is contained in a war file that is deployed under JBoss' Tomcat.
The specifics follow:
code to read file is:
ResourceBundle props = ResourceBundle.getBundle("idmwswrapper.properties", Locale.getDefault(), this.getClass().getClassLoader());
the properties file is currently located in WEB-INF/classes
The error message is:
ERROR READING PROPERTIES FILE.... Can't find bundle for base name idmwswrapper.properties, locale en_US
2007-08-03 15:09:24,265 INFO [STDOUT] java.util.MissingResourceException: Can't find bundle for base name idmwswrapper.properties, locale en_US
2007-08-03 15:09:24,265 INFO [STDOUT] at java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:836)
2007-08-03 15:09:24,265 INFO [STDOUT] at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:726)
2007-08-03 15:09:24,265 INFO [STDOUT] at java.util.ResourceBundle.getBundle(ResourceBundle.java:699)
20 etc. etc.
Where should this file be located relative to the class file that resides
in:
WEB-INF/classes.com.company.webservices.idm.wrapper.ClassName ?
Ideally, I need to place the propertie file OUTSIDE of the classes directory - in config/propetiesfile.properties for instance, but that removes it from the classpath.
Any suggestions are greatly appreciated!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4070814#4070814
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4070814
18Â years, 8Â months