class cast exception in findby method: cannot cast java.util.UUID to ProxyInfo

2008-09-23 Thread Wayne Rasmuss

Hello,

I am trying to move a geronimo 1.1.1 application to geronimo 2.1.2. I have a
number of BMP entitiy beans. My application deploys just fine (amazing) but
when I try to run it I get the error below after I log in. The problem seems
to be with the return value of the following find by method. 

Thanks for the help
Wayne


CLASSES:
Foo is the base type for the bean and UUID is the priamary key type. 
Source is a locator for a datasource.


METHOD:
public UUID ejbFindBy(QualName name) throws FinderException {
Foo checkImpl = null;
try {
try {
checkImpl = FooImpl.load(name, Source.get());
} catch (MemberNotFound e) {
//This means we don't exist. That's fine for now.
}
} catch (SQLException e) {
FinderException exception = new FinderException("Could not load
foo. Cause: " + e);
exception.initCause(e);
throw exception;
}
return checkImpl != null ? checkImpl.getId() : null;
}


ERROR
org.apache.jasper.JasperException: java.lang.ClassCastException:
java.util.UUID cannot be cast to org.apache.openejb.ProxyInfo

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:413)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:806)

root cause

java.lang.ClassCastException: java.util.UUID cannot be cast to
org.apache.openejb.ProxyInfo

org.apache.openejb.core.entity.EntityEjbHomeHandler.findX(EntityEjbHomeHandler.java:88)

org.apache.openejb.core.ivm.EjbHomeProxyHandler._invoke(EjbHomeProxyHandler.java:161)

org.apache.openejb.core.ivm.BaseEjbProxyHandler.invoke(BaseEjbProxyHandler.java:321)

org.apache.openejb.util.proxy.Jdk13InvocationHandler.invoke(Jdk13InvocationHandler.java:49)
$Proxy50.findBy(Unknown Source)

com.popstarnetworks.simplerealmservice.console.IndexHelper.(IndexHelper.java:47)
org.apache.jsp.index_jsp._jspService(index_jsp.java:55)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:806)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:369)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:806)

-- 
View this message in context: 
http://www.nabble.com/class-cast-exception-in-findby-method%3A-cannot-cast-java.util.UUID-to-ProxyInfo-tp19630219s134p19630219.html
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.



Re: Can't lookup data source from BMP entity bean

2007-10-15 Thread Wayne Rasmuss


I have at least a partial answer to my own question. May seem obvious to JEE
afficianados. The JNDI context is basically not available in the contructor
of the bean. I am able to access it during invocations of the methods of the
beans. I guess its probably not very bright to look it up in the constructor
and keep it anyway



Wayne Rasmuss wrote:
> 
> I am unable to lookup a data source from a RAR that is deployed in the
> same ear as jar file containing BMP entity beans. Here are some details.
> 
> 1.) I am able to use the data source in war files contained in the same
> ear.
> 
> 2.) The following line throws an NameNotFound("comp/env")  new
> InitialContext().lookup("java:comp/env")
> 
> 3.) I am able to use the data source for my login module
> 
> 4.) My ear deploys without errors
> 
> 5.) My ejb-jar entity bean tags look like this
> 
>  
> realm
>
> com.popstarnetworks.realm.beans.realm.RealmLocalHome
>
> com.popstarnetworks.realm.beans.realm.RealmLocal
>
> com.popstarnetworks.realm.beans.realm.RealmBean
> Bean
> java.util.UUID
> true
> 
> realm_database
> javax.sql.DataSource
> Container
> Shareable
> 
> 
> 
> 6.) My openejb entity bean tags look like this
> 
> node
> node
> 
> realm_database
>
> realm_database
> 
> 
> 
> 7.) I have tried different names in the  tags. When I do
> this, my application will deploy with either the name in
> ,  listed in the ejb-jar file
> 
> 8.) If I remove the  tags, my application will still
> deploy as long as I use the name declared in my RAR
> 
> Thanks for You Help
> Wayne
> 

-- 
View this message in context: 
http://www.nabble.com/Can%27t-lookup-data-source-from-BMP-entity-bean-tf4616638s134.html#a13214184
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.



Can't lookup data source from BMP entity bean

2007-10-12 Thread Wayne Rasmuss

I am unable to lookup a data source from a RAR that is deployed in the same
ear as jar file containing BMP entity beans. Here are some details.

1.) I am able to use the data source in war files contained in the same ear.

2.) The following line throws an NameNotFound("comp/env")  new
InitialContext().lookup("java:comp/env")

3.) I am able to use the data source for my login module

4.) My ear deploys without errors

5.) My ejb-jar entity bean tags look like this

 
realm
   
com.popstarnetworks.realm.beans.realm.RealmLocalHome
com.popstarnetworks.realm.beans.realm.RealmLocal
   
com.popstarnetworks.realm.beans.realm.RealmBean
Bean
java.util.UUID
true

realm_database
javax.sql.DataSource
Container
Shareable



6.) My openejb entity bean tags look like this

node
node

realm_database
realm_database



