You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by jar <ja...@gmail.com> on 2014/07/23 18:14:06 UTC

java:comp/env/ejb/BeanFactoryPath

I'm having trouble getting a JNDI entry setup for my attempt to migrate some
older JBoss 5.1.0 applications over to Tomee

The source code uses annotations to handle most of the settings, and Tomee
seems to be noticing this and auto-wiring things up such that my
message-driven beans appear to be listening to their intended endpoints.

However, as soon as I try to exercise any of the beans with a message, I get
the following exception: 

I've tried experimenting with adding an ejb-jar.xml file that includes
env-entry elements defining a value for this parameter, but I don't believe
Tomee is actually reading the file.

Any ideas on how I can get past this?

SEVERE: EjbTransactionUtil.handleSystemException: Define an environment
variable [java:comp/env/ejb/BeanFactoryPath] containing the class path
locations of XML bean definition files; nested exception is
javax.naming.NameNotFoundException: Name "comp/env/ejb/BeanFactoryPath" not
found.
org.springframework.beans.factory.access.BootstrapException: Define an
environment variable [java:comp/env/ejb/BeanFactoryPath] containing the
class path locations of XML bean definition files; nested exception is
javax.naming.NameNotFoundException: Name "comp/env/ejb/BeanFactoryPath" not
found.
        at
org.springframework.context.access.ContextJndiBeanFactoryLocator.useBeanFactory(ContextJndiBeanFactoryLocator.java:71)
        at
org.springframework.ejb.support.AbstractEnterpriseBean.loadBeanFactory(AbstractEnterpriseBean.java:121)
        at
org.springframework.ejb.support.AbstractMessageDrivenBean.ejbCreate(AbstractMessageDrivenBean.java:81)
        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.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:182)
        at
org.apache.openejb.core.interceptor.ReflectionInvocationContext$LifecycleInvocation.invoke(ReflectionInvocationContext.java:214)
        at
org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:164)
        at
org.apache.openejb.monitoring.StatsInterceptor.record(StatsInterceptor.java:180)
        at
org.apache.openejb.monitoring.StatsInterceptor.PostConstruct(StatsInterceptor.java:108)
        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.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:182)
        at
org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:164)
        at
org.apache.openejb.core.interceptor.InterceptorStack.invoke(InterceptorStack.java:80)




--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/java-comp-env-ejb-BeanFactoryPath-tp4670687.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Re: java:comp/env/ejb/BeanFactoryPath

Posted by Romain Manni-Bucau <rm...@gmail.com>.
I assumed it was a war.



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


2014-07-24 13:05 GMT+02:00 Alex Soto <as...@gmail.com>:

> Well both places are valid but depending on your package should be in one
> place or other.
>
>
> 2014-07-24 8:43 GMT+02:00 romych <ro...@mail.ru>:
>
> > *jar* talk about *META-INF*/ejb-jar.xml but Romain about
> > *WEB-INF*/ejb-jar.xml.
> >
> >
> >
> >
> >
> > --
> > View this message in context:
> >
> http://tomee-openejb.979440.n4.nabble.com/java-comp-env-ejb-BeanFactoryPath-tp4670687p4670703.html
> > Sent from the TomEE Users mailing list archive at Nabble.com.
> >
>
>
>
> --
> +----------------------------------------------------------+
>   Alex Soto Bueno - Computer Engineer
>   www.lordofthejars.com
> +----------------------------------------------------------+
>

Re: java:comp/env/ejb/BeanFactoryPath

Posted by Alex Soto <as...@gmail.com>.
Well both places are valid but depending on your package should be in one
place or other.


2014-07-24 8:43 GMT+02:00 romych <ro...@mail.ru>:

> *jar* talk about *META-INF*/ejb-jar.xml but Romain about
> *WEB-INF*/ejb-jar.xml.
>
>
>
>
>
> --
> View this message in context:
> http://tomee-openejb.979440.n4.nabble.com/java-comp-env-ejb-BeanFactoryPath-tp4670687p4670703.html
> Sent from the TomEE Users mailing list archive at Nabble.com.
>



