[Resin-interest] Hessian Runtime Exception

2008-10-24 Thread 蒋剑峰
I'm studying the Hessian on resin.
According to the after page,I build the Hessian's client and server.
http://hessian.caucho.com/doc/hessian-overview.xtp#Hessian%20Service

Client-side use hessian-3_2-snap.jar,Sever-side use Resin-3.2.1

when I run my Client-side, shrow following Exception:
Exception in thread main
com.caucho.hessian.client.HessianRuntimeException:
com.caucho.hessian.io.HessianProtocolException: expected hessian reply at
0x48 (H)
HHello, world
at com.caucho.hessian.client.HessianProxy.invoke(HessianProxy.java:232)
 at $Proxy0.hello(Unknown Source)
 at example.BasicClient.main(BasicClient.java:14)
Caused by: com.caucho.hessian.io.HessianProtocolException: expected hessian
reply at 0x48 (H)
HHello, world
at com.caucho.hessian.io.Hessian2Input.error(Hessian2Input.java:2705)
 at com.caucho.hessian.io.Hessian2Input.startReply(Hessian2Input.java:402)
 at com.caucho.hessian.client.HessianProxy.invoke(HessianProxy.java:218)
 ... 2 more


the correct result: *Hello, world*,but the running result is* **HHello,
world.*
there is messy code before *Hello,word.*
**
the following source is my client tip and sever tip's source.

package example;
import com.caucho.hessian.client.HessianProxyFactory;
public class BasicClient {
  public static void main(String []args)
throws Exception
  {
String url = http://localhost:8080/hessian/hello;;
HessianProxyFactory factory = new HessianProxyFactory();
Basic basic = (Basic) factory.create(Basic.class, url);
System.out.println(basic.hello());
  }
}


package example;
public class BasicService implements Basic {
  private String _greeting = Hello, world;
  public void setGreeting(String greeting)
  {
_greeting = greeting;
  }
  public String hello()
  {
System.out.println(a);
return _greeting;
  }
}
why do error happen?
thanks!!!

**
___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest


Re: [Resin-interest] inode block/fragment mixup???

2008-10-24 Thread Mattias Jiderhamn
Scott Ferguson wrote (2008-10-23 18:39):
 On Oct 22, 2008, at 12:06 PM, Mattias Jiderhamn wrote:

   
 We have a strange problem with Resin that looks like a bug but might  
 be
 some configuration issue.

 We hit the bug while storing more than the usual amount of data in a
 session (during a process that takes quite a lot of time).
 If we narrow things down so we store the same kind of data, although  
 not
 as much (and not using so much time), the error does not come about.
 The symptoms are that the slow request seems to finish correcly and  
 the
 data is returned to the browser, however on the next request the  
 session
 does no longer exist. Other sessions does not seem to be affected.  
 There
 are errors in the log file which makes me believe the session is lost
 during serializing/deserializing.

 With the same input data, the error is always reproducible.
 

 Do you know how large the session is?
From what I can see about 7 MB.

   Also, does finer show anything interesting?
   
See below if there is anything you consider interesting.

 There may be a limit at 64M of session data, but I doubt you're  
 hitting that.  It's possible there's an off-by-one issue at one of the  
 boundaries (since the data is split into fragments).  Does adding 1 to  
 the session length still produce the same error?
   
A quick test with session.setAttribute(foo, bar) actually seemed to
do the trick!
Is there anything specific you would like me to try with regards to this?



