[JBoss Seam] - Tomcat db connection problem
by Stateless Bean
Hi,
I moved my app to Seam 2.0 Beta1 and tomcat 6 and here I get problem.
For some reasons my connection get faild, before migration everythink worked fine.
Here is my stacktrace:
| 2007-08-13 17:00:06 org.apache.catalina.core.AprLifecycleListener init
| INFO: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jre1.5.0_09\bin;.;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;D:\Grzesiek - Laptop\Programy\Ant-1.7.0\bin;
| 2007-08-13 17:00:07 org.apache.coyote.http11.Http11Protocol init
| INFO: Initializing Coyote HTTP/1.1 on http-8080
| 2007-08-13 17:00:07 org.apache.catalina.startup.Catalina load
| INFO: Initialization processed in 1516 ms
| WARN 13-08 17:00:10,921 (UnifiedLoaderRepository3.java:addClassLoader:675) -Tried to add non-URLClassLoader. Ignored
| WARN 13-08 17:00:15,203 (TxControl.java:<clinit>:266) -[com.arjuna.ats.arjuna.coordinator.TxControl_1] - Name of XA node not defined. Using -3f57ffff:66d:46c071ff:0
| WARN 13-08 17:00:24,359 (JDBCPersistenceManager.java:start:143) -
|
| JBoss Messaging Warning: DataSource connection transaction isolation should be READ_COMMITTED, but it is currently NONE.
| Using an isolation level less strict than READ_COMMITTED may lead to data consistency problems.
| Using an isolation level more strict than READ_COMMITTED may lead to deadlock.
|
| 2007-08-13 17:00:27 org.apache.catalina.core.StandardService start
| INFO: Starting service Catalina
| 2007-08-13 17:00:27 org.apache.catalina.core.StandardEngine start
| INFO: Starting Servlet Engine: Apache Tomcat/6.0.13
| 2007-08-13 17:00:27 org.apache.catalina.startup.HostConfig deployWAR
| INFO: Deploying web application archive Universum.war
| 2007-08-13 17:00:30 org.apache.catalina.loader.WebappLoader start
| INFO: Dual registration of jndi stream handler: factory already defined
| WARN 13-08 17:01:14,656 (JBossTimerServiceFactory.java:restoreTimerService:112) -TIMER SERVICE IS NOT INSTALLED
| WARN 13-08 17:01:15,171 (JBossTimerServiceFactory.java:restoreTimerService:112) -TIMER SERVICE IS NOT INSTALLED
| WARN 13-08 17:01:20,921 (InternalManagedConnectionPool.java:getConnection:278) -Throwable while attempting to get a new connection: null
| org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (org.jboss.resource.JBossResourceException: Apparently wrong driver class specified for URL: class: org.postgresql.Driver, url: jdbc:postgresql://localhost:5432/Universum)
| at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.getLocalManagedConnection(LocalManagedConnectionFactory.java:201)
| at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:182)
| at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.createConnectionEventListener(InternalManagedConnectionPool.java:586)
| at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:254)
| at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(JBossManagedConnectionPool.java:580)
| at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:341)
| at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:351)
| at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:394)
| at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:838)
| at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:88)
| at org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider.getConnection(InjectedDataSourceConnectionProvider.java:47)
| at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:76)
| at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2006)
| at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1289)
| at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:691)
| at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:127)
| at org.jboss.ejb3.entity.PersistenceUnitDeployment.start(PersistenceUnitDeployment.java:246)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
| at java.lang.reflect.Method.invoke(Unknown Source)
|
| <?xml version="1.0" encoding="UTF-8"?>
|
| <!DOCTYPE datasources
| PUBLIC "-//JBoss//DTD JBOSS JCA Config 1.5//EN"
| "http://www.jboss.org/j2ee/dtd/jboss-ds_1_5.dtd">
|
| <datasources>
| <local-tx-datasource>
| <jndi-name>UniversumDatasource</jndi-name>
| <connection-url>jdbc:postgresql://localhost:5432/Universum</connection-url>
| <driver-class>org.postgresql.Driver</driver-class>
| <user-name>***</user-name>
| <password>***</password>
| <blocking-timeout-millis>50000</blocking-timeout-millis>
|
| <metadata>
| <type-mapping>PostgreSQL 8.2</type-mapping>
| </metadata>
| </local-tx-datasource>
| </datasources>
|
my connection driver is in *.war -> lib/ directory
postgresql-8.2-505.jdbc3.jar
I use postgres 8.2, can anyone explain me why after migration my connection doesn't work?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4073607#4073607
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4073607
18Â years, 11Â months
[JBoss Seam] - Re: seam lost database connection at termer service diapa
by loumaus
running into the same problems ..
help would be really appreciated..
2007-08-13 16:58:44,162 DEBUG [org.jboss.ejb.txtimer.EJBTimerServiceImpl] removeTimerService: org.jboss.ejb.txtimer.TimerServiceImpl@e1e567
2007-08-13 16:58:44,163 INFO [org.jboss.ejb3.EJBContainer] STOPPED EJB: de.jamba.catalog.ejb.CatalogServiceBean ejbName: ejb/catalogBean
2007-08-13 16:58:44,166 DEBUG [org.jboss.ejb3.stateless.StatelessDelegateWrapper] Starting failed jboss.j2ee:ear=cat.ear,jar=cat-ejb3.jar,name=ejb/catalogBean,service=EJB3
java.lang.NullPointerException
at org.jboss.ejb.txtimer.DatabasePersistencePolicy.listTimerHandles(DatabasePersistencePolicy.java:165)
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.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy30.listTimerHandles(Unknown Source)
at org.jboss.ejb.txtimer.EJBTimerServiceImpl.restoreTimers(EJBTimerServiceImpl.java:408)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4073604#4073604
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4073604
18Â years, 11Â months
[JBoss Seam] - extended persistence context with JavaBeans ?
by sirandreus
Hi,
How can I enable an extended persistence context using JavaBeans ? (without EJB).
I could not manage not get it work. Please read on in order to understand the problem.
Im using Seam with the following configuration:
- Seam 2.0 Beta1
- JBoss AS 4.2.1
- JavaBeans (without EJB)
- created Project using seam-gen as a war (not ear)
In the Seam book "Simplicity and Power beyond JEE" the author says that the persistence context of all Seam POJOs is extended.
In order to make sure, that this is true, I´ve ported the Clickable Lists example (from the official Tutorial := http://docs.jboss.org/seam/latest-2.0/reference/en/html/tutorial.html#mes...) into the JavaBeans Model. The only differences are:
1) no @Statefull Annotation at the MessageManagerBean class
2) added @Transactional at MessageManagerBean class (as a class level annotation, so that every method is made trasactional)
3) instad of @PersistenceContext, I use @In
The problem is, that the PersistenceContext is not extended as expected. For example, after calling the "select" method, a database update does "not" happen.
| public void select() {
| message.setRead(true);
| }
|
However if I replace the implementation with the following code, everything is fine (update happens):
| @Transactional
| public void select() {
| Message mergedMessage = entityManager.merge(message);
| mergedMessage.setRead(true);
|
| //message.setRead(true);
| }
|
The only logical explanation is that the PersistenceContext is not extended. Because if it was, the original select implementation should synchronize the state of the object with the database (and thus making an update).
thanks for your help,
Andreas
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4073599#4073599
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4073599
18Â years, 11Â months
[JBossCache] - Re: Can TcpDelegatingCacheLoader only delegate remove node?
by Rikr2
Hey Manik I subclass TcpDelegatingCacheLoader in this way:
package org.jboss.cache.loader.tcp;
|
| import java.util.Iterator;
| import java.util.List;
| import java.util.Map;
| import java.util.Set;
|
| import org.jboss.cache.Fqn;
| import org.jboss.cache.Modification;
| import org.jboss.cache.loader.DelegatingCacheLoader;
|
| public class MyTcpDelegatingCacheLoader extends TcpDelegatingCacheLoader {
|
| @Override
| protected void delegatePut(Fqn name, Map attributes) throws Exception {
| //nothing to do
| }
|
| @Override
| protected Object delegatePut(Fqn name, Object key, Object value) throws Exception {
| //nothing to do
| return null;
| }
|
|
| @Override
| protected Map delegateGet(Fqn arg0) throws Exception {
| return null;
| }
|
| @Override
| protected Set delegateGetChildrenNames(Fqn arg0) throws Exception {
| return null;
| }
|
| @Override
| protected void delegatePut(List modifications) throws Exception {
| synchronized (out)
| {
|
| out.reset();
| out.writeInt(DelegatingCacheLoader.putList);
| int length = modifications != null ? modifications.size() : 0;
| out.writeInt(length);
| if (length > 0)
| {
| for (Iterator it = modifications.iterator(); it.hasNext();)
| {
| Modification m = (Modification) it.next();
|
| if (m.getType() == Modification.REMOVE_NODE) { //added by me
| m.writeExternal(out);
| }
| }
| }
| out.flush();
| Object retval = in.readObject();
| if (retval instanceof Exception)
| throw(Exception) retval;
| }
|
| }
|
|
| }
and I configure my Caches in this manner:
TcpCacheServer
| <?xml version="1.0" encoding="UTF-8"?>
|
| <!-- ===================================================================== -->
| <!-- -->
| <!-- Sample PojoCache Service Configuration -->
| <!-- -->
| <!-- ===================================================================== -->
|
| <server>
|
| <!-- Used inside JBoss AS -->
| <classpath codebase="./lib" archives="jboss-cache-jdk50.jar, jgroups.jar"/>
|
| <!-- ==================================================================== -->
| <!-- Defines configuration -->
| <!-- ==================================================================== -->
|
| <mbean code="org.jboss.cache.aop.PojoCache"
| name="jboss.cache:service=BackEndCache">
|
| <!-- Used inside JBoss AS -->
| <depends>jboss:service=Naming</depends>
| <depends>jboss:service=TransactionManager</depends>
|
| <!--
| Configure the TransactionManager
|
| <attribute name="TransactionManagerLookupClass">org.jboss.cache.DummyTransactionManagerLookup</attribute>
| -->
| <attribute name="TransactionManagerLookupClass">org.jboss.cache.JBossTransactionManagerLookup</attribute>
| <!--
| Node locking scheme:
| OPTIMISTIC
| PESSIMISTIC (default)
| -->
| <attribute name="NodeLockingScheme">OPTIMISTIC</attribute>
|
| <!--
| Note that this attribute is IGNORED if your NodeLockingScheme above is OPTIMISTIC.
|
| Isolation level : SERIALIZABLE
| REPEATABLE_READ (default)
| READ_COMMITTED
| READ_UNCOMMITTED
| NONE
| -->
| <attribute name="IsolationLevel">REPEATABLE_READ</attribute>
|
| <!--
| Valid modes are LOCAL
| REPL_ASYNC
| REPL_SYNC
| INVALIDATION_ASYNC
| INVALIDATION_SYNC
| -->
| <attribute name="CacheMode">LOCAL</attribute>
| <!--
| <attribute name="UseInterceptorMbeans">true</attribute>
| -->
| <!-- Name of cluster. Needs to be the same for all clusters, in order
| to find each other
| -->
| <attribute name="ClusterName">BackEndCache-Cluster</attribute>
|
| <!-- JGroups protocol stack properties. Can also be a URL,
| e.g. file:/home/bela/default.xml
| <attribute name="ClusterProperties"></attribute>
| -->
| <!-- This ORIGINAL CONFIF OF JGROUPS -->
| <attribute name="ClusterConfig">
| <config>
| <!-- UDP: if you have a multihomed machine,
| set the bind_addr attribute to the appropriate NIC IP address -->
| <!-- UDP: On Windows machines, because of the media sense feature
| being broken with multicast (even after disabling media sense)
| set the loopback attribute to true -->
| <UDP mcast_addr="228.1.2.5" mcast_port="45577"
| ip_ttl="64" ip_mcast="true"
| mcast_send_buf_size="150000" mcast_recv_buf_size="80000"
| ucast_send_buf_size="150000" ucast_recv_buf_size="80000"
| loopback="false"/>
| <PING timeout="2000" num_initial_members="3"
| up_thread="false" down_thread="false"/>
| <MERGE2 min_interval="10000" max_interval="20000"/>
| <!-- <FD shun="true" up_thread="true" down_thread="true"/> -->
|
| <FD_SOCK/>
| <VERIFY_SUSPECT timeout="1500"
| up_thread="false" down_thread="false"/>
| <pbcast.NAKACK gc_lag="50" retransmit_timeout="600,1200,2400,4800"
| up_thread="false" down_thread="false"/>
| <pbcast.STABLE desired_avg_gossip="20000"
| up_thread="false" down_thread="false"/>
| <UNICAST timeout="600,1200,2400" window_size="100" min_threshold="10"
| down_thread="false"/>
| <FRAG frag_size="8192"
| down_thread="false" up_thread="false"/>
| <pbcast.GMS join_timeout="5000" join_retry_timeout="2000"
| shun="true" print_local_addr="true"/>
| <pbcast.STATE_TRANSFER up_thread="false" down_thread="false"/>
| </config>
| </attribute>
|
|
| <!--
| The max amount of time (in milliseconds) we wait until the
| initial state (ie. the contents of the cache) are retrieved from
| existing members in a clustered environment
| -->
| <attribute name="InitialStateRetrievalTimeout">20000</attribute>
|
| <!--
| Number of milliseconds to wait until all responses for a
| synchronous call have been received.
| -->
| <attribute name="SyncReplTimeout">15000</attribute>
|
| <!-- Max number of milliseconds to wait for a lock acquisition -->
| <attribute name="LockAcquisitionTimeout">10000</attribute>
|
| <!--
| <attribute name="EvictionPolicyClass"></attribute>
| -->
|
| <!-- Name of the eviction policy class. We have commented it off to disable eviction.
| -->
| <attribute name="EvictionPolicyClass">org.jboss.cache.aop.eviction.AopLRUPolicy</attribute>
|
| <!-- Specific eviction policy configurations. This is LRU -->
| <attribute name="EvictionPolicyConfig">
| <config>
| <attribute name="wakeUpIntervalSeconds">5</attribute>
| <!-- Cache wide default -->
| <region name="/_default_">
| <attribute name="maxNodes">1000</attribute>
| <attribute name="timeToLiveSeconds">600</attribute>
| <attribute name="maxAgeSeconds">1200</attribute>>
| </region>
| <!--
|
| <region name="/aop">
| <attribute name="maxNodes">5</attribute>
| <attribute name="timeToLiveSeconds">4</attribute>
| </region>
| <region name="/pojo">
| <attribute name="maxNodes">100</attribute>
| <attribute name="timeToLiveSeconds">4</attribute>
| </region>
| <region name="/testMaxNode">
| <attribute name="maxNodes">4</attribute>
| <attribute name="timeToLiveSeconds">100</attribute>
| </region> -->
| </config>
| </attribute>
| </mbean>
|
| <mbean code="org.jboss.cache.loader.tcp.TcpCacheServer" name="jboss.cache:service=TcpCacheServer">
| <depends optional-attribute-name="Cache"
| proxy-type="attribute">jboss.cache:service=BackEndCache</depends>
| <attribute name="BindAddress">${jboss.bind.address:localhost}</attribute>
| <attribute name="Port">7500</attribute>
| <attribute name="MBeanServerName"></attribute>
| <!--<attribute name="CacheName">jboss.cache:service=TreeCache</attribute>-->
| </mbean>
| </server>
TcpDelegatingCacheLoader
<?xml version="1.0" encoding="UTF-8"?>
|
| <!-- ===================================================================== -->
| <!-- -->
| <!-- Sample PojoCache Service Configuration -->
| <!-- -->
| <!-- ===================================================================== -->
|
| <server>
|
| <!-- Used inside JBoss AS -->
| <classpath codebase="./lib" archives="jboss-cache-jdk50.jar, jgroups.jar"/>
|
| <!-- ==================================================================== -->
| <!-- Defines configuration -->
| <!-- ==================================================================== -->
|
| <mbean code="org.jboss.cache.aop.PojoCache"
| name="jboss.cache:service=DelegatingCacheLoader">
|
| <!-- Used inside JBoss AS -->
| <depends>jboss:service=Naming</depends>
| <depends>jboss:service=TransactionManager</depends>
|
| <!--
| Configure the TransactionManager
|
| <attribute name="TransactionManagerLookupClass">org.jboss.cache.DummyTransactionManagerLookup</attribute>
| -->
| <attribute name="TransactionManagerLookupClass">org.jboss.cache.JBossTransactionManagerLookup</attribute>
|
| <!--
| Node locking scheme:
| OPTIMISTIC
| PESSIMISTIC (default)
| -->
| <attribute name="NodeLockingScheme">OPTIMISTIC</attribute>
|
| <!--
| Note that this attribute is IGNORED if your NodeLockingScheme above is OPTIMISTIC.
|
| Isolation level : SERIALIZABLE
| REPEATABLE_READ (default)
| READ_COMMITTED
| READ_UNCOMMITTED
| NONE
| -->
| <attribute name="IsolationLevel">REPEATABLE_READ</attribute>
|
| <!--
| Valid modes are LOCAL
| REPL_ASYNC
| REPL_SYNC
| INVALIDATION_ASYNC
| INVALIDATION_SYNC
| -->
| <attribute name="CacheMode">LOCAL</attribute>
|
| <!-- Name of cluster. Needs to be the same for all clusters, in order
| to find each other
| -->
| <attribute name="ClusterName">DelegatingCacheLoader-Cluster</attribute>
|
| <!-- JGroups protocol stack properties. Can also be a URL,
| e.g. file:/home/bela/default.xml
| <attribute name="ClusterProperties"></attribute>
| -->
| <!-- This ORIGINAL CONFIF OF JGROUPS -->
| <attribute name="ClusterConfig">
| <config>
| <!-- UDP: if you have a multihomed machine,
| set the bind_addr attribute to the appropriate NIC IP address -->
| <!-- UDP: On Windows machines, because of the media sense feature
| being broken with multicast (even after disabling media sense)
| set the loopback attribute to true -->
| <UDP mcast_addr="228.1.2.3" mcast_port="48866"
| ip_ttl="64" ip_mcast="true"
| mcast_send_buf_size="150000" mcast_recv_buf_size="80000"
| ucast_send_buf_size="150000" ucast_recv_buf_size="80000"
| loopback="false"/>
| <PING timeout="2000" num_initial_members="3"
| up_thread="false" down_thread="false"/>
| <MERGE2 min_interval="10000" max_interval="20000"/>
| <!-- <FD shun="true" up_thread="true" down_thread="true"/> -->
|
| <FD_SOCK/>
| <VERIFY_SUSPECT timeout="1500"
| up_thread="false" down_thread="false"/>
| <pbcast.NAKACK gc_lag="50" retransmit_timeout="600,1200,2400,4800"
| up_thread="false" down_thread="false"/>
| <pbcast.STABLE desired_avg_gossip="20000"
| up_thread="false" down_thread="false"/>
| <UNICAST timeout="600,1200,2400" window_size="100" min_threshold="10"
| down_thread="false"/>
| <FRAG frag_size="8192"
| down_thread="false" up_thread="false"/>
| <pbcast.GMS join_timeout="5000" join_retry_timeout="2000"
| shun="true" print_local_addr="true"/>
| <pbcast.STATE_TRANSFER up_thread="false" down_thread="false"/>
| </config>
| </attribute>
|
| <!--
| The max amount of time (in milliseconds) we wait until the
| initial state (ie. the contents of the cache) are retrieved from
| existing members in a clustered environment
| -->
| <attribute name="InitialStateRetrievalTimeout">20000</attribute>
|
| <!--
| Number of milliseconds to wait until all responses for a
| synchronous call have been received.
| -->
| <attribute name="SyncReplTimeout">15000</attribute>
|
| <!-- Max number of milliseconds to wait for a lock acquisition -->
| <attribute name="LockAcquisitionTimeout">10000</attribute>
|
| <!--
| <attribute name="EvictionPolicyClass"></attribute>
| -->
|
| <!-- Name of the eviction policy class. We have commented it off to disable eviction.
| -->
| <attribute name="EvictionPolicyClass">org.jboss.cache.aop.eviction.AopLRUPolicy</attribute>
|
| <!-- Specific eviction policy configurations. This is LRU -->
| <attribute name="EvictionPolicyConfig">
| <config>
| <attribute name="wakeUpIntervalSeconds">5</attribute>
| <!-- Cache wide default -->
| <region name="/_default_">
| <attribute name="maxNodes">1000</attribute>
| <attribute name="timeToLiveSeconds">600</attribute>
| <attribute name="maxAgeSeconds">1200</attribute>>
| </region>
| <!--
| <region name="/aop">
| <attribute name="maxNodes">5</attribute>
| <attribute name="timeToLiveSeconds">4</attribute>
| </region>
| <region name="/pojo">
| <attribute name="maxNodes">100</attribute>
| <attribute name="timeToLiveSeconds">4</attribute>
| </region>
| <region name="/testMaxNode">
| <attribute name="maxNodes">4</attribute>
| <attribute name="timeToLiveSeconds">100</attribute>
| </region> -->
| </config>
| </attribute>
| <attribute name="CacheLoaderConfiguration">
| <config>
| <cacheloader>
| <class>org.jboss.cache.loader.tcp.MyTcpDelegatingCacheLoader</class>
| <!--<class>com.procyonsoluciones.mobistore.core.commom.cache.TcpDelegatingCache</class> -->
| <properties>
| host=localhost
| port=7500
| </properties>
| <ignoreModifications>true</ignoreModifications>
| </cacheloader>
| </config>
| </attribute>
| </mbean>
|
| </server>
Later I try to store an object in my DelegatingCacheLoader through JMX Console (key= name, value = myname) and when i invoke the put Operation in DelegatingCacheLoader service this never end, it seems to be waiting for something. No error message is thrown. did I some wrong or i need to configure something else?
Thanks in advance
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4073598#4073598
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4073598
18Â years, 11Â months
[JBoss Seam] - Re: entityManager goes null on form submit?
by wesleyhales
ERROR 13-08 10:44:39,394 (ContextualHttpServletRequest.java:run:66) -ended request due to exception
| java.lang.IllegalStateException: No active event context
| at org.jboss.seam.core.Manager.instance(Manager.java:248)
| at org.jboss.seam.servlet.ContextualHttpServletRequest.run(ContextualHttpServletRequest.java:48)
| at com.autotrader.filter.RendererFilter.doFilter(RendererFilter.java:69)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._invokeDoFilter(TrinidadFilterImpl.java:253)
| at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:210)
| at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:164)
| at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:82)
| at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:68)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:68)
| at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:68)
| at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:68)
| at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:44)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:68)
| at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:127)
| at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:277)
| at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:68)
| at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:68)
| at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:149)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
| at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581)
| at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
| at java.lang.Thread.run(Thread.java:595)
| ERROR 13-08 10:44:39,394 (ExceptionFilter.java:doFilter:68) -handling uncaught exception
| javax.servlet.ServletException: java.lang.IllegalStateException: No active event context
| at org.jboss.seam.servlet.ContextualHttpServletRequest.run(ContextualHttpServletRequest.java:67)
| at com.autotrader.filter.RendererFilter.doFilter(RendererFilter.java:69)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._invokeDoFilter(TrinidadFilterImpl.java:253)
| at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:210)
| at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:164)
| at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:82)
| at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:68)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:68)
| at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:68)
| at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:68)
| at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:44)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:68)
| at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:127)
| at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:277)
| at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:68)
| at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:68)
| at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:149)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
| at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581)
| at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
| at java.lang.Thread.run(Thread.java:595)
| Caused by: java.lang.IllegalStateException: No active event context
| at org.jboss.seam.core.Manager.instance(Manager.java:248)
| at org.jboss.seam.servlet.ContextualHttpServletRequest.run(ContextualHttpServletRequest.java:48)
| ... 37 more
| ERROR 13-08 10:44:39,554 (ExceptionFilter.java:doFilter:69) -exception root cause
| java.lang.IllegalStateException: No active event context
| at org.jboss.seam.core.Manager.instance(Manager.java:248)
| at org.jboss.seam.servlet.ContextualHttpServletRequest.run(ContextualHttpServletRequest.java:48)
| at com.autotrader.filter.RendererFilter.doFilter(RendererFilter.java:69)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._invokeDoFilter(TrinidadFilterImpl.java:253)
| at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:210)
| at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:164)
| at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:82)
| at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:68)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:68)
| at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:68)
| at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:68)
| at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:44)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:68)
| at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:127)
| at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:277)
| at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:68)
| at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:68)
| at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:149)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
| at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581)
| at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
| at java.lang.Thread.run(Thread.java:595)
and here is my filter code
@Scope(APPLICATION)
| @BypassInterceptors
| @Filter(within="org.jboss.seam.web.ajax4jsfFilter")
| public class RendererFilter extends AbstractFilter {
|
| FilterConfig config;
| private DocumentBuilder documentBuilder;
| private static String CLASS_NAME = RendererFilter.class.getName();
| Logger log = Logger.getLogger(CLASS_NAME);
|
| public void init(FilterConfig config) throws ServletException {
| try {
| this.config = config;
| DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
| documentBuilder = factory.newDocumentBuilder();
| } catch (ParserConfigurationException e) {
| throw new ServletException(e);
| }
| }
|
|
| public void doFilter(final ServletRequest request, final ServletResponse response,
| final FilterChain chain) throws IOException, ServletException {
|
| new ContextualHttpServletRequest((HttpServletRequest) request) {
| @Override
| public void process() throws ServletException, IOException {
| HttpServletRequest req = (HttpServletRequest) request;
| HttpServletResponse resp = (HttpServletResponse) response;
|
| //Check to see if this filter should apply.
| String renderType = request.getParameter("RenderOutputType");
| if (renderType != null) {
| //Capture the content for this request
| ContentCaptureServletResponse capContent = new ContentCaptureServletResponse(resp);
| chain.doFilter(request, capContent);
|
| try {
| //Parse the XHTML content to a document that is readable by the XHTML renderer.
| ...
| renderer.createPDF(browserStream);
| return;
| }
|
| } catch (SAXException e) {
| throw new ServletException(e);
| } catch (DocumentException e) {
| throw new ServletException(e);
| }
|
|
| } else {
| //Normal processing
| chain.doFilter(request, response);
| }
|
| }
| }.run();
|
|
| }
|
|
| public void destroy() {
| }
| }
|
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4073594#4073594
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4073594
18Â years, 11Â months