You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by vinsarwate <vi...@rediffmail.com> on 2011/12/02 12:27:43 UTC

Re: Reg: Controlling methods exposed in the Webservice class

I think service.xml supports following 

<excludeOperations>
    <operation>your method name here</operation>
</excludeOperations>

Thanks.


Abhijeet C Kale wrote:
> 
> Hi,
> 
> Is there anyway to control the methods to be exposed in the web service 
> class? I did not look much in the documentation for any support for 
> annotations.
> 
> Here is an eg, to elaborate on this.
> Class A is added to the service.xml as a parameter "ServiceClass". Class 
> has methodA and method B implementation.
> The idea is to only expose methodA and not methodB. Is there any 
> annotation support which can help doing this?
> 
> Thanks
> -- 
> Regards,
> Abhijeet C Kale
> *
> *
> 
> 

-- 
View this message in context: http://old.nabble.com/Reg%3A-Controlling-methods-exposed-in-the-Webservice-class-tp32756971p32901655.html
Sent from the Axis - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
For additional commands, e-mail: java-user-help@axis.apache.org


Re: Reg: Controlling methods exposed in the Webservice class

Posted by Charles Galpin <cg...@lhsw.com>.
You can also use the annotation

@WebMethod(exclude=true)

hth
charles

On Dec 2, 2011, at 6:27 AM, vinsarwate wrote:

> 
> I think service.xml supports following 
> 
> <excludeOperations>
>    <operation>your method name here</operation>
> </excludeOperations>
> 
> Thanks.
> 
> 
> Abhijeet C Kale wrote:
>> 
>> Hi,
>> 
>> Is there anyway to control the methods to be exposed in the web service 
>> class? I did not look much in the documentation for any support for 
>> annotations.
>> 
>> Here is an eg, to elaborate on this.
>> Class A is added to the service.xml as a parameter "ServiceClass". Class 
>> has methodA and method B implementation.
>> The idea is to only expose methodA and not methodB. Is there any 
>> annotation support which can help doing this?


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
For additional commands, e-mail: java-user-help@axis.apache.org


Re: Question about MySQL timeout problem

Posted by Ted Zeng <ze...@adobe.com>.
Hi Paul,

Thanks for pointing this. I am new to this Pool connection concept.
I have used mysql before and never had this timeout problem as I always close the connection right away.

After googling a  couple of hours and I am still not sure how to set "testOnBorrow = true" in Axis.
I am using stand alone Axis2. Most pages talks about how to set it up in tomcat, etc.

So I set it like the following:
getConnection("jdbc:mysql://localhost:3306/AndroidAuto?autoReconnect=true&testOnBorrow=true")

In public class DBServiceLifeCycle implements ServiceLifeCycle's startup method.

Is this the correct way to set this up?

Thanks,

-ted


On 12/12/11 1:45 AM, "Hodchenkov, Paul" <pa...@oxagile.com> wrote:

Hi Ted,
autoReconnect=true is not a proper solution: mysql close the connection if it was idle  for 2 hours. So if you access the closed connection you will have exception first and then auto reconnect, but
the original request will fail. You need to setup 'autoreconnect+connection test on borrow' at the pool level...


From: Ted Zeng [mailto:zeng@adobe.com]
Sent: Monday, December 12, 2011 11:39 AM
To: java-user@axis.apache.org
Subject: Re: Question about MySQL timeout problem

It looks like I fixed this problem with setting
autoReconnect=true
In DriverManager.getConnection() in the ServiceLifeCycle code.

I am using connection pool. I am pretty much following the Example code (DBService).
It seems the sample code should add "autoReconnect=true" to it. As the code stands now,
It should fail eventually when the database connection times out.

Thanks,

-ted


On 12/11/11 10:59 PM, "Hodchenkov, Paul" <pa...@oxagile.com> wrote:
Use connection pool in axis2 service (c3p0 for example)


From: Ted Zeng [mailto:zeng@adobe.com]
Sent: Friday, December 09, 2011 11:24 PM
To: java-user@axis.apache.org
Subject: Question about MySQL timeout problem

Hi all,

After my app. Runs ok with Axis2 for a while, I get the following exception on Axis2 and Axis is stuck.
My app. Could not talk to Axis anymore. If I reboot Axis2, then everything works again.

I google this and found out most are reported by Hibernate users and their solutions.
How should I resolve this? Is there a setting for Axis2 I need to set.

-Ted Zeng
Adobe Systems Inc.

