[JBossWS] - WSException: Cannot obtain endpoint
by froden
Hi,
I'm having some problems integrating JBossWS 1.2.1 into our webapp using Seam 1.2.1 on Tomcat 5.5.23.
I downloaded jbossws-1.2.1.GA.zip and copied the jars as specified here http://jbws.dyndns.org/mediawiki/index.php?title=Install_Tomcat into tomcat's common/libs and common/endorsed. I also copied the jbossws.war into tomcat's webapp directory. So far so good, the jbossws webapp is working and I can deploy the samples from jbossws-samples-1.2.1.GA by dragging their wars into jbossws-deploy.
I then proceeded to try and add a webservice to our already existing web application.
This is the class I wish to expose as a web service:
package services;
|
| import javax.jws.WebMethod;
| import javax.jws.WebService;
| import javax.jws.soap.SOAPBinding;
|
| @WebService (name="TestService")
| @SOAPBinding(style = SOAPBinding.Style.RPC)
| public class TestService {
|
| @WebMethod
| public String feedback() {
| return "Hello from ws;
| }
| }
I've added the following to my web.xml
<?xml version="1.0" encoding="UTF-8"?>
|
| <web-app version="2.5"
| xmlns="http://java.sun.com/xml/ns/javaee"
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
| xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
|
| <servlet>
| <servlet-name>TestService</servlet-name>
| <servlet-class>org.jboss.ws.integration.tomcat.TomcatServiceEndpointServlet</servlet-class>
| </servlet>
| <servlet-mapping>
| <servlet-name>TestService</servlet-name>
| <url-pattern>/TestService.ws</url-pattern>
| </servlet-mapping>
|
| </web-app>
As you can see, I've removed pretty much anything else from web.xml, trying to isolate the problem.
Now, from what I've seen in the samples, dropping the war into the jbossws-deploy directory causes the jbossws system to modify web.xml and add an ServiceEndpointImpl init-param to each web service servlet. In my case, it should be something like this:
| <init-param>
| <param-name>ServiceEndpointImpl</param-name>
| <param-value>services.TestService</param-value>
| </init-param>
This doesn't happen.
When I try to view the service (localhost:8080/MyApp/TestService.ws) it gives me the following exception:
anonymous wrote : ERROR org.apache.commons.logging.impl.Log4JLogger (Log4JLogger.java:119) - Servlet.service() for servlet TestService threw exception
| org.jboss.ws.WSException: Cannot obtain endpoint for: jboss.ws:context=MyApp,endpoint=TestService
| at org.jboss.ws.core.server.AbstractServiceEndpointServlet.initServiceEndpoint(AbstractServiceEndpointServlet.java:161)
| at org.jboss.ws.core.server.AbstractServiceEndpointServlet.service(AbstractServiceEndpointServlet.java:73)
| at org.jboss.ws.integration.tomcat.TomcatServiceEndpointServlet.service(TomcatServiceEndpointServlet.java:99)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870)
| at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
| at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
| at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
| at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
| at java.lang.Thread.run(Thread.java:595)
|
This happens also if I add the init-param manually.
Any ideas what I might be missing here?
- Frode
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4117942#4117942
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4117942
18 years, 6 months
[JBoss Messaging] - Re: LocalTx, ClientTransaction leak?
by ydzsidemiik
I've studied the GC root paths for some of these objects, they all look like this:
| org.jboss.jms.tx.ClientTransaction
| <- value of EDU.oswego.cs.dl.util.concurrent.ConcurrentHashMap$Entry
| <- [287] of EDU.oswego.cs.dl.util.concurrent.ConcurrentHashMap$Entry[1025]
| <- table of EDU.oswego.cs.dl.util.concurrent.ConcurrentHashMap
| <- transactions of org.jboss.jms.tx.ResourceManager
| <- resourceManager of org.jboss.jms.client.state.ConnectionState
| <- parent of org.jboss.jms.client.state.SessionState
| <- parent of org.jboss.jms.client.state.ConsumerState
| <- state of org.jboss.jms.client.delegate.ClientConsumerDelegate [Stack Local]
|
Where the stack local is reported to be on the stack of 'Connection Consumer for dest JBossQueue[...]', which is a thread feeding an MDB.
I've collected allocation traces for some of these objects as well, and they all look like this:
| org.jboss.resource.connectionmanager.xa.JcaXAResourceWrapper.end(Xid, int)
| com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.delistResource(XAResource, int)
| org.jboss.resource.adapter.jms.JmsSession.close()
| ... earlier frames vary ...
|
It's strange that the traces cut off there since (looking at the source), no allocations occur in that function. However, I tried to figure out where the trace went from there and my guess is something like MessagingXAResource.end -> MessagingXAResource.unsetCurrentTransactionId -> ResourceManager.createLocalTx, which seems to be a plausible source of these allocations.
I don't know where to go from here. Please help :(
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4117935#4117935
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4117935
18 years, 6 months
[JBoss Seam] - Creating a simple selectOneMenu
by felixk2
Hi,
I'm trying to use a selectOneMenu for a String property in an Entity. For example I have an entity with:
@NotNull
| @Column(name="Status")
| @Length(max=16)
| private String status;
Instead of using a textbox for users to fill in this field i'd like to use a drop down with values that I populate. So I created the following h:selectOneMenu:
<s:decorate template="layout/edit.xhtml">
| <ui:define name="label">Status</ui:define>
| <h:selectOneMenu value="#{customerHome.instance.status}">
| <f:selectItem itemLabel="Active" itemValue="Active"/>
| <f:selectItem itemLabel="Inactive" itemValue="Inactive"/>
| </h:selectOneMenu>
| </s:decorate>
This works fine for submitting of the form. The selected itemValue will end up in the database. But when I want to view the data the proper selectItem is never selected. I know for example that #{customerHome.instance.status} contains the string "Inactive" but the form shows "Active".
Any ideas how to fix that?
Thanks,
Felix
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4117934#4117934
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4117934
18 years, 6 months
[Persistence, JBoss/CMP, Hibernate, Database] - hsqldb-ds configuration for server-mode!?
by Mussie
hello forum,
I'm trying to build a database aplication with jboss and could not make my
data persistent. I allready changed the persistence from create-drop to update in the seam booking example.
So here is my question:
is it correct that I have to change the hsqldb into server mode to make the
data persistent?
I tried to do so by changing the hsqldb-ds.xml in my deploy directory. But when I start my hsql database manager it is still in in-memory type only the URL changed to jdbc:hsqldb:hsql://127.0.0.1:1701.
Does anyone know why my database engine doesn't convert to server based persistence?
This is how my hsqldb-ds looks like.
<?xml version="1.0" encoding="UTF-8"?>
|
| <!-- The Hypersonic embedded database JCA connection factory config -->
|
| <!-- $Id: hsqldb-ds.xml 63175 2007-05-21 16:26:06Z rrajesh $ -->
|
| <datasources>
| <local-tx-datasource>
|
| <!-- The jndi name of the DataSource, it is prefixed with java:/ -->
| <!-- Datasources are not available outside the virtual machine -->
| <jndi-name>DefaultDS</jndi-name>
|
| <!-- For server mode db, allowing other processes to use hsqldb over tcp.
| This requires the org.jboss.jdbc.HypersonicDatabase mbean.-->
| <connection-url>jdbc:hsqldb:hsql://${jboss.bind.address}:1701</connection-url>
|
| <!-- For totally in-memory db, not saved when jboss stops.
| The org.jboss.jdbc.HypersonicDatabase mbean is required for proper db shutdown
| <connection-url>jdbc:hsqldb:.</connection-url>
| -->
| <!-- For in-process persistent db, saved when jboss stops.
| The org.jboss.jdbc.HypersonicDatabase mbean is required for proper db shutdown
|
| <connection-url>jdbc:hsqldb:${jboss.server.data.dir}${/}hypersonic${/}localDB</connection-url>
| -->
| <!-- The driver class -->
| <driver-class>org.hsqldb.jdbcDriver</driver-class>
|
| <!-- The login and password -->
| <user-name>sa</user-name>
| <password></password>
|
| <!--example of how to specify class that determines if exception means connection should be destroyed-->
| <!--exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.DummyExceptionSorter</exception-sorter-class-name-->
|
| <!-- this will be run before a managed connection is removed from the pool for use by a client-->
| <!--<check-valid-connection-sql>select * from something</check-valid-connection-sql> -->
|
| <!-- The minimum connections in a pool/sub-pool. Pools are lazily constructed on first use -->
| <min-pool-size>5</min-pool-size>
|
| <!-- The maximum connections in a pool/sub-pool -->
| <max-pool-size>20</max-pool-size>
|
| <!-- The time before an unused connection is destroyed -->
| <!-- NOTE: This is the check period. It will be destroyed somewhere between 1x and 2x this timeout after last use -->
| <!-- TEMPORARY FIX! - Disable idle connection removal, HSQLDB has a problem with not reaping threads on closed connections -->
| <idle-timeout-minutes>0</idle-timeout-minutes>
|
| <!-- sql to call when connection is created
| <new-connection-sql>some arbitrary sql</new-connection-sql>
| -->
|
| <!-- sql to call on an existing pooled connection when it is obtained from pool
| <check-valid-connection-sql>some arbitrary sql</check-valid-connection-sql>
| -->
|
| <!-- example of how to specify a class that determines a connection is valid before it is handed out from the pool
| <valid-connection-checker-class-name>org.jboss.resource.adapter.jdbc.vendor.DummyValidConnectionChecker</valid-connection-checker-class-name>
| -->
|
| <!-- Whether to check all statements are closed when the connection is returned to the pool,
| this is a debugging feature that should be turned off in production -->
| <track-statements/>
|
| <!-- Use the getConnection(user, pw) for logins
| <application-managed-security/>
| -->
|
| <!-- Use the security domain defined in conf/login-config.xml -->
| <security-domain>HsqlDbRealm</security-domain>
|
| <!-- Use the security domain defined in conf/login-config.xml or the
| getConnection(user, pw) for logins. The security domain takes precedence.
| <security-domain-and-application>HsqlDbRealm</security-domain-and-application>
| -->
|
| <!-- HSQL DB benefits from prepared statement caching -->
| <prepared-statement-cache-size>32</prepared-statement-cache-size>
|
| <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml -->
| <metadata>
| <type-mapping>Hypersonic SQL</type-mapping>
| </metadata>
|
| <!-- When using in-process (standalone) mode
| <depends>jboss:service=Hypersonic,database=localDB</depends>-->
| <!-- Uncomment when using hsqldb in server mode-->
| <depends>jboss:service=Hypersonic</depends>
|
| </local-tx-datasource>
|
| <!-- Uncomment if you want hsqldb accessed over tcp (server mode)-->
| <mbean code="org.jboss.jdbc.HypersonicDatabase"
| name="jboss:service=Hypersonic">
| <attribute name="Port">1701</attribute>
| <attribute name="BindAddress">${jboss.bind.address}</attribute>
| <attribute name="Silent">true</attribute>
| <attribute name="Database">default</attribute>
| <attribute name="Trace">false</attribute>
| <attribute name="No_system_exit">true</attribute>
| </mbean>
|
|
| <!-- For hsqldb accessed from jboss only, in-process (standalone) mode
| <mbean code="org.jboss.jdbc.HypersonicDatabase"
| name="jboss:service=Hypersonic,database=localDB">
| <attribute name="Database">localDB</attribute>
| <attribute name="InProcessMode">true</attribute>
| </mbean>
| -->
| </datasources>
|
thanks and best regards,
Mussie
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4117912#4117912
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4117912
18 years, 6 months
[JBoss jBPM] - eclipse designer setup issues
by UmaSantharam
Hi,
I am trying to setup the designer tool for JBPM.
# I jave downloadeded jbpm-jpdl-suite-3.2.2.zip and unzipped the archive. downloaded eclipse-SDK-3.3-win32.zip and copied to folder D:\jbpm\jbpm-jpdl-suite-3.2.2\jbpm-jpdl-3.2.2\designer.
# Now i modified buidl.properties and then run "ant install" script and I got successful build message also. But when I start the eclipse, it does not show Java process project in file new project option.
# T downloaded jbpm-jpdl-designer-3.1.1.zip and tried to install thru "Help->Software updates find and install". The installation is successful. But the file new project DOES NOT SHOW the JBPM Process project. Please help me. I am trying this last 2 days with NO SUCESSS
with rgds
Uma Santharam
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4117909#4117909
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4117909
18 years, 6 months
[JBoss Seam] - Properties file and subdirectories?
by bm97
Hi,
i use hibernate validator to annotate and validate the domain model. After searching in this forum i found no real solution to the question "where to put the ValidatorMessages.properties file".
I wrote several own validators so i had to introduce such a resource bundle. I put the file into src/main/resources (default maven structure). In this situation the file is found by hibernate validator. But i don't want to "pollute" the root-directory of src/main/resources with localization files, so i put them in a sub directory. In this situation the properties file is not found anymore.
How can hibernate validator find the file located in a subdirectory (without touching the original jar file)?
Any remarks?
Thanks in advance, Ben
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4117901#4117901
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4117901
18 years, 6 months
[JBossWS] - javax/annotation/PostConstruct
by zeeshan.javeed
Hi,
I am trying to intercept soap request and i am getting followin error on run time. java.lang.NoClassDefFoundError: javax/annotation/PostConstruct
Detailed error is:
Servlet.service() for servlet WIPEServlet threw exception
java.lang.NoClassDefFoundError: javax/annotation/PostConstruct
at org.jboss.ws.core.jaxws.handler.HandlerResolverImpl.callPostConstruct(HandlerResolverImpl.java:194)
at org.jboss.ws.core.jaxws.handler.HandlerResolverImpl.addHandler(HandlerResolverImpl.java:160)
at org.jboss.ws.core.jaxws.handler.HandlerResolverImpl.initHandlerChain(HandlerResolverImpl.java:134)
at org.jboss.ws.core.jaxws.handler.HandlerDelegateJAXWS.callRequestHandlerChain(HandlerDelegateJAXWS.java:80)
at org.jboss.ws.core.server.ServiceEndpointInvoker.callRequestHandlerChain(ServiceEndpointInvoker.java:126)
at org.jboss.ws.core.server.ServiceEndpointInvoker.invoke(ServiceEndpointInvoker.java:170)
at org.jboss.wsf.stack.jbws.RequestHandlerImpl.processRequest(RequestHandlerImpl.java:408)
at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest(RequestHandlerImpl.java:272)
at org.jboss.wsf.stack.jbws.RequestHandlerImpl.doPost(RequestHandlerImpl.java:189)
at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:122)
at org.jboss.wsf.stack.jbws.EndpointServlet.service(EndpointServlet.java:84)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
----
Regards,
Zeeshan
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4117900#4117900
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4117900
18 years, 6 months
[EJB 3.0] - Accent
by Chloe
Hi,
I use jboss-4.0.5.GA and jboss-seam-1.2.1.GA.
I want to do a search of member in my website.
I want to compare input parameters with the members name (in the database) without any accent in order to have more results in this query.
To sum up, I want to search for string in EJB-QL, but without a perfect match on characters with accent. I want a "ÃÂé"(acute accent or grave accent) to be searched as a "e".
I found in O'Reilly documentation only these functions (to format string) :
- LOWER(String);
- UPPER(String);
- TRIM([[LEADING | TRAILING | BOTH] [trim_char] FROM] String);
- CONCAT(String1, String2);
- LENGTH(String);
- LOCATE(String1, String2 [, start]);
- SUBSTRING(String1, start, length).
Is there a function which remove accent or replace it in EJB-QL ?
Thank you !
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4117893#4117893
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4117893
18 years, 6 months
[JBossCache] - Re: newbie question - ReplicationException
by aditsu
Hi, I decided to come back to this problem and find a better solution than the random sleeps and retries.
We tried using optimistic locking, but it doesn't seem to help at all.
Here's a test program, using 2 replicated cache instances and writing to the same node:
| package CacheRepl;
|
| import java.util.concurrent.atomic.AtomicInteger;
|
| import javax.transaction.UserTransaction;
|
| import org.apache.log4j.Logger;
| import org.jboss.cache.Cache;
| import org.jboss.cache.DefaultCacheFactory;
| import org.jboss.cache.Fqn;
| import org.jboss.cache.transaction.DummyTransactionManager;
| import org.jboss.cache.transaction.DummyUserTransaction;
|
| public class CacheThread extends Thread {
| private static final Logger LOG = Logger.getLogger("test");
| private static final int THREADS = 2;
| private static final int REPEAT = 20;
| private static final int SLEEP_TIME = 10;
|
| protected int threadId;
| protected final Cache<Object, Object> cache;
|
| public CacheThread(final int threadId) {
| this.threadId = threadId;
| cache = DefaultCacheFactory.getInstance().createCache("replSync-service.xml", true);
| }
|
| private boolean doTransaction() {
| final UserTransaction tx = new DummyUserTransaction(DummyTransactionManager.getInstance());
| try {
| tx.begin();
| cache.put(new Fqn<Object>("node"), "key", "value" + threadId);
| tx.commit();
| return true;
| } catch (Exception e) {
| LOG.error("transaction failed", e);
| try {
| tx.rollback();
| } catch (Exception e1) {
| LOG.warn("rollback failed", e1);
| }
| return false;
| }
| }
|
| @Override
| public void run() {
| int failed = 0;
| for (int i = 0; i < REPEAT; ++i) {
| try {
| Thread.sleep(SLEEP_TIME);
| } catch (Exception e) {
| e.printStackTrace();
| }
| if (!doTransaction()) {
| failed++;
| }
| }
| System.out.println("Thread" + threadId + ": " + failed + " failures");
| }
|
| private void close() {
| cache.stop();
| }
|
| public static void main(String[] args) throws InterruptedException {
| final CacheThread[] threads = new CacheThread[THREADS];
| for (int t = 0; t < THREADS; t++) {
| threads[t] = new CacheThread(t);
| }
| for (int t = 0; t < THREADS; t++) {
| threads[t].start();
| }
| System.out.println("started");
| for (int t = 0; t < THREADS; t++) {
| threads[t].join();
| }
| for (int t = 0; t < THREADS; t++) {
| threads[t].close();
| }
| }
| }
|
and the cache configuration:
| <server>
| <mbean code="org.jboss.cache.jmx.CacheJmxWrapper"
| name="jboss.cache:service=TreeCache">
|
| <depends>jboss:service=Naming</depends>
| <depends>jboss:service=TransactionManager</depends>
|
| <attribute name="TransactionManagerLookupClass">org.jboss.cache.transaction.DummyTransactionManagerLookup
| </attribute>
| <!--
| Node locking scheme:
| OPTIMISTIC
| PESSIMISTIC (default)
| -->
| <attribute name="NodeLockingScheme">OPTIMISTIC</attribute>
| <!--
| Isolation level : SERIALIZABLE
| REPEATABLE_READ (default)
| READ_COMMITTED
| READ_UNCOMMITTED
| NONE
| -->
| <attribute name="IsolationLevel">READ_COMMITTED</attribute>
|
| <attribute name="CacheMode">REPL_SYNC</attribute>
|
| <attribute name="ClusterName">Test cache</attribute>
|
| <attribute name="ClusterConfig">
| <config>
| <UDP bind_addr="10.0.0.226"
| mcast_addr="228.10.10.10"
| mcast_port="45588"
| tos="8"
| ucast_recv_buf_size="20000000"
| ucast_send_buf_size="640000"
| mcast_recv_buf_size="25000000"
| mcast_send_buf_size="640000"
| loopback="false"
| discard_incompatible_packets="true"
| max_bundle_size="64000"
| max_bundle_timeout="30"
| use_incoming_packet_handler="true"
| ip_ttl="2"
| enable_bundling="false"
| enable_diagnostics="true"
| use_concurrent_stack="true"
| thread_naming_pattern="pl"
| thread_pool.enabled="true"
| thread_pool.min_threads="1"
| thread_pool.max_threads="25"
| thread_pool.keep_alive_time="30000"
| thread_pool.queue_enabled="true"
| thread_pool.queue_max_size="10"
| thread_pool.rejection_policy="Run"
| oob_thread_pool.enabled="true"
| oob_thread_pool.min_threads="1"
| oob_thread_pool.max_threads="4"
| oob_thread_pool.keep_alive_time="10000"
| oob_thread_pool.queue_enabled="true"
| oob_thread_pool.queue_max_size="10"
| oob_thread_pool.rejection_policy="Run"/>
| <PING timeout="2000" num_initial_members="3"/>
| <MERGE2 max_interval="30000" min_interval="10000"/>
| <FD_SOCK/>
| <FD timeout="10000" max_tries="5" shun="true"/>
| <VERIFY_SUSPECT timeout="1500"/>
| <pbcast.NAKACK max_xmit_size="60000"
| use_mcast_xmit="false" gc_lag="0"
| retransmit_timeout="300,600,1200,2400,4800"
| discard_delivered_msgs="true"/>
| <UNICAST timeout="300,600,1200,2400,3600"/>
| <pbcast.STABLE stability_delay="1000" desired_avg_gossip="50000"
| max_bytes="400000"/>
| <pbcast.GMS print_local_addr="true" join_timeout="5000"
| join_retry_timeout="2000" shun="false"
| view_bundling="true" view_ack_collection_timeout="5000"/>
| <FRAG2 frag_size="60000"/>
| <pbcast.STREAMING_STATE_TRANSFER use_reading_thread="true"/>
| <!-- <pbcast.STATE_TRANSFER/> -->
| <pbcast.FLUSH timeout="0"/>
| </config>
| </attribute>
|
| <attribute name="FetchInMemoryState">true</attribute>
| <attribute name="StateRetrievalTimeout">15000</attribute>
| <attribute name="SyncReplTimeout">15000</attribute>
| <attribute name="LockAcquisitionTimeout">1000</attribute>
|
| <attribute name="UseRegionBasedMarshalling">true</attribute>
| <attribute name="TransactionTimeout">300</attribute>
| </mbean>
|
| </server>
|
With both pessimistic and optimistic locking, there are failures every time.
Here are some example exceptions:
- optimistic locking:
| org.jboss.cache.lock.TimeoutException: failure acquiring lock: fqn=/, caller=GlobalTransaction:<10.0.0.226:32932>:1, lock=write owner=GlobalTransaction:<10.0.0.226:32931>:2 (org.jboss.cache.lock.LockStrategyReadCommitted@1fd6bea)
| at org.jboss.cache.lock.IdentityLock.acquire(IdentityLock.java:528)
| at org.jboss.cache.interceptors.OptimisticLockingInterceptor.lockNodes(OptimisticLockingInterceptor.java:119)
| at org.jboss.cache.interceptors.OptimisticLockingInterceptor.invoke(OptimisticLockingInterceptor.java:52)
| at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:76)
| at org.jboss.cache.interceptors.OptimisticReplicationInterceptor.invoke(OptimisticReplicationInterceptor.java:73)
| at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:76)
| at org.jboss.cache.interceptors.NotificationInterceptor.invoke(NotificationInterceptor.java:32)
| at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:76)
| at org.jboss.cache.interceptors.TxInterceptor.handleOptimisticPrepare(TxInterceptor.java:374)
| at org.jboss.cache.interceptors.TxInterceptor.handleRemotePrepare(TxInterceptor.java:250)
| at org.jboss.cache.interceptors.TxInterceptor.invoke(TxInterceptor.java:100)
| at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:76)
| at org.jboss.cache.interceptors.CacheMgmtInterceptor.invoke(CacheMgmtInterceptor.java:123)
| at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:76)
| at org.jboss.cache.interceptors.InvocationContextInterceptor.invoke(InvocationContextInterceptor.java:62)
| at org.jboss.cache.CacheImpl.invokeMethod(CacheImpl.java:3939)
| at org.jboss.cache.CacheImpl._replicate(CacheImpl.java:2853)
| 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.jgroups.blocks.MethodCall.invoke(MethodCall.java:330)
| at org.jboss.cache.marshall.InactiveRegionAwareRpcDispatcher.handle(InactiveRegionAwareRpcDispatcher.java:77)
| at org.jgroups.blocks.RequestCorrelator.handleRequest(RequestCorrelator.java:624)
| at org.jgroups.blocks.RequestCorrelator.receiveMessage(RequestCorrelator.java:533)
| at org.jgroups.blocks.RequestCorrelator.receive(RequestCorrelator.java:365)
| at org.jgroups.blocks.MessageDispatcher$ProtocolAdapter.up(MessageDispatcher.java:736)
| at org.jgroups.JChannel.up(JChannel.java:1063)
| at org.jgroups.stack.ProtocolStack.up(ProtocolStack.java:325)
| at org.jgroups.protocols.pbcast.FLUSH.up(FLUSH.java:406)
| at org.jgroups.protocols.pbcast.STREAMING_STATE_TRANSFER.up(STREAMING_STATE_TRANSFER.java:255)
| at org.jgroups.protocols.FRAG2.up(FRAG2.java:197)
| at org.jgroups.protocols.pbcast.GMS.up(GMS.java:722)
| at org.jgroups.protocols.pbcast.STABLE.up(STABLE.java:234)
| at org.jgroups.protocols.UNICAST.up(UNICAST.java:263)
| at org.jgroups.protocols.pbcast.NAKACK.handleMessage(NAKACK.java:720)
| at org.jgroups.protocols.pbcast.NAKACK.up(NAKACK.java:546)
| at org.jgroups.protocols.VERIFY_SUSPECT.up(VERIFY_SUSPECT.java:167)
| at org.jgroups.protocols.FD.up(FD.java:322)
| at org.jgroups.protocols.FD_SOCK.up(FD_SOCK.java:298)
| at org.jgroups.protocols.MERGE2.up(MERGE2.java:145)
| at org.jgroups.protocols.Discovery.up(Discovery.java:220)
| at org.jgroups.protocols.TP$IncomingPacket.handleMyMessage(TP.java:1486)
| at org.jgroups.protocols.TP$IncomingPacket.run(TP.java:1440)
| at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
| at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
| at java.lang.Thread.run(Thread.java:595)
| Caused by: org.jboss.cache.lock.TimeoutException: write lock for / could not be acquired after 1000 ms. Locks: Read lock owners: []
| Write lock owner: GlobalTransaction:<10.0.0.226:32931>:2
| (caller=GlobalTransaction:<10.0.0.226:32932>:1, lock info: write owner=GlobalTransaction:<10.0.0.226:32931>:2 (org.jboss.cache.lock.LockStrategyReadCommitted@1fd6bea))
| at org.jboss.cache.lock.IdentityLock.acquireWriteLock0(IdentityLock.java:244)
| at org.jboss.cache.lock.IdentityLock.acquireWriteLock(IdentityLock.java:167)
| at org.jboss.cache.lock.IdentityLock.acquire(IdentityLock.java:497)
| ... 46 more
|
| javax.transaction.RollbackException: outcome is false status: 1
| at org.jboss.cache.transaction.DummyTransaction.commit(DummyTransaction.java:75)
| at org.jboss.cache.transaction.DummyBaseTransactionManager.commit(DummyBaseTransactionManager.java:78)
| at org.jboss.cache.transaction.DummyUserTransaction.commit(DummyUserTransaction.java:77)
| at CacheRepl.CacheThread.doTransaction(CacheThread.java:31)
| at CacheRepl.CacheThread.run(CacheThread.java:53)
|
- pessimistic locking:
| org.jboss.cache.lock.TimeoutException: failure acquiring lock: fqn=/node, caller=GlobalTransaction:<10.0.0.226:32933>:2, lock=write owner=GlobalTransaction:<10.0.0.226:32934>:1 (org.jboss.cache.lock.LockStrategyReadCommitted@1977b9b)
| at org.jboss.cache.lock.IdentityLock.acquire(IdentityLock.java:528)
| at org.jboss.cache.interceptors.PessimisticLockInterceptor$LockManager.acquire(PessimisticLockInterceptor.java:579)
| at org.jboss.cache.interceptors.PessimisticLockInterceptor.acquireNodeLock(PessimisticLockInterceptor.java:393)
| at org.jboss.cache.interceptors.PessimisticLockInterceptor.lock(PessimisticLockInterceptor.java:329)
| at org.jboss.cache.interceptors.PessimisticLockInterceptor.invoke(PessimisticLockInterceptor.java:187)
| at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:76)
| at org.jboss.cache.interceptors.ReplicationInterceptor.invoke(ReplicationInterceptor.java:34)
| at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:76)
| at org.jboss.cache.interceptors.NotificationInterceptor.invoke(NotificationInterceptor.java:32)
| at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:76)
| at org.jboss.cache.interceptors.TxInterceptor.replayModifications(TxInterceptor.java:511)
| at org.jboss.cache.interceptors.TxInterceptor.handlePessimisticPrepare(TxInterceptor.java:394)
| at org.jboss.cache.interceptors.TxInterceptor.handleRemotePrepare(TxInterceptor.java:254)
| at org.jboss.cache.interceptors.TxInterceptor.invoke(TxInterceptor.java:100)
| at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:76)
| at org.jboss.cache.interceptors.CacheMgmtInterceptor.invoke(CacheMgmtInterceptor.java:123)
| at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:76)
| at org.jboss.cache.interceptors.InvocationContextInterceptor.invoke(InvocationContextInterceptor.java:62)
| at org.jboss.cache.CacheImpl.invokeMethod(CacheImpl.java:3939)
| at org.jboss.cache.CacheImpl._replicate(CacheImpl.java:2853)
| 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.jgroups.blocks.MethodCall.invoke(MethodCall.java:330)
| at org.jboss.cache.marshall.InactiveRegionAwareRpcDispatcher.handle(InactiveRegionAwareRpcDispatcher.java:77)
| at org.jgroups.blocks.RequestCorrelator.handleRequest(RequestCorrelator.java:624)
| at org.jgroups.blocks.RequestCorrelator.receiveMessage(RequestCorrelator.java:533)
| at org.jgroups.blocks.RequestCorrelator.receive(RequestCorrelator.java:365)
| at org.jgroups.blocks.MessageDispatcher$ProtocolAdapter.up(MessageDispatcher.java:736)
| at org.jgroups.JChannel.up(JChannel.java:1063)
| at org.jgroups.stack.ProtocolStack.up(ProtocolStack.java:325)
| at org.jgroups.protocols.pbcast.FLUSH.up(FLUSH.java:406)
| at org.jgroups.protocols.pbcast.STREAMING_STATE_TRANSFER.up(STREAMING_STATE_TRANSFER.java:255)
| at org.jgroups.protocols.FRAG2.up(FRAG2.java:197)
| at org.jgroups.protocols.pbcast.GMS.up(GMS.java:722)
| at org.jgroups.protocols.pbcast.STABLE.up(STABLE.java:234)
| at org.jgroups.protocols.UNICAST.up(UNICAST.java:263)
| at org.jgroups.protocols.pbcast.NAKACK.handleMessage(NAKACK.java:720)
| at org.jgroups.protocols.pbcast.NAKACK.up(NAKACK.java:546)
| at org.jgroups.protocols.VERIFY_SUSPECT.up(VERIFY_SUSPECT.java:167)
| at org.jgroups.protocols.FD.up(FD.java:322)
| at org.jgroups.protocols.FD_SOCK.up(FD_SOCK.java:298)
| at org.jgroups.protocols.MERGE2.up(MERGE2.java:145)
| at org.jgroups.protocols.Discovery.up(Discovery.java:220)
| at org.jgroups.protocols.TP$IncomingPacket.handleMyMessage(TP.java:1486)
| at org.jgroups.protocols.TP$IncomingPacket.run(TP.java:1440)
| at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
| at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
| at java.lang.Thread.run(Thread.java:595)
| Caused by: org.jboss.cache.lock.TimeoutException: write lock for /node could not be acquired after 1000 ms. Locks: Read lock owners: []
| Write lock owner: GlobalTransaction:<10.0.0.226:32934>:1
| (caller=GlobalTransaction:<10.0.0.226:32933>:2, lock info: write owner=GlobalTransaction:<10.0.0.226:32934>:1 (org.jboss.cache.lock.LockStrategyReadCommitted@1977b9b))
| at org.jboss.cache.lock.IdentityLock.acquireWriteLock0(IdentityLock.java:244)
| at org.jboss.cache.lock.IdentityLock.acquireWriteLock(IdentityLock.java:167)
| at org.jboss.cache.lock.IdentityLock.acquire(IdentityLock.java:497)
| ... 49 more
|
| javax.transaction.RollbackException: outcome is false status: 1
| at org.jboss.cache.transaction.DummyTransaction.commit(DummyTransaction.java:75)
| at org.jboss.cache.transaction.DummyBaseTransactionManager.commit(DummyBaseTransactionManager.java:78)
| at org.jboss.cache.transaction.DummyUserTransaction.commit(DummyUserTransaction.java:77)
| at CacheRepl.CacheThread.doTransaction(CacheThread.java:31)
| at CacheRepl.CacheThread.run(CacheThread.java:53)
|
I don't care about the configuration details, but this test program should NEVER, EVER, NOT EVER, fail under any circumstances, except nuclear attack or something like that.
One cache should always get the lock first, write to the node, finish the transaction, then the other cache can do the same.
Just like 2 threads setting the same AtomicInteger - that NEVER throws an exception.
Is there any solution to this?
Thanks
Adrian
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4117891#4117891
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4117891
18 years, 6 months
[EJB/JBoss] - NoClassDefFoundError & JBoss AS 5.0 Beta3
by lovelyliatroim
Hi Folks,
Downloaded the latest AS Beta3. Set up a remote stateless bean and a remote client. When the client was calling the bean i got the following
|
| Exception in thread "main" java.lang.NoClassDefFoundError: org/jboss/aop/joinpoint/MethodExecution
| at java.lang.Class.getDeclaredConstructors0(Native Method)
| at java.lang.Class.privateGetDeclaredConstructors(Class.java:2357)
| at java.lang.Class.getConstructor0(Class.java:2671)
| at java.lang.Class.getDeclaredConstructor(Class.java:1953)
| at java.io.ObjectStreamClass.getExternalizableConstructor(ObjectStreamClass.java:1269)
| at java.io.ObjectStreamClass.access$1400(ObjectStreamClass.java:52)
| at java.io.ObjectStreamClass$2.run(ObjectStreamClass.java:418)
| at java.security.AccessController.doPrivileged(Native Method)
| at java.io.ObjectStreamClass.<init>(ObjectStreamClass.java:400)
| at java.io.ObjectStreamClass.lookup(ObjectStreamClass.java:297)
| at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1035)
| at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
| at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
| at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
| at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
| at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:302)
| at org.jboss.remoting.serialization.impl.java.JavaSerializationManager.sendObjectVersion2_2(JavaSerializationManager.java:120)
| at org.jboss.remoting.serialization.impl.java.JavaSerializationManager.sendObject(JavaSerializationManager.java:95)
| at org.jboss.remoting.marshal.serializable.SerializableMarshaller.write(SerializableMarshaller.java:120)
| at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.versionedWrite(MicroSocketClientInvoker.java:943)
| at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.transport(MicroSocketClientInvoker.java:586)
| at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:122)
| at org.jboss.remoting.Client.invoke(Client.java:1634)
| at org.jboss.remoting.Client.invoke(Client.java:548)
| at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:62)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPropagationInterceptor.java:61)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:65)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:74)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.stateless.StatelessRemoteProxy.invoke(StatelessRemoteProxy.java:108)
| at $Proxy1.getQuote(Unknown Source)
|
|
|
In the client package under $JBOSS_HOME/client i would expect all the right jars to be there for my remote client but it would seem that the jboss-aop-jdk50-client.jar is not packaged correctly i.e it is missing the "MethodExecution" class and what ever dependencies that has also.
To carry on i just added the jboss-aop-jdk50.jar located under $JBOSS_HOME/lib to my classpath and was able to make a remote call.
I assume that the $JBOSS_HOME/client dir should have everything needed for me to make a remote call for my remote client but looks like it doesnt!!
FYI ,
LL
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4117889#4117889
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4117889
18 years, 6 months
[JBoss jBPM] - Re: Invoking JBPM-3.2.2 Process from standalone java client
by soumya_in
Hi All,
I was able to start a process from a standalone java client by following the given steps:-
1. Migrated JBPM Database schema to Oracle 10g using the given oracle script.
2.Redeployed the jbpm-console.war by making changes in the jbpm-console/web-inf/classes/hibernate-cfg.xml file to redirect the application to the oracle DB.
3. Executed the following piece of code-
| jbpmConfiguration = JbpmConfiguration.parseResource("default.jbpm.cfg.xml");
| JbpmContext jbpmContext=jbpmConfiguration.createJbpmContext();
| GraphSession gpsession=jbpmContext.getGraphSession();
| ProcessDefinition pdef=gpsession.findLatestProcessDefinition("<process-name>");
| System.out.println("PROCESS DEFINITION ID" + pdef.getId());
| ProcessInstance processInstance = new ProcessInstance(pdef);
| Token token = processInstance.getRootToken();
| token.signal();//starts a task
| jbpmContext.close();
|
Thanks,
Soumya.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4117885#4117885
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4117885
18 years, 6 months
[JBoss Seam] - PORT
by jamesjmp
hello,
I have a seam-gened app, so its port is 8080.
I want to use a different port to access the application,for instance 6000, but I want the web-console and jmx-console to go on being accessed by means of 8080.
I have tried changing server.xml this way:
| <Connector port="6000" address="${jboss.bind.address}"
| maxThreads="250" strategy="ms" maxHttpHeaderSize="8192"
| emptySessionPath="true"
| enableLookups="false" redirectPort="8443" acceptCount="100"
| connectionTimeout="20000" disableUploadTimeout="true"/>
|
but as I supposed not only the app but the consoles are now accessed by 6000 port. I do want a different port for the consoles.
How may I configure the ports?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4117865#4117865
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4117865
18 years, 6 months
[JBoss Seam] - PORT
by jamesjmp
hello,
I have a seam-gened app, so its port is 8080.
I want to use a different port to access the application,for instance 6000, but I want the web-console and jmx-console to go on being accessed by means of 8080.
I have tried changing server.xml this way:
| <Connector port="6000" address="${jboss.bind.address}"
| maxThreads="250" strategy="ms" maxHttpHeaderSize="8192"
| emptySessionPath="true"
| enableLookups="false" redirectPort="8443" acceptCount="100"
| connectionTimeout="20000" disableUploadTimeout="true"/>
|
| but as I supposed not only the app but the consoles are now accessed by 6000 port. I do want a different port for the consoles.
| How may I configure the ports?
|
thank you!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4117864#4117864
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4117864
18 years, 6 months