Hi;

I think that new XML beans.xml loading is not working correctly anymore. 
Because, I got FileNotFoundExceptions in the openwebbeans.tck tests. Problem is 
that beans.xml maybe in the jar file, but FileInputStream does not find file 
with given file name

For example in class TCKMetaDataDiscoveryImpl

 public void addBeanXml(URL url)
    {
        Asserts.assertNotNull(url);
        addWebBeansXmlLocation(url.getFile());
    }

url.getFile --> 
file:/x.jar!/org/jboss/testharness/impl/packaging/jsr299/default/beans.xml

But when FileInputStream get this as input parameter, throws Exception.

SOLUTION
------------------------

In class MetaDataDiscoveryService, I changed "public Set<String> 
getWebBeansXmlLocations();" to "public Set<URL> getWebBeansXmlLocations();" and 
updated other codes accordingly.

Now, it works correctly. Mark could you re-check for jetty container ?

PS : After changing the codes, please check that all of the other maven modules 
are compiled correctly :)

Thanks;

Gurkan




________________________________
From: Mark Struberg (JIRA) <[email protected]>
To: [email protected]
Sent: Saturday, April 18, 2009 1:32:14 AM
Subject: [jira] Created: (OWB-90) cannot find beans when working locally with 
jetty:run

cannot find beans when working locally with jetty:run
-----------------------------------------------------

                 Key: OWB-90
                 URL: https://issues.apache.org/jira/browse/OWB-90
             Project: OpenWebBeans
          Issue Type: Bug
          Components: Injection and Lookup
    Affects Versions: M1
            Reporter: Mark Struberg
            Assignee: Gurkan Erdogdu


OWB cannot find any beans while running locally in jetty because the beans.xml 
resides in target/guess/WEB-INF and the classes are in target/classes which 
isn't scanned therefor! 

Maybe we can introduce some fix for this in 
WarMetaDataDiscoveryImpl::createURLFromWARFile()?

A possible workaround in the meantime is to also add an empty 
src/main/resources/META-INF/beans.xml 


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


      

Reply via email to