[JBoss AS 7 Development] - CLI non-interactive mode improvements
by r.reimann
r.reimann [http://community.jboss.org/people/r.reimann] created the discussion
"CLI non-interactive mode improvements"
To view the discussion, visit: http://community.jboss.org/message/645317#645317
--------------------------------------------------------------
First of all i would like to thank the contributing developers for the great command line support in AS7.
I'm currently evaluating the options to provide a configuration mechanism for our projects with the follwing goals in mind:
* encapsulation of environment settings: since most of the developer and operations folks don't know the CLI they should be able to provide the settings (IPs, ports, DB-Connection settings) for the target system in a separate properties file without searching/editing the CLI scripts.
* repeatable: In case of a missconfiguration (e.g. wrong IP or DB-Password provided) the script execution should be repeatable.
* portability: the scripts should work for developer machines (windows, macosx) as well as the test, qa and production environments (linux)
* zero dependencies: since the environments are heterogenous (see above) and especially test, qa and production environments are very restricted (e.g. no curl) there should no need for additional tools or scripting languages.
* maintainability: The ability to use line breaks to improve the readability for long commands would be a great help. This is already adressed by https://issues.jboss.org/browse/AS7-2640 https://issues.jboss.org/browse/AS7-2640
Since i assume that these are advanced but common requirements it would be great if the the CLI would provide two new features to achieve these goals. Below are my suggestions for the corresponding improvements. I would appreciate to get feedback on my suggestions and also concerning the chances of beeing implemented in a (not so far) future release.
*1. Encapsulation of environment settings*
*
*
The CLI should support interpolation of properties provided by properties files and system properties (analogue to the properties support in the domain.sh/standalone.sh scripts)
For example:
./jboss-admin.sh --connect --file=some/location/my-script.cli --properties=/some/location/environment.properties
environment.properties
db_url=jdbc:h2:mem:test
db_user=sa
db_password=sa
my-script.cli
/profile=default/subsystem=datasources/data-source=h2:add(connection-url="${db_url}",driver-name=h2,enabled=true,jndi-name="java:jboss/datasources/ExampleDS",pool-name="H2DS",user-name="${db_user}",password="${db_password}")
*2. Repeatable script executions*
*
*
To allow for repeatable script executions conditional logic is required to prevent "Duplicate resource" failures:
exists = test if the resource to be (re-)added already exists
if (exists) remove resource
add resource
The conditional logic currently requires a wrapper script which violates either the portability goal (a shell script is sufficient but not portable) or the zero dependencies goal (e.g. requires cygwin to exec the shell script under windows or another portable scripting language).
Adding a force or override attribute to the add operation (which recreates the resources transparently if necessary) would remove the need for conditional logic and additional wrapper scripts/dependencies.
For example:
/profile=default/subsystem=logging/logger="com.arjuna":add(level=TRACE, force=true)
Since the CLI is already portable and has no further dependencies these two new features (plus AS7-2640) would be sufficent to provide a solution for all the initially described goals. It would be great if these enhancements could make their way into AS7.1.0.Final
Regards
Robert
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/645317#645317]
Start a new discussion in JBoss AS 7 Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
12 years, 11 months
[jBPM Development] - Getting "Could not execute JDBC batch update" while running process in JBPM 5.1 with persistence
by uvijayreddy657
uvijayreddy657 [http://community.jboss.org/people/uvijayreddy657] created the discussion
"Getting "Could not execute JDBC batch update" while running process in JBPM 5.1 with persistence"
To view the discussion, visit: http://community.jboss.org/message/622394#622394
--------------------------------------------------------------
We have created all the required mapping tables as per the JPA entity classes. When we are running the process, it tries to insert the process instance data into the database and at that time we are facing below issue. Please see below for the error,
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
org.hibernate.ejb.EntityManagerImpl@fbf51d
1
In Human Task Handler.... :)
Completed
Hibernate: select hibernate_sequence.nextval from dual
Hibernate: select user_.id from OrganizationalEntity user_ where user_.id=?
Hibernate: select hibernate_sequence.nextval from dual
Hibernate: select hibernate_sequence.nextval from dual
Hibernate: select hibernate_sequence.nextval from dual
Hibernate: select hibernate_sequence.nextval from dual
Hibernate: insert into Task (allowedToDelegate, taskInitiator_id, priority, activationTime, actualOwner_id, createdBy_id, createdOn, documentAccessType, documentContentId, documentType, expirationTime, faultAccessType, faultContentId, faultName, faultType, outputAccessType, outputContentId, outputType, parentId, previousStatus, processInstanceId, skipable, status, workItemId, id) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Hibernate: insert into I18NText (language, text, id) values (?, ?, ?)
Hibernate: insert into I18NText (language, text, id) values (?, ?, ?)
Hibernate: insert into I18NText (language, text, id) values (?, ?, ?)
Hibernate: insert into Content (content, id) values (?, ?)
Hibernate: update Task set allowedToDelegate=?, taskInitiator_id=?, priority=?, activationTime=?, actualOwner_id=?, createdBy_id=?, createdOn=?, documentAccessType=?, documentContentId=?, documentType=?, expirationTime=?, faultAccessType=?, faultContentId=?, faultName=?, faultType=?, outputAccessType=?, outputContentId=?, outputType=?, parentId=?, previousStatus=?, processInstanceId=?, skipable=?, status=?, workItemId=? where id=?
javax.persistence.RollbackException: Error while committing the transaction
at org.hibernate.ejb.TransactionImpl.commit(TransactionImpl.java:93)
at org.jbpm.task.service.TaskServiceSession.doOperationInTransaction(TaskServiceSession.java:820)
at org.jbpm.task.service.TaskServiceSession.addTask(TaskServiceSession.java:134)
at org.jbpm.task.service.TaskServerHandler.messageReceived(TaskServerHandler.java:109)
at org.jbpm.task.service.mina.MinaTaskServerHandler.messageReceived(MinaTaskServerHandler.java:41)
at org.apache.mina.core.filterchain.DefaultIoFilterChain$TailFilter.messageReceived(DefaultIoFilterChain.java:713)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:46)
at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:793)
at org.apache.mina.filter.codec.ProtocolCodecFilter$ProtocolDecoderOutputImpl.flush(ProtocolCodecFilter.java:375)
at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:229)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:46)
at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:793)
at org.apache.mina.filter.logging.LoggingFilter.messageReceived(LoggingFilter.java:176)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:46)
at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:793)
at org.apache.mina.core.filterchain.IoFilterAdapter.messageReceived(IoFilterAdapter.java:119)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434)
at org.apache.mina.core.filterchain.DefaultIoFilterChain.fireMessageReceived(DefaultIoFilterChain.java:426)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.read(AbstractPollingIoProcessor.java:638)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:598)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:587)
at org.apache.mina.core.polling.AbstractPollingIoProcessor.access$400(AbstractPollingIoProcessor.java:61)
at org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.run(AbstractPollingIoProcessor.java:969)
at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:64)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:619)
Caused by: javax.persistence.PersistenceException: org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update
at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1214)
at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1147)
at org.hibernate.ejb.TransactionImpl.commit(TransactionImpl.java:81)
... 29 more
Caused by: org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:96)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:275)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:268)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:185)
at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321)
at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:51)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1216)
at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:383)
at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:133)
at org.hibernate.ejb.TransactionImpl.commit(TransactionImpl.java:76)
... 29 more
Caused by: java.sql.BatchUpdateException: ORA-02291: integrity constraint (SDS_OWNR.FK27A9A56CE1EF3A) violated - parent key not found
at oracle.jdbc.driver.DatabaseError.throwBatchUpdateException(DatabaseError.java:343)
at oracle.jdbc.driver.OraclePreparedStatement.executeBatch(OraclePreparedStatement.java:10720)
at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:70)
at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:268)
... 37 more
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/622394#622394]
Start a new discussion in jBPM Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
12 years, 11 months
[JBoss AS 7 Development] - Custom LoginModule in Jboss as 7.1 Beta 1
by Rodrigo Vallejo
Rodrigo Vallejo [http://community.jboss.org/people/rxvallejoce] created the discussion
"Custom LoginModule in Jboss as 7.1 Beta 1"
To view the discussion, visit: http://community.jboss.org/message/638431#638431
--------------------------------------------------------------
I have a custom LoginModule develop in jboss as 6.1 an this extends from .AbstractServerLoginModule, i dont know where is en Jboss 7.1 Beta 1, when i try to auth i have a exeption :
Caused by: java.lang.ClassNotFoundException: org.jboss.security.auth.spi.AbstractServerLoginModule from [Module "ec.gob.sri:main" from local module loader @1112783 (roots: /home/rxvc120809/tools/jboss-as-7.1.0.Beta1/modules)]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:485)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:444)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:444)
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:421)
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:143)
... 52 more
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/638431#638431]
Start a new discussion in JBoss AS 7 Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
12 years, 11 months