[JBoss JIRA] Created: (EJBTHREE-1863) res-type in resource-ref is not checked
by Wolfgang Knauf (JIRA)
res-type in resource-ref is not checked
---------------------------------------
Key: EJBTHREE-1863
URL: https://jira.jboss.org/jira/browse/EJBTHREE-1863
Project: EJB 3.0
Issue Type: Bug
Affects Versions: 1.1.7
Reporter: Wolfgang Knauf
The "res-type" of the "resource-ref" element in ejb-jar.xml is not verified.
See the attached sample: neither on deploy nor on JNDI lookup, an error is raised for this xml snippet, which contains an invalid res-type:
<resource-ref>
<res-ref-name>EnvNameOfSessionContext1</res-ref-name>
<res-type>whole.lotta.Crap</res-type>
<mapped-name>java:comp/EJBContext</mapped-name>
<injection-target>
<injection-target-class>de.knauf.resourceref.ResourceRefTestBean</injection-target-class>
<injection-target-name>sessionContext1</injection-target-name>
</injection-target>
</resource-ref>
<resource-ref>
<res-ref-name>EnvNameOfSessionContext2</res-ref-name>
<res-type>whole.lotta.Crap</res-type>
<mapped-name>java:comp/EJBContext</mapped-name>
</resource-ref>
The class org.jboss.injection.ResourceHandler.loadXmlResourceRefs almost completely ignores the "res-type" element ;-).
For a "resource-env-ref" element, the "resource-env-ref-type" is validated, though maybe this happens by accident ;-):
Caused by: java.lang.ClassNotFoundException: asdjavax.ejb.SessionContext from BaseClassLoader@22adfd{...}
at org.jboss.classloader.spi.base.BaseClassLoader.loadClass(BaseClassLoader.java:448)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at org.jboss.injection.ResourceHandler.loadXmlResourceEnvRefs(ResourceHandler.java:217)
... 73 more
So, I would like a similar check for the "resource-ref" res-type.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 9 months
[JBoss JIRA] Resolved: (JBAS-7050) "ClassNotFoundException: org.jboss.resource.deployers.management.DsDataSourceTemplateInfo" on remote calls to ManagementView.getTemplate()
by Scott M Stark (JIRA)
[ https://jira.jboss.org/jira/browse/JBAS-7050?page=com.atlassian.jira.plug... ]
Scott M Stark resolved JBAS-7050.
---------------------------------
Resolution: Done
The template info server classes are now using writeReplace to only return BasicDeploymentTemplateInfo class.
> "ClassNotFoundException: org.jboss.resource.deployers.management.DsDataSourceTemplateInfo" on remote calls to ManagementView.getTemplate()
> ------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: JBAS-7050
> URL: https://jira.jboss.org/jira/browse/JBAS-7050
> Project: JBoss Application Server
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: ProfileService
> Affects Versions: JBossAS-5.1.0.GA
> Reporter: Lukas Krejci
> Assignee: Scott M Stark
> Priority: Blocker
> Fix For: JBossAS-5.2.0.Beta1
>
>
> When trying to create a datasource in AS5 using JON, the following exception occurs:
> java.lang.ClassNotFoundException: org.jboss.resource.deployers.management.DsDataSourceTemplateInfo
> at org.jboss.remoting.serialization.ClassLoaderUtility.loadClass(ClassLoaderUtility.java:103)
> at org.jboss.remoting.loading.RemotingClassLoader.loadClass(RemotingClassLoader.java:86)
> at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
> at java.lang.Class.forName0(Native Method)
> at java.lang.Class.forName(Class.java:247)
> at org.jboss.remoting.loading.ObjectInputStreamWithClassLoader.resolveClass(ObjectInputStreamWithClassLoader.java:179)
> at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1575)
> at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1496)
> at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1732)
> at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
> at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
> at org.jboss.aop.joinpoint.InvocationResponse.readExternal(InvocationResponse.java:119)
> at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1792)
> at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1751)
> at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
> at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
> at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)
> at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
> at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
> at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
> at org.jboss.remoting.serialization.impl.java.JavaSerializationManager.receiveObjectVersion2_2(JavaSerializationManager.java:238)
> at org.jboss.remoting.serialization.impl.java.JavaSerializationManager.receiveObject(JavaSerializationManager.java:138)
> at org.jboss.remoting.marshal.serializable.SerializableUnMarshaller.read(SerializableUnMarshaller.java:123)
> at org.jboss.invocation.unified.marshall.InvocationUnMarshaller.read(InvocationUnMarshaller.java:59)
> at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.versionedRead(MicroSocketClientInvoker.java:1220)
> at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.transport(MicroSocketClientInvoker.java:850)
> at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:165)
> at org.jboss.remoting.Client.invoke(Client.java:1724)
> at org.jboss.remoting.Client.invoke(Client.java:629)
> at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:60)
> at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
> at org.jboss.aspects.remoting.MergeMetaDataInterceptor.invoke(MergeMetaDataInterceptor.java:74)
> at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
> at org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:65)
> at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
> at org.jboss.aop.generatedproxies.AOPProxy$1.getTemplate(AOPProxy$1.java)
> at org.rhq.plugins.jbossas5.ApplicationServerComponent.createConfigurationBasedResource(ApplicationServerComponent.java:415)
> at org.rhq.plugins.jbossas5.ApplicationServerComponent.createResource(ApplicationServerComponent.java:295)
> 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.rhq.core.pc.inventory.ResourceContainer$ComponentInvocationThread.call(ResourceContainer.java:526)
> 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:619)
> at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:72)
> at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
> at org.jboss.aspects.remoting.MergeMetaDataInterceptor.invoke(MergeMetaDataInterceptor.java:74)
> at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
> at org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:65)
> at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
> at org.jboss.aop.generatedproxies.AOPProxy$1.getTemplate(AOPProxy$1.java)
> at org.rhq.plugins.jbossas5.ApplicationServerComponent.createConfigurationBasedResource(ApplicationServerComponent.java:415)
> at org.rhq.plugins.jbossas5.ApplicationServerComponent.createResource(ApplicationServerComponent.java:295)
> 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.rhq.core.pc.inventory.ResourceContainer$ComponentInvocationThread.call(ResourceContainer.java:526)
> 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:619)
> I was only able to find this class in jboss-embedded-all maven module.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 9 months