Openejb: This principle is not authorized

2007-04-13 Thread Bert_nor

Standalone application

login.config:
dw_realm {
org.apache.geronimo.security.jaas.client.JaasLoginCoordinator required
host=localhost
port=4242
realm=dw_realm;
}; 

LoginContext context = new LoginContext(dw_realm,...);
context.login();

Properties props = new Properties(); 
props.put(java.naming.factory.initial,
org.apache.openejb.client.RemoteInitialContextFactory); 
props.put(java.naming.factory.host, 127.0.0.1); 
props.put(java.naming.factory.port, 4201); 
props.put(java.naming.security.principal, ...); 
props.put(java.naming.security.credentials, ...);

Context remoteContext = remoteContext = new InitialContext(props);

javax.naming.AuthenticationException: This principle is not authorized.
at 
org.apache.openejb.client.JNDIContext.authenticate(JNDIContext.java:144)
at
org.apache.openejb.client.JNDIContext.getInitialContext(JNDIContext.java:116)
at 
javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
at 
javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
at javax.naming.InitialContext.init(InitialContext.java:223)
at javax.naming.InitialContext.init(InitialContext.java:197)

It's exception thrown from 
org.apache.geronimo.openejb.GeronimoSecurityService.login(String user,
String pass) {
  LoginContext context = new LoginContext(OpenEJB, new
UsernamePasswordCallbackHandler(user,
pass));--javax.security.auth.login.LoginException: No LoginModules
configured for OpenEJB

Can be use realm for the current user?


-- 
View this message in context: 
http://www.nabble.com/Openejb%3A-This-principle-is-not-authorized-tf3571824s134.html#a9979641
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.



Re: XML Validation error when using local-home element in ejb-jar.xml

2007-04-13 Thread rutherford

Hi ananner, I am having a similar problem with 
 cvc-complex-type.2.4a: Expected element ... etc

can you post your solution please?

thanks


ananner wrote:
 
 I've resolved this problem on my own.
 
 Aman Nanner/MxI Technologies [EMAIL PROTECTED] wrote on 04-02-2007
 04:20:21 PM:
 

 Hi,

 I am using Geronimo 1.2, and I'm in the midst of changing all my EJB
 interfaces in my application to local interfaces from remote interfaces.
 For reasons that I do not understand, I'm getting an XML validation error
 on my ejb-jar.xml when trying to deploy my application.  According to the
 this XSD, http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd,  I would think
 that my ejb-jar.xml should validate properly.

 Here is the error I get, along with a fragment of my ejb-jar.xml:

  [java] Error: Unable to distribute acme.ear: Error parsing
 ejb-jar.xml

  [java] Invalid deployment descriptor: [error:
 cvc-complex-type.2.4a:
  [java] Expected element
 '[EMAIL PROTECTED]://java.sun.com/xml/ns/j2ee' instead
  [java] of '[EMAIL PROTECTED]://java.sun.com/xml/ns/j2ee' here in
 element
  [java] [EMAIL PROTECTED]://java.sun.com/xml/ns/j2ee, error:
  [java] cvc-complex-type.2.4a: Expected element
  [java] '[EMAIL PROTECTED]://java.sun.com/xml/ns/j2ee' instead of
  [java] '[EMAIL PROTECTED]://java.sun.com/xml/ns/j2ee' here in 
 element
  [java] [EMAIL PROTECTED]://java.sun.com/xml/ns/j2ee]

  [java] Descriptor: ejb-jar
  [java] xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee
  [java] http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd;
 version=2.1
  [java] xmlns=http://java.sun.com/xml/ns/j2ee;
  [java] xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;

  [java]   display-nameAcme Common/display-name

  [java]   enterprise-beans

  [java] session

  [java]   display-nameTestObject/display-name

  [java]   ejb-nameTestObject/ejb-name

  [java]   local-homecom.acme.ejb.dao.DAOHome/local-home

  [java]   localcom.acme.ejb.dao.DAORemote/local

  [java]   ejb-classcom.acme.ejb.dao.DAOBean/ejb-class

  [java]   session-typeStateless/session-type

  [java]   transaction-typeContainer/transaction-type
 .


 __
 
 * This message is intended only for the use of the individual or
 entity to which it is addressed, and may contain information that is
 privileged, confidential and exempt from disclosure under applicable
 law. Unless you are the addressee (or authorized to receive for the
 addressee), you may not use, copy or disclose the message or any
 information contained in the message. If you have received this
 message in error, please advise the sender by reply e-mail , and
 delete the message, or call (collect) 001 613 747 4698. *

 
 __
 * This message is intended only for the use of the individual or entity to
 which it is addressed, and may contain information that is privileged,
 confidential and exempt from disclosure under applicable law. Unless you
 are the addressee (or authorized to receive for the addressee), you may
 not use, copy or disclose the message or any information contained in the
 message. If you have received this message in error, please advise the
 sender by reply e-mail , and delete the message, or call (collect) 001 613
 747 4698. *
 
 
 

-- 
View this message in context: 
http://www.nabble.com/XML-Validation-error-when-using-%3Clocal-home%3E-element-in-ejb-jar.xml-tf3508047s134.html#a9980743
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.



Comparison between Geronimo and Websphere Community Edition

2007-04-13 Thread Bruno Melloni
I am setting up a Eclipse 3.2.2 development environment for applications
that will be eventually deployed to Websphere 6 and 7.  I narrowed down
my choices for the J2EE server to Geronimo 1.1.1 and Websphere CE 1.0.  
 
I found lots of information saying that Websphere CE is *based* on
Geronimo, but no details on what is different.
 
Can somebody please point me to a comparison between the two?
 
 


RE: Comparison between Geronimo and Websphere Community Edition

2007-04-13 Thread Spotts, Joel \(ISS Atlanta\)
Here are a couple of articles. The first is probably the best coverage I
have seen on the topic. The second seems a bit dated possibly
 
http://saviorodrigues.wordpress.com/2006/12/04/apache-geronimo-vs-was-ce
/
 
http://publib.boulder.ibm.com/wasce/V1.1.0/en/Tasks/Migrating/FromGeroni
mo.html
 
Yoel Spotts
 
 

  _  

From: Bruno Melloni [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 13, 2007 11:44 AM
To: [EMAIL PROTECTED]
Subject: Comparison between Geronimo and Websphere Community Edition


I am setting up a Eclipse 3.2.2 development environment for applications
that will be eventually deployed to Websphere 6 and 7.  I narrowed down
my choices for the J2EE server to Geronimo 1.1.1 and Websphere CE 1.0.  
 
I found lots of information saying that Websphere CE is *based* on
Geronimo, but no details on what is different.
 
Can somebody please point me to a comparison between the two?
 
 


Re: Openejb: This principle is not authorized

2007-04-13 Thread Dain Sundstrom
I'm not sure exactly what you are doing, so I'll explain how an  
OpenEJB JNDI based login works.


On the client side when you create a JNDIContext with the principal  
and credentials set the OpenEJB JNDI code will open a connection to  
the server and perform a remote login.  The server redirects the  
login request to the OpenEJB SecurityService.login(String user,  
String pass) method.  The SecurityService authenticates the user and  
returns a security token (java.lang.Object).  The client stashes off  
the token and send it on ever request.


To start with, your login module configuration will need to be on the  
server side.  In OpenEJB standalone, you can modify the $ 
{OPENEJB_HOME}/conf/login.conf file.  I don't know what the  
equivalent configuration is for Geronimo.  Secondly, the current  
security service code has the name of the login module hard coded.   
In OpenEJB standalone it is hard coded to PropertiesLogin and in the  
Geronimo integration it is hard coded to OpenEJB.


If you get stuck and want to debug the server, all of the security  
magic for ejb clients happens in GeronimoSecurityService or  
SecurityServiceImpl for OpenEJB standalone.


-dain

On Apr 13, 2007, at 7:07 AM, Bert_nor wrote:


Standalone application

login.config:
dw_realm {
org.apache.geronimo.security.jaas.client.JaasLoginCoordinator  
required

host=localhost
port=4242
realm=dw_realm;
};

LoginContext context = new LoginContext(dw_realm,...);
context.login();

Properties props = new Properties();
props.put(java.naming.factory.initial,
org.apache.openejb.client.RemoteInitialContextFactory);
props.put(java.naming.factory.host, 127.0.0.1);
props.put(java.naming.factory.port, 4201);
props.put(java.naming.security.principal, ...);
props.put(java.naming.security.credentials, ...);

Context remoteContext = remoteContext = new InitialContext(props);

javax.naming.AuthenticationException: This principle is not  
authorized.
	at org.apache.openejb.client.JNDIContext.authenticate 
(JNDIContext.java:144)

at
org.apache.openejb.client.JNDIContext.getInitialContext 
(JNDIContext.java:116)
	at javax.naming.spi.NamingManager.getInitialContext 
(NamingManager.java:667)
	at javax.naming.InitialContext.getDefaultInitCtx 
(InitialContext.java:247)

at javax.naming.InitialContext.init(InitialContext.java:223)
at javax.naming.InitialContext.init(InitialContext.java:197)

It's exception thrown from
org.apache.geronimo.openejb.GeronimoSecurityService.login(String user,
String pass) {
  LoginContext context = new LoginContext(OpenEJB, new
UsernamePasswordCallbackHandler(user,
pass));--javax.security.auth.login.LoginException: No LoginModules
configured for OpenEJB

Can be use realm for the current user?


--
View this message in context: http://www.nabble.com/Openejb%3A-This- 
principle-is-not-authorized-tf3571824s134.html#a9979641
Sent from the Apache Geronimo - Users mailing list archive at  
Nabble.com.






Question re Hibernate connection pooling with C3P0 and CMT transaction management

2007-04-13 Thread Geronimo User

Hello:

We are using Hibernate inside session EJBs that use container-managed
transactions.

Our Hibernate configuration looks like this:

property name=hibernate.transaction.manager_lookup_class
com.informiam.eacore.data.hibernate.GeronimoTransactionManagerLookup/property

property 
name=connection.datasourcejava:comp/env/jdbc/SessionEJBDataSource/property

property 
name=hibernate.transaction.factory_classorg.hibernate.transaction.CMTTransactionFactory/property
property 
name=hibernate.TransactionStrategyorg.hibernate.transaction.CMTTransactionFactory/property
property name=hibernate.current_session_context_classjta/property

I wonder whether it's possible, or necessary, to use connection
pooling via C3P0
with such a configuration.

I configured the hibernate.c3p0 properties with basic settings and deployed the
application. It was slower to start, but then seemed to run much faster.

But is it the right thing to do?

Comments?

Thanks.


Taglibs, JEE5, and EAR /lib

2007-04-13 Thread Richard Wallace
I've got my Struts2 jar in my EARs lib directory and I'm deploying to
Geronimo 2.0-M3 with Jetty.  My webapp is able to successfully start
the struts FilterDispatcher, but when I try and hit a jsp page using
the struts taglib I'm getting a 500 error saying that the /struts-tags
file could not be found.  I know that if I put the struts jar in the
wars WEB-INF/lib directory the servlet engine will automatically find
the tld.  Do I need to pull the tld out and put it in the WEB-INF/tld
directory or is there a better way to make the servlet container get
the tld out of the struts jar?

Thanks,
Rich