Re: [Resin-interest] Classpath problem

2007-09-10 Thread Daniel López
Janene McCrillis escribió:
 I have a problem with my classpath that has me baffled. I'm using the
 Apache commons libraries in a small servlet. I have the Apache commons
 jar files in both my web-app library directory and also in my resin
 library directory...

Having the same library twice in the classpath is a sure recipe for 
unexpected behaviour, as depending on the way some classes are 
loaded/used, you will get ClassDefNotFoundException and similar problems.

AFAIK, there is no real solution apart of keeping just one version of 
the class in the classpath of your webapp. (Note that you can have two 
versions for different webapps, as they can have different classpaths)

S!
D.


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


Re: [Resin-interest] Resin and transactions (disable autocommit)

2007-09-10 Thread Sam
 Date: Tue, Aug 28, 2007 at 12:52:23PM -0500
 Subject: Re: [Resin-interest] Resin and transactions (disable autocommit)
 
 ...

 Long story short I'm trying to run Jasper report server on Resin 
 instead of Tomcat.  It seems to work OK except for when it comes to 
 large objects at which point the PostgreSQL driver throws an exception 
 that all LO operations must be performed inside a transaction...
 
 Tomcat has an option to turn off auto-commits at the resource 
 definition.  Does Resin have anything along these lines?

Added a bug report:
http://bugs.caucho.com/view.php?id=2001

-- Sam



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


Re: [Resin-interest] Classpath problem

2007-09-10 Thread Janene McCrillis
Hi Daniel. I do understand your point, but resin is not finding the library no 
matter where I have it, in one place or both. I don't really want to have it in 
my main resin library directory for the reason you mentioned, allowing 
different apps to have different versions, so I've removed it, but it still 
isn't finding the library. Any ideas?  TIA!

Janene McCrillis
NatureServe
Senior Software Engineer
703-797-4806
[EMAIL PROTECTED]


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Daniel López
Sent: Monday, September 10, 2007 2:55 AM
To: General Discussion for the Resin application server
Subject: Re: [Resin-interest] Classpath problem

Having the same library twice in the classpath is a sure recipe for 
unexpected behaviour, as depending on the way some classes are 
loaded/used, you will get ClassDefNotFoundException and similar problems.

AFAIK, there is no real solution apart of keeping just one version of 
the class in the classpath of your webapp. (Note that you can have two 
versions for different webapps, as they can have different classpaths)

S!
D.


___
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


[Resin-interest] Resin 3.1.1 and Struts iterate tag problems

2007-09-10 Thread Ambar Hegde
Hi,

I'm trying to move an existing application from Resin 2x to Resin 3.1.1,
with JDK 1.5.

The application uses Struts 1.1, however the problem persists with Struts
1.3.8 as well.

Using the iterate tag from struts-logic.tld causes resin to throw the
following error:

/jsp/LocationReportMain.jsp:246: not a statement
[19:36:22.319] java.lang.Integer null;
[19:36:22.319]  ^
[19:36:22.319] /jsp/LocationReportMain.jsp:246: ';' expected
[19:36:22.319] java.lang.Integer null;
[19:36:22.319]   ^


The source jsp is:

logic:iterate id=driverValues name=SingleUserLocReportInitializer
property=teamMembers type=java.util.Hashtablehtml:option
value='%=driverValues.get(USER_ID).toString()%'
%=driverValues.get(NAME).toString()%/html:option/logic:iterate

Would appreciate any help on this.

TIA

-Ambar



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


Re: [Resin-interest] Resin and transactions (disable autocommit)

2007-09-10 Thread Scott Ferguson

On Sep 10, 2007, at 8:43 AM, Sam wrote:

 Date: Tue, Aug 28, 2007 at 12:52:23PM -0500
 Subject: Re: [Resin-interest] Resin and transactions (disable  
 autocommit)

 ...

 Long story short I'm trying to run Jasper report server on Resin
 instead of Tomcat.  It seems to work OK except for when it comes to
 large objects at which point the PostgreSQL driver throws an  
 exception
 that all LO operations must be performed inside a transaction...

 Tomcat has an option to turn off auto-commits at the resource
 definition.  Does Resin have anything along these lines?

 Added a bug report:
 http://bugs.caucho.com/view.php?id=2001

Except that doesn't really make any sense.

