You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by wuym <wu...@163.com> on 2001/04/12 05:32:10 UTC
how to use Peers in other Servlet framework [ClassCastException]
I have s same problem,
our website have a lot of servlet already use WebMacro Servlet.
So i don't want to switch servlet framework to Turbine.
But i like the "peer" tools, how can i use peer in my webmacro Servlet,
not in Turbine Servlet Framework.
When i runing some code in Webmacro servlet,
--------------------------------------
Criteria cri = new Criteria();
Vector v = ObjectPeer.doSelect(cri);
----------------------------------------
Will have Exception like this:
500 Servlet Exception
java.lang.ExceptionInInitializerError: java.lang.ClassCastException:
com.ali.pm.service.dom.map.MemberPackageMapBuilder
at com.ali.pm.service.dom.BaseMemberPackagePeer.<clinit>(BaseMemberPackagePeer.java)
at com.ali.test.ShowEmp.servletAction(ShowEmp.java:53)
at com.ali.servlet.AliServlet.handle(AliServlet.java:137)
at org.webmacro.servlet.WMServlet.doRequest(WMServlet.java:85)
at org.webmacro.servlet.WMServlet.doGet(WMServlet.java:53)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:103)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:84)
at com.caucho.server.http.AbstractRequest.service(AbstractRequest.java:448)
at com.caucho.server.http.VirtualHost.service(VirtualHost.java:380)
at com.caucho.server.http.Request.dispatch(Request.java:205)
at com.caucho.server.http.RunnerRequest.handleRequest(RunnerRequest.java:302)
at com.caucho.server.http.RunnerRequest.handleConnection(RunnerRequest.java:257)
at com.caucho.server.TcpConnection.run(TcpConnection.java:145)
at java.lang.Thread.run(Thread.java:484)
On Wed, 11 Apr 2001 18:59:50 +0800
Lomses <lo...@yahoo.com> wrote:
>
> for example:
>
> public class MyServlet extends WMServlet{
> public void myFunction(WebContext context){
>
> Criteria cri = new Criteria();
>
> //this line will throw Exception
> Vector v = MyObjectPeer.doSelect(cri);
>
> }
> }
>
> The WMServlet is a WebMacro base servlet ,we can use WebMacro template
> by it.
>
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-dev-help@jakarta.apache.org
--
wuym <wu...@163.com>
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-dev-help@jakarta.apache.org
Re: Re[2]: how to use Peers in other Servlet framework
[ClassCastException]
Posted by Jon Stevens <jo...@latchkey.com>.
on 4/11/01 9:44 PM, "wuym" <wu...@163.com> wrote:
> I already use below code in Servlet's init method.
>
> TurbineConfig tc = new
>
TurbineConfig("/home/wuym/working/www_us","/conf/TurbineResources.properties
")> ;
> tc.init();
>
> I don't know why still have this problem, but in command line, these
> code is work.?
Do you have your turbine.jar in the right classpath?
-jon
--
If you come from a Perl or PHP background, JSP is a way to take
your pain to new levels. --Anonymous
<http://jakarta.apache.org/velocity/ymtd/ymtd.html>
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-dev-help@jakarta.apache.org
Re[2]: how to use Peers in other Servlet framework [ClassCastException]
Posted by wuym <wu...@163.com>.
I already use below code in Servlet's init method.
TurbineConfig tc = new TurbineConfig("/home/wuym/working/www_us","/conf/TurbineResources.properties");
tc.init();
I don't know why still have this problem, but in command line, these
code is work.?
On Wed, 11 Apr 2001 20:35:39 -0700
Jon Stevens <jo...@latchkey.com> wrote:
> on 4/11/01 8:32 PM, "wuym" <wu...@163.com> wrote:
>
> > I have s same problem,
> > our website have a lot of servlet already use WebMacro Servlet.
> > So i don't want to switch servlet framework to Turbine.
> > But i like the "peer" tools, how can i use peer in my webmacro Servlet,
> > not in Turbine Servlet Framework.
> >
> > When i runing some code in Webmacro servlet,
> > --------------------------------------
> > Criteria cri = new Criteria();
> > Vector v = ObjectPeer.doSelect(cri);
> > ----------------------------------------
>
> TurbineConfig
>
> Read the javadoc documentation.
>
> Ug. This is getting to be a daily question.
>
> -jon
>
> --
> If you come from a Perl or PHP background, JSP is a way to take
> your pain to new levels. --Anonymous
> <http://jakarta.apache.org/velocity/ymtd/ymtd.html>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-dev-help@jakarta.apache.org
--
wuym <wu...@163.com>
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-dev-help@jakarta.apache.org
Re: how to use Peers in other Servlet framework
[ClassCastException]
Posted by Jon Stevens <jo...@latchkey.com>.
on 4/11/01 8:32 PM, "wuym" <wu...@163.com> wrote:
> I have s same problem,
> our website have a lot of servlet already use WebMacro Servlet.
> So i don't want to switch servlet framework to Turbine.
> But i like the "peer" tools, how can i use peer in my webmacro Servlet,
> not in Turbine Servlet Framework.
>
> When i runing some code in Webmacro servlet,
> --------------------------------------
> Criteria cri = new Criteria();
> Vector v = ObjectPeer.doSelect(cri);
> ----------------------------------------
TurbineConfig
Read the javadoc documentation.
Ug. This is getting to be a daily question.
-jon
--
If you come from a Perl or PHP background, JSP is a way to take
your pain to new levels. --Anonymous
<http://jakarta.apache.org/velocity/ymtd/ymtd.html>
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-dev-help@jakarta.apache.org