Re: javax.jms.JMSException: Failed to build body from bytes

2008-07-12 Thread jklcom99

JMS is a separate module.
app
  ->myApp
->1.0
   ->myApp-1.0.car
  ->appJMS

 app.entity.QuartzJobIssued is packaged in myApp.jar and it is in ear/lib.




Kevan Miller wrote:
> 
> What's the structure of your app(s)?
> 
> This exception indicates that you're using JMS ObjectMessages and  
> there's a problem deserializing the message bytes into an Object. The  
> class app.entity.QuartzJobIssued is not being found. Where is that  
> class packaged?
> 
> --kevan
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/javax.jms.JMSException%3A-Failed-to-build-body-from-bytes-tp18404327s134p18425625.html
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.



Re: Multiple 'Service' in GMO 2.1 (like in Tomcat)

2008-07-12 Thread Kevan Miller


On Jul 9, 2008, at 5:59 AM, cvx22 wrote:



Hi gurus,
 I plan to migrate my web-apps from Tomcat6 to Geronimo2.1. I have one
configuration problem. In my tomcat's server.xml I have declared two
Service, like that:

--- part of server.xml -

   
...
  



   
...
  

--- end part of server.xml -

With that configuration I have two servlet containers under one  
Tomcat, so I

have different applications for each of them.

How can I make the same in Geronimo???


There's a sample that will give you guidance on getting this to work  
for Geronimo 2.1.


The sample is here -- 
https://svn.apache.org/repos/asf/geronimo/samples/branches/2.1/samples/app-per-port

The sample is set up as a Geronimo plugin. Easy to set you up with a  
geronimo deployment plan for the ear, if you prefer.


We need to update this wiki page -- 
http://cwiki.apache.org/GMOxDOC21/app-per-port-running-multiple-web-apps-on-different-ports.html

Here's a wiki page for G 1.1 -- 
http://cwiki.apache.org/GMOxDOC11/exposing-web-applications-on-distinct-ports.html

Take a look at the 2.1 sample and let us know if you have questions...

--kevan


Re: Stateful Session Bean Problem Geronimo 2.1.1: "Passivation Failed"

2008-07-12 Thread Mario Kofler
thanks for the answer, passivation is working fine now, with
explicitely closing the entity manager.

i got one more question, maybe you know what could be the problem..

at higher user rates i get some exception, what looks like the server
cannot take more users.

stateful bean pool is set to 800 and strict pooling to false.

maybe you already saw this exception or know at first sight what might
be the reason.

if not, nevermind. i am fine that passivation works now.

thanks and greetings, mario.


stack trace with exception:

 [exec] javax.ejb.EJBTransactionRolledbackException: Transaction
was rolled back, presumably because setRollbackOnly was called during
a synchronization: Unable to commit: transaction marked for rollback
 [exec] at
org.apache.openejb.core.ivm.BaseEjbProxyHandler.convertException(BaseEjbProxyHandler.java:348)
 [exec] at
org.apache.openejb.core.ivm.BaseEjbProxyHandler.invoke(BaseEjbProxyHandler.java:251)
 [exec] at
org.apache.openejb.util.proxy.Jdk13InvocationHandler.invoke(Jdk13InvocationHandler.java:49)
 [exec] at $Proxy47.writeToDB(Unknown Source)
 [exec] at vt.servlet.AddServlet.doGet(AddServlet.java:48)
 [exec] at javax.servlet.http.HttpServlet.service(HttpServlet.java:693)
 [exec] at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
 [exec] at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
 [exec] at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 [exec] at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
 [exec] at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
 [exec] at
org.apache.geronimo.tomcat.valve.DefaultSubjectValve.invoke(DefaultSubjectValve.java:56)
 [exec] at
org.apache.geronimo.tomcat.GeronimoStandardContext$SystemMethodValve.invoke(GeronimoStandardContext.java:406)
 [exec] at
org.apache.geronimo.tomcat.valve.GeronimoBeforeAfterValve.invoke(GeronimoBeforeAfterValve.java:47)
 [exec] at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
 [exec] at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
 [exec] at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
 [exec] at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:563)
 [exec] at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
 [exec] at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
 [exec] at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
 [exec] at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
 [exec] at java.lang.Thread.run(Thread.java:619)
 [exec] Caused by:
javax.transaction.TransactionRolledbackException: Transaction was
rolled back, presumably because setRollbackOnly was called during a
synchronization: Unable to commit: transaction marked for rollback
 [exec] at
org.apache.openejb.core.transaction.TransactionPolicy.commitTransaction(TransactionPolicy.java:146)
 [exec] at
org.apache.openejb.core.transaction.TxRequired.afterInvoke(TxRequired.java:76)
 [exec] at
