[JBoss JIRA] Created: (JBAS-7882) Wrong provider code base for security provider included in packed ear
by Petr H (JIRA)
Wrong provider code base for security provider included in packed ear
---------------------------------------------------------------------
Key: JBAS-7882
URL: https://jira.jboss.org/jira/browse/JBAS-7882
Project: JBoss Application Server
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: VFS
Affects Versions: JBossAS-6.0.0.M2, JBossAS-5.1.0.GA
Environment: Any OS, JDK 5 and 6, JBoss AS 5.1.0 and 6.0.0.M2
Reporter: Petr H
We've got applications which uses the IAIK JCE provider (http://jce.iaik.tugraz.at/sic/Products/Core-Crypto-Toolkits/JCA-JCE) whose library is included directly in our application.
On JBoss AS 5 and later, we can't use this provider as usually.
The new VFS mechanism seems to break the path determination to the IAIK provider library (needed to determine provider code base) - it still points into the ear/war structure inside the server deploy directory but as all this is packed into one ear file, the provider verification.fails because of unsigned ear/war and thus the following exception is thrown:
2010-04-01 15:04:20,890 ERROR [STDERR] (http-0.0.0.0-8180-1) java.lang.SecurityException: JCE cannot authenticate the provider IAIK
2010-04-01 15:04:20,893 ERROR [STDERR] (http-0.0.0.0-8180-1) at javax.crypto.Cipher.getInstance(DashoA13*..)
2010-04-01 15:04:20,893 ERROR [STDERR] (http-0.0.0.0-8180-1) at javax.crypto.Cipher.getInstance(DashoA13*..)
2010-04-01 15:04:20,893 ERROR [STDERR] (http-0.0.0.0-8180-1) at iaik.test.ControllerServlet.service(ControllerServlet.java:123)
2010-04-01 15:04:20,893 ERROR [STDERR] (http-0.0.0.0-8180-1) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
2010-04-01 15:04:20,893 ERROR [STDERR] (http-0.0.0.0-8180-1) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
2010-04-01 15:04:20,893 ERROR [STDERR] (http-0.0.0.0-8180-1) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
2010-04-01 15:04:20,893 ERROR [STDERR] (http-0.0.0.0-8180-1) at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
2010-04-01 15:04:20,893 ERROR [STDERR] (http-0.0.0.0-8180-1) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
2010-04-01 15:04:20,893 ERROR [STDERR] (http-0.0.0.0-8180-1) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
2010-04-01 15:04:20,893 ERROR [STDERR] (http-0.0.0.0-8180-1) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
2010-04-01 15:04:20,894 ERROR [STDERR] (http-0.0.0.0-8180-1) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
2010-04-01 15:04:20,894 ERROR [STDERR] (http-0.0.0.0-8180-1) at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
2010-04-01 15:04:20,894 ERROR [STDERR] (http-0.0.0.0-8180-1) at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
2010-04-01 15:04:20,894 ERROR [STDERR] (http-0.0.0.0-8180-1) at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
2010-04-01 15:04:20,894 ERROR [STDERR] (http-0.0.0.0-8180-1) at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
2010-04-01 15:04:20,894 ERROR [STDERR] (http-0.0.0.0-8180-1) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
2010-04-01 15:04:20,894 ERROR [STDERR] (http-0.0.0.0-8180-1) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
2010-04-01 15:04:20,894 ERROR [STDERR] (http-0.0.0.0-8180-1) at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
2010-04-01 15:04:20,894 ERROR [STDERR] (http-0.0.0.0-8180-1) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
2010-04-01 15:04:20,894 ERROR [STDERR] (http-0.0.0.0-8180-1) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
2010-04-01 15:04:20,894 ERROR [STDERR] (http-0.0.0.0-8180-1) at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:905)
2010-04-01 15:04:20,894 ERROR [STDERR] (http-0.0.0.0-8180-1) at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:592)
2010-04-01 15:04:20,894 ERROR [STDERR] (http-0.0.0.0-8180-1) at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:2036)
2010-04-01 15:04:20,894 ERROR [STDERR] (http-0.0.0.0-8180-1) at java.lang.Thread.run(Thread.java:619)
2010-04-01 15:04:20,895 ERROR [STDERR] (http-0.0.0.0-8180-1) Caused by: java.util.jar.JarException: Cannot parse jar:file:/opt/jboss-5.1.0.GA/server/test1/deploy/IAIKTest.ear!/IAIKTestWeb.war
2010-04-01 15:04:20,895 ERROR [STDERR] (http-0.0.0.0-8180-1) at javax.crypto.SunJCE_c.a(DashoA13*..)
2010-04-01 15:04:20,895 ERROR [STDERR] (http-0.0.0.0-8180-1) at javax.crypto.SunJCE_b.b(DashoA13*..)
2010-04-01 15:04:20,895 ERROR [STDERR] (http-0.0.0.0-8180-1) at javax.crypto.SunJCE_b.a(DashoA13*..)
2010-04-01 15:04:20,895 ERROR [STDERR] (http-0.0.0.0-8180-1) ... 24 more
This works when one of tho three mentioned workarounds is used.
The most interesting of course is the third workaround for which the code base corectly points to the temporary IAIK library instance in the java.io.tmpdir:
2010-04-01 15:09:51,291 INFO [STDOUT] (http-0.0.0.0-8180-1) Provider code base: file:/tmp/nestedjar2481829661547119990.tmp
I'll attach a simple testcase ear (IAIKTest.ear) which contains an evaluation version of IAIK provider library (thanks for permission to the IAIK authors) and a simple servlet (including source) which demonstrates the problem.
All you need to do is to have the unrestricted JCE policy files installed in your JRE and then just put the IAIKTest.ear into the deploy directory, start the JBoss instance and access the test servlet URL in browser, for example: http://localhost:8080/IAIKTestWeb/ControllerServlet
On init (which happens on start) it will register the IAIK provider
On service (after you access it in browser) it will attempt to get some cipher instance and here it fails.
I'll also attach two log files covering the problem:
- server-default.log with default server setup where the issue occurs
- server-forceVfsJar.log with jboss.vfs.forceVfsJar=true where the issue doesn't occur
Also I think this is more generic problem because we had similar issues, where some jar or resource location was pointing to the packed ear/war structure inside the deploy directory instead of those VFS temporary locations, with our own code (when attemting to obtain full path) and had to perform some modifications in order to make it working. The same set of workarounds could resolve these issues as well.
--
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
12 years
[JBoss JIRA] Created: (JBAOP-796) Creation of ClassAdvisor must use the AspectManager equivalent to the advised class' ClassLoader
by Flavia Rainone (JIRA)
Creation of ClassAdvisor must use the AspectManager equivalent to the advised class' ClassLoader
------------------------------------------------------------------------------------------------
Key: JBAOP-796
URL: https://jira.jboss.org/browse/JBAOP-796
Project: JBoss AOP
Issue Type: Bug
Security Level: Public (Everyone can see)
Affects Versions: 2.1.9.Alpha1
Reporter: Flavia Rainone
Assignee: Flavia Rainone
Fix For: 2.1.6 CP01, 2.1.9.GA, 2.2.1.GA
Currently, an Advisor is created by calling AspectManager.instance().getAdvisor().
The correct is to create the advisor by calling AspectManager.instance(WovenClass.class).getAdvisor(WovenClass.class).
Otherwise, the Advisor will be created as part of the AspectManager/Domain corresponding to the current context class loader:
public static synchronized AspectManager instance()
{
return instance(Thread.currentThread().getContextClassLoader());
}
In the JBoss AS environment, if the woven class is loaded during an archive deployment, this is equivalent to say that the Advisor will be erroneously created by the domain of the current deployment, instead of being created by the appropriate AspectManager/Domain instance.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years
[JBoss JIRA] Created: (JBAOP-806) Using UnmodifiableLinkedHashMap constructor causes an UnsupportedOperationException exception to be thrown on IBM JDK
by Dustin Kut Moy Cheung (JIRA)
Using UnmodifiableLinkedHashMap constructor causes an UnsupportedOperationException exception to be thrown on IBM JDK
---------------------------------------------------------------------------------------------------------------------
Key: JBAOP-806
URL: https://issues.jboss.org/browse/JBAOP-806
Project: JBoss AOP
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Aspect Library
Environment: OS: Fedora 14
JDK: IBM JDK
Reporter: Dustin Kut Moy Cheung
Priority: Critical
Read Summary. This error is caused because the IBM JDK LinkedHashMap invokes the putAll method on HashMap. Since the putAll method is overwridden in UnmodifiableLinkedHashMap.java, the UnmodifiableLinkedHashMap putAll method is called instead of the HashMap constructor and therefore throws that exception.
The fix is to change the signature of the constructor being called (LinkedHashMap constructor) so that the putAll method is not called.
Please see the patch that attempts to solve this issue.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years
[JBoss JIRA] Created: (JBAS-8865) caching ejb3 entities tutorial demo does not work in JBoss 6
by Leos Literak (JIRA)
caching ejb3 entities tutorial demo does not work in JBoss 6
------------------------------------------------------------
Key: JBAS-8865
URL: https://issues.jboss.org/browse/JBAS-8865
Project: JBoss Application Server
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Documentation
Reporter: Leos Literak
Priority: Minor
I run this demo: http://docs.jboss.org/ejb3/docs/tutorial/1.0.7/html/Caching_EJB3_Entities...
in jboss 6 and it fails:
Caused by: org.hibernate.HibernateException: could not instantiate RegionFactory [org.hibernate.cache.jbc2.JndiMultiplexedJBossCacheRegionFactory]
at org.hibernate.cfg.SettingsFactory.createRegionFactory(SettingsFactory.java:423) [:3.6.0.Final]
at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:280) [:3.6.0.Final]
at org.hibernate.cfg.Configuration.buildSettingsInternal(Configuration.java:2833) [:3.6.0.Final]
at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2829) [:3.6.0.Final]
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1840) [:3.6.0.Final]
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:902) [:3.6.0.Final]
... 78 more
Caused by: java.lang.ClassNotFoundException: org.hibernate.cache.jbc2.JndiMultiplexedJBossCacheRegionFactory from BaseClassLoader@a63599{vfs:///C:/Users/llitera
rver/default/conf/jboss-service.xml}
at org.jboss.classloader.spi.base.BaseClassLoader.loadClass(BaseClassLoader.java:480) [jboss-classloader.jar:2.2.0.GA]
at java.lang.ClassLoader.loadClass(ClassLoader.java:248) [:1.6.0_22]
at java.lang.Class.forName0(Native Method) [:1.6.0_22]
at java.lang.Class.forName(Class.java:169) [:1.6.0_22]
at org.hibernate.util.ReflectHelper.classForName(ReflectHelper.java:192) [:3.6.0.Final]
at org.hibernate.cfg.SettingsFactory.createRegionFactory(SettingsFactory.java:409) [:3.6.0.Final]
... 83 more
please update the demo to work in current jboss, thanks
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years
[JBoss JIRA] Created: (JBAS-9406) Bean class local SFSB fails to replicate
by Jozef Hartinger (JIRA)
Bean class local SFSB fails to replicate
----------------------------------------
Key: JBAS-9406
URL: https://issues.jboss.org/browse/JBAS-9406
Project: Legacy JBoss Application Server 6
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: EJB
Affects Versions: 6.0.0.Final
Reporter: Jozef Hartinger
Assignee: Carlo de Wolf
Priority: Critical
The attached application contains a simple @SessionScoped SFSB:
@SessionScoped
@Stateful
@Named
public class Foo implements Serializable {
private String text;
public String getText() {
return text;
}
public void setText(String text) {
this.text = text;
}
public void submit()
{
}
@Remove
public void remove() {
}
}
When an action is invoked on the bean, I can see replication failing in the server log. See the attached logs for details. In the first one, the Foo bean does not implement serializable (as it is not required to do so). The second log was captured after the bean has been changed to implement the Serializable interface.
To reproduce:
1) Create two JBoss AS 6 instances as described at https://github.com/weld/core/blob/master/examples/README.md
2) Deploy the attached war file
3) Open http://localhost:8080/foo/foo.xhtml
4) Enter any text and click submit
This is where the replication fails and errors appear in the log
5) Verify text appears at http://localhost:8180/foo/foo.xhtml - you'll need to copy session id parameter as well, e.g. http://localhost:8180/foo/foo.xhtml;jsessionid=PX5Q-ORdeUJLifFqqrOkQA__
Note that the replication succeeds if I use an explicit @Local interface for the Foo bean.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years