-- 
+----------------------------------------------------------+
  Alex Soto Bueno - Computer Engineer
  www.lordofthejars.com
+----------------------------------------------------------+

Re: java:comp/env/ejb/BeanFactoryPath

Posted by romych <ro...@mail.ru>.
*jar* talk about *META-INF*/ejb-jar.xml but Romain about 
*WEB-INF*/ejb-jar.xml.





--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/java-comp-env-ejb-BeanFactoryPath-tp4670687p4670703.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Re: java:comp/env/ejb/BeanFactoryPath

Posted by Alex Soto <as...@gmail.com>.
ejb-jar.xml is a file which if it is deployed inside EAR it should be at
META-INF of every JAR file. EAR file should be dropped in apps directory
not webapps.

But if your EJBs are in a WAR file as a JAR file (WEB-INF/lib), although
you putting  a jar with an EJB structure, Java EE spec says that this JAR
will be treat as any other JAR in classpath (not like EJB-JAR) and the
ejb-jar.xml of all jars which contains EJBs should be extracted and stored
at WEB-INF directory.

I have not read the full mail list but has it sense to your case?




2014-07-23 23:46 GMT+02:00 Romain Manni-Bucau <rm...@gmail.com>:

> without testing locally no real idea.
>
> Maybe the jar name is filtered. Debug level can surely help
>
>
>
> Romain Manni-Bucau
> Twitter: @rmannibucau
> Blog: http://rmannibucau.wordpress.com/
> LinkedIn: http://fr.linkedin.com/in/rmannibucau
> Github: https://github.com/rmannibucau
>
>
> 2014-07-23 23:20 GMT+02:00 jar <ja...@gmail.com>:
>
> > Can you think of any mistakes that would keep tomee from reading my
> > ejb-jar.xml file?
> >
> > I'm running with an otherwise exploded .ear file in my webapps directory,
> > and when I corrupt the xml element naming in ejb-jar.xml, I don't get any
> > startup complaints in catalina.out
> >
> > Here is the catalina.out  log when I deploy my application exploded
> > directory manuall into the webapps dir .... using the following as sthe
> > beginning of the ejb-jar.xml file ... (notice no complaints in the log
> > ....)
> >
> > <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
> > <xxxejb-jar xmlns="http://java.sun.com/xml/ns/javaee">
> >
> >
> >
> > Jul 23, 2014 2:18:56 PM org.apache.catalina.startup.HostConfig
> > deployDirectory
> > INFO: Deploying web application directory
> > /usr/local/Tideworks/gatekeeper-2.0/apache-tomee-plus-1.6.0.1/webapps/GMS
> > Jul 23, 2014 2:18:56 PM org.apache.tomee.catalina.TomcatWebAppBuilder
> init
> > INFO: ------------------------- localhost -> /GMS
> > Jul 23, 2014 2:18:56 PM org.apache.tomcat.util.digester.Digester
> endElement
> > WARNING:   No rules found matching 'Context/env-entry/env-entry-name'.
> > Jul 23, 2014 2:18:56 PM org.apache.tomcat.util.digester.Digester
> endElement
> > WARNING:   No rules found matching 'Context/env-entry/env-entry-type'.
> > Jul 23, 2014 2:18:56 PM org.apache.tomcat.util.digester.Digester
> endElement
> > WARNING:   No rules found matching 'Context/env-entry/env-entry-value'.
> > Jul 23, 2014 2:18:56 PM org.apache.tomcat.util.digester.Digester
> endElement
> > WARNING:   No rules found matching 'Context/env-entry'.
> > Jul 23, 2014 2:18:56 PM org.apache.openejb.util.OptionsLog info
> > INFO: Using 'openejb.deployments.classpath.filter.systemapps=false'
> > Jul 23, 2014 2:18:56 PM org.apache.openejb.config.DeploymentsResolver
> > loadFromClasspath
> > INFO: Inspecting classpath for applications: 28 urls. Consider adjusting
> > your exclude/include.  Current settings:
> > openejb.deployments.classpath.exclude='',
> > openejb.deployments.classpath.include='.*'
> > Jul 23, 2014 2:18:56 PM org.apache.openejb.util.OptionsLog info
> > INFO: Using
> > 'openejb.default.deployment-module=org.apache.openejb.config.WebModule'
> > Jul 23, 2014 2:18:56 PM org.apache.openejb.util.OptionsLog info
> > INFO: Using
> > 'openejb.default.deployment-module=org.apache.openejb.config.WebModule'
> > Jul 23, 2014 2:18:56 PM org.apache.openejb.util.OptionsLog info
> > INFO: Using
> > 'openejb.default.deployment-module=org.apache.openejb.config.WebModule'
> > Jul 23, 2014 2:18:56 PM org.apache.openejb.util.OptionsLog info
> > INFO: Using
> > 'openejb.default.deployment-module=org.apache.openejb.config.WebModule'
> > Jul 23, 2014 2:18:56 PM org.apache.openejb.util.OptionsLog info
> > INFO: Using
> > 'openejb.default.deployment-module=org.apache.openejb.config.WebModule'
> > Jul 23, 2014 2:18:56 PM org.apache.openejb.util.OptionsLog info
> > INFO: Using
> > 'openejb.default.deployment-module=org.apache.openejb.config.WebModule'
> > Jul 23, 2014 2:18:56 PM org.apache.openejb.util.OptionsLog info
> > INFO: Using
> > 'openejb.default.deployment-module=org.apache.openejb.config.WebModule'
> > Jul 23, 2014 2:18:56 PM org.apache.openejb.config.DeploymentsResolver
> > processUrls
> > INFO: Found PersistenceModule in classpath:
> >
> >
> /usr/local/Tideworks/gatekeeper-2.0/apache-tomee-plus-1.6.0.1/webapps/GMS/GMSStore-minus-beans.jar
> > Jul 23, 2014 2:18:56 PM org.apache.openejb.util.OptionsLog info
> > INFO: Using
> > 'openejb.default.deployment-module=org.apache.openejb.config.WebModule'
> > Jul 23, 2014 2:18:56 PM org.apache.openejb.util.OptionsLog info
> > INFO: Using
> > 'openejb.default.deployment-module=org.apache.openejb.config.WebModule'
> > Jul 23, 2014 2:18:56 PM org.apache.openejb.util.OptionsLog info
> > INFO: Using
> > 'openejb.default.deployment-module=org.apache.openejb.config.WebModule'
> > Jul 23, 2014 2:18:56 PM org.apache.openejb.util.OptionsLog info
> > INFO: Using
> > 'openejb.default.deployment-module=org.apache.openejb.config.WebModule'
> >
> >
> >
> >
> > --
> > View this message in context:
> >
> http://tomee-openejb.979440.n4.nabble.com/java-comp-env-ejb-BeanFactoryPath-tp4670687p4670697.html
> > Sent from the TomEE Users mailing list archive at Nabble.com.
> >
>



-- 
+----------------------------------------------------------+
  Alex Soto Bueno - Computer Engineer
  www.lordofthejars.com
+----------------------------------------------------------+

Re: java:comp/env/ejb/BeanFactoryPath

Posted by Romain Manni-Bucau <rm...@gmail.com>.
without testing locally no real idea.

Maybe the jar name is filtered. Debug level can surely help



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


2014-07-23 23:20 GMT+02:00 jar <ja...@gmail.com>:

> Can you think of any mistakes that would keep tomee from reading my
> ejb-jar.xml file?
>
> I'm running with an otherwise exploded .ear file in my webapps directory,
> and when I corrupt the xml element naming in ejb-jar.xml, I don't get any
> startup complaints in catalina.out
>
> Here is the catalina.out  log when I deploy my application exploded
> directory manuall into the webapps dir .... using the following as sthe
> beginning of the ejb-jar.xml file ... (notice no complaints in the log
> ....)
>
> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
> <xxxejb-jar xmlns="http://java.sun.com/xml/ns/javaee">
>
>
>
> Jul 23, 2014 2:18:56 PM org.apache.catalina.startup.HostConfig
> deployDirectory
> INFO: Deploying web application directory
> /usr/local/Tideworks/gatekeeper-2.0/apache-tomee-plus-1.6.0.1/webapps/GMS
> Jul 23, 2014 2:18:56 PM org.apache.tomee.catalina.TomcatWebAppBuilder init
> INFO: ------------------------- localhost -> /GMS
> Jul 23, 2014 2:18:56 PM org.apache.tomcat.util.digester.Digester endElement
> WARNING:   No rules found matching 'Context/env-entry/env-entry-name'.
> Jul 23, 2014 2:18:56 PM org.apache.tomcat.util.digester.Digester endElement
> WARNING:   No rules found matching 'Context/env-entry/env-entry-type'.
> Jul 23, 2014 2:18:56 PM org.apache.tomcat.util.digester.Digester endElement
> WARNING:   No rules found matching 'Context/env-entry/env-entry-value'.
> Jul 23, 2014 2:18:56 PM org.apache.tomcat.util.digester.Digester endElement
> WARNING:   No rules found matching 'Context/env-entry'.
> Jul 23, 2014 2:18:56 PM org.apache.openejb.util.OptionsLog info
> INFO: Using 'openejb.deployments.classpath.filter.systemapps=false'
> Jul 23, 2014 2:18:56 PM org.apache.openejb.config.DeploymentsResolver
> loadFromClasspath
> INFO: Inspecting classpath for applications: 28 urls. Consider adjusting
> your exclude/include.  Current settings:
> openejb.deployments.classpath.exclude='',
> openejb.deployments.classpath.include='.*'
> Jul 23, 2014 2:18:56 PM org.apache.openejb.util.OptionsLog info
> INFO: Using
> 'openejb.default.deployment-module=org.apache.openejb.config.WebModule'
> Jul 23, 2014 2:18:56 PM org.apache.openejb.util.OptionsLog info
> INFO: Using
> 'openejb.default.deployment-module=org.apache.openejb.config.WebModule'
> Jul 23, 2014 2:18:56 PM org.apache.openejb.util.OptionsLog info
> INFO: Using
> 'openejb.default.deployment-module=org.apache.openejb.config.WebModule'
> Jul 23, 2014 2:18:56 PM org.apache.openejb.util.OptionsLog info
> INFO: Using
> 'openejb.default.deployment-module=org.apache.openejb.config.WebModule'
> Jul 23, 2014 2:18:56 PM org.apache.openejb.util.OptionsLog info
> INFO: Using
> 'openejb.default.deployment-module=org.apache.openejb.config.WebModule'
> Jul 23, 2014 2:18:56 PM org.apache.openejb.util.OptionsLog info
> INFO: Using
> 'openejb.default.deployment-module=org.apache.openejb.config.WebModule'
> Jul 23, 2014 2:18:56 PM org.apache.openejb.util.OptionsLog info
> INFO: Using
> 'openejb.default.deployment-module=org.apache.openejb.config.WebModule'
> Jul 23, 2014 2:18:56 PM org.apache.openejb.config.DeploymentsResolver
> processUrls
> INFO: Found PersistenceModule in classpath:
>
> /usr/local/Tideworks/gatekeeper-2.0/apache-tomee-plus-1.6.0.1/webapps/GMS/GMSStore-minus-beans.jar
> Jul 23, 2014 2:18:56 PM org.apache.openejb.util.OptionsLog info
> INFO: Using
> 'openejb.default.deployment-module=org.apache.openejb.config.WebModule'
> Jul 23, 2014 2:18:56 PM org.apache.openejb.util.OptionsLog info
> INFO: Using
> 'openejb.default.deployment-module=org.apache.openejb.config.WebModule'
> Jul 23, 2014 2:18:56 PM org.apache.openejb.util.OptionsLog info
> INFO: Using
> 'openejb.default.deployment-module=org.apache.openejb.config.WebModule'
> Jul 23, 2014 2:18:56 PM org.apache.openejb.util.OptionsLog info
> INFO: Using
> 'openejb.default.deployment-module=org.apache.openejb.config.WebModule'
>
>
>
>
> --
> View this message in context:
> http://tomee-openejb.979440.n4.nabble.com/java-comp-env-ejb-BeanFactoryPath-tp4670687p4670697.html
> Sent from the TomEE Users mailing list archive at Nabble.com.
>