Here is the finer log:
...
[18:00:06.234] Transaction[01:908024ea] committing
[18:00:06.234] commit-local:
[EMAIL PROTECTED]
[18:00:06.328] idle PoolItem[jdbc/exder,7,ManagedConnectionImpl]
[18:00:07.593] Table[srun_:2] allocating block 270 fragment
[18:00:07.609] Table[srun_:2] allocating block 271 fragment
[18:00:07.609] Table[srun_:2] allocating block 272 fragment
(and so on...)
[18:00:08.312] Table[srun_:2] allocating block 333 fragment
[18:00:08.312] Table[srun_:2] allocating block 334 fragment
[18:00:08.343] java.lang.IllegalStateException: block/fragment mixup
[18:00:08.343] at com.caucho.db.store.Inode.writeBlockAddr(Inode.java:1078)
[18:00:08.343] at com.caucho.db.store.Inode.appendBlock(Inode.java:492)
[18:00:08.343] at com.caucho.db.store.Inode.append(Inode.java:388)
[18:00:08.343] at
com.caucho.db.store.BlobOutputStream.flushBlock(BlobOutputStream.java:188)
[18:00:08.343] at
com.caucho.db.store.BlobOutputStream.write(BlobOutputStream.java:117)
[18:00:08.343] at
com.caucho.db.table.BlobColumn.setStream(BlobColumn.java:179)
[18:00:08.343] at com.caucho.db.table.BlobColumn.set(BlobColumn.java:267)
[18:00:08.343] at
com.caucho.db.sql.UpdateQuery.execute(UpdateQuery.java:110)
[18:00:08.343] at
com.caucho.db.jdbc.PreparedStatementImpl.execute(PreparedStatementImpl.java:345)
[18:00:08.343] at
com.caucho.db.jdbc.PreparedStatementImpl.executeUpdate(PreparedStatementImpl.java:313)
[18:00:08.343] at
com.caucho.server.cluster.FileBacking.storeSelfUpdate(FileBacking.java:524)
[18:00:08.343] at
com.caucho.server.cluster.FileBacking.storeSelf(FileBacking.java:474)
[18:00:08.343] at
com.caucho.server.cluster.FileStore.store(FileStore.java:169)
[18:00:08.343] at
com.caucho.server.cluster.ClusterObject.store(ClusterObject.java:414)
[18:00:08.343] at
com.caucho.server.session.SessionImpl.save(SessionImpl.java:960)
[18:00:08.343] at
com.caucho.server.session.SessionImpl.saveAfterRequest(SessionImpl.java:946)
[18:00:08.343] at
com.caucho.server.session.SessionImpl.finish(SessionImpl.java:908)
[18:00:08.343] at
com.caucho.server.connection.AbstractHttpRequest.finish(AbstractHttpRequest.java:2506)
[18:00:08.343] at
com.caucho.server.http.HttpRequest.finish(HttpRequest.java:1466)
[18:00:08.343] at
com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java:212)
[18:00:08.343] at
com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:266)
[18:00:08.343] at
com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:269)
[18:00:08.343] at
com.caucho.server.port.TcpConnection.run(TcpConnection.java:603)
[18:00:08.343] at
com.caucho.util.ThreadPool$Item.runTasks(ThreadPool.java:721)
[18:00:08.343] at com.caucho.util.ThreadPool$Item.run(ThreadPool.java:643)
[18:00:08.343] at java.lang.Thread.run(Thread.java:595)
[18:00:08.421] Http[15] no-keepalive
[18:00:08.421] Tcp[,15] closing connection
TcpConnection[id=http--80-15,socket=JniSocketImpl$15452578[90827352,fd=4488],
port=Port[null:80]], total=13
(... six more...)
[18:01:06.890] Tcp[,6] com.caucho.vfs.ClientDisconnectException: client
timeout
[18:01:06.890] Tcp[,6] closing connection
TcpConnection[id=http--80-6,socket=JniSocketImpl$5256758[90830936,fd=4076],por
t=Port[null:80]], total=11
[18:03:04.875] Database[/c:/temp/resin-sessions]: DELETE FROM srun_
WHERE access_time + 5 * expire_interval / 4  ?
[18:03:04.875] where-1: static null
[18:03:04.875] where-0: FromItem[srun_ AS srun_] ((srun_.access_time +
((5 * srun_.expire_interval) / 4))  ?0)
[18:03:04.875] 

[Resin-interest] Update on 3.0.27

2008-10-24 Thread Matt Pangaro
Hi,
I was just wondering if we could get a status update on 3.0.27, since 
there are a number of fixes in it, plus the newly discovered issue with 
SSL JNI.

Thanks,

Matt


___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest


Re: [Resin-interest] Quercus and Spring proxy beans

2008-10-24 Thread Scott Ferguson

On Oct 24, 2008, at 9:17 AM, Heimo Laukkanen wrote:

 Hi all,

 I just noticed that Quercus does not seem to work with Spring's proxy
 objects that get created for example with annotation based
 configurations for security or transactions.

 @Transactional
 @Secured({ROLE_ADMIN, ACL_TEXT_READ})
 public String getText() {

 }

 And in php page:

 $bean = spring_bean(userDemoService);
 $foo = $bean-getText();

 Creates error message:

 resource([EMAIL PROTECTED])
 /home/huima/programming/appservers/resin/resin-3.1.7/webapps/webapp/ 
 phptest.php:8:
 Fatal Error: '$Proxy15::getText' is an unknown method

 Any ideas on how to circumvent this?

Do you know if the proxy object is introspectable, specifically if you  
can use getClass().getMethod() to find the method?

It's possible Quercus needs to change the introspection (e.g. by  
scanning interfaces differently), but I'm not sure what exactly Spring  
is doing for those beans.

-- Scott


 I already thought about creating a dummy service that would get that
 the real service injected into it, but I'm not yet so familiar with
 the AOP mechanisms that I would what class these proxy objects are and
 how to inject them into my own object. I will study that little during
 the weekend, but would be interested to know if anyone else has any
 ideas.

 -huima


 ___
 resin-interest mailing list
 resin-interest@caucho.com
 http://maillist.caucho.com/mailman/listinfo/resin-interest



___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest


Re: [Resin-interest] Update on 3.0.27

2008-10-24 Thread Scott Ferguson

On Oct 24, 2008, at 11:40 AM, Matt Pangaro wrote:

 Hi,
 I was just wondering if we could get a status update on 3.0.27, since
 there are a number of fixes in it, plus the newly discovered issue  
 with
 SSL JNI.

The plan is to work through the 3.1.x and 3.0.x regressions for next  
week and release when they're clean.

I can put up a new snapshot before that.

-- Scott



 Thanks,

 Matt


 ___
 resin-interest mailing list
 resin-interest@caucho.com
 http://maillist.caucho.com/mailman/listinfo/resin-interest



___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest