You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomee.apache.org by AndyG <an...@orprovision.com> on 2012/12/20 11:48:16 UTC

Use a case insensitive key fallback for CoreContainerSystem AppContexts.

Two birds with one stone. May be a bug though?

The following error can be seen on the
http://ci.apache.org/builders/openejb-trunk-win-sunjdk build. It is caused
by a temp file issue, that may be more common on win platforms, which leads
to an undeploy / destroy call.

INFO - Deployed
Application(path=c:\slave4\openejb-trunk-win-sunjdk\build\itests\openejb-itests-client\target\openejb-itests-client-4.5.2-snapshot.jar)
INFO - Assembling app:
C:\slave4\openejb-trunk-win-sunjdk\build\itests\openejb-itests-beans\target\openejb-itests-beans-4.5.2-SNAPSHOT.jar
INFO - Undeploying app:
C:\slave4\openejb-trunk-win-sunjdk\build\itests\openejb-itests-beans\target\openejb-itests-beans-4.5.2-SNAPSHOT.jar
WARNING - Application id 'openejb-itests-beans-4.5.2-SNAPSHOT' not found in:
[openejb-itests-client-4.5.2-snapshot]
SEVERE - Application could not be deployed: 
C:\slave4\openejb-trunk-win-sunjdk\build\itests\openejb-itests-beans\target\openejb-itests-beans-4.5.2-SNAPSHOT.jar
org.apache.openejb.OpenEJBException: Creating application failed:
C:\slave4\openejb-trunk-win-sunjdk\build\itests\openejb-itests-beans\target\openejb-itests-beans-4.5.2-SNAPSHOT.jar:
The system cannot find the path specified
	at
org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:823)

The WARNING above is caused on destroy, which occurs due to the case of
'SNAPSHOT' and 'snapshot'.

To address the temp file issue I hardened
org.apache.openejb.assembler.classic.CmpJarBuilder#openJarFile.

I changed CoreContainerSystem to fallback to an insensitive key. It looks
safe to me, but maybe there is a deeper implication here? Thís fixes the
org.apache.openejb.assembler.classic.Assembler#destroyApplication call which
was failing to get the AppContext.

AppInfo.appId is a public field which is used for various lookups
throughout. It's case is never checked or enforced and is often interpreted
as an 'Object' key. Not really safe me thinks, but I didn't want to change
interfaces without checking with you guys that have a much deeper
understanding.

Either AppInfo.appId needs to bet a getter/setter, or it's case needs to be
enforced elsewhere.

Your thoughts?

Andy.





--
View this message in context: http://openejb.979440.n4.nabble.com/Use-a-case-insensitive-key-fallback-for-CoreContainerSystem-AppContexts-tp4659844.html
Sent from the OpenEJB Dev mailing list archive at Nabble.com.

Re: Use a case insensitive key fallback for CoreContainerSystem AppContexts.

Posted by David Blevins <da...@gmail.com>.
On Dec 20, 2012, at 5:28 AM, AndyG <an...@orprovision.com> wrote:

> Did the trick. The build moves on ....to the next failure 
> 
> Need to get that surefire thing hitched up.

Feel free to tinker with the Buildbot builder definition directly.  All committers have access:

Checkout: 

   https://svn.apache.org/repos/infra/infrastructure/buildbot/aegis/buildmaster/master1/projects

Our config file file is:

   https://svn.apache.org/repos/infra/infrastructure/buildbot/aegis/buildmaster/master1/projects/openejb.conf

All the *.conf files are in python.  The buildbot docs are here:

   http://buildbot.net/buildbot/docs/

We can add as many builders as we want.


-David


Re: Use a case insensitive key fallback for CoreContainerSystem AppContexts.

Posted by AndyG <an...@orprovision.com>.
Did the trick. The build moves on ....to the next failure 

Need to get that surefire thing hitched up.



--
View this message in context: http://openejb.979440.n4.nabble.com/Use-a-case-insensitive-key-fallback-for-CoreContainerSystem-AppContexts-tp4659844p4659858.html
Sent from the OpenEJB Dev mailing list archive at Nabble.com.

Re: Use a case insensitive key fallback for CoreContainerSystem AppContexts.

Posted by Romain Manni-Bucau <rm...@gmail.com>.
if it was only to get the appcontext the getappcontext method was the
place to fix

appId could be updated in AppInfoBuilder but wonder if we never use it
to create moduleId indirectly...

that's said did you track the case change? maybe that's juste a bad
File usage (a getAbsolutePath againse a canonicalpath for instance)

Romain Manni-Bucau
Twitter: @rmannibucau
Blog: http://rmannibucau.wordpress.com/
LinkedIn: http://fr.linkedin.com/in/rmannibucau
Github: https://github.com/rmannibucau



2012/12/20 AndyG <an...@orprovision.com>:
> destroyApplication