[JBoss JIRA] Created: (EJBTHREE-983) @EJB injection fails, RuntimeException, IllegalArgumentException
by dpocock (JIRA)
@EJB injection fails, RuntimeException, IllegalArgumentException
----------------------------------------------------------------
Key: EJBTHREE-983
URL: http://jira.jboss.com/jira/browse/EJBTHREE-983
Project: EJB 3.0
Issue Type: Bug
Components: EJB3 Extensions
Affects Versions: AS 4.2.0 GA, EJB 3.0 RC9 - Patch 1
Environment: Debian Linux, Sun Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_12-b04)
Reporter: dpocock
Similar to bug EJBTHREE-862. However, setting `Isolated' to false in $JBOSS_HOME/server/XXX/deploy/ear-deployer.xml does not resolve the issue for me.
Here is the scenario:
There are two applications, app1.ear and app2.ear.
app1.ear contains a stateless session bean, App1Bean, with local and remote interface
app2.ear contains a stateless session bean, App2Bean, which has a field defined like so:
@EJB(mappedName="app1/App1Bean/local") // I've tried local and remote
com.app1.ejb.session.App1 app1;
app1.ear and app2.ear are loaded successfully by the application server.
When App2Bean is activated, JBoss tries to perform the injections. At this point, the RuntimeException (see stack below) occurs.
App2Bean can successfully obtain a reference to app1 bean using the traditional JNDI lookup methods. This is a workaround.
When inspecting the stack, notice the presence of IllegalArgumentException, even though the interface matches.
16:22:12,155 ERROR [STDERR] java.lang.RuntimeException: Non matching type for inject of field: App1Bean app1 for type: $Proxy79 of jndiName env/App2Bean/app2
intfs: , App1, org.jboss.ejb3.JBossProxy, javax.ejb.EJBObject
16:22:12,155 ERROR [STDERR] at org.jboss.injection.JndiFieldInjector.inject(JndiFieldInjector.java:135)
16:22:12,155 ERROR [STDERR] at org.jboss.injection.JndiFieldInjector.inject(JndiFieldInjector.java:104)
16:22:12,155 ERROR [STDERR] at org.jboss.injection.JndiFieldInjector.inject(JndiFieldInjector.java:61)
16:22:12,155 ERROR [STDERR] at org.jboss.ejb3.AbstractPool.create(AbstractPool.java:92)
16:22:12,155 ERROR [STDERR] at org.jboss.ejb3.ThreadlocalPool.get(ThreadlocalPool.java:48)
16:22:12,165 ERROR [STDERR] at org.jboss.ejb3.cache.simple.SimpleStatefulCache.create(SimpleStatefulCache.java:209)
16:22:12,165 ERROR [STDERR] at org.jboss.ejb3.stateful.StatefulContainer.dynamicInvoke(StatefulContainer.java:303)
16:22:12,165 ERROR [STDERR] at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:106)
16:22:12,165 ERROR [STDERR] at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82)
16:22:12,175 ERROR [STDERR] at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:828)
16:22:12,175 ERROR [STDERR] at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:681)
16:22:12,175 ERROR [STDERR] at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:358)
16:22:12,175 ERROR [STDERR] at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:412)
16:22:12,175 ERROR [STDERR] at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:239)
16:22:12,185 ERROR [STDERR] Caused by: java.lang.IllegalArgumentException
16:22:12,185 ERROR [STDERR] at sun.reflect.UnsafeObjectFieldAccessorImpl.set(UnsafeObjectFieldAccessorImpl.java:63)
16:22:12,185 ERROR [STDERR] at java.lang.reflect.Field.set(Field.java:656)
16:22:12,185 ERROR [STDERR] at org.jboss.injection.JndiFieldInjector.inject(JndiFieldInjector.java:119)
16:22:12,185 ERROR [STDERR] ... 13 more
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 2 months
[JBoss JIRA] Created: (JBAS-4435) WebAppClassLoader.getResource() fails when the war is deployed as part of an ear
by Thomas Diesler (JIRA)
WebAppClassLoader.getResource() fails when the war is deployed as part of an ear
--------------------------------------------------------------------------------
Key: JBAS-4435
URL: http://jira.jboss.com/jira/browse/JBAS-4435
Project: JBoss Application Server
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: ClassLoading
Reporter: Thomas Diesler
Assigned To: Scott M Stark
For some reason WebAppClassLoader.getResource("WEB-INF/wsdl/TestEndpoint.wsdl")
fails when the war is deployed as part of an ear deployment.
I use this workaround in
static class VirtualFileClassLoader extends ClassLoader
{
private UnifiedVirtualFile vFile;
public VirtualFileClassLoader(UnifiedVirtualFile file, ClassLoader parent)
{
super(parent);
vFile = file;
}
@Override
public URL getResource(String name)
{
URL url = super.getResource(name);
if (url == null)
{
try
{
url = vFile.findChild(name).toURL();
}
catch (IOException e)
{
// ignore
}
}
return url;
}
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 3 months
[JBoss JIRA] Created: (EJBTHREE-913) java.lang.IllegalStateException in SessionContext::getCallerPrincipal()
by Mihail Druzinin (JIRA)
java.lang.IllegalStateException in SessionContext::getCallerPrincipal()
-----------------------------------------------------------------------
Key: EJBTHREE-913
URL: http://jira.jboss.com/jira/browse/EJBTHREE-913
Project: EJB 3.0
Issue Type: Bug
Components: Security
Affects Versions: EJB 3.0 RC9 - FD
Environment: AS: jboss-4.0.5 (ejb3 Version EJB 3.0 RC7 - FD and EJB3 RC9 Patch 1)
OS: Windows, GentooLinux
Reporter: Mihail Druzinin
>From HttpServlet I execute methods from stateless been.
All methods executed correctly with authorization.
When in method I try sessionContext.getCallerPrincipal(), then throws
java.lang.IllegalStateException: No valid security context for the caller identity
After see in jboss security module I find that in org.jboss.security.SecurityAssociation getCallerPrincipal()
when used RunAsIdentity, it getted not from top of RunAsIdentity stack, but "for the active run-as the previous caller has assumed":
Principal thePrincipal = peekRunAsIdentity(1); (SecurityAssociation.java:216).
After fixed that string to: Principal thePrincipal = peekRunAsIdentity(0), all start work.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 3 months
[JBoss JIRA] Created: (JBCOMMON-6) Archive Browser does not support jar:file: url protocol
by Chris Mercer (JIRA)
Archive Browser does not support jar:file: url protocol
-------------------------------------------------------
Key: JBCOMMON-6
URL: http://jira.jboss.com/jira/browse/JBCOMMON-6
Project: JBoss Common
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: core
Environment: jdk 1.5.8
jboss 4.0.4ga
hibernate 3.2cr2
hibernate entity manager 3.2.0.CR1
Using ejb3/entity manager annotations
Reporter: Chris Mercer
Assigned To: Dimitris Andreadis
Priority: Critical
We have a seperate jar file that contains all of our model/entity objects. This jar gets put in the WEB-INF/lib directory, since we are only using wars and not ears. Using the hibernate auto-discovery feature causes an exception to occur. In this configuration.
Caused by: java.lang.RuntimeException: NOT IMPLEMENTED
at org.jboss.util.file.ArchiveBrowser.getBrowser(ArchiveBrowser.java:42)
at org.hibernate.ejb.Ejb3Configuration.scanForClasses(Ejb3Configuration.java:541)
... 148 more
org.jboss.util.file.ArchiveBrowser.getBrowser(URL url, Filter filter) only supports URLS that have a protocol of "file". However, jars have a protocol of "jar:file:" and therefore it will throw a RuntimeException saying "NOT IMPLEMENTED" (at least according to my debugger). There is already a JarArchiveBrowser class, the ArchiveBrowser just needs to recognize the protocol and handle it.
This also affects Hibernate entity manager, since it gets included in the jboss-archive-browsing.jar in order to handle the auto-discovery of mapped entities feature.
I've marked this as critical, since it effects entity manager features (though its only advanced hibernate only functionality)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 3 months
[JBoss JIRA] Created: (EJBTHREE-832) HEM using JBossCache raise a CCE
by Emmanuel Bernard (JIRA)
HEM using JBossCache raise a CCE
--------------------------------
Key: EJBTHREE-832
URL: http://jira.jboss.com/jira/browse/EJBTHREE-832
Project: EJB 3.0
Issue Type: Bug
Components: Clustering
Affects Versions: EJB 3.0 RC9 - Patch 1
Reporter: Emmanuel Bernard
Priority: Blocker
Fix For: EJB 3.0 RC10 - FD
Acording to Gavin
In persistence.xml:
<property name="hibernate.cache.provider_class"
value="org.hibernate.cache.OptimisticTreeCacheProvider"/>
And I got:
00:39:56,421 INFO [SettingsFactory] Cache provider:
org.hibernate.cache.OptimisticTreeCacheProvider
00:39:56,421 WARN [ServiceController] Problem starting service
persistence.units:ear=jboss-seam-registration.ear,jar=jboss-seam-registr
ation.jar,unitName=userDatabase
java.lang.RuntimeException: java.lang.NoClassDefFoundError:
org/jboss/cache/TransactionManagerLookup
at
org.jboss.ejb3.ServiceDelegateWrapper.startService(ServiceDelegateWrappe
r.java:108)
at
org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupp
ort.java:289)
at
org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBean
Support.java:245)
at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at
org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.
java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at
org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.jav
a:264)
at
org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at
org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController
.java:978)
at $Proxy0.start(Unknown Source)
at
org.jboss.system.ServiceController.start(ServiceController.java:417)
at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at
org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.
java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at
org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.jav
a:264)
at
org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at
org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy190.start(Unknown Source)
at
org.jboss.ejb3.JmxKernelAbstraction.install(JmxKernelAbstraction.java:96
)
at
org.jboss.ejb3.Ejb3Deployment.startPersistenceUnits(Ejb3Deployment.java:
467)
at org.jboss.ejb3.Ejb3Deployment.start(Ejb3Deployment.java:317)
at org.jboss.ejb3.Ejb3Module.startService(Ejb3Module.java:91)
at
org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupp
ort.java:289)
at
org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBean
Support.java:245)
at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at
org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.
java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at
org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.jav
a:264)
at
org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at
org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController
.java:978)
at $Proxy0.start(Unknown Source)
at
org.jboss.system.ServiceController.start(ServiceController.java:417)
at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at
org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.
java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at
org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.jav
a:264)
at
org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at
org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy36.start(Unknown Source)
at org.jboss.ejb3.EJB3Deployer.start(EJB3Deployer.java:449)
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.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.
java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at
org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.
java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at
org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBea
nOperationInterceptor.java:142)
at
org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.ja
va:97)
at
org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorSe
rviceMBeanSupport.java:238)
at
org.jboss.ws.integration.jboss.DeployerInterceptor.start(DeployerInterce
ptor.java:92)
at
org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.sta
rt(SubDeployerInterceptorSupport.java:188)
at
org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerIntercepto
r.java:95)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at
org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.jav
a:264)
at
org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at
org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy37.start(Unknown Source)
at
org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
at
org.jboss.deployment.MainDeployer.start(MainDeployer.java:1015)
at
org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
at
org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
at sun.reflect.GeneratedMethodAccessor11.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at
org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.
java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at
org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.
java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at
org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBea
nOperationInterceptor.java:142)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at
org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.jav
a:264)
at
org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at
org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy6.deploy(Unknown Source)
at
org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentSc
anner.java:421)
at
org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScan
ner.java:634)
at
org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doS
can(AbstractDeploymentScanner.java:263)
at
org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loo
p(AbstractDeploymentScanner.java:274)
at
org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run
(AbstractDeploymentScanner.java:225)
Caused by: java.lang.NoClassDefFoundError:
org/jboss/cache/TransactionManagerLookup
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Unknown
Source)
at java.lang.Class.getConstructor0(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at
org.hibernate.cfg.SettingsFactory.createCacheProvider(SettingsFactory.ja
va:358)
at
org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:232
)
at
org.hibernate.cfg.Configuration.buildSettings(Configuration.java:1933)
at
org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1
216)
at
org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Config
uration.java:688)
at
org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFacto
ry(HibernatePersistence.java:127)
at
org.jboss.ejb3.entity.PersistenceUnitDeployment.start(PersistenceUnitDep
loyment.java:264)
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.jboss.ejb3.ServiceDelegateWrapper.startService(ServiceDelegateWrappe
r.java:102)
... 92 more
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 3 months