---------------
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The last packet successfully received from the server was 39,903,899 milliseconds ago.  The last packet sent successfully to the server was 39,903,899 milliseconds ago. is longer than the server configured value of 'wait_timeout'. You should consider either expiring and/or testing connection validity before use in your application, increasing the server configured values for client timeouts, or using the Connector/J connection property 'autoReconnect=true' to avoid this problem.
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
    at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
    at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1116)
    at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:3364)
    at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1983)
    at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2163)
    at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2624)
    at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2127)
    at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2427)
    at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2345)
    at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2330)
    at db.AndroidAutoService.insertDevice(AndroidAutoService.java:102)
    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:597)
    at org.apache.axis2.rpc.receivers.RPCUtil.invokeServiceClass(RPCUtil.java:212)
    at org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver.invokeBusinessLogic(RPCInOnlyMessageReceiver.java:66)
    at org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:110)
    at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:181)
    at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:172)
    at org.apache.axis2.transport.http.HTTPWorker.service(HTTPWorker.java:296)
    at org.apache.axis2.transport.http.server.AxisHttpService.doService(AxisHttpService.java:281)
    at org.apache.axis2.transport.http.server.AxisHttpService.handleRequest(AxisHttpService.java:187)
    at org.apache.axis2.transport.http.server.HttpServiceProcessor.run(HttpServiceProcessor.java:82)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:637)
Caused by: java.net.SocketException: Broken pipe
    at java.net.SocketOutputStream.socketWrite0(Native Method)
    at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
    at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
    at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65)
    at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123)
    at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:3345)


RE: Question about MySQL timeout problem

Posted by "Hodchenkov, Paul" <pa...@oxagile.com>.
Hi Ted,
autoReconnect=true is not a proper solution: mysql close the connection if it was idle  for 2 hours. So if you access the closed connection you will have exception first and then auto reconnect, but
the original request will fail. You need to setup 'autoreconnect+connection test on borrow' at the pool level...

From: Ted Zeng [mailto:zeng@adobe.com]
Sent: Monday, December 12, 2011 11:39 AM
To: java-user@axis.apache.org
Subject: Re: Question about MySQL timeout problem

It looks like I fixed this problem with setting
autoReconnect=true
In DriverManager.getConnection() in the ServiceLifeCycle code.

I am using connection pool. I am pretty much following the Example code (DBService).
It seems the sample code should add "autoReconnect=true" to it. As the code stands now,
It should fail eventually when the database connection times out.

Thanks,

-ted


On 12/11/11 10:59 PM, "Hodchenkov, Paul" <pa...@oxagile.com> wrote:
Use connection pool in axis2 service (c3p0 for example)


From: Ted Zeng [mailto:zeng@adobe.com]
Sent: Friday, December 09, 2011 11:24 PM
To: java-user@axis.apache.org
Subject: Question about MySQL timeout problem

Hi all,

After my app. Runs ok with Axis2 for a while, I get the following exception on Axis2 and Axis is stuck.
My app. Could not talk to Axis anymore. If I reboot Axis2, then everything works again.

I google this and found out most are reported by Hibernate users and their solutions.
How should I resolve this? Is there a setting for Axis2 I need to set.

-Ted Zeng
Adobe Systems Inc.

---------------
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The last packet successfully received from the server was 39,903,899 milliseconds ago.  The last packet sent successfully to the server was 39,903,899 milliseconds ago. is longer than the server configured value of 'wait_timeout'. You should consider either expiring and/or testing connection validity before use in your application, increasing the server configured values for client timeouts, or using the Connector/J connection property 'autoReconnect=true' to avoid this problem.
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
    at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
    at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1116)
    at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:3364)
    at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1983)
    at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2163)
    at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2624)
    at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2127)
    at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2427)
    at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2345)
    at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2330)
    at db.AndroidAutoService.insertDevice(AndroidAutoService.java:102)
    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:597)
    at org.apache.axis2.rpc.receivers.RPCUtil.invokeServiceClass(RPCUtil.java:212)
    at org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver.invokeBusinessLogic(RPCInOnlyMessageReceiver.java:66)
    at org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:110)
    at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:181)
    at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:172)
    at org.apache.axis2.transport.http.HTTPWorker.service(HTTPWorker.java:296)
    at org.apache.axis2.transport.http.server.AxisHttpService.doService(AxisHttpService.java:281)
    at org.apache.axis2.transport.http.server.AxisHttpService.handleRequest(AxisHttpService.java:187)
    at org.apache.axis2.transport.http.server.HttpServiceProcessor.run(HttpServiceProcessor.java:82)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:637)
Caused by: java.net.SocketException: Broken pipe
    at java.net.SocketOutputStream.socketWrite0(Native Method)
    at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
    at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
    at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65)
    at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123)
    at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:3345)

Re: Question about MySQL timeout problem