Re: java:comp/env/ejb/BeanFactoryPath

Posted by jar <ja...@gmail.com>.
Can you think of any mistakes that would keep tomee from reading my
ejb-jar.xml file?

I'm running with an otherwise exploded .ear file in my webapps directory,
and when I corrupt the xml element naming in ejb-jar.xml, I don't get any
startup complaints in catalina.out

Here is the catalina.out  log when I deploy my application exploded
directory manuall into the webapps dir .... using the following as sthe
beginning of the ejb-jar.xml file ... (notice no complaints in the log ....)

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<xxxejb-jar xmlns="http://java.sun.com/xml/ns/javaee">



Jul 23, 2014 2:18:56 PM org.apache.catalina.startup.HostConfig
deployDirectory
INFO: Deploying web application directory
/usr/local/Tideworks/gatekeeper-2.0/apache-tomee-plus-1.6.0.1/webapps/GMS
Jul 23, 2014 2:18:56 PM org.apache.tomee.catalina.TomcatWebAppBuilder init
INFO: ------------------------- localhost -> /GMS
Jul 23, 2014 2:18:56 PM org.apache.tomcat.util.digester.Digester endElement
WARNING:   No rules found matching 'Context/env-entry/env-entry-name'.
Jul 23, 2014 2:18:56 PM org.apache.tomcat.util.digester.Digester endElement
WARNING:   No rules found matching 'Context/env-entry/env-entry-type'.
Jul 23, 2014 2:18:56 PM org.apache.tomcat.util.digester.Digester endElement
WARNING:   No rules found matching 'Context/env-entry/env-entry-value'.
Jul 23, 2014 2:18:56 PM org.apache.tomcat.util.digester.Digester endElement
WARNING:   No rules found matching 'Context/env-entry'.
Jul 23, 2014 2:18:56 PM org.apache.openejb.util.OptionsLog info
INFO: Using 'openejb.deployments.classpath.filter.systemapps=false'
Jul 23, 2014 2:18:56 PM org.apache.openejb.config.DeploymentsResolver
loadFromClasspath
INFO: Inspecting classpath for applications: 28 urls. Consider adjusting
your exclude/include.  Current settings:
openejb.deployments.classpath.exclude='',
openejb.deployments.classpath.include='.*'
Jul 23, 2014 2:18:56 PM org.apache.openejb.util.OptionsLog info
INFO: Using
'openejb.default.deployment-module=org.apache.openejb.config.WebModule'
Jul 23, 2014 2:18:56 PM org.apache.openejb.util.OptionsLog info
INFO: Using
'openejb.default.deployment-module=org.apache.openejb.config.WebModule'
Jul 23, 2014 2:18:56 PM org.apache.openejb.util.OptionsLog info
INFO: Using
'openejb.default.deployment-module=org.apache.openejb.config.WebModule'
Jul 23, 2014 2:18:56 PM org.apache.openejb.util.OptionsLog info
INFO: Using
'openejb.default.deployment-module=org.apache.openejb.config.WebModule'
Jul 23, 2014 2:18:56 PM org.apache.openejb.util.OptionsLog info
INFO: Using
'openejb.default.deployment-module=org.apache.openejb.config.WebModule'
Jul 23, 2014 2:18:56 PM org.apache.openejb.util.OptionsLog info
INFO: Using
'openejb.default.deployment-module=org.apache.openejb.config.WebModule'
Jul 23, 2014 2:18:56 PM org.apache.openejb.util.OptionsLog info
INFO: Using
'openejb.default.deployment-module=org.apache.openejb.config.WebModule'
Jul 23, 2014 2:18:56 PM org.apache.openejb.config.DeploymentsResolver
processUrls
INFO: Found PersistenceModule in classpath:
/usr/local/Tideworks/gatekeeper-2.0/apache-tomee-plus-1.6.0.1/webapps/GMS/GMSStore-minus-beans.jar
Jul 23, 2014 2:18:56 PM org.apache.openejb.util.OptionsLog info
INFO: Using
'openejb.default.deployment-module=org.apache.openejb.config.WebModule'
Jul 23, 2014 2:18:56 PM org.apache.openejb.util.OptionsLog info
INFO: Using
'openejb.default.deployment-module=org.apache.openejb.config.WebModule'
Jul 23, 2014 2:18:56 PM org.apache.openejb.util.OptionsLog info
INFO: Using
'openejb.default.deployment-module=org.apache.openejb.config.WebModule'
Jul 23, 2014 2:18:56 PM org.apache.openejb.util.OptionsLog info
INFO: Using
'openejb.default.deployment-module=org.apache.openejb.config.WebModule'




