Re: CMP with OpenJPA on Apache Geronimo 3.0.1

2014-12-29 Thread ivan frias
Hi,

Do you have any example of the steps involved in correctly configuring a
datasource for this case ?

Best regards,
Ivan Frias


2014-12-29 16:03 GMT+00:00 David Jencks :

> It's been a few years….. IIRC the problem here is that your datasource is
> not set up correctly.  Again IIRC you need both a transactional and a
> non-transactional datasource for the persistence-unit.  Again IIRC this is
> more likely to work if the transactional datasource is XA.  The non
> transactional datasource must be no-transaction.
>
> hope this helps
> david jencks
>
> On Dec 29, 2014, at 10:35 AM, ivan frias  wrote:
>
> > Hi,
> > Currently I am developing an application using OpenJPA . I've decide to
> use CMP to manage the transactions.
> > I am able to insert /edit and delete rows from the database ( through a
> configured Datasource ), however, it seems that transaction is only
> commited at Geronimo level. If I use the datasource control to execute a
> query ( inside the management window on Geronimo ) I get the modified rows,
> however If I try it outside the container ( e.g. using Sql Developer ) I
> can't see the modifications.
> >
> > Persistence.xml :
> >
> >
> > 
> >   Flea Circus
> >
>  org.apache.openjpa.persistence.PersistenceProviderImpl
> >   FleaCircusOracleDS
> >   de.carmedialab.db.entities.ApplicationItem
> >   de.carmedialab.db.entities.FleaResult
> >   de.carmedialab.db.entities.FleaResultType
> >   de.carmedialab.db.entities.ItemAttribute
> >   de.carmedialab.db.entities.ItemGroup
> >   de.carmedialab.db.entities.ItemType
> >   de.carmedialab.db.entities.ItemTypeAttribute
> >
>  de.carmedialab.db.entities.ItemTypeOperationAttribute
> >   de.carmedialab.db.entities.Operation
> >
>  de.carmedialab.db.entities.OperationAttribute
> >   de.carmedialab.db.entities.OperationType
> >   de.carmedialab.db.entities.Role
> >   de.carmedialab.db.entities.UserAccount
> >   de.carmedialab.db.entities.Measurement
> >   de.carmedialab.db.entities.MeasurementType
> >
>  de.carmedialab.db.entities.MeasurementAttribute
> >
>  de.carmedialab.db.entities.MeasurementAttributeType
> >   de.carmedialab.db.entities.Fleet
> >
> >   
> >value="validate" />
> >>
>  name="openjpa.Compatibility.CheckDatabaseForCascadePersistToDetachedEntity"
> >   value="true" />
> > 
> >   
> >   
> >
> >
> > TestDaoImpl.java:
> >
> >
> > package de.carmedialab.db.dao;
> >
> > import java.util.Calendar;
> >
> > import javax.ejb.Remote;
> > import javax.ejb.Stateless;
> > import javax.ejb.TransactionAttribute;
> > import javax.ejb.TransactionAttributeType;
> > import javax.persistence.EntityManager;
> > import javax.persistence.PersistenceContext;
> > import javax.persistence.PersistenceContextType;
> > import javax.persistence.Query;
> >
> > import de.carmedialab.db.entities.ApplicationItem;
> > import de.carmedialab.db.entities.ItemType;
> >
> > @Stateless
> > @Remote(TestDao.class)
> > public class TestDaoImpl implements TestDao{
> >
> >   @PersistenceContext(type=PersistenceContextType.TRANSACTION)
> >   private EntityManager em;
> >
> >   @Override
> >   @TransactionAttribute(TransactionAttributeType.REQUIRED)
> >   public void save() {
> >
> >   try{
> >   Query query = em.createQuery("select t from
> ItemType t where t.ittTypeName = :name");
> >   query.setParameter("name", "Passenger car");
> >   ItemType type = (ItemType)query.getSingleResult();
> >
> >   ApplicationItem itm = new ApplicationItem();
> >   itm.setItemType(type);
> >   itm.setItmIsActive("Y");
> >   itm.setItmItemIdentifier("TEST");
> >   itm.setItmItemDescription("DESCRIPTION");
> >   itm.setItmItemName("NAME");
> >
>  itm.setItmInsertDate(Calendar.getInstance().getTime());
> >   itm.setItmInsertUser("SYSTEM");
> 

CMP with OpenJPA on Apache Geronimo 3.0.1

2014-12-29 Thread ivan frias
Hi,
Currently I am developing an application using OpenJPA . I've decide to use
CMP to manage the transactions.
I am able to insert /edit and delete rows from the database ( through a
configured Datasource ), however, it seems that transaction is only
commited at Geronimo level. If I use the datasource control to execute a
query ( inside the management window on Geronimo ) I get the modified rows,
however If I try it outside the container ( e.g. using Sql Developer ) I
can't see the modifications.

Persistence.xml :



Flea Circus
org.apache.openjpa.persistence.PersistenceProviderImpl
FleaCircusOracleDS
de.carmedialab.db.entities.ApplicationItem
de.carmedialab.db.entities.FleaResult
de.carmedialab.db.entities.FleaResultType
de.carmedialab.db.entities.ItemAttribute
de.carmedialab.db.entities.ItemGroup
de.carmedialab.db.entities.ItemType
de.carmedialab.db.entities.ItemTypeAttribute
de.carmedialab.db.entities.ItemTypeOperationAttribute
de.carmedialab.db.entities.Operation
de.carmedialab.db.entities.OperationAttribute
de.carmedialab.db.entities.OperationType
de.carmedialab.db.entities.Role
de.carmedialab.db.entities.UserAccount
de.carmedialab.db.entities.Measurement
de.carmedialab.db.entities.MeasurementType
de.carmedialab.db.entities.MeasurementAttribute
de.carmedialab.db.entities.MeasurementAttributeType
de.carmedialab.db.entities.Fleet




  




TestDaoImpl.java:


package de.carmedialab.db.dao;

import java.util.Calendar;

import javax.ejb.Remote;
import javax.ejb.Stateless;
import javax.ejb.TransactionAttribute;
import javax.ejb.TransactionAttributeType;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import javax.persistence.PersistenceContextType;
import javax.persistence.Query;

import de.carmedialab.db.entities.ApplicationItem;
import de.carmedialab.db.entities.ItemType;

@Stateless
@Remote(TestDao.class)
public class TestDaoImpl implements TestDao{
 @PersistenceContext(type=PersistenceContextType.TRANSACTION)
private EntityManager em;

@Override
@TransactionAttribute(TransactionAttributeType.REQUIRED)
public void save() {

try{
Query query = em.createQuery("select t from ItemType t where t.ittTypeName
= :name");
query.setParameter("name", "Passenger car");
ItemType type = (ItemType)query.getSingleResult();
 ApplicationItem itm = new ApplicationItem();
itm.setItemType(type);
itm.setItmIsActive("Y");
itm.setItmItemIdentifier("TEST");
itm.setItmItemDescription("DESCRIPTION");
itm.setItmItemName("NAME");
itm.setItmInsertDate(Calendar.getInstance().getTime());
itm.setItmInsertUser("SYSTEM");
 em.persist(itm);
 System.out.println("Item Persisted");
 }catch(Exception ex){
ex.printStackTrace();
}
}

@Override
@TransactionAttribute(TransactionAttributeType.REQUIRED)
public void delete() {
try{
Query query = em.createQuery("select i from ApplicationItem i where
i.itmItemName = :itmName");
query.setParameter("itmName", "NAME");
ApplicationItem itm = (ApplicationItem)query.getSingleResult();
em.remove(itm);
System.out.println("Item Deleted");
}catch(Exception ex){
ex.printStackTrace();
}
}
}


Best regards,
Ivan Frias


Re: Access class from deployed rar module

2014-03-15 Thread Ivan
It more looks like the Eclipse issue, possible WDT ? In the runtime, those
classes in the rar module could be accessed in the ejb jar.


2014-02-27 16:35 GMT+08:00 Genc, Ömer :

>  Hey,
>
>
>
> this is what i am already doing. I have a reference of the the activemq
> resource-archive-system in my application.xml and the deployment plan for
> this rar in my geronimo-application.xml. However, I am still not able to
> use classes  from the rar module in my ejb project. I am using eclipse for
> development and I am getting erros when trying to import classes from
> activemq, also the rar module is deployed with the same ear, where the
> MyEjb.jar lies.
>
>
>
> So do I need to explicitly import the activemq packages?
>
>
>
> Thanks
>
>
>
> *Von:* frank pientka [mailto:frank.pien...@gmail.com]
> *Gesendet:* Mittwoch, 26. Februar 2014 18:17
> *An:* user@geronimo.apache.org
> *Betreff:* Re: Access class from deployed rar module
>
>
>
> if you don't want to deploy your resource-archive system wide outside your
> ear.app you have to reference it in the geronimo-application.xml or
> Application-scoped
>
> Inside your EAR in the META-INF/geronimo-application.xml
>
> But why not just reference module
> org.apache.geronimo.configs/activemq-ra/3.0.1/car in your config.xml file
>
> frank
>
>
>
> 2014-02-20 16:43 GMT+01:00 Genc, Ömer :
>
> Hey there,
>
>
>
> Is there a way to access classes which are inside of a rar module?
>
> Here is the structure of the ear, when deployed to Geronimo:
>
> Ear
>
> ActiveMQ.rar
>
>  activemqXXX*.jar
>
>  activemqYYY*.jar
>
>  
>
> MyEjb.jar
>
> MyWeb.war
>
>
>
> I would like to access the classes in the rar module from within the
> MyEjb.jar.
>
> Can anyone tell me how to do this?
>
>
>
> Cheers,
>
>
>



-- 
Ivan


Re: Mark ear module to not run on geronimo startup

2014-03-15 Thread Ivan
>From the Geronimo side, what it tries to do is to keep the consistence
while restarting the applications.

I am thinking that, since you come up a button to start the module, how
about having a button for stopping the application firstly and then
stopping Geronimo.


2014-02-27 15:44 GMT+08:00 Genc, Ömer :

>  Hey,
>
>
>
> first of all thank you very much for your help. I know you all have a lot
> of stuff to deal with.
>
>
>
> Anyway, I already found the entry you mentioned. My problem is that I want
> the deployed module to be user intended started and stopped.
>
> What I want is like this:
>
> My Module is deploy on Geronimo. When Geronimo starts/restarts this module
> should not be started.
>
> Now the user can start the module on button click (I have implemented
> this). Now the module is started and someone shuts down Geronimo.
>
> Note, on Geronimo shutdown the module was started. When Geronimo starts
> again this module should not be started unless the user triggers it again.
>
>
>
> It seems that Geronimo writes into the config.xml which module was started
> and which one not, when Geronimo shuts down.
>
> So now, I need a more obligatory way to do this. Is there a way to specify
> modules, which should be stopped when Geronimo shutsdown?
>
>
>
> Thanks in advance
>
>
>
> *Von:* frank pientka [mailto:frank.pien...@gmail.com]
> *Gesendet:* Mittwoch, 26. Februar 2014 18:11
> *An:* user@geronimo.apache.org
> *Betreff:* Re: Mark ear module to not run on geronimo startup
>
>
>
> add   in var\config\config.xml
>
>
>
> 2014-02-26 16:07 GMT+01:00 Genc, Ömer :
>
> Hey there,
>
>
>
> I don't know if the Geronimo mailing list is still an active mailing list,
> since I got no response to my last 3/4 posting.
>
>
>
> However, currently I am having another problem, which in my opinion should
> be easily answered by any Geronimo developer.
>
>
>
> I am searching for a way to mark a custom ear module, so that it will not
> be started per default.
>
> Lets say, I deployed my ear and it is started. Now I shutdown Geronimo.
> Now start Geronimo again.
>
> At this point my ear should not be started.
>
>
>
> How to do this?
>
>
>
> Anyone? Would be nice to get some feedback at all...
>
>
>
> Cheers,
>
>
>



-- 
Ivan


Re: Nullpointer deploying jax-ws webservice

2013-12-01 Thread Ivan
ava:61)
>> at
>> org.apache.geronimo.cli.AbstractCLI.executeMain(AbstractCLI.java:65)
>> at
>> org.apache.geronimo.cli.deployer.DeployerCLI.main(DeployerCLI.java:32)
>>
>> Exploded WAR (/opt/Apache/geronimo/current/bin/deploy deploy --inPlace
>> `pwd`)
>>
>> 2013-11-29 14:24:39,015 ERROR [DeployTool] Error:
>> org.apache.geronimo.common.DeploymentException: Unable to deploy
>> eSolutions_web_source-1.0-SNAPSHOT.war: Cound not open module file:
>> /appvol/applications/eSolutions/eSolutionsWeb/eSolutions_web_source-1.0-SNAPSHOT.war
>>
>> /opt/Apache/geronimo/current/var/temp/geronimo-fileutils6097305115786813817.tmpfile
>> (No such file or directory)
>>
>> at
>> org.apache.geronimo.deployment.cli.CommandDeploy.runCommand(CommandDeploy.java:43)
>> at
>> org.apache.geronimo.deployment.cli.CommandDistribute.executeOnline(CommandDistribute.java:148)
>> at
>> org.apache.geronimo.deployment.cli.CommandDistribute.execute(CommandDistribute.java:124)
>> at
>> org.apache.geronimo.deployment.cli.DeployTool.execute(DeployTool.java:171)
>> at
>> org.apache.geronimo.system.main.MainBridge.execute(MainBridge.java:64)
>> at
>> org.apache.geronimo.main.Bootstrapper.start(Bootstrapper.java:88)
>> at
>> org.apache.geronimo.main.Bootstrapper.execute(Bootstrapper.java:61)
>> at
>> org.apache.geronimo.cli.AbstractCLI.executeMain(AbstractCLI.java:65)
>> at
>> org.apache.geronimo.cli.deployer.DeployerCLI.main(DeployerCLI.java:32)
>>
>>
>> /opt/Apache/geronimo/current/var/tmp exists and is properly permissioned:
>>
>> [caspersb-daws1.caspersbox.corp:appadm] :
>> 
>>
>> $ id
>> uid=105(appadm) gid=104(appgrp) groups=104(appgrp)
>> context=user_u:system_r:unconfined_t:s0
>> [caspersb-daws1.caspersbox.corp:appadm] :
>> 
>>
>> $
>>
>> [caspersb-daws1.caspersbox.corp:appadm] :
>> 
>>
>> $ ls -ld
>> drwxr-xr-x 3 appadm appgrp 4096 Nov 29 14:21 .
>> [caspersb-daws1.caspersbox.corp:appadm] :
>> 
>>
>> $
>>
>>
>>
>> 
>>
>> Kevin Huntly
>> 79 Aurora Drive
>> Cheektowaga, NY 14215
>> Email: kmhun...@gmail.com
>> Cell: (716) 341-5669
>> LinkedIn: http://www.linkedin.com/in/kevinhuntly
>> 
>>
>> -BEGIN GEEK CODE BLOCK-
>> Version: 1.0
>> GCS/IT d+ s a C++ UL+++$ P+(++) L+++ E---
>> W+++ N+ o K(+) w--- O- M-- V-- PS+ PE Y(+)
>> PGP++(+++) t+ 5-- X-- R+ tv+ b++  DI++ D++
>> G++ e(+) h--- r+++ y+++*
>> --END GEEK CODE BLOCK--
>>
>>
>> On Fri, Nov 29, 2013 at 8:01 AM, Kevin Huntly  wrote:
>>
>>> I tried it that way as well, with and without leading slash. I did fix
>>> it by dropping the wsdl altogether, so that was nice - but now I cannot
>>> deploy using the CLI. It won't accept either the ear or the war but I can
>>> deploy the war in the console and it works. I'll post the stack trace as
>>> soon as I get on my PC.
>>>
>>> Sent from my iPhone
>>>
>>> On Nov 29, 2013, at 1:16, Ivan  wrote:
>>>
>>> From the git history, It looks like that you have fixed this issue by
>>> removing the wsdl file, with this way, the Geronimo server will gnerate the
>>> wsdl file you. From the original codes, I guess the issue here is that,
>>> wsdl is not in the correct location as configured by wsdlLocation in
>>> WebService annotation ?
>>>
>>> It is suggested to use the relative path to the application root,  e.g.
>>> wsdlLocation='WEB-INF/wsdl/CoreRequestProcessorService.wsdl'. (no slash in
>>> the beginning of the path)  Using /wsdl/CoreRequestProcessorService.wsdl
>>> will cause the codes to search the absolute file
>>> /wsdl/CoreRequestProcessorService.wsdl on linux box.
>>>
>>> The general searching policy is :
>>>
>>> a. Treat the url is an absolute URL, use new URL('').open()
>>> b. Consider it is of a relative path and try to resolve to the
>>> application root.
>>> c. Searching it from the classpath.
>>>
>>> Hope you have a happy thanksgiving day ;-)
>>>
>>>
>>> 2013/11/27 Kevin Huntly 
>>>
>>>> I get an npe trying to deploy a jax-ws annotated webservice to geronimo
>>>> 3.0.1 on jdk 1.7.0_45. I dont have the code to attach but it is o

Re: Nullpointer deploying jax-ws webservice

2013-11-28 Thread Ivan
>From the git history, It looks like that you have fixed this issue by
removing the wsdl file, with this way, the Geronimo server will gnerate the
wsdl file you. From the original codes, I guess the issue here is that,
wsdl is not in the correct location as configured by wsdlLocation in
WebService annotation ?

It is suggested to use the relative path to the application root,  e.g.
wsdlLocation='WEB-INF/wsdl/CoreRequestProcessorService.wsdl'. (no slash in
the beginning of the path)  Using /wsdl/CoreRequestProcessorService.wsdl
will cause the codes to search the absolute file
/wsdl/CoreRequestProcessorService.wsdl on linux box.

The general searching policy is :

a. Treat the url is an absolute URL, use new URL('').open()
b. Consider it is of a relative path and try to resolve to the application
root.
c. Searching it from the classpath.

Hope you have a happy thanksgiving day ;-)


2013/11/27 Kevin Huntly 

> I get an npe trying to deploy a jax-ws annotated webservice to geronimo
> 3.0.1 on jdk 1.7.0_45. I dont have the code to attach but it is on github:
> https://github.com/cwsus/cws-esolutions
>
> The webservice classes are under
> eSolutionsCore/src/main/java/com/cws/esolutions/core/ws, the wsdl is under
> web/eSolutions/wars/eSolutions_web_source/src/main/webapp/wsdl, and
> geronimo-web.xml under
> web/eSolutions/wars/eSolutions_web_source/src/main/geronimo. If it makes it
> easier to have them pasted here i can do that in the morning. Ive been
> trying to figure this out for a few days ...
>
> Caused by: javax.wsdl.WSDLException: WSDLException:
> faultCode=WSDL4JWrapper : : java.lang.NullPointerException
> at
> org.apache.axis2.jaxws.util.WSDL4JWrapper.commonPartsURLConstructor(WSDL4JWrapper.java:234)
> at
> org.apache.axis2.jaxws.util.WSDL4JWrapper.(WSDL4JWrapper.java:156)
> at
> org.apache.geronimo.axis2.AxisServiceGenerator.getServiceFromWSDL(AxisServiceGenerator.java:166)
> at
> org.apache.geronimo.axis2.Axis2WebServiceContainer.init(Axis2WebServiceContainer.java:175)
> at
> org.apache.geronimo.axis2.pojo.POJOWebServiceContainer.init(POJOWebServiceContainer.java:76)
> at
> org.apache.geronimo.axis2.pojo.POJOWebServiceContainerFactoryGBean.getWebServiceContainer(POJOWebServiceContainerFactoryGBean.java:105)
> ... 55 more
> Caused by: java.lang.NullPointerException
> at
> org.apache.axis2.jaxws.util.WSDL4JWrapper$14.run(WSDL4JWrapper.java:974)
> at
> org.apache.axis2.java.security.AccessController.doPrivileged(AccessController.java:132)
> at
> org.apache.axis2.jaxws.util.WSDL4JWrapper.getInputStream(WSDL4JWrapper.java:971)
> at
> org.apache.axis2.jaxws.util.WSDL4JWrapper.commonPartsURLConstructor(WSDL4JWrapper.java:189)
> ... 60 more
>



-- 
Ivan


Re: Webservice client - ConnectionPoolTimeoutException: Timeout waiting for connection

2013-10-21 Thread Ivan
Hi,

Sorry for the late response, was just busy with other sutff.

The reason I asked this is that,  if you are using Axis2 specifc apis, it
is possible to find the configurations to change the max connection number,
while for jaxws client api, IIRC, there is no configuration for this.

Could you show me your client sample codes ?


2013/10/21 Stig Even Larsen 

> Hi Ivan,
>
> I could also add that the webservice is created in Netbeans by referencing
> the wsdl file.
> Therefore, I'm a little uncertain answering your question, but to my
> knowledge it is Axis2 implementation of JAX-WS that is in use.
> Hopefully the stack trace in my previous post could answer your question
> better.
>
> Looking forward to resolv this puzzle.
>
> Best regards,
> Stig
>
>
> 2013/10/17 Ivan 
>
>> Hi,
>>
>> Which classes do you use to connect the long running web services ? axis2
>> client API or jaxws spec API ?
>>
>> Thanks.
>>
>>
>> 2013/10/15 Stig Even Larsen 
>>
>>> Hi,
>>>
>>> I have a problem with webservice (JAX-WS and Axis2) requests being
>>> rejected by HttpClient (MultiThreadedHttpConnectionManager) with the
>>> message "Timeout waiting for connection".
>>> We are using Geronimo 2.2.1 binary distribution (with Axis 1.5.2)
>>>
>>> The system have 2 long running webservices for transferring data to a
>>> legacy system supporting webservices. We now need to consume several other
>>> webservices from the same host, but is running into problems because of the
>>> the default max connections per host being 2.
>>>
>>> After searching for several days I don't find a solution to my problem,
>>> so I reach out to you to hopefully be enlightened.
>>>
>>> My questions are:
>>> 1. How do I change the default max connections per host?
>>> 2. Is there a way to "isolate" the long running webservices so that the
>>> new one runs with a different ConnectionManager?
>>> 3. Or is there other solutions to this problem?
>>>
>>>
>>> Best regards,
>>> Stig Even Larsen
>>>
>>
>>
>>
>> --
>> Ivan
>>
>
>
>
> --
> Mvh,
> Stig Even Larsen
>



-- 
Ivan


Re: Webservice client - ConnectionPoolTimeoutException: Timeout waiting for connection

2013-10-17 Thread Ivan
Hi,

Which classes do you use to connect the long running web services ? axis2
client API or jaxws spec API ?

Thanks.


2013/10/15 Stig Even Larsen 

> Hi,
>
> I have a problem with webservice (JAX-WS and Axis2) requests being
> rejected by HttpClient (MultiThreadedHttpConnectionManager) with the
> message "Timeout waiting for connection".
> We are using Geronimo 2.2.1 binary distribution (with Axis 1.5.2)
>
> The system have 2 long running webservices for transferring data to a
> legacy system supporting webservices. We now need to consume several other
> webservices from the same host, but is running into problems because of the
> the default max connections per host being 2.
>
> After searching for several days I don't find a solution to my problem, so
> I reach out to you to hopefully be enlightened.
>
> My questions are:
> 1. How do I change the default max connections per host?
> 2. Is there a way to "isolate" the long running webservices so that the
> new one runs with a different ConnectionManager?
> 3. Or is there other solutions to this problem?
>
>
> Best regards,
> Stig Even Larsen
>



-- 
Ivan


Re: class loading problem

2013-09-10 Thread Ivan
Hi,

Since you have already packaged the log4j jar file in your EAR, cloud you
try to use the configuration below :

!org.apache.log4j*


2013/9/11 cgazit 

> I seem to have a problem with  the class loader due to classes' visibility.
> My EAR had references to 3 external application utility jars and 1
> reference
> to  log4j jar.
> I deployed the jars and the log4j and then attempted to deploy the EAR. The
> deployment complained with NoClassDefFoundError about a class in one of app
> jars. I tried to use import-package statements in the plan , but it didn't
> help.
>
> So, I packaged all the jars (including the log4j) in the EAR, rebuilt the
> EAR , and attempted another deploy.
> It now finds my app jars, but still complain about a class in the log4j.
> Exception: class java.lang.NoClassDefFoundError:
> org.apache.log4j.BasicConfigurator: org.apache.log4j.BasicConfigurator
> at
>
> org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:835)
> This statement in the plan is not helping:
> org.apache.log4j
>
> I find v3.x very difficult to work with because of this (or what I believe
> to be) OSGi restrictions.
> Almost ready to give up and go back to 2.2!
> PS I'm using log4j.1.2.14.jar
>
> thanks for any help.
>
>
>
> --
> View this message in context:
> http://apache-geronimo.328035.n3.nabble.com/class-loading-problem-tp3987163.html
> Sent from the Users mailing list archive at Nabble.com.
>



-- 
Ivan


Re: classloading problem for WARs in an EAR file share classpath

2013-09-10 Thread Ivan
Yeah, the option a looks fancy in OSGi environment, while it does bring
many compatible issues.

So, it looks like the option b is the way we should go, while it means lots
of changes ...


2013/9/9 David Jencks 

> I don't think (a) will work since it's entirely possible in an ee
> situation to have packages split between a module (e.g. war) and an
> application library, and we can't reproduce this with bundles.
>
> One reason I originally liked using a bundle for an ee application is that
> you can export classes and then import them into other bundles or ee
> applications.  However with the increasing support for individual ee
> standards directly in osgi bundles this is seeming less important: if you
> want to do something like this you can make your application use the osgi
> versions of the specs directly instead of using ee packaging.
>
> thanks
> david jencks
>
>
>
> On Sep 3, 2013, at 7:20 PM, Ivan  wrote:
>
> Hi,
>
> EE specification leaves this classloader visibility scenario to container,
> while considering that most developers have this kind of isolation in their
> mind, as it is commonly used by most EE application severs, including
> Geronimo 2.*. In my opinion, we should fix this, actually, this is one
> thing left while Geronimo turned to use OSGi to manage different modules. I
> could see the following solutions :
>
> a. Our original idea is to use N+1 bundles for EAR, we will create each
> bundle for each web applications, and create one bundle containing EAR
> libraries and EJB libraries. One difficult thing is to build export
> packages for the later bundle, and generate the according import-packages
> for those web application bundles. Another temporary solution is to use
> Equonix classloader hook, with that, we could not do the export/import
> packages generation now.
>
> b. Copy the Geronimo 2.* classloader codes back to Geronimo 3.*, then only
> use one bundle as the parent of EAR classloader, which could be used to
> load those must classes from server container.
>
>
> 2013/9/4 Jack Cai 
>
>> Yes. The separate wars can be deployed to Geronimo without any problem.
>>
>> Each war uses hibernate, which is the basis of the DAOs. Since the
>> hibernate library in each war uses identical package and class names, EAR
>> classloader loads one hibernate library and one dao from one war, when it
>> comes to load the second dao, it tries to use the first hibernate, that
>> results in CCE.
>>
>> We were hoping to use the classloader isolation of EAR and WAR to manage
>> class loading, so that one EAR app with multiple wars can be deployed
>> multiple times on the same Geronimo instance.
>>
>> Is there a work-around for this? Thanks.
>>
>> -Jack
>>
>>
>>
>> On Tue, Sep 3, 2013 at 5:11 PM, David Jencks wrote:
>>
>>> Hi,
>>>
>>> As far as I can tell, the ee spec doesn't specify that wars in an ear
>>> each need their own classloader.  Geronimo passes the tck, so if I missed
>>> any part of the spec that says this so did the tck writers.
>>>
>>> I probably just haven't looked at an application like this recently, but
>>> I'm having trouble understanding exactly how the CCE arises, especially
>>> since the classes appear to be different.
>>>
>>> Can you deploy the wars separately?
>>>
>>> thanks
>>> david jencks
>>> On Sep 3, 2013, at 3:01 PM, Jack Cai  wrote:
>>>
>>> > Hi,
>>> >
>>> >   I package two wars in an ear, web1, and web2. nothing else, and
>>> deployed to geronimo (3.0.1)
>>> >
>>> > When I tried to access web1, web2's classes are loaded instead. What I
>>> found in the MANIFFEST.MF of the EAR package:
>>> >
>>> > Bundle-ClassPath: ...,webdemo-jsp.war/WEB-INF/classes,webdemo2-js
>>> >  p.war/WEB-INF/classes
>>> >
>>> >  after the EAR file is deployed to Geronimo.
>>> >
>>> >   This effectively makes all wars visible to all, and causes the type
>>> cast error:
>>> >
>>> > java.lang.ClassCastException: com.webapp2.dao.Customer cannot be cast
>>> to com.webapp.dao.Customer
>>> >
>>> >   I thought J2EE app is supposed to isolate classloader of each war to
>>> prevent similar problems. Is there a way to config around this in geronimo?
>>> Thanks
>>> >
>>> >   BTW, the ear application is created using Eclipse EAR for Geronimo.
>>> >
>>> > Thanks.
>>> >
>>> > -Jack
>>>
>>>
>>
>
>
> --
> Ivan
>
>
>


-- 
Ivan


Re: classloading problem for WARs in an EAR file share classpath

2013-09-03 Thread Ivan
Hi,

EE specification leaves this classloader visibility scenario to container,
while considering that most developers have this kind of isolation in their
mind, as it is commonly used by most EE application severs, including
Geronimo 2.*. In my opinion, we should fix this, actually, this is one
thing left while Geronimo turned to use OSGi to manage different modules. I
could see the following solutions :

a. Our original idea is to use N+1 bundles for EAR, we will create each
bundle for each web applications, and create one bundle containing EAR
libraries and EJB libraries. One difficult thing is to build export
packages for the later bundle, and generate the according import-packages
for those web application bundles. Another temporary solution is to use
Equonix classloader hook, with that, we could not do the export/import
packages generation now.

b. Copy the Geronimo 2.* classloader codes back to Geronimo 3.*, then only
use one bundle as the parent of EAR classloader, which could be used to
load those must classes from server container.


2013/9/4 Jack Cai 

> Yes. The separate wars can be deployed to Geronimo without any problem.
>
> Each war uses hibernate, which is the basis of the DAOs. Since the
> hibernate library in each war uses identical package and class names, EAR
> classloader loads one hibernate library and one dao from one war, when it
> comes to load the second dao, it tries to use the first hibernate, that
> results in CCE.
>
> We were hoping to use the classloader isolation of EAR and WAR to manage
> class loading, so that one EAR app with multiple wars can be deployed
> multiple times on the same Geronimo instance.
>
> Is there a work-around for this? Thanks.
>
> -Jack
>
>
>
> On Tue, Sep 3, 2013 at 5:11 PM, David Jencks wrote:
>
>> Hi,
>>
>> As far as I can tell, the ee spec doesn't specify that wars in an ear
>> each need their own classloader.  Geronimo passes the tck, so if I missed
>> any part of the spec that says this so did the tck writers.
>>
>> I probably just haven't looked at an application like this recently, but
>> I'm having trouble understanding exactly how the CCE arises, especially
>> since the classes appear to be different.
>>
>> Can you deploy the wars separately?
>>
>> thanks
>> david jencks
>> On Sep 3, 2013, at 3:01 PM, Jack Cai  wrote:
>>
>> > Hi,
>> >
>> >   I package two wars in an ear, web1, and web2. nothing else, and
>> deployed to geronimo (3.0.1)
>> >
>> > When I tried to access web1, web2's classes are loaded instead. What I
>> found in the MANIFFEST.MF of the EAR package:
>> >
>> > Bundle-ClassPath: ...,webdemo-jsp.war/WEB-INF/classes,webdemo2-js
>> >  p.war/WEB-INF/classes
>> >
>> >  after the EAR file is deployed to Geronimo.
>> >
>> >   This effectively makes all wars visible to all, and causes the type
>> cast error:
>> >
>> > java.lang.ClassCastException: com.webapp2.dao.Customer cannot be cast
>> to com.webapp.dao.Customer
>> >
>> >   I thought J2EE app is supposed to isolate classloader of each war to
>> prevent similar problems. Is there a way to config around this in geronimo?
>> Thanks
>> >
>> >   BTW, the ear application is created using Eclipse EAR for Geronimo.
>> >
>> > Thanks.
>> >
>> > -Jack
>>
>>
>


-- 
Ivan


Re: Classes generated on runtime (javassist) classloader issue

2013-08-25 Thread Ivan
Could you try to add the --clean option while starting the Geronimo server
? It looks like that the issue was caused by OSGi framework cache.



2013/8/23 dkateros 

> Back to the work PC (the server is geronimo-tomcat7-javaee6-3.0.1 with a
> couple test datasources set up).
>
> The server boots up fine with the vanilla jar.
>
> With the patched jar a "Main not found" message is printed in geronimo.out
> after a minute or so (saw the other jira).
>
> In the latter case I see an ERROR message in geronimo.log that is not
> printed during normal start/stop with the vanilla jar.
>
> 2013-08-23 11:52:13,383 DEBUG [j2ee-system] FrameworkEvent ERROR
> org.osgi.framework.BundleException: Exception in
> org.apache.geronimo.system.osgi.BootActivator.start() of bundle
> org.apache.geronimo.framework.j2ee-system.
> at
>
> org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:734)
> at
>
> org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:683)
> at
>
> org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:381)
> at
>
> org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:389)
> at
>
> org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1131)
> at
>
> org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:559)
> at
>
> org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:544)
> at
>
> org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:457)
> at
>
> org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:243)
> at
>
> org.eclipse.osgi.framework.internal.core.EquinoxLauncher.internalStart(EquinoxLauncher.java:271)
> at
>
> org.eclipse.osgi.framework.internal.core.EquinoxLauncher.start(EquinoxLauncher.java:241)
> at org.eclipse.osgi.launch.Equinox.start(Equinox.java:258)
> at
>
> org.apache.geronimo.main.FrameworkLauncher.launchOSGiFramework(FrameworkLauncher.java:195)
> at
>
> org.apache.geronimo.main.FrameworkLauncher.launch(FrameworkLauncher.java:175)
> at
> org.apache.geronimo.main.Bootstrapper.start(Bootstrapper.java:70)
> at
> org.apache.geronimo.main.Bootstrapper.execute(Bootstrapper.java:61)
> at
> org.apache.geronimo.cli.AbstractCLI.executeMain(AbstractCLI.java:65)
> at org.apache.geronimo.cli.daemon.DaemonCLI.main(DaemonCLI.java:33)
> Caused by: java.lang.NoClassDefFoundError:
> org/osgi/framework/wiring/BundleWiring
> at
>
> org.apache.geronimo.gbean.runtime.GBeanInstance.(GBeanInstance.java:252)
> at
>
> org.apache.geronimo.kernel.basic.BasicKernel.loadGBean(BasicKernel.java:361)
> at
> org.apache.geronimo.kernel.basic.BasicKernel.boot(BasicKernel.java:613)
> at
> org.apache.geronimo.system.osgi.BootActivator.start(BootActivator.java:58)
> at
>
> org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:711)
> at java.security.AccessController.doPrivileged(Native Method)
> at
>
> org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:702)
> ... 17 more
> Caused by: java.lang.ClassNotFoundException:
> org.osgi.framework.wiring.BundleWiring
> at
>
> org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:513)
> at
>
> org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:429)
> at
>
> org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:417)
> at
>
> org.apache.geronimo.hook.equinox.GeronimoClassLoader.loadClass(GeronimoClassLoader.java:85)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
> ... 24 more
>
> In case this is not the culprit (looks like it), I can post the entire
> startup log. Also, if you think that it has to do with the specific server
> installation, I will happily unpack a fresh one, but I thought you might
> want to take a peek.
>
>
>
> --
> View this message in context:
> http://apache-geronimo.328035.n3.nabble.com/Classes-generated-on-runtime-javassist-classloader-issue-tp3987097p3987140.html
> Sent from the Users mailing list archive at Nabble.com.
>



-- 
Ivan


Re: Classes generated on runtime (javassist) classloader issue

2013-08-22 Thread Ivan
Glad it works, I may come up some other following changes, mostly for jar
URL style while invoking getResources, will do that soon.


2013/8/23 dkateros 

> Thank you very much Ivan, much appreciated.
>
> I just tried the test case on my home setup, looks OK. I will confirm with
> the actual application on work tomorrow (I actually got a weird error on
> the
> work PC when I tried the patch earlier today, did you by any chance update
> the patched jar file?). When I confirm everything is OK I will post here to
> let you know that you can close the jira issue.
>
> Once again, thank you.
>
> Regards // Dimitris
>
>
>
> --
> View this message in context:
> http://apache-geronimo.328035.n3.nabble.com/Classes-generated-on-runtime-javassist-classloader-issue-tp3987097p3987138.html
> Sent from the Users mailing list archive at Nabble.com.
>



-- 
Ivan


Re: Classes generated on runtime (javassist) classloader issue

2013-08-22 Thread Ivan
Hi,
Sorry for the later response, was busy with other stuffs. Just create a
JIRA and attach a patched jar file, you may want to try that.

[1] https://issues.apache.org/jira/browse/GERONIMO-6488


2013/8/16 Ivan 

> Thanks for the sample, I could reproduce this now, and will get back to
> you in the next one or two days.
>
>
> 2013/8/14 dkateros 
>
>> I created a standalone test case (depends only on java, servlet api and
>> javassist 3.9.0.GA.
>>
>> You can download the war on the following URL (google drive)
>>
>>
>> https://docs.google.com/file/d/0BxXbVMAMFEYOWHJ3a09YRnE4N1U/edit?usp=sharing
>>
>> On geronimo 2.2 the servlet GET method can be executed successfully as
>> many
>> times as you like.
>>
>> On geronimo 3.0.1 the first execution of the GET method throws the error I
>> have mentioned. I think it would be interesting to see what the second
>> execution does.
>>
>> Regards // Dimitris
>>
>>
>>
>> --
>> View this message in context:
>> http://apache-geronimo.328035.n3.nabble.com/Classes-generated-on-runtime-javassist-classloader-issue-tp3987097p3987116.html
>> Sent from the Users mailing list archive at Nabble.com.
>>
>
>
>
> --
> Ivan
>



-- 
Ivan


Re: Classes generated on runtime (javassist) classloader issue

2013-08-15 Thread Ivan
Thanks for the sample, I could reproduce this now, and will get back to you
in the next one or two days.


2013/8/14 dkateros 

> I created a standalone test case (depends only on java, servlet api and
> javassist 3.9.0.GA.
>
> You can download the war on the following URL (google drive)
>
>
> https://docs.google.com/file/d/0BxXbVMAMFEYOWHJ3a09YRnE4N1U/edit?usp=sharing
>
> On geronimo 2.2 the servlet GET method can be executed successfully as many
> times as you like.
>
> On geronimo 3.0.1 the first execution of the GET method throws the error I
> have mentioned. I think it would be interesting to see what the second
> execution does.
>
> Regards // Dimitris
>
>
>
> --
> View this message in context:
> http://apache-geronimo.328035.n3.nabble.com/Classes-generated-on-runtime-javassist-classloader-issue-tp3987097p3987116.html
> Sent from the Users mailing list archive at Nabble.com.
>



-- 
Ivan


Re: Classes generated on runtime (javassist) classloader issue

2013-08-13 Thread Ivan
Hmm, if you could provide a sample to reproduce this, I could take a look
at that in my local environment.


2013/8/12 dkateros 

> I tried Ivan's suggestion but the problem persists.
>
> Any other suggestion would be most welcome at this point (even if it is to
> submit a problem report).
>
> TIA // Dimitris
>
>
>
> --
> View this message in context:
> http://apache-geronimo.328035.n3.nabble.com/Classes-generated-on-runtime-javassist-classloader-issue-tp3987097p3987110.html
> Sent from the Users mailing list archive at Nabble.com.
>



-- 
Ivan


Re: Classes generated on runtime (javassist) classloader issue

2013-08-05 Thread Ivan
It is possible that javassist from the server side was used. Could you try
to use hidden-class in your geronimo-web.xml to prevent using javassist
from Geronimo server.

<*hidden*-*classes*>javassist

Hope it helps.


2013/8/5 dkateros 

> Hello,
>
> I stumbled on this issue while testing an application with the geronimo
> 3.01
> release (currently runs on geronimo 2.2 for development and Websphere 8.5
> for production).
>
> This application creates concrete classes on runtime based on abstract
> classes that exist on compile time.
>
> Imagine the following scenario (extremely naive, but demonstrates the
> issue).
>
> public abstract class Foo { //exists on compile time
>Set strings; //package visible
> }
>
> public class FooConcreteEnhanced extends Foo { //generated on runtime
> public FooConcreteEnhanced() { strings = new HashSet(); }
> }
>
> When the app attempts to instantiate FooConcreteEnhanced, the following
> error is thrown:
>
> java.lang.IllegalAccessError: tried to access field pkg.Foo.strings from
> class pkg.FooConcreteEnhanced
>
> This might be caused if the runtime package of the classes is different,
> which happens if the two classes are loaded by two different classloaders.
> Changing the access modifier of strings to protected circumvents the
> problem, but is not desirable, since a lot of the app's unit tests rely on
> package visibility of fields.
>
> Is there any configuration available that I might use to force the
> generated
> classes to be loaded by the same class loader of the apps build time
> classes?
>
> PS: Note that the javassist.ClassPool instance that hosts the generated
> classes is scoped on the jars of my application (as opposed to being scoped
> on the default javassist ClassPool that might be loaded by a parent
> classloader in case the application server loads the javassist library for
> other reasons - like WebSphere 8.5 does).
>
>
>
> --
> View this message in context:
> http://apache-geronimo.328035.n3.nabble.com/Classes-generated-on-runtime-javassist-classloader-issue-tp3987097.html
> Sent from the Users mailing list archive at Nabble.com.
>



-- 
Ivan


Re: Unable to set up ssl

2013-08-05 Thread Ivan
Hi,

Per the stacktrace, it looks like the executor was not configured correctly.

In Geronimo 3.0.*, the var/catalina/server.xml is used as the tomcat
container configuration file, could you show us that file ? I guess that
the ssl connector was updated incorrectly in that file. You may also
compare that file with the original one to check what was changed.

Thanks.


2013/8/5 Oleg Andreyev 

> There are no handmade changes in config.xml. It's the same as in
> geronimo-tomcat7-javaee6-web-**3.0.1-bin.tar.gz
>
>
> On 08/03/2013 10:04 PM, thiyagu_r wrote:
>
>> Please share the config.xml
>>
>> Sent from my iPhone
>>
>> On Aug 3, 2013, at 10:23 AM, "Oleg Andreyev [via Apache Geronimo]"
>> <[hidden email] >
>> wrote:
>>
>>  Hi,
>>>
>>> Last days I tried to set up SSL on Geronimo 3.0.1 and finally had to
>>> admit defeat.
>>>
>>> My steps:
>>>
>>> - Downloaded 3.0.1 (Linux x64, Web profile, run with Oracle JDK 1.6.0_14)
>>> - Changed ports to 80/443 in config-substitution.properties
>>> - Log in to Web console
>>> - Created new keystore, enabled it, generated key, CSR, imported answer
>>> from CA
>>>
>>> No errors so far. The key looks like:
>>>
>>> Version: 3
>>> Subject: CN=xxx.y.com <http://xxx.y.com>, OU=Domain
>>>
>>> Control Validated
>>> Issuer: SERIALNUMBER=10688435, CN=Starfield Secure Certification
>>> Authority, 
>>> OU=http://certificates.**starfieldtech.com/repository<http://certificates.starfieldtech.com/repository>
>>> ,
>>> O="Starfield Technologies, Inc.", L=Scottsdale, ST=Arizona, C=US
>>> Serial Number: 2292395462585499
>>> Valid From: Fri Aug 02 20:15:19 EDT 2013
>>> Valid To: Wed Jul 30 16:46:03 EDT 2014
>>> Signature Alg: SHA1withRSA
>>> Public Key Alg: RSA
>>> critical ext: 2.5.29.15
>>> critical ext: 2.5.29.19
>>> non-critical ext: 2.5.29.14
>>> non-critical ext: 1.3.6.1.5.5.7.1.1
>>> non-critical ext: 2.5.29.31
>>> non-critical ext: 2.5.29.32
>>> non-critical ext: 2.5.29.37
>>> non-critical ext: 2.5.29.35
>>> non-critical ext: 2.5.29.17
>>>
>>> Also I have changed Web servers/TomcatWebSSLConnector to set correct
>>> keystoreFile and keystore password and stop/start it.
>>>
>>> So, I tried connect with https and after some time "The connection was
>>> reset". And I see error in geronimo log:
>>> 2013-08-02 20:19:22,861 ERROR [JIoEndpoint]
>>> java.lang.NullPointerException
>>>  at
>>> org.apache.tomcat.util.net.**JIoEndpoint.processSocket(**
>>> JIoEndpoint.java:525)
>>>
>>>  at
>>> org.apache.tomcat.util.net.**JIoEndpoint$Acceptor.run(**
>>> JIoEndpoint.java:230)
>>>  at java.lang.Thread.run(Thread.**java:619)
>>>
>>> I describe this attempts because it is most appropriate to documentation
>>> but I tried different JDK, geronimo 3.0.0, keystore created by keytool
>>> and so on.
>>>
>>> Any clue?
>>>
>>>
>>> --**--**
>>> 
>>>
>>> If you reply to this email, your message will be added to the
>>> discussion below:
>>> http://apache-geronimo.328035.**n3.nabble.com/Unable-to-set-**
>>> up-ssl-tp3987094.html<http://apache-geronimo.328035.n3.nabble.com/Unable-to-set-up-ssl-tp3987094.html>
>>>
>>> To start a new topic under Users, email [hidden email]
>>> 
>>>
>>> To unsubscribe from Users, click here.
>>> NAML
>>> <http://apache-geronimo.**328035.n3.nabble.com/template/**
>>> NamlServlet.jtp?macro=macro_**viewer&id=instant_html%**
>>> 21nabble%3Aemail.naml&base=**nabble.naml.namespaces.**
>>> BasicNamespace-nabble.view.**web.template.NabbleNamespace-**
>>> nabble.view.web.template.**NodeNamespace&breadcrumbs=**
>>> notify_subscribers%21nabble%**3Aemail.naml-instant_emails%**
>>> 21nabble%3Aemail.naml-send_**instant_email%21nabble%**3Aemail.naml<http://apache-geronimo.328035.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>>> >
>>>
>>
>>
>> --**--**
>> 
>>
>> View this message in context: Re: Unable to set up ssl
>> <http://apache-geronimo.**328035.n3.nabble.com/Unable-**to-set-up-ssl-**
>> tp3987094p3987095.html<http://apache-geronimo.328035.n3.nabble.com/Unable-to-set-up-ssl-tp3987094p3987095.html>
>> >
>>
>> Sent from the Users mailing list archive
>> <http://apache-geronimo.**328035.n3.nabble.com/Users-**f328036.html<http://apache-geronimo.328035.n3.nabble.com/Users-f328036.html>>
>> at
>> Nabble.com.
>>
>
>


-- 
Ivan


Re: Access-Control-Allow-Origin

2013-07-30 Thread Ivan
Hi,

Not sure what web services programming model you are using in Geronimo
2.2.1, guess JAX-WS ?  If does, you may inject a WebServiceContext in your
endpoint and read/write the headers with
WebServiceContext.getMessageContext.

Hope it helps.

Thanks.


2013/7/24 Florian Schaetz 

> Hello,
>
> ** **
>
> I’m trying to get some ajax request to work on a Geronimo 2.2.1
> Webservice, but it seems like I have to somehow get the
> Access-Control-Allow-Origin header set to * on the server. Could anyone
> help me out here? Otherwise it seems, that Ajax2 does not recognize the
> Request-Type…
>
> ** **
>
> Regards,
>
> ** **
>
> Flo
>
> ** **
>



-- 
Ivan


Re: xss protection in apache geronimo 3.x

2013-07-30 Thread Ivan
Geronimo does not proivde the XSS protection facilities to the users'
applicatoins, while it does consider that for the admin console, you may
refer the filter codes in below :

[1]
https://svn.apache.org/repos/asf/geronimo/server/branches/3.0/plugins/console/console-filter/src/main/java/org/apache/geronimo/console/filter


2013/7/25 Si Chen 

> Does Apache Geronimo 3.x provide protection against XSS attacks?
>
> --
> Si Chen
> Open Source Strategies, Inc.
> sic...@opensourcestrategies.com
> http://www.OpenSourceStrategies.com
> LinkedIn: http://www.linkedin.com/in/opentaps
> Twitter: http://twitter.com/opentaps
>
>


-- 
Ivan


Re: DeploymentException: cannot fully load class

2013-07-17 Thread Ivan
Hi,

For the class visibility, it is a little ambiguous for the app client. The
client applications should not have access to ejb jar files in the ear
file, I would suggest to use a common jar file, and share that for ejb and
client application.

You may refer to Java EE 6 Spec, EE 8.3.3

Hope it helps.


2013/7/15 Putter, S.M.J. de 

> Dear all,
>
>
>
> I get a DeploymentException when trying to deploy an ear file.
>
> The ear file is setup as follows:
>
>
>
> - META-INF/MANIFEST.MF
>
> - BI3_Remote-client.jar
>
> - BI3_Remote-ejb.jar
>
>
>
> For brevity, I will refer to BI3_Remote-client.jar as client.jar and to
> BI3_Remote-ejb.jar as ejb.jar.
>
>
>
> Client.jar refers to ejb.jar via its manifest through ClassPath.
>
> Ejb.jar  has a bean implementing the BI3_RemoteInterface remote business
> interface. A simple method of the BI3_RemoteInterface is invoked by the
> main class of client.jar.
>
>
>
> I get the following error, indicating failure to deploy due to a problem
> with BI3_RemoteInterface:
>
>
>
> 2013-07-15 16:31:28,058 ERROR [DeployTool] Error:
>
> org.apache.geronimo.common.DeploymentException: Unable to deploy
> BI3_Remote-ear.ear: Could not fully load class:
> lqs.ejb.spec.counterexample.BI3_Remote_client
>
>  due to:Llqs/ejb/spec/counterexample/BI3_RemoteInterface;
>
>  in classLoader:
>
>
> GeronimoClassLoader[default.BI3_Remote-ear_BI3_Remote-client.jar-DEPLOYMENT_0.0.
>
> 0.1373898687178 [443]]
>
>
>
> at
> org.apache.geronimo.deployment.cli.CommandDeploy.runCommand(CommandDeploy.java:43)
>
> at
> org.apache.geronimo.deployment.cli.CommandDistribute.executeOnline(CommandDistribute.java:148)
>
> at
> org.apache.geronimo.deployment.cli.CommandDistribute.execute(CommandDistribute.java:124)
>
> at
> org.apache.geronimo.deployment.cli.DeployTool.execute(DeployTool.java:171)
>
> at
> org.apache.geronimo.system.main.MainBridge.execute(MainBridge.java:64)
>
> at
> org.apache.geronimo.main.Bootstrapper.start(Bootstrapper.java:88)
>
> at
> org.apache.geronimo.main.Bootstrapper.execute(Bootstrapper.java:61)
>
> at
> org.apache.geronimo.cli.AbstractCLI.executeMain(AbstractCLI.java:65)
>
> at
> org.apache.geronimo.cli.deployer.DeployerCLI.main(DeployerCLI.java:32)
>
>
>
> I think somehow the ejb.jar does not get linked to the client.jar. But I
> cannot see why, as the ejb.jar is found through the manifest. Is there
> anything I’m missing? I cannot find any hints in the logs. The source code
> attached to this e-mail.
>
>
>
> Thanks in advance.
>
> Sander
>



-- 
Ivan


Re: MX4J Problem

2013-07-15 Thread Ivan
Hmm, I did not see Geronimo uses mx4j in 2.1.*/2.2.*/3.*, could you point
us where did you get this ?

Thanks.


2013/7/15 Grandhi Subrahmanya 

>
> Hi Geronimo,
>
> I am new to Apache Geronimo, you guys already using  MX4J  in
> Geronimo. I didn't understand, why you are using MX4J.
>
> In which cases, will it useful.
>
> Thanks
> --
>
> G.Subrahmanyam,
> +91-8867111831
>
>


-- 
Ivan


Re: Configure Apache Axis2 in Geronimo

2013-07-15 Thread Ivan
Hi,

Axis2 community provides an axis2.war for holding web services, so you may
need to deploy the axis2.war downloading from Axis2 web site and deploy it
to Geronimo.

Geronim also ships axis2 to provide JAX-WS support, which is required by
Java EE Spec, you may need to follow the programming model and APIs from
JSR 224 to create/deploy web services in Geronimo.

For the links for configuring Geronimo components, could you explain a bit
for this ? What components do you mean ?

Thanks.


2013/7/13 Thirupathi Rajendran 

> Am New to application server. I have
> installed geronimo-tomcat7-javaee6-3.0.1 Application server to deploy my
> application. I made my application work in Geronimo. I want to know what
> are the components can be configure to Apache geronimo especially Axis2.
> Because I want to use RESTful Http service of Axis2.
>
> Since I have installed geronimo-tomcat7-javaee6-3.0.1, Axis2 is bundled
> with Apache Geronimo. But I don't know how can I use the Axis2 in my
> application.
>
> As per the following link I suppose to be able to get access to axis2 by
> http://localhost:8080/axis2, Since axis2 is pre-installed in Geronimo,
> But I can't.
>
> http://www.ibm.com/developerworks/library/os-ag-axis2mig/
>
> Note: My requirement through application server. I will install two
> application, One application needs to call another application without any
> interaction of user. Means when first application called it would finish
> its computation and invoke the second application through Http request(I
> want it be RESTful Http).
>
> Also refer me link where I can get good practice on Apache Geronimo
> component configuration.
>
> I appreciate if you refer me any community or forum for Geronimo to
> discuss about this kind of problems.
>
>
> Thanks,
>
> Thirupathi.
>



-- 
Ivan


Re: questions related to configuring

2013-07-02 Thread Ivan
Hi,
1. Are there any messages in the log ? If not, could you try to use another
explorer, it looks like a client explorer issue.
2. Just remove the directory is enough.

Hope it helps.


2013/7/2 Grandhi Subrahmanya 

> Hi Geronimo,
>
> I am new to Apache-Geronimo,I downloaded *geronimo-tomcat7-javaee6-3.0.1
> *and I placed unpacked folder under C://Program Files.
>
> *Initialization Procedure :*
>
> 1. Open command prompt,switched to //bin
>
> 2. I run following command *geronimo run*
>
> 3. I opened another command prompt, and switched to //bin
>
> 4. I run following command *startup*
>
> using default usernames,passwords. I log in console page,here I am facing
> problem.
>
> console (right-side) page is not visible to me.
>
> I go through some tutorials,but not yet solve it.finally I though to
> uninstall and re -install Apache-Geronimo.
>
> Even, I didn't find how to uninstall Apache-Geronimo.Finally I have two
> queries
>
> *Problems :*
>
> 1. How can I see console page.
>
> 2. How can I uninstall Apache-Geronimo.
>
>
>
>
> --
>
> G.Subrahmanyam,
> +91-8867111831
>
>


-- 
Ivan


Re: Setting up 2.1 for development

2013-06-18 Thread Ivan
Which Geronimo dev tool version did you use ? I remembered that we had this
kind of enhancment in the past, see :
[1] https://issues.apache.org/jira/browse/GERONIMODEVTOOLS-580


2013/6/18 Mark Wareham 

> Is it possible to set up Geronimo 2.1 to run without the need to republish
> when a JSP is changed?
>
> In my eclipse server overview the option "no re-deployment when only JSP
> files are updated" is blanked out. I have also tried setting development to
> true in {geronimo home}\var\catalina\conf\config.xml
>
> I am stuck with the current version (for now) and have lots of JSP/CSS
> changes to make. Frequently publishing to test eats up a lot of time as
> each publish takes a long time. I would like to somehow avoid having to
> publish for these type of changes.
>
> Thanks, Mark.
>



-- 
Ivan


Re: geronimo non-clean shutdown problem

2013-06-04 Thread Ivan
Is there any other outputs in the log file ? "Unable to clear Sun
JarFileFactory cache" is outputed while destroying the classloader, which
typically occurred while stopping the applications.


2013/6/4 Yifan Zhang 

> Hi All,
>
> I spent quite a bit time to get Geronimo working. Today we had a problem
> with one of the disk, and the server was rebooted. Geronimo wasn't shutdown
> cleanly before rebooting. Now I cannot start Geronimo and it is complaining
> about "Unable to clear Sun JarFileFactory cache". I tried to search online,
> and couldn't find any answer to it. Is there a way to clean the cache
> manually? My environment is:
> Sun JVM 1.6.0_26
> and geronimo 2.2.1
>
> Thanks in advance.
>
> Yifan
>
>
>
> --
> View this message in context:
> http://apache-geronimo.328035.n3.nabble.com/geronimo-non-clean-shutdown-problem-tp3986955.html
> Sent from the Users mailing list archive at Nabble.com.
>



-- 
Ivan


Re: How can I jndi-lookup an EJB from another jar with a 'nice' jndi name

2013-05-17 Thread Ivan
where do you invoke the context.lookup ? In another EJB ? if does, you may
need to define the ref-name in that EJB.


2013/5/17 groovyflow 

> My team is using wasce-3.0.0.2.
>
> We want to look up an EJB that lives in a jar that is different than the
> jar
> in which the lookup is happening.  The lookup String includes the name of
> the jar, which is likely to change:
>
> context.lookup("java:app/services-1.0-SNAPSHOT/AsyncService")
>
>  I've been trying to change the jndi name via openejb-jar.xml, but have had
> no luck.  That xml appears at the end of this message. (By the way, we seem
> to be using an extremely old version of openejb-jar.xml.  Is it possible to
> use a newer version in wasce-3.0.0.2?)
>
> I'm trying to give AsyncService a nice jndi-name.  But wasce doesn't even
> recognize AsyncService when I deploy.  Perhaps my problem is that
> AsyncProcess implements an interface:
>
> @Stateless
> @Local(AsyncProcess.class)
> @Asynchronous
> public class AsyncService implements AsyncProcess
>
>  Could anyone point me to some method for giving AsyncService a nice jndi
> name?
>
>
> 
>
>
>
>
>  xmlns="http://www.openejb.org/xml/ns/openejb-jar-2.1";
> xmlns:naming="http://geronimo.apache.org/xml/ns/naming-1.1";
> xmlns:security="http://geronimo.apache.org/xml/ns/security-1.1";
> xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.2";>
>
>
> 
> 
> com.ourcompany.services
> services
> 0.0.1
> jar
> 
> 
> 
> 
> org.apache.commons.io
> 
> 
> 
>
> 
> 
> AsyncService
>   
> <!– @EJB(name="dispatcher") DispatcherGateRemote
> dispatcherGateRemote; –>
> AsyncProcess
>  xmlns:nam="http://geronimo.apache.org/xml/ns/naming-1.1";>
> services
> AsyncProcess
> 
> 
> 
> 
> SomeMdb
> 
> ServicesResourceGroup
> 
> 
> 
> AnotherMdb
> 
> ServicesResourceGroup
> 
> 
> 
> 
>
>
>
>
> --
> View this message in context:
> http://apache-geronimo.328035.n3.nabble.com/How-can-I-jndi-lookup-an-EJB-from-another-jar-with-a-nice-jndi-name-tp3986720.html
> Sent from the Users mailing list archive at Nabble.com.
>



-- 
Ivan


Re: Remote EJB problems

2013-05-13 Thread Ivan
Hi, could you have a look at your server log file, there should be some
outputs for ejb jndi names like below :

2011-07-25 14:31:22,250 INFO  [startup] Jndi(name=MEJBRemoteHome) -->
Ejb(deployment-id=geronimo-mejb-3.0-SNAPSHOT.jar/MEJB)
2011-07-25 14:31:22,250 INFO  [startup]
Jndi(name=global/geronimo-mejb-3.0-SNAPSHOT/MEJB!javax.management.j2ee.ManagementHome)
--> Ejb(deployment-id=geronimo-mejb-3.0-SNAPSHOT.jar/MEJB)

Thanks.


2013/5/5 Philippe Marschall 

> Hi
>
> I'm trying to use remote EJBs and am running into some problems. I
> followed the instructions at [1]. I use version 4.5.2 of the openejb-client
> (the latest I could find in Maven Central) and Geronimo 3. My code looks
> like this:
>
>   String jndiName =
> "java:global/osgi-remoting-**ejb-sample-ear/osgi-remoting-**
> ejb-sample-ejb/StatelessBean!**com.github.marschall.jboss.**
> osgi.remoting.ejb.sample.**StatelessRemote1";
>
>   Properties p = new Properties();
>   p.put("java.naming.factory.**initial", "org.apache.openejb.client.**
> RemoteInitialContextFactory");
>   p.put("java.naming.provider.**url", "ejbd://localhost:4201");
>
>   InitialContext ctx = new InitialContext(p);
>
>   Object myBean = ctx.lookup(jndiName);
>
> The exception I get is:
>
> Exception in thread "main" javax.naming.**NotContextException:
> openejb/remote/global/osgi-**remoting-ejb-sample-ear/osgi-**
> remoting-ejb-sample-ejb/**StatelessBean!com.github.**
> marschall.jboss.osgi.remoting.**ejb.sample.StatelessRemote1
> at org.apache.xbean.naming.**context.AbstractContext.**
> lookup(AbstractContext.java:**165)
> at org.apache.xbean.naming.**context.AbstractContext.**
> lookup(AbstractContext.java:**605)
> at org.apache.geronimo.openejb.**DeepBindableContext$**
> ContextWrapper.lookup(**DeepBindableContext.java:97)
> at org.apache.openejb.server.**ejbd.JndiRequestHandler.**
> doLookup(JndiRequestHandler.**java:203)
> at org.apache.openejb.server.**ejbd.JndiRequestHandler.**
> processRequest(**JndiRequestHandler.java:142)
> at org.apache.openejb.server.**ejbd.EjbDaemon.**
> processJndiRequest(EjbDaemon.**java:238)
> at org.apache.openejb.server.**ejbd.EjbDaemon.service(**
> EjbDaemon.java:167)
> at org.apache.openejb.server.**ejbd.EjbServer.service(**
> EjbServer.java:71)
> at org.apache.openejb.server.**ejbd.KeepAliveServer$Session.**
> service(KeepAliveServer.java:**213)
> at org.apache.openejb.server.**ejbd.KeepAliveServer.service(**
> KeepAliveServer.java:233)
> at org.apache.openejb.server.**ejbd.EjbServer.service(**
> EjbServer.java:66)
> at org.apache.openejb.server.**ServicePool$2.run(ServicePool.**
> java:91)
> at org.apache.openejb.server.**ServicePool$3.run(ServicePool.**
> java:120)
> at java.util.concurrent.**ThreadPoolExecutor.runWorker(**
> ThreadPoolExecutor.java:1110)
> at java.util.concurrent.**ThreadPoolExecutor$Worker.run(**
> ThreadPoolExecutor.java:603)
> at java.lang.Thread.run(Thread.**java:722)
>
> I double checked the JNDI name and I believe it is correct:
>
> - The application is deployed as an .ear with an single ejb.jar. The ear
> is called osgi-remoting-ejb-sample-ear-**0.2.0-SNAPSHOT.ear but has a
> META-INF/application.xml with osgi-**
> remoting-ejb-sample-ear
>
> - The ear seems to have deployed successfully as I see the following in
> the console
>
>   Started Application Modules:
> EAR: default/osgi-remoting-ejb-**sample-ear-0.2.0-SNAPSHOT/**
> 1366917167252/car
>
> - The ejb jar is in the root of the ear and called
> osgi-remoting-ejb-sample-ejb.**jar. There is ejb-jar.xml in the ejb jar.
>
> - The EJB is called com.github.marschall.jboss.**osgi.remoting.ejb.sample.
> **StatelessBean and annotated with @Stateless but not with @Remote
> annotation. It implements an interface called com.github.marschall.jboss.*
> *osgi.remoting.ejb.sample.**StatelessRemote1 which is annotated with
> @Remote.
>
> - The Oracle tutorial seems to use "/" to denote the fully qualified
> interface names but as far as I can see from chapter 4.4 of the EJB spec it
> should be "!"
>
>  [1] 
> http://tomee.apache.org/**clients.html<http://tomee.apache.org/clients.html>
>  [2] 
> http://docs.oracle.com/javaee/**6/tutorial/doc/gipjf.html<http://docs.oracle.com/javaee/6/tutorial/doc/gipjf.html>
>
> Cheers
> Philippe
>



-- 
Ivan


Re: derby.sql in Daytrader (Apache Geronimo v3.0)

2013-05-13 Thread Ivan
Guess that you could find the derby sql in the following location

[1]
http://svn.apache.org/repos/asf/geronimo/daytrader/trunk/bin/dbscripts/derby/


2013/5/10 Hari Pyla 

> Hi,
>  I am trying to build the Daytrader application in Geronimo v3.0.
> I am using mysql and JBOSS-5.1.0 so I was going over the instructions at
> http://svn.apache.org/repos/**asf/geronimo/daytrader/trunk/**README.jboss5<http://svn.apache.org/repos/asf/geronimo/daytrader/trunk/README.jboss5>
>
> "If using MySQL, create a mysql database called tradedb and load it with
> the derby.sql."
>
> I was unable to find the derby.sql file in the Daytrader download from the
> svn. I was wondering if I am missing something and where I coul get the
> derby.sql file.
>
> Thanks,
> --Hari
>



-- 
Ivan


Re: Error when install .eba on Geronimo 3

2013-02-04 Thread Ivan
at
>
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> at
>
> org.apache.geronimo.console.filter.RedirectByHashFilter.doFilter(RedirectByHashFilter.java:116)
> at
>
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
> at
>
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> at
>
> org.apache.geronimo.console.filter.PlutoURLRebuildFilter.doFilter(PlutoURLRebuildFilter.java:48)
> at
>
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
> at
>
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> at
>
> org.apache.geronimo.console.filter.XSSXSRFFilter.doFilter(XSSXSRFFilter.java:137)
> at
>
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
> at
>
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> at
>
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225)
> at
>
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
> at
>
> org.apache.geronimo.tomcat.security.SecurityValve.invoke(SecurityValve.java:89)
> at
>
> org.apache.geronimo.tomcat.security.jacc.JACCSecurityValve.invoke(JACCSecurityValve.java:54)
> at
>
> org.apache.geronimo.tomcat.GeronimoStandardContext$SystemMethodValve.invoke(GeronimoStandardContext.java:730)
> at
>
> org.apache.geronimo.tomcat.valve.GeronimoBeforeAfterValve.invoke(GeronimoBeforeAfterValve.java:48)
> at
>
> org.apache.geronimo.tomcat.valve.ProtectedTargetValve.invoke(ProtectedTargetValve.java:53)
> at
>
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
> at
>
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
> at
> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
> at
>
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
> at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
> at
>
> org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:999)
> at
>
> org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:565)
> at
>
> org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:309)
> at org.apache.geronimo.pool.ThreadPool$1.run(ThreadPool.java:243)
> at
>
> org.apache.geronimo.pool.ThreadPool$ContextClassLoaderRunnable.run(ThreadPool.java:373)
> at
>
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> at
>
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> at java.lang.Thread.run(Thread.java:662)
> Caused by:
> org.eclipse.osgi.service.pluginconversion.PluginConversionException: Could
> not find a META-INF/MANIFEST.MF, plugin.xml or a fragment.xml in
>
> D:\J2EE\geronimo-tomcat7-javaee6-web-3.0.0-fresh\var\cache\org.eclipse.osgi\bundles\329\1\bundlefile.
> at
>
> org.eclipse.core.runtime.internal.adaptor.PluginConverterImpl.fillPluginInfo(PluginConverterImpl.java:114)
> at
>
> org.eclipse.core.runtime.internal.adaptor.PluginConverterImpl.convertManifest(PluginConverterImpl.java:714)
> at
>
> org.eclipse.core.runtime.internal.adaptor.EclipseStorageHook.generateManifest(EclipseStorageHook.java:448)
>
>
> I'm stuck now.. Can anyone help me, please? (Inside the .eba I've got the
> META-INF\APPLICATION.MF already)
>
>
>
> --
> View this message in context:
> http://apache-geronimo.328035.n3.nabble.com/Error-when-install-eba-on-Geronimo-3-tp3986264.html
> Sent from the Users mailing list archive at Nabble.com.
>



-- 
Ivan


Re: Geronimo 3.0 db2 9.7 datasource

2012-12-02 Thread Ivan
Hmm, one possible reason is that, you may not copy the repository entries
to G3's repository directly, as all the jar files are required to be
bundles. Could you try to deploy the driver into the repository with admin
console ?

2012/11/29 Tom Murray 

> I have been unable to create this database pool from console or cmd in G3.
>
> I installed G2.2.1 and physically copied the repository entries to its
> repository and it worked in 2.2.1 first time.
>
> In G3 it cannot load a class, DB2XADataSource.class .  Not an issue in
> G2.2.1
>
> I am on Win7 Pro 64bit.
>
> Any ideas would be helpful.
>
>
> Have a Great Day!
>
> Tom Murray
>



-- 
Ivan


Re: geronimo car-maven-plugin + osgi

2012-11-21 Thread Ivan
I am not quite sure your requirement, could you explain that a bit ?

2012/11/21 Marcos Mendez 

>
> Is there an example of a geronimo plugin deploying normal jars, osgi
> bundles and an osgi web module somewhere?
>
> Also, is there a way to bundle binaries (jars, wars) inside the car so
> that they don't have to be downloaded?




-- 
Ivan


Re: JNDI Lookup

2012-11-21 Thread Ivan
gt;
>>> Ejb(deployment-id=cs-base-business.jar/Composition)  7560:  2012-11-14
>>> 22:11:33,279 INFO [startup] Jndi(name=EmailManagerRemote) -->
>>> Ejb(deployment-id=cs-base-business.jar/EmailManager)  7561:  2012-11-14
>>> 22:11:33,279 INFO [startup]
>>> Jndi(name=global/cs-base-ear-1.0-SNAPSHOT/cs-base-business/EmailManager!com.cs.base.remote.interfaces.IEmailManagerRemote)
>>> --> Ejb(deployment-id=cs-base-business.jar/EmailManager)  7562:
>>> 2012-11-14 22:11:33,279 INFO [startup]
>>> Jndi(name=global/cs-base-ear-1.0-SNAPSHOT/cs-base-business/EmailManager)
>>> --> Ejb(deployment-id=cs-base-business.jar/EmailManager)
>>>
>>> I try to use this code to access the ejb's.
>>>
>>> InitialContext context;
>>> // Configure Initial context
>>> try {
>>> this.m_emailManager =
>>> (IEmailManagerRemote)context.lookup("EmailManagerRemote");
>>> // Other statements
>>>
>>> I get this error upon lookup:
>>>
>>> java.lang.ClassFormatError: javax/ejb/EJBException : Missing Code
>>> attribute
>>> at java.lang.ClassLoader.defineClass1(Native Method)
>>> at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
>>> at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
>>> at
>>> java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
>>> at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
>>> at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
>>> at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
>>> at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
>>> at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
>>> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
>>> at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
>>> at java.lang.ClassLoader.defineClass1(Native Method)
>>> at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
>>> at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
>>> at
>>> java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
>>> at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
>>> at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
>>> at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
>>> at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
>>> at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
>>> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
>>> at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
>>> at
>>> org.apache.openejb.client.JNDIContext.createBusinessObject(JNDIContext.java:202)
>>> at org.apache.openejb.client.JNDIContext.lookup(JNDIContext.java:244)
>>> at javax.naming.InitialContext.lookup(InitialContext.java:392)
>>> at com.acc.base.ejb.Emailer.sendContactUs(Emailer.java:68)
>>> at
>>> com.acc.base.ejb.EmailerTest.emailerSuccessTest(EmailerTest.java:30)
>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>> at
>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>> at
>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>> at java.lang.reflect.Method.invoke(Method.java:597)
>>> at
>>> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
>>> at
>>> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
>>> at
>>> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
>>> at
>>> org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
>>> at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
>>> at
>>> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
>>> at
>>> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
>>> at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
>>> at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
>>> at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
>>> at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
>>> at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
>>> at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
>>> at
>>> org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
>>> at
>>> org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
>>> at
>>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
>>> at
>>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
>>> at
>>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
>>> at
>>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
>>>
>>>
>>> please tell me what I am doing wrong because this technique worked in
>>> previous versions of Geronimo.
>>>
>>> --
>>>
>>> Russell collinscollins-soluti...@austin.rr.com
>>>
>>>
>>>
>>>   --
>>>
>>> Russell collinscollins-soluti...@austin.rr.com
>>>
>>>
>>
>>
>>  --
>> Shawn
>>
>>
>>
>>   --
>>
>> Russell collinscollins-soluti...@austin.rr.com
>>
>>
>
>
>  --
> Shawn
>
>
>
> --
>
> Russell collinscollins-soluti...@austin.rr.com
>
>


-- 
Ivan


Re: Geronimo, Wink and JNDI

2012-11-07 Thread Ivan
I have not checked the detailed things, while from the design side, we only
 use vendor specific deployment plan while the spec plan could not work
well. The server will try its best to find the proper references, but
sometimes, extra configurations may require, e.g. There are two beans with
the same name.

2012/11/8 

> **
> Hi Ivan,
>
> That worked, thank you. Your  was defined in the web.xml,
> whilst mine was in the geronimo-web.xml using the proper editor.
>
> Why does this make a difference? Is it a bug?
>
> Cheers,
>
> Michael
> Sent from my BlackBerry® wireless device
> ------
> *From: * Ivan 
> *Date: *Wed, 7 Nov 2012 22:04:05 +0800
> *To: *
> *ReplyTo: * user@geronimo.apache.org
> *Subject: *Re: Geronimo, Wink and JNDI
>
> Just have a try, the codes below work for me. I packaged the ejb and war
> in the ear.
>
> TestEJB.jar
>
> package org.apache.geronimo.test;
>
> import javax.ejb.Local;
>
> @Local
> public interface TestBeanInterface {
>
> public void test();
> }
>
> package org.apache.geronimo.test;
>
> import javax.ejb.Stateless;
>
> /**
>  * Session Bean implementation class TestBean
>  */
> @Stateless(name = "TestBean")
> public class TestBean implements TestBeanInterface {
>
> /**
>  * Default constructor.
>  */
> public TestBean() {
> // TODO Auto-generated constructor stub
> }
>
> public void test() {
>
> }
>
> }
>
> TestWeb.war
>
> 
> http://java.sun.com/xml/ns/javaee";
>  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>  xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
> http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd";>
>
> 
> ejb/TestBean
> Session
> org.apache.geronimo.test.TestBeanInterface
> TestEJB.jar#TestBean
> 
> 
>
> Hope it helps.
>
> 2012/11/7 Michael Baylis 
>
>>  Hi Ivan,
>> I am afraid it didn't make a difference.
>>
>> I've tried:-
>>
>> Object x = ic.lookup("java:comp/env/ejb/TestEJB");
>> Object x = ic.lookup("ejb/TestEJB");
>>
>> with the ejb-ref you provided.
>>
>> As I am using EJB 3.1 and annotations, I didn't put anything in
>> ejb-jar.xml or openejb-jar.xml.   Does anything need to go in there?
>>
>> Cheers,
>>
>> Michael
>>
>>
>> On 06/11/2012 14:44, Ivan wrote:
>>
>> If the ejb jar is packaged in the same ear, could you try whether the
>> configuration below works for you :
>>
>>  
>> ejb/TestEJB
>> bob.ejb#TestEJB
>> 
>>
>> 2012/11/6 Michael Baylis 
>>
>>> Hi Folks,
>>> Help!!!
>>>
>>> Whenever I start to use Wink with EJBs I always seem to get totally
>>> confused wth JNDI lookups,  please could you resolve this once and for all
>>> for me.
>>>
>>> I have a restful service that would like to do a call to an EJB.   I
>>> have tried many combinations, but the following is what I have pieced
>>> together from the docs:-
>>>
>>> I am using Geronimo 3.0.0, and as I understand it EJB injection does not
>>> work in Wink (in Geronimo or IBM WAS 8.0) as the service class is loaded
>>> but the rest servlet, so I have to use a jndi lookup:-
>>>
>>> bob.ear has bob.web, the restful service.
>>> bob.ejb is seperate (but I would like it in the ear).
>>>
>>> bob.ejb has TestEJB with a @Remote and @Local which results in:-
>>>
>>> 2012-11-05 22:21:45,603 INFO  [startup] Assembling app:
>>> C:\Users\mikebyls\software\eclipse\default\bob.ejb\1.0\jar
>>> 2012-11-05 22:21:45,619 INFO  [startup] Jndi(name=TestEJBLocal) -->
>>> Ejb(deployment-id=bob.ejb.jar/TestEJB)
>>> 2012-11-05 22:21:45,619 INFO  [startup]
>>> Jndi(name=global/bob.ejb/TestEJB!bob.ejb.TestEJBLocal) -->
>>> Ejb(deployment-id=bob.ejb.jar/TestEJB)
>>> 2012-11-05 22:21:45,619 INFO  [startup] Jndi(name=TestEJBRemote) -->
>>> Ejb(deployment-id=bob.ejb.jar/TestEJB)
>>> 2012-11-05 22:21:45,619 INFO  [startup]
>>> Jndi(name=global/bob.ejb/TestEJB!bob.ejb.TestEJBRemote) -->
>>> Ejb(deployment-id=bob.ejb.jar/TestEJB)
>>> 2012-11-05 22:21:45,619 INFO  [startup]
>>> Jndi(name=global/bob.ejb/TestEJB) --> Ejb(deployment-id=bob.ejb.jar/TestEJB)
>>>
>>> My bob.web deployment is:-
>>> http://geronimo.apache.

Re: Geronimo, Wink and JNDI

2012-11-07 Thread Ivan
btw, I invoke the lookup method in a servlet, while considering that the
invocation for wink classes is in the same thread, think it is also able to
do that in rest class.

2012/11/7 Ivan 

> Just have a try, the codes below work for me. I packaged the ejb and war
> in the ear.
>
> TestEJB.jar
>
> package org.apache.geronimo.test;
>
> import javax.ejb.Local;
>
> @Local
> public interface TestBeanInterface {
>
> public void test();
> }
>
> package org.apache.geronimo.test;
>
> import javax.ejb.Stateless;
>
> /**
>  * Session Bean implementation class TestBean
>  */
> @Stateless(name = "TestBean")
> public class TestBean implements TestBeanInterface {
>
> /**
>  * Default constructor.
>  */
> public TestBean() {
> // TODO Auto-generated constructor stub
> }
>
> public void test() {
>
> }
>
> }
>
> TestWeb.war
>
> 
> http://java.sun.com/xml/ns/javaee";
>  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>  xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
> http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd";>
>
> 
> ejb/TestBean
> Session
> org.apache.geronimo.test.TestBeanInterface
> TestEJB.jar#TestBean
> 
> 
>
> Hope it helps.
>
> 2012/11/7 Michael Baylis 
>
>>  Hi Ivan,
>> I am afraid it didn't make a difference.
>>
>> I've tried:-
>>
>> Object x = ic.lookup("java:comp/env/ejb/TestEJB");
>> Object x = ic.lookup("ejb/TestEJB");
>>
>> with the ejb-ref you provided.
>>
>> As I am using EJB 3.1 and annotations, I didn't put anything in
>> ejb-jar.xml or openejb-jar.xml.   Does anything need to go in there?
>>
>> Cheers,
>>
>> Michael
>>
>>
>> On 06/11/2012 14:44, Ivan wrote:
>>
>> If the ejb jar is packaged in the same ear, could you try whether the
>> configuration below works for you :
>>
>>  
>> ejb/TestEJB
>> bob.ejb#TestEJB
>> 
>>
>> 2012/11/6 Michael Baylis 
>>
>>> Hi Folks,
>>> Help!!!
>>>
>>> Whenever I start to use Wink with EJBs I always seem to get totally
>>> confused wth JNDI lookups,  please could you resolve this once and for all
>>> for me.
>>>
>>> I have a restful service that would like to do a call to an EJB.   I
>>> have tried many combinations, but the following is what I have pieced
>>> together from the docs:-
>>>
>>> I am using Geronimo 3.0.0, and as I understand it EJB injection does not
>>> work in Wink (in Geronimo or IBM WAS 8.0) as the service class is loaded
>>> but the rest servlet, so I have to use a jndi lookup:-
>>>
>>> bob.ear has bob.web, the restful service.
>>> bob.ejb is seperate (but I would like it in the ear).
>>>
>>> bob.ejb has TestEJB with a @Remote and @Local which results in:-
>>>
>>> 2012-11-05 22:21:45,603 INFO  [startup] Assembling app:
>>> C:\Users\mikebyls\software\eclipse\default\bob.ejb\1.0\jar
>>> 2012-11-05 22:21:45,619 INFO  [startup] Jndi(name=TestEJBLocal) -->
>>> Ejb(deployment-id=bob.ejb.jar/TestEJB)
>>> 2012-11-05 22:21:45,619 INFO  [startup]
>>> Jndi(name=global/bob.ejb/TestEJB!bob.ejb.TestEJBLocal) -->
>>> Ejb(deployment-id=bob.ejb.jar/TestEJB)
>>> 2012-11-05 22:21:45,619 INFO  [startup] Jndi(name=TestEJBRemote) -->
>>> Ejb(deployment-id=bob.ejb.jar/TestEJB)
>>> 2012-11-05 22:21:45,619 INFO  [startup]
>>> Jndi(name=global/bob.ejb/TestEJB!bob.ejb.TestEJBRemote) -->
>>> Ejb(deployment-id=bob.ejb.jar/TestEJB)
>>> 2012-11-05 22:21:45,619 INFO  [startup]
>>> Jndi(name=global/bob.ejb/TestEJB) --> Ejb(deployment-id=bob.ejb.jar/TestEJB)
>>>
>>> My bob.web deployment is:-
>>> http://geronimo.apache.org/xml/ns/j2ee/application-2.0"; xmlns:bp="
>>> http://www.osgi.org/xmlns/blueprint/v1.0.0"; xmlns:client="
>>> http://geronimo.apache.org/xml/ns/j2ee/application-client-2.0";
>>> xmlns:conn="http://geronimo.apache.org/xml/ns/j2ee/connector-1.2";
>>> xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2"; xmlns:ejb="
>>> http://openejb.apache.org/xml/ns/openejb-jar-2.2"; xmlns:jaspi="
>>> http://geronimo.apache.org/xml/ns/geronimo-jaspi"; xmlns:log="
>>> http://geronimo.apache.org/xml/ns/loginconfig-2.0"; xmlns:name=&quo

Re: Geronimo, Wink and JNDI

2012-11-07 Thread Ivan
Just have a try, the codes below work for me. I packaged the ejb and war in
the ear.

TestEJB.jar

package org.apache.geronimo.test;

import javax.ejb.Local;

@Local
public interface TestBeanInterface {

public void test();
}

package org.apache.geronimo.test;

import javax.ejb.Stateless;

/**
 * Session Bean implementation class TestBean
 */
@Stateless(name = "TestBean")
public class TestBean implements TestBeanInterface {

/**
 * Default constructor.
 */
public TestBean() {
// TODO Auto-generated constructor stub
}

public void test() {

}

}

TestWeb.war


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


ejb/TestBean
Session
org.apache.geronimo.test.TestBeanInterface
TestEJB.jar#TestBean



Hope it helps.

2012/11/7 Michael Baylis 

>  Hi Ivan,
> I am afraid it didn't make a difference.
>
> I've tried:-
>
> Object x = ic.lookup("java:comp/env/ejb/TestEJB");
> Object x = ic.lookup("ejb/TestEJB");
>
> with the ejb-ref you provided.
>
> As I am using EJB 3.1 and annotations, I didn't put anything in
> ejb-jar.xml or openejb-jar.xml.   Does anything need to go in there?
>
> Cheers,
>
> Michael
>
>
> On 06/11/2012 14:44, Ivan wrote:
>
> If the ejb jar is packaged in the same ear, could you try whether the
> configuration below works for you :
>
>  
> ejb/TestEJB
> bob.ejb#TestEJB
> 
>
> 2012/11/6 Michael Baylis 
>
>> Hi Folks,
>> Help!!!
>>
>> Whenever I start to use Wink with EJBs I always seem to get totally
>> confused wth JNDI lookups,  please could you resolve this once and for all
>> for me.
>>
>> I have a restful service that would like to do a call to an EJB.   I have
>> tried many combinations, but the following is what I have pieced together
>> from the docs:-
>>
>> I am using Geronimo 3.0.0, and as I understand it EJB injection does not
>> work in Wink (in Geronimo or IBM WAS 8.0) as the service class is loaded
>> but the rest servlet, so I have to use a jndi lookup:-
>>
>> bob.ear has bob.web, the restful service.
>> bob.ejb is seperate (but I would like it in the ear).
>>
>> bob.ejb has TestEJB with a @Remote and @Local which results in:-
>>
>> 2012-11-05 22:21:45,603 INFO  [startup] Assembling app:
>> C:\Users\mikebyls\software\eclipse\default\bob.ejb\1.0\jar
>> 2012-11-05 22:21:45,619 INFO  [startup] Jndi(name=TestEJBLocal) -->
>> Ejb(deployment-id=bob.ejb.jar/TestEJB)
>> 2012-11-05 22:21:45,619 INFO  [startup]
>> Jndi(name=global/bob.ejb/TestEJB!bob.ejb.TestEJBLocal) -->
>> Ejb(deployment-id=bob.ejb.jar/TestEJB)
>> 2012-11-05 22:21:45,619 INFO  [startup] Jndi(name=TestEJBRemote) -->
>> Ejb(deployment-id=bob.ejb.jar/TestEJB)
>> 2012-11-05 22:21:45,619 INFO  [startup]
>> Jndi(name=global/bob.ejb/TestEJB!bob.ejb.TestEJBRemote) -->
>> Ejb(deployment-id=bob.ejb.jar/TestEJB)
>> 2012-11-05 22:21:45,619 INFO  [startup] Jndi(name=global/bob.ejb/TestEJB)
>> --> Ejb(deployment-id=bob.ejb.jar/TestEJB)
>>
>> My bob.web deployment is:-
>> http://geronimo.apache.org/xml/ns/j2ee/application-2.0"; xmlns:bp="
>> http://www.osgi.org/xmlns/blueprint/v1.0.0"; xmlns:client="
>> http://geronimo.apache.org/xml/ns/j2ee/application-client-2.0";
>> xmlns:conn="http://geronimo.apache.org/xml/ns/j2ee/connector-1.2";
>> xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2"; xmlns:ejb="
>> http://openejb.apache.org/xml/ns/openejb-jar-2.2"; xmlns:jaspi="
>> http://geronimo.apache.org/xml/ns/geronimo-jaspi"; xmlns:log="
>> http://geronimo.apache.org/xml/ns/loginconfig-2.0"; xmlns:name="
>> http://geronimo.apache.org/xml/ns/naming-1.2"; xmlns:pers="
>> http://java.sun.com/xml/ns/persistence"; xmlns:pkgen="
>> http://openejb.apache.org/xml/ns/pkgen-2.1"; xmlns:sec="
>> http://geronimo.apache.org/xml/ns/security-2.0"; xmlns:web="
>> http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1";>
>> 
>> 
>> default
>> bob.web
>> 1.0
>> car
>> 
>> 
>> 
>> default
>> bob.ejb
>> 1.0
>> jar
>> 
>> 
>>

Re: Geronimo, Wink and JNDI

2012-11-06 Thread Ivan
If the ejb jar is packaged in the same ear, could you try whether the
configuration below works for you :


ejb/**TestEJB
bob.ejb#TestEJB


2012/11/6 Michael Baylis 

> Hi Folks,
> Help!!!
>
> Whenever I start to use Wink with EJBs I always seem to get totally
> confused wth JNDI lookups,  please could you resolve this once and for all
> for me.
>
> I have a restful service that would like to do a call to an EJB.   I have
> tried many combinations, but the following is what I have pieced together
> from the docs:-
>
> I am using Geronimo 3.0.0, and as I understand it EJB injection does not
> work in Wink (in Geronimo or IBM WAS 8.0) as the service class is loaded
> but the rest servlet, so I have to use a jndi lookup:-
>
> bob.ear has bob.web, the restful service.
> bob.ejb is seperate (but I would like it in the ear).
>
> bob.ejb has TestEJB with a @Remote and @Local which results in:-
>
> 2012-11-05 22:21:45,603 INFO  [startup] Assembling app:
> C:\Users\mikebyls\software\**eclipse\default\bob.ejb\1.0\**jar
> 2012-11-05 22:21:45,619 INFO  [startup] Jndi(name=TestEJBLocal) -->
> Ejb(deployment-id=bob.ejb.jar/**TestEJB)
> 2012-11-05 22:21:45,619 INFO  [startup] 
> Jndi(name=global/bob.ejb/**TestEJB!bob.ejb.TestEJBLocal)
> --> Ejb(deployment-id=bob.ejb.jar/**TestEJB)
> 2012-11-05 22:21:45,619 INFO  [startup] Jndi(name=TestEJBRemote) -->
> Ejb(deployment-id=bob.ejb.jar/**TestEJB)
> 2012-11-05 22:21:45,619 INFO  [startup] 
> Jndi(name=global/bob.ejb/**TestEJB!bob.ejb.TestEJBRemote)
> --> Ejb(deployment-id=bob.ejb.jar/**TestEJB)
> 2012-11-05 22:21:45,619 INFO  [startup] Jndi(name=global/bob.ejb/**TestEJB)
> --> Ejb(deployment-id=bob.ejb.jar/**TestEJB)
>
> My bob.web deployment is:-
> http://geronimo.**apache.org/xml/ns/j2ee/**
> application-2.0 <http://geronimo.apache.org/xml/ns/j2ee/application-2.0>"
> xmlns:bp="http://www.osgi.org/**xmlns/blueprint/v1.0.0<http://www.osgi.org/xmlns/blueprint/v1.0.0>"
> xmlns:client="http://geronimo.**apache.org/xml/ns/j2ee/**
> application-client-2.0<http://geronimo.apache.org/xml/ns/j2ee/application-client-2.0>"
> xmlns:conn="http://geronimo.**apache.org/xml/ns/j2ee/**connector-1.2<http://geronimo.apache.org/xml/ns/j2ee/connector-1.2>"
> xmlns:dep="http://geronimo.**apache.org/xml/ns/deployment-**1.2<http://geronimo.apache.org/xml/ns/deployment-1.2>"
> xmlns:ejb="http://openejb.**apache.org/xml/ns/openejb-jar-**2.2<http://openejb.apache.org/xml/ns/openejb-jar-2.2>"
> xmlns:jaspi="http://geronimo.**apache.org/xml/ns/geronimo-**jaspi<http://geronimo.apache.org/xml/ns/geronimo-jaspi>"
> xmlns:log="http://geronimo.**apache.org/xml/ns/loginconfig-**2.0<http://geronimo.apache.org/xml/ns/loginconfig-2.0>"
> xmlns:name="http://geronimo.**apache.org/xml/ns/naming-1.2<http://geronimo.apache.org/xml/ns/naming-1.2>"
> xmlns:pers="http://java.sun.**com/xml/ns/persistence<http://java.sun.com/xml/ns/persistence>"
> xmlns:pkgen="http://openejb.**apache.org/xml/ns/pkgen-2.1<http://openejb.apache.org/xml/ns/pkgen-2.1>"
> xmlns:sec="http://geronimo.**apache.org/xml/ns/security-2.0<http://geronimo.apache.org/xml/ns/security-2.0>
> **" 
> xmlns:web="http://geronimo.**apache.org/xml/ns/j2ee/web-2.**0.1<http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1>
> ">
> 
> 
> default
> bob.web
> 1.0
> car
> 
> 
> 
> default
> bob.ejb
> 1.0
> jar
> 
> 
> 
> /bob
> 
> ejb/TestEJB
> TestEJBRemote
> 
> 
>
>
> My Test Restful service is:-
>
> @Path("test")
> public class Test1 {
>
> @GET
> @Produces(MediaType.TEXT_**PLAIN)
> public String get() throws NamingException {
>
> InitialContext ic = new InitialContext();
>
> Object x = ic.lookup("java:comp/env/ejb/**TestEJB");
>
> return "boo";
> }
>
> }
>
>
> I have tried allsorts of combinations with the name, with the ejb in the
> same ear,  using local and remote interfaces, etc.   Ive googled, but cant
> seem to find a combination that willwork.
> I have also tried different "TestEJBRemote<**/name:ejb-link>"
> names.
>
> Please put me out of my misery.
>
> Would it be possible to give me a solution that would work with the EJB
> module in the same EAR as the WEB module please.
>
> Regards,
>
> Michael
>



-- 
Ivan


Re: Servlet class not found for a REST application in OSGi bundle

2012-11-03 Thread Ivan
Think that you are using WAB ? If does, it is required to add all the
required import-packages, including the one used in web.xml org.apache.**
wink.server.internal.servlet. Geronimo will only generate import-packages
for WAR, not for WAB, as WAB has already been a bundle.

2012/11/4 Michael Baylis 

> Hi,
> I'm getting the following error when trying to use REST (WINK) within
> a OSGi bundle:-
>
> org.apache.geronimo.common.**DeploymentException: Fail to load servlet
> class
> at org.apache.geronimo.web25.**deployment.merge.annotation.**
> ServletSecurityAnnotationMerge**Handler.**postProcessWebXmlElement(**
> ServletSecurityAnnotationMerge**Handler.java:79)
> at org.apache.geronimo.web25.**deployment.merge.MergeHelper.**
> processWebFragmentsAndAnnotati**ons(MergeHelper.java:418)
> at org.apache.geronimo.web25.**deployment.**AbstractWebModuleBuilder.*
> *basicInitContext(**AbstractWebModuleBuilder.java:**493)
> at org.apache.geronimo.web25.**deployment.**AbstractWebModuleBuilder.*
> *initContext(**AbstractWebModuleBuilder.java:**436)
> at org.apache.geronimo.osgi.web.**extender.WebApplication.doRun(**
> WebApplication.java:213)
> at org.apache.geronimo.osgi.web.**extender.WebApplication.run(**
> WebApplication.java:125)
> at java.util.concurrent.**Executors$RunnableAdapter.**call(Unknown
> Source)
> at java.util.concurrent.**FutureTask$Sync.innerRun(**Unknown Source)
> at java.util.concurrent.**FutureTask.run(Unknown Source)
> at java.util.concurrent.**ThreadPoolExecutor.runWorker(**Unknown
> Source)
> at java.util.concurrent.**ThreadPoolExecutor$Worker.run(**Unknown
> Source)
> at java.lang.Thread.run(Unknown Source)
> Caused by: java.lang.**ClassNotFoundException: org.apache.wink.server.**
> internal.servlet.RestServlet
> at org.eclipse.osgi.internal.**loader.BundleLoader.**
> findClassInternal(**BundleLoader.java:513)
> at org.eclipse.osgi.internal.**loader.BundleLoader.findClass(**
> BundleLoader.java:429)
> at org.eclipse.osgi.internal.**loader.BundleLoader.findClass(**
> BundleLoader.java:417)
> at org.apache.geronimo.hook.**equinox.GeronimoClassLoader.**
> loadClass(GeronimoClassLoader.**java:85)
> at java.lang.ClassLoader.**loadClass(Unknown Source)
> at org.eclipse.osgi.internal.**loader.BundleLoader.loadClass(**
> BundleLoader.java:345)
> at org.eclipse.osgi.framework.**internal.core.BundleHost.**
> loadClass(BundleHost.java:229)
> at org.eclipse.osgi.framework.**internal.core.AbstractBundle.**
> loadClass(AbstractBundle.java:**1207)
> at org.apache.geronimo.web25.**deployment.merge.annotation.**
> ServletSecurityAnnotationMerge**Handler.**postProcessWebXmlElement(**
> ServletSecurityAnnotationMerge**Handler.java:52)
> ... 11 more
>
> This is my MANIFEST.MF:-
> Manifest-Version: 1.0
> Bundle-ManifestVersion: 2
> Bundle-Name: xxx.web
> Bundle-SymbolicName: xxx.web
> Bundle-Version: 0.1.0.qualifier
> Bundle-ClassPath: WEB-INF/classes
> Bundle-**RequiredExecutionEnvironment: JavaSE-1.7
> Web-ContextPath: /ha
> Import-Package: javax.el;version="2.0";**resolution:=optional,
>  javax.servlet;version="2.5",
>  javax.servlet.annotation;**resolution:=optional,
>  javax.servlet.http;version="2.**5",
>  javax.servlet.jsp;version="2.**0",
>  javax.servlet.jsp.el;version="**2.0",
>  javax.servlet.jsp.tagext;**version="2.0",
>  javax.ws.rs;version="1.1.0"
>
> My web.xml:-
>
> 
>  xmlns:xsi="http://www.w3.org/**2001/XMLSchema-instance<http://www.w3.org/2001/XMLSchema-instance>"
> xmlns="http://java.sun.com/**xml/ns/javaee<http://java.sun.com/xml/ns/javaee>"
> xmlns:web="http://java.sun.**com/xml/ns/javaee/web-app_2_5.**xsd<http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd>"
> xsi:schemaLocation="http://**java.sun.com/xml/ns/javaee<http://java.sun.com/xml/ns/javaee>
> http://java.sun.com/xml/ns/**javaee/web-app_3_0.xsd<http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd>"
> version="3.0">
>   xxx.web
>   
> JAX-RS Tools Generated - Do not modify
> JAX-RS Servlet
> org.apache.**wink.server.internal.servlet.**
> RestServlet
>   
> javax.ws.rs.**Application
> xxx.**RestApplication
>   
>     1
>   
>   
> JAX-RS Servlet
> /rest/*
>   
> 
>
> I have no other setup files.  I am using the full profile Geronimo 3.0.0
> release.
>
> Does anyone know what I have missed?   I have not included the wink jars
> in the project lib, as I want to use the one installed in the server and I
> want the benefit on injection.
>
> Google and forum searches have drawn a blank  :-(
>
> Thank you,
>
> Michael
>



-- 
Ivan


Re: ejb webservices

2012-10-12 Thread Ivan
va.lang.Class.privateGetDeclaredMethods(Class.java:2427)
> at java.lang.Class.getMethod0(Class.java:2670)
> at java.lang.Class.getMethod(Class.java:1603)
> at
> com.sun.xml.ws.model.RuntimeModeler.processMethod(RuntimeModeler.java:508)
> at
> com.sun.xml.ws.model.RuntimeModeler.processClass(RuntimeModeler.java:366)
> at
>
> com.sun.xml.ws.model.RuntimeModeler.buildRuntimeModel(RuntimeModeler.java:246)
> at
> com.sun.tools.ws.wscompile.WsgenTool.buildModel(WsgenTool.java:247)
> at com.sun.tools.ws.wscompile.WsgenTool.run(WsgenTool.java:126)
> at
>
> com.sun.tools.ws.util.WSToolsObjectFactoryImpl.wsgen(WSToolsObjectFactoryImpl.java:66)
> at
>
> com.sun.tools.ws.spi.WSToolsObjectFactory.wsgen(WSToolsObjectFactory.java:112)
> ... 30 more
> Caused by: java.lang.ClassNotFoundException:
> org.asteriskjava.manager.ManagerEventListener
> at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
> ... 41 more
>
>
>
>
> --
> View this message in context:
> http://apache-geronimo.328035.n3.nabble.com/ejb-webservices-tp3985903.html
> Sent from the Users mailing list archive at Nabble.com.
>



-- 
Ivan


Re: OSGi Bundle Permissions on Geronimo

2012-09-02 Thread Ivan
I am not sure whether OSGi security could help on this.  But with the
Bundle Hook Service API introduced in v4.3, it is possible to limit/filter
the result of those methods, like getBundles(), and etc.

There are also other new APIs, which could be used to filter the services
and other things. You may refer to the OSGi v4.3 core spec.

2012/8/30 JAEBOO JUNG 

> I am about to make a enterprise cloud OSGi web-service by using Apache
> Geronimo V3.0.
>
> The final goal is to make custom BundleManager(maybe it is a bundle too)
> that can do simple bundle action like install/uninstall/start/stop the
> other bundles from any users.
>
> Each bundle is WAB(web application bundle) and will be added in some
> Application Bundle.
>
> But I encounter some critical problems which can cause security issues.***
> *
>
> ** **
>
> 1. Although only BundleManager I want to make can manage the bundle's
> lifecycle by using BundleContext , but any bundles made by some users can
> use BundleContext in Activator or any  servlet in their bundles. So, for
> example, Bundle A(from user1) can get Bundle B(from user2) from
> BundleContext and Bundle A can stop or uninstall Bundle B with no
> permission though Bundle A is not BundleManager..
>
> ** **
>
> 2. I used to run java security manager and manipulate its(Bundle A)
> permission. but it didn't properly work. Besides I can access Geronimo Web
> Admin console with no login process . I think that allpermission in the
> policy file cause this situation.
>
> ** **
>
> How can I achieve my goal. I heard that Composite bundle can isolate
> bundles, but Geronimo didn't support Composite Bundle(CBA). I really wait
> and appreciate all ideas. Thanks for all your help in advance :)
>



-- 
Ivan


Re: EARConfigBuilder : Unable to delete files

2012-08-29 Thread Ivan
That is interesting ;-) Did you remove some unrequired jar files or just
combine some jar files into one file ? If removing unrequired jar files,
could you give an example of the removed jar file name ?

2012/8/29 Jer 

> Thanx for your time Ivan.
> I've made several complemantary tests.
>
> I try to deploy it derectly in Geronimo (on Windows7 64,my computer, and on
> a CentOS5 Server) : same error.
> Try to rebuild a new webapp (from HelloWorld sample : no mode simple). OK
> deployed and started.
> Adding the 106 jars to HelloWorld Webapp in WEBINF/lib : same error than
> before.
> Decrease number of jars to 50 (approximatively I didn't note the exact
> figure) : same error
> Decrease number of jars to 20 : OK. No error.
>
> So it seems to be linked to the number of jars.
> Thx for your help.
>
> Jerome
>
>
>
>
>
> --
> View this message in context:
> http://apache-geronimo.328035.n3.nabble.com/EARConfigBuilder-Unable-to-delete-files-tp3985662p3985668.html
> Sent from the Users mailing list archive at Nabble.com.
>



-- 
Ivan


Re: EARConfigBuilder : Unable to delete files

2012-08-29 Thread Ivan
Guess the file is still locked somewhere, Geronimo is trying its best to
close those jar files, e.g. in classloader. There may be a leaking in the
Geronimo or in your application codes.
Usually, I will generate a dump file and check who references that JarFile.

So while deploying that application with admin console or command line,
could you see this issue, too ? Just wonder whether Geronimo Plugin does
anything wrong.

2012/8/29 Jer 

> Hi,
>
> Sorry for inconveniance but I stuck into this error. I just try to start an
> enterprise application (just a webapp in it for the moment) from Eclipse
> using the plugin and get :
>
> Geronimo Application Server started
> 2012-08-28 18:07:08,143 WARN  [EARConfigBuilder] Unable to delete 105 files
> while recursively deleting directory
>
> C:\AppPortables\geronimo-tomcat6-javaee5-2.2.1\repository\default\AMandat\1.0\AMandat-1.0.car
> The first file that could not be deleted was:
>
>
> C:\AppPortables\geronimo-tomcat6-javaee5-2.2.1\repository\default\AMandat\1.0\AMandat-1.0.car\WebMandat.war\WEB-INF\lib\acegi-security-tiger-0.9.0.jar
>
> I try to erase my Geronimo installation and replace it by a fresh install
> but same result. (same with eclipse and workspace)
>
> My configuration is :
> - Geronimo 2.2.1
> - Eclipse Helios, pugin install from it like specified in documentation.
>
> Thanx for your help.
> Regards,
>
> Jerome
>
>
>
>
> --
> View this message in context:
> http://apache-geronimo.328035.n3.nabble.com/EARConfigBuilder-Unable-to-delete-files-tp3985662.html
> Sent from the Users mailing list archive at Nabble.com.
>



-- 
Ivan


Re: Using @EJB annotation instead of looking up for EJB

2012-06-26 Thread Ivan
Hi, just have a close look at your sample application, with the changes
below, I could invoke the application client and the @EJB also works.

a. Add Class-Path: HRManager-EJB.jar in the MANIFEST.MF file in the client
application

>From the spec side, client application may have access to other components
in the same EAR application, that is not must. The changes above is just to
make sure that it could see the classes from the EJB application. Another
possible solution is to add those ejb client API in the client application
file.

b. Update the client deployment plan with below, the server-environment
does NOT mean the dependency configuration, think you could find more
description for that in the wiki.

--->


HRManager
client-server
1.0
car



2012/6/26 Forrest Xia 

>
>
> On Mon, Jun 25, 2012 at 1:34 PM, nemesis_sun wrote:
>
>> Hi Forrest,
>>
>> I couldn't find an example in the given link on how to use @EJB instead of
>> InitialContext.lookup()
>> The client there still uses lookup() to get EJB.
>>
> Just made some updates to bank sample in the 3.0 branch ->
> https://svn.apache.org/repos/asf/geronimo/samples/branches/3.0/samples/javaee5/bank/
>
> You can compile it and run against 3.0.0-SNAPSHOT build, for app client
> run, just execute a command like this:
> $GEORNIMO_HOME/bin/client
> org.apache.geronimo.samples.javaee5/bank-tomcat_bank-client-3.0.0-SNAPSHOT.jar/3.0.0-SNAPSHOT/car
>
>
>>
>> --
>> View this message in context:
>> http://apache-geronimo.328035.n3.nabble.com/Using-EJB-annotation-instead-of-looking-up-for-EJB-tp3985253p3985255.html
>> Sent from the Users mailing list archive at Nabble.com.
>>
>
>
>
> --
> Thanks!
>
> Regards, Forrest
>
>


-- 
Ivan


Re: JSF Dependencies

2012-06-18 Thread Ivan
Yes, ;-)

2012/6/19 Russell Collins 

>  Ok.  I think I understand what you are saying. So in order for this to
> work, I need a Primefaces assembly that uses JSF 2.0 instead of JSF 2.1?
> Example, instead of using Primefaces 3.3.1 that uses JSF 2.1  I need to use
> Primefaces2.x or whatever that uses JSF 2.0?
>
>
> On 06/18/2012 11:06 PM, Ivan wrote:
>
> Right, as we found that JSF API and its implementation may not work
> correctly if we separate them as two bundles, so finally we bundle them in
> one jar file, and Geronimo now uses 2.0.9.1, which means the api version is
> 2.0.*
>
> 2012/6/19 Forrest Xia 
>
>> You need to rebundle org.primefaces_3.3.1 to make it depends on
>> javax.faces <= 2.0, otherwise, you need to figure out how to run JSF 2.1
>> impl of myfaces in the geronimo first, then use your application by
>> depending on it.
>>
>> For JSF 2.1 impl of myfaces, refer to the open jira GERONIMO-6267, it's
>> currently not supported by Geronimo.
>>
>>
>> On Tue, Jun 19, 2012 at 10:06 AM, Russell Collins <
>> collins-soluti...@austin.rr.com> wrote:
>>
>>>  Ok maybe I need to explain a little better.  Primefaces is basically a
>>> component library that sits on top of a JSF implementation similar to
>>> Apache MyFaces Tomahawk.  In Geronimo, the JSF implementation is MyFaces.
>>> Primefaces would not work at all if it did not have a JSF implementation
>>> (MyFaces, Mojorra).
>>>
>>> I have installed the Primefaces jar file in Geronimo successfully.  I am
>>> now just trying to references this component library that has already been
>>> installed.  I hope that clears up what I am trying to do.
>>>
>>> On 06/18/2012 08:28 PM, Ivan wrote:
>>>
>>> Currently, with Geronimo 3.0-beta, the version shipped from MyFaces is
>>> 2.0.9.1, so it could not match the requirement for primefaces [2.1.0,3.0.0)
>>>
>>> 2012/6/19 Russell Collins 
>>>
>>>>  I am trying to add Primefaces to the Geronimo Installation and then
>>>> reference that Primefaces Jar in my war file.  However, when I do this, I
>>>> get an error that says
>>>>
>>>> org.osgi.framework.BundleException: The bundle "org.primefaces_3.3.1
>>>> [377]" could not be resolved. Reason: Missing Constraint: Import-Package:
>>>> javax.faces; version="[2.1.0,3.0.0)"
>>>>
>>>> My geronimo-web.xml file looks like this.
>>>>
>>>>
>>>> 
>>>> http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1";>
>>>> http://geronimo.apache.org/xml/ns/deployment-1.2";>
>>>> 
>>>> com.acc
>>>> acc-web
>>>> 1.0-SNAPSHOT
>>>> war
>>>> 
>>>> 
>>>> 
>>>> org.apache.geronimo.bundles
>>>>     myfaces-bundle
>>>> 2.0.9_1
>>>> jar
>>>> 
>>>> 
>>>> org.primefaces
>>>> primefaces
>>>> 3.3.1
>>>> jar
>>>> 
>>>> 
>>>> 
>>>> acc
>>>> 
>>>>
>>>> The assembly has been installed successfully.  What am I missing?  I
>>>> would really like to include the JSF implementation library with the
>>>> Geronimo install as opposed to having to include it in my .war file.
>>>>
>>>> Thank you
>>>>
>>>> --
>>>>
>>>> Russell
>>>>
>>>>
>>>
>>>
>>>  --
>>> Ivan
>>>
>>>
>>>
>>>   --
>>>
>>> Russell collinscollins-soluti...@austin.rr.com
>>>
>>>
>>
>>
>>  --
>> Thanks!
>>
>> Regards, Forrest
>>
>>
>
>
>  --
> Ivan
>
>
>
> --
>
> Russell collinscollins-soluti...@austin.rr.com
>
>


-- 
Ivan


Re: JSF Dependencies

2012-06-18 Thread Ivan
Right, as we found that JSF API and its implementation may not work
correctly if we separate them as two bundles, so finally we bundle them in
one jar file, and Geronimo now uses 2.0.9.1, which means the api version is
2.0.*

2012/6/19 Forrest Xia 

> You need to rebundle org.primefaces_3.3.1 to make it depends on
> javax.faces <= 2.0, otherwise, you need to figure out how to run JSF 2.1
> impl of myfaces in the geronimo first, then use your application by
> depending on it.
>
> For JSF 2.1 impl of myfaces, refer to the open jira GERONIMO-6267, it's
> currently not supported by Geronimo.
>
>
> On Tue, Jun 19, 2012 at 10:06 AM, Russell Collins <
> collins-soluti...@austin.rr.com> wrote:
>
>>  Ok maybe I need to explain a little better.  Primefaces is basically a
>> component library that sits on top of a JSF implementation similar to
>> Apache MyFaces Tomahawk.  In Geronimo, the JSF implementation is MyFaces.
>> Primefaces would not work at all if it did not have a JSF implementation
>> (MyFaces, Mojorra).
>>
>> I have installed the Primefaces jar file in Geronimo successfully.  I am
>> now just trying to references this component library that has already been
>> installed.  I hope that clears up what I am trying to do.
>>
>> On 06/18/2012 08:28 PM, Ivan wrote:
>>
>> Currently, with Geronimo 3.0-beta, the version shipped from MyFaces is
>> 2.0.9.1, so it could not match the requirement for primefaces [2.1.0,3.0.0)
>>
>> 2012/6/19 Russell Collins 
>>
>>>  I am trying to add Primefaces to the Geronimo Installation and then
>>> reference that Primefaces Jar in my war file.  However, when I do this, I
>>> get an error that says
>>>
>>> org.osgi.framework.BundleException: The bundle "org.primefaces_3.3.1
>>> [377]" could not be resolved. Reason: Missing Constraint: Import-Package:
>>> javax.faces; version="[2.1.0,3.0.0)"
>>>
>>> My geronimo-web.xml file looks like this.
>>>
>>>
>>> 
>>> http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1";>
>>> http://geronimo.apache.org/xml/ns/deployment-1.2";>
>>> 
>>> com.acc
>>> acc-web
>>> 1.0-SNAPSHOT
>>> war
>>> 
>>> 
>>> 
>>> org.apache.geronimo.bundles
>>> myfaces-bundle
>>> 2.0.9_1
>>> jar
>>> 
>>> 
>>> org.primefaces
>>> primefaces
>>> 3.3.1
>>> jar
>>> 
>>> 
>>> 
>>> acc
>>> 
>>>
>>> The assembly has been installed successfully.  What am I missing?  I
>>> would really like to include the JSF implementation library with the
>>> Geronimo install as opposed to having to include it in my .war file.
>>>
>>> Thank you
>>>
>>> --
>>>
>>> Russell
>>>
>>>
>>
>>
>>  --
>> Ivan
>>
>>
>>
>> --
>>
>> Russell collinscollins-soluti...@austin.rr.com
>>
>>
>
>
> --
> Thanks!
>
> Regards, Forrest
>
>


-- 
Ivan


Re: JSF Dependencies

2012-06-18 Thread Ivan
Currently, with Geronimo 3.0-beta, the version shipped from MyFaces is
2.0.9.1, so it could not match the requirement for primefaces [2.1.0,3.0.0)

2012/6/19 Russell Collins 

>  I am trying to add Primefaces to the Geronimo Installation and then
> reference that Primefaces Jar in my war file.  However, when I do this, I
> get an error that says
>
> org.osgi.framework.BundleException: The bundle "org.primefaces_3.3.1
> [377]" could not be resolved. Reason: Missing Constraint: Import-Package:
> javax.faces; version="[2.1.0,3.0.0)"
>
> My geronimo-web.xml file looks like this.
>
>
> 
> http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1";>
> http://geronimo.apache.org/xml/ns/deployment-1.2";>
> 
> com.acc
> acc-web
> 1.0-SNAPSHOT
> war
> 
> 
> 
> org.apache.geronimo.bundles
> myfaces-bundle
> 2.0.9_1
> jar
> 
> 
> org.primefaces
> primefaces
> 3.3.1
> jar
> 
> 
> 
> acc
> 
>
> The assembly has been installed successfully.  What am I missing?  I would
> really like to include the JSF implementation library with the Geronimo
> install as opposed to having to include it in my .war file.
>
> Thank you
>
> --
>
> Russell
>
>


-- 
Ivan


Re: ISSUE: Root context puts double backslash "//" in urls

2012-06-05 Thread Ivan
This is a known issue, and has been fixed in
https://issues.apache.org/jira/browse/GERONIMO-6171. The changes will be
included in the next version.

2012/6/5 gqmulligan 

>
> gary wrote
> >
> > Sorry, one point should be corrected in my latest reply. Stop  the
> > component "org.apache.geronimo.configs/welcome-tomcat/2.2.1/car" is
> enough
> > before deploying your application.
> >
>
> That is the guide I actually followed.  I verified that the welcome-tomcat
> component is stopped.  When I go to my domain root I see my application
> which also verifies this.  However, I still have the double slashes when
> navigating my application.  The contextPath is returning a "/" when it
> seems
> like it should be returning the empty string.
>
> --
> View this message in context:
> http://apache-geronimo.328035.n3.nabble.com/ISSUE-Root-context-puts-double-backslash-in-urls-tp3985029p3985039.html
> Sent from the Users mailing list archive at Nabble.com.
>



-- 
Ivan


Re: Exceptions while deploying the war file

2012-05-24 Thread Ivan
 1|  at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFil
> ter(ApplicationFilterChain.java:290)
> jvm 1|  at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(Appl
> icationFilterChain.java:206)
> jvm 1|  at
> org.apache.catalina.core.ApplicationDispatcher.invoke(Applica
> tionDispatcher.java:654)
> jvm 1|  at
> org.apache.catalina.core.ApplicationDispatcher.doInclude(Appl
> icationDispatcher.java:557)
> jvm 1|  at
> org.apache.catalina.core.ApplicationDispatcher.include(Applic
> ationDispatcher.java:481)
> jvm 1|  at
> org.apache.pluto.invoker.impl.PortletInvokerImpl.invoke(Portl
> etInvokerImpl.java:120)
> jvm 1|  at
> org.apache.pluto.invoker.impl.PortletInvokerImpl.action(Portl
> etInvokerImpl.java:68)
> jvm 1|  at
> org.apache.pluto.PortletContainerImpl.processPortletAction(Po
> rtletContainerImpl.java:164)
> jvm 1|  at
> org.apache.pluto.portalImpl.core.PortletContainerWrapperImpl.
> processPortletAction(PortletContainerWrapperImpl.java:82)
> jvm 1|  at
> org.apache.pluto.portalImpl.Servlet.doGet(Servlet.java:227)
> jvm 1|  at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:693)
> jvm 1|  at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
> jvm 1|  at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFil
> ter(ApplicationFilterChain.java:290)
> jvm 1|  at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(Appl
> icationFilterChain.java:206)
> jvm 1|  at
> org.apache.catalina.core.StandardWrapperValve.invoke(Standard
> WrapperValve.java:230)
> jvm 1|  at
> org.apache.catalina.core.StandardContextValve.invoke(Standard
> ContextValve.java:175)
> jvm 1|  at
> org.apache.geronimo.tomcat.valve.DefaultSubjectValve.invoke(D
> efaultSubjectValve.java:56)
> jvm 1|  at
> org.apache.catalina.authenticator.AuthenticatorBase.invoke(Au
> thenticatorBase.java:525)
> jvm 1|  at
> org.apache.geronimo.tomcat.GeronimoStandardContext$SystemMeth
> odValve.invoke(GeronimoStandardContext.java:353)
> jvm 1|  at
> org.apache.geronimo.tomcat.valve.GeronimoBeforeAfterValve.inv
> oke(GeronimoBeforeAfterValve.java:47)
> jvm 1|  at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHos
> tValve.java:128)
> jvm 1|  at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorRepor
> tValve.java:104)
> jvm 1|  at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardE
> ngineValve.java:109)
> jvm 1|  at
> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogVal
> ve.java:563)
> jvm 1|  at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAda
> pter.java:261)
> jvm 1|  at
> org.apache.coyote.http11.Http11Processor.process(Http11Proces
> sor.java:844)
> jvm 1|  at
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandl
> er.process(Http11Protocol.java:581)
> jvm 1|  at
> org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint
> .java:447)
> jvm 1|  at java.lang.Thread.run(Thread.java:619)
> jvm 1| Caused by:
> org.apache.geronimo.kernel.config.InvalidConfigException:
> Unknown start exception
> jvm 1|  at
> org.apache.geronimo.kernel.config.ConfigurationUtil.startConf
> igurationGBeans(ConfigurationUtil.java:514)
> jvm 1|  at
> org.apache.geronimo.kernel.config.KernelConfigurationManager.
> start(KernelConfigurationManager.java:187)
> jvm 1|  at
> org.apache.geronimo.kernel.config.SimpleConfigurationManager.
> startConfiguration(SimpleConfigurationManager.java:530)
> jvm 1|  ... 45 more
> jvm 1| Caused by:
> org.apache.geronimo.gbean.InvalidConfigurationException: C
> onfiguration default/JSPProject/1.0/war failed to start due to the
> following rea
> sons:
> jvm 1|   The service
> J2EEApplication=null,j2eeType=WebModule,name=default/JS
> PProject/1.0/war did not start because ContainerBase.addChild: start:
> LifecycleE
> xception:  java.io.IOException: Context did not start for an unknown reason
> jvm 1|
> jvm 1|  at
> org.apache.geronimo.kernel.config.ConfigurationUtil.startConf
> igurationGBeans(ConfigurationUtil.java:477)
> jvm 1|  ... 47 more
>
> I uploaded the deployment plan JSP.xml along with the JSPProject.war file
> from the console. I am not getting what's wrong with this.
>
> !!Thanks in Advance!!
>
> Regards,
> Saicharan
>



-- 
Ivan


Re: Geronino 3 beta Servlet issue

2012-04-17 Thread Ivan
>From the log files, it seems that javax.naming should be added in the
import-package list for the wab ?

2012/4/18 Michael Chau 

> I've created a SampleApi(interface), SampleServer(implementation) and
> SampleWeb(servlet) bundles.  It's using Blueprint.  I ran it in the Apache
> Aries container and it was fine.  I tried to run it in Geronimo and got
>
> 2012-04-17 14:44:52,759 ERROR [WebApplication] Unable to start web
> application for bundle sample-web
> java.lang.NoClassDefFoundError: Could not fully load class:
> com.sample.client.web.SampleServlet
>  due to:javax/naming/NamingException
>  in classLoader:
> org.apache.geronimo.hook.equinox.GeronimoClassLoader@10993991
> at org.apache.xbean.finder.ClassFinder.(ClassFinder.java:136)
> at
> org.apache.geronimo.web25.deployment.AbstractWebModuleBuilder.createWebAppClassFinder(
> AbstractWebModuleBuilder.java:663)
> at
> org.apache.geronimo.web25.deployment.AbstractWebModuleBuilder.configureBasicWebModuleAttributes(
> AbstractWebModuleBuilder.java:698)
> at org.apache.geronimo.tomcat.deployment.TomcatModuleBuilder.addGBeans(
> TomcatModuleBuilder.java:483)
> at org.apache.geronimo.osgi.web.extender.WebApplication.doRun(
> WebApplication.java:218)
> at org.apache.geronimo.osgi.web.extender.WebApplication.run(
> WebApplication.java:125)
> at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
> at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
> at java.util.concurrent.FutureTask.run(FutureTask.java:138)
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(
> ThreadPoolExecutor.java:886)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(
> ThreadPoolExecutor.java:908)
> at java.lang.Thread.run(Thread.java:680)
>
> Any help is appreciated.
>
> Michael
>



-- 
Ivan


Re: Geronimo v3 - ClassNotFoundException for class available in sharedlib

2012-04-09 Thread Ivan
Hmm, think I have fixed that in
https://issues.apache.org/jira/browse/GERONIMO-6254 Is it OK for you to
build that components by yourself, or I could provide the patched jar files
somewhere.


2012/4/9 Karthik Mailing 

> Hi Ivan,
>
> Thanks for your reply.
> I had already placed the jars in GERONIMO_HOME/var/shared/lib prior to
> starting Geronimo.
>
>
> Content of var/shared/META-INF:
> ---
> Manifest-Version: 1.0
> Bundle-ManifestVersion: 2
> Bundle-SymbolicName: org.apache.geronimo.configs.sharedlib.SharedLib
> Bundle-Version: 3.0.0.beta-1
> Bundle-ClassPath: classes,lib/hsql.jar,lib/jtds.jar,lib/mysql.jar,lib/
>  portal-service.jar,lib/portlet.jar,lib/postgresql.jar
> Import-Package: org.apache.geronimo.kernel.osgi,org.apache.geronimo.sy
>  stem.sharedlib,org.osgi.framework,org.apache.geronimo.gbean,org.apach
>  e.geronimo.system.serverinfo
>
> The jar names are all correct and no jars have been missed in the above
> list. The  class that could not be found is actually in portal-service.jar.
>
> Karthik
>
>
> On Mon, Apr 9, 2012 at 9:38 AM, Ivan  wrote:
>
>> The configurations look fine to me, after copying those jar files in the
>> var/shared library, do you restart the server ?
>> Could you show me the content of the file var\shared\META-INF/MANIFEST.MF
>> file ?
>>
>>
>> 2012/4/9 kshiraly 
>>
>>> Hi,
>>>
>>> I'm trying to deploy a WAR file in Geronimo v3 JavaEE6 web profile
>>> release
>>> (geronimo-tomcat7-javaee6-3.0-beta-1).
>>> The WAR file's descriptors contain references to JAAS related classes
>>> (roles, principals, login modules) which are available in a JAR file in
>>> GERONIMO_HOME/var/shared/lib.
>>>
>>> This same configuration works in a Geronimo 2.2.1 installation, but shows
>>> the following exception and stack trace in v3 when I copy the WAR file
>>> into
>>> Geronimo's hot deployment directory (GERONIMO_HOME/deploy):
>>>
>>>
>>> =
>>> [Loaded org.apache.geronimo.xbeans.geronimo.security.impl.GerRoleTypeImpl
>>> from
>>>
>>> file:/D:/developer/geronimo/geronimo-tomcat7-javaee6-3.0-beta-1/var/cache/org.eclipse.osgi/bundles/124/1/bundlefile]
>>> [Loaded org.apache.geronimo.xbeans.geronimo.security.GerPrincipalType
>>> from
>>>
>>> file:/D:/developer/geronimo/geronimo-tomcat7-javaee6-3.0-beta-1/var/cache/org.eclipse.osgi/bundles/124/1/bundlefile]
>>> [Loaded
>>> org.apache.geronimo.xbeans.geronimo.security.impl.GerPrincipalTypeImpl
>>> from
>>>
>>> file:/D:/developer/geronimo/geronimo-tomcat7-javaee6-3.0-beta-1/var/cache/org.eclipse.osgi/bundles/124/1/bundlefile]
>>> [Loaded org.apache.geronimo.security.util.ConfigurationUtil$1 from
>>>
>>> file:/D:/developer/geronimo/geronimo-tomcat7-javaee6-3.0-beta-1/var/cache/org.eclipse.osgi/bundles/87/1/bundlefile]
>>> java.security.PrivilegedActionException:
>>> java.lang.ClassNotFoundException:
>>> com.liferay.portal.kernel.security.jaas.PortalRole
>>>at java.security.AccessController.doPrivileged(Native Method)
>>>at
>>>
>>> org.apache.geronimo.security.util.ConfigurationUtil.generatePrincipal(ConfigurationUtil.java:77)
>>>at
>>>
>>> org.apache.geronimo.security.deployment.GeronimoSecurityBuilderImpl.buildPrincipal(GeronimoSecurityBuilderImpl.java:280)
>>>at
>>>
>>> org.apache.geronimo.security.deployment.GeronimoSecurityBuilderImpl.configureRoleMapper(GeronimoSecurityBuilderImpl.java:314)
>>>at
>>>
>>> org.apache.geronimo.security.deployment.GeronimoSecurityBuilderImpl.build(GeronimoSecurityBuilderImpl.java:184)
>>>at
>>>
>>> org.apache.geronimo.deployment.NamespaceDrivenBuilderCollection.build(NamespaceDrivenBuilderCollection.java:43)
>>>at
>>>
>>> org.apache.geronimo.web25.deployment.AbstractWebModuleBuilder.basicInitContext(AbstractWebModuleBuilder.java:496)
>>>at
>>>
>>> org.apache.geronimo.web25.deployment.AbstractWebModuleBuilder.initContext(AbstractWebModuleBuilder.java:436)
>>>at
>>>
>>> org.apache.geronimo.j2ee.deployment.SwitchingModuleBuilder.initContext(SwitchingModuleBuilder.java:168)
>>>at
>>>
>>> org.apache.geronimo.j2ee.deployment.EARConfigBuilder.buildConfiguration(EARConfigBuilder.java:685)
>>>at
>>> or

Re: Geronimo v3 - ClassNotFoundException for class available in sharedlib

2012-04-08 Thread Ivan
sLoader.java:248)
>at
>
> org.eclipse.osgi.internal.loader.BundleLoader.loadClass(BundleLoader.java:345)
>at
>
> org.eclipse.osgi.framework.internal.core.BundleHost.loadClass(BundleHost.java:229)
>at
>
> org.eclipse.osgi.framework.internal.core.AbstractBundle.loadClass(AbstractBundle.java:1207)
>at
>
> org.apache.geronimo.security.util.ConfigurationUtil$1.run(ConfigurationUtil.java:79)
>at
>
> org.apache.geronimo.security.util.ConfigurationUtil$1.run(ConfigurationUtil.java:77)
>... 23 more
>
>
> =
>
>
>
> *var/config/config.xml has entries for sharedlib:*
>
> name="org.apache.geronimo.configs/sharedlib-extender/3.0-beta-1/car"/>
>
>
>
> *WAR file's geronimo-web.xml:*
>
> 
>
> http://geronimo.apache.org/xml/ns/j2ee/web-1.1";>
>
>
>liferay
>liferay-portal
>6.1.0
>car
>
>
>
>
>  org.apache.geronimo.configs
>j2ee-server
>car
>
>
>
>  org.apache.geronimo.configs
>sharedlib
>car
>
>
>
>  org.apache.geronimo.framework
>j2ee-security
>car
>
>
>
>  org.apache.geronimo.framework
>rmi-naming
>car
>
>
>
>
>/
>PortalRealm
>
>
> class="com.liferay.portal.kernel.security.jaas.PortalPrincipal" />
>
>
>
> class="com.liferay.portal.kernel.security.jaas.PortalRole"
> name="users" />
>
>
>
> class="org.apache.geronimo.security.realm.GenericSecurityRealm">
>PortalRealm
>
>ServerInfo
>
>
>
> xmlns:log="http://geronimo.apache.org/xml/ns/loginconfig-2.0";>
> wrap-principals="false">
>
>  PortalRealm
>
>
> com.liferay.portal.security.jaas.ext.tomcat.PortalLoginModule
>
>
>
>
> 
>
> *Other information: *
> For the record, the WAR file I'm trying to deploy is liferay-portal.war.
> Liferay comes with a Geronimo bundle for Geronimo v2.2.1.
> I wanted to try out a similar deployment on Geronimo v3.
> A diff utility run on liferay+geronimo2.2.1 bundle and a normal
> geronimo2.2.1 download showed that Liferay has made only 2 additions - 1)
> Added all liferay WARs in /deploy 2) Added all shared JARs in
> /var/shared/lib. All other changes are disabling and removal of services
> like openejb which liferay does not use.
> The same deployment in Geronimo v3 throws ClassNotFoundException. Does the
> OSGI support in v3 require some additional configuration for sharedlib?
>
> Thanks
> kshiraly
>
> --
> View this message in context:
> http://apache-geronimo.328035.n3.nabble.com/Geronimo-v3-ClassNotFoundException-for-class-available-in-sharedlib-tp3895754p3895754.html
> Sent from the Users mailing list archive at Nabble.com.
>



-- 
Ivan


Re: mysql db pool and NoClassDefFoundError

2012-04-05 Thread Ivan
.pool.ThreadPool$ContextClassLoaderRunnable.run(ThreadPool.java:344)
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown
> Source)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown
> Source)
> at java.lang.Thread.run(Unknown Source)
>
>
>
> I really don't know what's going on.
> Well it's a "No Class Definition", but I cannot understand, the mysql
> connector (the jar I mentioned above) doesn't provide the tomcat jdbc
> DataSource class too?
>
> I am missing some basic connector-related concepts?
>
>
> --
> Michele.
>
> **
>
> AVVERTENZE: Il presente messaggio e/o i suoi allegati (di seguito il
> "messaggio") possono contenere informazioni privilegiate e/o confidenziali.
> Se non siete i destinatari indicati nel messaggio (o persona incaricata di
> inoltrare il messaggio al/i destinatario/i), non potete copiare o inoltrare
> il messaggio ad altri e siete invitati a distruggerlo dandone informazione
> al mittente a mezzo e-mail. Il contenuto del presente messaggio non deve
> essere considerato come trasmesso o autorizzato da Cabel. Cabel non si
> assume alcuna responsabilità per eventuali intercettazioni, modifiche o
> danneggiamenti del presente messaggio e-mail e per le eventuali conseguenze.
>
> DISCLAIMER: Privileged/Confidential Information may be contained in this
> message and in any of its attachments (the "message"). If you are not the
> addressee indicated in this message (or responsible for delivery of the
> message to such person), you may not copy or deliver this message to
> anyone. In such case, you should destroy this message and kindly notify the
> sender by reply e-mail. The contents of this message shall be understood as
> neither given nor endorsed by Cabel. Cabel does not accept liability for
> corruption, interception or amendment, if any, or the consequences thereof.
>



-- 
Ivan


Re: OSGi Blueprint Web App Example

2012-04-02 Thread Ivan
You may need to provide more information for the failure, is there any
failure message in the log ?

2012/4/3 Michael Chau 

> Hi,
>
> I'm having trouble getting a sample Web App that using OSGi blueprint
> service to run.  I basically used the HelloWorld application example.
>  Instead of doing it as an application, I created a web app.  Geronimo
> keeps giving me the error that says it can't find the HelloWorldService and
> that it can't start the Blueprint Container.  Is there some configurations
> that I need to make for the web app?  Does anyone has a web app example
> that uses a service declared by blueprint?
>
> Thanks,
> Michael




-- 
Ivan


Re: ClassNotFoundException: log4j Appender (Geronimo 3.0-beta1)

2012-03-26 Thread Ivan
Hmm, could you try this,  !org.**apach
e.log4j* ?

2012/3/26 Juho Autio 

> Hi,
>
> Geronimo 3.0-beta1 fails to deploy my war due to classloading problems.
>
> Note that this war was successfully deployed on Geronimo 2.2.1 with tomcat
> 6 and also on a plain tomcat 7.
>
> My war has a web.xml with 2.3 servlet doctype and it ships some jar
> libraries under WEB-INF/lib/ - most importantly, a copy of log4j.jar. The
> war has a geronimo-web.xml with just an empty sys:environment element in it.
>
> When I try to deploy on Geronimo 3.0-beta1, I get this stacktrace:
>
> 2012-03-22 12:08:36,754 ERROR [[/myapp]] Servlet /myapp threw load()
> exception
> java.lang.**ClassNotFoundException: org.apache.log4j.Appender
>at org.eclipse.osgi.internal.**loader.BundleLoader.**
> findClassInternal(**BundleLoader.java:467)
>at org.eclipse.osgi.internal.**loader.BundleLoader.findClass(**
> BundleLoader.java:429)
>at org.eclipse.osgi.internal.**loader.BundleLoader.findClass(**
> BundleLoader.java:417)
>at org.apache.geronimo.hook.**equinox.GeronimoClassLoader.**
> loadClass(GeronimoClassLoader.**java:85)
>at java.lang.ClassLoader.**loadClass(ClassLoader.java:**247)
>at java.lang.Class.forName0(**Native Method)
>at java.lang.Class.forName(Class.**java:247)
>at org.apache.xbean.recipe.**RecipeHelper.loadClass(**
> RecipeHelper.java:52)
>at org.apache.xbean.recipe.**ObjectRecipe.getType(**
> ObjectRecipe.java:353)
>at org.apache.xbean.recipe.**ObjectRecipe.internalCreate(**
> ObjectRecipe.java:266)
>at org.apache.xbean.recipe.**AbstractRecipe.create(**
> AbstractRecipe.java:96)
>at org.apache.xbean.recipe.**AbstractRecipe.create(**
> AbstractRecipe.java:61)
>at org.apache.geronimo.j2ee.**annotation.Holder.newInstance(**
> Holder.java:178)
>at org.apache.geronimo.tomcat.**TomcatInstanceManager.**
> newInstance(**TomcatInstanceManager.java:74)
>at org.apache.catalina.core.**StandardWrapper.loadServlet(**
> StandardWrapper.java:1087)
>at org.apache.catalina.core.**StandardWrapper.load(**
> StandardWrapper.java:1031)
>at org.apache.catalina.core.**StandardContext.loadOnStartup(**
> StandardContext.java:4957)
>at org.apache.catalina.core.**StandardContext$3.call(**
> StandardContext.java:5284)
>at org.apache.catalina.core.**StandardContext$3.call(**
> StandardContext.java:5279)
>at java.util.concurrent.**FutureTask$Sync.innerRun(**
> FutureTask.java:303)
>at java.util.concurrent.**FutureTask.run(FutureTask.**java:138)
>at java.util.concurrent.**ThreadPoolExecutor$Worker.**
> runTask(ThreadPoolExecutor.**java:886)
>at java.util.concurrent.**ThreadPoolExecutor$Worker.run(**
> ThreadPoolExecutor.java:908)
>at java.lang.Thread.run(Thread.**java:662)
>
>
> Interestingly, if I remove the log4j jar, the stacktrace above is avoided,
> but the same issue hits in an actual servlet initialization. It has a
> slightly different error message:
>
> 2012-03-22 13:53:31,565 ERROR [DeploymentPortlet] The application was not
> deployed.
> Could not fully load class: com.myapp.MyFilter
>  due to:org/apache/log4j/Appender
>  in classLoader:
> org.apache.geronimo.hook.**equinox.GeronimoClassLoader@**3c982419
> java.lang.**NoClassDefFoundError: Could not fully load class:
> com.myapp.MyFilter
>  due to:org/apache/log4j/Appender
>  in classLoader:
>
>
> I also tried adding
>
> !org.**apache.log4j.*
>
> in geronimo-web.xml (while having the log4j jar in place in the war), but
> this didn't help as ClassNotFoundException repeated.
>
>
> Any suggestions how to resolve this?
>
> Cheers,
> Juho Autio
>



-- 
Ivan


Re: JPA insertion order

2012-03-26 Thread Ivan
I am thinking that this is not Geronimo specific issue, forward your email
to openjpa user mail list, there are many experts there :-)

2012/3/26 Adme Admirolas 

> Hello,
>
> I'm facing problems, when I persist JPA entities. Here is scenario:
>
> I'm using CDI, and inject EntityManager and UserTransaction into named
> bean. I have entity, that we can call MainEntity. It has 2
> "@ManyToOne(optional = false, fetch = LAZY, cascade = { PERSIST, REFRESH
> })" relationship to other entities, lets call them MinorEntity. So, when i
> commit UserTransaction, the JPA first of all inserts Main, then
> MinorEntity, and then try to update MainEntity table again. The problem is,
> that i have not null constraint on database.
> I googled a little bit, and found that i should use OpenJPA @ForeignKey
> annotation, to force OpenJPA first of all insert MinorEntity. But this
> didn't helped to me, the insert order is still incorrect.
>
> The strangest thing, is that i have unit test, that tries to simulate this
> situation using Resource Local transaction type. And it does not fails.
>
> What I'm doing wrong? Is there need, to do some additional Geronimo app
> server configuration?
>
> Here is persistence.xml of container managed persistence context:
>
> 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
>> http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd";>
>> 
>>
>> org.apache.openjpa.persistence.PersistenceProviderImpl
>> jdbc/PRNUBEM
>> ENABLE_SELECTIVE
>> AUTO
>> 
>> 
>> > value="org.apache.openjpa.jdbc.sql.DB2Dictionary" />
>> 
>> > value="printParameters=true"/>
>> 
>> 
>> 
>> 
>>
>
>
> And here is persistence.xml of resource local persistence context:
>
> 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
>> http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd";>
>> 
>>
>>  org.apache.openjpa.persistence.PersistenceProviderImpl
>> ENABLE_SELECTIVE
>> AUTO
>> 
>> > value="jdbc:db2://localhost:5/PRNUBEM" />
>> > value="com.ibm.db2.jcc.DB2Driver" />
>> 
>> 
>> 
>> > value="org.apache.openjpa.jdbc.sql.DB2Dictionary" />
>> 
>> > value="printParameters=true"/>
>> 
>> 
>>
>> 
>> 
>>
>
>
> Please help, because if I will not be able to solve this soon, I will be
> forced to move to some another JPA implementation, or even another APP
> server.
>
> Admirolas
>



-- 
Ivan


Re: Webservice example working on glassfish3 but not on geronimo-tomcat7-javaee6-3.0-beta-1

2012-03-25 Thread Ivan
Think that the error message is correct, actually, Geronimo uses RI package
to generate the WSDL files and those jaxb classes, so it should have the
same behavior with Glassfish.

2012/3/24 sim085 

> Hi Ivan, sorry for the mistake in code, it is because I re-wrote the
> example
> rather then copy and paste it. I confirm endpointName is correct,
> ejb.IAskQuestionBean.
>
> Here is the code:
>
> [code]
> @Stateless
> @WebService(serviceName="AskQuestionService", name="AskQuestion",
> endpointInterface="ejb.IAskQuestionBean")
> public class AskQuestionBean implements IAskQuestionBean{
> ...
> }
> [/code]
>
> In geronimo.log I could not find anything else. However when I checked
> geronimo.out I found the following exception:
>
> [code]
> Problem encountered during annotation processing;
> see stacktrace below for more information.
> com.sun.tools.ws.processor.modeler.ModelerException: modeler error: The
> @javax.jws.WebService.name element cannot be used in with
> @javax.jws.WebService.endpointInterface element.
>at
>
> com.sun.tools.ws.processor.modeler.annotation.WebServiceAP.onError(WebServiceAP.java:244)
>at
>
> com.sun.tools.ws.processor.modeler.annotation.WebServiceVisitor.annotationError(WebServiceVisitor.java:196)
>at
>
> com.sun.tools.ws.processor.modeler.annotation.WebServiceVisitor.visitClassDeclaration(WebServiceVisitor.java:141)
>at
>
> com.sun.tools.apt.mirror.declaration.ClassDeclarationImpl.accept(ClassDeclarationImpl.java:113)
>at
>
> com.sun.tools.ws.processor.modeler.annotation.WebServiceAP.buildModel(WebServiceAP.java:334)
>at
>
> com.sun.tools.ws.processor.modeler.annotation.WebServiceAP.process(WebServiceAP.java:275)
>at
>
> com.sun.mirror.apt.AnnotationProcessors$CompositeAnnotationProcessor.process(AnnotationProcessors.java:84)
>at com.sun.tools.apt.comp.Apt.main(Apt.java:480)
>at
> com.sun.tools.apt.main.AptJavaCompiler.compile(AptJavaCompiler.java:270)
>at com.sun.tools.apt.main.Main.compile(Main.java:1127)
>at com.sun.tools.apt.main.Main.compile(Main.java:989)
>at com.sun.tools.apt.Main.processing(Main.java:113)
>at com.sun.tools.apt.Main.process(Main.java:103)
>at com.sun.tools.apt.Main.process(Main.java:85)
>at
> com.sun.tools.ws.wscompile.WsgenTool.buildModel(WsgenTool.java:222)
>at com.sun.tools.ws.wscompile.WsgenTool.run(WsgenTool.java:126)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>at
>
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>at
>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>at java.lang.reflect.Method.invoke(Method.java:601)
> at com.sun.tools.ws.Invoker.invoke(Invoker.java:135)
>at com.sun.tools.ws.WsGen.main(WsGen.java:57)
> error: compilation failed, errors should have been reported
>
> 2012-03-24 09:20:12,277 ERROR [EjbModuleBuilder]
> JAXWSEJBModuleBuilderExtension.addGBeans() failed: WSDL generation failed
> org.apache.geronimo.common.DeploymentException: WSDL generation failed
>at
>
> org.apache.geronimo.jaxws.sun.tools.WsdlGenerator.generateWsdl(WsdlGenerator.java:176)
>at
>
> org.apache.geronimo.jaxws.sun.tools.SunWsdlGenerator.generateWsdl(SunWsdlGenerator.java:34)
>at
>
> org.apache.geronimo.axis2.builder.Axis2Builder.initialize(Axis2Builder.java:153)
>at
>
> org.apache.geronimo.jaxws.builder.JAXWSServiceBuilder.configureEJB(JAXWSServiceBuilder.java:378)
>at
>
> org.apache.geronimo.jaxws.ejb.builder.JAXWSEJBModuleBuilderExtension.addGBeans(JAXWSEJBModuleBuilderExtension.java:249)
>at
>
> org.apache.geronimo.openejb.deployment.EjbModuleBuilder.doAddGBeans(EjbModuleBuilder.java:1247)
>at
>
> org.apache.geronimo.openejb.deployment.EjbModuleBuilder.addGBeans(EjbModuleBuilder.java:1146)
>at
>
> org.apache.geronimo.j2ee.deployment.EARConfigBuilder.buildConfiguration(EARConfigBuilder.java:763)
>at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:255)
>at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:140)
>at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>at
>
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>at
>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>at java.lang.reflect.Method.invoke(Method.java:601)
>at
>
> org.apache.geronimo.gbean.runtim

Re: Webservice example working on glassfish3 but not on geronimo-tomcat7-javaee6-3.0-beta-1

2012-03-19 Thread Ivan
Thanks for helping to validate this, Tina. If it is really caused by space,
need a JIRA for fixing this. And I remembered that there should be some
test cases for this, not sure why we miss that.

2012/3/19 li yanli 

> Hi, tried on linux and jdk without space, sample works well.
>
> On Sun, Mar 18, 2012 at 9:53 AM, Ivan  wrote:
> > I guess that there is an issue that Geronimo could not handle those
> spaces
> > in the JDK path, could you try to use a JDK without space in the path ?
> if
> > it will work, think a JIRA is required.
> >
> >
> > 2012/3/17 sim085 
> >>
> >> Here is the exception I get when I deploy the ear application containing
> >> ejb
> >> exposed as web service:
> >>
> >> 2012-03-17 15:58:51,215 WARN  [AdminObjectRefBuilder] Failed to build
> >> reference to resource env reference [java:comp/BeanManager,
> >> java:comp/Validator, java:comp/ValidatorFactory] defined in plan file.
> The
> >> corresponding entry in Geronimo deployment descriptor is missing.
> >> Process output: {}java.lang.NoClassDefFoundError:
> >> Files\Java\jdk1/6/0_23\jre\lib\endorsed
> >> Caused by: java.lang.ClassNotFoundException:
> >> Files\Java\jdk1.6.0_23\jre\lib\endorsed
> >>at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
> >>at java.security.AccessController.doPrivileged(Native Method)
> >>at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
> >>at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
> >>at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
> >>at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
> >> Could not find the main class: Files\Java\jdk1.6.0_23\jre\lib\endorsed.
> >> Program will exit.
> >> Exception in thread "main"
> >> 2012-03-17 15:58:53,280 ERROR [EjbModuleBuilder]
> >> JAXWSEJBModuleBuilderExtension.addGBeans() failed: WSDL generation
> failed
> >> org.apache.geronimo.common.DeploymentException: WSDL generation failed
> >>at
> >>
> >>
> org.apache.geronimo.jaxws.sun.tools.WsdlGenerator.generateWsdl(WsdlGenerator.java:176)
> >>at
> >>
> >>
> org.apache.geronimo.jaxws.sun.tools.SunWsdlGenerator.generateWsdl(SunWsdlGenerator.java:34)
> >>at
> >>
> >>
> org.apache.geronimo.axis2.builder.Axis2Builder.initialize(Axis2Builder.java:153)
> >>at
> >>
> >>
> org.apache.geronimo.jaxws.builder.JAXWSServiceBuilder.configureEJB(JAXWSServiceBuilder.java:378)
> >>at
> >>
> >>
> org.apache.geronimo.jaxws.ejb.builder.JAXWSEJBModuleBuilderExtension.addGBeans(JAXWSEJBModuleBuilderExtension.java:249)
> >>at
> >>
> >>
> org.apache.geronimo.openejb.deployment.EjbModuleBuilder.doAddGBeans(EjbModuleBuilder.java:1247)
> >>at
> >>
> >>
> org.apache.geronimo.openejb.deployment.EjbModuleBuilder.addGBeans(EjbModuleBuilder.java:1146)
> >>at
> >>
> >>
> org.apache.geronimo.j2ee.deployment.EARConfigBuilder.buildConfiguration(EARConfigBuilder.java:763)
> >>at
> >> org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:255)
> >>at
> >> org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:140)
> >>at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >>at
> >>
> >>
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> >>at
> >>
> >>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> >>at java.lang.reflect.Method.invoke(Method.java:597)
> >>at
> >>
> >>
> org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:34)
> >>at
> >>
> >>
> org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:131)
> >>at
> >>
> >>
> org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:883)
> >>at
> >>
> org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:245)
> >>at
> >>
> >>
> org.apache.geronimo.deployment.plugin.local.AbstractDeployCommand.doDeploy(AbstractDeployCommand.java:116)
> >>at
> >>
> >>
> org.apache.geronimo.deployment.plugin.local.DistributeCommand.run(DistributeCommand.java:61)
> >>at java.lang.Thread.run(Thread.java:662)
> >>
> >> Is this because I need to configure Geronimo in some way?
> >>
> >>
> >> --
> >> View this message in context:
> >>
> http://apache-geronimo.328035.n3.nabble.com/Webservice-example-working-on-glassfish3-but-not-on-geronimo-tomcat7-javaee6-3-0-beta-1-tp3830574p3834663.html
> >> Sent from the Users mailing list archive at Nabble.com.
> >
> >
> >
> >
> > --
> > Ivan
>
>
>
> --
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> Best Wishes!
> Tina Li
>



-- 
Ivan


Re: classloading

2012-03-19 Thread Ivan
2012/3/19 Radim Kolar 

> Is possible to make stack traces like they are on Jboss 7.1? These traces
> includes jar from which was class loaded, this is highly useful when
> hunting classloading problems.
>
>  STACKTRACE
>at org.jboss.jca.core.**connectionmanager.ccm.**
> CachedConnectionManagerImpl.**registerConnection(**
> CachedConnectionManagerImpl.**java:265)
>at org.jboss.jca.core.**connectionmanager.**
> AbstractConnectionManager.**allocateConnection(**
> AbstractConnectionManager.**java:495)
>at org.jboss.jca.adapters.jdbc.**WrapperDataSource.**getConnection(
> **WrapperDataSource.java:129)
>at org.apache.jsp.index_jsp._**jspService(index_jsp.java:256)
>at 
> org.apache.jasper.runtime.**HttpJspBase.service(**HttpJspBase.java:70)
> [jbossweb-7.0.13.Final.jar:]
>at javax.servlet.http.**HttpServlet.service(**HttpServlet.java:847)
> [jboss-servlet-api_3.0_spec-1.**0.0.Final.jar:1.0.0.Final]
>at 
> org.apache.jasper.servlet.**JspServletWrapper.service(**JspServletWrapper.java:369)
> [jbossweb-7.0.13.Final.jar:]
>

 Seems an interesting function, I am thinking that there maybe two ways to
do this in Geronimo
a. With the StackTraceElement, it is possible to get the class name, then
with the class name, it should be able to find the bundle name with package
admin service, but need to consider more for the current classloading
configuration.
b. Use the internal class,e.g. sun.reflect.Reflection.getCallerClass, seems
that it is able to get the Class instance, then it is easy to find the
classloader, then the bundle name.


>
> Also if you look at http://www.slideshare.net/**
> rayploski/jboss-application-**server-7<http://www.slideshare.net/rayploski/jboss-application-server-7>slide
>  6:
>
> * Modular
>  * Only API, no AS implementation exposure
>  * True isolation
>
> this is what should be done in AS because its time consuming to hunt app
> jars vs application server jars classloading issues. At geronimo i was not
> able to run some application at all.
>

Yes, you are right, current classloading model in Geronimo 3.0-beta is
still following the multiparent strategy in the past Geronimo versions, and
it does bring issues about class loading conflict. Although hidden-classes
could somewhat solve the issue, it is not easy to find the correct
configuration for the users. The possible solution has been discussed for
many times in the past, need to have a minimal public class set. Actually,
in those plugin builder, there has a default environment for this purpose,
hope that Geronimo could do that in the future versions.



-- 
Ivan


Re: Problem in creating Web Service in Eclipse using 2.1.8 Geronimo

2012-02-15 Thread Ivan
Hmm, I am not familiar with the Eclipse Web Service creator. Here are some
ideas for your reference,
a. If those jaxb classes are not generated with the web service creator,
think that you may first to find how to solve it with the tool.
b. Not sure how you manged your web service providers, cxf has its own way
to configure and publish web service, like it could uses cxf-servlet.xml to
hold all those SEI implementations.
c. I would like to suggest you to follow the doc on Geronimo wiki,
https://cwiki.apache.org/GMOxDOC22/developing-web-services.html#DevelopingWebservices-WebServicestutorials

Hope it helps.

2012/2/14 Venkat 

> Hi Ivan, sorry to confuse you.
>
> I am using Apache CXF 2.5.1 and Geronimo 2.2 (I know I told 2.1.8, sorry
> upgraded it) and Eclipse 3.7
>
> I am using Eclipse Web Service creator (Top Down approach)
>
> http://apache-geronimo.328035.n3.nabble.com/file/n3740671/Web_Service.jpg
> Web_Service.jpg
>
> When I am trying to create it, it is not able to create the stubs. It is
> only able to install onto the Geronimo but not able to run it.
>
> I Googled on this, and saw that Geronimo 2.2 is still using jaxb 2.1 and
> that is why it was suggested on that link to replace. So just tried that.
>
> Still not working. Don't know what is the problem.
>
> --
> View this message in context:
> http://apache-geronimo.328035.n3.nabble.com/Problem-in-creating-Web-Service-in-Eclipse-using-2-1-8-Geronimo-tp3672504p3740671.html
> Sent from the Users mailing list archive at Nabble.com.
>



-- 
Ivan


Re: Problem in creating Web Service in Eclipse using 2.1.8 Geronimo

2012-02-07 Thread Ivan
Hi, I may need to make some things clear, as some responses in the previous
email made me confused.
a. which version and assembly did you use ? I saw you mentioned 2.1 and 2.2.
b. how do you generate the web service stuff ? where is the WSDL2Java  from
? if it is from CXF standalone released binary, why is required to replace
those jar files in Geronimo. and actually, I did not think it is a good
idea to replace those jar files in the repository, it may cause some issues.


2012/2/8 Venkat 

> Thanks Ivan for your help.
>
> I changed the files in the Repository. But it is still not generating
> stubs.
> It did not gave any exceptions, but also did not created it.
>
> I can see my war in the "Web App Wars".
>
> I googled on it and saw I need to change "jaxws" jars also, so I did
> changed
> those and then I was back to the same exceptions.
>
> If you don't mind can you tell me what are the jars that are needed for CXF
> 2.5.1 WSDL2Java stubs creation.
>
> I have changed these files in the Geronimo Repo.
>
>
> com.sun.xml.bind/jaxb-impl/2.1.7/jar to
> com.sun.xml.bind/jaxb-impl/2.2.4-1/jar
> com.sun.xml.bind/jaxb-xjc/2.1.7/jar  to
> com.sun.xml.bind/jaxb-xjc/2.2.4-1/jar
> org.apache.geronimo.specs/geronimo-jaxb_2.1_spec/1.0/jarto
> org.apache.geronimo.specs/geronimo-jaxb_2.2_spec/1.0/jar
>
>
> I did not change this jar
> "org.apache.cxf/cxf-rt-databinding-jaxb/2.1.10/jar"
>
>
> com.sun.xml.ws/jaxws-rt/2.1.4/jarto
> com.sun.xml.ws/jaxws-rt/2.2.5/jar
> com.sun.xml.ws/jaxws-tools/2.1.4/jar to
> com.sun.xml.ws/jaxws-tools/2.2.5/jar
> org.apache.geronimo.specs/geronimo-jaxws_2.1_spec/1.0/jar to
> org.apache.geronimo.specs/geronimo-jaxws_2.2_spec/1.0/jar
>
> I did not change this jar "org.apache.cxf/cxf-rt-frontend-jaxws/2.1.10/jar"
>
> Please let me know. I am new to this Geronimo. Actually this is my first
> time ever using this.
>
> --
> View this message in context:
> http://apache-geronimo.328035.n3.nabble.com/Problem-in-creating-Web-Service-in-Eclipse-using-2-1-8-Geronimo-tp3672504p3723633.html
> Sent from the Users mailing list archive at Nabble.com.
>



-- 
Ivan


Re: Virtual Host Configuration

2012-02-05 Thread Ivan
I doubt that  MessageContext means the class in Axis or Axis2.
>From the exception message " java.lang.ClassNotFoundException:
MessageContext in classloader hebeidomains/whois-web/1.0.1/war ", it seems
that no package name there, and I have checked the codes in Geronimo there,
the name printed is a full name, which including the package name.
With the exception stack, the CNF is thrown while invoking
getDeclaredMethods, think add a debug point and find the target class
should be helpful to find the root cause.

2012/2/2 Radim Kolar 

>  Dne 2.2.2012 1:44, Ivan napsal(a):
>
> First, the Geronimo used is 2.2.2-SNAPSHOT ?
>
> yes. tried 2.2.1 too. No difference.
>
>
>  The version number in the config.xml should be consistent with other
> versions.
>
> with what other versions?  "
> http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1";<http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1>is
>  XML namespace
>
> here is log message from geronimo.log
>
> 2012-02-01 20:30:24,884 INFO  [DeploymentContext] The Strict Manifest
> Classpath processing mode is in effect.
> This option can be altered by specifying
> -DXorg.apache.geronimo.deployment.LenientMFCP=true|false
> Specify ="true" for more lenient processing such as ignoring missing jars
> and references that are not spec compliant.
> 2012-02-01 20:31:28,150 WARN  [TomcatWebAppContext] TomcatWebAppContext
> failed
> 2012-02-01 20:31:28,150 ERROR [GBeanInstanceState] Error while starting;
> GBean is now in the FAILED state:
> abstractName="hebeidomains/whois-web/1.0.1/war?J2EEApplication=null,j2eeType=WebModule,name=hebeidomains/whois-web/1.0.1/war"
> java.lang.IllegalStateException: ContainerBase.addChild: start:
> LifecycleException:  java.io.IOException: Context did not start for an
> unknown reason
> at
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:803)
> at
> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)
> at
> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601)
> at
> org.apache.geronimo.tomcat.TomcatContainer.addContext(TomcatContainer.java:295)
> at
> org.apache.geronimo.tomcat.TomcatWebAppContext.doStart(TomcatWebAppContext.java:525)
> at
> org.apache.geronimo.gbean.runtime.GBeanInstance.createInstance(GBeanInstance.java:953)
> at
> org.apache.geronimo.gbean.runtime.GBeanInstanceState.attemptFullStart(GBeanInstanceState.java:269)
> at
> org.apache.geronimo.gbean.runtime.GBeanInstanceState.start(GBeanInstanceState.java:103)
> at
> org.apache.geronimo.gbean.runtime.GBeanInstance.start(GBeanInstance.java:525)
> at
> org.apache.geronimo.gbean.runtime.GBeanDependency.attemptFullStart(GBeanDependency.java:110)
> at
> org.apache.geronimo.gbean.runtime.GBeanDependency.addTarget(GBeanDependency.java:145)
> at
> org.apache.geronimo.gbean.runtime.GBeanDependency$1.running(GBeanDependency.java:119)
> at
> org.apache.geronimo.kernel.basic.BasicLifecycleMonitor.fireRunningEvent(BasicLifecycleMonitor.java:175)
> at
> org.apache.geronimo.kernel.basic.BasicLifecycleMonitor.access$300(BasicLifecycleMonitor.java:44)
> at
> org.apache.geronimo.kernel.basic.BasicLifecycleMonitor$RawLifecycleBroadcaster.fireRunningEvent(BasicLifecycleMonitor.java:253)
> at
> org.apache.geronimo.gbean.runtime.GBeanInstanceState.attemptFullStart(GBeanInstanceState.java:295)
> at
> org.apache.geronimo.gbean.runtime.GBeanInstanceState.start(GBeanInstanceState.java:103)
> at
> org.apache.geronimo.gbean.runtime.GBeanInstanceState.startRecursive(GBeanInstanceState.java:125)
> at
> org.apache.geronimo.gbean.runtime.GBeanInstance.startRecursive(GBeanInstance.java:539)
> at
> org.apache.geronimo.kernel.basic.BasicKernel.startRecursiveGBean(BasicKernel.java:377)
> at
> org.apache.geronimo.kernel.config.ConfigurationUtil.startConfigurationGBeans(ConfigurationUtil.java:465)
>
> at
> org.apache.geronimo.kernel.config.KernelConfigurationManager.start(KernelConfigurationManager.java:190)
> at
> org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:546)
> at
> org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:527)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at
> org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.inv

Re: Virtual Host Configuration

2012-02-01 Thread Ivan
igurationException: 
> Configuration hebeidomains/whois-web/1.0.1/war failed to start due to the 
> following reasons:
>   The service 
> J2EEApplication=null,j2eeType=WebModule,name=hebeidomains/whois-web/1.0.1/war 
> did not start because ContainerBase.addChild: start: LifecycleException:  
> java.io.IOException: Context did not start for an unknown reason
>
>   at 
> org.apache.geronimo.kernel.config.ConfigurationUtil.startConfigurationGBeans(ConfigurationUtil.java:494)
>   ... 16 more**
>
>
>


-- 
Ivan
<><>

Re: DeploymentException: POJO web service not configured by any web service builder

2012-01-24 Thread Ivan
The description for option  org.apache.cxf.jaxws.
checkPublishEndpointPermission  could be found in
https://cwiki.apache.org/GMOxDOC22/web-services-issues.html. I doubt that
it is related to your issue.
If the problem is that RMIConnector could not write it to the deploy
directory, I guess that whether the problem is that JRE does not have
permission to do that, as I saw that you are working on windows 7, the user
control system in win 7 sometimes cause some strange behaviors.

2012/1/17 mikedanese 

> More time spent on this, still cant deploy my war:
> java.security.AccessController.doPrivileged
> Seems 'RMIConnection' tries to write the war file to the deploy directory
> (eg: appserver-base/repository/xx but is denied access by jre.
> ( windows7 / eclipse indigo / wsce-eclipse plugin / websphere comm. edition
> V3.0).
> Some things I have tried:
> 1. From eclipse server view(wsceV3.0) edit the 'launch configuration' to
> add
> VM arguments, eg:
> -Djava.rmi.server.codebase=file:/C:/ibm/wsce/appserverV3.0/bin/
> -Djava.rmi.server.hostname=localhost
> -Djava.security.policy=server.policy
> -DXorg.apache.geronimo.deployment.LenientMFCP=true
>
> 2. edit jre java.policy file (jre/lib/security/java.policy) eg:
> grant codeBase "file:///C:/ibm/wsce/appserverV3.0/*" {
> permission java.security.AllPermission;
> };
>
> Please advise the correct way to grant access to write the war file to wsce
> deploy directories.
>
>
>
>
> --
> View this message in context:
> http://apache-geronimo.328035.n3.nabble.com/DeploymentException-POJO-web-service-not-configured-by-any-web-service-builder-tp2677348p3663697.html
> Sent from the Users mailing list archive at Nabble.com.
>



-- 
Ivan


Re: Daytrader application does not build

2012-01-24 Thread Ivan
Manager.loadPluginFully(DefaultPluginManager.java:1626)
>at
>
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.loadPluginFully(DefaultLifecycleExecutor.java:1582)
>... 15 more
> Caused by: org.apache.maven.project.InvalidProjectModelException: Failed to
> validate POM for project org.apache.geronimo.buildsupport:car-maven-plugin
> at Artifact
> [org.apache.geronimo.buildsupport:car-maven-plugin:pom:3.0-SNAPSHOT
> ]
>at
>
> org.apache.maven.project.DefaultMavenProjectBuilder.processProjectLogic(DefaultMavenProjectBuilder.java:1077)
>at
>
> org.apache.maven.project.DefaultMavenProjectBuilder.buildInternal(DefaultMavenProjectBuilder.java:880)
>at
>
> org.apache.maven.project.DefaultMavenProjectBuilder.buildFromRepository(DefaultMavenProjectBuilder.java:255)
>at
>
> org.apache.maven.plugin.DefaultPluginManager.checkRequiredMavenVersion(DefaultPluginManager.java:277)
>... 19 more
> [INFO]
> ----
> [INFO] Total time: 1 second
> [INFO] Finished at: Tue Jan 24 11:45:31 CET 2012
> [INFO] Final Memory: 8M/101M
> [INFO]
> 
>
>
> --
> View this message in context:
> http://apache-geronimo.328035.n3.nabble.com/Daytrader-application-does-not-build-tp3684317p3684317.html
> Sent from the Users mailing list archive at Nabble.com.
>



-- 
Ivan


Re: Problem in creating Web Service in Eclipse using 2.1.8 Geronimo

2012-01-24 Thread Ivan
IIRC, cxf 2.5.1 implements jax-ws 2.2, and it requires the jaxb 2.2, and in
Geronimo 2.2, jaxb 2.1 api and impl are shipped. Think you may add the
hidden-class to prevent loading jaxb 2.1 api and impl from server runtime.
The doc URL is  https://cwiki.apache.org/GMOxDOC22/classloading.html .

2012/1/25 Venkat 

> Hi Ivan, thanks for your reply.
>
> But I am using Geronimo 2.2, CXF 2.5.1. And I saw that CXF lib folder has
> the jaxb api 2.2.3.
>
> --
> View this message in context:
> http://apache-geronimo.328035.n3.nabble.com/Problem-in-creating-Web-Service-in-Eclipse-using-2-1-8-Geronimo-tp3672504p3685816.html
> Sent from the Users mailing list archive at Nabble.com.
>



-- 
Ivan


Re: Virtual Host Configuration

2012-01-24 Thread Ivan
Maybe the doc did not express the idea clearly. Think that it means that
the container-config element is configured in
http://geronimo.apache.org/xml/ns/j2ee/web/tomcat-2.0.1 . While the
contents of that element should be follow the schema
http://geronimo.apache.org/xml/ns/web/tomcat/config-1.0.
For any doc issue, you could open a JIRA and add the issue description
there.

2012/1/25 Ray Sprinkle 

>  Hmm, I am wondering which doc did you refer to, and did not think the
> current geronimo-web.xml will work in Geronimo 2.1.*.
>  For the virtual host in Geronimo 2.2.*,  the doc url is
> https://cwiki.apache.org/GMOxDOC22/configuring-virtual-host-in-tomcat.html
> .
>  If you really would like to use container-config to configure the virtual
> host, the namespace should be corrected,
> --->
> 
>   xmlns="http://geronimo.apache.org/xml/ns/j2ee/web/tomcat-2.0.1";>   <---
>  http://geronimo.apache.org/xml/ns/web/tomcat/config-1.0";>
>testhost1.vhainc.local
>  
>
> <---
>
> Changing the xmlns to "
> http://geronimo.apache.org/xml/ns/web/tomcat/config-1.0"; fixed my problem.
>
> How can  I help fix the documentation?   With your help, I found the
> namespace correctly referenced in the documentation for
> "Creating deployment plans for Web applications"
>
> Link:
> https://cwiki.apache.org/GMOxDOC22/creating-deployment-plans-for-web-applications.html#CreatingdeploymentplansforWebapplications-Thecontainerconfigelement
>
> but  in the reference for geronimo-web.xml (
> https://cwiki.apache.org/GMOxDOC22/geronimo-webxml.html), in the
>  section, it links to
> http://geronimo.apache.org/xml/ns/j2ee/web/tomcat-2.0.1, which is the
> incorrect value I was using.   Shouldn't these two sections be in agreement?
>
> 2012/1/24 Radim Kolar 
> > I started with 2.2, tried 2.1 and tried standalone Tomcat 6.
> In 2.1 virtual hosts works, follow documentation on website.
>
>
> Thank you for the great help.
>



-- 
Ivan


Re: Build a plugin jar with mative libs on geronimo

2012-01-24 Thread Ivan
To use the default shared library, places all your jar files in the
var\shared\lib, and configure the dependency below in your application
plan, then all those classes should be available in your ear application.

org.apache.*geronimo*.configs
<*artifactId*>*sharedlib*

Hope it helps.

2012/1/24 easyl 

> Geronimo 2.2.1
>
> --
> View this message in context:
> http://apache-geronimo.328035.n3.nabble.com/Build-a-plugin-jar-with-native-libs-on-geronimo-tp3681767p3683998.html
> Sent from the Users mailing list archive at Nabble.com.
>



-- 
Ivan


Re: Virtual Host Configuration

2012-01-24 Thread Ivan
Hmm, I am wondering which doc did you refer to, and did not think the
current geronimo-web.xml will work in Geronimo 2.1.*.
For the virtual host in Geronimo 2.2.*,  the doc url is
https://cwiki.apache.org/GMOxDOC22/configuring-virtual-host-in-tomcat.html.
If you really would like to use container-config to configure the virtual
host, the namespace should be corrected,
--->

 http://geronimo.apache.org/xml/ns/j2ee/web/tomcat-2.0.1";>
<---http://geronimo.apache.org/xml/ns/web/tomcat/config-1.0";>
   testhost1.vhainc.local
 
   
<---

2012/1/24 Radim Kolar 

> > I started with 2.2, tried 2.1 and tried standalone Tomcat 6.
> In 2.1 virtual hosts works, follow documentation on website.
>
>


-- 
Ivan


Re: Problem in creating Web Service in Eclipse using 2.1.8 Geronimo

2012-01-24 Thread Ivan
As I asked in my last response, which tool did you use to generate the jaxb
classes ? From the stack and your words, seems that you are using the jaxws
plugin in Eclipse to do that ? If does, I did not see what is required to
do on Geronimo side.
Also, I would reminder that the cxf version in Geronimo 2.1.8 should be
2.0.*, and jaxb version used in Geronimo 2.1.8 is 2.1.*, there maybe issue
if using jaxb 2.2 to generate stubs and running them on jaxb 2.1.
To make the generation works, depending on which tool you use, the common
thing is to configure the correct java.endorsed.dirs, and add the jaxb 2.2
there, and google is also your friend :-)

2012/1/24 Venkat 

> Hi Ivan, thanks for replying.
>
> I got a reply from CXF people, they also said the same thing.
>
> So should I download the jaxb 2.2 and paste it into Geronimo lib folder or
> CXF folder?
>
> Thanks.
>
> --
> View this message in context:
> http://apache-geronimo.328035.n3.nabble.com/Problem-in-creating-Web-Service-in-Eclipse-using-2-1-8-Geronimo-tp3672504p3682173.html
> Sent from the Users mailing list archive at Nabble.com.
>



-- 
Ivan


Re: Build a plugin jar with mative libs on geronimo

2012-01-23 Thread Ivan
which Geronimo version do you use ? I doubt there is a normal way to make
the class-path in MANIFEST.MF work in the plugin, maybe someone else could
points it out.
One side, the native library should be unloaded with the destorying of the
target classloader. There maybe a leak issue somewhere if it always reports
error.
>From another side, IMO, It looks to me that shared library should be a good
choice for you. Depending on which version used, you could just google and
find the corresponding doc in Geronimo wiki.


2012/1/23 easyl 

> Hi,
>
> I need to develop a Java library which uses JNI with OS dependent native
> libraries, and such Java library will be used by some deployed EAR
> application on geronimo.
>
> I have tried to directly wrap my EAR application with native libs together
> and it did work, however it will lead to a duplicated loaded native library
> error if I redeploy the EAR application. Therefore, I decide to develop
> such
> Java native libs as a independent JAR plugin on geronimo. Namely, I will
> 'install' my Java native lib from geronimo http console "Repository Viewer
> -
> Add Archive to Repository" and add the 'dependency' in each EAR's
> deployment
> descriptor.
>
>   
>
>
>   
>
>   
>
>
> Is there any example that I can learn from?
>
> My plugin structure looks like the following
>
> mypluin-1.0/
>   src/
>  + **.java
>   3rd-lib/
>  + **.jar
>   native-lib/
>  + **.so **.dll
>   META-INF/
>  + MANIFEST.MF
>
> Can this plugin jar contain other 3rd party jar files?
> Will native lib still work when they are stored in a jar?
> Should I take care of MANIFEST?
>
>
>
>
> --
> View this message in context:
> http://apache-geronimo.328035.n3.nabble.com/Build-a-plugin-jar-with-mative-libs-on-geronimo-tp3681767p3681767.html
> Sent from the Users mailing list archive at Nabble.com.
>



-- 
Ivan


Re: Problem in creating Web Service in Eclipse using 2.1.8 Geronimo

2012-01-20 Thread Ivan
Wonder whether you are using the jaxws tools from Geronimo or from CXF ?
>From the stack, think that there is a jaxb 2.1 API is used, the required()
method is only available in jaxb 2.2. IIRC, some old JDK 6 versions still
shipped the 2.1 api.

2012/1/19 Venkat 

> Hi, thanks for your reply.
>
> I have installed jdk 6 and it is working fine. But still I am not able to
> create the stubs.
>
> I am using CXF 2.5.1 to create the stubs in Eclipse 3.7, please see the
> exceptions
>
>
>
> Loading FrontEnd jaxws ...
> Loading DataBinding jaxb ...
> wsdl2java -d
> C:\Users\501971347\workspace\PANDeviceRegistrationWS\.cxftmp/src -classdir
> C:\Users\501971347\workspace\PANDeviceRegistrationWS\build\classes -p
>
> http://drms.energy.ge.com/smartgrid/datamodel/services/enddevicemanagement/pandeviceregistrationservice=com.ge.energy.drms.smartgrid.datamodel.services.enddevicemanagement.pandeviceregistrationservice
> -impl -validate -exsh false -dns true -dex true -wsdlLocation
> http://localhost:20510/PANDeviceRegistrationService/SoapPort?wsdl -verbose
> -defaultValues -fe jaxws -db jaxb -wv 1.1
>
> file:/C:/Users/501971347/workspace/PANDeviceRegistrationWS/WebContent/wsdl/PANDeviceRegistrationService.wsdl
> wsdl2java - Apache CXF 2.5.1
>
>
> WSDLToJava Error: java.lang.reflect.UndeclaredThrowableException
>
> org.apache.cxf.tools.common.ToolException:
> java.lang.reflect.UndeclaredThrowableException
>at
>
> org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:294)
>at
>
> org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:103)
>at org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:113)
>at org.apache.cxf.tools.wsdlto.WSDLToJava.run(WSDLToJava.java:86)
>at org.apache.cxf.tools.wsdlto.WSDLToJava.main(WSDLToJava.java:184)
> Caused by: java.lang.reflect.UndeclaredThrowableException
>at $Proxy43.required(Unknown Source)
>at
>
> com.sun.tools.xjc.generator.bean.field.AbstractField.annotateReference(AbstractField.java:192)
>at
>
> com.sun.tools.xjc.generator.bean.field.AbstractField.annotate(AbstractField.java:161)
>at
>
> com.sun.tools.xjc.generator.bean.field.AbstractFieldWithVar.createField(AbstractFieldWithVar.java:80)
>at
>
> com.sun.tools.xjc.generator.bean.field.SingleField.(SingleField.java:94)
>at
>
> com.sun.tools.xjc.generator.bean.field.SingleField.(SingleField.java:81)
>at sun.reflect.GeneratedConstructorAccessor17.newInstance(Unknown
> Source)
>at
>
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
>at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
>at
>
> com.sun.tools.xjc.generator.bean.field.GenericFieldRenderer.generate(GenericFieldRenderer.java:69)
>at
>
> com.sun.tools.xjc.generator.bean.field.DefaultFieldRenderer.generate(DefaultFieldRenderer.java:82)
>at
>
> com.sun.tools.xjc.generator.bean.BeanGenerator.generateFieldDecl(BeanGenerator.java:774)
>at
>
> com.sun.tools.xjc.generator.bean.BeanGenerator.generateClassBody(BeanGenerator.java:555)
>at
>
> com.sun.tools.xjc.generator.bean.BeanGenerator.(BeanGenerator.java:258)
>at
>
> com.sun.tools.xjc.generator.bean.BeanGenerator.generate(BeanGenerator.java:166)
>at com.sun.tools.xjc.model.Model.generateCode(Model.java:290)
>at
>
> com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.bind(SchemaCompilerImpl.java:283)
>at
>
> com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.bind(SchemaCompilerImpl.java:94)
>at
>
> org.apache.cxf.tools.wsdlto.databinding.jaxb.JAXBDataBinding.initialize(JAXBDataBinding.java:391)
>at
>
> org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.generateTypes(WSDLToJavaContainer.java:591)
>at
>
> org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.processWsdl(WSDLToJavaContainer.java:243)
>at
>
> org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:138)
>at
>
> org.apache.cxf.tools.wsdlto.WSDLToJavaContainer.execute(WSDLToJavaContainer.java:286)
>... 4 more
> Caused by: java.lang.NoSuchMethodException:
> javax.xml.bind.annotation.XmlElementRef.required()
>at java.lang.Class.getDeclaredMethod(Class.java:1937)
>at
>
> com.sun.codemodel.TypedAnnotationWriter.invoke(TypedAnnotationWriter.java:112)
>... 27 more
>
>
> --
> View this message in context:
> http://apache-geronimo.328035.n3.nabble.com/Problem-in-creating-Web-Service-in-Eclipse-using-2-1-8-Geronimo-tp3672504p3672687.html
> Sent from the Users mailing list archive at Nabble.com.
>



-- 
Ivan


Re: Virtual Host Configuration

2012-01-20 Thread Ivan
First a quick check at it, I found that the name of HostGBean is
name=testhost2.vhainc.local,
while in your deployment plan, it wrote   testhost1.vhainc.local , wonder is it a typo error ?

2012/1/21 Ray Sprinkle 

> I am having difficulty getting Geronimo 2.2.1 virtual hosts to work.   I
> have followed the documentation
> And once I got past the whole GBEANs configuration syntax its seems
> straight forward enough.   I've
> gotten the server to run and the test app to deploy but it always
> deploys to the default host.   I can't
> figure out what I'm missing.Any advice would be appreciated.   I
> have attached the tomcat configuration
> from my config.xml and the geronimo-web.xml.  The test application
> itself is a single jsp.
>
> config.xml (line breaks added for clarity):
>
>
>gbeanInfo="org.apache.geronimo.tomcat.HostGBean">
> name="className">org.apache.catalina.core.StandardHost
>name=testhost2.vhainc.local
>   appBase=
>   workDir=work
>
>
>TomcatEngine
>
>
>
>
>
>
> geronimo-web.xml
>
> 
>  xmlns:app="http://geronimo.apache.org/xml/ns/j2ee/application-2.0";
>
> xmlns:client="http://geronimo.apache.org/xml/ns/j2ee/application-client-
> 2.0"
>xmlns:conn="http://geronimo.apache.org/xml/ns/j2ee/connector-1.2";
>xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2";
>xmlns:ejb="http://openejb.apache.org/xml/ns/openejb-jar-2.2";
>xmlns:log="http://geronimo.apache.org/xml/ns/loginconfig-2.0";
>xmlns:name="http://geronimo.apache.org/xml/ns/naming-1.2";
>xmlns:pers="http://java.sun.com/xml/ns/persistence";
>xmlns:pkgen="http://openejb.apache.org/xml/ns/pkgen-2.1";
>xmlns:sec="http://geronimo.apache.org/xml/ns/security-2.0";
>xmlns:web="http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1";>
>
>
>default
>test
>1.0
>war
>
>
>
>/test
>
>   xmlns="http://geronimo.apache.org/xml/ns/j2ee/web/tomcat-2.0.1";>
>testhost1.vhainc.local
>  
>
> 
>



-- 
Ivan


Re: DeploymentException: POJO web service not configured by any web service builder

2012-01-01 Thread Ivan
.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1367)
>at
>
> javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:788)
>at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
> at
>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>at java.lang.reflect.Method.invoke(Method.java:597)
> at
> sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:303)
>at sun.rmi.transport.Transport$1.run(Transport.java:159)
>at java.security.AccessController.doPrivileged(Native Method)
>at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
>at
> sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
>at
>
> sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
>at
>
> sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
>at
>
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>at
>
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>at java.lang.Thread.run(Thread.java:662)
>
> --
> View this message in context:
> http://apache-geronimo.328035.n3.nabble.com/DeploymentException-POJO-web-service-not-configured-by-any-web-service-builder-tp2677348p3624951.html
> Sent from the Users mailing list archive at Nabble.com.
>



-- 
Ivan


Re: Tomcat Compatibility

2011-12-29 Thread Ivan
The configurations of Tomcat do not change too much between different major
versions from my view. One thing to be noticed, some elements are not
support in Geronimo, e,g. It will not allow to configure context in the
server.xml, as Geronimo uses its own configuration to keep those installed
application.
Anyway, any problem, think you could ask in Tomcat or Geronimo community.

2011/12/29 Forty-Two 

> Thanks, so I shouldn't have too many problems in the configuration.  I
> didn't
> think of this earlier, but the version of Tomcat the book uses is 5.5, not
> the latest version, Tomcat 7 (Or is that a beta...).  Will that cause any
> compatibility problems other than that which would be experienced between
> the major versions?
>
> --
> View this message in context:
> http://apache-geronimo.328035.n3.nabble.com/Tomcat-Compatibility-tp3617910p3619062.html
> Sent from the Users mailing list archive at Nabble.com.
>



-- 
Ivan


Re: Tomcat Compatibility

2011-12-28 Thread Ivan
>From the serlvet/jsp spec compatibility, I think both of them had passed
corresponding TCK, so they should be consistent, if using Geronimo 2.2.*
and 3.0-beta-1, you will find they almost use the same configuration file.
but Geronimo uses its own authentication, security, JNDI and etc
Hope it helps.

2011/12/29 Sean A. 

> Hello,
>
>I'm looking to brush up on my Servlets/JSP skills, and I have a
> book that I'd like to use (_Head First Servlets and JSP_).  It uses Tomcat
> in its examples though, and I would like a full-fledged container for
> future experimentation.  What are the compatibility issues between Geronimo
> and Tomcat that I should know about?  Is there anything different in the
> directory structure, for example?  Thanks for your time.
>
>--Forty-Two
>



-- 
Ivan


Re: Geronimo 3.0-beta-1: Pluto Portlet Deployment

2011-12-28 Thread Ivan
Geronimo admin console is built from portal, and the source codes could be
referenced from plugins/console directory. IIRC, those portlet servlet
should not be accessed directly, they should be invoked by portal driver
servlet,   Just my two cents, thinking it is better to ask this in Pluto
community or should be easily reference the samples provided by Pluto
project.

2011/12/28 Behrooz Nobakht 

> Hello,
>
> Sorry I forgot, I have also the listener in web.xml:
>
> 
>
> org.apache.geronimo.pluto.PortalStartupListener
>  
>
> Thanks again,
> Behrooz
>
>
>
> On Wed, Dec 28, 2011 at 11:27 AM, Behrooz Nobakht wrote:
>
>> Hello,
>>
>> I am trying to deploy a simple Pluto Portlet into Geronimo 3.0-beta-1:
>>
>>- I have a simple class extending javax.portlet.GenericPortlet. The
>>class overrides method doRender or doView for a plain sample.
>>- The portlet.xml looks like:
>>
>> 
>> MyPortlet
>>  MyPortletClassQualifiedPath
>>  
>> text/html
>>  view
>> edit
>>  help
>> 
>>  
>> My Portlet
>>  
>> 
>>
>>
>>- The geronimo-web.xml looks like:
>>
>> 
>> 
>>  my-project-group-id
>> my-project-artifact
>>  1.0-SNAPSHOT
>> war
>>  
>> 
>>  
>> org.apache.portals
>>  portlet-api_2.0_spec
>>  1.0
>> 
>>  
>> org.apache.portals.pluto
>>  pluto-container
>> 2.0.1
>>  
>> 
>>  org.apache.portals.pluto
>>  pluto-container-api
>> 2.0.1
>>  
>> 
>>  org.apache.portals.pluto
>>  pluto-container-driver-api
>>  2.0.1
>> 
>>  
>> org.apache.portals.pluto
>>  pluto-portal-driver
>>  2.0.1
>> 
>>  
>> org.apache.portals.pluto
>>  pluto-portal-driver-impl
>>  2.0.1
>> 
>>  
>> org.apache.geronimo.plugins
>>  pluto-support
>> 
>>  
>>
>> org.apache.geronimo.plugins
>>  geronimo-pluto
>>  3.0-beta-1
>>  
>> 
>>  
>> 
>>  
>>
>>  /control
>>
>>- In web.xml, I have:
>>
>> 
>> MyPortletServlet
>>
>> org.apache.pluto.container.driver.PortletServlet
>>  
>> portlet-name
>>  MyPortlet
>> 
>>  1
>> 
>>  
>> MyPortletServlet
>>  /PlutoInvoker/p/d
>> 
>>
>>
>>- I use Maven geronimo:deploy to deploy the WAR into Geronimo. It
>>succeeds.
>>- The MyPortlet#init method is called to just verify that the portlet
>>is initialized.
>>- When I issue the address
>>http://localhost:8080/control/PlutoInvoker/p/d I receive an NPE
>>having a root cause in that there is not METHOD_ID attached to the
>>HTTP request attributes.
>>- I debugged the mixture of Apache Geronimo + Jetty + Pluto and I
>>found out that based on the life cycle, for each portlet request, the
>>object DefaultPortletInvokerService should be called in invoke method
>>to prepare the METHOD_ID and other attributes in the HTTP request. I
>>debugged this and the method gets called for other portlets in Geronimo. 
>> For
>>my portlet, this does *not* happen.
>>
>> Can you please tell what I am doing wrongly?
>>
>> Thanks,
>> Behrooz
>>
>>
>>
>>
>>
>>
>>
>>
>


-- 
Ivan


Re: Cannot access my Servlet

2011-12-28 Thread Ivan
Geronimo 2.2.1 only supports servlet 2.5, if you would like to use
WebServlet annotation, you may need to use 3.0-beta-1.

2011/12/28 Hendrik Schenk 

> i am working with eclipse. eclipse generated this annotation.
> but i wonder that this servlet works in jboss, glassfish and tomcat. i am
> using geronimo 2.2.1.
>
> but what should your annotation effect? i will try it, but i do not think
> that this will work. i think i need the correct url, but cannot find it.
>
> best regard
> hschenk
>
>
>
>
>
>
>
>  - Original Message -
>
> From: Forrest Xia
>
> Sent: 12/28/11 03:26 PM
>
> To: user@geronimo.apache.org
>
> Subject: Re: Cannot access my Servlet
>
>
>
>  On Wed, Dec 28, 2011 at 10:00 PM, Hendrik Schenk  wrote:
>
>>  Hi,
>>
>> i am new at geronimo. I tested a few application-server with the same
>> war-file (servlet). But now i have a problem with geronimo.
>>
>> I deployed my servlet-war-file, but i do not know the exact url. i added
>> in the web.xml the "web-app id" and click ohne link in the admin console of
>> geronimo, but i get an 404-error.
>>
>> My class looks like this:
>>
>>
>> @WebServlet("/FoobarServlet")
>>
>>   Is the annotation defintion correct?
>
> I saw usage like this:
>
>  @WebServlet(name = "Foobar", urlPatterns = { "/FoobarServlet" })
>
> public class FoobarServlet extends HttpServlet {
>> [...]
>> }
>>
>>
>> my web.xml looks like this:
>>
>>
>> 
>> http://www.w3.org/2001/XMLSchema-instance"; 
>> <http://www.w3.org/2001/XMLSchema-instance>
>>  xmlns="http://java.sun.com/xml/ns/javaee"; 
>> <http://java.sun.com/xml/ns/javaee> 
>> xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"; 
>> <http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd>
>>  xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
>> <http://java.sun.com/xml/ns/javaee&lang=en> 
>> http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"; 
>> <http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd>
>>  id="FoobarServletTest" version="3.0">
>>  FoobarServlet
>>  
>>  index.html
>>  index.htm
>>  index.jsp
>>  default.html
>>  default.htm
>>  default.jsp
>>  
>> 
>>
>>
>>
>>
>> but i cannot reach the servlet under
>> http://localhost:8080/FoobarServletTest/FoobarServlet<http://localhost:8080/FoobarServletTest/FoobarServlet&lang=en>
>>
>>
>> if i deploy a jsp file, i can reach it under the webapp-id. every
>> app-server (tomcat, jboss, glassfish) works fine with my war.-archive, only
>> geronimo does not work :(
>>
>> please help me.
>>
>> best regards
>>
>> hschenk
>>
>  If still problem with G 3.0-beta-1, please share your simple app here.
> thanks!
>
>
>
> --
> Thanks!
>
> Regards, Forrest
>
>
>
>



-- 
Ivan


Re: Cannot access my Servlet

2011-12-28 Thread Ivan
The annotation is correct, for the context root for the target web
application, you may find it on the admin console, or configure it in the
geronimo-web.xml.
I did not remember that value of id could be used to specify the context
root in the servlet spec.

2011/12/28 Forrest Xia 

>
>
> On Wed, Dec 28, 2011 at 10:00 PM, Hendrik Schenk  wrote:
>
>> Hi,
>>
>> i am new at geronimo. I tested a few application-server with the same
>> war-file (servlet). But now i have a problem with geronimo.
>>
>> I deployed my servlet-war-file, but i do not know the exact url. i added
>> in the web.xml the "web-app id" and click ohne link in the admin console of
>> geronimo, but i get an 404-error.
>>
>> My class looks like this:
>>
>>
>> @WebServlet("/FoobarServlet")
>>
>> Is the annotation defintion correct?
>
> I saw usage like this:
>
> @WebServlet(name = "Foobar", urlPatterns = { "/FoobarServlet" })
>
> public class FoobarServlet extends HttpServlet {
>> [...]
>> }
>>
>>
>> my web.xml looks like this:
>>
>>
>> 
>> http://www.w3.org/2001/XMLSchema-instance"; 
>> <http://www.w3.org/2001/XMLSchema-instance>
>>  xmlns="http://java.sun.com/xml/ns/javaee"; 
>> <http://java.sun.com/xml/ns/javaee> 
>> xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"; 
>> <http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd>
>>  xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
>> <http://java.sun.com/xml/ns/javaee&lang=en> 
>> http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"; 
>> <http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd>
>>  id="FoobarServletTest" version="3.0">
>>  FoobarServlet
>>  
>>  index.html
>>  index.htm
>>  index.jsp
>>  default.html
>>  default.htm
>>  default.jsp
>>  
>> 
>>
>>
>>
>>
>> but i cannot reach the servlet under
>> http://localhost:8080/FoobarServletTest/FoobarServlet<http://localhost:8080/FoobarServletTest/FoobarServlet&lang=en>
>>
>>
>> if i deploy a jsp file, i can reach it under the webapp-id. every
>> app-server (tomcat, jboss, glassfish) works fine with my war.-archive, only
>> geronimo does not work :(
>>
>> please help me.
>>
>> best regards
>>
>> hschenk
>>
> If still problem with G 3.0-beta-1, please share your simple app here.
> thanks!
>
>
>
> --
> Thanks!
>
> Regards, Forrest
>
>


-- 
Ivan


Re: Dynamic Role mapping

2011-11-26 Thread Ivan
Yes, dynamic role mapping is really important and useful, while I doubt
anyone is working on this. From the implementation aspect, the mapping
information should be easy to update, it is hosted by
ApplicationPolicyConfigurationManager, but may need to consider more for
runtime updating.
For the isUserInRole,from my side, Geronimo's implementation is following
the spec,

2011/11/25 amergey 

> Hello,
>
> Currently the way to secure a web application is quite static in Geronimo,
> as Role mapping is defined during deployement of the application.
> There are some valid use case where groups assigned to users can change. In
> this case the only way I found in Geronimo is to change role mapping in
> deployment plan and re-deploy the application, and Geronimo should probably
> provide some way to change role mapping without having to redeploy the
> application.
> For example in JBoss, or weblogic server, role mapping can be changed
> dynamically outside the application, without redeploying it.
> I found this bug https://issues.apache.org/jira/browse/GERONIMO-454 that
> could be an answer, but it has not been updated for a while, are there any
> plan to implement this ?
>
> On same topic another question, it seems that with programmatic secutity in
> Servlet, even if a user has a role granted, isUserInRole(thisRole) only
> return true if the role is declared. I do not know what the JEE
> specification tell about this, but I have tested in tomcat, JBoss and
> Weblogic server and isUserInRole return true if the user has the role
> granted, whatever the role is declared or not. In Glassfish they also
> support a way to have this behavior. Are there any way in Geronimo ? (it
> can
> be useful when roles are dynamic, and we do not want to updaet web.xml then
> redeploy the application, and this use case seems also to be valid as
> almost
> all JEE application servers, provide a way to do this)
>
> Thanks and Best regards,
> Arnaud
>
> --
> View this message in context:
> http://apache-geronimo.328035.n3.nabble.com/Dynamic-Role-mapping-tp3535785p3535785.html
> Sent from the Users mailing list archive at Nabble.com.
>



-- 
Ivan


Re: How to access ejb in Gbean??? then IllegalArgumentException: interface org.apache.openejb.client.EJBObjectProxy is not visible from class loader was throw

2011-11-26 Thread Ivan
Suppose that you are trying to access remote ejb reference from OpenEJB
container, not from the java:comp directory, as GBean is not managed bean,
IIRC.
Since the stacktrace shows that OpenEJB related classes could not be loaded
from the context classloader, have you tried to add the openejb plugin
dependency in your deployment plan ?

在 2011年11月26日 下午9:12,changchang198009 写道:

> env: win7  64bit   jdk 1.6.29 , geronimo-3 beta1
>
> How to access  ejb in Gbean 's methord???
>
> I have a ejb and i can access it in web and console app;
>
> When I access the ejb in a  GBean, use the following code(the same in
> console app code)
>
> "
>
> ClassLoader cl = Thread.currentThread().getContextClassLoader();
>cl.loadClass("org.apache.openejb.client.EJBObjectProxy");
>
>  remoteBusinessIntf =
> (I4Provider)context.lookup("CodeProviderTestRemote");
>  //SimpleServerGBean.java:121 line..
> "
>
> then printStackTrace:
> 
> java.lang.IllegalArgumentException: interface
> org.apache.openejb.client.EJBObjectProxy is not visible from class loader
>  at java.lang.reflect.Proxy.getProxyClass(Proxy.java:353)
>  at java.lang.reflect.Proxy.newProxyInstance(Proxy.java:581)
>  at
> org.apache.openejb.client.proxy.Jdk13ProxyFactory.newProxyInstance(Jdk13ProxyFactory.java:118)
>  at
> org.apache.openejb.client.proxy.ProxyManager.newProxyInstance(ProxyManager.java:107)
>  at
> org.apache.openejb.client.EJBObjectHandler.createEJBObjectProxy(EJBObjectHandler.java:134)
>  at
> org.apache.openejb.client.JNDIContext.createBusinessObject(JNDIContext.java:193)
>  at org.apache.openejb.client.JNDIContext.lookup(JNDIContext.java:234)
>  at org.apache.aries.jndi.DelegateContext.lookup(DelegateContext.java:161)
>  at javax.naming.InitialContext.lookup(InitialContext.java:392)
>  at zzsczz.sample.SimpleServerGBean.doStart(SimpleServerGBean.java:121)
>  at org.apache.geronimo.gbean.runtime
> .GBeanInstance.createInstance(GBeanInstance.java:1000)
>  at
> org.apache.geronimo.gbean.runtime.GBeanInstanceState.attemptFullStart(GBeanInstanceState.java:271)
>  at
> org.apache.geronimo.gbean.runtime.GBeanInstanceState.start(GBeanInstanceState.java:105)
>  at
> org.apache.geronimo.gbean.runtime.GBeanInstanceState.startRecursive(GBeanInstanceState.java:127)
>  at
> org.apache.geronimo.gbean.runtime.GBeanInstance.startRecursive(GBeanInstance.java:569)
>  at
> org.apache.geronimo.kernel.basic.BasicKernel.startRecursiveGBean(BasicKernel.java:386)
>  at
> org.apache.geronimo.kernel.config.ConfigurationUtil.startConfigurationGBeans(ConfigurationUtil.java:462)
>  at
> org.apache.geronimo.kernel.config.KernelConfigurationManager.start(KernelConfigurationManager.java:226)
>  at
> org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:702
> )
>  at
> org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:681)
>  at
> org.apache.geronimo.deployment.plugin.local.StartCommand.run(StartCommand.java:67)
>  at java.lang.Thread.run(Thread.java:662)
> ##
>
> any ideas??
>
>
>


-- 
Ivan


Re: custom jndi resources

2011-11-10 Thread Ivan
For injecting a string, I think env-entry will help you in web.xml , it is
something like :



cass
java.lang.String
MyValue


You could also overwrite the value in geronimo-web.xml file.

2011/11/11 Radim Kolar 

>
>  Usually strings in jndi are resource-env-ref not resource-ref?
>>
> i can change web.xml to
>
> 
>
> Adresa Cassandra clusteru
> cass
> java.**lang.String
> 
>
> but how to write string value for this in geronimo-web.xml?
>
> 
> cass
>???
> 
>
>
>
>>  i have in web.xml
>>>
>>> 
>>> Adresa Cassandra clusteru
>>> cass
>>> java.lang.String
>>> Container
>>> Shareable
>>> 
>>>
>>> I need  to define String resource and bind it to jndi to make
>>> application work. From IBM documentation it seems that writing Gbean is
>>> needed:
>>>
>>> If you were exposing resources other than JMS or database resources
>>> through JNDI, you
>>> can do the same by writing GBeans to act as a wrapper around your
>>> resources. First,
>>> check for any plug-ins that are already available for exposing such
>>> resources as part of
>>> JNDI in Community Edition.
>>> <<<
>>>
>>> Because i need String then my custom bean must subclass String?
>>>
>>> public  class StringWrapperGBeanimplements  InterfaceNamed {
>>>
>>>public  StringWrapperGBean(String  gbeanName) {
>>>super(gbeanName);
>>>}
>>>
>>>   private  static  final  GBeanInfo GBEAN_INFO;
>>>
>>>static  {
>>>GBeanInfoBuilder infoFactory =new  GBeanInfoBuilder(
>>>StringWrapperGBean.class.**getName(),
>>> StringWrapperGBean.class);
>>>
>>>infoFactory.addAttribute("**gbeanName",String.class,false)**;
>>>infoFactory.addInterface(**InterfaceNamed.class);
>>>infoFactory.setConstructor(new  String[] {"gbeanName"  });
>>>
>>>GBEAN_INFO = infoFactory.getBeanInfo();
>>>}
>>>
>>> public  static  GBeanInfo getGBeanInfo() {
>>>return  GBEAN_INFO;
>>>}
>>>
>>> I am kinda confused
>>>
>>
>


-- 
Ivan


Re: classloading in 3.0

2011-11-10 Thread Ivan
Guess that you mean that " You can repackage included components into api
and impl clasess" :-)
Yes, in a ideal environment, those components should work in that way.
While the real world is so complex, you may find that jsf API and impl are
bundled in one jar file, as there maybe issues if divided them into two
bundles.
Also, some 3rd components think that they could load classes with the
current context classloader, which is also the classloader of the deployed
application, If only spec APIs are imported, then bang ! That's why I say
that we need to check each 3rd component in Geronimo.

2011/11/10 Radim Kolar 

> Dne 8.11.2011 4:04, Ivan napsal(a):
>
>  Agree, but as we discussed in the past, we need to validate each
>> component one by one, to make the context classloader and resource
>> searching work.
>>
> You can not repackage included components into api and impl classes and
> then:
>
> A: API CLASSES
> B: IMPL
>
> U: USER APP
>
> B imports A, and U imports A
>



-- 
Ivan


Re: classloading in 3.0

2011-11-07 Thread Ivan
Agree, but as we discussed in the past, we need to validate each component
one by one, to make the context classloader and resource searching work.

2011/11/8 David Jencks 

>
> On Nov 7, 2011, at 5:03 AM, Kevan Miller wrote:
>
> >
> > On Nov 4, 2011, at 3:42 PM, David Jencks wrote:
> >
> >>
> >> On Nov 4, 2011, at 12:07 PM, Radim Kolar wrote:
> >>
> >>> I propose to make classloading in 3.0 entirely different. Give user
> aplication access to javax.* stuff and other required J2EE 6 apis and
> nothing else unless told otherwise by deployment descriptor.
> >>
> >> I'd like this too.  How do you propose to get this to work?  I've been
> working on several ideas that end up requiring major modifications to
> geronimo that I haven't been able to get to work.  Any ideas you might have
> would be great to see.
> >
> > Agreed. We'd discussed this previously, IIRC.
> >
> >>
> >> What I'd actually like to see is that, instead of arbitrarily importing
> any particular set of classes, we run bnd on the application classes to
> determine the Import-Packages needed.
> >
> > Are you saying you don't want to arbitrarily import spec api classes? Or
> are you suggesting we use BND to dynamically determine Import-Packages for
> non-spec classes? I assume the latter would be filtering (not importing)
> packages that are already included in the application archive?
>
> I imagine we can figure out how to configure bnd to not generate
> import-package for anything in the application.  It might be a little
> different from the maven-bundle-plugin since maven will be missing.
>
> >
> > Automatically importing a default set of spec api classes would be a
> good first step, IMO. And require explicit Import-Packages -- at least
> initially.
>
> I'd like there to be no default import-packages and all imports, spec or
> anything else, be determined by byte-code analysis by bnd.  If you need
> more (e.g. dynamic class loading) you can specify bnd instructions.  I
> don't think this will really work until we get everything in the server to
> work as a bundle extender, but maybe I'm being too pessimistic.
>
> david jencks
>
> >
> > --kevan
>
>


-- 
Ivan


Re: Problems running grails applications on Geronimo 2.1

2011-11-02 Thread Ivan
OK, so could you attach the sample to the JIRA system? Or the one attached
last time could reproduce this.
Thanks.

2011/11/3 Radim Kolar 

>
>   I partly agreed your opinions, the classloader is always a complex thing
>> If the web applications ship the conflict libraries with the server
>> runtime, there may be issues, and you could find almost all the application
>> servers provide some classloading options to change the classloader
>> behavior. Also, I am not sure why you say that the Geronimo classloading
>> system is 'highly nonstandard', it will be better to have some detailed
>> comments for it :-)
>>
> If you get this application - it runs everywhere with exception of
> geronimo - websphere 7, jetty, tomcat, glassfish 3, weblogic 10.3. While
> you can certainly tune classloading in every mentioned server, it is not
> needed for majority of wars. In geronimo you need it for almost everything
> which does not fall into hello world category. Non willingness to play with
> custom deployement descriptors is reason why tomcat has so high market
> share in J2EE world - people just put OpenEJB + Hibernate there and they
> can make it run faster then in full J2EE stacks.
>
>
>   a. Not sure whether it is required to add javax.transaction in the
>> filter option, usually, for those specification APIs, the ones from server
>> side should always be used, as they are referenced by many server
>> components. Anyway, if it makes your application work, that is fine.
>>
> thats exactly what that statement does. combined with inverse
> classloading, it will make to ignore included JTA jar in grails application.
>
>   b. From the stack trace,  the CCE is thrown for the axiom package, it
>> seems that spring-ws uses the saaj in its webservice processing, and by
>> default, the axis2-saaj implementation is used in Geronimo runtime, and
>> axis2-saaj is dependent on the axiom packages. I checked the spring-ws
>> 1.5.0 packages, and found that axiom-1.2.5 is used, which is the same
>> version with one from Geronimo 2.1 runtime. One possible solution is to
>> removed the ones from your application packages.
>>
> grails springws plugin does not come with axiom and no axiom jar is found
> in application jars. Springws plugin comes with this:
>
> 69 409 activation-1.1.1.jar
>  1 651 965 bcprov-jdk14-1.43.jar
>  6 461 com.russmiles.groovy.**webservices.client-1.0-
>
> 18 817 saaj-api-1.3.jar
>278 145 saaj-impl-1.3.2.jar (com.sun.xml.messaging.saaj)
>278 286 serializer-2.7.1.jar
>773 156 spring-security-core-2.0.4.jar
>776 014 spring-ws-1.5.8-all.jar
> 23 346 stax-api-1.0.2.jar
>148 522 wsdl4j-1.6.1.jar
>323 799 wss4j-1.5.8.jar
>  3 176 148 xalan-2.7.1.jar
>143 145 XmlSchema-1.4.3.jar
>447 633 xmlsec-1.4.3.jar
>
> i added axiom to list of filtered classes to make sure that version
> packaged with geronimo is used but i got same error
>
>
> 
> net.sf.cglib
> javax.transaction
> javax.xml.soap
> org.apache.axiom
> 
> 
>
>
>
>>  If the application codes will interact with the server codes use those
>> components, there may be still an issue there.
>>
> saaj support in geronimo might be wrong
>



-- 
Ivan


Re: Grails application in Geronimo 3

2011-11-02 Thread Ivan
First, I have to say, OSGi is not silver bullet. From the classloading
aspect, the most improvement is fine-grained classloading delegation, IMO.
For the inverse classloading, it does not make much sense in OSGi
environment, as there is no parent classloader conception in OSGi
classloader arch.
In the coming Geronimo 3.0-beta-1, to make those common applications work
in OSGi environment, the deployer will generate a full-list import
packages, which totally mimic the old Java EE's way. As mentioned by Jeff,
you could use import-package to forbid loading configured classes from
other bundles.
e.g. !org.apache.axis2*, with this
configuration, the deployer will not generate the import-package for those
packages start with org.apache.axis2.

2011/11/2 chi runhua 

> Inline
>
> Jeff C
>
> On Wed, Nov 2, 2011 at 7:43 PM, Radim Kolar  wrote:
>
>> > Hmm, virtual server is supported in Geronimo 3.0.
>> If i remove deployement to virtual server, then applications deploys and
>> starts. but not runs probably due to spring version conflict issue.
>>
>> java.lang.NullPointerException
>>
>>at org.codehaus.groovy.grails.**web.mapping.filter.**
>> UrlMappingsFilter.**doFilterInternal(**UrlMappingsFilter.java:150)
>>
>>at org.springframework.web.**filter.OncePerRequestFilter.**
>> doFilter(OncePerRequestFilter.**java:76)
>>
>>at org.apache.catalina.core.**ApplicationFilterChain.**
>> internalDoFilter(**ApplicationFilterChain.java:**243)
>>
>>at org.apache.catalina.core.**ApplicationFilterChain.**doFilter(**
>> ApplicationFilterChain.java:**210)
>>
>>at org.springframework.web.**filter.**CharacterEncodingFilter.**
>> doFilterInternal(**CharacterEncodingFilter.java:**88)
>>
>>
>>
>>
>>  Before I checking the exception, it will be better if you could directly
>>> configure the virtual host in the server.xml file in the /var/catalina
>>> directory.
>>>
>> Actually, configuring virtual hosts should be done easily in GUI console
>> like in other application servers. configuration in config.xml is kinda
>> cryptic.
>>
>>
>> > BTW, due to the timeline of the incoming 3.0-beta-1 release, I did not
>> have chance to merge the root context changes to that build. not sure it
>> will affect your decision.
>>
>> I currently could not get anything grails made to run in 3.0 due to not
>> yet discovered  classloading setup. I hoped that moving to OSGi will remove
>> these kind of problems but it is worse because inverse classloading/non
>> overitable classes combo is not supported in 3.0.
>>
> You may use  in your deployment plan for 3.0.
>



-- 
Ivan


Re: Grails application in Geronimo 3

2011-11-01 Thread Ivan
Hmm, virtual server is supported in Geronimo 3.0.
Before I checking the exception, it will be better if you could directly
configure the virtual host in the server.xml file in the /var/catalina
directory.
>From Geronimo 2.2, we are trying to make the configurations easier, for the
Tomcat assembly, almost the same syntax of server.xml is used to configure
the Tomcat container. The most difference with Tomcat is that it is not
allowed to configure web application context in that file.

BTW, due to the timeline of the incoming 3.0-beta-1 release, I did not have
chance to merge the root context changes to that build. not sure it will
affect your decision.
Thanks.

2011/11/2 chi runhua 

> IIRC, virtual host is not supported in G3.0 yet.
>
> I might be wrong...
>
> Jeff
>
>
> 2011/11/2 Radim Kolar 
>
>> I have problem running grails application in G3. I am trying it to deploy
>> into virtual hosts using configuration from geronimo 2.
>>
>> It fails with:
>>
>> show/hideErrorThe application was not successfully started.
>> start of hebeidomains/whois-web/1.0.1/**war failed
>> org.apache.geronimo.kernel.**config.LifecycleException: start of
>> hebeidomains/whois-web/1.0.1/**war failed
>> at org.apache.geronimo.kernel.**config.**SimpleConfigurationManager.**
>> startConfiguration(**SimpleConfigurationManager.**java:718)
>> at org.apache.geronimo.kernel.**config.**SimpleConfigurationManager.**
>> startConfiguration(**SimpleConfigurationManager.**java:681)
>> at org.apache.geronimo.**deployment.plugin.local.**
>> StartCommand.run(StartCommand.**java:67)
>> at java.lang.Thread.run(Thread.**java:662)
>> Caused by: org.apache.geronimo.kernel.**config.NoSuchConfigException:
>> trying to start ancestor config for config hebeidomains/whois-web/1.0.1/*
>> *war, but not found (configId: hebeidomains/whois-web/1.0.1/**war)
>> (configId: hebeidomains/whois-web/1.0.1/**war)
>> at org.apache.geronimo.kernel.**config.**SimpleConfigurationManager.**
>> startConfiguration(**SimpleConfigurationManager.**java:699)
>> ... 3 more
>>
>> I have no idea what should be ancestor for config. Virtual host is
>> defined here:
>>
>> 
>> > name="org.apache.geronimo.**configs/tomcat7/3.0-SNAPSHOT/**
>> car?ServiceModule=org.apache.**geronimo.configs/tomcat7/3.0-**
>> SNAPSHOT/car,j2eeType=Host,**name=bean">
>> org.apache.**catalina.core.StandardHost> attribute>
>> > name="initParams">name=whois.**hebeidomains.com<http://whois.hebeidomains.com>
>>appBase=
>>workDir=work
>> 
>> 
>>
>> and geronimo-web,xml is simple:
>>
>> 
>> > xmlns="http://geronimo.apache.**org/xml/ns/j2ee/web-2.0.1<http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1>
>> "
>> 
>> xmlns:xsi="http://www.w3.org/**2001/XMLSchema-instance<http://www.w3.org/2001/XMLSchema-instance>
>> "
>> xsi:schemaLocation="http://**geronimo.apache.org/xml/ns/**
>> j2ee/web-2.0.1 <http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1>
>> http://geronimo.apache.org/**
>> xml/ns/j2ee/web-2.0.1 <http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1>
>> ">
>> > xmlns="http://geronimo.apache.**org/xml/ns/deployment-1.2<http://geronimo.apache.org/xml/ns/deployment-1.2>
>> "
>>xsi:schemaLocation="http://**geronimo.apache.org/xml/ns/**
>> deployment-1.2 <http://geronimo.apache.org/xml/ns/deployment-1.2>
>>
>> http://geronimo.apache.org/**xml/ns/deployment-1.2<http://geronimo.apache.org/xml/ns/deployment-1.2>
>> ">
>> 
>> hebeidomains
>> whois-web
>> 1.0.1
>> war
>> 
>> 
>> /whois
>> whois.hebeidomains.com
>> 
>>
>
>


-- 
Ivan


Re: Problems running grails applications on Geronimo 2.1

2011-11-01 Thread Ivan
2011/11/2 Radim Kolar 

> Dne 16.10.2011 9:47, Ivan napsal(a):
>
>  I saw that you have mentioned classloading issue in your first email,
>> while If you could paste more detailed information, that would be better.
>> Usually, most classloading issues could be solved with correct classloading
>> loading configurations.
>>
> its grails 1.3.7 application with springws 1.5.something
>
> Unexpected expection during whois query: java.lang.ClassCastException:
> org.apach
> e.axiom.om.impl.dom.**DocumentImpl cannot be cast to
> org.apache.axiom.om.impl.dom.
> ElementImpljava.lang.**ClassCastException: org.apache.axiom.om.impl.dom.**
> DocumentIm
> pl cannot be cast to org.apache.axiom.om.impl.dom.**ElementImpl
>at org.apache.axis2.saaj.**NodeImplEx.toSAAJNode2(**
> NodeImplEx.java:265)
>at org.apache.axis2.saaj.**NodeImplEx.toSAAJNode(**
> NodeImplEx.java:178)
>at org.apache.axis2.saaj.**NodeImplEx.toSAAJNode(**
> NodeImplEx.java:163)
>at org.apache.axis2.saaj.**SOAPElementImpl.**getParentElement(**
> SOAPElementImp
> l.java:724)
>at org.apache.axis2.saaj.**SOAPElementImpl.getParentNode(**
> SOAPElementImpl.j
> ava:779)
>at com.sun.xml.bind.v2.runtime.**DomPostInitAction.run(**
> DomPostInitAction.j
> ava:33)
>at com.sun.xml.bind.v2.runtime.**MarshallerImpl.prewrite(**
> MarshallerImpl.ja
> va:329)
>at com.sun.xml.bind.v2.runtime.**MarshallerImpl.write(**
> MarshallerImpl.java:
> 291)
>at com.sun.xml.bind.v2.runtime.**MarshallerImpl.marshal(**
> MarshallerImpl.jav
> a:221)
>at org.springframework.oxm.jaxb.**Jaxb2Marshaller.marshal(**
> Jaxb2Marshaller.
> java:496)
>at org.springframework.ws.**support.MarshallingUtils.**
> marshal(MarshallingUt
> ils.java:81)
>at org.springframework.ws.client.**core.WebServiceTemplate$2.**
> doWithMessage
> (WebServiceTemplate.java:360)
>at org.springframework.ws.client.**core.WebServiceTemplate.**
> doSendAndReceiv
> e(WebServiceTemplate.java:535)
>at org.springframework.ws.client.**core.WebServiceTemplate.**
> sendAndReceive(
> WebServiceTemplate.java:502)
>at org.springframework.ws.client.**core.WebServiceTemplate.**
> marshalSendAndR
> eceive(WebServiceTemplate.**java:351)
>at org.springframework.ws.client.**core.WebServiceTemplate.**
> marshalSendAndR
> eceive(WebServiceTemplate.**java:341)
>at org.springframework.ws.client.**core.WebServiceOperations$**
> marshalSendAn
> dReceive.call(Unknown Source)
>at org.codehaus.groovy.runtime.**callsite.CallSiteArray.**
> defaultCall(CallSi
> teArray.java:40)
>at org.codehaus.groovy.runtime.**callsite.AbstractCallSite.**
> call(AbstractCa
> llSite.java:116)
>at org.codehaus.groovy.runtime.**callsite.AbstractCallSite.**
> call(AbstractCa
> llSite.java:128)
>at whois.WhoisController$_**closure2.doCall(**
> WhoisController.groovy:35)
>at sun.reflect.**NativeMethodAccessorImpl.**invoke0(Native Method)
>at sun.reflect.**NativeMethodAccessorImpl.**invoke(Unknown Source)
>at sun.reflect.**DelegatingMethodAccessorImpl.**invoke(Unknown
> Source)
>at java.lang.reflect.Method.**invoke(Unknown Source)
>at org.codehaus.groovy.runtime.**callsite.PogoMetaMethodSite$**
> PogoCachedMet
> hodSiteNoUnwrapNoCoerce.**invoke(PogoMetaMethodSite.**java:266)
>at org.codehaus.groovy.runtime.**callsite.PogoMetaMethodSite.**
> callCurrent(P
> ogoMetaMethodSite.java:51)
>at org.codehaus.groovy.runtime.**callsite.CallSiteArray.**
> defaultCallCurrent
> (CallSiteArray.java:44)
>at org.codehaus.groovy.runtime.**callsite.AbstractCallSite.**
> callCurrent(Abs
> tractCallSite.java:141)
>at org.codehaus.groovy.runtime.**callsite.AbstractCallSite.**
> callCurrent(Abs
> tractCallSite.java:149)
>at whois.WhoisController$_**closure2.call(WhoisController.**groovy)
>at sun.reflect.**NativeMethodAccessorImpl.**invoke0(Native Method)
>at sun.reflect.**NativeMethodAccessorImpl.**invoke(Unknown Source)
>at sun.reflect.**DelegatingMethodAccessorImpl.**invoke(Unknown
> Source)
>at java.lang.reflect.Method.**invoke(Unknown Source)
>at org.codehaus.groovy.runtime.**callsite.PogoMetaMethodSite$**
> PogoCachedMet
> hodSiteNoUnwrapNoCoerce.**invoke(PogoMetaMethodSite.**java:266)
>at org.codehaus.groovy.runtime.**callsite.PogoMetaMethodSite.**
> call(PogoMeta
> MethodSite.java:63)
>at org.codehaus.groovy.runtime.**callsite.CallSiteArray.**
> defaultCall(CallSi
> teArray.java:40)
>at org.codehaus.groovy.runtime.**callsite.AbstractCallSite

Re: can't find java:comp in application client

2011-10-30 Thread Ivan
Thanks, Da Feng, I will take a look at the attached config.xml file and
check whether we need to update the wiki page.

2011/10/30 Da Feng 

> Hi:
> I created two issues for harmony. I tested geronimo over MRP using harmony
> as classlib.  The modified configuration file is attached. Two changes must
> be made to get harmony run geronimo: 1. replace /var/configs/config.xml
> with attachment 2. replace /var/security/keystores/geronimo-default with
> geronimo.pkcs12 as specified in wiki(
> https://cwiki.apache.org/GMOxDOC22/apache-harmony.html).
>
> https://issues.apache.org/jira/browse/HARMONY-6690
> https://issues.apache.org/jira/browse/HARMONY-6689
>
>
> DaFENG
> Coder
> Telecommunication && Network Industry
> Gmail:sunspid...@gmail.com
>
>
>
> 
> From: Ivan 
> To: user@geronimo.apache.org; Da Feng 
> Sent: Sunday, October 23, 2011 12:30 AM
> Subject: Re: can't find java:comp in application client
>
>
> So does it work now ? If does, could you share the correct configuration,
> that would help other members. Thanks.
>
>
> 2011/10/23 Da Feng 
>
> Hi:
> >I find the harmony implementation of java.lang.InheritableThreadLocal has
> a bug. I  fixed it. Thanks, that wiki has a problem, only JMX service need
> harmony rmi jndi, normal jndi doesn't need to be changed.
> >
> >
> >DaFENG
> >Coder
> >Telecommunication && Network Industry
> >Gmail:sunspid...@gmail.com
> >
> >
> >
> >
> >
> >From: Ivan 
> >To: user@geronimo.apache.org; Da Feng 
> >Sent: Saturday, October 22, 2011 5:33 PM
> >Subject: Re: can't find java:comp in application client
> >
> >
> >
> >I have not tried to run Geronimo on Harmony, but from the stack trace,
> the client application should use the in-vm xbean jndi impl to look up the
> java:comp namespace.
> >
> >
> >2011/10/22 Da Feng 
> >
> >Hi:
> >>I configure geronimo to run on harmony lib. The VM is JikesRVM. I
> followed geronimo over harmony guide, and changed JNDI, used harmony
> provider in rmi-naming and client module. Application client still can't
> find java:comp env.
> >>
> >>
> >>
> >>==
> >>
> >>Exception initializing client: javax.naming.NameNotFoundException: Name
> is not bound: java:comp [Root exception is java.rmi.NotBoundException: Name
> java:comp is not associated with any remote
> reference.]javax.naming.NameNotFoundException: Name is not bound: java:comp
> [Root exception is java.rmi.NotBoundException: Name java:comp is not
> associated with any remote reference.]
> >>at
> org.apache.harmony.jndi.provider.rmi.registry.RegistryContext.lookup(RegistryContext.java:227)
> >>at
> org.apache.harmony.jndi.provider.rmi.registry.RegistryContext.lookup(RegistryContext.java:238)
> >>at javax.naming.InitialContext.lookup(InitialContext.java:403)
> >>at
> org.apache.geronimo.client.StaticJndiContextPlugin.startClient(StaticJndiContextPlugin.java:44)
> >>at
> org.apache.geronimo.client.AppClientContainer.main(AppClientContainer.java:128)
> >>at
> org.jikesrvm.classloader.ReflectionBase$$Reflect94501.invokeInternal(Unknown
> Source)
> >>at
> org.jikesrvm.runtime.ReflectionBase.invoke(ReflectionBase.java:180)
> >>at org.jikesrvm.runtime.Reflection.invoke(Reflection.java:72)
> >>at
> java.lang.reflect.VMCommonLibrarySupport.invokeVirtual(VMCommonLibrarySupport.java:233)
> >>at
> java.lang.reflect.VMCommonLibrarySupport.invoke(VMCommonLibrarySupport.java:174)
> >>at java.lang.reflect.Method.invoke(Method.java:397)
> >>at
> org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:34)
> >>at
> org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:124)
> >>at
> org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:867)
> >>at
> org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:239)
> >>at
> org.dacapo.daytrader.DaCapoClientRunner.initialize(DaCapoClientRunner.java:49)
> >>at
> org.jikesrvm.classloader.ReflectionBase$$Reflect50658.invokeInternal(Unknown
> Source)
> >>at
> org.jikesrvm.runtime.ReflectionBase.invoke(ReflectionBase.java:180)
> >>at org.jikesrvm.runtime.Reflection.invoke(Reflection.java:72)
> >>at
> java.lang.reflect.VMCommonLibrarySupport.invokeStatic(VMCommonLibrarySupport.java:203)
> >>

Re: can't find java:comp in application client

2011-10-22 Thread Ivan
So does it work now ? If does, could you share the correct configuration,
that would help other members. Thanks.

2011/10/23 Da Feng 

> Hi:
> I find the harmony implementation of java.lang.InheritableThreadLocal has a
> bug. I  fixed it. Thanks, that wiki has a problem, only JMX service need
> harmony rmi jndi, normal jndi doesn't need to be changed.
>
>
> DaFENG
> Coder
> Telecommunication && Network Industry
> Gmail:sunspid...@gmail.com
>
>
>
> 
> From: Ivan 
> To: user@geronimo.apache.org; Da Feng 
> Sent: Saturday, October 22, 2011 5:33 PM
> Subject: Re: can't find java:comp in application client
>
>
> I have not tried to run Geronimo on Harmony, but from the stack trace, the
> client application should use the in-vm xbean jndi impl to look up the
> java:comp namespace.
>
>
> 2011/10/22 Da Feng 
>
> Hi:
> >I configure geronimo to run on harmony lib. The VM is JikesRVM. I followed
> geronimo over harmony guide, and changed JNDI, used harmony provider in
> rmi-naming and client module. Application client still can't find java:comp
> env.
> >
> >
> >
> >==
> >
> >Exception initializing client: javax.naming.NameNotFoundException: Name is
> not bound: java:comp [Root exception is java.rmi.NotBoundException: Name
> java:comp is not associated with any remote
> reference.]javax.naming.NameNotFoundException: Name is not bound: java:comp
> [Root exception is java.rmi.NotBoundException: Name java:comp is not
> associated with any remote reference.]
> >at
> org.apache.harmony.jndi.provider.rmi.registry.RegistryContext.lookup(RegistryContext.java:227)
> >at
> org.apache.harmony.jndi.provider.rmi.registry.RegistryContext.lookup(RegistryContext.java:238)
> >at javax.naming.InitialContext.lookup(InitialContext.java:403)
> >at
> org.apache.geronimo.client.StaticJndiContextPlugin.startClient(StaticJndiContextPlugin.java:44)
> >at
> org.apache.geronimo.client.AppClientContainer.main(AppClientContainer.java:128)
> >at
> org.jikesrvm.classloader.ReflectionBase$$Reflect94501.invokeInternal(Unknown
> Source)
> >at org.jikesrvm.runtime.ReflectionBase.invoke(ReflectionBase.java:180)
> >at org.jikesrvm.runtime.Reflection.invoke(Reflection.java:72)
> >at
> java.lang.reflect.VMCommonLibrarySupport.invokeVirtual(VMCommonLibrarySupport.java:233)
> >at
> java.lang.reflect.VMCommonLibrarySupport.invoke(VMCommonLibrarySupport.java:174)
> >at java.lang.reflect.Method.invoke(Method.java:397)
> >at
> org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:34)
> >at
> org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:124)
> >at
> org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:867)
> >at
> org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:239)
> >at
> org.dacapo.daytrader.DaCapoClientRunner.initialize(DaCapoClientRunner.java:49)
> >at
> org.jikesrvm.classloader.ReflectionBase$$Reflect50658.invokeInternal(Unknown
> Source)
> >at org.jikesrvm.runtime.ReflectionBase.invoke(ReflectionBase.java:180)
> >at org.jikesrvm.runtime.Reflection.invoke(Reflection.java:72)
> >at
> java.lang.reflect.VMCommonLibrarySupport.invokeStatic(VMCommonLibrarySupport.java:203)
> >at
> java.lang.reflect.VMCommonLibrarySupport.invoke(VMCommonLibrarySupport.java:172)
> >at java.lang.reflect.Method.invoke(Method.java:397)
> >at org.dacapo.daytrader.Launcher.initialize(Launcher.java:77)
> >at
> org.jikesrvm.classloader.ReflectionBase$$Reflect27057.invokeInternal(Unknown
> Source)
> >at org.jikesrvm.runtime.ReflectionBase.invoke(ReflectionBase.java:180)
> >at org.jikesrvm.runtime.Reflection.invoke(Reflection.java:72)
> >at
> java.lang.reflect.VMCommonLibrarySupport.invokeStatic(VMCommonLibrarySupport.java:203)
> >at
> java.lang.reflect.VMCommonLibrarySupport.invoke(VMCommonLibrarySupport.java:172)
> >at java.lang.reflect.Method.invoke(Method.java:397)
> >at org.dacapo.harness.Tradebeans.prepare(Tradebeans.java:49)
> >at org.dacapo.harness.Benchmark.run(Benchmark.java:144)
> >at org.dacapo.harness.TestHarness.runBenchmark(TestHarness.java:221)
> >at org.dacapo.harness.TestHarness.main(TestHarness.java:174)
> >at Harness.main(Harness.java:17)
> >Caused by: java.rmi.NotBoundException: Name java:comp is not associated
> with any remote reference.
> >at
> org.apache.harmony.rmi.registry.RegistryImpl.lookup(RegistryImpl.

Re: can't find java:comp in application client

2011-10-22 Thread Ivan
verConnection.java:162)
> at java.lang.Thread.run(Thread.java:797)
> at
> org.apache.harmony.rmi.client.ClientRemoteCall.getExceptionFromServer(ClientRemoteCall.java:256)
> at
> org.apache.harmony.rmi.client.ClientRemoteCall.executeCall(ClientRemoteCall.java:191)
> at
> org.apache.harmony.rmi.remoteref.UnicastRef.invoke(UnicastRef.java:262)
> [Ljava.lang.StringEditor;
> at
> org.apache.harmony.rmi.remoteref.UnicastRef.invoke(UnicastRef.java:152)
> at
> org.apache.harmony.rmi.registry.RegistryImpl_Stub.lookup(RegistryImpl_Stub.java:136)
> at
> org.apache.harmony.jndi.provider.rmi.registry.RegistryContext.lookup(RegistryContext.java:224)




-- 
Ivan


Re: Problems running grails applications on Geronimo 2.1

2011-10-16 Thread Ivan
 I saw that you have mentioned classloading issue in your first email, while
If you could paste more detailed information, that would be better. Usually,
most classloading issues could be solved with correct classloading loading
configurations.

2011/10/16 Radim Kolar 

> Dne 14.10.2011 5:06, Ivan napsal(a):
>
> thank you for fixing this. i will try it because i have some serious
> stability problems after i moved to glassfish. I have also some classloading
> problems with grails applications in Geronimo 2.1, i will try WAS CE 3.0
> which is G 3.0 based to see if classloading is fixed by switching to osgi
> model.
>



-- 
Ivan


Re: Problems running grails applications on Geronimo 2.1

2011-10-13 Thread Ivan
Hi, I just committed some changes to code base, the problem is that, in the
internal Tomcat, seems that it uses an empty string to represent the root
context, and actually, I think that Tomcat did not clarify it clearly.
In the past Geronimo codes, we uses "/" for the root context, and "" for the
default context. The problems happens while some Tomcat codes construct the
requestURI in ApplicationContext to "//grails/path/test", and spring
framework fails to retrieve the target handler class.
Now, I removed the codes for building the default context in
TomcatContainer, and also use "" for the context path of default context
(also known as ROOT context), and it works for me.
Thanks.

2011/9/26 Ivan 

> Thanks, Radim, I will take a look at it asap !
>
>
> 2011/9/26 Radim Kolar 
>
>>  
>> https://issues.apache.org/**jira/browse/GERONIMO-6171<https://issues.apache.org/jira/browse/GERONIMO-6171>
>>
>> included sample application source file + WAR linked to rapidshare
>>
>>
>
>
> --
> Ivan
>



-- 
Ivan


Re: unable to install plugin procrun

2011-10-07 Thread Ivan
I just tried it on my local environment, and it works for me. I guess that
the firewall blocks the access from Geronimo process.

2011/9/28 Philipp B. 

> Hi Geronimo-Community,
>
> currently I am trying to install the Plugin "procrun" (Geronimo Plugins,
> Windows Service Wrapper) according to the wiki-page of the
> geronimo-Documentation:
>
> https://cwiki.apache.org/GMOxDOC22/running-geronimo-as-a-windows-service.html
>
> I tried to add this repository to my repository-list via the Geronimo web
> console: http://geronimo.apache.org/plugins/geronimo-2.2/
>
> But I always receive the following error:
> Unable to connect to 
> http://geronimo.apache.org/plugins/geronimo-2.2/(Connection timed out: 
> connect)
>
> Opening this site with the webbrowser works fine.
>
> I am using geronimo-tomcat6-javaee5-2.2.1. The logfile does not contain any
> information about this error.
>
> Can anyone help me?
>
> Thanks in Advance,
>
> Philipp
>



-- 
Ivan


Re: How to override the CXF libraries built in to Geronio

2011-09-27 Thread Ivan
It is interesting, with tomcat assembly, by default, Axis2 provides the both
jaxws and saaj implementations, cxf should not be used. anyway, the filter
configurations below will make sure those cxf classes are not loaded.
For the class "WSBindingProvider", suppose there is no typo error. It looks
to me that the class is from RI JAXWS implementation ? Not from Axis2 and
CXF. This class should have no relation with saaj, IMO.
I think that it will be good to paste your sample code if possible, a

2011/9/27 adamruggles 

> Yes it's using saaj.  I'm using the Tomcat version of geronimo.  Here are
> the
> relavant hidden classes specified in my geronimo-web.
>
> org.apache.ws.commons.schema
> org.apache.axis2
> org.apache.cxf
>
> Another example of cxf not being loaded correctly is I'm unable to cast the
> client to a WSBindingProvider to add headers.  I get a class cast
> exception.
> Works fine in my unit tests were I have more control over the library
> classpath order.  It's my understanding that you need to have the cxf
> classes in the classpath before the sun jars.
>
> --
> View this message in context:
> http://apache-geronimo.328035.n3.nabble.com/How-to-override-the-CXF-libraries-built-in-to-Geronio-tp3360086p3372832.html
> Sent from the Users mailing list archive at Nabble.com.
>



-- 
Ivan


Re: Problems running grails applications on Geronimo 2.1

2011-09-26 Thread Ivan
Thanks, Radim, I will take a look at it asap !

2011/9/26 Radim Kolar 

>  
> https://issues.apache.org/**jira/browse/GERONIMO-6171<https://issues.apache.org/jira/browse/GERONIMO-6171>
>
> included sample application source file + WAR linked to rapidshare
>
>


-- 
Ivan


Re: How to override the CXF libraries built in to Geronio

2011-09-25 Thread Ivan
Could you please point out that which default SUN packages are used ? saaj
impl ?
Have you tried to use the hidden-classes options mentioned in the doc
https://cwiki.apache.org/GMOxDOC21/geronimo-webxml.html ?

2011/9/23 adamruggles 

> I'm using Geronimo version 2.2 on JDK 1.6 (OSX 10.5).  I have a WAR project
> that uses a newer version of CXF than the one included in Geronimo.  I
> can't
> seem to get Geronimo to pickup the CXF implementation that I've included
> with my project.  Instead it seems to be using the default SUN packages.
> How do I override this?
>
> Right now I have all my dependencies added to the Geronimo repository and
> specified in my geronimo-web.xml file.
>
> Thanks in advance.
>
> --
> View this message in context:
> http://apache-geronimo.328035.n3.nabble.com/How-to-override-the-CXF-libraries-built-in-to-Geronio-tp3360086p3360086.html
> Sent from the Users mailing list archive at Nabble.com.
>



-- 
Ivan


Re: Problems running grails applications on Geronimo 2.1

2011-09-25 Thread Ivan
We are sorry that you got problems for rails support in Geronimo, while not
sure I miss your emails in the past for the grail issues, if you could
provide a sample, that will be better for the community to find what
happens. And if there is really an issue in Geronimo, we will do fix it in
the coming 2.1.8 release.

2011/9/25 Radim Kolar 

> 1.
> There is problem with running Grails application on G 2.1 if application is
> deployed to root (not subdirectory) then URL mappings do not work correctly.
> i.e. instead of /controler/index you have to write /controler/index.gsp
> Grails deployed in ROOT works correctly on Jetty, Tomcat, Glassfish and
> Websphere 7 so mistake is clearly on G side.
>
> 2.
> Second problem with running Grails applications on geronimo is that it is
> really difficult to make classloading work even with inverse classloading it
> still do not works. you have to make lists of 
> which is really difficult. I was not able to make Grails applications which
> are using web services to work.
>
> Currently i just give up on Geronimo and moved to Glassfish. Glassfish 3 is
> way better than Glassfish v2, but it has its problems too. Advantage is
> larger user community and better documentation.
>



-- 
Ivan


Re: Geronimo 2.2 + Spring

2011-09-14 Thread Ivan
Hmm, I just tried it locally, and find the same issue with you, will have a
close look at the codes. Please check my comments below, hope it helps.

2011/9/14 Ghetolay 

> Hi, I deleted the j2ee-server and j2ee-security dependency, I don't
> remember
> why I had added them.
> I'm gonna make a small resume of my initial problem because I talked about
> several problem.
>
> For the jta-datasource and multiple roles I was just asking if something
> was
> wrong in my plan.xml file. I'll try to solve them by myself and if I don't
> succeed I'll create a new post about it.
>
> My Real problem here is the spring dependency(aop error) wich I solve by
> adding the  element to my plan.xml. What I understood is :
> The problem come from cxf wich is my parent classloader and shouldn't be
> when there isn't web service in the project.
>
> I checked everything in my project to see where it could come from then I
> created a new project. My new project was very simple it contains only a
> web.xml and a plan.xml described here :
>
>
> 
>  Test
>  
>index.html
>  
> 
>
> 
>
>
>default
>Test
> 1.0
>car
> 
>
>/Test
> 
>
>
> I was not expecting this project to work because I don't even created the
> index.html file.
> After that I searched about my project in the classloader view and cxf was
> in the parent tree.
> Obviously there isn't any web service in this project.
>
> My project work fine (at least for now) with the hidden-classe element.
> So I have 2 simple question :
> - Is it really a problem to do not use spring from geronimo and to use the
> one included in my project ?
>
 It is not a problem to do this. And actually, there are many similar
requests for other components, e.g. users would like to use the component of
the specified version, while Geronimo uses another version internally.


> It's a small waste of space because I have to duplicate the jar.
>

   If there are more than one applications deployed in Geronimo, and all of
them require same version spring library. One solution is to deploy those
jar files in the repository, and dependency in your application. If you feel
not convenient for many dependencies (I know there are many jar files), you
could simply defined a sharedlib gbean in your application deployment plan
and place all those jar files in one folder.The both solutions above will
share jar files among many applications, not share classes.


> - What are the real consequences to have cxf in my classloader tree ? Is it
> essential ?
>

   The best scenario is that, if no web service is used in the target
application, cxf should not be added as a dependency, as it would make the
class searching more efficient. But it should not hurt your application, the
only problem I saw is like spring components issue you found, some
unexpected classes are in the parent classloaders of the deployed
application.


>
> If both the answer are no I think I'll stop wasting time with that and keep
> working with spring classes hidden from geronimo and use mine.
>
> Important not to be forgotten : Thks a lot :)
>
> --
> View this message in context:
> http://apache-geronimo.328035.n3.nabble.com/Geronimo-2-2-Spring-tp3313502p3335922.html
> Sent from the Users mailing list archive at Nabble.com.
>



-- 
Ivan


Re: Geronimo 2.2 + Spring

2011-09-12 Thread Ivan
uot;org.apache.geronimo.security.realm.providers.GeronimoGroupPrincipal"/>
>
> class="org.apache.geronimo.security.realm.providers.GeronimoGroupPrincipal"/>
>
>
>
> class="org.apache.geronimo.security.realm.providers.GeronimoGroupPrincipal"/>
>
>
>
> 
>
>
> I have difficulties to use my database pool as jta-datasource and to use
> multiple roles in my realm(infinite loading on login) but i saw lots of
> subject about it so i'll investigate a bit more about that. But if you see
> something wrong in my files you could save me time :)
>
> Thks again for your time.
>
> --
> View this message in context:
> http://apache-geronimo.328035.n3.nabble.com/Geronimo-2-2-Spring-tp3313502p3329690.html
> Sent from the Users mailing list archive at Nabble.com.
>



-- 
Ivan


Re: Geronimo 2.2 + Spring

2011-09-09 Thread Ivan
Hi, wonder whether you are using geronimo-jetty assembly and have web
service in your application ? One of the usual reason to import spring
dependency is that cxf is in the in the parent tree. You might also use the
classloader portlet to find which plugins are the parents of your target
application. First, search with your application's artifact name, then click
the reverse tree button.

2011/9/9 Ghetolay 

> So I found that geronimo include it's own spring librairies and it was
> using
> them when it load my application.
>
> Unfortunately, and I don't know why, Geronimo doesn't include the
> aopalliance depency wich is required by spring-aop. I still don't know why
> but Geronimo doesn't use my classpath to find that depency either.
>
> Anyway the only fix I found is to add org.springframework to my plan.xml as
> a hidden-class.
> This way geronimo load all the spring classes from my classpath and not
> it's
> own.
>
> Here is my final plan.xml :
>
>
> 
>
> ...
>
>
>org.springframework
>
> 
>
> 
>
>
>
> --
> View this message in context:
> http://apache-geronimo.328035.n3.nabble.com/Geronimo-2-2-Spring-tp3313502p3322805.html
> Sent from the Users mailing list archive at Nabble.com.
>



-- 
Ivan


  1   2   3   >