Posted by Ted Zeng <ze...@adobe.com>.
It looks like I fixed this problem with setting
autoReconnect=true
In DriverManager.getConnection() in the ServiceLifeCycle code.

I am using connection pool. I am pretty much following the Example code (DBService).
It seems the sample code should add "autoReconnect=true" to it. As the code stands now,
It should fail eventually when the database connection times out.

Thanks,

-ted


On 12/11/11 10:59 PM, "Hodchenkov, Paul" <pa...@oxagile.com> wrote:

Use connection pool in axis2 service (c3p0 for example)


From: Ted Zeng [mailto:zeng@adobe.com]
Sent: Friday, December 09, 2011 11:24 PM
To: java-user@axis.apache.org
Subject: Question about MySQL timeout problem

Hi all,

After my app. Runs ok with Axis2 for a while, I get the following exception on Axis2 and Axis is stuck.
My app. Could not talk to Axis anymore. If I reboot Axis2, then everything works again.

I google this and found out most are reported by Hibernate users and their solutions.
How should I resolve this? Is there a setting for Axis2 I need to set.

-Ted Zeng
Adobe Systems Inc.

---------------
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The last packet successfully received from the server was 39,903,899 milliseconds ago.  The last packet sent successfully to the server was 39,903,899 milliseconds ago. is longer than the server configured value of 'wait_timeout'. You should consider either expiring and/or testing connection validity before use in your application, increasing the server configured values for client timeouts, or using the Connector/J connection property 'autoReconnect=true' to avoid this problem.
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
    at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
    at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1116)
    at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:3364)
    at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1983)
    at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2163)
    at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2624)
    at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2127)
    at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2427)
    at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2345)
    at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2330)
    at db.AndroidAutoService.insertDevice(AndroidAutoService.java:102)
    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:597)
    at org.apache.axis2.rpc.receivers.RPCUtil.invokeServiceClass(RPCUtil.java:212)
    at org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver.invokeBusinessLogic(RPCInOnlyMessageReceiver.java:66)
    at org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:110)
    at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:181)
    at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:172)
    at org.apache.axis2.transport.http.HTTPWorker.service(HTTPWorker.java:296)
    at org.apache.axis2.transport.http.server.AxisHttpService.doService(AxisHttpService.java:281)
    at org.apache.axis2.transport.http.server.AxisHttpService.handleRequest(AxisHttpService.java:187)
    at org.apache.axis2.transport.http.server.HttpServiceProcessor.run(HttpServiceProcessor.java:82)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:637)
Caused by: java.net.SocketException: Broken pipe
    at java.net.SocketOutputStream.socketWrite0(Native Method)
    at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
    at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
    at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65)
    at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123)
    at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:3345)


RE: Question about MySQL timeout problem

Posted by "Hodchenkov, Paul" <pa...@oxagile.com>.
Use connection pool in axis2 service (c3p0 for example)

From: Ted Zeng [mailto:zeng@adobe.com]
Sent: Friday, December 09, 2011 11:24 PM
To: java-user@axis.apache.org
Subject: Question about MySQL timeout problem

Hi all,

After my app. Runs ok with Axis2 for a while, I get the following exception on Axis2 and Axis is stuck.
My app. Could not talk to Axis anymore. If I reboot Axis2, then everything works again.

I google this and found out most are reported by Hibernate users and their solutions.
How should I resolve this? Is there a setting for Axis2 I need to set.

-Ted Zeng
Adobe Systems Inc.

---------------
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The last packet successfully received from the server was 39,903,899 milliseconds ago.  The last packet sent successfully to the server was 39,903,899 milliseconds ago. is longer than the server configured value of 'wait_timeout'. You should consider either expiring and/or testing connection validity before use in your application, increasing the server configured values for client timeouts, or using the Connector/J connection property 'autoReconnect=true' to avoid this problem.
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
    at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
    at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1116)
    at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:3364)
    at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1983)
    at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2163)
    at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2624)
    at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2127)
    at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2427)
    at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2345)
    at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2330)
    at db.AndroidAutoService.insertDevice(AndroidAutoService.java:102)
    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:597)
    at org.apache.axis2.rpc.receivers.RPCUtil.invokeServiceClass(RPCUtil.java:212)
    at org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver.invokeBusinessLogic(RPCInOnlyMessageReceiver.java:66)
    at org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:110)
    at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:181)
    at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:172)
    at org.apache.axis2.transport.http.HTTPWorker.service(HTTPWorker.java:296)
    at org.apache.axis2.transport.http.server.AxisHttpService.doService(AxisHttpService.java:281)
    at org.apache.axis2.transport.http.server.AxisHttpService.handleRequest(AxisHttpService.java:187)
    at org.apache.axis2.transport.http.server.HttpServiceProcessor.run(HttpServiceProcessor.java:82)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:637)