7.) I have tried different names in the  tags. When I do
this, my application will deploy with either the name in ,
 listed in the ejb-jar file

8.) If I remove the  tags, my application will still
deploy as long as I use the name declared in my RAR

Thanks for You Help
Wayne
-- 
View this message in context: 
http://www.nabble.com/Can%27t-lookup-data-source-from-BMP-entity-bean-tf4616638s134.html#a13184866
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.



SSL Key Management

2007-09-07 Thread Wayne Rasmuss

I need to manage SSL certificates from java application the controls an
instance of geronimo. If I have to use Process.exec to do so that would be
fine. I need to peform the following tasks

Install A certificate
Generate a self signed certificate with a given host name
And generate a certificate request

I've been able to do this with the web console, and I've been able to do it
in tomcat with keytool before. I've found instructions on this formum to do
it, but I've never gotten it to work with geronimo. I looked at the source
code for the web console but I don't know anything about portlets so I
didn't get anywhere.

Does anyone know how to manage ssl certificates programatically?

As a side note, can anyone recommend a consultant that can help me answer
these questions in the future?

Thanks
Wayne Rasmuss
Popstar Networks
-- 
View this message in context: 
http://www.nabble.com/SSL-Key-Management-tf4404649s134.html#a12565969
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.



Re: Trying to run multiple instances on one host

2007-06-12 Thread Wayne Rasmuss

I answered my own question. I was setting the  org.apache.geronimo.server.dir
property to the correct path, and that made the Geronimo instance use the
var/config/config.xml from that location. Now, I’m also setting the
org.apache.geronimo.home.dir property which makes the Geronimo instance use
the repository under that path as. So, now I have two instances running off
two separate folders each with the own var, repository.


Wayne Rasmuss wrote:
> 
> Hi, I'm pretty new to geronimo so forgive me (and correct me) if I'm
> asking a stupid question.
> 
> I have been trying like mad to run multiple instances of geronimo on the
> same system. I have read the wiki page at:
> http://cwiki.apache.org/confluence/display/GMOxDOC20/Multiple+Repositories
> 
> I have it mostly working, but i am having trouble when I hot deploy a war
> file. I am running two instances that have separate var folders and the
> same respository. When I use the hot deployer, the webapp is deployed to
> the first instance perfectly, but when I boot the second, it is unable to
> hot deploy the war file. It seems that this is because the war file has
> been deployed in the shared repository but the non-shared config.xml does
> not have a reference to the war.
> 
> I would be perfectly happy if I could run two separate instances, each
> with their own repository, but I can't quite understand the documentation
> on how to do that. Any thoughts? 
> 
> Thanks
> Wayne
> 

-- 
View this message in context: 
http://www.nabble.com/Trying-to-run-multiple-instances-on-one-host-tf3910675s134.html#a11089258
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.



Re: Trying to run multiple instances on one host

2007-06-12 Thread Wayne Rasmuss



Wayne Rasmuss wrote:
> 
> Hi, I'm pretty new to geronimo so forgive me (and correct me) if I'm
> asking a stupid question.
> 
> I have been trying like mad to run multiple instances of geronimo on the
> same system. I have read the wiki page at:
> http://cwiki.apache.org/confluence/display/GMOxDOC20/Multiple+Repositories
> 
> I have it mostly working, but i am having trouble when I hot deploy a war
> file. I am running two instances that have separate var folders and the
> same respository. When I use the hot deployer, the webapp is deployed to
> the first instance perfectly, but when I boot the second, it is unable to
> hot deploy the war file. It seems that this is because the war file has
> been deployed in the shared repository but the non-shared config.xml does
> not have a reference to the war.
> 
> I would be perfectly happy if I could run two separate instances, each
> with their own repository, but I can't quite understand the documentation
> on how to do that. Any thoughts? 
> 
> Thanks
> Wayne
> 

Sorry, forgot to mention that I am using 2.0 M5

-- 
View this message in context: 
http://www.nabble.com/Trying-to-run-multiple-instances-on-one-host-tf3910675s134.html#a11088330
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.



Trying to run multiple instances on one host

2007-06-12 Thread Wayne Rasmuss

Hi, I'm pretty new to geronimo so forgive me (and correct me) if I'm asking a
stupid question.

I have been trying like mad to run multiple instances of geronimo on the
same system. I have read the wiki page at:
http://cwiki.apache.org/confluence/display/GMOxDOC20/Multiple+Repositories

I have it mostly working, but i am having trouble when I hot deploy a war
file. I am running two instances that have separate var folders and the same
respository. When I use the hot deployer, the webapp is deployed to the
first instance perfectly, but when I boot the second, it is unable to hot
deploy the war file. It seems that this is because the war file has been
deployed in the shared repository but the non-shared config.xml does not
have a reference to the war.

I would be perfectly happy if I could run two separate instances, each with
their own repository, but I can't quite understand the documentation on how
to do that. Any thoughts? 

Thanks
Wayne
-- 
View this message in context: 
http://www.nabble.com/Trying-to-run-multiple-instances-on-one-host-tf3910675s134.html#a11088329
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.