[JBoss Portal] - seam portlet error message
by kevnlin
this is my register.xhtml
<f:view>
<h:form>
<s:validateAll>
<h:panelGrid columns="2">
</h:panelGrid>
</s:validateAll>
<h:messages/>
<h:commandButton value="Register" action="#{register.register}"/>
<s:link id="registered" view="/registered.xhtml" value="ddd" />
</h:form>
</f:view>
when I click ddd(s:link) , the application work
but click button action show the error message
javax.portlet.PortletException: Error process faces request
at javax.portlet.faces.GenericFacesPortlet.processAction(GenericFacesPortlet.java:168)
at org.jboss.portal.portlet.impl.jsr168.PortletContainerImpl.invokeAction(PortletContainerImpl.java:458)
at org.jboss.portal.portlet.impl.jsr168.PortletContainerImpl.dispatch(PortletContainerImpl.java:401)
at org.jboss.portal.portlet.container.PortletContainerInvoker$1.invoke(PortletContainerInvoker.java:86)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:131)
at org.jboss.portal.core.aspects.portlet.TransactionInterceptor.org$jboss$portal$core$aspects$portlet$TransactionInterceptor$invokeNotSupported$aop(TransactionInterceptor.java:86)
at org.jboss.portal.core.aspects.portlet.TransactionInterceptor$invokeNotSupported_N4547270787964792031.invokeNext(TransactionInterceptor$invokeNotSupported_N4547270787964792031.java)
at org.jboss.aspects.tx.TxPolicy.invokeInNoTx(TxPolicy.java:66)
at org.jboss.aspects.tx.TxInterceptor$NotSupported.invoke(TxInterceptor.java:112)
at org.jboss.portal.core.aspects.portlet.TransactionInterceptor$invokeNotSupported_N4547270787964792031.invokeNext(TransactionInterceptor$invokeNotSupported_N4547270787964792031.java)
at org.jboss.aspects.tx.TxPolicy.invokeInNoTx(TxPolicy.java:66)
at org.jboss.aspects.tx.TxInterceptor$NotSupported.invoke(TxInterceptor.java:102)
at org.jboss.portal.core.aspects.portlet.TransactionInterceptor$invokeNotSupported_N4547270787964792031.invokeNext(TransactionInterceptor$invokeNotSupported_N4547270787964792031.java)
at org.jboss.portal.core.aspects.portlet.TransactionInterceptor.invokeNotSupported(TransactionInterceptor.java)
at org.jboss.portal.core.aspects.portlet.TransactionInterceptor.invoke(TransactionInterceptor.java:56)
at org.jboss.portal.portlet.invocation.PortletInterceptor.invoke(PortletInterceptor.java:38)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
at org.jboss.portal.core.aspects.portlet.HeaderInterceptor.invoke(HeaderInterceptor.java:50)
at org.jboss.portal.portlet.invocation.PortletInterceptor.invoke(PortletInterceptor.java:38)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
at org.jboss.portal.portlet.aspects.portlet.ProducerCacheInterceptor.invoke(ProducerCacheInterceptor.java:53)
at org.jboss.portal.portlet.invocation.PortletInterceptor.invoke(PortletInterceptor.java:38)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
at org.jboss.portal.core.aspects.portlet.AjaxInterceptor.invoke(AjaxInterceptor.java:51)
at org.jboss.portal.portlet.invocation.PortletInterceptor.invoke(PortletInterceptor.java:38)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
at org.jboss.portal.portlet.aspects.portlet.ModesInterceptor.invoke(ModesInterceptor.java:62)
at org.jboss.portal.portlet.invocation.PortletInterceptor.invoke(PortletInterceptor.java:38)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
at org.jboss.portal.portlet.bridge.BridgeInterceptor.invoke(BridgeInterceptor.java:47)
at org.jboss.portal.portlet.invocation.PortletInterceptor.invoke(PortletInterceptor.java:38)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
at org.jboss.portal.portlet.aspects.portlet.WindowStatesInterceptor.invoke(WindowStatesInterceptor.java:55)
at org.jboss.portal.portlet.invocation.PortletInterceptor.invoke(PortletInterceptor.java:38)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
at org.jboss.portal.portlet.aspects.portlet.PortletSessionSynchronizationInterceptor.invoke(PortletSessionSynchronizationInterceptor.java:80)
at org.jboss.portal.portlet.invocation.PortletInterceptor.invoke(PortletInterceptor.java:38)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
at org.jboss.portal.portlet.aspects.portlet.ContextTrackerInterceptor.invoke(ContextTrackerInterceptor.java:46)
at org.jboss.portal.portlet.invocation.PortletInterceptor.invoke(PortletInterceptor.java:38)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
at org.jboss.portal.portlet.aspects.portlet.ContextDispatcherInterceptor$1.doCallback(ContextDispatcherInterceptor.java:104)
at org.jboss.portal.web.command.CommandDispatcher$CallbackCommand.execute(CommandDispatcher.java:74)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.portal.web.command.CommandServlet.doGet(CommandServlet.java:131)
at org.jboss.portal.web.command.CommandServlet.doPost(CommandServlet.java:162)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:654)
at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:557)
at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:481)
at org.jboss.portal.web.command.CommandServlet.include(CommandServlet.java:80)
at org.jboss.portal.web.command.CommandDispatcher.include(CommandDispatcher.java:50)
at org.jboss.portal.web.jboss.JBossWebContext.include(JBossWebContext.java:66)
at org.jboss.portal.web.ServletContainer.include(ServletContainer.java:182)
at org.jboss.portal.portlet.impl.spi.AbstractRequestContext.dispatch(AbstractRequestContext.java:81)
at org.jboss.portal.portlet.aspects.portlet.ContextDispatcherInterceptor.invoke(ContextDispatcherInterceptor.java:76)
at org.jboss.portal.portlet.invocation.PortletInterceptor.invoke(PortletInterceptor.java:38)
at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
at org.jboss.portal.portlet
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4132057#4132057
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4132057
16 years, 8 months
[JBossWS] - Re: jaxrpc Array problem
by odin69
So here is my next question. I have the following Value type on the client-side created from a wsdl using wsconsume.
| package com.seitenbau.test.Client;
|
| import java.util.ArrayList;
| import java.util.List;
| import javax.xml.bind.annotation.XmlAccessType;
| import javax.xml.bind.annotation.XmlAccessorType;
| import javax.xml.bind.annotation.XmlElement;
| import javax.xml.bind.annotation.XmlType;
|
|
| @XmlAccessorType(XmlAccessType.FIELD)
| @XmlType(name = "CustomerData", propOrder = {
| "city",
| "givenname",
| "password",
| "phonenumber",
| "products",
| "street",
| "surname",
| "zipCode"
| })
| public class CustomerData implements java.io.Serializable {
|
| @XmlElement(required = true, nillable = true)
| protected String city;
| @XmlElement(required = true, nillable = true)
| protected String givenname;
| @XmlElement(required = true, nillable = true)
| protected String password;
| protected int phonenumber;
| @XmlElement(type = Integer.class)
| protected List<Integer> products;
| @XmlElement(required = true, nillable = true)
| protected String street;
| @XmlElement(required = true, nillable = true)
| protected String surname;
| @XmlElement(required = true, nillable = true)
| protected String zipCode;
|
| public String getCity() {
| return city;
| }
| public void setCity(String value) {
| this.city = value;
| }
| public String getGivenname() {
| return givenname;
| }
| public void setGivenname(String value) {
| this.givenname = value;
| }
| public String getPassword() {
| return password;
| }
| public void setPassword(String value) {
| this.password = value;
| }
| public int getPhonenumber() {
| return phonenumber;
| }
| public void setPhonenumber(int value) {
| this.phonenumber = value;
| }
| public List<Integer> getProducts() {
| if (products == null) {
| products = new ArrayList<Integer>();
| }
| return this.products;
| }
| public String getStreet() {
| return street;
| }
| public void setStreet(String value) {
| this.street = value;
| }
| public String getSurname() {
| return surname;
| }
| public void setSurname(String value) {
| this.surname = value;
| }
| public String getZipCode() {
| return zipCode;
| }
| public void setZipCode(String value) {
| this.zipCode = value;
| }
|
| }
|
Now I have the problem that by invoking the web service the customerData information is given back fine but on client side I get an UndeclaredThrowableException. Right now I don't know why this happens and i am really stuck I hope someone might be able to help me. in the following there is the wsdl. The error occurs by invoking the getCustomerData operation. Well thanks in advance i hope someone comes up with s.th.
<?xml version="1.0" encoding="UTF-8"?>
| <definitions name='ND_CELLPHONE' targetNamespace='http://test' xmlns='http://schemas.xmlsoap.org/wsdl/' xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/' xmlns:tns='http://test' xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
| <types>
| <schema targetNamespace='http://test' xmlns='http://www.w3.org/2001/XMLSchema' xmlns:soap11-enc='http://schemas.xmlsoap.org/soap/encoding/' xmlns:tns='http://test' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
| <complexType name='CustomerData'>
| <sequence>
| <element name='city' nillable='true' type='string'/>
| <element name='givenname' nillable='true' type='string'/>
| <element name='password' nillable='true' type='string'/>
| <element name='phonenumber' type='int'/>
| <element maxOccurs='unbounded' minOccurs='0' name='products' type='int'/>
| <element name='street' nillable='true' type='string'/>
| <element name='surname' nillable='true' type='string'/>
| <element name='zipCode' nillable='true' type='string'/>
| </sequence>
| </complexType>
| </schema>
| </types>
| <message name='IND_CellphoneService_checkForNumberExistence' xmlns='http://schemas.xmlsoap.org/wsdl/'>
| <part name='int_1' type='xsd:int'/>
| <part name='String_2' type='xsd:string'/>
| </message>
| <message name='IND_CellphoneService_checkForNumberExistenceResponse'>
| <part name='result' type='xsd:int'/>
| </message>
| <message name='IND_CellphoneService_getCustomerData'>
| <part name='int_1' type='xsd:int'/>
| </message>
| <message name='IND_CellphoneService_getCustomerDataResponse'>
| <part name='result' type='tns:CustomerData'/>
| </message>
| <message name='IND_CellphoneService_setEditFlag'>
| <part name='int_1' type='xsd:int'/>
| </message>
| <message name='IND_CellphoneService_setEditFlagResponse'>
| <part name='result' type='xsd:boolean'/>
| </message>
| <portType name='IND_CellphoneService'>
| <operation name='checkForNumberExistence' parameterOrder='int_1 String_2'>
| <input message='tns:IND_CellphoneService_checkForNumberExistence'/>
| <output message='tns:IND_CellphoneService_checkForNumberExistenceResponse'/>
| </operation>
| <operation name='getCustomerData' parameterOrder='int_1'>
| <input message='tns:IND_CellphoneService_getCustomerData'/>
| <output message='tns:IND_CellphoneService_getCustomerDataResponse'/>
| </operation>
| <operation name='setEditFlag' parameterOrder='int_1'>
| <input message='tns:IND_CellphoneService_setEditFlag'/>
| <output message='tns:IND_CellphoneService_setEditFlagResponse'/>
| </operation>
| </portType>
| <binding name='IND_CellphoneServiceBinding' type='tns:IND_CellphoneService'>
| <soap:binding style='rpc' transport='http://schemas.xmlsoap.org/soap/http'/>
| <operation name='checkForNumberExistence'>
| <soap:operation soapAction=''/>
| <input>
| <soap:body namespace='http://test' use='literal'/>
| </input>
| <output>
| <soap:body namespace='http://test' use='literal'/>
| </output>
| </operation>
| <operation name='getCustomerData'>
| <soap:operation soapAction=''/>
| <input>
| <soap:body namespace='http://test' use='literal'/>
| </input>
| <output>
| <soap:body namespace='http://test' use='literal'/>
| </output>
| </operation>
| <operation name='setEditFlag'>
| <soap:operation soapAction=''/>
| <input>
| <soap:body namespace='http://test' use='literal'/>
| </input>
| <output>
| <soap:body namespace='http://test' use='literal'/>
| </output>
| </operation>
| </binding>
| <service name='ND_CELLPHONE'>
| <port binding='tns:IND_CellphoneServiceBinding' name='IND_CellphoneServicePort'>
| <soap:address location='http://localhost:8080/services/ND_PRODUCTS'/>
| </port>
| </service>
| </definitions>
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4132053#4132053
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4132053
16 years, 8 months
[JBoss Getting Started Documentation] - Re: Restarting W2003->JBOSS service reboots the server
by crowse
Hi PeterJ,
Thanks for the fast response, unfortunately I was unable to get to the machine till now.
Yes, I am using JBoss native.
I need to set up Internet (196.2.99.198) and Intranet (196.168.0.10) ports to the same service on 8180
My mods to server.xml are
|
| <Connector port="8180" address="${jboss.bind.address}"
| maxThreads="250" maxHttpHeaderSize="8192"
| emptySessionPath="true" protocol="HTTP/1.1"
| enableLookups="false" redirectPort="8143" acceptCount="100"
| connectionTimeout="20000" disableUploadTimeout="true" />
|
| <Connector port="8180" address="196.2.99.198"
| maxThreads="250" maxHttpHeaderSize="8192"
| emptySessionPath="true" protocol="HTTP/1.1"
| enableLookups="false" redirectPort="8243" acceptCount="100"
| connectionTimeout="20000" disableUploadTimeout="true" />
|
| <Connector port="8180" address="192.168.0.10"
| maxThreads="250" maxHttpHeaderSize="8192"
| emptySessionPath="true" protocol="HTTP/1.1"
| enableLookups="false" redirectPort="8343" acceptCount="100"
| connectionTimeout="20000" disableUploadTimeout="true" />
|
and
| <Host name="hsc-dc"
| autoDeploy="false" deployOnStartup="false" deployXML="false"
| configClass="org.jboss.web.tomcat.security.config.JBossContextConfig"
| >
| <Alias>hsc-dc.hsc.local</Alias>
| <Alias>hsc-dc.hsc</Alias>
| <Alias>196.2.99.198</Alias>
| <Alias>192.168.0.10</Alias>
| </Host>
|
|
This configuration works on my Linux test environment wher I hae control of the DNS and firewall - other than JBoss doesnt seem to like going directly to an IP ... even if I put the Aliases in the default server. I have no or very little control over the production box.
The problem on startup occurs on the second connector immediately after localhost is bound. And, indeed, after waiting for JBoss to start localhost:8180 works fine - you can see it being bound immediately before the stack trace (below).
The web manager reports that JBoss ${jboss.bind.address} is bound to hsc-dc at 192.168.0.10, but I cant get to this service - even if I remove the second from server.xml
| Version
| Version: 4.2.1.GA (build: SVNTag=JBoss_4_2_1_GA date=200707131606)
|
| Version Name: Trinity
|
| Built on: July 13 2007
| Environment
| Start date: Tue Feb 26 09:45:34 GMT+02:00 2008
|
| Host: hsc-dc (192.168.0.10)
|
| Base Location: file:/C:/hscweb/jboss-4.2.1.GA/server/
|
| Base Location (local): C:\hscweb\jboss-4.2.1.GA\server
|
| Running config: 'default'
|
|
|
|
| JVM - Hardware
| Hardware
| #CPU: 2
|
| OS: Windows 2003 5.2 (x86)
| JVM Environment
| Free Memory: 90 MB
|
| Max Memory: 493 MB
|
| Total Memory: 163 MB
|
| #Threads: 47
|
| JVM Version: 10.0-b19 (Sun Microsystems Inc.)
|
| JVM Name: Java HotSpot(TM) Server VM
|
|
|
| 09:45:39,860 INFO [TransactionManagerService] Starting recovery manager
| 09:45:39,985 INFO [TransactionManagerService] Recovery manager started
| 09:45:40,000 INFO [TransactionManagerService] Binding TransactionManager JNDI R
| eference
| 09:45:44,610 INFO [EJB3Deployer] Starting java:comp multiplexer
| 09:45:47,203 INFO [ServiceEndpointManager] jbossws-1.2.1.GA (build=200704151756
| )
| 09:45:49,094 INFO [AprLifecycleListener] The Apache Tomcat Native library which
| allows optimal performance in production environments was not found on the java
| .library.path: C:\hscweb\jboss-4.2.1.GA\bin\native;C:\WINDOWS\system32;C:\WINDOW
| S;C:\WINDOWS\System32\Wbem;C:\Program Files\Microsoft Windows Small Business Ser
| ver\Networking\;C:\Program Files\Microsoft SQL Server\80\Tools\BINN;C:\hscweb\jd
| k1.6.0_04\bin;C:\hscweb\apache-maven-2.0.8\bin;C:\hscweb\jboss-4.2.1.GA\bin
| 09:45:49,281 INFO [Http11Protocol] Initializing Coyote HTTP/1.1 on http-127.0.0
| .1-8180
| 09:45:49,313 ERROR [Http11Protocol] Error initializing endpoint
| java.net.BindException: Cannot assign requested address: JVM_Bind:8180
| at org.apache.tomcat.util.net.JIoEndpoint.init(JIoEndpoint.java:501)
| at org.apache.coyote.http11.Http11Protocol.init(Http11Protocol.java:176)
|
| at org.apache.catalina.connector.Connector.initialize(Connector.java:105
| 9)
| at org.apache.catalina.core.StandardService.initialize(StandardService.j
| ava:669)
| at org.apache.catalina.core.StandardServer.initialize(StandardServer.jav
| a:792)
| at org.apache.catalina.startup.Catalina.load(Catalina.java:518)
| at org.apache.catalina.startup.Catalina.start(Catalina.java:558)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
| java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
| sorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:597)
| at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.j
|
Restarting JBoss native from either the command line or start->admin->services forces a reboot with the following log entry (Event 1074)
|
| The process winlogon.exe has initiated the power off of computer HSC-DC on behalf of user HSC\Administrator for the following reason: No title for this reason could be found
| Reason Code: 0x840000ff
| Shutdown Type: power off
| Comment:
|
| For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
|
I have tried manual stop - check task manager - start as suggested, with the box simply rebooting immediately. hence my dilemma
I have in the interim removed JBoss native whilst I debug the command line version. I will also be trying glassfish since it seems to offer comfortable remote administration.
I am glad to hear the JB is stable on win2K - I have no reason to suspect it isnt since I have been using JB and Tomcat on Linux for many years, and have seen that the paralell Windows version ahs been available for a ong time. I'm sure its something I've overlooked.
Your help is much appreciated
Chris
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4132052#4132052
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4132052
16 years, 8 months
[Security & JAAS/JBoss] - Loosing caller principal after random runtime of server
by alxs
Hi,
we are using JBoss 4.0.5.GA for our EJB 2 Application with a client accessing the server via RMI.
Since a few weeks we discovered a strange problem which we cannot reproduce but that happens from time to time.
We are using the default jdbc module for authenitcation. After a random time the server seems allways returns the "guest" principal and nobody is able to log into our system. We then have to restart the JBoss to get it back to work again.
It often occures when the server was idle for a longer time. So I thought about passivation. But it also happens when the server has a regular load.
I've noticed that there is an exception near the time when the problem starts. Since there are some Web-Applications deployed too this may belong to them.
| 2008-02-26 08:29:05,266 DEBUG [org.jboss.web.tomcat.security.SecurityFlushSessionListener] Obtaining SecurityManagerService failed::
| java.lang.ClassCastException: org.jnp.interfaces.NamingContext
| at org.jboss.web.tomcat.security.SecurityFlushSessionListener.getSecurityManagerService(SecurityFlushSessionListener.java:193)
| at org.jboss.web.tomcat.security.SecurityFlushSessionListener.getSubjectAndSecurityDomain(SecurityFlushSessionListener.java:160)
| at org.jboss.web.tomcat.security.SecurityFlushSessionListener.sessionDestroyed(SecurityFlushSessionListener.java:79)
| at org.apache.catalina.session.StandardSession.expire(StandardSession.java:687)
| at org.apache.catalina.session.StandardSession.isValid(StandardSession.java:579)
| at org.apache.catalina.session.ManagerBase.processExpires(ManagerBase.java:678)
| at org.apache.catalina.session.ManagerBase.backgroundProcess(ManagerBase.java:663)
| at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1284)
| at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1569)
| at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1578)
| at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1578)
| at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1558)
| at java.lang.Thread.run(Thread.java:595)
| 2008-02-26 08:29:05,267 DEBUG [org.jboss.web.tomcat.security.SecurityFlushSessionListener] Unable to obtain SecurityDomain
|
We've allready investigated a lot of time to find the reason for this problem. But I've no idea where to look outside of our code.
Where should I start looking?
Alex
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4132050#4132050
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4132050
16 years, 8 months
[JBossCache] - New Bie JBoss Cache Replication
by chandra_88
Hi,
I have two jboss instances running on a single machine with different ports
VM1 - port 8280
VM2 - port 8380
The jboss instances are participating in a cluster. I have a simple war containing a servlet and i have deployed in the farm folder of VM1 so that the war gets replicated in the other VM2 instance.
I have a simple servlet which creates a cache and echoes its value.
| public class MyServlet extends javax.servlet.http.HttpServlet implements javax.servlet.Servlet {
| static final long serialVersionUID = 1L;
| TreeCacheMBean cache;
| private int count = 0;
| public MyServlet() {
| super();
| init();
| }
|
| public void init()
| {
| MBeanServer server=MBeanServerLocator.locateJBoss();
|
| try{
| cache=(TreeCacheMBean)MBeanProxyExt.create(TreeCacheMBean.class, "jboss.cache:service=TreeCache", server);
|
| }
| catch(Exception exp)
| {
| exp.printStackTrace();
| }
|
| }
|
| protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
| // TODO Auto-generated method stub
| try{
| count++;
| cache.put("/a/b/c","Key1",count);
| cache.put("/a/b/d","Key2",count);
| response.setContentType("text/html");
| PrintWriter out = response.getWriter();
| out.println("<HTML><HEAD><TITLE>");
| Integer cachevalue = (Integer)cache.get("/a/b/c", "Key1");
| out.println(cachevalue.intValue());
|
>From this code i expected when i do http://:8280 the cache to be created and put some values in the cache . Say i made a request 10 times to this location the count val should be 10 .
Now when i hit the url http://:8380 the value should be 10 it echoes 0 . Is it a wrong test case to test if so how i can make sure the cache gets replicated in this scenario. Note I have copied a rep-Syncservice.xml in the deploy folders of both the vm instanaces.
let me know how do i fix this
- Many Thanks
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4132045#4132045
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4132045
16 years, 8 months
[JBossCache] - Problem configuring service jboss.cache:service=TreeCache
by yrk.kaushik
I am using Jboss cache 2.0.0 GA. I've used the configuration file- local-eviction-cacheloader-service.xml, available under JBossCache-all-2.0.0.GA\etc\META-INF and place it in Jboss\server\default\deploy folder. But while starting the server, I am getting incomplete deployment error as shown below. Could any of you please help me out in resolving this?
12:01:43,095 INFO [ServiceConfigurator] Problem configuring service jboss.cache:service=TreeCache
org.jboss.deployment.DeploymentException: Exception setting attribute javax.management.Attribute@110195c on mbean jboss.cache:service=TreeCache; - nested throwable: (java.lang.VerifyError: (class: org/jboss/cache/config/Configuration, method: setCacheLoaderConfig signature: (Lorg/jboss/cache/config/CacheLoaderConfig;)V) Incompatible argument to function)
at org.jboss.system.ServiceConfigurator.setAttribute(ServiceConfigurator.java:698)
at org.jboss.system.ServiceConfigurator.configure(ServiceConfigurator.java:332)
Caused by: java.lang.VerifyError: (class: org/jboss/cache/config/Configuration, method: setCacheLoaderConfig signature: (Lorg/jboss/cache/config/CacheLoaderConfig;)V) Incompatible argument to function
at org.jboss.cache.jmx.CacheJmxWrapper.getConfiguration(CacheJmxWrapper.java:124)
at org.jboss.cache.jmx.CacheJmxWrapper.setTransactionManagerLookupClass(CacheJmxWrapper.java:545)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
--- MBeans waiting for other MBeans ---
ObjectName: jboss.cache:service=TreeCache
State: FAILED
Reason: org.jboss.deployment.DeploymentException: Exception setting attribute javax.management.Attribute@110195c on mbean jboss.cache:service=TreeCache; - nested throwable: (java.lang.VerifyError: (class: org/jboss/cache/config/Configuration, method: setCacheLoaderConfig signature: (Lorg/jboss/cache/config/CacheLoaderConfig;)V) Incompatible argument to function)
I Depend On:
jboss:service=Naming
jboss:service=TransactionManager
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4132041#4132041
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4132041
16 years, 8 months