[JBossCache] - Can TreeCache do what I need?
by aditsu
Hi, I'm looking for a caching solution that can do these things:
- it should work in a cluster, with a single database used for persistent storage
- initially, the caches will preload a specific set of data (different for each cache)
- whenever an object is requested from a cache, if it is not already available, it should be retrieved from one of the other caches in the cluster; if it still can't be found, then it should be retrieved from the database
- whenever an object is modified, the current cache should keep the new value, and it should invalidate it in all the other caches
- whenever an object is loaded from the database or newly inserted in a cache, it should not be immediately replicated to the other caches, but only on demand
- each cache should drop (evict?) objects as needed (because of memory constraints), and that should not directly affect other caches in the cluster
- each cache should flush its modifications to the database at (configurable) regular intervals, in batches
- if possible, each modification or insertion into a cache should be immediately serialized to a local file before finishing the transaction; these files should be deleted whenever the changes are flushed to the database
- if possible, each cache should be able to listen to updates or inserts into other caches, based on certain conditions
Can TreeCache (probably used with Hibernate) do these things? If it can, then could you briefly explain how to configure and use it to achieve these features?
If you have questions about any point, I can give more details and reasons, and you can provide alternative solutions.
Thanks
Adrian
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4046023#4046023
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4046023
19 years, 1 month
[JBoss Seam] - problem with 1.2.1 / tomcat upgrade
by jcruise
Hola!
I upgraded my 1.2.0PATCH1 tomcat installation with 1.2.1 GA. I basically upgraded the seam libs and any other libs that were newer in the lib directory, including the jsf-facelets and el implementations.
I initially had a problem with the switch from cglib to javassist in that one of my classes derived from HibernateEntityHome had overrided the getPersistentContext method in the generic base clase, which gave me a duplicate method error. I switched to overriding the non-generic getSession method and that problem disappeared.
Now I am stuck with another tricky problem that might be related to Javassist ...
Basically, I have a selectOneMenu on my login page which includes a custom converter. The converter gets called correctly but the model does not seem to update. It fails with the following error:
| 08:12:30,895 ERROR [[/XStreamline]] Cannot convert Streamline of type class com.volantice.site.model.Zone to class com.volantice.site.model.Zone_$$_javassist_1
| java.lang.IllegalArgumentException: Cannot convert Streamline of type class com.volantice.site.model.Zone to class com.volantice.site.model.Zone_$$_javassist_1
| at com.sun.el.lang.ELSupport.coerceToType(ELSupport.java:368)
| at com.sun.el.parser.AstIdentifier.setValue(AstIdentifier.java:109)
| at com.sun.el.ValueExpressionImpl.setValue(ValueExpressionImpl.java:258)
| at com.sun.facelets.el.TagValueExpression.setValue(TagValueExpression.java:93)
| at com.sun.facelets.el.LegacyValueBinding.setValue(LegacyValueBinding.java:68)
| at javax.faces.component.UIInput.updateModel(UIInput.java:269)
| at javax.faces.component.UIInput.processUpdates(UIInput.java:206)
| at javax.faces.component.UIComponentBase.processUpdates(UIComponentBase.java:645)
| at javax.faces.component.UIForm.processUpdates(UIForm.java:87)
| at javax.faces.component.UIComponentBase.processUpdates(UIComponentBase.java:645)
| at javax.faces.component.UIViewRoot.processUpdates(UIViewRoot.java:157)
| at org.ajax4jsf.framework.ajax.AjaxViewRoot.access$101(AjaxViewRoot.java:53)
| at org.ajax4jsf.framework.ajax.AjaxViewRoot$2.invokeRoot(AjaxViewRoot.java:278)
| at org.ajax4jsf.framework.ajax.JsfOneOneInvoker.invokeOnRegionOrRoot(JsfOneOneInvoker.java:54)
| at org.ajax4jsf.framework.ajax.AjaxContext.invokeOnRegionOrRoot(AjaxContext.java:176)
| at org.ajax4jsf.framework.ajax.AjaxViewRoot.processUpdates(AjaxViewRoot.java:291)
| at org.apache.myfaces.lifecycle.LifecycleImpl.updateModelValues(LifecycleImpl.java:302)
| at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:81)
| at javax.faces.webapp.FacesServlet.service(FacesServlet.java:137)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:96)
| at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:220)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:144)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:63)
| at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:60)
| at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
| at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
| at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
| at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:57)
| at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
| at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:53)
| at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:79)
| at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
| at org.jboss.seam.web.SeamFilter.doFilter(SeamFilter.java:84)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java: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:869)
| at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
| at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
| at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
| at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
| at java.lang.Thread.run(Unknown Source)
|
Any ideas?
Cheers
J
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4046022#4046022
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4046022
19 years, 1 month
[Performance Tuning] - getting the folowing NPE and ServletException on Jboss under
by kenety
Hi,
I'm getting the folowing NPE and ServletException on the server.log when sending HTTP requests to JBoss under load for each and every request (this happens after a while during the load testing). Do you have an idea why? Is there any configuration that I'm missing? Thanks!
08:05:37,283 ERROR [CoyoteAdapter] An exception or error occurred in the container during the request processing
java.lang.NullPointerException
at org.jboss.resource.connectionmanager.BaseConnectionManager2.unregisterAssociation(BaseConnectionManager2.java:505)
at org.jboss.resource.connectionmanager.BaseConnectionManager2.disconnect(BaseConnectionManager2.java:480)
at org.jboss.resource.connectionmanager.CachedConnectionManager.disconnect(CachedConnectionManager.java:406)
at org.jboss.resource.connectionmanager.CachedConnectionManager.popMetaAwareObject(CachedConnectionManager.java:257)
at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:162)
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:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
at java.lang.Thread.run(Thread.java:595)
2007-05-15 08:11:47,648 ERROR [org.apache.catalina.connector.CoyoteAdapter] An exception or error occurred in the container during the request processing
javax.servlet.ServletException: Error invoking cached connection manager
at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:172)
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:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.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=4046021#4046021
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4046021
19 years, 1 month
[Tomcat, HTTPD, Servlets & JSP] - Re: getting ServletException when JBoss is under load
by kenety
And before the exception just pasted, I'm getting this one:
08:05:37,283 ERROR [CoyoteAdapter] An exception or error occurred in the container during the request processing
java.lang.NullPointerException
at org.jboss.resource.connectionmanager.BaseConnectionManager2.unregisterAssociation(BaseConnectionManager2.java:505)
at org.jboss.resource.connectionmanager.BaseConnectionManager2.disconnect(BaseConnectionManager2.java:480)
at org.jboss.resource.connectionmanager.CachedConnectionManager.disconnect(CachedConnectionManager.java:406)
at org.jboss.resource.connectionmanager.CachedConnectionManager.popMetaAwareObject(CachedConnectionManager.java:257)
at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:162)
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:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.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=4046019#4046019
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4046019
19 years, 1 month
[Tomcat, HTTPD, Servlets & JSP] - getting ServletException when JBoss is under load
by kenety
Hi,
I'm getting the folowing ServletException on the server.log when sending HTTP requests to JBoss under load for each and every request (this happens after a while during the load testing). Do you have an idea why. Is there any configuration that I'm missing. Thanks!
2007-05-15 08:11:47,648 ERROR [org.apache.catalina.connector.CoyoteAdapter] An exception or error occurred in the container during the request processing
javax.servlet.ServletException: Error invoking cached connection manager
at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:172)
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:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.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=4046017#4046017
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4046017
19 years, 1 month
[JBoss Seam] - What is com.sun.facelets.FaceletException: EL Expression Unb
by tonylmai
Hello,
I encountered an encrypted exception that I do not understand. My app threw an exception as followed:
anonymous wrote : com.sun.facelets.FaceletException: EL Expression Unbalanced: ... #{srchMgr.searchedQuote.dayChangePerc)
| at com.sun.facelets.tag.AbstractTagLibrary$UserComponentHandlerFactory.createHandler(AbstractTagLibrary.java:237)
I know that I have #{srchMgr.searchedQuote.dayChangePerc) as my code is such:
@Stateful
| @Scope(ScopeType.SESSION)
| @Name("srchMgr")
| public class SearchManagerBean implements Serializable, SearchManager {
| private TdQuote searchedQuote = null;
| ...
| public TdQuote getSearchedQuote() {
| return searchedQuote;
| }
| ...
| }
|
|
| public class TdQuote implements Serializable {
| private String dayChangePerc;
| ...
| public String getDayChangePerc() {
| return dayChangePerc;
| }
| }
So what did Seam complain about?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4046015#4046015
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4046015
19 years, 1 month
[EJB/JBoss] - hi ppl help me out in removing
by gopal1.v@tcs.com
Hi Guys I am using JBoss 4.0.5 +eclipse
I wrote a simple Message driven bean Firstly i tried without using any deployment descriptors....It gave me this error:
WARN [MessagingContainer] No message-driven-destination given; using; guessing type
09:33:58,162 WARN [MessagingContainer] Could not determine destination type, defaults to: javax.jms.Topic
09:33:58,178 WARN [ServiceController] Problem starting service jboss.j2ee:ear=JMS1.ear,jar=JMS1.jar,name=SimpleMessageDriven,service=EJB3
org.jboss.deployment.DeploymentException: Required config property RequiredConfigPropertyMetaData@277bd2[name=destinationType
--- MBeans waiting for other MBeans ---
ObjectName: jboss.j2ee:ear=JMS1.ear,jar=JMS1.jar,name=SimpleMessageDriven,service=EJB3
State: FAILED
Reason: org.jboss.deployment.DeploymentException: Required config property RequiredConfigPropertyMetaData@277bd2[name=destinationType descriptions=[DescriptionMetaData@143c610[language=en]]] for messagingType 'javax.jms.MessageListener' not found in activation config [] ra=jboss.jca:service=RARDeployment,name='jms-ra.rar'
--- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
ObjectName: jboss.j2ee:ear=JMS1.ear,jar=JMS1.jar,name=SimpleMessageDriven,service=EJB3
State: FAILED
Reason: org.jboss.deployment.DeploymentException: Required config property RequiredConfigPropertyMetaData@277bd2[name=destinationType descriptions=[DescriptionMetaData@143c610[language=en]]] for messagingType 'javax.jms.MessageListener' not found in activation config []
Then i wrote ejb-jar and jboss xml files
The contents of these files are like this:
ejb-jar
<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">
<enterprise-beans>
<message-driven>
<ejb-name>SimpleMessageDriven</ejb-name>
<ejb-class>source.SimpleMessageDriven</ejb-class>
<transaction-type>Container</transaction-type>
<acknowledge-mode>AUTO_ACKNOWLEDGE</acknowledge-mode>
<message-driven-destination>
<destination-type>javax.jms.Queue</destination-type>
</message-driven-destination>
<res-ref-name>jms/QCF</res-ref-name>
<resource-ref>
<res-type>javax.jms.QueueConnectionFactory</res-type>
</resource-ref>
</message-driven>
</enterprise-beans>
</ejb-jar>
JBoss
<enterprise-beans>
<message-driven>
<ejb-name>SimpleMessageDriven</ejb-name>
<destination-jndi-name>queue/B</destination-jndi-name>
<resource-ref>
<res-ref-name>jms/QCF</res-ref-name>
<jndi-name>ConnectionFactory</jndi-name>
</resource-ref>
</message-driven>
</enterprise-beans>
Now i am getting This error:
INFO [EARDeployer] Init J2EE application: file:/C:/jems-insatalledJBossServer/server/default/deploy/JMS1.ear
10:56:14,158 WARN [ServiceController] Problem creating service jboss.j2ee:service=EJB3,module=JMS1.jar
org.jboss.xb.binding.JBossXBException: Failed to parse source: cvc-complex-type.2.4.a: Invalid content was found starting with element 'acknowledge-mode'.
I am doing in EJB 3.0 .I heard that for ejb3.0 no deployment descriptors needed....
Please help me in removing this bug....
Any tutorials or links are welcome...
Thanks in advance...
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4046014#4046014
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4046014
19 years, 1 month
[JBoss jBPM] - jbpm-bpel-1.1.Beta3 examples problem!
by gongdonghui
hill
i need your help!
i try to ues the jbpm-bpel-1.1.Beta3 examples,but it has problems
i use the jboss-4.0.5.GA ,the jdkversion is "1.5.0_07" and alse install the
Java Web Services Developer Pack 2.0
the process deployment and web service deployment is normal but the test
is always failed ,
the jboss information is shown below
| 11:14:10,781 INFO [TomcatDeployer] deploy, ctxPath=/hello, warUrl=.../tmp/deplo
| y/tmp22653hello-exp.war/
| 11:14:11,031 WARN [ProxyWarnLog] Narrowing proxy to class org.jbpm.bpel.graph.d
| ef.CompositeActivity - this operation breaks ==
| 11:14:11,078 INFO [IntegrationConfigurator] Message reception enabled for proce
| ss: HelloWorld
| 11:14:11,140 INFO [WSDLFilePublisher] WSDL published to: file:/D:/jboss-4.0.5.G
| A/server/default/data/wsdl/hello.war/hello-service.wsdl
| 11:14:11,187 INFO [ServiceEndpointManager] WebService started: http://goose:808
| 0/hello/greeter
| 11:14:23,968 INFO [ClientDeployer] Client ENC bound under: jbpmbpel-client
| 11:14:24,109 INFO [ClientDeployer] Removing client ENC from: jbpmbpel-client
|
i just run the ant script in the examples
and the error information is
| 11:14:24,078 ERROR ServiceObjectFactory : Cannot create service
| javax.naming.NamingException: Cannot unmarshall service ref meta data, cause: java.io.InvalidClassException: javax.xml.namespace.QName; local class incompatible: stream classdesc serialVersionUID = 4418622981026545151, local class serialVersionUID = -9120448754896609940
| at org.jboss.ws.jaxrpc.ServiceObjectFactory.getObjectInstance(ServiceObjectFactory.java:126)
| at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
| at org.jnp.interfaces.NamingContext.getObjectInstance(NamingContext.java:1125)
| at org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(NamingContext.java:1142)
| at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:705)
| at org.jboss.naming.client.java.javaURLContextFactory$EncContextProxy.invoke(javaURLContextFactory.java:135)
| at $Proxy1.lookup(Unknown Source)
| at javax.naming.InitialContext.lookup(InitialContext.java:351)
| at org.jbpm.bpel.tutorial.hello.HelloTest.setUp(HelloTest.java:67)
| at junit.framework.TestCase.runBare(TestCase.java:125)
| at junit.framework.TestResult$1.protect(TestResult.java:106)
| at junit.framework.TestResult.runProtected(TestResult.java:124)
| at junit.framework.TestResult.run(TestResult.java:109)
| at junit.framework.TestCase.run(TestCase.java:118)
| at junit.framework.TestSuite.runTest(TestSuite.java:208)
| at junit.framework.TestSuite.run(TestSuite.java:203)
| at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
| at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
| at junit.framework.TestResult.runProtected(TestResult.java:124)
| at junit.extensions.TestSetup.run(TestSetup.java:23)
| at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:297)
| at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:672)
| at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:567)
| in setUp!
| 11:14:24,093 ERROR ServiceObjectFactory : Cannot create service
| javax.naming.NamingException: Cannot unmarshall service ref meta data, cause: java.io.InvalidClassException: javax.xml.namespace.QName; local class incompatible: stream classdesc serialVersionUID = 4418622981026545151, local class serialVersionUID = -9120448754896609940
| at org.jboss.ws.jaxrpc.ServiceObjectFactory.getObjectInstance(ServiceObjectFactory.java:126)
| at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
| at org.jnp.interfaces.NamingContext.getObjectInstance(NamingContext.java:1125)
| at org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(NamingContext.java:1142)
| at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:705)
| at org.jboss.naming.client.java.javaURLContextFactory$EncContextProxy.invoke(javaURLContextFactory.java:135)
| at $Proxy1.lookup(Unknown Source)
| at javax.naming.InitialContext.lookup(InitialContext.java:351)
| at org.jbpm.bpel.tutorial.hello.HelloTest.setUp(HelloTest.java:67)
| at junit.framework.TestCase.runBare(TestCase.java:125)
| at junit.framework.TestResult$1.protect(TestResult.java:106)
| at junit.framework.TestResult.runProtected(TestResult.java:124)
| at junit.framework.TestResult.run(TestResult.java:109)
| at junit.framework.TestCase.run(TestCase.java:118)
| at junit.framework.TestSuite.runTest(TestSuite.java:208)
| at junit.framework.TestSuite.run(TestSuite.java:203)
| at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
| at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
| at junit.framework.TestResult.runProtected(TestResult.java:124)
| at junit.extensions.TestSetup.run(TestSetup.java:23)
| at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:297)
| at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:672)
| at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:567)
|
|
And the test class code is
| package org.jbpm.bpel.tutorial.hello;
|
| import java.util.Properties;
| import javax.naming.InitialContext;
| import javax.naming.NamingException;
| import javax.xml.namespace.QName;
| import javax.xml.rpc.Call;
| import java.net.URL;
| import javax.xml.namespace.QName;
| import junit.framework.Test;
| import junit.framework.TestCase;
|
|
| import org.jboss.test.ws.JBossWSTestSetup;
|
| /**
| * @author Alejandro Gu?ar
| * @version $Revision: 1.1 $ $Date: 2006/09/27 03:53:02 $
| */
| public class HelloTest extends TestCase {
|
| private HelloWorldService service;
|
| public static Test suite() {
| System.out.println("in suit!");
| return JBossWSTestSetup.newTestSetup(HelloTest.class, "hello-client.jar");
|
| }
|
| protected void setUp() throws Exception {
| if (service == null) {
|
|
| // URL url=new URL("http://goose:8080/hello/greeter?wsdl");
|
| //QName qname = new QName("http://jbpm.org/examples/hello", "HelloWorldService");
|
|
| // ServiceFactory factory = ServiceFactory.newInstance();
| // Service service = factory.createService(url, qname);
| //System.out.println("success!");
|
| InitialContext iniCtx= new InitialContext();
|
|
|
| /*
| * "service/Hello" is the JNDI name of the service interface instance
| * relative to the client environment context. This name matches the
| * <service-ref-name> in application-client.xml
| */
| System.out.println("in setUp!");
| service = (HelloWorldService) iniCtx.lookup("java:comp/env/service/Hello");
|
| }
| }
|
| public void testSayHello_proxy() throws Exception {
| // obtain dynamic proxy for web service port
| System.out.println("in say hello_proxy!");
| Greeter proxy = service.getGreeterPort();
| // use proxy as local java object
| String greeting = proxy.sayHello("Popeye");
| // check proper greeting
| assertEquals("Hello, Popeye!", greeting);
| }
|
| public void testSayHello_dii() throws Exception {
| System.out.println("in say hello_dill!");
| String portTypeNS = "http://jbpm.org/examples/hello";
| // obtain dynamic invocation instance
| Call call = service.createCall(new QName(portTypeNS, "GreeterPort"),
| "sayHello");
| // invoke operation using request/response interaction mode
| String greeting = (String) call.invoke(new Object[] { "Olive" });
| // check proper greeting
| assertEquals("Hello, Olive!", greeting);
| }
| }
|
|
it make me mad ! i need your help!!!!!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4046011#4046011
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4046011
19 years, 1 month