--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/java-comp-env-ejb-BeanFactoryPath-tp4670687p4670697.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Re: java:comp/env/ejb/BeanFactoryPath

Posted by Romain Manni-Bucau <rm...@gmail.com>.
dont have time to dig now into this issue but WEB-INF/ejb-jar.xml is read
for sure




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


2014-07-23 22:57 GMT+02:00 jar <ja...@gmail.com>:

> I've tried ....
>
> WEB-INF/web.xml
>
>      <env-entry>
>          <env-entry-name>ejb/BeanFactoryPath</env-entry-name>
>          <env-entry-type>java.lang.String</env-entry-type>
>          <env-entry-value>path_to_my_file</env-entry-value>
>      </env-entry>
>
> META-INF/ejb-jar.xml   (I don't believe Tomee is even reading this file, as
> I get no complaints when I purposefully malform the contents )
>
>                 <message-driven>
>                         <ejb-name>RequestResponseHandlerMDB</ejb-name>
>
> <resource-adapter-name>MyJmsResourceAdapter</resource-adapter-name>
>                         <configuration-name>ActiveMQ Message Driven
> Bean</configuration-name>
>                         <env-entry>
>
> <env-entry-name>ejb/BeanFactoryPath</env-entry-name>
>
> <env-entry-type>java.lang.String</env-entry-type>
>
> <env-entry-value>path_to_my_file</env-entry-value>
>                         </env-entry>
>                 </message-driven>
>
> META-INF/context.xml
>
>       <Environment name="ejb/BeanFactoryPath" value="path_to_my_file"
> type="java.lang.String" override="true" />
>
>      <env-entry>
>          <env-entry-name>ejb/BeanFactoryPath</env-entry-name>
>          <env-entry-type>java.lang.String</env-entry-type>
>          <env-entry-value>path_to_my_file</env-entry-value>
>      </env-entry>
>
>
> I've also tried every variation of the jndi key up to and including the
> full:   java:comp/env/ejb/BeanFactoryPath
>
>
>
>
> --
> View this message in context:
> http://tomee-openejb.979440.n4.nabble.com/java-comp-env-ejb-BeanFactoryPath-tp4670687p4670695.html
> Sent from the TomEE Users mailing list archive at Nabble.com.
>

