[JBoss Microcontainer] New message: "Dependency management of multiple webapp start"
by Ben Pickering
User development,
A new message was posted in the thread "Dependency management of multiple webapp start":
http://community.jboss.org/message/523414#523414
Author : Ben Pickering
Profile : http://community.jboss.org/people/benp
Message:
--------------------------------------------------------------
Hi, I'm presently researching ways to refactor some standalone software to a container-based architecture. I'm developing a proof of concept in JBoss EAP 5.0.0.RC.
The current non-JBoss implementation uses several Java VMs that communicate using RMI with discovery using Jini. Any VM can block while it discovers services provided by other VMs, typically while starting.
I would like to improve the management of these components, and I'm investigating doing it by packaging each as an EAR or WAR. I've been trying to find some documentation on asynchronous startup and dependencies between services and webapps in JBoss, without luck.
Does anyone have a recommendation for an approach, or could point me at some documentation?
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/523414#523414
14 years, 11 months
[EJB 3.0] New message: "Re: Calling EJB from servlet - EJB's interface class not found"
by Mike Johnson
User development,
A new message was posted in the thread "Calling EJB from servlet - EJB's interface class not found":
http://community.jboss.org/message/523412#523412
Author : Mike Johnson
Profile : http://community.jboss.org/people/micjohnson997
Message:
--------------------------------------------------------------
Sorry it took me a while to get back to this -- I have been out of town. OK, the short answer is, this isn't a problem anymore; the piece of info I neglected to provide, and which at the time didn't seem pertinent but in hindsight is very pertinent, is that this WAR I have been deploying is a Liferay portlet WAR, and I have been deploying it via Liferay, which is supposed to then deploy it to JBoss. Apparently something is going wonky in the Liferay deployment step. Just by accident, I deployed the WAR directly into JBoss (skipping Liferay), and then ran my test app -- and voila, my calls to the EJBs from the servlet in the WAR succeeded! So we are now trying to track down what could be getting messed up with the Liferay 5.2.x -> JBoss 6.0.0 M1 deployment. We can see that Liferay is significantly changing the web.xml descriptor, which might have something to do with it. We can also see that all of the files that are needed (including the JAR containing the interface classes) are deployed correctly. I don't see anything that specifically talks about a classpath in the modified web.xml file, but we're early in our investigations. I will report back if we find anything -- we can't be the only people trying to use Liferay 5.2.x with JBoss 6.0.0 M1...
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/523412#523412
14 years, 11 months
[JBoss AOP] New message: "Re: Tried everything to get Interceptor working, what am I missing?"
by Nick Dodd
User development,
A new message was posted in the thread "Tried everything to get Interceptor working, what am I missing?":
http://community.jboss.org/message/523411#523411
Author : Nick Dodd
Profile : http://community.jboss.org/people/baronDodd
Message:
--------------------------------------------------------------
Ok thanks. Sorry for my naivety on this subject, going to learn all about this in a course later in the year but trying to implement it for a quick bug fix! My plan may have been flawed from the very start. What I ultimately want to do is intercept calls to all invocations of java.ejb.SessionContext.getCallerPrincipal() which could be any number of concrete classes at runtime in several jar files. So precompilation will not be an option.
I got my test working the same as before but this time with the annotations:
@InterceptorDef(scope=Scope.PER_VM)
@Bind (pointcut="execution(public * *->*(..))")
Same result as before, only picking up the jms classes. If I am specifying my bindings in annotations, can I get away with an empty *-aop.xml? Also as this is not a war/ear deployment it can simply sit alongside my jar file? I am intercepting the jms classes even without xml.
Anyhow, I realized that I had not used the proper command line argument for loadtime:
-javaagent:$(JBossHome)/server/deploy/jboss-aop-jdk50.deployer/jboss-aop-jdk50.jar
Added this and suddenly lots of NoClassDefFounds. Added the jdk50.deployer jars to the classpath and suddenly it sparked into live and I got a stackoverflow from my interceptor intercepting itself to infinity! This is what I had been waiting for! Changed the pointcut expression to something more sensible, and now I get :
java.lang.NoClassDefFoundError: org/jboss/dom4j/Element
Which appears to be in a ridiculously named dom4j-jarjar.jar in the 3rd party libs which JBoss is built against...
Think this is starting to suck through too many changes for a quick fix.
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/523411#523411
14 years, 11 months
[jBPM] New message: "JBPM 4.3 Why is taskService.addTaskComment() only allowed for completed tasks?"
by Arjan Jonker
User development,
A new message was posted in the thread "JBPM 4.3 Why is taskService.addTaskComment() only allowed for completed tasks?":
http://community.jboss.org/message/523396#523396
Author : Arjan Jonker
Profile : http://community.jboss.org/people/ajonker
Message:
--------------------------------------------------------------
This is not what I was expecting. On an active task, I try the following on task completion:
taskService.addTaskComment(command.getTaskId(), command.getRemark());
taskService.completeTask(command.getTaskId(), command.getOutcome());
But I get a JBPMException:
24806 [btpool0-1] WARN root - Nested in org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.jbpm.api.JbpmException: task 10 doesn't exist:
org.jbpm.api.JbpmException: task 10 doesn't exist
at org.jbpm.pvm.internal.cmd.AddTaskCommentCmd.execute(AddTaskCommentCmd.java:51)
at org.jbpm.pvm.internal.cmd.AddTaskCommentCmd.execute(AddTaskCommentCmd.java:35)
at org.jbpm.pvm.internal.svc.DefaultCommandService.execute(DefaultCommandService.java:42)
Searching a little in the sources showed me that adding comments to tasks is only allowed on HistoryTasks:
org.jbpm.pvm.internal.cmd.AddTaskCommentCmd:
HistoryTaskImpl historyTask = dbSession.get(HistoryTaskImpl.class, taskDbid);
if (historyTask==null) {
throw new JbpmException("task "+taskDbid+" doesn't exist");
}
Why can't I add comments to running tasks? When the task is completed, adding comments seems a bit silly since it's already completed.
Kind regards,
Arjan
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/523396#523396
14 years, 11 months
[JBoss Portal] New message: "Re: User not found with UserModule"
by Holger Breuer
User development,
A new message was posted in the thread "User not found with UserModule":
http://community.jboss.org/message/523394#523394
Author : Holger Breuer
Profile : http://community.jboss.org/people/Gamba
Message:
--------------------------------------------------------------
I'm using the standard IdentityLoginModule and the security-domain associated in my session bean is portal
<login-module code="org.jboss.portal.identity.auth.IdentityLoginModule" flag="sufficient">
<module-option name="unauthenticatedIdentity">guest</module-option>
<module-option name="userModuleJNDIName">java:/portal/UserModule</module-option>
<module-option name="roleModuleJNDIName">java:/portal/RoleModule</module-option>
<module-option name="userProfileModuleJNDIName">java:/portal/UserProfileModule</module-option>
<module-option name="membershipModuleJNDIName">java:/portal/MembershipModule</module-option>
<module-option name="validateUserNameCase">true</module-option>
<module-option name="additionalRole">Authenticated</module-option>
</login-module>
So I don't understand why the user is not found.
To go a little deeper. Every call to UserModule is restriced ... the lookup is ok ...
UserModule userModule = (UserModule) new InitialContext().lookup("java:portal/UserModule");
... but after everey method call some errors with the transaction enlistes stuff occurs ... for example the call for user count:
userModule.getUserCount()
2010-02-01 16:07:18,281 WARN [com.arjuna.ats.jta.logging.loggerI18N] [com.arjuna.ats.internal.jta.transaction.arjunacore.lastResource.disallow] [com.arjuna.ats.internal.jta.transaction.arjunacore.lastResource.disallow] Adding multiple last resources is disallowed. Current resource is org.jboss.resource.connectionmanager.TxConnectionManager$LocalXAResource@1202871
2010-02-01 16:07:18,343 ERROR [org.hibernate.util.JDBCExceptionReporter] Could not enlist in transaction on entering meta-aware object!; - nested throwable: (javax.transaction.SystemException: java.lang.Throwable: Unabled to enlist resource, see the previous warnings. tx=TransactionImple < ac, BasicAction: a1135a1:1140:4b66ec15:732 status: ActionStatus.ABORT_ONLY >); - nested throwable: (org.jboss.resource.JBossResourceException: Could not enlist in transaction on entering meta-aware object!; - nested throwable: (javax.transaction.SystemException: java.lang.Throwable: Unabled to enlist resource, see the previous warnings. tx=TransactionImple < ac, BasicAction: a1135a1:1140:4b66ec15:732 status: ActionStatus.ABORT_ONLY >))
2010-02-01 16:07:18,343 ERROR [org.hibernate.util.JDBCExceptionReporter] Could not enlist in transaction on entering meta-aware object!; - nested throwable: (javax.transaction.SystemException: java.lang.Throwable: Unabled to enlist resource, see the previous warnings. tx=TransactionImple < ac, BasicAction: a1135a1:1140:4b66ec15:732 status: ActionStatus.ABORT_ONLY >); - nested throwable: (org.jboss.resource.JBossResourceException: Could not enlist in transaction on entering meta-aware object!; - nested throwable: (javax.transaction.SystemException: java.lang.Throwable: Unabled to enlist resource, see the previous warnings. tx=TransactionImple < ac, BasicAction: a1135a1:1140:4b66ec15:732 status: ActionStatus.ABORT_ONLY >))
2010-02-01 16:07:18,359 ERROR [org.jboss.portal.identity.db.HibernateUserModuleImpl] Cannot count users
org.hibernate.exception.GenericJDBCException: Cannot open connection
at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:103)
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:91)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:29)
at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:426)
at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:144)
at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:139)
at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1547)
at org.hibernate.loader.Loader.doQuery(Loader.java:673)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
at org.hibernate.loader.Loader.doList(Loader.java:2220)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2104)
....
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
at java.lang.Thread.run(Thread.java:595)
Caused by: org.jboss.util.NestedSQLException: Could not enlist in transaction on entering meta-aware object!; - nested throwable: (javax.transaction.SystemException: java.lang.Throwable: Unabled to enlist resource, see the previous warnings. tx=TransactionImple < ac, BasicAction: a1135a1:1140:4b66ec15:732 status: ActionStatus.ABORT_ONLY >); - nested throwable: (org.jboss.resource.JBossResourceException: Could not enlist in transaction on entering meta-aware object!; - nested throwable: (javax.transaction.SystemException: java.lang.Throwable: Unabled to enlist resource, see the previous warnings. tx=TransactionImple < ac, BasicAction: a1135a1:1140:4b66ec15:732 status: ActionStatus.ABORT_ONLY >))
at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:95)
at org.hibernate.connection.DatasourceConnectionProvider.getConnection(DatasourceConnectionProvider.java:69)
at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:423)
... 345 more
Caused by: org.jboss.resource.JBossResourceException: Could not enlist in transaction on entering meta-aware object!; - nested throwable: (javax.transaction.SystemException: java.lang.Throwable: Unabled to enlist resource, see the previous warnings. tx=TransactionImple < ac, BasicAction: a1135a1:1140:4b66ec15:732 status: ActionStatus.ABORT_ONLY >)
at org.jboss.resource.connectionmanager.TxConnectionManager.managedConnectionReconnected(TxConnectionManager.java:358)
at org.jboss.resource.connectionmanager.BaseConnectionManager2.reconnectManagedConnection(BaseConnectionManager2.java:524)
at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:405)
at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:849)
at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:89)
... 347 more
Caused by: javax.transaction.SystemException: java.lang.Throwable: Unabled to enlist resource, see the previous warnings. tx=TransactionImple < ac, BasicAction: a1135a1:1140:4b66ec15:732 status: ActionStatus.ABORT_ONLY >
at org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener$TransactionSynchronization.checkEnlisted(TxConnectionManager.java:759)
at org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener.enlist(TxConnectionManager.java:592)
at org.jboss.resource.connectionmanager.TxConnectionManager.managedConnectionReconnected(TxConnectionManager.java:352)
... 351 more
2010-02-01 16:07:19,468 WARN [com.arjuna.ats.jta.logging.loggerI18N] [com.arjuna.ats.internal.jta.transaction.arjunacore.enliststarterror] [com.arjuna.ats.internal.jta.transaction.arjunacore.enliststarterror] TransactionImple.enlistResource - XAResource.start returned: XAException.XAER_PROTO for < 131075, 27, 25, 1-a1135a1:1140:4b66ec15:73ca1135a1:1140:4b66ec15:740 >
2010-02-01 16:07:19,468 ERROR [STDERR] org.jboss.resource.connectionmanager.JBossLocalXAException: Trying to start a new tx when old is not complete! old: < 131075, 27, 25, 1-a1135a1:1140:4b66ec15:732a1135a1:1140:4b66ec15:73b >, new < 131075, 27, 25, 1-a1135a1:1140:4b66ec15:73ca1135a1:1140:4b66ec15:740 >, flags 0
2010-02-01 16:07:19,468 ERROR [STDERR] at org.jboss.resource.connectionmanager.TxConnectionManager$LocalXAResource.start(TxConnectionManager.java:901)
2010-02-01 16:07:19,468 ERROR [STDERR] at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.enlistResource(TransactionImple.java:776)
2010-02-01 16:07:19,468 ERROR [STDERR] at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.enlistResource(TransactionImple.java:499)
2010-02-01 16:07:19,468 ERROR [STDERR] at org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener$TransactionSynchronization.enlist(TxConnectionManager.java:788)
2010-02-01 16:07:19,468 ERROR [STDERR] at org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener.enlist(TxConnectionManager.java:579)
2010-02-01 16:07:19,468 ERROR [STDERR] at org.jboss.resource.connectionmanager.TxConnectionManager.managedConnectionReconnected(TxConnectionManager.java:352)
2010-02-01 16:07:19,468 ERROR [STDERR] at org.jboss.resource.connectionmanager.BaseConnectionManager2.reconnectManagedConnection(BaseConnectionManager2.java:524)
2010-02-01 16:07:19,468 ERROR [STDERR] at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:405)
2010-02-01 16:07:19,468 ERROR [STDERR] at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:849)
2010-02-01 16:07:19,468 ERROR [STDERR] at org.jboss.resource.adapter.jdbc.WrapperDataSource.
.....
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/523394#523394
14 years, 11 months
[JBoss AOP] New message: "Re: Tried everything to get Interceptor working, what am I missing?"
by Kabir Khan
User development,
A new message was posted in the thread "Tried everything to get Interceptor working, what am I missing?":
http://community.jboss.org/message/523388#523388
Author : Kabir Khan
Profile : http://community.jboss.org/people/kabir.khan@jboss.com
Message:
--------------------------------------------------------------
> baronDodd wrote:
>
> The link to the documentation is for loadtime instrumentation while I am attempting pre-compiled intstumentation. Anyhow the XML in the sample is identical to what I already had, it is the same as what is shipping with JBoss. But am I required to turn on EnableLoadtimeWeaving and edit the include / exclude elements? I tried this and I got several NullPointers and stack traces.
For compile-time weaving you don't need to turn on EnableLoadtimeWeaving, but you still need to deploy a jboss-aop.xml file (either standalone OR in an .aop archive in META-INF/jboss-aop.xml.
> baronDodd wrote:
>
> 1) If I am using annotations e.g @InterceptorDef do I still need an *-aop.xml file at all?
To use annotations the classes need to be in a .aop archive, and in AS 4 for this to be recognized you need the META-INF/jboss-aop.xml file, but you don't need anything apart from <aop></aop>
> baronDodd wrote:
>
> 2) When I use the aopc ant task, obviously the aspect/interceptor classes need to be on the classpath, but do the target classes which I am intercepting also need to be on the classpath?
>
Yes
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/523388#523388
14 years, 11 months