[Beginners Corner] - Yet another isolated classloader question
by tomstrummer
I am trying to create a simple web app built with Maven. Maven by default will package all dependencies in the WAR, which causes classloader issues if those libraries are also already in JBoss.
Ok, so I thought classloader isolation solved this problem, but apparently I'm not understanding it correctly. The error is that ELResolver was already loaded (the el-api JAR is in my WAR under /WEB-INF/lib):
| Caused by: java.lang.ClassNotFoundException: Unexpected error during load of: javax.el.ELResolver, msg=loader constraint violation: loader (instance of org/jboss/mx/loading/UnifiedClassLoader3) previously initiated loading for a
| different type with name "javax/el/ELResolver"
| at org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader.java:560)
| at org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:415)
| at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
| at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
|
Here's my jboss-web.xml. My understanding was that this means I get an isolated classloader that will use the classes in my WAR only and not those of the app server:
| <?xml version="1.0" encoding="UTF-8"?>
| <!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 2.4//EN"
| "http://www.jboss.org/j2ee/dtd/jboss-web_4_0.dtd">
| <jboss-web>
| <class-loading>
| <loader-repository>seam.jboss.org:loader=pjm-mule.war
| <loader-repository-config>java2ParentDelegation=false</loader-repository-config>
| </loader-repository>
| </class-loading>
| </jboss-web>
|
What am I doing wrong? Am I absolutely forced to remove this JAR from my WAR? I have a similar problem with an EAR but this is a much simpler example. Thanks in advance for the help.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4179135#4179135
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4179135
17 years, 7 months
[Security & JAAS/JBoss] - Re: Problem turning on security manager with JBoss 4.0.4
by osganian
Trying it under JDK 1.6.0_05 I get:
| java.lang.ClassCircularityError: org/jboss/security/SimplePrincipal
| at java.lang.Class.forName0(Native Method)
| at java.lang.Class.forName(Class.java:247)
| at sun.security.provider.PolicyFile.addPermissions(PolicyFile.java:1381)
| at sun.security.provider.PolicyFile.getPermissions(PolicyFile.java:1268)
| at sun.security.provider.PolicyFile.getPermissions(PolicyFile.java:1231)
| at sun.security.provider.PolicyFile.getPermissions(PolicyFile.java:1167)
| at sun.security.provider.PolicyFile.implies(PolicyFile.java:1122)
| at java.security.ProtectionDomain.implies(ProtectionDomain.java:213)
| at java.security.AccessControlContext.checkPermission(AccessControlContext.java:301)
| at java.security.AccessController.checkPermission(AccessController.java:546)
| at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
| at java.lang.SecurityManager.checkRead(SecurityManager.java:871)
| at java.io.File.exists(File.java:731)
| at org.apache.naming.resources.FileDirContext.file(FileDirContext.java:827)
| at org.apache.naming.resources.FileDirContext.lookup(FileDirContext.java:210)
| at org.apache.naming.resources.ProxyDirContext.lookup(ProxyDirContext.java:293)
| at org.apache.catalina.loader.WebappClassLoader.findResourceInternal(WebappClassLoader.java:1884)
| at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1749)
| at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:866)
| at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1319)
| at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1198)
| at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
| at java.lang.Class.forName0(Native Method)
| at java.lang.Class.forName(Class.java:247)
| at sun.security.provider.PolicyFile.addPermissions(PolicyFile.java:1381)
| at sun.security.provider.PolicyFile.getPermissions(PolicyFile.java:1268)
| at sun.security.provider.PolicyFile.getPermissions(PolicyFile.java:1231)
| at sun.security.provider.PolicyFile.getPermissions(PolicyFile.java:1167)
| at sun.security.provider.PolicyFile.implies(PolicyFile.java:1122)
| at java.security.ProtectionDomain.implies(ProtectionDomain.java:213)
| at java.security.AccessControlContext.checkPermission(AccessControlContext.java:301)
| at java.security.AccessController.checkPermission(AccessController.java:546)
| at com.illuminatics.util.SecurityUtils$1.run(SecurityUtils.java:34)
| at java.security.AccessController.doPrivileged(Native Method)
| at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
| at com.illuminatics.util.SecurityUtils.hasPermission(SecurityUtils.java:49)
| at org.apache.jsp.test3_jsp._jspService(test3_jsp.java:72)
|
Somebody out there must have used org.jboss.security.SimplePrincipal class to grant specific permissions to a user, right?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4179121#4179121
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4179121
17 years, 7 months
[JCA/JBoss] - Re: Problems changing DefaultDS
by drathnow
I looked at the SQL in server/xxx/deploy/uuid-key-generator.sar/META-INF/jboss-service.xml and it is correct. i.e. that syntax is correct for Oracle. I even went so far as to execute it to create the table. When I start JBoss, I get the following exception whenever JBoss tries to deploy one of my beans.
10:50:48,895 INFO [EJBContainer] STARTED EJB: zedi.core.beans.OtadProgressServiceBean ejbName: OtadProgressServiceBean
10:50:48,926 WARN [DatabasePersistencePolicy] Unable to get timer handles for containerId: jboss.j2ee:service=EJB3,ear=pacbridge.ear,jar=core.jar,name=OtadProgressServiceBean
java.sql.SQLException: ORA-00942: table or view does not exist
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:743)
at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:207)
at oracle.jdbc.driver.T4CStatement.executeForDescribe(T4CStatement.java:790)
at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1037)
at oracle.jdbc.driver.T4CStatement.executeMaybeDescribe(T4CStatement.java:830)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1132)
at oracle.jdbc.driver.OracleStatement.executeQuery(OracleStatement.java:1272)
at org.jboss.resource.adapter.jdbc.WrappedStatement.executeQuery(WrappedStatement.java:171)
at org.jboss.ejb.txtimer.GeneralPurposeDatabasePersistencePlugin.selectTimers(GeneralPurpose
DatabasePersistencePlugin.java:257)
at org.jboss.ejb.txtimer.DatabasePersistencePolicy.listTimerHandles(DatabasePersistencePolic
y.java:165)
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:585)
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.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy30.listTimerHandles(Unknown Source)
at org.jboss.ejb.txtimer.EJBTimerServiceImpl.restoreTimers(EJBTimerServiceImpl.java:408)
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:585)
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.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy110.restoreTimers(Unknown Source)
at org.jboss.ejb3.timerservice.jboss.JBossTimerServiceFactory.restoreTimerService(JBossTimer
ServiceFactory.java:120)
at org.jboss.ejb3.stateless.StatelessContainer.start(StatelessContainer.java:98)
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:585)
at org.jboss.ejb3.ServiceDelegateWrapper.startService(ServiceDelegateWrapper.java:103)
Exception stack trace cut
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4179120#4179120
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4179120
17 years, 7 months