Re: java:comp/env/ejb/BeanFactoryPath

Posted by jar <ja...@gmail.com>.
I've tried ....

WEB-INF/web.xml

     <env-entry>
         <env-entry-name>ejb/BeanFactoryPath</env-entry-name>
         <env-entry-type>java.lang.String</env-entry-type>
         <env-entry-value>path_to_my_file</env-entry-value>
     </env-entry>

META-INF/ejb-jar.xml   (I don't believe Tomee is even reading this file, as
I get no complaints when I purposefully malform the contents )

                <message-driven>
                        <ejb-name>RequestResponseHandlerMDB</ejb-name>
                       
<resource-adapter-name>MyJmsResourceAdapter</resource-adapter-name>
                        <configuration-name>ActiveMQ Message Driven
Bean</configuration-name>
                        <env-entry>
                               
<env-entry-name>ejb/BeanFactoryPath</env-entry-name>
                               
<env-entry-type>java.lang.String</env-entry-type>
                               
<env-entry-value>path_to_my_file</env-entry-value>
                        </env-entry>
                </message-driven>

META-INF/context.xml

      <Environment name="ejb/BeanFactoryPath" value="path_to_my_file"
type="java.lang.String" override="true" />

     <env-entry>
         <env-entry-name>ejb/BeanFactoryPath</env-entry-name>
         <env-entry-type>java.lang.String</env-entry-type>
         <env-entry-value>path_to_my_file</env-entry-value>
     </env-entry>