org.apache.openejb.core.stateful.StatefulContainerManagedTxPolicy.afterInvoke(StatefulContainerManagedTxPolicy.java:57)
 [exec] at
org.apache.openejb.core.stateful.StatefulContainer._invoke(StatefulContainer.java:467)
 [exec] at
org.apache.openejb.core.stateful.StatefulContainer.businessMethod(StatefulContainer.java:413)
 [exec] at
org.apache.openejb.core.stateful.StatefulContainer.invoke(StatefulContainer.java:271)
 [exec] at
org.apache.openejb.core.ivm.EjbObjectProxyHandler.businessMethod(EjbObjectProxyHandler.java:217)
 [exec] at
org.apache.openejb.core.ivm.EjbObjectProxyHandler._invoke(EjbObjectProxyHandler.java:77)
 [exec] at
org.apache.openejb.core.ivm.BaseEjbProxyHandler.invoke(BaseEjbProxyHandler.java:245)
 [exec] ... 21 more


2008/7/11 David Blevins <[EMAIL PROTECTED]>:
>
> On Jul 10, 2008, at 10:36 PM, Mario Kofler wrote:
>
>> thanks,
>>
>>
>>> if the
>>> persistence provider doesn't want it serialized, there's nothing we can
>>> do
>>> about it.
>>
>> so that means that it is not a bug but the persistence provider
>> hinders a passivation?
>
> Not a container bug but a bean bug.  The container will try to passivate
> you, you just need to make sure it can, which in this case means not holding
> onto a reference to your bean-managed EntityManager.  The easiest way is to
> destroy your EntityManager object in PrePassivate (close it and null the
> ref) and create yourself a new one in PostActivate.
>
> -David
>
>
>


Re: javax.jms.JMSException: Failed to build body from bytes

2008-07-12 Thread Kevan Miller

What's the structure of your app(s)?

This exception indicates that you're using JMS ObjectMessages and  
there's a problem deserializing the message bytes into an Object. The  
class app.entity.QuartzJobIssued is not being found. Where is that  
class packaged?


--kevan

On Jul 11, 2008, at 9:51 AM, jklcom99 wrote:



I've upgraded to G2.1.2 and activemq-core 4.1.2.  Now I'm getting the
following JMS exception:

[java] 13:20:00,099 WARN  [AppBrokerImpl] javax.jms.JMSException:
Failed
to build body from bytes. Reason: java.io.IOException:
app.entity.QuartzJobI
ssued
[java] 13:20:00,099 ERROR [TokenBrokerImpl] JMSException  
processing

JMS message.
[java] javax.jms.JMSException: Failed to build body from bytes.  
Reason:

jav
a.io.IOException: app.entity.QuartzJobIssued
[java] at
org.apache.activemq.util.JMSExceptionSupport.create(JMSExcept
ionSupport.java:33)
[java] at
org.apache.activemq.command.ActiveMQObjectMessage.getObject(A
ctiveMQObjectMessage.java:172)
[java] at
app.messaging.TokenBrokerImpl.onMessage(TokenBrokerImpl.java:105)
[java] at
app.jms.AppThreadListener.onMessage(AppThreadListener.java:35)
[java] at
org.apache.activemq.ActiveMQMessageConsumer.dispatch(ActiveMQ
MessageConsumer.java:854)
[java] at
org.apache.activemq.ActiveMQSessionExecutor.dispatch(ActiveMQ
SessionExecutor.java:104)
[java] at
org.apache.activemq.ActiveMQSessionExecutor.iterate(ActiveMQS
essionExecutor.java:171)
[java] at
org.apache.activemq.thread.PooledTaskRunner.runTask(PooledTas
kRunner.java:120)
[java] at
org.apache.activemq.thread.PooledTaskRunner.access$100(Pooled
TaskRunner.java:26)
[java] at
org.apache.activemq.thread.PooledTaskRunner$1.run(PooledTaskR
unner.java:47)
[java] at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExec
utor$Worker.runTask(ThreadPoolExecutor.java:665)
[java] at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExec
utor$Worker.run(ThreadPoolExecutor.java:690)
[java] at java.lang.Thread.run(Thread.java:619)
[java] Caused by: java.io.IOException: app.entity.QuartzJobIssued
[java] at
org.apache.activemq.command.ActiveMQObjectMessage.getObject(A
ctiveMQObjectMessage.java:168)
[java] ... 11 more
--
View this message in context: 
http://www.nabble.com/javax.jms.JMSException%3A-Failed-to-build-body-from-bytes-tp18404327s134p18404327.html
Sent from the Apache Geronimo - Users mailing list archive at  
Nabble.com.






Re: CGI and Geronimo/Tomcat

