[JBoss JIRA] Commented: (JBAS-1602) Can't use container level taglibs
by C?dric Chantepie (JIRA)
[ https://jira.jboss.org/jira/browse/JBAS-1602?page=com.atlassian.jira.plug... ]
C?dric Chantepie commented on JBAS-1602:
----------------------------------------
Is it possible to have taglib jar in ear/lib ?
I've struts jar in ear/lib, its classes can be found in war, but not struts tlds .
It seems that other people have the same problem (http://lists.jboss.org/pipermail/jboss-user/2009-February/147299.html)
> Can't use container level taglibs
> ---------------------------------
>
> Key: JBAS-1602
> URL: https://jira.jboss.org/jira/browse/JBAS-1602
> Project: JBoss Application Server
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Web (Tomcat) service
> Reporter: Stan Silvert
> Assignee: Scott M Stark
> Priority: Critical
> Fix For: JBossAS-4.0.2 Final
>
> Attachments: EmbeddedServletOptions.java, TldLocationsCache.java
>
>
> JBoss/Tomcat needs a way to install tag libraries globally so they are available to all web applications. This functionality is mentioned in the JSP 2.0 spec section 7.3.5. In Tomcat standalone, you can do this, but it doesn?t work in JBoss/Tomcat.
> The way this works is that the Jasper TldLocationsCache ?Scans all JARs accessible to the webapp's classloader and its parent classloaders for TLDs.?
> If I put my jar into Tomcat standalone?s common/lib directory then the tag library will be shared across all web apps. I?ve tried putting the jar in several ?well known? locations in JBoss/Tomcat and nothing seems to work.
> For Reference, I?ve attached the TldLocationsCache source code from Tomcat 5.5.8.
> Concerning TldLocationsCache, Scott Stark says:
> "This class is useless for non-URLClassLoaders and URLClassLoaders that do not expose their classpath via getURLs which is what we currently do because of an old bad behavior with annotated codebases of rmi classes. "
> Remy Maucherat offered this as a possible solution:
> Would it be possible to have the ENCLoader facade return more interesting things ?
> /**
> * A trival extension of URLClassLoader that uses an empty URL[] as its
> * classpath so that all work is delegated to its parent.
> */
> static class ENCLoader extends URLClassLoader
> {
> private URL[] urllist = new URL[0];
> ENCLoader(ClassLoader parent)
> {
> super(new URL[0], parent);
> }
> void addURLInternal(URL url)
> {
> URL[] result = new URL[urllist.length + 1];
> for (int i = 0; i < urllist.length; i++)
> result[i] = urllist[i];
> result[urllist.length] = url;
> urllist = result;
> }
> public URL[] getURLs()
> {
> return urllist;
> }
> }
--
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
15 years, 9 months
[JBoss JIRA] Created: (JBAS-6699) EJB verification error message should contain the EJB spec version number
by jaikiran pai (JIRA)
EJB verification error message should contain the EJB spec version number
-------------------------------------------------------------------------
Key: JBAS-6699
URL: https://jira.jboss.org/jira/browse/JBAS-6699
Project: JBoss Application Server
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: EJB2
Affects Versions: JBossAS-5.1.0.Beta1
Reporter: jaikiran pai
Assignee: Alexey Loubyansky
When a EJB2 bean is being deployed, the deployer passes it through a verification stage. When the verification fails, the bean deployment is failed and a message is shown in the logs. Currently, the message does not include the EJB spec version. For example, when the bean remote interface and the bean impl class methods don't have a matching throws clause, the following error message is thrown:
12:59:20,209 WARN [verifier] EJB spec violation:
Bean : ejb_Test2
Method : public abstract void testAccess() throws RemoteException
Section: 7.10.5
Warning: All the exceptions defined in the throws clause of the matching method of the session bean class must be defined in the throws clause of the method of the remote interface.
Note the EJB section referred in this message. This section exists in EJB2.0 spec but not in EJB2.1 spec. So it's important to include the EJB spec version too.
--
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
15 years, 9 months
[JBoss JIRA] Created: (JBBOOT-19) ServerLoader causes deployment errors in AS
by Andrew Lee Rubinger (JIRA)
ServerLoader causes deployment errors in AS
-------------------------------------------
Key: JBBOOT-19
URL: https://jira.jboss.org/jira/browse/JBBOOT-19
Project: JBoss Bootstrap
Issue Type: Bug
Affects Versions: 1.0.0-Beta-2
Reporter: Andrew Lee Rubinger
Assignee: Andrew Lee Rubinger
jboss-bootstrap ServerLoader adds all under $JBOSS_HOME/lib to the boot CP, resulting in extra scanning/deployment errors (below).
ServerLoader in AS presently takes advantage of an explicit boot set. Until all under $JBOSS_HOME/lib may be loaded, switch up to the explicit boot set for AS.
Failed to boot JBoss:
java.lang.RuntimeException: Error creating annotation for @org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss.system:service=ServiceBindingManager", exposedInterface=org.jboss.services.binding.ServiceBindingManagerMBean.class, registerDirectly=true)
at org.jboss.beans.metadata.plugins.AbstractAnnotationMetaData.getAnnotationInstance(AbstractAnnotationMetaData.java:128)
at org.jboss.beans.metadata.plugins.AbstractAnnotationMetaData.getAnnotationInstance(AbstractAnnotationMetaData.java:100)
at org.jboss.deployers.plugins.managed.BeanMetaDataICF.getManagedObjectClass(BeanMetaDataICF.java:119)
at org.jboss.deployers.plugins.managed.BeanMetaDataICF.getManagedObjectClass(BeanMetaDataICF.java:50)
at org.jboss.managed.plugins.factory.AbstractManagedObjectFactory.initManagedObject(AbstractManagedObjectFactory.java:342)
at org.jboss.managed.api.factory.ManagedObjectFactory.initManagedObject(ManagedObjectFactory.java:77)
at org.jboss.system.server.profileservice.ProfileServiceBootstrap.initBootstrapMDs(ProfileServiceBootstrap.java:439)
at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:242)
at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:461)
at org.jboss.Main.boot(Main.java:216)
at org.jboss.Main$1.run(Main.java:546)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.RuntimeException: java.lang.ClassNotFoundException: org.jboss.services.binding.ServiceBindingManagerMBean
at org.jboss.annotation.factory.AnnotationCreator.visit(AnnotationCreator.java:241)
at org.jboss.annotation.factory.ast.ASTIdentifier.jjtAccept(ASTIdentifier.java:37)
at org.jboss.annotation.factory.AnnotationCreator.visit(AnnotationCreator.java:116)
at org.jboss.annotation.factory.ast.ASTMemberValuePair.jjtAccept(ASTMemberValuePair.java:37)
at org.jboss.annotation.factory.AnnotationCreator.createAnnotation(AnnotationCreator.java:403)
at org.jboss.annotation.factory.AnnotationCreator.createAnnotation(AnnotationCreator.java:449)
at org.jboss.beans.metadata.plugins.AbstractAnnotationMetaData.getAnnotationInstance(AbstractAnnotationMetaData.java:119)
... 11 more
Caused by: java.lang.ClassNotFoundException: org.jboss.services.binding.ServiceBindingManagerMBean
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:242)
at org.jboss.annotation.factory.AnnotationCreator.visit(AnnotationCreator.java:175)
... 17 mor
--
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
15 years, 9 months
[JBoss JIRA] Created: (JASSIST-74) modifying a method containing a switch statement using IBM JVM throws ArrayIndexOutOfBoundsException
by Mooky Grand (JIRA)
modifying a method containing a switch statement using IBM JVM throws ArrayIndexOutOfBoundsException
----------------------------------------------------------------------------------------------------
Key: JASSIST-74
URL: https://jira.jboss.org/jira/browse/JASSIST-74
Project: Javassist
Issue Type: Bug
Affects Versions: 3.8.1.GA
Environment: OS: Probably all. I produced it on Windows
JVM: does not happen with Sun JVM (at least the versions I used). Does happen with IBM's JVM. I used the following version:
java version "1.5.0"
Java(TM) 2 Runtime Environment, Standard Edition (build pwi32dev-20060511 (SR2))
IBM J9 VM (build 2.3, J2RE 1.5.0 IBM J9 2.3 Windows XP x86-32 j9vmwi3223-20060504 (JIT enabled)
J9VM - 20060501_06428_lHdSMR
JIT - 20060428_1800_r8
GC - 20060501_AA)
JCL - 20060511a
This version comes bundled with Websphere 6.1 ND. The Exact version that I used is "WebSphere Platform 6.1 [ND 6.1.0.0 b0620.14]"
Reporter: Mooky Grand
Assignee: Shigeru Chiba
First the exception that I see:
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: -2147483648
at javassist.bytecode.CodeIterator.insertGap2(CodeIterator.java(Compiled Code))
at javassist.bytecode.CodeIterator.insertGap0(CodeIterator.java:656)
at javassist.bytecode.CodeIterator.insertGap(CodeIterator.java:640)
at javassist.bytecode.CodeIterator.insertGapCore(CodeIterator.java:467)
at javassist.bytecode.CodeIterator.insert0(CodeIterator.java:370)
at javassist.bytecode.CodeIterator.insertEx(CodeIterator.java:339)
at javassist.CtBehavior.insertBefore(CtBehavior.java:671)
at javassist.CtBehavior.insertBefore(CtBehavior.java:640)
at sample.MyTest2.main(MyTest2.java:26)
>From the little analysis I did I discovered the following:
1. The problem is not reproduced using Sun's JVM.
2. The method being modified must be of a certain length
3. The method must have a switch statement.
4. The added code should be containe dinside a try-catch block.
All of these are demonstrated in my example.
MyTest2.java:
package sample;
import javassist.*;
import javassist.expr.*;
public class MyTest2 {
public static void main(String[] args) throws Exception {
ClassPool pool = ClassPool.getDefault();
final CtClass jdbcCt = pool.get("sample.Bla");
final CtMethod fooMethod = jdbcCt.getDeclaredMethod("foo");
String sourceCode = "{"
+ "System.out.println(\"Bla!\");"
+ "}";
String toInsert =
" try " +
" { " +
sourceCode +
" } " +
" catch(Throwable e) " +
" { " +
" e.printStackTrace(); " +
" } ";
fooMethod.insertBefore(toInsert);
jdbcCt.writeFile(); // update the class file
}
}
Bla.java:
package sample;
public class Bla
{
protected void foo()
{
int j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
j = 4;
switch (1)
{
default:
}
}
}
When I remove some of the repeating statements the exception goes away (BTW, if I remove just one there's no exception but the resulting file is corrupted).
Essentially, this prevents me from using Javassist under IBM's JVM for large methods that contain switch statements.
I've reproduced this problem using javassist 3.4, 3.8 & 3.9.
--
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
15 years, 9 months