I've also tried every variation of the jndi key up to and including the
full:   java:comp/env/ejb/BeanFactoryPath




--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/java-comp-env-ejb-BeanFactoryPath-tp4670687p4670695.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Re: java:comp/env/ejb/BeanFactoryPath

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hi

how do you define your ejb name (ejb/BeanFactoryPath)?



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


2014-07-23 18:14 GMT+02:00 jar <ja...@gmail.com>:

> I'm having trouble getting a JNDI entry setup for my attempt to migrate
> some
> older JBoss 5.1.0 applications over to Tomee
>
> The source code uses annotations to handle most of the settings, and Tomee
> seems to be noticing this and auto-wiring things up such that my
> message-driven beans appear to be listening to their intended endpoints.
>
> However, as soon as I try to exercise any of the beans with a message, I
> get
> the following exception:
>
> I've tried experimenting with adding an ejb-jar.xml file that includes
> env-entry elements defining a value for this parameter, but I don't believe
> Tomee is actually reading the file.
>
> Any ideas on how I can get past this?
>
> SEVERE: EjbTransactionUtil.handleSystemException: Define an environment
> variable [java:comp/env/ejb/BeanFactoryPath] containing the class path
> locations of XML bean definition files; nested exception is
> javax.naming.NameNotFoundException: Name "comp/env/ejb/BeanFactoryPath" not
> found.
> org.springframework.beans.factory.access.BootstrapException: Define an
> environment variable [java:comp/env/ejb/BeanFactoryPath] containing the
> class path locations of XML bean definition files; nested exception is
> javax.naming.NameNotFoundException: Name "comp/env/ejb/BeanFactoryPath" not
> found.
>         at
>
> org.springframework.context.access.ContextJndiBeanFactoryLocator.useBeanFactory(ContextJndiBeanFactoryLocator.java:71)
>         at
>
> org.springframework.ejb.support.AbstractEnterpriseBean.loadBeanFactory(AbstractEnterpriseBean.java:121)
>         at
>
> org.springframework.ejb.support.AbstractMessageDrivenBean.ejbCreate(AbstractMessageDrivenBean.java:81)
>         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.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:182)
>         at
>
> org.apache.openejb.core.interceptor.ReflectionInvocationContext$LifecycleInvocation.invoke(ReflectionInvocationContext.java:214)
>         at
>
> org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:164)
>         at
>
> org.apache.openejb.monitoring.StatsInterceptor.record(StatsInterceptor.java:180)
>         at
>
> org.apache.openejb.monitoring.StatsInterceptor.PostConstruct(StatsInterceptor.java:108)
>         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.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:182)
>         at
>
> org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:164)
>         at
>
> org.apache.openejb.core.interceptor.InterceptorStack.invoke(InterceptorStack.java:80)
>
>
>
>
> --
> View this message in context:
> http://tomee-openejb.979440.n4.nabble.com/java-comp-env-ejb-BeanFactoryPath-tp4670687.html
> Sent from the TomEE Users mailing list archive at Nabble.com.
>