[JBoss AS7 Development] - OSGi web app deploy issue
by Konstantin Pupkov
Konstantin Pupkov [http://community.jboss.org/people/goodidea] created the discussion
"OSGi web app deploy issue"
To view the discussion, visit: http://community.jboss.org/message/625372#625372
--------------------------------------------------------------
NPE deploing simple web. app. Very simple app won't deploy.
MANIFEST.MF
Manifest-Version: 1.0
Archiver-Version: Plexus Archiver
Created-By: Apache Maven Bundle Plugin
Built-By: c0pupko
Build-Jdk: 1.6.0_25
Webapp-Context: /gdf
Bundle-ClassPath: .,WEB-INF/classes
Tool: Bnd-1.43.0
Bundle-Name: Foo Web Application Bundle Version 1.0
Web-ContextPath: /gdf
DynamicImport-Package: javax.*,org.xml.sax,org.xml.sax.*,org.w3c.*
Bundle-Version: 1.0.0.SNAPSHOT
Bnd-LastModified: 1315426792118
Bundle-ManifestVersion: 2
Import-Package: javax.servlet,javax.servlet.http,org.ops4j.pax.web.ser
vice,org.osgi.service.http
Bundle-SymbolicName: gdf
13:22:09,838 INFO org.jboss.as.server.deployment org.jboss.as.server.deployment (MSC service thread 1-4) Starting deployment of "gdf.war"
13:22:09,885 INFO org.jboss.as.jpa org.jboss.as.jpa (MSC service thread 1-3) added javax.persistence.api dependency to gdf.war
13:22:09,885 ERROR org.jboss.msc.service.fail org.jboss.msc.service.fail (MSC service thread 1-2) MSC00001: Failed to start service jboss.deployment.unit."gdf.war".POST_MODULE
: org.jboss.msc.service.StartException in service jboss.deployment.unit."gdf.war".POST_MODULE: Failed to process phase POST_MODULE of deployment "gdf.
war"
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) http://community.jboss.org/message/625372#625372#625372/:1.6.0_25 OSGi web app deploy issue
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) http://community.jboss.org/message/625372#625372#625372/:1.6.0_25 OSGi web app deploy issue
at java.lang.Thread.run(Thread.java:662) http://community.jboss.org/message/625372#625372#625372/:1.6.0_25 OSGi web app deploy issue
Caused by: java.lang.NullPointerException
at org.jboss.as.ejb3.deployment.processors.BusinessViewAnnotationProcessor.deploy(BusinessViewAnnotationProcessor.java:72)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:115)
... 5 more
13:22:09,900 INFO org.jboss.as.server.controller org.jboss.as.server.controller (HttpManagementService-threads - 39) Deployment of "gdf.war" was rolled back with failure message
{"Failed services" => {"jboss.deployment.unit.\"gdf.war\".POST_MODULE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"gdf
.war\".POST_MODULE: Failed to process phase POST_MODULE of deployment \"gdf.war\""}}
13:22:09,916 INFO org.jboss.as.server.deployment org.jboss.as.server.deployment (MSC service thread 1-6) Stopped deployment gdf.war in 10ms
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/625372#625372]
Start a new discussion in JBoss AS7 Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 6 months
[JBoss AS7 Development] - DistributedCache replication
by Adrian Brock
Adrian Brock [http://community.jboss.org/people/warjort] created the discussion
"DistributedCache replication"
To view the discussion, visit: http://community.jboss.org/message/627488#627488
--------------------------------------------------------------
I'm trying to create an alternate to the infinispan replicated cache that has 2 key properties that don't seem to be compatible with the current DistributedCache api.
1) The version/metadata/timestamp/attributes are stored in a blob together unlike the infinispan cache where they are stored seperately - but automatically using the AtomicMap.
2) The data is stored remotely so retrieving data that I am not told to replicate so as to recreate the full blob is expensive.
The issue comes from the following code in SessionBasedClusteredSession
@Override
protected OutgoingSessionGranularitySessionData getOutgoingSessionData() {
Map<String, Object> attrs = isSessionAttributeMapDirty() ? getSessionAttributeMap() : null;
DistributableSessionMetadata metadata = isSessionMetadataDirty() ? getSessionMetadata() : null;
Long timestamp = attrs != null || metadata != null || getMustReplicateTimestamp() ? Long.valueOf(getSessionTimestamp())
: null;
return new OutgoingData(getRealId(), getVersion(), timestamp, metadata, attrs);
}
Where the DistributedCache is not told all the data on subsequent replication requests if has not changed.
I'd like to have either;
1) Some way to tell it to always give me all the data - this data is held in the local cache
2) Some way of getting access to the local data so I can retrieve the data that hasn't changed without going to my remote store
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/627488#627488]
Start a new discussion in JBoss AS7 Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 6 months
[jBPM Development] - SessionInfo and ProcessInstanceInfo tables are not getting updated when starting the process using JPAKnoweldgeService
by uvijayreddy657
uvijayreddy657 [http://community.jboss.org/people/uvijayreddy657] created the discussion
"SessionInfo and ProcessInstanceInfo tables are not getting updated when starting the process using JPAKnoweldgeService"
To view the discussion, visit: http://community.jboss.org/message/626224#626224
--------------------------------------------------------------
I am able to start the process and also able to store the TASK details. But SessionInfo, ProcessInstanceInfo and WorkItemInfo tables are not getting updated.
Queries are being generated only to insert data only into TASK and PEOPLEASSIGNMENTS_POTOWNERS and PEOPLEASSIGNMENTS_BAS..etc tables. But not generating insert statements to SessionInfo and ProcessInstanceInfo tables.
Do we need to do any extra configurations or add extra statements to the code?
Please somebody help. I am strucked with it from past 1 week.
Here is the piece of code which I am using to start the process.
>
> kbase = kbuilder.newKnowledgeBase();
>
> Properties properties = new Properties();
> properties.put("drools.processInstanceManagerFactory", "org.jbpm.persistence.processinstance.JPAProcessInstanceManagerFactory") ;
> properties.put("drools.processSignalManagerFactory","org.jbpm.persistence.processinstance.JPASignalManagerFactory");
> KnowledgeSessionConfiguration config = KnowledgeBaseFactory.newKnowledgeSessionConfiguration(properties);
>
> Environment env = KnowledgeBaseFactory.newEnvironment();
> env.set(EnvironmentName.ENTITY_MANAGER_FACTORY, emf);
> env.set(EnvironmentName.GLOBALS, new MapGlobalResolver());
> userTransaction = TransactionManagerServices.getTransactionManager();
> env.set(EnvironmentName.TRANSACTION_MANAGER, userTransaction);
> env.set(EnvironmentName.TRANSACTION, userTransaction);
>
> System.out.println("Loading session data ...");
> if (ksession != null && Integer.valueOf(ksession.getId()) != null) {
> try {
> ksession = JPAKnowledgeService.loadStatefulKnowledgeSession(ksession.getId(), kbase, config,env);
> }catch (RuntimeException e) {
> if (e instanceof IllegalStateException) {
> Throwable cause = ((IllegalStateException) e).getCause();
> if (cause instanceof InvocationTargetException) {
> cause = cause.getCause();
> if (cause != null && ("Could not find session data for id "+ksession.getId()).equals(cause.getMessage())) {
> System.out.println("Creating new session data ...");
> ksession = JPAKnowledgeService.newStatefulKnowledgeSession(kbase, config, env);
> } else {
> System.err.println("Error loading session data: " + cause);
> throw e;
> }
> } else {
> System.err.println("Error loading session data:" + cause);
> throw e;
> }
> } else {
> System.err.println("Error loading session data: " + e.getMessage());
> throw e;
> }
> }
> } else {
> ksession = JPAKnowledgeService.newStatefulKnowledgeSession(kbase,config, env);
> }
>
> new WorkingMemoryDbLogger(ksession);
> ksession.getWorkItemManager().registerWorkItemHandler("Human Task",new CHumanTaskHandler());
>
// start the transaction
UserTransaction ut = getUserTransaction();
ut.begin();
> ksession.startProcess(processId, params);
>
> // commit the transaction
> ut.commit();
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/626224#626224]
Start a new discussion in jBPM Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 6 months
[JBoss AS7 Development] - META-INF/services for module extensions - question/issue
by Dan Sirbu
Dan Sirbu [http://community.jboss.org/people/lmcdasi] created the discussion
"META-INF/services for module extensions - question/issue"
To view the discussion, visit: http://community.jboss.org/message/621332#621332
--------------------------------------------------------------
Hi,
I have create a module testmod that is stored into /home/jboss7/modules/com/mycomp/testmod/main with the appropriate jar file. The META-INF/services contains the necessary defition for a java service to be loaded.
I also create a testextension module that is stored into /home/jboss7/modules/com/mycomp/testextension/main. In testextenstion module.xml I add the dependency towards the testmod in order to have the classpath set properly.
I have 2 situations:
(a) If I set the testmod as a global module in the standalone.xml, the the META-INF/services class defined there is loaded and available to a war file since when I deploy the WAR file via the ServletContextListner I can bootstrap the spi.
(b) If I define the textextension in standalone.xml (and remove the global definition), then try to bootstrap the testmod from the testextension, then the META-INF/services is no longer loaded and the SPI is not working anylonger.
I am wondering if my test is valid. And if yes, what would be the reason that the testmod META-INF/services is not available to the textextension module. In the dependency definiton I tried : services="export" export="true" for example ( I try "import" too) but no luck.
Looking more carefully at the META-INF/services of the testextension module, there is one needed by jboss in order to kickstart the extension. And that get's called. So what I did, is to add the services from the testmod within the testextension -> still not luck.
And that sounds similar with : " https://issues.jboss.org/browse/AS7-4 https://issues.jboss.org/browse/AS7-4" - which tough looks to be old and addressed. I am using the GA version.
Any tips ?
BR,
Dan S.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/621332#621332]
Start a new discussion in JBoss AS7 Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 6 months
[JBoss ESB Development] - ESB Action StaticRouter vs JMSRouter
by Steve Kruse
Steve Kruse [http://community.jboss.org/people/hskruse] created the discussion
"ESB Action StaticRouter vs JMSRouter"
To view the discussion, visit: http://community.jboss.org/message/626955#626955
--------------------------------------------------------------
Hi,
I have run into an issue when using the StaticRouter and having the message body not contain the object that I expected. Does the StaticRouter put another wrapper aroound the message body that would cause services down the line not to recognize the object that it should contain? My scenario is the following, I have a service that contains an action that takes in a message that I then add some properties too and then forward it to another service using the StaticRouter. In the receiving service the action tries to cast the message body to what it was set to in the forwarding service and it fails with a class cast exception. When I use the JMSRouter everything works fine and the service action has no problem casting the object to what is expected. Any help is much appreciated.
Thanks,
Steve
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/626955#626955]
Start a new discussion in JBoss ESB Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 6 months
[PicketBox Development] - SecurityDomain Annotation
by Ramon Molossi
Ramon Molossi [http://community.jboss.org/people/ramonmolossi] created the discussion
"SecurityDomain Annotation"
To view the discussion, visit: http://community.jboss.org/message/626764#626764
--------------------------------------------------------------
I'm creating a WebApplication using Jboss AS 7 and trying to use a Form Based Authentication using a DatabaseServerLoginModule.
My authentication and roles are ok.
I had a problem to protect a EJB class.
I configured my EJB methods with @RolesAllowed("Admin") as I wanted.
But nothing is getting blocked, even who don't have the "Admin" Role....
Then I tried to configure the *(a)org.jboss.security.annotation.SecurityDomain*("myDomain") at class type definition. Nothing gets blocked yet.
Then I tried to use *(a)org.jboss.ejb3.annotation.SecurityDomain*("myDomain") and things starts work.
I just want to know why. If I am not supposed to use de org.jboss.security annotation or if I missed some configuration.
My configuration is really simple:
<security-domain name="myDomain" cache-type="default">
<authentication>
<login-module code="org.jboss.security.auth.spi.DatabaseServerLoginModule" flag="required">
<module-option name="dsJndiName" value="java:jboss/datasources/myDS"/>
<module-option name="principalsQuery" value="mySQL1"/>
<module-option name="rolesQuery" value=mySQL2"/>
<module-option name="hashAlgorithm" value="MD5"/>
<module-option name="hashEncoding" value="HEX"/>
</login-module>
</authentication>
</security-domain>
ps: At this moment I just trying authentication configs wich are really ok, I'm having some troubles with authorization configs inside this security-domain, but I will create a new discussion to that.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/626764#626764]
Start a new discussion in PicketBox Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 6 months