disabling auto-commit really means starting a transaction.  But if  
your code isn't really handling the transactions itself, then it will  
be missing the commit()/rollback().

-- Scott


 -- Sam



 ___
 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] code too large for try statement error!

2007-09-10 Thread Mike Wynholds
If you have a really big JSP file, and you get this problem, you can try
breaking the JSP file up in to several smaller .jsp or .tag files, and
creating a hierarchy of files.

This will not only fix your problem, but if done correctly will result
in a much better JSP page architecture.

We really like using jsp tagfiles to break up our jsps.  they are new to
JSP 2.0 (although that's not really very new anymore).  they essentially
allow you to create a custom jsp tag in JSP instead of in Java.

the alternative is just to break out chunks of your jsp code in to a
different .jsp file and use jsp:import to include it in the original jsp
file.  a less powerful approach, but it will fix your problem.

..mike..

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Gary Zhu
Sent: Saturday, September 08, 2007 11:28 PM
To: General Discussion for the Resin application server
Subject: Re: [Resin-interest] code too large for try statement error!

To solve your problem, make sure that your JSP compiled/generated Java
files do not have try blocks and Java methods too large, for (rough)
example, exceeding 10,000 lines. It's just the limitation of try blocks
and java methods, the size of java file has no limit.

When a java file is compiled into .class file, there is a limitation in
JVM spec that try block represented in the java byte code cannot
exceed 64K. Since the largest try block could be the entire Java method
(a method throws exceptions),  this 64K limitation is also
(conveniently) imposed on each Java method.


From: [EMAIL PROTECTED]
[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED]
[EMAIL PROTECTED]
Sent: Saturday, September 08, 2007 9:43 AM
To: resin-interest@caucho.com
Subject: [Resin-interest] code too large for try statement error!

What should I do to fix the jsp page when resin server ran into the
following errors?

code too large for try statement

-Henry


___
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


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


Re: [Resin-interest] code too large for try statement error!

2007-09-10 Thread Ryan Vanderwerf
On Mon, 2007-09-10 at 09:40 -0700, Mike Wynholds wrote:
 If you have a really big JSP file, and you get this problem, you can try
 breaking the JSP file up in to several smaller .jsp or .tag files, and
 creating a hierarchy of files.

Under Resin 3.1.2, after switching from JDK 1.5 to 1.6 (Linux) I started
getting this error. We had to go back to 1.5 until we can fix these. I
didn't know of any changes between 1.5 to 1.6 related to this, but for
some reason it happens to us.


Ryan



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


Re: [Resin-interest] Resin and transactions (disable autocommit)

2007-09-10 Thread Sam
  Long story short I'm trying to run Jasper report server on Resin 
  instead of Tomcat.  It seems to work OK except for when it comes to 
  large objects at which point the PostgreSQL driver throws an exception 
  that all LO operations must be performed inside a transaction...
  
  Tomcat has an option to turn off auto-commits at the resource 
  definition.  Does Resin have anything along these lines?
 
 Added a bug report:
 http://bugs.caucho.com/view.php?id=2001

The transaction filter can be used to solve this problem:

 filter filter-name='transaction-filter'
 filter-class='com.caucho.filters.TransactionFilter'/

  filter-mapping url-pattern='/*'
  filter-name='transaction-filter'/

The example above causes all requests to be done within a transaction.  The
url-pattern could be made more specific so that only those requests that use
jasper reports are captured by the filter.

-- Sam



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


[Resin-interest] hessian flex (Stream Error)

2007-09-10 Thread Vic Cekvenich
I get 

Error #2044: Unhandled IOErrorEvent:. text=Error #2032: Stream Error.
at hessian.client::HessianOperation/send()

trying to duplicate the 2 flex hessian examples on the site.

Here is working java client:
public static void main(String args[]) {
String url = http://localhost:8080/w/hsrv;;

HessianProxyFactory factory = new HessianProxyFactory();
IInvoke basic=null;
try {
basic = (IInvoke) factory.create(IInvoke.class, url);
} catch (Exception e) {}
System.out.println(hello  + basic.ping());// it just sayz hello world.

// so it proves server works, the client works.

And now the non working flex client code, that produces above error event:

?xml version=1.0 encoding=utf-8?

initialize=init()   implements=mx.rpc.IResponder

mx:Script 
 ![CDATA[
import flash.net.*;
import mx.controls.*;
import flash.events.*;
import hessian.client.*;
import mx.rpc.*;
import mx.rpc.events.*;

private var _hsrv:HessianService = new HessianService(hsrv);//url hessian

private function hsend():void {
   
try{
  var token:AsyncToken = _hsrv.ping.send();// send async
 token.addResponder(this);
 } catch (err:Error) {// retry
 Alert.show(err.message);
 }
}//()

   
public function result(evt:Object):void {//rpc sig
try {
   var revt:ResultEvent = ResultEvent(evt);
var dat:String = revt.result.toString();
   tRecMsg.text=dat;
} catch (err:Error) {// retry
Alert.show(err.message);
}//
   }//()
   
public function fault(ignore:Object):void  {  } // rpc sig
 
 ]]
 /mx:Script

!-- ui --
mx:Button x=67 y=25 label=Send click=hsend() id=b1/
!--display recevied mesages --
mx:TextArea x=67 y=79 width=365 height=324 id=tRecMsg /
mx:TextInput x=151 y=25 id=tOne editable=true text=kl/

/mx:Application


hints?

.V




   

Yahoo! oneSearch: Finally, mobile search 
that gives answers, not web links. 
http://mobile.yahoo.com/mobileweb/onesearch?refer=1ONXIC


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


Re: [Resin-interest] Resin 3.1.1 and Struts iterate tag problems

2007-09-10 Thread Jason Wang
Resin 3.1.1 doesn't allow to nest jsp statement in a taglib, I don't know
why, maybe just a bug, you can try 3.1.2

Jason


On 9/10/07, Ambar Hegde [EMAIL PROTECTED] wrote:

 Hi,

 I'm trying to move an existing application from Resin 2x to Resin 3.1.1,
 with JDK 1.5.

 The application uses Struts 1.1, however the problem persists with Struts
 1.3.8 as well.

 Using the iterate tag from struts-logic.tld causes resin to throw the
 following error:

 /jsp/LocationReportMain.jsp:246: not a statement
 [19:36:22.319] java.lang.Integer null;
 [19:36:22.319]  ^
 [19:36:22.319] /jsp/LocationReportMain.jsp:246: ';' expected
 [19:36:22.319] java.lang.Integer null;
 [19:36:22.319]   ^


 The source jsp is:

 logic:iterate id=driverValues name=SingleUserLocReportInitializer
 property=teamMembers type=java.util.Hashtablehtml:option
 value='%=driverValues.get(USER_ID).toString()%'
 %=driverValues.get(NAME).toString()%/html:option/logic:iterate

 Would appreciate any help on this.

 TIA

 -Ambar



 ___
 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] Resin 3.1.1 and Struts iterate tag problems

2007-09-10 Thread Jason Wang
3.1.2 is ok, I tested iterate page in struts example project both on 3.1.1and
3.1.2
the exception occurs on 3.1.1 but does not occur on 3.1.2


On 9/11/07, Jason Wang [EMAIL PROTECTED] wrote:

 Resin 3.1.1 doesn't allow to nest jsp statement in a taglib, I don't know
 why, maybe just a bug, you can try 3.1.2

 Jason


  On 9/10/07, Ambar Hegde [EMAIL PROTECTED] wrote:
 
  Hi,
 
  I'm trying to move an existing application from Resin 2x to Resin 3.1.1,
  with JDK 1.5.
 
  The application uses Struts 1.1, however the problem persists with
  Struts
  1.3.8 as well.
 
  Using the iterate tag from struts-logic.tld causes resin to throw the
  following error:
 
  /jsp/LocationReportMain.jsp:246: not a statement
  [19:36:22.319] java.lang.Integer null;
  [19:36:22.319]  ^
  [19:36:22.319] /jsp/LocationReportMain.jsp:246: ';' expected
  [19:36:22.319] java.lang.Integer null;
  [19:36:22.319]   ^
 
 
  The source jsp is:
 
  logic:iterate id=driverValues name=SingleUserLocReportInitializer
  property=teamMembers type= java.util.Hashtablehtml:option
  value='%=driverValues.get(USER_ID).toString()%'
  %=driverValues.get(NAME).toString()%/html:option/logic:iterate
 
  Would appreciate any help on this.
 
  TIA
 
  -Ambar
 
 
 
  ___
  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