Jboss 7 Conversion, Hibernate Issues?
by Brian Freyling
I am working on porting an application from Jboss 5 to Jboss 7, but have had
no luck in resolving the error below.
Any advice would be greatly appreciated!
Thanks, -Brian
Jboss Log:
09:44:48,135 INFO [org.jboss.as.connector.subsystems.datasources]
(Controller Boot Thread) Deploying JDBC-compliant driver class org.h2.Driver
(version 1.2)
09:44:48,228 INFO [org.jboss.as.connector.subsystems.datasources]
(Controller Boot Thread) Deploying non-JDBC-compliant driver class
com.mysql.jdbc.Driver (version 5.1)
09:44:48,330 INFO [org.jboss.as.clustering.infinispan.subsystem]
(Controller Boot Thread) Activating Infinispan subsystem.
09:44:48,801 INFO [org.jboss.as.naming] (Controller Boot Thread) Activating
Naming Subsystem
09:44:48,865 INFO [org.jboss.as.naming] (MSC service thread 1-1) Starting
Naming Service
09:44:48,889 INFO [org.jboss.as.osgi] (Controller Boot Thread) Activating
OSGi Subsystem
09:44:48,976 INFO [org.jboss.remoting] (MSC service thread 1-3) JBoss
Remoting version 3.2.0.Beta2
09:44:48,977 INFO [org.jboss.as.security] (Controller Boot Thread)
Activating Security Subsystem
09:44:49,053 INFO [org.xnio] (MSC service thread 1-3) XNIO Version
3.0.0.Beta3
09:44:49,086 INFO [org.xnio.nio] (MSC service thread 1-3) XNIO NIO
Implementation Version 3.0.0.Beta3
09:44:49,894 INFO [org.apache.catalina.core.AprLifecycleListener] (MSC
service thread 1-3) The Apache Tomcat Native library which allows optimal
performance in production environments was not found on the
java.library.path:
/home/brian/MoveableFeast/pkg/jdk/jre/lib/i386/server:/home/brian/MoveableFeast/pkg/jdk/jre/lib/i386:/home/brian/MoveableFeast/pkg/jdk/jre/../lib/i386:/usr/java/packages/lib/i386:/lib:/usr/lib
09:44:49,982 INFO [org.jboss.as.ee] (Controller Boot Thread) Activating EE
subsystem
09:44:49,987 INFO [org.jboss.as.jmx.JMXConnectorService] (MSC service
thread 1-1) Starting remote JMX connector
09:44:50,178 INFO [org.jboss.as.remoting] (MSC service thread 1-4)
Listening on /127.0.0.1:9999
09:44:50,932 INFO [org.apache.coyote.http11.Http11Protocol] (MSC service
thread 1-2) Starting Coyote HTTP/1.1 on http--127.0.0.1-8080
09:44:50,979 INFO [org.jboss.as.connector] (MSC service thread 1-1)
Starting JCA Subsystem (JBoss IronJacamar 1.0.0.CR2)
09:44:51,088 INFO [org.jboss.as.connector.subsystems.datasources] (MSC
service thread 1-2) Bound data source [java:jboss/datasources/security]
09:44:51,097 INFO [org.jboss.as.connector.subsystems.datasources] (MSC
service thread 1-3) Bound data source [java:jboss/datasources/ExampleDS]
09:44:52,578 INFO [org.jboss.as.deployment] (MSC service thread 1-3)
Started FileSystemDeploymentService for directory
/home/brian/MoveableFeast/pkg/jboss/standalone/deployments
09:44:52,678 INFO [org.jboss.as] (Controller Boot Thread) JBoss AS
7.0.0.Final "Lightning" started in 12158ms - Started 98 of 153 services (55
services are passive or on-demand)
09:44:52,801 INFO [org.jboss.as.server.deployment] (MSC service thread 1-3)
Starting deployment of "security.ear"
09:44:53,495 INFO [org.jboss.as.server.deployment] (MSC service thread 1-3)
Starting deployment of "security-ejb-2.0.jar"
09:44:53,496 INFO [org.jboss.as.server.deployment] (MSC service thread 1-3)
Starting deployment of "security-war-2.0.war"
09:44:54,731 INFO [org.jboss.jpa] (MSC service thread 1-2) read
persistence.xml for security
09:44:54,754 WARN [org.jboss.as.server.deployment] (MSC service thread 1-4)
Class Path entry faces-common-2.0.jar in
"/content/security.ear/security-war-2.0.war/WEB-INF/lib/security-ejb-2.0.jar"
does not point to a valid jar for a Class-Path reference.
09:44:54,754 WARN [org.jboss.as.server.deployment] (MSC service thread 1-4)
Class Path entry commons-logging-1.1.1.jar in
"/content/security.ear/security-war-2.0.war/WEB-INF/lib/security-ejb-2.0.jar"
does not point to a valid jar for a Class-Path reference.
09:44:54,896 INFO [org.jboss.jpa] (MSC service thread 1-1) read
persistence.xml for security
09:44:55,262 INFO [org.jboss.jpa] (MSC service thread 1-4) read
persistence.xml for security
09:44:55,790 INFO
[org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor]
(MSC service thread 1-1) JNDI bindings for session bean named
SecurityManager in deployment unit subdeployment "security-ejb-2.0.jar" of
deployment "security.ear" are as follows:
java:global/security/security-ejb-2.0/SecurityManager!security.ejb.client.SecurityManagerRemote
java:app/security-ejb-2.0/SecurityManager!security.ejb.client.SecurityManagerRemote
java:module/SecurityManager!security.ejb.client.SecurityManagerRemote
java:global/security/security-ejb-2.0/SecurityManager
java:app/security-ejb-2.0/SecurityManager
java:module/SecurityManager
09:44:56,013 INFO
[org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor]
(MSC service thread 1-2) JNDI bindings for session bean named
SecurityManager in deployment unit subdeployment "security-war-2.0.war" of
deployment "security.ear" are as follows:
java:global/security/security-war-2.0/SecurityManager!security.ejb.client.SecurityManagerRemote
java:app/security-war-2.0/SecurityManager!security.ejb.client.SecurityManagerRemote
java:module/SecurityManager!security.ejb.client.SecurityManagerRemote
java:global/security/security-war-2.0/SecurityManager
java:app/security-war-2.0/SecurityManager
java:module/SecurityManager
09:44:56,682 INFO [org.jboss.jpa] (MSC service thread 1-3) starting
Persistence Unit Service 'security.ear#security'
09:44:57,489 INFO [org.jboss.jpa] (MSC service thread 1-1) starting
Persistence Unit Service 'security.ear/security-ejb-2.0.jar#security'
09:44:57,531 INFO [org.hibernate.annotations.common.Version] (MSC service
thread 1-3) Hibernate Commons Annotations 3.2.0.Final
09:44:57,597 INFO [org.hibernate.cfg.Environment] (MSC service thread 1-3)
HHH00412:Hibernate [WORKING]
09:44:57,599 INFO [org.hibernate.cfg.Environment] (MSC service thread 1-3)
HHH00206:hibernate.properties not found
09:44:57,606 INFO [org.hibernate.cfg.Environment] (MSC service thread 1-3)
HHH00021:Bytecode provider name : javassist
09:44:57,718 INFO [org.hibernate.ejb.Ejb3Configuration] (MSC service thread
1-1) HHH00204:Processing PersistenceUnitInfo [
name: security
...]
09:44:57,730 INFO [org.hibernate.ejb.Ejb3Configuration] (MSC service thread
1-3) HHH00204:Processing PersistenceUnitInfo [
name: security
...]
09:44:57,813 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-3)
MSC00001: Failed to start service
jboss.persistenceunit."security.ear#security":
org.jboss.msc.service.StartException in service
jboss.persistenceunit."security.ear#security": Failed to start service
at
org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1786)
at
org.jboss.msc.service.ServiceControllerImpl$ClearTCCLTask.run(ServiceControllerImpl.java:2291)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
[:1.6.0_17]
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
[:1.6.0_17]
at java.lang.Thread.run(Thread.java:619) [:1.6.0_17]
Caused by: java.lang.RuntimeException: error trying to scan <jar-file>:
vfs:/content/security.ear/
at
org.hibernate.ejb.Ejb3Configuration.scanForClasses(Ejb3Configuration.java:844)
at
org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:586)
at
org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:72)
at
org.jboss.as.jpa.service.PersistenceUnitService.createContainerEntityManagerFactory(PersistenceUnitService.java:170)
at
org.jboss.as.jpa.service.PersistenceUnitService.start(PersistenceUnitService.java:80)
at
org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1765)
... 4 more
Caused by: java.lang.RuntimeException: Missing annotation index to scan
entity classes
at
org.jboss.as.jpa.hibernate.HibernateAnnotationScanner.getClassesInJar(HibernateAnnotationScanner.java:119)
at
org.hibernate.ejb.Ejb3Configuration.addScannedEntries(Ejb3Configuration.java:474)
at
org.hibernate.ejb.Ejb3Configuration.scanForClasses(Ejb3Configuration.java:841)
... 9 more
09:44:58,021 WARN [org.hibernate.cfg.AnnotationBinder] (MSC service thread
1-1) HHH00194:Package not found or wo package-info.java:
security.ejb.server.entity
09:44:58,021 WARN [org.hibernate.cfg.AnnotationBinder] (MSC service thread
1-1) HHH00194:Package not found or wo package-info.java: security.ejb.server
09:44:58,022 WARN [org.hibernate.cfg.AnnotationBinder] (MSC service thread
1-1) HHH00194:Package not found or wo package-info.java: security.ejb.client
09:44:58,022 WARN [org.hibernate.cfg.AnnotationBinder] (MSC service thread
1-1) HHH00194:Package not found or wo package-info.java: security.util
09:44:58,022 WARN [org.hibernate.cfg.AnnotationBinder] (MSC service thread
1-1) HHH00194:Package not found or wo package-info.java: security.ejb.util
09:44:59,521 INFO
[org.hibernate.service.jdbc.connections.internal.ConnectionProviderInitiator]
(MSC service thread 1-1) HHH00130:Instantiating explicit connection
provider: org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider
09:45:00,046 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2)
MSC00001: Failed to start service
jboss.deployment.subunit."security.ear"."security-war-2.0.war".INSTALL:
org.jboss.msc.service.StartException in service
jboss.deployment.subunit."security.ear"."security-war-2.0.war".INSTALL:
Failed to process phase INSTALL of subdeployment "security-war-2.0.war" of
deployment "security.ear"
at
org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:121)
at
org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1765)
at
org.jboss.msc.service.ServiceControllerImpl$ClearTCCLTask.run(ServiceControllerImpl.java:2291)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
[:1.6.0_17]
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
[:1.6.0_17]
at java.lang.Thread.run(Thread.java:619) [:1.6.0_17]
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException:
Failed to install component
org.jboss.as.ee.component.ComponentConfiguration[name=SecurityManager
class=security.ejb.server.SecurityManager]
at
org.jboss.as.ee.component.ComponentInstallProcessor.deploy(ComponentInstallProcessor.java:77)
at
org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:115)
... 5 more
Caused by: java.lang.RuntimeException: java.lang.NoSuchMethodException:
security.ejb.server.SecurityManager.getUserByLogin(security.ejb.client.User)
at
org.jboss.as.ejb3.component.EJBComponentCreateService.getComponentMethod(EJBComponentCreateService.java:114)
at
org.jboss.as.ejb3.component.EJBComponentCreateService.<init>(EJBComponentCreateService.java:90)
at
org.jboss.as.ejb3.component.session.SessionBeanComponentCreateService.<init>(SessionBeanComponentCreateService.java:57)
at
org.jboss.as.ejb3.component.stateless.StatelessSessionComponentCreateService.<init>(StatelessSessionComponentCreateService.java:42)
at
org.jboss.as.ejb3.component.stateless.StatelessComponentCreateServiceFactory.constructService(StatelessComponentCreateServiceFactory.java:40)
at
org.jboss.as.ee.component.ComponentInstallProcessor.deployComponent(ComponentInstallProcessor.java:97)
at
org.jboss.as.ee.component.ComponentInstallProcessor.deploy(ComponentInstallProcessor.java:75)
... 6 more
Caused by: java.lang.NoSuchMethodException:
security.ejb.server.SecurityManager.getUserByLogin(security.ejb.client.User)
at java.lang.Class.getMethod(Class.java:1605) [:1.6.0_17]
at
org.jboss.as.ejb3.component.EJBComponentCreateService.getComponentMethod(EJBComponentCreateService.java:112)
... 12 more
09:45:00,879 INFO [org.hibernate.dialect.Dialect] (MSC service thread 1-1)
HHH00400:Using dialect: org.hibernate.dialect.MySQLDialect
09:45:00,910 INFO
[org.hibernate.engine.transaction.internal.TransactionFactoryInitiator] (MSC
service thread 1-1) HHH00268:Transaction strategy:
org.hibernate.engine.transaction.internal.jta.CMTTransactionFactory
09:45:00,926 INFO
[org.hibernate.hql.internal.ast.ASTQueryTranslatorFactory] (MSC service
thread 1-1) HHH00397:Using ASTQueryTranslatorFactory
09:45:01,058 INFO [org.hibernate.validator.util.Version] (MSC service
thread 1-1) Hibernate Validator 4.1.0.Final
09:45:01,068 INFO
[org.hibernate.validator.engine.resolver.DefaultTraversableResolver] (MSC
service thread 1-1) Instantiated an instance of
org.hibernate.validator.engine.resolver.JPATraversableResolver.
09:45:01,787 INFO [org.jboss.as.server.controller]
(DeploymentScanner-threads - 2) Deployment of "security.ear" was rolled back
with failure message {"Failed services" =>
{"jboss.deployment.subunit.\"security.ear\".\"security-war-2.0.war\".INSTALL"
=> "org.jboss.msc.service.StartException in service
jboss.deployment.subunit.\"security.ear\".\"security-war-2.0.war\".INSTALL:
Failed to process phase INSTALL of subdeployment \"security-war-2.0.war\" of
deployment
\"security.ear\"","jboss.persistenceunit.\"security.ear#security\"" =>
"org.jboss.msc.service.StartException in service
jboss.persistenceunit.\"security.ear#security\": Failed to start
service"},"Services with missing/unavailable dependencies" =>
["jboss.naming.context.java.comp.security.\"security-war-2.0\".\"security-war-2.0\".Validator
missing [ jboss.naming.context.java.module.security.\"security-war-2.0\"
]","jboss.naming.context.java.comp.security.\"security-war-2.0\".\"security-war-2.0\".ValidatorFactory
missing [ jboss.naming.context.java.module.security.\"security-war-2.0\"
]"]}
09:45:01,834 INFO [org.jboss.jpa] (MSC service thread 1-2) stopping
Persistence Unit Service 'security.ear/security-ejb-2.0.jar#security'
09:45:01,878 INFO [org.jboss.as.server.deployment] (MSC service thread 1-4)
Stopped deployment security-ejb-2.0.jar in 89ms
09:45:01,929 INFO [org.jboss.as.server.deployment] (MSC service thread 1-4)
Stopped deployment security-war-2.0.war in 141ms
09:45:01,937 INFO [org.jboss.as.server.deployment] (MSC service thread 1-1)
Stopped deployment security.ear in 151ms
09:45:01,941 ERROR [org.jboss.as.deployment] (DeploymentScanner-threads - 1)
{"Composite operation failed and was rolled back. Steps that failed:" =>
{"Operation step-2" => {"Failed services" =>
{"jboss.deployment.subunit.\"security.ear\".\"security-war-2.0.war\".INSTALL"
=> "org.jboss.msc.service.StartException in service
jboss.deployment.subunit.\"security.ear\".\"security-war-2.0.war\".INSTALL:
Failed to process phase INSTALL of subdeployment \"security-war-2.0.war\" of
deployment
\"security.ear\"","jboss.persistenceunit.\"security.ear#security\"" =>
"org.jboss.msc.service.StartException in service
jboss.persistenceunit.\"security.ear#security\": Failed to start
service"},"Services with missing/unavailable dependencies" =>
["jboss.naming.context.java.comp.security.\"security-war-2.0\".\"security-war-2.0\".Validator
missing [ jboss.naming.context.java.module.security.\"security-war-2.0\"
]","jboss.naming.context.java.comp.security.\"security-war-2.0\".\"security-war-2.0\".ValidatorFactory
missing [ jboss.naming.context.java.module.security.\"security-war-2.0\"
]"]}}}
Standalone.xml:
<?xml version='1.0' encoding='UTF-8'?>
<server name="BigShortyComputer" xmlns="urn:jboss:domain:1.0">
<extensions>
<extension module="org.jboss.as.clustering.infinispan"/>
<extension module="org.jboss.as.connector"/>
<extension module="org.jboss.as.deployment-scanner"/>
<extension module="org.jboss.as.ee"/>
<extension module="org.jboss.as.ejb3"/>
<extension module="org.jboss.as.jaxrs"/>
<extension module="org.jboss.as.jmx"/>
<extension module="org.jboss.as.jpa"/>
<extension module="org.jboss.as.logging"/>
<extension module="org.jboss.as.naming"/>
<extension module="org.jboss.as.osgi"/>
<extension module="org.jboss.as.remoting"/>
<extension module="org.jboss.as.sar"/>
<extension module="org.jboss.as.security"/>
<extension module="org.jboss.as.threads"/>
<extension module="org.jboss.as.transactions"/>
<extension module="org.jboss.as.web"/>
<extension module="org.jboss.as.weld"/>
</extensions>
<management>
<security-realms>
<security-realm name="PropertiesMgmtSecurityRealm">
<authentication>
<properties path="mgmt-users.properties"
relative-to="jboss.server.config.dir"/>
</authentication>
</security-realm>
</security-realms>
<management-interfaces>
<native-interface interface="management" port="9999"/>
<http-interface interface="management" port="9990"/>
</management-interfaces>
</management>
<profile>
<subsystem xmlns="urn:jboss:domain:logging:1.0">
<console-handler name="CONSOLE" autoflush="true">
<level name="INFO"/>
<formatter>
<pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p [%c]
(%t) %s%E%n"/>
</formatter>
</console-handler>
<periodic-rotating-file-handler name="FILE" autoflush="true">
<level name="INFO"/>
<formatter>
<pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p [%c]
(%t) %s%E%n"/>
</formatter>
<file relative-to="jboss.server.log.dir" path="server.log"/>
<suffix value=".yyyy-MM-dd"/>
</periodic-rotating-file-handler>
<logger category="com.arjuna">
<level name="WARN"/>
</logger>
<logger category="org.apache.tomcat.util.modeler">
<level name="WARN"/>
</logger>
<logger category="sun.rmi">
<level name="WARN"/>
</logger>
<root-logger>
<level name="INFO"/>
<handlers>
<handler name="CONSOLE"/>
<handler name="FILE"/>
</handlers>
</root-logger>
</subsystem>
<subsystem xmlns="urn:jboss:domain:datasources:1.0">
<datasources>
<datasource jndi-name="java:jboss/datasources/security"
pool-name="POOL" enabled="true" jta="true" use-java-context="true"
use-ccm="true">
<connection-url>
jdbc:mysql://localhost/security
</connection-url>
<driver>
mysqldriver
</driver>
<pool>
<prefill>
false
</prefill>
<use-strict-min>
false
</use-strict-min>
<flush-strategy>
FailingConnectionOnly
</flush-strategy>
</pool>
<security>
<user-name>
bunnies
</user-name>
<password>
bunnies
</password>
</security>
<validation>
<validate-on-match>
false
</validate-on-match>
<background-validation>
false
</background-validation>
<useFastFail>
false
</useFastFail>
</validation>
</datasource>
<datasource jndi-name="java:jboss/datasources/ExampleDS"
pool-name="H2DS" enabled="true" jta="true" use-java-context="true"
use-ccm="true">
<connection-url>
jdbc:h2:mem:test;DB_CLOSE_DELAY=-1
</connection-url>
<driver>
h2
</driver>
<pool>
<prefill>
false
</prefill>
<use-strict-min>
false
</use-strict-min>
<flush-strategy>
FailingConnectionOnly
</flush-strategy>
</pool>
<security>
<user-name>
sa
</user-name>
<password>
sa
</password>
</security>
<validation>
<validate-on-match>
false
</validate-on-match>
<background-validation>
false
</background-validation>
<useFastFail>
false
</useFastFail>
</validation>
</datasource>
<drivers>
<driver name="h2" module="com.h2database.h2">
<xa-datasource-class>
org.h2.jdbcx.JdbcDataSource
</xa-datasource-class>
</driver>
<driver name="mysqldriver" module="com.mysql">
<xa-datasource-class>
com.mysql.jdbc.jdbc2.optional.MysqlXADataSource
</xa-datasource-class>
</driver>
</drivers>
</datasources>
</subsystem>
<subsystem xmlns="urn:jboss:domain:deployment-scanner:1.0">
<deployment-scanner name="default" path="deployments"
scan-enabled="true" scan-interval="5000" relative-to="jboss.server.base.dir"
deployment-timeout="60"/>
</subsystem>
<subsystem xmlns="urn:jboss:domain:ee:1.0"/>
<subsystem xmlns="urn:jboss:domain:ejb3:1.0"/>
<subsystem xmlns="urn:jboss:domain:infinispan:1.0"
default-cache-container="hibernate">
<cache-container name="hibernate" default-cache="local-query">
<local-cache name="entity">
<eviction strategy="LRU" max-entries="10000"/>
<expiration max-idle="100000"/>
</local-cache>
<local-cache name="local-query">
<eviction strategy="LRU" max-entries="10000"/>
<expiration max-idle="100000"/>
</local-cache>
<local-cache name="timestamps">
<eviction strategy="NONE"/>
</local-cache>
</cache-container>
</subsystem>
<subsystem xmlns="urn:jboss:domain:jaxrs:1.0"/>
<subsystem xmlns="urn:jboss:domain:jca:1.0">
<archive-validation enabled="false"/>
<bean-validation enabled="false"/>
<default-workmanager>
<short-running-threads blocking="true"
allow-core-timeout="false">
<core-threads count="10" per-cpu="20"/>
<queue-length count="10" per-cpu="20"/>
<max-threads count="10" per-cpu="20"/>
<keepalive-time time="10" unit="SECONDS"/>
</short-running-threads>
<long-running-threads blocking="true"
allow-core-timeout="false">
<core-threads count="10" per-cpu="20"/>
<queue-length count="10" per-cpu="20"/>
<max-threads count="10" per-cpu="20"/>
<keepalive-time time="10" unit="SECONDS"/>
</long-running-threads>
</default-workmanager>
</subsystem>
<subsystem xmlns="urn:jboss:domain:jmx:1.0">
<jmx-connector server-binding="jmx-connector-server"
registry-binding="jmx-connector-registry"/>
</subsystem>
<subsystem xmlns="urn:jboss:domain:jpa:1.0">
<jpa default-datasource=""/>
</subsystem>
<subsystem xmlns="urn:jboss:domain:naming:1.0"/>
<subsystem xmlns="urn:jboss:domain:osgi:1.0" activation="lazy">
<configuration
pid="org.apache.felix.webconsole.internal.servlet.OsgiManager">
<property name="manager.root">
jboss-osgi
</property>
</configuration>
<properties>
<property name="org.jboss.osgi.system.modules">
org.apache.commons.logging,
org.apache.log4j,
org.jboss.as.osgi,
org.slf4j,
</property>
<property name="org.osgi.framework.system.packages.extra">
org.apache.commons.logging;version=1.1.1,
org.apache.log4j;version=1.2,
org.jboss.as.osgi.service;version=7.0,
org.jboss.osgi.deployment.interceptor;version=1.0,
org.jboss.osgi.spi.capability;version=1.0,
org.jboss.osgi.spi.util;version=1.0,
org.jboss.osgi.testing;version=1.0,
org.jboss.osgi.vfs;version=1.0,
org.slf4j;version=1.5.10,
</property>
<property name="org.osgi.framework.startlevel.beginning">
1
</property>
</properties>
<modules>
<module identifier="javaee.api"/>
<module identifier="org.jboss.logging"/>
<module identifier="org.apache.aries.util"/>
<module identifier="org.jboss.osgi.webconsole"/>
<module identifier="org.osgi.compendium"/>
<module identifier="org.apache.felix.log" startlevel="1"/>
<module identifier="org.jboss.osgi.logging" startlevel="1"/>
<module identifier="org.apache.felix.configadmin"
startlevel="1"/>
<module identifier="org.jboss.as.osgi.configadmin"
startlevel="1"/>
<module identifier="org.apache.aries.jmx" startlevel="2"/>
<module identifier="org.apache.felix.eventadmin"
startlevel="2"/>
<module identifier="org.apache.felix.metatype"
startlevel="2"/>
<module identifier="org.apache.felix.scr" startlevel="2"/>
<module identifier="org.apache.felix.webconsole"
startlevel="2"/>
<module identifier="org.jboss.osgi.jmx" startlevel="2"/>
<module identifier="org.jboss.osgi.http" startlevel="2"/>
<module identifier="org.jboss.osgi.blueprint"
startlevel="3"/>
<module identifier="org.jboss.osgi.webapp" startlevel="3"/>
<module identifier="org.jboss.osgi.xerces" startlevel="3"/>
</modules>
</subsystem>
<subsystem xmlns="urn:jboss:domain:remoting:1.0"/>
<subsystem xmlns="urn:jboss:domain:resource-adapters:1.0"/>
<subsystem xmlns="urn:jboss:domain:sar:1.0"/>
<subsystem xmlns="urn:jboss:domain:security:1.0">
<security-domains>
<security-domain name="password">
<authentication>
<login-module
code="org.jboss.security.auth.spi.DatabaseServerLoginModule"
flag="required">
<module-option name="securityDomain"
value="java:/jaas/password"/>
<module-option name="dsJndiName"
value="java:/jboss/datasources/security"/>
<module-option name="principalsQuery"
value="select PASSWORD from USERS where LOGIN=?"/>
<module-option name="rolesQuery" value="select
ROLES.NAME, USERS.PASSWORD from ROLES,USERS,USER_ROLE where
USER_ROLE.ROLE_ID=ROLES.ID and USER_ROLE.USER_ID=USERS.ID and
USERS.LOGIN=?"/>
<module-option name="hashAlgorithm"
value="SHA-256"/>
<module-option name="hashEncoding"
value="base64"/>
</login-module>
</authentication>
</security-domain>
<security-domain name="other" cache-type="default">
<authentication>
<login-module code="UsersRoles" flag="required"/>
</authentication>
</security-domain>
</security-domains>
</subsystem>
<subsystem xmlns="urn:jboss:domain:threads:1.0"/>
<subsystem xmlns="urn:jboss:domain:transactions:1.0">
<core-environment>
<process-id>
<uuid/>
</process-id>
</core-environment>
<recovery-environment socket-binding="txn-recovery-environment"
status-socket-binding="txn-status-manager"/>
<coordinator-environment default-timeout="300"/>
<object-store/>
</subsystem>
<subsystem xmlns="urn:jboss:domain:web:1.0"
default-virtual-server="default-host">
<connector name="http" protocol="HTTP/1.1" socket-binding="http"
scheme="http"/>
<virtual-server name="default-host" enable-welcome-root="true">
<alias name="localhost"/>
<alias name="example.com"/>
</virtual-server>
</subsystem>
<subsystem xmlns="urn:jboss:domain:weld:1.0"/>
</profile>
<interfaces>
<interface name="management">
<inet-address value="127.0.0.1"/>
</interface>
<interface name="public">
<inet-address value="127.0.0.1"/>
</interface>
</interfaces>
<socket-binding-group name="standard-sockets"
default-interface="public">
<socket-binding name="http" port="8080"/>
<socket-binding name="https" port="8443"/>
<socket-binding name="jmx-connector-registry" port="1090"/>
<socket-binding name="jmx-connector-server" port="1091"/>
<socket-binding name="jndi" port="1099"/>
<socket-binding name="osgi-http" port="8090"/>
<socket-binding name="remoting" port="4447"/>
<socket-binding name="txn-recovery-environment" port="4712"/>
<socket-binding name="txn-status-manager" port="4713"/>
</socket-binding-group>
</server>
Maven pom, for security-ejb:
<?xml version="1.0"?>
<project
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>security</groupId>
<artifactId>security-ejb</artifactId>
<packaging>ejb</packaging>
<version>2.0</version>
<name>Security Management EJB Project</name>
<description>This is the EJB 3.0 project used for accessing database
information
pertaining to the Security Management application.
</description>
<parent>
<groupId>security</groupId>
<artifactId>app</artifactId>
<version>2.0</version>
</parent>
<dependencies>
<dependency>
<groupId>security</groupId>
<artifactId>faces-common</artifactId>
<version>2.0</version>
</dependency>
<dependency>
<groupId>org.jboss.spec.javax.ejb</groupId>
<artifactId>jboss-ejb-api_3.1_spec</artifactId>
<version>1.0.1.Final</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jboss.spec.javax.annotation</groupId>
<artifactId>jboss-annotations-api_1.1_spec</artifactId>
<version>1.0.0.Final</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jboss.ws</groupId>
<artifactId>jbossws-spi</artifactId>
<version>2.0.0.Beta5</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jboss.ejb3</groupId>
<artifactId>jboss-ejb3-ext-api</artifactId>
<version>2.0.0-beta-1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.inject</groupId>
<artifactId>javax.inject</artifactId>
<version>1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.1.1</version>
<!-- <scope>provided</scope> -->
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>2.4</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.faces</groupId>
<artifactId>jsf-api</artifactId>
<version>1.2_13</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jboss.spec.javax.servlet</groupId>
<artifactId>jboss-servlet-api_3.0_spec</artifactId>
<version>1.0.0.Final</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.hibernate.javax.persistence</groupId>
<artifactId>hibernate-jpa-2.0-api</artifactId>
<version>1.0.1.Final</version>
<scope>provided</scope>
</dependency>
<!-- From login example -->
<dependency>
<groupId>org.jboss.spec.javax.annotation</groupId>
<artifactId>jboss-annotations-api_1.1_spec</artifactId>
<version>1.0.0.Final</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ejb-plugin</artifactId>
<version>2.3</version>
<configuration>
<ejbVersion>3.0</ejbVersion>
<generateClient>true</generateClient>
<archive>
<manifest>
<addClasspath>true</addClasspath>
</manifest>
</archive>
<clientExcludes>
<clientExclude>**/*CMP.class</clientExclude>
<clientExclude>**/*Session.class</clientExclude>
<clientExclude>**/*package.html</clientExclude>
</clientExcludes>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.6</version>
<executions>
<execution>
<id>construct-jboss-xml</id>
<phase>process-classes</phase>
<configuration>
<tasks>
<copy
file="src/main/etc/jboss-${login.policy.name
}.xml"
tofile="target/classes/META-INF/jboss.xml"
overwrite="true">
<filterset>
<filter
token="DOMAIN"
value="${login.domain}" />
<filter
token="AUTH_METHOD"
value="${auth.method}" />
</filterset>
</copy>
<!-- <copy
file="src/main/etc/persistence.xml.template"
tofile="target/classes/META-INF/persistence.xml"
overwrite="true">
<filterset>
<filter
token="HIBERNATE_DIALECT"
value="${hibernate.dialect}" />
</filterset>
</copy> -->
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<reporting>
</reporting>
</project>
Maven pom, security-war
<?xml version="1.0"?>
<project
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<groupId>security</groupId>
<artifactId>app</artifactId>
<version>2.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>security</groupId>
<artifactId>security-war</artifactId>
<packaging>war</packaging>
<version>2.0</version>
<name>Security Management WAR Project</name>
<description>This is the WAR project used for displaying information
pertaining to the Security Management application.
</description>
<dependencies>
<dependency>
<groupId>security</groupId>
<artifactId>security-ejb</artifactId>
<version>2.0</version>
</dependency>
<dependency>
<groupId>security</groupId>
<artifactId>faces-common</artifactId>
<version>2.0</version>
</dependency>
<dependency>
<groupId>org.jboss.ws</groupId>
<artifactId>jbossws-spi</artifactId>
<version>2.0.0.Beta5</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.1.1</version>
<!-- <scope>provided</scope> -->
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>2.4</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.faces</groupId>
<artifactId>jsf-api</artifactId>
<version>1.2_13</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.faces</groupId>
<artifactId>jsf-impl</artifactId>
<version>1.2_13</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jboss.spec.javax.servlet</groupId>
<artifactId>jboss-servlet-api_3.0_spec</artifactId>
<version>1.0.0.Final</version>
<scope>provided</scope>
</dependency>
<!-- Old Jsf -->
<dependency>
<groupId>com.sun.facelets</groupId>
<artifactId>jsf-facelets</artifactId>
<version>1.1.15.B1</version>
</dependency>
<dependency>
<groupId>org.richfaces.framework</groupId>
<artifactId>richfaces-impl</artifactId>
<version>3.3.3.Final</version>
</dependency>
<dependency>
<groupId>org.apache.myfaces.core</groupId>
<artifactId>myfaces-api</artifactId>
<version>1.2.2</version>
</dependency>
<dependency>
<groupId>org.apache.myfaces.core</groupId>
<artifactId>myfaces-impl</artifactId>
<version>1.2.2</version>
</dependency>
<dependency>
<groupId>org.apache.myfaces.tomahawk</groupId>
<artifactId>tomahawk</artifactId>
<version>1.1.6</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.6</version>
<executions>
<execution>
<id>copy</id>
<phase>process-sources</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<copy file="src/main/xmltemplates/WEB-INF/web.xml.${
login.policy.name}"
toFile="src/main/webapp/WEB-INF/web.xml"
overwrite="true">
</copy>
<copy
file="src/main/xmltemplates/WEB-INF/jboss-web.xml.${login.policy.name}"
toFile="src/main/webapp/WEB-INF/jboss-web.xml"
overwrite="true">
</copy>
<copy
file="src/main/xmltemplates/WEB-INF/faces-beans.xml"
toFile="src/main/webapp/WEB-INF/faces-beans.xml"
overwrite="true">
<filterset>
<filter
token="PASS_VISIBLE_VALUE"
value="${faces.passvisible.value}" />
<filter
token="HOST"
value="${host.name}" />
<filter
token="PROJECT"
value="${overall.name}" />
</filterset>
</copy>
<copy
file="src/main/resources/${overall.name
}.properties"
toFile="src/main/resources/logosAndStrings.properties"
overwrite="true">
</copy>
<copy
file="src/main/webapp/images/${overall.name
}.png"
toFile="src/main/webapp/images/logo.png"
overwrite="true">
</copy>
</target>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<reporting>
</reporting>
</project>
Thanks,
-Brian
13 years, 3 months
Welcome Root Behaviour
by Darran Lofthouse
I am currently looking into an issue with the welcome root
implementation regarding http and https redirects but while I am in this
area I am also looking to pick up a couple of other issues identified /
reported with the welcome root.
I just have a couple of questions to clarify the expected behaviour.
Firstly should it be possible to enable this for managed domains?
Personally I think yes as it is a part of the subsystem configuration
and there is no mention that it should not work for domains.
Secondly there is a console redirect if the http management interface
can be located - in a managed domain this is difficult to detect as the
web subsystem and http management interface run in different processes -
also once there are multiple host controllers it is not as clear which
http management interface to redirect to.
For this I believe we should remove all references to the console when
running in domain mode and instead just have the welcome page with links
to the various docs and forums but not attempt to expose internal
management details.
Regards,
Darran Lofthouse.
13 years, 3 months
If you see a NPE in your unit tests during an InitialContext reference...
by Scott Marlow
Perhaps your on a branch and synced up with AS7 master as I just did.
Or your on master and have some @Ignore tests that you occasionally use
(and also just synced with the latest master commits).
It looks like this was already fixed in all of the active unit tests
(thank you!). For disabled tests or on your branches, you might need to
add "@ArquillianResource" around your InitialContext variables. You can
probably also delete your assignment to the InitialContext variable as well.
Good code:
@ArquillianResource InitialContext iniCtx;
This code will get a NPE when it uses iniCtx:
private static InitialContext iniCtx;
@BeforeClass
public static void beforeClass() throws NamingException {
iniCtx = new InitialContext();
}
Hope this helps.
Scott
13 years, 3 months
thread safety and AS Service implementations...
by Scott Marlow
I would like to get agreement on whether we still need to protect
Service instance variables.
From reading the javadoc in the org.jboss.msc.service.Service class,
mutable instance variables (in Service implementations) need their own
thread safety protection.
I had a mutable object reference in class PersistenceUnitService that is
set in the Service start method and cleared in stop(). Someone reported
a NPE caused by the same mutable object reference, so I think we need to
guard against this pattern elsewhere most likely (forum post about NPE
http://community.jboss.org/message/621316).
https://github.com/scottmarlow/jboss-as/commit/c0f05311680cb936fb1abcb739...
changes the variable to be volatile. The down side is that the object
reference won't be cached.
I don't know for sure, that the above code change will fix the NPE, just
seems likely to me.
Scott
13 years, 3 months
Revisited: Integration TestSuite Organization and Maintenance
by Andrew Lee Rubinger
Hi guys:
I'd like to reopen the discussion regarding the testsuite organization
and its ongoing maintenance. This issue dates back a few months with
some debates and differing opinions, so I'll do my best to outline the
guiding principles I'd like to see put in place concisely.
To start off, I've a Proof-of-Concept for many of the following points
now located:
https://github.com/ALRubinger/jboss-as/tree/AS7-999
The relevant JIRA I've been using to track things:
https://issues.jboss.org/browse/AS7-999
So:
1) TestSuite Organization
I believe we need a single top-level categorization by which we may
organize integration tests which are deployment-based and run within the
context of the server. Because we use Maven modules (which are bound to
a dependency structure), it makes sense to file these modules by the
compile-time dependencies they require. So in place I've put:
testsuite/spec - Java SE and Java EE APIs only
testsuite/api - AS7 APIs + Spec
testsuite/internals - Use anything in the AS7 runtime in your
deployments; not guaranteed to be back-compat across releases
The primary motivation here is to ensure that the dependencies we export
(ie. "spec-api", and "api" modules) are complete enough for users to
create their own deployments. In this setup, we act as *users* of our
own APIs, and everything in src/main is limited to the relevant
dependencies.
I know the source of some disagreements earlier centered around placing
the tests right next to the deployments, and some folks consider the
deployments as part of the test itself. That's not a bad argument at
all, but again consider that we then lose the ability to validate our
tests in the context of our exported APIs.
2) Run Modes, Test Subsets
Because the primary organizational criteria proposed in 1) is by
dependency, these modules will grow large over time. The AS build over
time will take longer and longer to run. Additionally, there are
runtime options to consider when starting tests. So consider the
following requirements:
* Running the testsuite in IPv6
* Running only a subset of tests as part of the main build
These lend themselves well to using build profiles. By default, I think
the "smoke tests" should simply be a set of tests we deem important or
indicative of the general health of AS7 with respect to each subsystem.
As it stands now, "smoke" is its own module with a bunch of
Embedded-based tests, and I think these should move to the
organizational structure in 1) and instead we can apply some filtering
to make the "smoke" some default set of includes.
3) An authoritative maintainer
I'd like to treat the Arquillian and TestSuite modules as true
subsystems of the Application Server, and as such we'll need someone to
assume the responsibility to review incoming commits/pull requests and
ensure they fit the criteria for acceptance. Simple things like
consistent package names, using ARQ correctly, and not leaking
dependencies are very important.
So assuming we come to agreement on these points, I'd like to request
push access to the AS7 repo to field testsuite and ARQ-related pull
requests.
...there's much more to discuss (I've more issues to raise alongside the
upcoming EAP requirements), but let's start with those first 3 major
points and my POC, and run from there.
S,
ALR
13 years, 3 months
Running a cluster using a single AS 7 distribution
by Francesco Marchioni
Hi all devs,
While doing some experiments with clustering, I can see that it's fairly
easy with AS7 to set up a cluster of standalone servers using the same AS
distribution.
That can be achieved using a server port offset and assigning a different
data.dir to every instance in a cluster. Is this considered safe way to run
a cluster (maybe recommended for a development environment) or does it need
tweaking some more parameters ?
Thanks a lot
Francesco
13 years, 3 months
7.1 docs update for Messaging subsystem.
by Jeremy Whiting
Hi,
If this is not already on the TODO list for someone I have found the
7.0 docs will need updating for 7.1. The Messaging Configuration needs
instructions for adding
<extension module="org.jboss.as.messaging"/>
as a child of extensions element
then
<socket-binding name="messaging" port="5445" />
as a child of socket-binding-group element.
This is based on the standalone.xml generated from a build of the
current master branch in Git.
Regards,
Jeremy
--
Jeremy Whiting
Software Engineer, Performance Team
Red Hat
------------------------------------------------------------
Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom.
Registered in UK and Wales under Company Registration No. 3798903 Directors: Michael Cunningham (USA), Charlie Peters (USA), Matt Parsons (USA) and Brendan Lane (Ireland)
13 years, 3 months
IPv6 in AS7
by Tom Wells
Hi,
I'm looking for information regarding what AS7 subsystems require specific configuration for IPv6.
Can anyone help?
Thanks in advance,
Tom Wells
Engineering Content Services
Red Hat, Brisbane Australia
13 years, 3 months
Arquillian Tests not Running From IDE
by Andrew Lee Rubinger
Hiya.
Since we've stopped copying the modules under JBOSS_HOME for the
testsuite (in order to save space), the default launch config from the
IDE doesn't know where to pick these up (unless manually configured with
a sysprop at launch).
How do we feel about:
1) Doing full copies of JBOSS_HOME like we used to? (Drawback: space)
2) Trying to put something in the AS7 ARQ Containers so that it'll find
the modules by default (Drawback: Hacky/Programmatic Guesswork)
3) Reorganizing things such that the testsuite module source keeps their
current structure, but instead we fire off the testsuite runs from
another module all in one go, with a full JBOSS_HOME to back it?
(Drawback: Build Complexity)
I think I lean for 3), assuming it can be done intelligently enough.
Then we'll only start/stop the server ONCE for a full build, and blow
through all tests there regardless of their source module. The source
modules are important as they stand in order to assert our compile
dependencies.
S,
ALR
13 years, 3 months
Schema Version Updates
by Darran Lofthouse
I have just noticed the update of the xsd version for the logging subsystem.
The problem however is that we have dropped support for the 1.0 version
so any config from 7.0.0 will not run on 7.0.1 - is this intentional?
I had assumed that the way we were parsing the schemas allowed for
multiple versions to be supported simultaneously so while we would
recommend a version update the original configs should still work.
Regards,
Darran Lofthouse.
13 years, 3 months