Re: Welcome viola.lu as a new committer

2011-01-02 Thread Jacek Laskowski
On Thu, Dec 30, 2010 at 6:57 AM, Ivan  wrote:
> I would like to welcome viola.lu aboard, as she recently accepted the
> Geronimo PMC invitation to become a committer.  Her account was just created
> this morning (viola.lu), so you should start seeing some commits from her
> soon.

Gratulacje!

Jacek

-- 
Jacek Laskowski
Notatnik Projektanta Java EE - http://jaceklaskowski.pl


Re: Prevent EJB by beeing called from web interface

2008-07-11 Thread Jacek Laskowski
On Tue, Jul 8, 2008 at 1:35 PM, rbaumhof <[EMAIL PROTECTED]> wrote:

> we have an application architecture where we use session fassades to access
> the software components and  at the backend a DAO pattern to access the
> database. The Session fassades and also the DAO's are designed as stateless
> session beans. Our security concept is realised by interceptor classes, but
> we only want to secure the fassade beans. But of course also the dao's can
> be called by the web interface.
>
> My question is: Is there a way to hide the DAO's "behind" the fassades (make
> them only be callable by other EJB's, but not by the web interface)??

I think securing the DAO SLSBs with @RolesAllowed would do the trick.
Your interceptors should deny access for unauthorized calls too if
they're in charge of it, but somehow you seem to indicate they don't
work as expected. Could you describe them a bit more?

Jacek

-- 
Jacek Laskowski
Notatnik Projektanta Java EE - http://www.JacekLaskowski.pl


Re: Day Trader deploy Cloudscape issues: "can't resolve admin object ref"

2008-07-07 Thread Jacek Laskowski
On Mon, Jul 7, 2008 at 11:46 PM, David Jencks <[EMAIL PROTECTED]> wrote:

>  I no longer think its a good idea
> to include the database and activemq configuration directly in the ear.

Why is so? Could you elaborate? I've been a great fan of using bundled
plan from the very first day of its inception. Is it because an admin
may not notice them and his/her server becomes out of his/her control?

Jacek

-- 
Jacek Laskowski
Notatnik Projektanta Java EE - http://www.JacekLaskowski.pl


Re: Day Trader deploy Cloudscape issues: "can't resolve admin object ref"

2008-07-07 Thread Jacek Laskowski
On Mon, Jul 7, 2008 at 9:21 PM, harikaried <[EMAIL PROTECTED]> wrote:
>
> I'm trying to deploy Day Trader with the embedded Cloudscape db with the
> following command:
>
> $GERONIMO_HOME/bin/deploy.sh deploy
> modules/ear/target/daytrader-ear-2.0-SNAPSHOT.ear
> plans/daytrader-g-2.0-SNAPSHOT-plan.xml

The plan would be of a great help.

Jacek

-- 
Jacek Laskowski
Notatnik Projektanta Java EE - http://www.JacekLaskowski.pl


Re: Could I use Hibernate as default persistence engine with Geronimo 2.1?

2008-07-07 Thread Jacek Laskowski
On Mon, Jul 7, 2008 at 2:07 PM, Beniamin Mazan <[EMAIL PROTECTED]> wrote:

Please copy/paste the subject at the very least so there's anything to
respond to. Care to negotiate? ;-)

I haven't seen anybody who has tried to change OpenJPA (the default
JPA engine in Geronimo) to Hibernate as a default JPA provider, but
Hibernate works fine when specified in provider in persistence.xml.
The only drawback of specyfing it in the aforementioned file
is...well...having to specify it explicitly. Not much, but could be
less of course. I think it'd be a good exercise to find out how much
effort changing OpenJPA to Hibernate would require. Perhaps not an
easy task but definitely doable.

Jacek

-- 
Jacek Laskowski
Notatnik Projektanta Java EE - http://www.JacekLaskowski.pl


Re: Use of a GBean from a Message EJB

2008-07-07 Thread Jacek Laskowski
On Tue, Jul 1, 2008 at 1:40 PM, dsthode
<[EMAIL PROTECTED]> wrote:

> I've followed your advice and changed the default namespace to openejb
> version 2.2 and added a  element for the  resolution,
> but Geronimo keeps failing on deployment with the message that  is
> not in geronimo-namespace-1.2 schema but in
> http://openejb.apache.org/xml/ns/openejb-jar-2.2, even though you can open
> geronimo-naming-1.2 and find  defined in this schema.

Did you happen to sort it out? What was the solution?

Jacek

-- 
Jacek Laskowski
Notatnik Projektanta Java EE - http://www.JacekLaskowski.pl


Re: Geronimo 2.1.2-SNAPSHOT Server Start-Up Failed

2008-07-06 Thread Jacek Laskowski
On Sun, Jul 6, 2008 at 7:22 AM, jklcom99 <[EMAIL PROTECTED]> wrote:
>
> I'm running 07/03 build
>
> [java] Booting Geronimo Kernel (in Java 1.6.0)...

Change the JVM version and let us know how it goes. AFAIR, the CORBA
stuff was exactly what made us stay at Java SE 5.0-level.

Jacek

-- 
Jacek Laskowski
Notatnik Projektanta Java EE - http://www.JacekLaskowski.pl


Re: error writing tuple to database "the owning entity is not mapped" geronimo 2.1.1

2008-07-06 Thread Jacek Laskowski
On Sun, Jul 6, 2008 at 11:34 AM, Mario Kofler <[EMAIL PROTECTED]> wrote:
>

Hi Mario,

Let's make it simpler by removing some unneeded, defaulted
configuration values in your sample.

> http://java.sun.com/xml/ns/persistence";
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> 
> xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd";
> version="1.0">
>  

Hint: you may remove transaction-type as it's JTA in managed
environment like Geronimo.

>videothek
>org.apache.openjpa.persistence.PersistenceProviderImpl

Provider defaults to openjpa in Geronimo. You may remove it.

>vt.bean.entity.Person
>vt.bean.entity.Actor
>vt.bean.entity.Director
>vt.bean.entity.Movie
>vt.bean.entity.Dvd

Not needed in managed environment like Geronimo. It makes things run
faster - no need to look for annotated classes, but am not sure if we
don't do this even though the class elements are specified.

Also, you showed Person entity class, but what about the rest? Either
remove them and let's play with a single entity only and add more
later or show all of them as I think the issue might be in the others.

>
>
>  
>  
>
>jdbc/postgres
>jdbc/postgres

I think *data-source should be before properties element. Geronimo
should really be more strict.

> @Entity
> @Table(name="person")
> @Inheritance(strategy=InheritanceType.JOINED)
> @DiscriminatorColumn(name="role", discriminatorType=DiscriminatorType.STRING)

discriminatorType is defaulted to STRING.

> @DiscriminatorValue("P")
> public class Person implements java.io.Serializable
> {
>private int id;
>private String name;
>private Calendar birthdate;
>private String origin;
>
>@Id
>@GeneratedValue
>public int getId()
>{
>return id;
>}
>
>public void setId(int id)
>{
>this.id = id;
>}
>
>public String getName()
>{
>return name;
>}
>
>public void setName(String name)
>{
>this.name = name;
>}
>
>@Temporal(TemporalType.DATE)
>public Calendar getBirthdate()
>{
>return birthdate;
>}

I think that's the issue - @Temporal. According to the spec - JSR 220:
Enterprise JavaBeansTM,Version 3.0 Java Persistence API - page 234:




public enum TemporalType {
DATE, // java.sql.Date
TIME, // java.sql.Time
TIMESTAMP // java.sql.Timestamp
}









so Calendar seems to not be accepted for @Temporal annotation. Change
the return type of the getter.

I think the Person entity is not mapped correctly and when you run
your sample you are off the error messages which tell you the Person
entity could not be mapped.

Jacek

-- 
Jacek Laskowski
Notatnik Projektanta Java EE - http://www.JacekLaskowski.pl


Re: error writing tuple to database "the owning entity is not mapped" geronimo 2.1.1

2008-07-05 Thread Jacek Laskowski
On Sat, Jul 5, 2008 at 11:19 AM, the666pack <[EMAIL PROTECTED]> wrote:

> my database scheme consists of a Person entity and a Director entity which
> is inherited from the Person entity.

Hi,

It won't solve your issue, but why is Person a superclass of
Directory. Shouldn't Director be a role of a Person in a given
scenario? If a person becomes a director, (s)he won't be able to
resign and become a manager or just a developer?

On to your issue...

> so i want to write a Person first, to keep it simple. unfortunately i get an
> error when i try to perform a write:

Could you show us how Person looks like? And your persistence.xml too.
I assume you don't use orm.xml or alike, do you? If so, show it too.

Jacek

-- 
Jacek Laskowski
Notatnik Projektanta Java EE - http://www.JacekLaskowski.pl


Re: GEP Publishing to server automatically

2008-07-05 Thread Jacek Laskowski
On Sat, Jul 5, 2008 at 9:31 PM, purdticker <[EMAIL PROTECTED]> wrote:
>
> The newest version of eclipse no longer has the option to disable automatic
> publishing of project to geronimo server.  It used to be in: Window ->
> Preferences -> Server.  There was a checkbox that you could disable to stop
> this.  Anyone know if this has just moved or is it moved somewhere
> inconspicuous?

I don't have the latest build, but it was always in the server
document - select the server in the Servers view, F3, and have a look
at Publishing section.

Jacek

-- 
Jacek Laskowski
Notatnik Projektanta Java EE - http://www.JacekLaskowski.pl


Re: deployment of my application

2008-06-26 Thread Jacek Laskowski
On Thu, Jun 26, 2008 at 2:18 PM, Janesh <[EMAIL PROTECTED]> wrote:

> We are currently working on TOmcat 6.0.13 and now I have installed
> Geronimo and it started also.
> But now where I have to put my tomcat classes and how to call
> application from browser.

Oh, come on. You can do better than this -
http://cwiki.apache.org/GMOxDOC21/documentation.html is plenty of docs
to get you started. All's for free! ;-)

Start with Quick start - Apache Geronimo for the impatient
http://cwiki.apache.org/GMOxDOC21/quick-start-apache-geronimo-for-the-impatient.html.
Ask when in trouble ("trouble" means "I read everything at the
aforementioned page and am stuck").

Jacek

-- 
Jacek Laskowski
Notatnik Projektanta Java EE - http://www.JacekLaskowski.pl


Re: Websphere to Geronimo

2008-06-26 Thread Jacek Laskowski
On Thu, Jun 26, 2008 at 11:10 PM, Donald Woods <[EMAIL PROTECTED]> wrote:
> The biggest problem, is the level of WTP used by Rational.
> RAD/RSA 7.0 uses Eclispe 3.2 and WTP 1.5.
> RAD/RSA 7.5 uses Eclipse 3.3 and WTP 2.0, which is the Eclipse levels GEP
> 2.1.1 was tested against.  I think Tim tried running GEP 2.1.1 on RAD 7.5,
> but ran into a missing Console prereq  you'd have to see if he has more
> info.

Well, you can install RAD 7.5 atop Eclipse IDE you've got installed
elsewhere. It might be easier than we think to have RAD 7.5+Eclipse
IDE 3.3.2+GEP 2.1.1 bundled together. Anyone fancy trying it out?

Jacek

-- 
Jacek Laskowski
Notatnik Projektanta Java EE - http://www.JacekLaskowski.pl


Re: Update MyFaces in Geronimo 2.1.1

2008-06-25 Thread Jacek Laskowski
On Wed, Jun 25, 2008 at 8:00 PM, David Jencks <[EMAIL PROTECTED]> wrote:

> hope this makes sense :-)

Nice timing! Did you know I'd send a response too and meant to compete
with it? ;-)

Jacek

-- 
Jacek Laskowski
Notatnik Projektanta Java EE - http://www.JacekLaskowski.pl


Re: Update MyFaces in Geronimo 2.1.1

2008-06-25 Thread Jacek Laskowski
On Wed, Jun 25, 2008 at 6:58 PM,  <[EMAIL PROTECTED]> wrote:
>
> So the 'Simple jar upgrade' method described there works even with jars like
> MyFaces that are defined as non-overridable due to the Java EE spec
> requirements?

non-overridable from the application/module's point of view not
server. The plugin-infrastructure page describes the process of
replacing/overriding a jar in Geronimo repository. Applications still
cannot override classes/jars that are not overrideable.

Jacek

-- 
Jacek Laskowski
Notatnik Projektanta Java EE - http://www.JacekLaskowski.pl


Re: GEP: NullPointerException when deploying project

2008-06-22 Thread Jacek Laskowski
On Sun, Jun 22, 2008 at 11:48 AM, Gert Vanthienen
<[EMAIL PROTECTED]> wrote:

> When I use GEP 2.1.0 with Ganymede RC4 and try to publish a webapp to
> Geronimo 2.1.1, I get the exception below.  Did I miss something up or is
> this a known bug?

"A known bug" is that Eclipse Ganymede is not on the list of supported
platforms for GEP :( We, Ganymede users, have to wait a little longer
until it's fixed. Ganymede RC3 worked fine with GEP 2.1.1, but RC4
broke it.

Jacek

-- 
Jacek Laskowski
Notatnik Projektanta Java EE - http://www.JacekLaskowski.pl


Re: Cound not find parent configuration: org/apache/geronimo/configs/activemq-broke

2008-06-20 Thread Jacek Laskowski
On Fri, Jun 20, 2008 at 1:00 AM, jklcom99 <[EMAIL PROTECTED]> wrote:

> [java] Caused by:
> org.apache.geronimo.kernel.config.InvalidConfigException:
>  Error starting configuration gbean test/testJMS/1.0/rar
...
> [java] Caused by:
> org.apache.geronimo.kernel.config.InvalidConfigException:
>  Cound not find parent configuration:
> org/apache/geronimo/configs/activemq-broke
> r/2.1.2-SNAPSHOT/car

Hi,

It's 2.1.2-SNAPSHOT I believe and you're deploying
test/testJMS/1.0/rar a rar module? The plan would be very helpful to
look at. You mentioned about offline deployer - what's the error
message on its console? Is there anything causing you working with
2.1.2 not 2.2-SNAPSHOT or 2.1.1 (that's what I'm using and I don't
think I'll have time to look at the earlier versions, sorry)?

Entering mode "Awaiting response..." ;-)

Jacek

-- 
Jacek Laskowski
Notatnik Projektanta Java EE - http://www.JacekLaskowski.pl


Re: Error opening the editor

2008-06-20 Thread Jacek Laskowski
On Thu, Jun 19, 2008 at 11:26 PM, Tim Harsch <[EMAIL PROTECTED]> wrote:
> Hi Tim et al,
>I tried your xml verbatim.  No love.

Hi,

What's in /.metadata/.log file? Clear it and run
Eclipse+GEP again. Send the file as attachment to review. I'm sure
there'll be more.

Jacek

-- 
Jacek Laskowski
Notatnik Projektanta Java EE - http://www.JacekLaskowski.pl


Re: Error opening the editor

2008-06-19 Thread Jacek Laskowski
On Thu, Jun 19, 2008 at 3:16 AM, Tim Harsch <[EMAIL PROTECTED]> wrote:

>Here's the content of my file:
>
> http://geronimo.apache.org/xml/ns/j2ee/web-1.1";>
>
> 

It's just a guess, but shouldn't environment be qualified as follows
http://geronimo.apache.org/xml/ns/deployment-1.2";>?

Jacek

-- 
Jacek Laskowski
Notatnik Projektanta Java EE - http://www.JacekLaskowski.pl


Re: Geronimo 2.1 and Seam

2008-06-19 Thread Jacek Laskowski
On Thu, Jun 19, 2008 at 3:04 PM, Kevan Miller <[EMAIL PROTECTED]> wrote:

> I think that's a good idea. Any volunteers?

I'd go that route if/when it's agreed it's really a good approach. Is
it? Is the plugin architecture meant for stuff like this? Can someone
confirm it?

Jacek

-- 
Jacek Laskowski
Notatnik Projektanta Java EE - http://www.JacekLaskowski.pl


Re: Geronimo 2.1 and Seam

2008-06-19 Thread Jacek Laskowski
On Thu, Jun 19, 2008 at 6:36 AM, steausti <[EMAIL PROTECTED]> wrote:

> I work with Burt and we are moving to Geronimo 2.1.1 and we have found that
> many of the initial issues we encountered are fixed in this latest version.

I'm working with the latest 2.0.3.CR1 release of JBoss Seam and basic
setups worked fine.

> We were wondering if you knew if there have been any changes with respect to
> the Hibernate transaction manager jar.  Should we continue to use the
> geronimo-hibernate-transaction-manager-lookup-1.0-SNAPSHOT.jar that you sent
> our way (thanks again for that!)?  Or does 2.1.1 have an alternate/included
> way to handle Hibernate setups?

Nothing's changed. Keep using it. I wonder if we could publish it as a
plugin or such so people could just plug it in to the server and use
it. Don't know much about plugins so can't comment on it beside
mentioning it as a possible idea.

Jacek

-- 
Jacek Laskowski
Notatnik Projektanta Java EE - http://www.JacekLaskowski.pl


Re: override persistence.xml in geronimo plan

2008-06-19 Thread Jacek Laskowski
On Thu, Jun 19, 2008 at 9:07 AM, Phani Madgula
<[EMAIL PROTECTED]> wrote:

> I saw a related JIRA created for this issue. Can you explain what can be
> overridden in geronimo plan and how? Is it for only  and
> ??
> https://issues.apache.org/jira/browse/GERONIMO-3308

I'd say everything can be overridden. See
jboss-seam-jee5-geronimo-plan.xml in Running JBoss Seam 2.0.0.GA on
Geronimo 2.1.1 
(http://cwiki.apache.org/GMOxSAMPLES/running-jboss-seam-200ga-on-geronimo-211.html).

Jacek

-- 
Jacek Laskowski
Notatnik Projektanta Java EE - http://www.JacekLaskowski.pl


Re: Trying to create EntityManager in web application

2008-06-03 Thread Jacek Laskowski
On Tue, Jun 3, 2008 at 11:52 AM, Phani Madgula
<[EMAIL PROTECTED]> wrote:

> I was able to inject EntityManager in a servlet class by placing
> META-INF/persistence.xml in WEB-INF/classes. Only when
> META-INF/peristence.xml is placed in WEB-INF/classes does the web
> application is able to read the persistence.xml (application
> classloader is able to find it).

I couldn't figure it out myself either why META-INF in the webapp root
was not searched for persistence.xml's, but that's how it's in webapps
(I guess it's because the classloader for a webapp doesn't include /
in its classpath). It'll change in Java EE 6 (I couldn't resist
mentioning it ;-))

Anyway, I think you'd be better off placing your entities (or better
the classes that constitute the model) to a separate project and
include jar file only. It makes your model "technology clean" and no
ties with JPA will ever exist in the model. persistence.xml and
orm.xml would go to WEB-INF/classes/META-INF or any other jar file in
WEB-INF/lib. It could be that  the jar file with orm.xml and
persistence.xml files would contain these files only so it's possible
to replace just the jar file to change the jpa configuration.

Just a couple of ideas.

Jacek

-- 
Jacek Laskowski
http://www.JacekLaskowski.pl


Re: remote ejb scalability issue

2008-04-18 Thread Jacek Laskowski
On Thu, Apr 17, 2008 at 10:42 PM, Trygve Hardersen <[EMAIL PROTECTED]> wrote:

> javax.naming.NamingException: Cannot lookup '/BankManagerFacadeBeanRemote'.
> [Root exception is java.rmi.RemoteException: Cannot read the response from
> the server (OEJP/3.0) : null; nested exception is:
>  java.io.EOFException]
>

Hi,

Are you by any chance running the tests on t60p machine? I've seen
this issue in our daily build (which is on Linux and possibly not
t60p), but couldn't figure out what the root cause might be and am
asking for more information. It looks the read thread gets no data as
it's faster then the sender thread.

Jacek

-- 
Jacek Laskowski
http://www.JacekLaskowski.pl


Webapp with a (really) remote EJB

2008-04-14 Thread Jacek Laskowski
Hi,

I've been developing two enterprise applications sharing the same
interface so a managed bean (jsf) - 1st ear - could execute an ejb -
2nd ear. These two ears are deployed to different Geronimo instances.
I wonder if I can leverage @EJB annotation in this case as the first
Geronimo instance doesn't even know where the ejb has to come from. Is
the only way to work it out is to use Context.lookup directly from a
managed bean/servlet?

Jacek

-- 
Jacek Laskowski
http://www.JacekLaskowski.pl


Re: Geronimo Eclipse Plugin 2.1 ?

2008-03-28 Thread Jacek Laskowski
On Thu, Mar 27, 2008 at 10:05 PM, Hernan Cunico <[EMAIL PROTECTED]> wrote:

>  this plugin has not been released yet but it should be out very soon.
>  You can get the latest unstable here 
> http://people.apache.org/dist/geronimo/eclipse/unstable/2.1.0/

Just added the comment of yours to the page so it is clear and has its
place where people can find it easily.

Jacek

-- 
Jacek Laskowski
http://www.JacekLaskowski.pl


Re: Geronimo 2.1 and Seam

2008-03-26 Thread Jacek Laskowski
On Mon, Mar 17, 2008 at 10:17 PM, Burt Prior <[EMAIL PROTECTED]> wrote:

>  >  we use JPA to run your CMPs.  I'm not familiar with why Jacek had you add
>  > that, so I'm not sure what to advise.  We generate the cmp peristence unit
>  > for you as well, so I'm not too sure on any reason you'd need to
>  > explicitly create it.
>
>  Ok.  We are using EJB 3 JPA Entities, so I don't think we are running any
>  CMP's at all.  Also, I don't think this is a Seam issue at all.
>
>  When I take out that 'duplicate' 'cmp' PU, it generates an error, so for
>  some reason it's needed.  I guess its because we are using the latest JEE5
>  stack to develop our Seam app on G2.1.

I remember I've been having issues with the double processing entities
by openjpa. Without it the issue vanished so not much thinking here
just letting the issue go away so I could go on.

Jacek

-- 
Jacek Laskowski
http://www.JacekLaskowski.pl


Re: How to use Apache Geronimo with NetBeans 6 ?

2008-03-17 Thread Jacek Laskowski
On Sun, Mar 16, 2008 at 4:00 AM, Jin Xu <[EMAIL PROTECTED]> wrote:

> I`m a newer of Apache Geronimo, and i want to know how to use Apache
> Geronimo with NetBeans 6, please ?

You can't as there's no NetBeans plugin for Geronimo.

Jacek

-- 
Jacek Laskowski
http://www.JacekLaskowski.pl


Re: Significance of writing an additional Descriptor file

2008-03-04 Thread Jacek Laskowski
On Mon, Mar 3, 2008 at 10:37 PM, Ch Praveena <[EMAIL PROTECTED]> wrote:

>May i know the significance of writing geronimo-web.xml in WEB-INF, along
> with web.xml, while deploying war files.

In short...

web.xml is a java ee thingy. web.xml is mandatory in Java Servlets
2.5. Without it the war would be incorrect. You use web.xml to declare
your *logical* resource names. You declare your requirements a runtime
environment.

geronimo-web.xml is a Geronimo thingy and is optional, but helps
mapping *logical* names to their runtime counterparts. The runtime
resources are managed by application server and their access is
application server-specific. When names are the same and Geronimo can
compute their runtime representations you don't need geronimo-web.xml
at all.

Application assembler maps the *logical* names to runtime counterparts
with geronimo-web.xml. I'd say you should never use geronimo-web.xml
in war. Why? Because it's not in a developer role to  do the mapping,
but it's only him/her able to change the war (the war should be sealed
and untouched by anyone but developer, right?). It's an application
assembler's or a application deployer's job. They can use a separate,
external plan (geronimo-web.xml, geronimo-plan.xml, name it whatever
you want) and not change anything in your war or ear. That's one of
the goodies you can find in Geronimo (there're more, but since you've
not asked about them I won't list them here ;-)). No need to include
the runtime configuration *inside* an application since it could
eventually be deployed to different Geronimo runtime environments
where resources are named differently depending on administrator's
mood (or expertise).

Jacek

-- 
Jacek Laskowski
http://www.JacekLaskowski.pl


Re: Geronimo 2.1 and Seam

2008-03-03 Thread Jacek Laskowski
On Mon, Mar 3, 2008 at 10:16 AM, Burt Prior <[EMAIL PROTECTED]> wrote:

>  'java.sql.SQLException - invalid oracle url specified:
>  OracleDataSource.makeURL'.

Show the plan for the database pool and the entire stack trace. If
oracle thin driver class barfs it could mean that the url is incorrect
which might be easy to fix. In the meantime write a sample jdbc
program to connect to the database to make sure it can be connected
from outside.

Jacek

-- 
Jacek Laskowski
http://www.JacekLaskowski.pl


Re: GERONIMO 2.1 first impressions, different defects

2008-03-02 Thread Jacek Laskowski
On Sun, Mar 2, 2008 at 12:39 PM, Jacek Laskowski <[EMAIL PROTECTED]> wrote:

>  Because of some issues with 10.3.1.4 (I can't remember now what they
>  were exactly) it turned out we had to downgrade it to 10.2.2.0. It
>  appears we didn't add a jira issue about it and thus no information
>  about the downgrade.

http://issues.apache.org/jira/browse/GERONIMO-3545

Jacek

-- 
Jacek Laskowski
http://www.JacekLaskowski.pl


Re: GERONIMO 2.1 first impressions, different defects

2008-03-02 Thread Jacek Laskowski
On Sun, Mar 2, 2008 at 11:15 AM, fp <[EMAIL PROTECTED]> wrote:

>  As in Release note (GERONIMO-3545) Upgrade Apache Derby to 10.3.1.4. but
>  only 10.2.2.0 in Repository.

Because of some issues with 10.3.1.4 (I can't remember now what they
were exactly) it turned out we had to downgrade it to 10.2.2.0. It
appears we didn't add a jira issue about it and thus no information
about the downgrade.

Jacek

-- 
Jacek Laskowski
http://www.JacekLaskowski.pl


Re: Request.getContextPath() after RequestDispatcher.forward()

2008-02-29 Thread Jacek Laskowski
On Fri, Feb 29, 2008 at 5:29 AM, ciAnd7 <[EMAIL PROTECTED]> wrote:

>  I have a problem with  servlet container (tomcat) in geronimo. May be it is
>  not right mailing list for such question, so please point me right place.

Could you verify if that happens on Tomcat alone too? This way we
could cross Geronimo out from the list of possible suspects ;-)

Jacek

-- 
Jacek Laskowski
http://www.JacekLaskowski.pl


Re: Geronimo WTP client for eclipse , server cannot start

2008-02-29 Thread Jacek Laskowski
On Fri, Feb 29, 2008 at 9:25 AM, CG <[EMAIL PROTECTED]> wrote:

>  Caused by: java.io.InvalidClassException:
>  javax.security.jacc.WebRoleRefPermission; local class incompatible:
>  stream classdesc serialVersionUID = 7625355096788237915, local class
>  serialVersionUID = 1
> at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:562)

That's what makes Geronimo unhappy. Can't figure out what it might be
caused by. Can you try running Eclipse and Geronimo with the same JVM
and see what happens?

Jacek

-- 
Jacek Laskowski
http://www.JacekLaskowski.pl


Re: problem with deploying a mdb (within ear)

2008-02-29 Thread Jacek Laskowski
On Thu, Feb 28, 2008 at 2:28 PM, montyk <[EMAIL PROTECTED]> wrote:

>  In the "5-min enterprise application development" tutorial at
>  
> http://cwiki.apache.org/GMOxSAMPLES/5-minute-tutorial-on-enterprise-application-development-with-eclipse-and-geronimo.html
>
>  there's a small section that states: "Remove
>  ejbModule/META-INF/openejb-jar.xml file in the SampleEJB project as it
>  causes deployment issues."
>
>  Can someone point me towards an explanation why it was possible to deploy
>  the EJB in tutorial successfully but - not when attempting to create a MDB?

Hi,

Let me try it out. It's due to incompatibility between the versions of
openejb-jar.xml created by GEP (Geronimo Eclipse Plugin) and the one
expected by Geronimo 2.1. That's the only reason.

You have to map your logical resources used by MDB to the runtime
resources via openejb-jar.xml *or* geronimo deployment plan (the name
can be anything you want if deployed with deploy or web console and
specified as the second parameter or it's geronimo-application.xml if
it's in META-INF or the EAR). I keep promising myself to publish a
Polish article of mine about Geronimo and MDB (Uruchomienie ziarna MDB
w Apache Geronimo [1]) as I see people missing more 5-minute articles
like 5-minute Tutorial on Enterprise Application Development with
Eclipse and Geronimo [2]. Until it happens have a look at some
examples of these xml descriptors the Polish article of mine [1], esp.
the section Deskryptor_aplikacji_EAR_-_geronimo-application.xml [3].
The article is in Polish, but the XMLs are English-friendly ;-)

[1] http://www.jaceklaskowski.pl/wiki/Uruchomienie_ziarna_MDB_w_Apache_Geronimo
[2] 
http://cwiki.apache.org/GMOxDOC21/5-minute-tutorial-on-enterprise-application-development-with-eclipse-and-geronimo.html
[3] 
http://www.jaceklaskowski.pl/wiki/Uruchomienie_ziarna_MDB_w_Apache_Geronimo#Deskryptor_aplikacji_EAR_-_geronimo-application.xml

Jacek

-- 
Jacek Laskowski
http://www.JacekLaskowski.pl


Re: Geronimo 2.1 and Seam

2008-02-28 Thread Jacek Laskowski
On Thu, Feb 28, 2008 at 4:42 PM, Burt Prior <[EMAIL PROTECTED]> wrote:

>  The difference appears to be, your example continues to load the booking
>  application, and mine throws an exception on the next line:
>
>  14:00:28,115 ERROR [GBeanInstanceState] Error while starting; GBean is now
>
> in the FAILED state:
>  
> abstractName="org.jboss.seam.examples.jee5/jboss-seam-jee5/2.1.0.A1/ear?EJBModule=jboss-seam-jee5.jar,J2EEApplication=org.jboss.seam.examples.jee5/jboss-seam-jee5/2.1.0.A1/ear,PersistenceUnitModule=jboss-seam-jee5.jar,j2eeType=PersistenceUnit,name=bookingDatabase"
>  java.lang.NullPointerException
> at
>
> org.jboss.util.file.ArchiveBrowser.getBrowser(ArchiveBrowser.java:62)

It stroke me too, but couldn't find any explanation for it. I think I
need to run the sample again with the latest Geronimo to see if
nothing has changed since.

Jacek

-- 
Jacek Laskowski
http://www.JacekLaskowski.pl


Re: Geronimo 2.1 and Seam

2008-02-28 Thread Jacek Laskowski
On Thu, Feb 28, 2008 at 10:04 AM, David Jencks <[EMAIL PROTECTED]> wrote:

> cd 
> mkdir -p
> repository/org/apache/geronimo/modules/geronimo-persistence-jpa10/2.2-SNAPSHOT
> wget
> http://people.apache.org/repo/m2-snapshot-repository/org/apache/geronimo/modules/geronimo-persistence-jpa10/2.2-SNAPSHOT/geronimo-persistence-jpa10-2.2-20080228.021634-2.jar
> mv geronimo-persistence-jpa10-2.2-20080228.021634-2.jar
> repository/org/apache/geronimo/modules/geronimo-persistence-jpa10/2.2-SNAPSHOT/geronimo-persistence-jpa10-2.2-SNAPSHOT.jar
>
> then edit var/config/artifact_aliases.properties
>
> add lines
>
> org.apache.geronimo.modules/geronimo-persistence-jpa10//jar=org.apache..geronimo.modules/geronimo-persistence-jpa10/2.2-SNAPSHOT/jar
> org.apache.geronimo.modules/geronimo-persistence-jpa10/2.1/jar=org.apache.geronimo.modules/geronimo-persistence-jpa10/2.2-SNAPSHOT/jar
>
> I have a lot of trouble writing directions that can be followed, so don't be
> shy about complaining :-)

Hi Dave,

You beat me to it. I was just answering it.

> hmmm we need console and gshell actions to upgrade an artifact from a
> known handy repo such as the apache snapshot repo...

Can't wait till I present it at an upcoming conference in Poland.
Really great stuff (if you get it working ;-))

Jacek

-- 
Jacek Laskowski
http://www.JacekLaskowski.pl


Re: Upgrade OpenJPA to v1.0.2 in Geronimo 2.0 or 2.1 due to bug

2008-02-27 Thread Jacek Laskowski
On Wed, Feb 27, 2008 at 6:43 PM, Brian Gregory <[EMAIL PROTECTED]> wrote:

>  1. placing the openjpa-1.0.2.jar in my WEB-INF/lib directory

I'm pretty sure I've read in the spec that a jpa provider can be put
in WEB-INF/lib directory and it should be the one used by the webapp
overriding the one provided by the application server. Don't know if
Geronimo supports this. It looks it does not. It's a bug then. Report
the issue.

As to 4-5 you can use artifact_alias entry to get geronimo to find it
(quotes from DJ's last email ;-))

entries would look like
org.apache.openjpa/openjpa//jar=org.apache.openjpa/openjpa/1.0.2/jar
org.apache.openjpa/openjpa/1.0.0/jar=org.apache.openjpa/openjpa/1.0.2/jar

I have never used the technique so I'd be glad if you let me know how
it worked ;-)

Jacek

-- 
Jacek Laskowski
http://www.JacekLaskowski.pl


Re: Geronimo 2.1 and Seam

2008-02-27 Thread Jacek Laskowski
On Wed, Feb 27, 2008 at 5:51 PM, David Jencks <[EMAIL PROTECTED]> wrote:

>  did you complain about this on the lists when you found the problem?

Complain? No, not at all. Just put a note with other stuff and it
might not get enough attention. See
http://www.nabble.com/forum/ViewPost.jtp?post=13785778.

Jacek

-- 
Jacek Laskowski
http://www.JacekLaskowski.pl


Re: Geronimo 2.1 and Seam

2008-02-27 Thread Jacek Laskowski
On Wed, Feb 27, 2008 at 5:29 PM, Jacek Laskowski <[EMAIL PROTECTED]> wrote:

>  Oh, yeah - I can remember that NPE. I remember I had to download
>  Hibernate and patch it before moving on. Since I didn't describe it in
>  the doc I had to work it around somehow. Can't remember exactly.
>  Search in the Geronimo dev archive. It could contain the answer. I'll
>  do the same too.

Gotcha! You guys don't seem to read the docs carefully. It *is*
described in the documentation -
http://cwiki.apache.org/GMOxSAMPLES/running-jboss-seam-200ga-on-geronimo-21.html.
Look for Ejb3Configuration.patch.

Jacek

-- 
Jacek Laskowski
http://www.JacekLaskowski.pl


Re: Geronimo 2.1 and Seam

2008-02-27 Thread Jacek Laskowski
On Wed, Feb 27, 2008 at 3:40 PM, Burt Prior <[EMAIL PROTECTED]> wrote:

>  15:19:54,972 ERROR [GBeanInstanceState] Error while starting; GBean is now
>  in the FAILED state:
>  
> abstractName="org.jboss.seam.examples.jee5/jboss-seam-jee5/2.1.0.A1/ear?EJBModule=jboss-seam-jee5.jar,J2EEApplication=org.jboss.seam.examples.jee5/jboss-seam-jee5/2.1.0.A1/ear,PersistenceUnitModule=jboss-seam-jee5.jar,j2eeType=PersistenceUnit,name=bookingDatabase"
>  java.lang.NullPointerException
> at
>  org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:346)
> at
>  
> org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:126)

Oh, yeah - I can remember that NPE. I remember I had to download
Hibernate and patch it before moving on. Since I didn't describe it in
the doc I had to work it around somehow. Can't remember exactly.
Search in the Geronimo dev archive. It could contain the answer. I'll
do the same too.

Jacek

-- 
Jacek Laskowski
http://www.JacekLaskowski.pl


Re: [discuss] How do we improve the user experience of the geronimo server?

2008-02-27 Thread Jacek Laskowski
On Wed, Feb 27, 2008 at 1:11 PM, Lin Sun <[EMAIL PROTECTED]> wrote:
> That's certainly an excellent idea.  I am also looking for some
>  popular samples that we feel we should get them running on geronimo as
>  I think those will be good to show people how to get their apps
>  working with geronimo.

I'd definitely look forward to seeing a stateful session bean example
with extended PU. Another one would be to develop a session bean that
talks to two PUs (two databases) and sends a message to a topic (not
queue) with MDB attached plus rolling back a tx. These would be killer
apps. Running other jpa providers (besides openjpa) would be of help
too.

Jacek

-- 
Jacek Laskowski
http://www.JacekLaskowski.pl


Re: Geronimo 2.1 and Seam

2008-02-27 Thread Jacek Laskowski
On Wed, Feb 27, 2008 at 12:08 PM, David Jencks <[EMAIL PROTECTED]> wrote:

>  2. You appear to have the same classes listed in the bookingDatabase
>  PU and the cmp 2.1 PU.  I think this is going to lead to trouble.
>  The cmp 2.1 PU shouldn't really even be there unless you have actual
>  ejb 2.1 entity beans and if you do I would rely on the cmp engine to
>  fill in the persistence.xml for it itself.

The classes are listed in cmp2 so openjpa won't get kicked in as
otherwise Hibernate couldn't be used as a jpa provider. I couldn't
come up with a better solution to work around the nasty errors from
openjpa. about CNFE or CCE (don't remember what they were and the only
way to shut them off was to configure cmp2 PU manually).

Jacek

-- 
Jacek Laskowski
http://www.JacekLaskowski.pl


Re: Geronimo 2.1 and Seam

2008-02-27 Thread Jacek Laskowski
On Wed, Feb 27, 2008 at 11:33 AM, Burt Prior <[EMAIL PROTECTED]> wrote:

>  [C:\geronimo-jetty6-javaee5-2.1\var\temp\geronimo-deploymentUtil44832.jar]:
> Error building bean 'HotelBookingAction'.  Exception: class
> org.apache.openejb.OpenEJBException: PersistenceUnit
> 'bookingDatabase 91456273' not found for EXTENDED ref
> 'org.jboss.seam.example.booking.HotelBookingAction/em':
> PersistenceUnit 'bookingDatabase 91456273' not found for EXTENDED
> ref 'org.jboss.seam.example.booking.HotelBookingAction/em'

Hi,

I can't work on it much now, but perhaps we could work it out together
- me thinking aloud and you trying it out. Deal?

Do you have any idea what "bookingDatabase 91456273" came from? I'll
have to ask Dave B (openejb) about the exact error message's origins.
I think openejb know nothing about oracle without some configuration
changes and it might be working with hsql because openejb works with
it by default. Can't really figure it out right now. Did you make any
changes in the example? I vaguely remember bookingDatabase PU, but
nothing springs to my mind about the numbers.

Jacek

-- 
Jacek Laskowski
http://www.JacekLaskowski.pl


Re: Geronimo WTP client for eclipse , server cannot start

2008-02-27 Thread Jacek Laskowski
On Wed, Feb 27, 2008 at 10:33 AM, Jacek Laskowski
<[EMAIL PROTECTED]> wrote:

>  Let's start simple. Download the latest Geronimo release -

Whoops - didn't add the most important information. The latest release
of Geronimo is 2.1.

Jacek

-- 
Jacek Laskowski
http://www.JacekLaskowski.pl


Re: Geronimo WTP client for eclipse , server cannot start

2008-02-27 Thread Jacek Laskowski
On Wed, Feb 27, 2008 at 7:12 AM, CG <[EMAIL PROTECTED]> wrote:
> Hi, I am newbie in Geronimo, or more exactly , newbie in J2EE.
>  I have setup the Geronimo WTP client for eclipse , and when I try to
>  start the server it could not start.
>
>  Environment
>  ==
>  OS is Ubuntu 7.10
>  Geronimo version is geronimo-tomcat6-jee5-2.0.1

Let's start simple. Download the latest Geronimo release -
http://geronimo.apache.org/downloads.html - and start it from the
command line as described here - Quick start - Apache Geronimo for the
impatient (Quick start - Apache Geronimo for the impatient). Where
you're confident it works fine follow the instructions at Welcome to
Apache Geronimo Development Tools Subproject in Additional Information
section. Have fun!

Jacek

-- 
Jacek Laskowski
http://www.JacekLaskowski.pl


Re: Geronimo 2/Log4j question

2008-02-26 Thread Jacek Laskowski
On Tue, Feb 5, 2008 at 11:10 AM, Adam Ruggles <[EMAIL PROTECTED]> wrote:
>
>  I am also having this issue.  In tomcat I just needed a log4j.xml in my
>  classpath, however geronimo seems to ignore it.
>
>  The only solution I've found is to have Spring configure log4j through the
>  web.xml but that takes over all logging in geronimo.  I need to have
>  separate logging for each of my web apps.

Have you tried to inverse-classloading and/or hidden-classes elements
in your plan so log4j and its configuration in Geronimo is for
Geronimo stuff and yours is for your stuff?

Jacek

-- 
Jacek Laskowski
http://www.JacekLaskowski.pl


Re: Geronimo 2.1 and Seam

2008-02-26 Thread Jacek Laskowski
On Tue, Feb 26, 2008 at 4:29 PM, Burt Prior <[EMAIL PROTECTED]> wrote:

>  The deployment plan uses the Derby database.  I'm using Oracle.  I've
>  successfully installed the Oracle jar in the respository and a configured a
>  (thin driver) database pool that jar.
>
>  I now successfully build the app, but when I try to deploy.bat from the
>  command line using the "The Plan", I get errors such as...
>
>  "Exception in Thread.. java.lang.NoClassDefFoundError:
>  oracle/jdbc/pool/OracleDataSource"
>
>  This class is in the oracle jar, but I think the geronimo deployment plan is
>  incorrect.

Hi,

Add Oracle Thin driver as a dependency to the app in the plan and
rerun the deployment. I think you need something like:


  
org.apache.geronimo.hibernate.transaction
geronimo-hibernate-transaction-manager-lookup
jar
  
  
com.oracle.thindriver
oracle-thin-driver
jar
  


Note the part for the oracle thin driver. Update it with correct data
and give it a go.

When in trouble, show the plan so it's easier to help you.

Jacek

-- 
Jacek Laskowski
http://www.JacekLaskowski.pl


Re: EJB Entity Cache in Geronimo 2.1

2008-02-26 Thread Jacek Laskowski
On Tue, Feb 26, 2008 at 6:41 PM, ApolloX <[EMAIL PROTECTED]> wrote:

>  I don't think JPA is reading the persistence.xml for CMP2 beans.  I added
>  some parameters to and it ignored them.  Each time it deploys, it uses the
>  default broker.  Is there reason why this file might be ignored for CMP2
>  beans?

Hi,

Perhaps I don't really understand it, but could you try out putting
the persistence.xml file inside your geronimo plan as outlined in
http://cwiki.apache.org/GMOxSAMPLES/running-jboss-seam-200ga-on-geronimo-21.html.
See the The plan, esp. the part with persistence-unit name="cmp".

Jacek

-- 
Jacek Laskowski
http://www.JacekLaskowski.pl


Re: Deploy Mdb that use my own inbound resource adapter

2008-02-26 Thread Jacek Laskowski
On Wed, Jan 16, 2008 at 11:56 PM, ivanrc <[EMAIL PROTECTED]> wrote:

>  Error deploying 'MdbConnectorBean'.  Exception: class
>  org.apache.openejb.OpenEJBException: Deployment
>  'myMdb/MdbConnectorBean' has message listener interface
>  samples.connectors.inbound.SampleMessageListener but this MDB
>  container only supports interface
>  samples.connectors.inbound.SampleMessageListener: Deployment
>  'myMdb/MdbConnectorBean' has message listener interface
>  samples.connectors.inbound.SampleMessageListener but this MDB
>  container only supports interface
>  samples.connectors.inbound.SampleMessageListener

It's really strange. Have you tried it out with G 2.1? It looks it's
an openejb issue. Could we look at the ra source? Has never worked
with ra other than those supplied for jdbc connectors so time to look
at one ;-)

Jacek

-- 
Jacek Laskowski
http://www.JacekLaskowski.pl


Re: Geronimo 1.1 to 2.1/ J2EE to JEE(5)

2008-02-26 Thread Jacek Laskowski
On Tue, Feb 26, 2008 at 12:00 PM, Mark Aufdencamp <[EMAIL PROTECTED]> wrote:

>  To port a J2EE Enterprise Application from Geronimo 1.1 to a JEE(5)
>  Enterprise Application on Geronimo 2.0/2.1

Does it mean that without these changes one would not be able to
migrate an ear from Geronimo 1.1 to Geronimo 2.1? What will happen
when you don't apply the changes to the dds?

Jacek

-- 
Jacek Laskowski
http://www.JacekLaskowski.pl


Re: EAR Independence

2008-02-25 Thread Jacek Laskowski
On Mon, Feb 25, 2008 at 4:38 AM, Kevan Miller <[EMAIL PROTECTED]> wrote:

> Placing jars in your ear's lib directory will make their classes available
> to the ear classloader, but system classloaders will still have priority
> over your ear classloader.
> You'll still need to invert classloading or hide classes for this to work.
> Parent classloaders will still have priority... Something like
>
>
> 
>   javax.xml.ws.
> 
>
> or
>
>
>
> Sounds like you've tried using inverse-classloading. What problems have you
> encountered?

Doh, completely forgot about this nifty features. Thanks Kevan! I
think it's time to have a wiki page about how to deploy apps with jars
that are in different version than those provided by Geronimo.  It's
an excellent approach to get more involved in Geronimo development.
Anyone fancy looking into it?

Jacek

-- 
Jacek Laskowski
http://www.JacekLaskowski.pl


Re: Geronimo 2.0.2 - OpenEJB "Passivation Failed"

2008-02-25 Thread Jacek Laskowski
On Mon, Feb 25, 2008 at 1:07 PM, Mario Kofler <[EMAIL PROTECTED]> wrote:

> http://java.sun.com/xml/ns/persistence";
>   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>
> xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd";
>   version="1.0">
>   

Hi,

I'm pretty sure I've seen the persistence.xml before ;-)

Let's see how we can make it "better". Remote transaction-type - it's
unnecessary as the default value in the managed env like Geronimo is
JTA.

> videothek

Unnecessary, but could be helpful.

> org.apache.openjpa.persistence.PersistenceProviderImpl

Unnecessary. It's the default JPA provider in Geronimo and OpenEJB

>  vt.bean.entity.Person
> vt.bean.entity.Actor
> vt.bean.entity.Director
> vt.bean.entity.Movie
>  vt.bean.entity.Dvd

I'm pretty sure you don't have to specify it either (you should do it
in the outside-the-container mode, outside javaee managed env).

> 
>
>   
>
> 
> jdbc/postgres
>  jdbc/postgres

I don't know if Geronimo provides a notion of a default jdbc data
source for JPA. It's available in some other java ee app servers and
it could be very handy for prototyping. In your case, it should
definitely be specified as you're using PostgreSQL (which I doubt will
ever be a default database).

>   
> 
>
> it took me some configuration time to get it working this way and i think it
> is already as short as it can get ;)

Nope. It could be shorter/more compact ;-) That's the beauty of Java
EE 5 - most of the configuration settings are defaults and there's no
need to repeat them if you don't have to.

> so another thing is when i keep calling the bean repeatedly to insert 1
> director per transaction as in a performance test after about 100 inserts it
> is the first time i get an exception. the server continues inserting to the
> db but the exception is coming every now and then.. i wonder what it means..
> i don't want to just throw exceptions here, but maybe you see it with one
> eye, taking a short look.. thanks in anyway, here is the stacktrace:

Add "implements Serializable" to your session bean(s) and the issue
should vanish in a puff of smoke. It's a bug in OpenEJB. It's reported
and it should be taken care of before OpenEJB 3.0. Dunno when it
appears in Geronimo. It could be 2.2 but it could take longer. I'm
sure you could help us fixing it. You're well skilled to squash it.

https://issues.apache.org/jira/browse/OPENEJB-215 (it looks Dave's
working on it so it should be available in a day or so ;-))

Jacek

-- 
Jacek Laskowski
http://www.JacekLaskowski.pl


Re: Geronimo 2.0.2 - OpenEJB "Passivation Failed"

2008-02-25 Thread Jacek Laskowski
On Mon, Feb 25, 2008 at 12:20 PM, Mario Kofler <[EMAIL PROTECTED]> wrote:

> so there is a simple reason why i  decided to close the entity manager
> explicitely: because i thought it is a good idea ;)

And you didn't get any exception?! It's disallowed to play with server
managed resources and close them just like you tried to do. The reason
people are still using EJB3 and all the Java EE 5 stack is their
simplicity (or attempt to be simple) as far as resources are
concerned. You just use them and don't have to worry about managing
them - that's the role of Geronimo or other less-feature-rich
application servers ;-) Use it and when you're done forget about them.
Geronimo takes care of them for you.

> em.flush();

Don't do that. Forget about managing resources by yourself and let
Geronimo do that for you. Besides, it's also not recommended unless
you're using RESOURCE_LOCAL PU which is not recommended in the managed
environment like Geronimo either.

> so my thought why to put the em.close() in the @PreDestroy was, because i
> leave the handle to the em open in this method after em.flush(). then to
> close it rightfully i  thought i'd put it into the @PreDestroy method. i
> cannot close the em right after em.flush because the SFSB lives longer than
> just one call to this particular write method, so if there is a call to
> another method, like "writeMovie" the em would be closed already and i get
> an exception.

Show us the persistence.xml. Let's make it better/simpler/shorter
(cross out or add any word you'd like to hear about your app ;-)). The
less you write it's better for your app. That's why Geronimo (or other
Java EE 5 app servers) are for.

Jacek

-- 
Jacek Laskowski
http://www.JacekLaskowski.pl


Re: Geronimo 2.0.2 - OpenEJB "Passivation Failed"

2008-02-24 Thread Jacek Laskowski
On Sun, Feb 24, 2008 at 12:31 PM, the666pack <[EMAIL PROTECTED]> wrote:

>  the only thing i do in the @PreDestroy method is to explicitly close the
>  entity manager via em.close() and then print a line to stdout that the
>  entitymanager was closed. am i not supposed to close the em?

Dave explained why it blew up. What worried me a lot was when you
wrote that you closed em explicitly? Why are you doing it? Show the
code so it's simpler to talk about it.

Jacek

-- 
Jacek Laskowski
http://www.JacekLaskowski.pl


Re: Geronimo 2.0.2 - OpenEJB "Passivation Failed"

2008-02-24 Thread Jacek Laskowski
On Sun, Feb 24, 2008 at 4:24 AM, the666pack <[EMAIL PROTECTED]> wrote:

>  [exec] 13:04:31,854 INFO  [OpenEJB] finished invoking method create
>  [exec] 13:04:31,855 INFO  [OpenEJB] finished invoking method create
>  [exec] 13:04:31,857 INFO  [OpenEJB] Passivating to file
>  
> /usr/local/geronimo/5-2.0.2/var/temp/11d1def534ea1be0=-8cc2910=1184b52f0a4=-7e38
>  [exec] 13:04:31,865 INFO  [OpenEJB] Passivation failed
>  [exec] java.io.NotSerializableException: vt.bean.stateful.WriteDataBean
>  [exec] at
>  java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1156)
>  [exec] at
>  java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509)
>  [exec] at
>  java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474)
>  [exec] at
>  java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
>  [exec] at
>  java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
>  [exec] at
>  java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509)
>  [exec] at
>  java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474)
>  [exec] at
>  java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
>  [exec] at
>  java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
>  [exec] at
>  java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)
>  [exec] at
>  
> org.apache.openejb.core.stateful.SimplePassivater.passivate(SimplePassivater.java:73)
...
>  does this error concern me? i mean does it affect the result? the server
>  seems to keep running and as it is just an "[INFO]" message i am not sure
>  what to think about it.

Hi,

You should be concerned although the message level is too low I guess.
It happens when openejb attempts to passivate an instance so that
particular instance is in fact destroyed (the @PreDestroy method may
have been called). I think you may not have seen any troubles yet as
you didn't reuse the sfsbs and hence you didn't notice these
passivated instances were no longer active. Let's find out why the
bean is not capable of being passivated. How does it look like? I
guess it uses a logger instance or such with no transient keyword
specified, doesn't it?

Jacek

-- 
Jacek Laskowski
http://www.JacekLaskowski.pl


Re: EJB Entity Cache in Geronimo 2.1

2008-02-22 Thread Jacek Laskowski
On Fri, Feb 22, 2008 at 5:00 PM, ApolloX <[EMAIL PROTECTED]> wrote:

>  I discovered I could set the default jpa properties previously mentioned for
>  the server by adding them to the jpa persistence section in the server's
>  config xml file.  I think where I was most confused is that it wasn't clear
>  to me that with CMP2 in G2.1, the ultimate controller of persistence was
>  jpa.

Ah, you're right. That's the place for global configuration. Thanks
for noticing it.

>  Where does openejb fit into the architecture?  I see numerous calls all by
>  openejb in the log files.  When I see a call to a finder method by openejb
>  does that means its going to the database, or it could be using data from
>  the cache?

Look at OpenEJB CMP2 support as a wrapper to JPA infrastructure which
is currently based on OpenJPA. OpenEJB know nothing about
persistence.xml and other jpa configuration files. So, effectively if
you want to see what's going on behind the scene just trace openjpa
with appropriate setting in persistence.xml. That should work this way
- if it doesn't it could be a bug.

You might benefit from using  in persistence.xml. See other
settings of openjpa at
http://openjpa.apache.org/docs/latest/manual/ref_guide_conf_openjpa.html.

Jacek

-- 
Jacek Laskowski
http://www.JacekLaskowski.pl


Re: How to lookup an EJB3 session bean by JNDI?

2008-02-22 Thread Jacek Laskowski
On Fri, Feb 8, 2008 at 1:03 PM, lucky lance <[EMAIL PROTECTED]> wrote:

> env.put("java.naming.provider.url","iiop://localhost:1050");

What's this? I'm not sure iiop will work. I'm not sure, but just
remove the line at all and run the app with only
Context.INITIAL_CONTEXT_FACTORY (or its stringified version -
java.naming.factory.initial) specified. Let us know how it's worked
out.

Jacek

-- 
Jacek Laskowski
http://www.JacekLaskowski.pl


Re: Urgent help required for problem in integration PHP and Geronimo

2008-02-22 Thread Jacek Laskowski
On Thu, Feb 7, 2008 at 11:20 AM, puneetjain <[EMAIL PROTECTED]> wrote:

>  I have tried JavaBridge available on the sourgeforge. It working find for
>  normal php application. But I need to access few pages which is using
>  mbstring.so php extension. I am to use Japanese character set.

That's interesting - PHP on Geronimo. Never heard of that before. How
can the issue be reproduced? I don't know PHP at all so dont' count on
me trying it out myself if you don't provide a sample web app with php
page or alike. More info pliz.

Jacek

-- 
Jacek Laskowski
http://www.JacekLaskowski.pl


Re: EAR Independence

2008-02-22 Thread Jacek Laskowski
On Thu, Jan 31, 2008 at 7:36 AM, bdaye <[EMAIL PROTECTED]> wrote:

>  How can I make my deployed EAR independent of whatever is in the Geronimo
>  Repo?  Currently, I find myself specifying a lot of system dependencies in
>  my openejb-jar.xml file (deployment-1.2:dependency).  So basically, I want
>  to make  every JAR that is distributed with my EAR priority.

Put these jars in lib directory of your EAR or define such a lib
directory in the deployment descriptor and move the jars there. Have
you tried it already?

Jacek

-- 
Jacek Laskowski
http://www.JacekLaskowski.pl


Re: NoSuchMethodError caused by jaxws-api

2008-02-22 Thread Jacek Laskowski
On Tue, Jan 29, 2008 at 3:04 PM, bdaye <[EMAIL PROTECTED]> wrote:

> I have  tried to incorporate other configuration found in the deployment-1.2 
> schema
>  including inverse-classloading and hidden-classes (supplying filter
>  javax.xml.ws and javax.xml.ws.spi).  If I drop the jaxws-api-2.1 jar into
>  the Geronimo endorsed dir, it explodes.  If anyone has any suggestions as to
>  how I can get the EJB to work correctly using the jaxws-api 2.1 jar, I would
>  really appreciate it.

Has it been resolved? What plan did you use to hide the classes from
Geronimo jars?

Jacek

-- 
Jacek Laskowski
http://www.JacekLaskowski.pl


Re: EJB Entity Cache in Geronimo 2.1

2008-02-22 Thread Jacek Laskowski
On Fri, Feb 22, 2008 at 11:21 AM,  <[EMAIL PROTECTED]> wrote:
> Hi Jacek,
>
>  I assume those properties should be in the persistence.xml file, but 
> geronimo read the persistence.xml file for CMP2 beans?  I've deployed a CMP2 
> EAR without one and I'm not sure the file is even being read.
>
>  Is there a place to set them server wide?

Yes, persistence.xml for CMP2 ;-) Although CMP2 beans don't need
persistence.xml you should already know that Geronimo uses JPA layer
for JPA itself as well as for CMP2. With that said, you may have
expected to have a persistence.xml file for CMP2 created by Geronimo
on the fly. That's exactly how it's done. When you deploy CMP2 beans
they're layered atop JPA and persistence.xml is created for them upon
deployment. The persistence.xml name is persistence-unit name="cmp".
I'm not sure if that's described somewhere (other than burried in
openejb/geronimo mailing lists), but Running JBoss Seam 2.0.0.GA on
Geronimo 2.1 
(http://cwiki.apache.org/GMOxSAMPLES/running-jboss-seam-200ga-on-geronimo-21.html)
should give you more insights on the persistence.xml with cmp PU
configured.

Ask questions so I can create a document page in Geronimo
documentation for it based on our discussion.

Jacek

-- 
Jacek Laskowski
http://www.JacekLaskowski.pl


Re: EJB Entity Cache in Geronimo 2.1

2008-02-22 Thread Jacek Laskowski
On Fri, Feb 22, 2008 at 6:36 AM, ApolloX <[EMAIL PROTECTED]> wrote:

>  Does G2.1 not support caching of CMP 2.1 beans, or is this a configuration
>  issue?

Hi,

All we do is to wrap OpenJPA and let it work for us as far as JPA/CMP2
are concerned. It means that (caution: untested) you should look at
what openjpa provides and set up Geronimo pools with OpenJPA pool
settings accordingly. Take a look at 1.1. Data Cache Configuration
(http://openjpa.apache.org/docs/latest/manual/ref_guide_caching.html#ref_guide_cache_conf).

Jacek

-- 
Jacek Laskowski
http://www.JacekLaskowski.pl


Re: Deploying Web Services and Geronimo 2.1

2008-02-22 Thread Jacek Laskowski
On Tue, Feb 19, 2008 at 1:07 AM, fmchale <[EMAIL PROTECTED]> wrote:

>  I am new to using geronimo and Java EE in general, so pardon me if my
>  question is something quite simple and redundant.  I have built an ear
>  application that contains session beans and a war application.  I would like
>  also to have those session beans availale as web services.  From my reading
>  and research, if I use jaxws-2.0 I do not have to create a wsdl file or any
>  others.  All I should have to do is add the appropriate annotation.  So I
>  added the @WebService annotation to the interface of the bean I wish to make
>  available (there is only one stateless session bean anyway).  When I attempt
>  to deploy the project I recieve a null pointer acception?  Am I missing
>  something with my research?

No, you are not. You're right - it boils down to annotating a bean
class with @WebService. Could you should the bean class? I think you
specified @Local annotation and it causes the NPE, but it should have
not actually.

Jacek

-- 
Jacek Laskowski
http://www.JacekLaskowski.pl


Re: Geronimo 2.1 on Windows - security warn on Geronimo start

2008-02-19 Thread Jacek Laskowski
On Feb 18, 2008 2:05 AM, Tomasz Mazan <[EMAIL PROTECTED]> wrote:

>  These lines are printed before Cert-window appears
>
>  Booting Geronimo Kernel (in Java 1.6.0_03)...

Thanks Tomek for your patience! I finally tracked it down and it
turned out to occur on Geronimo 2.1 with Tomcat 6 distro only. I kept
using Java 5 with Geronimo 2.1 and Jetty 6. That's why I couldn't find
out what's wrong.

Reported as GERONIMO-3864 Security warning about installation a
certificate from a CA claiming to represent: Me
(https://issues.apache.org/jira/browse/GERONIMO-3864).

Jacek

-- 
Jacek Laskowski
http://www.JacekLaskowski.pl


Re: Geronimo 2.1 on Windows - security warn on Geronimo start

2008-02-18 Thread Jacek Laskowski
On Feb 17, 2008 11:25 PM, Tomasz Mazan <[EMAIL PROTECTED]> wrote:

>  Hi, my env below

Don't have any idea as to what might cause it. Can you run the batch
script again with GERONIMO_BATCH_ECHO=on and bin\geronimo.bat run -vv.
Send the output (the very first lines before the popup window shows
up).

C:\geronimo>set GERONIMO_BATCH_ECHO=on

C:\geronimo>bin\geronimo.bat run -vv

Jacek

-- 
Jacek Laskowski
http://www.JacekLaskowski.pl


Re: Geronimo 2.1 on Windows - security warn on Geronimo start

2008-02-15 Thread Jacek Laskowski
On Feb 15, 2008 12:47 AM, Tomasz Mazan <[EMAIL PROTECTED]> wrote:

>  I'm running Geronimo on Windows without cygwin by executing
> command"geronimo.bat run"

Hi Tomasz,

Have you changed Geronimo configuration in any way? I've just run it
on cmd with the command C:\geronimo\bin>geronimo.bat run and it worked
fine. Could you describe your env so we can figure out what the cert
info came from?

C:\geronimo>ver

Microsoft Windows XP [Version 5.1.2600]

Jacek

-- 
Jacek Laskowski
http://www.JacekLaskowski.pl


Re: Geronimo 2.1 on Windows - security warn on Geronimo start

2008-02-15 Thread Jacek Laskowski
On Thu, Feb 14, 2008 at 11:07 PM, Tomasz Mazan <[EMAIL PROTECTED]> wrote:
>
>  http://www.nabble.com/file/p15495845/geronimo_warn.jpg
>  what should be translated :

I'm pretty sure noone but perhaps Jarek, me and you can understand
what it means. How did you get it? I'm running G 2.1 on Windows/Cygwin
without the issue. I'd like to reproduce, but can't see how.

Jacek

-- 
Jacek Laskowski
http://www.JacekLaskowski.pl


Re: Debugging with NetBeans?

2008-02-11 Thread Jacek Laskowski
On Feb 11, 2008 2:26 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:

> Can you give pls some Keywords about this Topic? Does it means the
> Remote Debuggerof the JDK
> can establish a Debugg "Remote" Pipeline to Geronimo (iam guessing there
> is a Remote Debugger, but iam not sure :-) )

That's exactly what I meant. You can run Geronimo or any other Java
app (not necessarily application server) with JPDA and trace it.

> Is the Maven PlugIn Productionready?

Yes (unless my view of "Production ready" is different than yours ;-))

> It allways takes some Time for Packaging and deploying against Geronimo.

Is it not the case for other app servers too? Just asking before I
made any judgments.

> Maybe the Netbeans Plugin can use in Future Shared Memory Access for
> making things
> faster. I have noticed thadts IntelliJ IDEA's  Workbench and the
> Debugger can communicate with
> Shared Memory anstead of TCP Sockets and this definately makes
> Debuggingstuff faster!

That's JPDA feature where you can specify port or shared memory.
Nothing to do with app servers really.

> I really dont know, iam not familar with programming Netbeans PlugIns as
> well, but if you think i
> can do some Stuff then let me know.

I let you know. I'm not familiar with NetBeans plugins development too
and that's the main reason to be so slowly progressing with it. I'm a
fan of javaee5 development, but doing the stuff to run my apps takes
too much time for me. I'd be happy if you could take a look at what
we've got so far in the geronimo netbeans plugin's repo
(https://svn.apache.org/repos/asf/geronimo/sandbox/geronimo-netbeans-plugin),
build it and see what's in and the last but not least comment on it.

Jacek

-- 
Jacek Laskowski
http://www.JacekLaskowski.pl


Re: Debugging with NetBeans?

2008-02-11 Thread Jacek Laskowski
On Feb 11, 2008 9:33 AM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:

> My simple Question is:

You bet! All of the simple questions I have recently run into became
tough ones eventually ;-)

> How can i debug Enterprise Java Beans with Netbeans 6.x?

The only option I can think of would be to run Geronimo with JPDA
enabled (-agentlib:jdwp) and use Netbeans's debugger. It should work
fine.

> How can i do faster Roundtrip (Distribute&Run) Cycles with Netbeans 6.x?

You mean while developing enterprise apps? If so, you may want to use
maven plugin for Geronimo and Netbeans together and deploy/undeploy
from within Netbeans. It should work too (would be a good addition to
Geronimo's doc set).

> Is the Netbeans PlugIn right now production Ready?

Unfortunatelly not. Noone's working on it as much as it deserves (I'm
the only one who worked on it and am trying to get to it again, but
don't know how it will eventially work out). Wanna help?

Jacek

-- 
Jacek Laskowski
http://www.JacekLaskowski.pl


Re: extremely annoying G2.0.2 behaviour

2008-02-11 Thread Jacek Laskowski
On Feb 11, 2008 9:57 AM, Łukasz Budnik <[EMAIL PROTECTED]> wrote:

> I'm deploying an enterprise application that has an application-scoped MDB.
>
> Every time I deploy a new version of my application I need to restart
> whole Geronimo.
>
> If not, application throws this error:
>
> Caused by: javax.naming.NameAlreadyBoundException

Hi Łukasz,

Yes, it's been very annoying, but it's over now. It's fixed in
Geronimo 2.1 so you may want to try out the just-voted 2.1 release -
http://people.apache.org/~kevan/release-votes/G-2.1/geronimo-2.1-dist/.
Let us know how it works so we may fix issues before Geronimo 2.1's
published.

p.s. Dobrze widzieć rodaka na grupach Geronimo (tak przynajmniej
wnioskuję po imieniu i nazwisku). Napisz, co skłoniło Cię do
skorzystania z Geronimo i jak Ci się z nim pracuje.

Jacek

-- 
Jacek Laskowski
http://www.JacekLaskowski.pl


Re: Where to keep hibernate.cfg.xml in geronimo

2008-01-29 Thread Jacek Laskowski
On Jan 24, 2008 7:50 PM, gersek <[EMAIL PROTECTED]> wrote:

> My application is not recognizing the hibernate.cfg.xml.

What's the application? What type is it - war, ejb, rar or just a
library (Class-Path or lib in ear)? What's the stack trace?

Jacek

-- 
Jacek Laskowski
http://www.JacekLaskowski.pl


Re: Strange plug with delivering messages to MDB

2008-01-23 Thread Jacek Laskowski
On Jan 23, 2008 6:19 PM, Kevan Miller <[EMAIL PROTECTED]> wrote:

> I probably won't have a chance to look at this until this weekend...

Me too and that's why I'm quiet lately. Had to finish some other
assignments (cf. openejb).

Jacek

-- 
Jacek Laskowski
http://www.JacekLaskowski.pl


Re: Geronimo 2.0/openejb/postgresql

2008-01-16 Thread Jacek Laskowski
On Jan 16, 2008 9:17 AM, the666pack <[EMAIL PROTECTED]> wrote:

> so the problem was, that in my application (which was first deployed on
> jboss) i have a 1:n relation between Directors and Movies. this relation i
> was modelling by an @ManyToOne annotation in Movie and a @OneToMany relation
> in Director (i don't really know why). this was accepted by jboss but in
> geronimo i got some error and when i finally pinpointed the error to the
> annotation i simply commented out the annotation... leaving the
> Collection as attribute in the Director.

Ah, that makes sense. I need to sharpen my skills up while dealing
with such jpa mapping errors. It should be easily reproducible in
openjpa (that's the default jpa provider in geronimo). I think the
error should be different though similar to "No @ManyToOne annotation
on the reverse side of the many-to-one relation" or alike. If I manage
to reproduce it I'll report an enhancement in openjpa jira.

Jacek

-- 
Jacek Laskowski
http://www.JacekLaskowski.pl


Re: Geronimo 2.0/openejb/postgresql

2008-01-15 Thread Jacek Laskowski
On Jan 15, 2008 10:44 PM, the666pack <[EMAIL PROTECTED]> wrote:

> problem solved. the last error where i spent a lot of time with,
>
>  No registered metadata for type "class vt.bean.entity.Director"
>
> was in fact created by some attribute in the Director entity bean which
> should not have been there.

Wait. What was the attribute that stirred up the trouble? I must admit
I'm still unable to figure that out from the entire thread.

Jacek

-- 
Jacek Laskowski
http://www.JacekLaskowski.pl


Re: getting ClassCastException while deploying a simple web application in geronimo 2.0

2008-01-14 Thread Jacek Laskowski
On Jan 14, 2008 5:54 PM, abpb2006 <[EMAIL PROTECTED]> wrote:

> I tried setting eveything, tried downloading geronimo again but no luck. I'm
> sure its unique to meotherwise many users would have put this issue.
> Looks like something wrong in my enviroment or settings, plk suggest  what
> might be possible soultion to this. thanks.

I have not reproduced this issue so I can't claim it's fixed or not.
According to the issue report in jira it seems it is. Could you send
the app you work with that causes the issue to surface?

Jacek

-- 
Jacek Laskowski
http://www.JacekLaskowski.pl


Re: getting ClassCastException while deploying a simple web application in geronimo 2.0

2008-01-14 Thread Jacek Laskowski
On Jan 14, 2008 9:45 AM, abpb2006 <[EMAIL PROTECTED]> wrote:

> 998 Error [Deployer] Deployment failed due to
> java.lang.ClassCastException: java.io.File
> org.apache.geronimo.common.DeploymentException:
> java.lang.ClassCastException: java.io.File
> at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:385)
> at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:126)

When I first saw it I knew I had seen it before and here it is - Need
to fully convert to generics to avoid CCE -- a dumb example [1]. It's
fixed in Geronimo 2.1. Can you confirm it is really the issue you've
reported?

Jacek

[1] http://issues.apache.org/jira/browse/GERONIMO-3710

-- 
Jacek Laskowski
http://www.JacekLaskowski.pl


Re: Geronimo 2.0/openejb/postgresql

2008-01-13 Thread Jacek Laskowski
On Jan 13, 2008 7:35 PM, the666pack <[EMAIL PROTECTED]> wrote:

> for the messaging part of your tutorial i will return to the wiki at a later
> state, as it seems to be very helpful though written in polish language :)

Let me know what article you're after and one day it could be
translated/written just for you ;-)

> i found some files that were not supposed to be in my archive, you are
> right. yet the error remains also now after redeploying. the directory
> structure:

Is the error the same as before? If so, I don't think we can fix it
without having such an application created to reproduce the issue (if
you stripped the application down from unnecessary bits and sent it
along here, it'd be helpful).

Jacek

-- 
Jacek Laskowski
http://www.JacekLaskowski.pl


Re: Geronimo 2.0/openejb/postgresql

2008-01-13 Thread Jacek Laskowski
On 1/13/08, the666pack <[EMAIL PROTECTED]> wrote:

> first thank you, with the help of your article i was able to deploy it and
> my application is able to create an entity manager.

I forgot to ask. What was the issue that prevented the app from running?

Jacek

-- 
Jacek Laskowski
http://www.JacekLaskowski.pl


Re: Geronimo 2.0/openejb/postgresql

2008-01-13 Thread Jacek Laskowski
On 1/13/08, the666pack <[EMAIL PROTECTED]> wrote:

> first thank you, with the help of your article i was able to deploy it and
> my application is able to create an entity manager.

I'm glad to hear you like Polish language ;-)

> [exec] <1.0.0-r561970-r561970 nonfatal general error>
> org.apache.openjpa.persistence.PersistenceException: No registered metadata
> for type "class vt.bean.entity.Director".

I'd bet you've got the entity in another file that your
persistence.xml file is and hence the file is not processed. What is
needed to fix it would be to list the content of the files with jar
-tf. If your app could be attached and we looked at it, it'd be
helpful even more.

Jacek

-- 
Jacek Laskowski
http://www.JacekLaskowski.pl


Re: Geronimo 2.0/openejb/postgresql

2008-01-10 Thread Jacek Laskowski
On Jan 10, 2008 7:59 PM, the666pack <[EMAIL PROTECTED]> wrote:

> also tried to put the  and the  element
> after the properties and also to spare out all properties.. same error
> message :(

Here's the complete article about running MDB with JPA in JTA mode and
PostgreSQL - 
http://www.jaceklaskowski.pl/wiki/Aplikacja_Java_EE_5_z_MDB_z_JPA_w_trybie_JTA_i_PostgreSQL_w_Apache_Geronimo_2.
It's in Polish, but you may want to look at the configuration files
only.

Jacek

-- 
Jacek Laskowski
http://www.JacekLaskowski.pl


Re: Geronimo 2.0/openejb/postgresql

2008-01-10 Thread Jacek Laskowski
On Jan 10, 2008 5:02 PM, the666pack <[EMAIL PROTECTED]> wrote:

> so i set up the second datasource as recommended and the pool is also
> running according to startup info:
>
>  [exec] RAR: console.dbpool/DefaultDS/1.0/rar
>  [exec] RAR: console.dbpool/DefaultNoTxDS/1.0/rar
>
> unfortunately i get an error at deploy time now:
>
>  [exec] 16:51:41,504 ERROR [DirectoryHotDeployer] Unable to deploy:
> Unable to resolve reference "NonJtaDataSourceWrapper" in gbean

Show the plan and persistence.xml. It becomes much easier to suggest a solution.

Jacek

-- 
Jacek Laskowski
http://www.JacekLaskowski.pl


Re: JAAS and OpenejbRemoteLoginModule

2008-01-10 Thread Jacek Laskowski
On Jan 10, 2008 10:04 AM, Jonathan Chen <[EMAIL PROTECTED]> wrote:

> I ran my EjbClient with:
>
> java -Djava.security.auth.login.config=MyApp.jaas -jar MyApp.jar
>
> with MyApp.jaas in the same directory containing:
>
> MyApp
> {
> org.apache.geronimo.openejb.OpenejbRemoteLoginModule required
> 
> org.apache.geronimo.openejb.OpenejbRemoteLoginModule.RemoteSecurityRealm="MyAppRealm"
> 
> org.apache.geronimo.openejb.OpenejbRemoteLoginModule.ServerURI="ejbd://localhost:4201";
>
> };
>
> The big trick was finding OpenejbRemoteLoginModule in
> geronimo-openejb-2.0.2.jar and pulling the required dependancies.
>
> My EjbClient snippet is pretty simple:
>
> LoginContext
> loginCtx = new LoginContext (
> "MyApp",
> new ClientCallbackHandler ("joeuser", "joespassword"));
> loginCtx.login ();
>
> with the ClientCallBackHandler class based on:
>
> 
> http://java.sun.com/javase/6/docs/technotes/guides/security/jaas/tutorials/SampleAcn.java

That's exactly that sort of answer I appreciate the most. Very concise
and clear. Thanks.

Jacek

-- 
Jacek Laskowski
http://www.JacekLaskowski.pl


Re: JAAS and OpenejbRemoteLoginModule

2008-01-10 Thread Jacek Laskowski
On Jan 10, 2008 9:05 AM, Jonathan Chen <[EMAIL PROTECTED]> wrote:

> Here's one for the archives: After several iterations of trial and error,
> it looks like the following configuration will work:

Hi Jonathan,

Can you tell me how you execute your remote app client and where you
place the jaas configuration? If you could show the jaas-aware code
snippet where the jaas configuration's used, it'd be superb.

Jacek

-- 
Jacek Laskowski
http://www.JacekLaskowski.pl


Re: Geronimo

2008-01-10 Thread Jacek Laskowski
On Jan 10, 2008 8:04 AM, cpraveena <[EMAIL PROTECTED]> wrote:

> I found that Geronimo will be a best app server in running j2ee
> applications...
> As i was new to it, could you please help me out in using if along with
> configuration...

Hi,

How did you find that Geronimo would be the best appserv out there? It
*is* the best appserver ;-)

Seriously, here the steps are to get you up to speed with javaee
development with Geronimo.

1/ Download Geronimo 2.1-SNAPSHOT from
http://people.apache.org/~prasad/binaries/trunk/20080109. Pick jetty6
or tomcat6 distro.

2/ Unpack it to a directory that will get call GERONIMO_HOME from now on.

3/ Run Geronimo

  cd $GERONIMO_HOME
  ./bin/geronimo.sh run

4/ Point your browser to http://localhost:8080/console (system/manager
are the credentials)

5/ Developer your webapp in any IDE you work with and deploy it using
the console.

That's it. I believe there're more at Apache Geronimo Documentation
(http://geronimo.apache.org/documentation.html). Read it on and ask
questions here. The more questions the better.

(Some commands are subject of your operating system differencies).

Jacek

-- 
Jacek Laskowski
http://www.JacekLaskowski.pl


Re: Gbean and EJBs

2008-01-07 Thread Jacek Laskowski
On Jan 8, 2008 8:24 AM, ivanrc <[EMAIL PROTECTED]> wrote:

> How can Gbean obtain the global jndi?

During "the simplest and easiest approaches" day everything should be
simplest and easiest (as well as intuitive) so your best bet would be
to look at gbean as any other java remote client and do the following:

Properties properties = new Properties();
properties.setProperty(Context.INITIAL_CONTEXT_FACTORY,
"org.apache.openejb.client.LocalInitialContextFactory");

Context ctx = new InitialContext(properties);
MyEjbBeanIntf myEjbBean = (MyEjbBeanIntf) ctx.lookup("MyEjbBeanLocal");

As the gbean's actually part of the server environment, I'd expect you
can leave off the Context.INITIAL_CONTEXT_FACTORY setting and look up
ejbs without it.

Jacek

-- 
Jacek Laskowski
http://www.JacekLaskowski.pl


Re: Reg: shutting down of Geronimo when DB is down

2008-01-07 Thread Jacek Laskowski
On Jan 7, 2008 8:55 PM, David Jencks <[EMAIL PROTECTED]> wrote:

> You can "distribute" using the command line or uncheck the "start
> app" box in the console deploy screen, but this will only get
> load="false" into config.xml.  If you start the app, then you'll get
> load="true", which will result in starting the app when you start and
> restart geronimo.  The only way to avoid this standard "keep the same
> state as on shutdown" behavior is to add the condition to config.xml,
> and you can either do it by hand in pre-2.1 geronimo or with geronimo-
> plugin.xml in g. 2.1

Now, it's more clearer. I had a fuzzy understanding of it and it
seemed I'd needed a short yet concise description how it really
worked. Thanks!

Jacek

-- 
Jacek Laskowski
http://www.JacekLaskowski.pl


Re: Exception related to xerces jar while deployment

2008-01-07 Thread Jacek Laskowski
On Jan 7, 2008 2:13 PM, Hari Krishna Korrapati
<[EMAIL PROTECTED]> wrote:

> I am working on Geronimo 2.0.2.
> I am able to deploy the EAR but getting the following exception at the back
> end.
>
> 15:32:16,766 INFO  [Enhance] You have enabled runtime enhancement, but have
> not specified the set of persistent classes.  OpenJPA must look for metadata
> for every loaded class, which might increase class load times significantly.

Hi,

The simplest and easiest approach to get rid of it would be to follow
the advice and add your entity classes to persistence.xml so OpenJPA
won't look for entities.

> 15:32:18,407 INFO  [startup] Assembling app:
> E:\geronimo-tomcat6-jee5-2.0.2\var\temp\geronimo-deploymentUtil6209.jar
> 15:32:19,126 WARN  [Enhance] An exception was thrown while attempting to
> perform class file transformation on "samples/ejb/ApplicationEntityBean":
> java.lang.ClassCastException:
> org.apache.xerces.parsers.XIncludeAwareParserConfiguration
> at org.apache.xerces.parsers.SAXParser.(Unknown Source)

> I am using xerces:xercesImple:2.8.1 jar in the EAR.

That's what I don't understand. Why do you need xerces.jar in ear?
It's in jdk, isn't it?

> org.apache.xerces
> But no use, might be because the vesion of xercesImpl in geronimo repository
> also 2.8.1.

If it's 2.8.1 and you need it, it makes it even more confusing why it's in ear.

Jacek

-- 
Jacek Laskowski
http://www.JacekLaskowski.pl


Re: Reg: shutting down of Geronimo when DB is down

2008-01-07 Thread Jacek Laskowski
On Jan 7, 2008 9:25 AM, David Jencks <[EMAIL PROTECTED]> wrote:

> In geronimo 2.1 (not yet released) you can do this by deploying the
> war as a plugin and including
>
> 
>
> in the geronimo-plugin.xml.

Is there any way to add such configuration to geronimo-web.xml? Just
to make sure I follow it properly, when a web module's deployed it's
already started, isn't it? Is there a way to deploy in a different way
without bothering with plugin feature?

Jacek

-- 
Jacek Laskowski
http://www.JacekLaskowski.pl


Re: O'Reilly EJB 3.0 Book Question

2008-01-06 Thread Jacek Laskowski
On Dec 30, 2007 2:04 PM, Garth Keesler <[EMAIL PROTECTED]> wrote:
> I use the O'Reilly EJB 3.0 book extensively. It is really in two parts:
> the EJB half and the JBoss half. Should I be able to follow the EJB half
> pretty closely with GMO or are there differences that will make that not
> very useful?

I read the book a couple of times and whenever I have an issue
understanding EJB3 spec I come back to it and the spec itself (I like
the way the interceptors are presented). They both are invaluable. I
really like the way Richard and Bill wrote it.

BTW: the book contains a lot of programming errors so you need to take
these examples with a grain of salt. I have noted them all and the
list is huge. Despite it, I think the book is certainly one of the
best about ejb3 and everybody who works with ejb3 should read it from
cover to cover.

Jacek

-- 
Jacek Laskowski
http://www.JacekLaskowski.pl


Re: Geronimo with Liferay library conflict

2007-12-28 Thread Jacek Laskowski
On Dec 28, 2007 5:48 PM, jleonar <[EMAIL PROTECTED]> wrote:

> "You could try putting xerces in the geronimo repo directly and having
> a dependency to the jar: then the flags in your app's plan's
> environment will work."
>
> I am not clear on what you mean here.  I definitely could put it in the
> geronimo repository but I am not sure how to setup liferay to then use it in
> the geronimo-web.xml

Things are much easier to set up in the latest Geronimo 2.0.2 (or
better yet Geronimo 2.1-SNAPSHOT), but if you need to stick with
Geronimo 1.1 just add

   
   my.dir.name.under.repository
   xerces
   jar
   

to your geronimo-web.xml and you're done.

Jacek

-- 
Jacek Laskowski
http://www.JacekLaskowski.pl


Re: Bank Sample App Mod to use Postgres

2007-12-28 Thread Jacek Laskowski
On Dec 28, 2007 4:11 PM, Garth Keesler <[EMAIL PROTECTED]> wrote:
> I am new to Geronimo coming from VS2005 and C#. I have a Postgres DB
> configured in the pool as OES and working correctly using the dbtester
> sample app. I want to change the persistance of the Bank app from Derby
> to Postgres and have not yet figured out the magic to make it happen.
> The tables are correctly loaded in the OES database. Below is the
> BankPool.xml I modified (obviously incorrectly) and I could use some
> pointers. It mavens and installs okay but I get a "lifecycle operation
> failed" when attempting to start in the console.

Hi Garth,

I think the file misses

SystemDatabase

and that's why the resource cannot be deployed and either can the app.
On the other hand, you mentioned it had worked fine using the dbtester
so it was indeed deployed already via the Geronimo console, wasn't it?
If so, the resource is global so your app should merely declare
dependency to the BankPool and be fine with it.

Could you tell us more about how you access the db? Is it JPA
application? What's persistence.xml? Are there any stack traces on the
Geronimo console (on the command line not in the Geronimo web
console)? Describe the steps you used to make
it...cough...cough...fail ;-)

You can find some pointers in Running JBoss Seam 2.0.0.GA on Geronimo 2.1 [1]

[1] 
http://cwiki.apache.org/GMOxSAMPLES/running-jboss-seam-200ga-on-geronimo-21.html

>
> Any help appreciated...
> Thx,
> Garth
>
> 
> 
> http://geronimo.apache.org/xml/ns/j2ee/connector-1.1";>
>  xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.1";>
> 
> console.dbpool
> OES
> 1.0
> rar
> 
> 
> 
> org.apache.geronimo.configs
> system-database
> car
> 
> 
> 
> 
> 
> 
>
> javax.sql.DataSource
> 
> BankPool
>  name="Driver">org.postgresql.Driver
>  name="UserName">garthk
>  name="ConnectionURL">jdbc:postgresql://pgsrv/oesdb
> 
> 
>     
> 10
> 0
> 
> 
> 
> 
> 
> 
> 
> 
>



-- 
Jacek Laskowski
http://www.JacekLaskowski.pl


Re: Geronimo with Liferay library conflict

2007-12-28 Thread Jacek Laskowski
On Dec 28, 2007 1:40 PM, jleonar <[EMAIL PROTECTED]> wrote:

> I have some custom code deployed within Liferay(4.3.x) running on Geronimo
> 1.1
>
> The custom code uses xercesImpl-2.8.0 or higher.  Geronimo 1.1 uses
> xercesImpl-2.6.2.  So my code breaks because it is always using the
> xercesImpl-2.6.2 instead of the xercesImpl-2.8.0 jar that I have in the
> sharedlib folder.

> 
> org.apache.xerces
> 
> 
...
> 
> sharedlib
> 

Can you try out  instead? Is xerces in
WEB-INF/lib directory of Liferay? What's the stack trace when
Geronimo's Xerces hides the proper classes?

Jacek

-- 
Jacek Laskowski
http://www.JacekLaskowski.pl


Re: EJB related exception while migrating from Geronimo1.1.1 to Geronimo2.0.2

2007-12-28 Thread Jacek Laskowski
On Dec 28, 2007 11:32 AM, Hari Krishna Korrapati
<[EMAIL PROTECTED]> wrote:

> I have internet connection, but my Geronimo server might be running behind
> the firewall.
> So would like to know how can i make geronimo to use internet connection, do
> i need to do some proxy settings; if so please provide some sample
> configuration.

The exception stack trace showed that java.sun.com could not be
resolved and hence Geronimo threw the exception. Try to do "telnet
java.sun.com 80" and see what happens or ping it (but some network
devices can block it and that's why it's not very reliable). UHE
appears when the hostname cannot be resolved so both should end up
with failure as will "nslookup java.sun.com".

Jacek

-- 
Jacek Laskowski
http://www.JacekLaskowski.pl


Re: EJB related exception while migrating from Geronimo1.1.1 to Geronimo2.0.2

2007-12-28 Thread Jacek Laskowski
On Dec 28, 2007 8:26 AM, Hari Krishna Korrapati
<[EMAIL PROTECTED]> wrote:

> Caused by: org.apache.openejb.OpenEJBException: Cannot unmarshall the
> ejb-jar.xml file: jar:file:/E:/Geronimo
> 2.0.2/geronimo-tomcat6-jee5-2.0.2-bin/geronimo-tomcat6-jee5-2.0.2
> /var/temp/geronimo-deploymentUtil24547.jar!/META-INF/ejb-jar.xml: null
> at
> org.apache.openejb.config.ReadDescriptors.readEjbJar(ReadDescriptors.java:334)
> at org.apache.openejb.config.DeploymentLoader.load
> (DeploymentLoader.java:368)
> at
> org.apache.geronimo.openejb.deployment.EjbModuleBuilder.createModule(EjbModuleBuilder.java:211)
> ... 33 more
> Caused by: javax.xml.bind.UnmarshalException
>  - with linked exception:
> [java.net.UnknownHostException: java.sun.com]
> at
> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:196)
> at
> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal
> (UnmarshallerImpl.java:167)
> at
> javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:120)
> at
> javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java
> :103)
> at
> org.apache.openejb.jee.JaxbJavaee.unmarshal(JaxbJavaee.java:103)
> at
> org.apache.openejb.config.ReadDescriptors.readEjbJar(ReadDescriptors.java:330)
> ... 35 more
> Caused by: java.net.UnknownHostException: java.sun.com
...
> Please advice on what could be the problem.

As you're asking about the problem (and not about a solution) I think
I can help ;-)

The issue is that Geronimo runs behing a firewall or the server it
runs on doesn't have internet connection and hence resolving
java.sun.com leads to UHE exception. I vaguely remember it's been
fixed in the latest openejb3 where openejb (the ejb container in
Geronimo) doesn't need internet connection to let the ejb deployer
run.

It won't read good, but there's no other way as to 1) deploy the app
on the geronimo instance while it's online and copy the deployed
package to another instance of Geronimo without internet connection or
2) use the latest Geronimo 2.1-SNAPSHOT [1]. One last *desperate*
attempt would be to overwrite
repository\org\apache\openejb\openejb-core\3.0-beta-1\openejb-core-3.0-beta-1.jar
with the jar built from the openejb3 trunk [2], but it may incur some
other troubles.

[1] http://people.apache.org/~prasad/binaries/trunk/20071228/
[2] http://people.apache.org/~jlaskowski/openejb-3.0.0-SNAPSHOT-bin.zip

Jacek

-- 
Jacek Laskowski
http://www.JacekLaskowski.pl


Re: Geronimo 2.0.2+Activemq-xmpp?

2007-12-27 Thread Jacek Laskowski
On Dec 27, 2007 8:07 AM, zephyrus <[EMAIL PROTECTED]> wrote:

> I got error message..
> > java -jar bin/deployer.jar deploy geronimo-xmpp-plan.xml
> Username: system
> Password: **
> Error: Unable to distribute geronimo-xmpp-plan.xml: Cannot deploy
> the requested application module because no deployer is able to
> handle it. This can happen if tou have omitted the J2EE deployment
> descriptor, disabled a deployer module, or if, for example, you are
> trying to deploy an EJB module on a minimal Geronimo server that
> does not have EJB support installed.
> (planFile=/geronimo-jetty6-jee5-2.02/geronimo-xmpp-plan.xml)

That's what I don't like the most - when an issue's so close to be
sorted out, but the last puzzle's missing. I think you can deploy the
plan using the web console or better yet, deploy the webapp you want
to run along with the activemq-xmpp as follows:

  ./bin/deploy.sh deploy  geronimo-xmpp-plan.xml

If you don't want to deploy  along with the plan I think
developing a Geronimo plugin might do the trick. Never tried it out
myself though.

Jacek

-- 
Jacek Laskowski
http://www.JacekLaskowski.pl


Re: Geronimo 2.0.2+Activemq-xmpp?

2007-12-26 Thread Jacek Laskowski
On Dec 26, 2007 12:52 PM, zephyrus <[EMAIL PROTECTED]> wrote:

> I need activemq-xmpp 
>
> How can I add activemq-xmpp module in Geronimo?

I *guess* you need to use the following snippet in a plan -
geronimo-activemq-xmpp-plan.xml:


xmpp
localhost
61222

ActiveMQ



and deploy it using ./bin/deploy.sh deploy
geronimo-activemq-xmpp-plan.xml. It *might* do the trick and enable
xmpp in Geronimo (using ActiveMQ).

Ping us if it doesn't work.

Jacek

-- 
Jacek Laskowski
http://www.JacekLaskowski.pl


Re: Cannot process Geronimo command - you are running an unsupported operating system

2007-12-26 Thread Jacek Laskowski
On Dec 26, 2007 7:15 AM, ramaj <[EMAIL PROTECTED]> wrote:

> I have downloaded "geronimo-tomcat6-jee5-2.0.2-bin.zip"
> My OS is Microsoft Windows 2000.

Hi,

Could you copy&paste the command and its output?

Jacek

-- 
Jacek Laskowski
http://www.JacekLaskowski.pl


Re: usage of variables in web.xml

2007-12-26 Thread Jacek Laskowski
On Dec 24, 2007 10:34 AM, Hari Krishna Korrapati
<[EMAIL PROTECTED]> wrote:

> I would like to use a variable in web.xml and read the value from properties
> file.
> like i would like to specify as
>
>  @TASK_START_TIME@
>
> and define TASK_START_TIME = 3322332 in some application.properties file.

Hi Hari,

There're a couple of possible solutions, but the one I'd recommend is
to use Maven 2 and its filtering feature. Neat and slick. You can do
it very easily with Raven or Ant too, but don't know what tools you're
currently familiar with, and Maven2 seems to be a good fit as a
starter.

http://maven.apache.org/guides/getting-started/index.html#How_do_I_filter_resource_files

Jacek

-- 
Jacek Laskowski
http://www.JacekLaskowski.pl


Re: Fresh Geronimo Eclipse Plugin build

2007-12-20 Thread Jacek Laskowski
On Dec 20, 2007 11:08 AM, Tomasz Mazan <[EMAIL PROTECTED]> wrote:

> Where can I find fresh plugin build with script to download all it's
> dependencies ? I remember that someone has given me a link to page with
> instalation's procedure before 2.0.0 plugin was released, but I want to try
> current build.

Hi,

It's here - http://geronimo.apache.org/development-tools.html. It's
been a while since I gave it a try and haven't since noticed any
complaints about it so it must be production-ready ;-) Or, people has
started to be working with the latest IntelliJ IDEA 7 release and the
Geronimo plugin (yeah, noticed your question about it earlier today
and am about to give it a try myself).

Jacek

-- 
Jacek Laskowski
http://www.JacekLaskowski.pl


Re: Deployment plans for Geronimo2.0.2

2007-12-20 Thread Jacek Laskowski
On Dec 20, 2007 10:59 AM, Hari Krishna Korrapati
<[EMAIL PROTECTED]> wrote:

> I could not find any files under Deployment Plans section for Geronimo2.0.2
> under http://cwiki.apache.org/GMOxDOC20/deployment-plans.html
>
> Would like to confirm whether the XML Schema's for deployment plan in
> geronimo2.0.2 are similar to those of Geronimo1.1.1

I'm not really sure, but I'd say that they are not. You may find the
url http://geronimo.apache.org/xml/ns/ useful. That's where you find
all of the xsds.

Jacek

-- 
Jacek Laskowski
http://www.JacekLaskowski.pl


  1   2   3   >