james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Barry (JIRA)" <server-...@james.apache.org>
Subject [jira] [Commented] (JAMES-1266) Found an exception when sending a mail
Date Tue, 14 Jun 2011 14:06:47 GMT

    [ https://issues.apache.org/jira/browse/JAMES-1266?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13049190#comment-13049190
] 

Barry commented on JAMES-1266:
------------------------------

The issue is in JPA, I think it is just caused by dbcp pool. I added the configuration as
blelow:
    <bean id="datasource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
        <property name="driverClassName" value="${database.driverClassName}" />
        <property name="url" value="${database.url}" />
		<property name="minIdle" value="5"/>  
	    <property name="maxIdle" value="10"/>  
		<property name="timeBetweenEvictionRunsMillis" value="10000"/>
		<property name="minEvictableIdleTimeMillis" value="60000"/>
		<property name="testWhileIdle" value="true"/>
        <property name="username" value="${database.username}" />
        <property name="password" value="${database.password}" />
    </bean>

And I am using the Mysql, the exception does NOT exist. I never tested on other type DB. 

> Found an exception when sending a mail
> --------------------------------------
>
>                 Key: JAMES-1266
>                 URL: https://issues.apache.org/jira/browse/JAMES-1266
>             Project: JAMES Server
>          Issue Type: Bug
>          Components: Build System
>            Reporter: Barry
>
> DEBUG 09:02:08,281 | james.smtpserver | Unable to process request
> <openjpa-2.1.0-r422266:1071316 nonfatal user error> org.apache.openjpa.persistence.InvalidStateException:
This operation cannot be performed while a Transaction is active.
>         at org.apache.openjpa.kernel.BrokerImpl.close(BrokerImpl.java:4304)
>         at org.apache.openjpa.kernel.DelegatingBroker.close(DelegatingBroker.java:1346)
>         at org.apache.openjpa.persistence.EntityManagerImpl.close(EntityManagerImpl.java:1284)
>         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)
>         at org.springframework.orm.jpa.ExtendedEntityManagerCreator$ExtendedEntityManagerInvocationHandler.invoke(ExtendedEntityManagerCreator.java:365)
>         at $Proxy55.close(Unknown Source)
>         at org.apache.james.domainlist.jpa.JPADomainList.containsDomain(JPADomainList.java:119)
>         at org.apache.james.smtpserver.fastfail.ValidRcptHandler.isLocalDomain(ValidRcptHandler.java:152)
>         at org.apache.james.protocols.smtp.core.fastfail.AbstractValidRcptHandler.doRcpt(AbstractValidRcptHandler.java:49)
>         at org.apache.james.protocols.smtp.core.RcptCmdHandler.callHook(RcptCmdHandler.java:249)
>         at org.apache.james.protocols.smtp.core.RcptCmdHandler.callHook(RcptCmdHandler.java:39)
>         at org.apache.james.protocols.smtp.core.AbstractHookableCmdHandler.processHooks(AbstractHookableCmdHandler.java:92)
>         at org.apache.james.protocols.smtp.core.AbstractHookableCmdHandler.onCommand(AbstractHookableCmdHandler.java:59)
>         at org.apache.james.protocols.smtp.core.AbstractHookableCmdHandler.onCommand(AbstractHookableCmdHandler.java:40)
>         at org.apache.james.protocols.api.AbstractCommandDispatcher.onLine(AbstractCommandDispatcher.java:150)
>         at org.apache.james.protocols.impl.AbstractChannelUpstreamHandler.messageReceived(AbstractChannelUpstreamHandler.java:122)
>         at org.jboss.netty.handler.execution.ChannelEventRunnable.run(ChannelEventRunnable.java:69)
>         at org.jboss.netty.handler.execution.OrderedMemoryAwareThreadPoolExecutor$ChildExecutor.run(OrderedMemoryAwareThreadPoolExecutor.java:316)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
>         at java.lang.Thread.run(Unknown Source)
> DEBUG 09:02:08,453 | james.smtpserver | Unable to process request
> java.lang.NullPointerException
>         at org.apache.james.protocols.api.AbstractCommandDispatcher.onLine(AbstractCommandDispatcher.java:140)
>         at org.apache.james.protocols.impl.AbstractChannelUpstreamHandler.messageReceived(AbstractChannelUpstreamHandler.java:122)
>         at org.jboss.netty.handler.execution.ChannelEventRunnable.run(ChannelEventRunnable.java:69)
>         at org.jboss.netty.handler.execution.OrderedMemoryAwareThreadPoolExecutor$ChildExecutor.run(OrderedMemoryAwareThreadPoolExecutor.java:316)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
>         at java.lang.Thread.run(Unknown Source)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message