Caused by: java.net.SocketException: Broken pipe
    at java.net.SocketOutputStream.socketWrite0(Native Method)
    at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
    at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
    at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65)
    at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123)
    at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:3345)

Question about MySQL timeout problem

Posted by Ted Zeng <ze...@adobe.com>.
Hi all,

After my app. Runs ok with Axis2 for a while, I get the following exception on Axis2 and Axis is stuck.
My app. Could not talk to Axis anymore. If I reboot Axis2, then everything works again.

I google this and found out most are reported by Hibernate users and their solutions.
How should I resolve this? Is there a setting for Axis2 I need to set.

-Ted Zeng
Adobe Systems Inc.

---------------
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The last packet successfully received from the server was 39,903,899 milliseconds ago.  The last packet sent successfully to the server was 39,903,899 milliseconds ago. is longer than the server configured value of 'wait_timeout'. You should consider either expiring and/or testing connection validity before use in your application, increasing the server configured values for client timeouts, or using the Connector/J connection property 'autoReconnect=true' to avoid this problem.
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
    at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
    at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1116)
    at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:3364)
    at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1983)
    at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2163)
    at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2624)
    at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2127)
    at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2427)
    at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2345)
    at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2330)
    at db.AndroidAutoService.insertDevice(AndroidAutoService.java:102)
    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:597)
    at org.apache.axis2.rpc.receivers.RPCUtil.invokeServiceClass(RPCUtil.java:212)
    at org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver.invokeBusinessLogic(RPCInOnlyMessageReceiver.java:66)
    at org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:110)
    at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:181)
    at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:172)
    at org.apache.axis2.transport.http.HTTPWorker.service(HTTPWorker.java:296)
    at org.apache.axis2.transport.http.server.AxisHttpService.doService(AxisHttpService.java:281)
    at org.apache.axis2.transport.http.server.AxisHttpService.handleRequest(AxisHttpService.java:187)
    at org.apache.axis2.transport.http.server.HttpServiceProcessor.run(HttpServiceProcessor.java:82)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:637)
Caused by: java.net.SocketException: Broken pipe
    at java.net.SocketOutputStream.socketWrite0(Native Method)
    at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
    at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
    at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65)
    at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123)
    at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:3345)

Re: Question about passing parameter with string "null"

Posted by Ted Zeng <ze...@adobe.com>.
Hi Paul,

Thanks for the info. I have filtered out all the null cases so I don't see it anymore.

-ted

On 12/5/11 2:46 AM, "paul nibin" <ni...@gmail.com> wrote:

Hi,

I think this was an issue and it got fixed in the Axis 2 1.7.0. You could try this test case in the latest nightly build.

Regards,
Paul
On Sun, Dec 4, 2011 at 3:33 AM, Ted Zeng <ze...@adobe.com> wrote:
Hi all,

I pass some parameters as strings. Things work fine, except when a string is "null".
Then the "null" would shift to the end. So I have a parameter list:
"1", "null", "3"
Then the server side would receive:
"1","3","null"
Why would this happen? Is there anything I could do to fix this other than checking the parameters
Before sending out and modify the "null" to something else?

            <xs:element name="insertDevice">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element minOccurs="0" name="args0" nillable="true" type="xs:string"/>
                        <xs:element minOccurs="0" name="args1" nillable="true" type="xs:string"/>
                        <xs:element minOccurs="0" name="args2" nillable="true" type="xs:string"/>
                        <xs:element minOccurs="0" name="args3" nillable="true" type="xs:string"/>
                        <xs:element minOccurs="0" name="args4" nillable="true" type="xs:string"/>
                        <xs:element minOccurs="0" name="args5" nillable="true" type="xs:string"/>
                        <xs:element minOccurs="0" name="args6" nillable="true" type="xs:string"/>
                        <xs:element minOccurs="0" name="args7" nillable="true" type="xs:string"/>
                        <xs:element minOccurs="0" name="args8" nillable="true" type="xs:string"/>
                        <xs:element minOccurs="0" name="args9" nillable="true" type="xs:string"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>


Ted Zeng
AIR Android
Adobe Systems



Re: Question about passing parameter with string "null"

Posted by paul nibin <ni...@gmail.com>.
Hi,

I think this was an issue and it got fixed in the Axis 2 1.7.0. You could
try this test case in the latest nightly build.

Regards,
Paul
On Sun, Dec 4, 2011 at 3:33 AM, Ted Zeng <ze...@adobe.com> wrote:

>  Hi all,
>
> I pass some parameters as strings. Things work fine, except when a string
> is “null”.
> Then the “null” would shift to the end. So I have a parameter list:
> “1”, “null”, “3”
> Then the server side would receive:
> “1”,”3”,”null”
> Why would this happen? Is there anything I could do to fix this other than
> checking the parameters
> Before sending out and modify the “null” to something else?
>
>             <xs:element name="insertDevice">
>                 <xs:complexType>
>                     <xs:sequence>
>                         <xs:element minOccurs="0" name="args0"
> nillable="true" type="xs:string"/>
>                         <xs:element minOccurs="0" name="args1"
> nillable="true" type="xs:string"/>
>                         <xs:element minOccurs="0" name="args2"
> nillable="true" type="xs:string"/>
>                         <xs:element minOccurs="0" name="args3"
> nillable="true" type="xs:string"/>
>                         <xs:element minOccurs="0" name="args4"
> nillable="true" type="xs:string"/>
>                         <xs:element minOccurs="0" name="args5"
> nillable="true" type="xs:string"/>
>                         <xs:element minOccurs="0" name="args6"
> nillable="true" type="xs:string"/>
>                         <xs:element minOccurs="0" name="args7"
> nillable="true" type="xs:string"/>
>                         <xs:element minOccurs="0" name="args8"
> nillable="true" type="xs:string"/>
>                         <xs:element minOccurs="0" name="args9"
> nillable="true" type="xs:string"/>
>                     </xs:sequence>
>                 </xs:complexType>
>             </xs:element>
>
>
> Ted Zeng
> AIR Android
> Adobe Systems
>

Re: Question about passing parameter with string "null"

Posted by Ted Zeng <ze...@adobe.com>.
I forgot to mention I am using the latest Axis2.

-ted


On 12/3/11 2:03 PM, "Ted Zeng" <ze...@adobe.com> wrote:

Hi all,

I pass some parameters as strings. Things work fine, except when a string is "null".
Then the "null" would shift to the end. So I have a parameter list:
"1", "null", "3"
Then the server side would receive:
"1","3","null"
Why would this happen? Is there anything I could do to fix this other than checking the parameters
Before sending out and modify the "null" to something else?

            <xs:element name="insertDevice">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element minOccurs="0" name="args0" nillable="true" type="xs:string"/>
                        <xs:element minOccurs="0" name="args1" nillable="true" type="xs:string"/>
                        <xs:element minOccurs="0" name="args2" nillable="true" type="xs:string"/>
                        <xs:element minOccurs="0" name="args3" nillable="true" type="xs:string"/>
                        <xs:element minOccurs="0" name="args4" nillable="true" type="xs:string"/>
                        <xs:element minOccurs="0" name="args5" nillable="true" type="xs:string"/>
                        <xs:element minOccurs="0" name="args6" nillable="true" type="xs:string"/>
                        <xs:element minOccurs="0" name="args7" nillable="true" type="xs:string"/>
                        <xs:element minOccurs="0" name="args8" nillable="true" type="xs:string"/>
                        <xs:element minOccurs="0" name="args9" nillable="true" type="xs:string"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>


Ted Zeng
AIR Android
Adobe Systems


Question about passing parameter with string "null"

Posted by Ted Zeng <ze...@adobe.com>.
Hi all,

I pass some parameters as strings. Things work fine, except when a string is "null".
Then the "null" would shift to the end. So I have a parameter list:
"1", "null", "3"
Then the server side would receive:
"1","3","null"
Why would this happen? Is there anything I could do to fix this other than checking the parameters
Before sending out and modify the "null" to something else?

            <xs:element name="insertDevice">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element minOccurs="0" name="args0" nillable="true" type="xs:string"/>
                        <xs:element minOccurs="0" name="args1" nillable="true" type="xs:string"/>
                        <xs:element minOccurs="0" name="args2" nillable="true" type="xs:string"/>
                        <xs:element minOccurs="0" name="args3" nillable="true" type="xs:string"/>
                        <xs:element minOccurs="0" name="args4" nillable="true" type="xs:string"/>
                        <xs:element minOccurs="0" name="args5" nillable="true" type="xs:string"/>
                        <xs:element minOccurs="0" name="args6" nillable="true" type="xs:string"/>
                        <xs:element minOccurs="0" name="args7" nillable="true" type="xs:string"/>
                        <xs:element minOccurs="0" name="args8" nillable="true" type="xs:string"/>
                        <xs:element minOccurs="0" name="args9" nillable="true" type="xs:string"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>


Ted Zeng
AIR Android
Adobe Systems