2008-07-12 Thread Kevan Miller


On Jul 11, 2008, at 5:14 PM, Peter L. Berghold wrote:


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hey folks,

I've been doing web searches looking for the answer to this and I  
can't

find my Geronimo book wherever I put it last.  I am trying enable the
processing of CGI scripts on Geronimo.

Can someone point me in the right direction?


Should be doable. I don't recall hearing about anyone who's set this  
up on Geronimo, however. If you're willing to run some experiments, I  
expect that we can help get it running...


Are you using Tomcat or Jetty as your web container?

Here's general info for Tomcat -- 
http://tomcat.apache.org/tomcat-6.0-doc/cgi-howto.html
Here's general info for Jetty -- 
http://jetty.mortbay.org/jetty5/faq/faq_s_900-Content_t_CGI.html

Now a matter of getting this running in Geronimo. Assuming you're  
using Tomcat as a web container, I'd deploy this as a web-app:


Place your scripts in WEB-INF/cgi/

Borrowing from the tomcat instructions use this as your WEB-INF/web.xml:



http://java.sun.com/xml/ns/javaee";
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
   xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd 
"

   version="2.5" >

  
  
  
  
  
  
  
   
< 
!--  -->
  
  
  
   
< 
!--  -->
  
  
   
< 
!--  -->
  
  
   
< 
!--  -->
  
  
  
   
< 
!--  -->
  
  
   
< 
!--  -->
  
  
  



cgi
org.apache.catalina.servlets.CGIServletservlet-class>


  debug
  0


  cgiPathPrefix
  WEB-INF/cgi

 5





cgi
/cgi-bin/*




Deploy the app and test... Let us know your results.

--kevan


Re: Catalina error: out of memory

2008-07-12 Thread Kevan Miller


On Jul 12, 2008, at 9:42 AM, Peter L. Berghold wrote:


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Tim McConnell wrote:


-Xms256m -Xmx256m


Thanks for the pointer. I've implemented this suggestion thusly:
JPDA_OPTS="-Xdebug -Xms256m -Xmx256m
-
-Xrunjdwp:transport=$JPDA_TRANSPORT,address= 
$JPDA_ADDRESS,server=y,suspend=$JPDA_SUSPEND"


Is there a point of diminishing returns on these values?  I'm actually
running three separate web apps (websites) on the same server so I  
want

to make sure they are not being starved for memory.


How big are your apps? Are you running out of heap memory or permgen  
memory (assuming you're on a Sun VM). Are you deploying/undeploying  
apps?


Also, are you debugging the server/your applications? If not, then  
there's no reason to be running with JPDA.


If you're using the geronimo.sh/.bat script to start Geronimo. I'd:

export JAVA_OPTS="-Xmx512m -XX:MaxPermSize=128m"
./geronimo.sh run

JAVA_OPTS would alter both 'run' and 'jpda run'. So, works in either  
scenario...


There are a couple of ways to monitor memory usage. One is to use the  
Server Information portlet on the admin console e.g.:


http://localhost:8080/console/portal/Server/Information

This will only monitor server heap memory.

Alternatively, have the JVM dump memory usage statistics:

export JAVA_OPTS="-Xmx512m -XX:MaxPermSize=128m -verbose:gc -XX: 
+PrintGCDetails -XX:+HeapDumpOnOutOfMemoryError"


Assuming you're running a Sun VM, this will dump detailed GC  
statistics to STDOUT. The -XX:+HeapDumpOnOutOfMemoryError parm will  
cause a heap dump to be generated if an OOM error occurs. This can be  
used for post-mortem analysis by a number of tools.


--kevan


Re: Catalina error: out of memory

2008-07-12 Thread Peter L. Berghold
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Tim McConnell wrote:
> 
> -Xms256m -Xmx256m

Thanks for the pointer. I've implemented this suggestion thusly:
JPDA_OPTS="-Xdebug -Xms256m -Xmx256m
-
-Xrunjdwp:transport=$JPDA_TRANSPORT,address=$JPDA_ADDRESS,server=y,suspend=$JPDA_SUSPEND"

Is there a point of diminishing returns on these values?  I'm actually
running three separate web apps (websites) on the same server so I want
to make sure they are not being starved for memory.


- --

Peter L. Berghold http://www.berghold.net   [EMAIL PROTECTED]
Unix Professional Dog Agility Fan   Crazed Cook
"Those who fail to learn from history are condemned to repeat it."
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFIeLTYUM9/01RIhaARAto/AJ9y/4wGrMOIW9JUAznhYHLlJV7CogCgyMEY
LuRIj9++OB2ZpX4CD5WDKQo=
=Fije
-END PGP SIGNATURE-