[jBPM] - Seam, TestNG and Jbpm - Could not find datasource error
by gabriel kb
gabriel kb [http://community.jboss.org/people/gabriel.kb] created the discussion
"Seam, TestNG and Jbpm - Could not find datasource error"
To view the discussion, visit: http://community.jboss.org/message/580295#580295
--------------------------------------------------------------
I'm using Seam 2.2, Eclipse 3.5, JBoss tools, jBPM 3.2.7 and the TestNG plugin for Eclipse.
I created a seam project and its test project with the jboss tools. It's a simple "to do list" seam-jbpm application and works fine. However, when I run my seam test (see below) I get this stacktrace:
INFO [org.jbpm.JbpmConfiguration] using configuration resource: jbpm.cfg.xml
INFO [org.jbpm.persistence.db.StaleObjectLogConfigurer] stale object exceptions will be hidden from logging
ERROR [org.hibernate.connection.DatasourceConnectionProvider] Could not find datasource: java:/EjemplosJbpmDatasource
java.lang.RuntimeException: PROVIDER_URL not provided in jndi.properties. Automatic discovery not implemented yet.
at org.jboss.naming.JBossRemotingContextFactory.getInitialContext(JBossRemotingContextFactory.java:158)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
at javax.naming.InitialContext.init(InitialContext.java:223)
at javax.naming.InitialContext.<init>(InitialContext.java:175)
at org.hibernate.util.NamingHelper.getInitialContext(NamingHelper.java:51)
at org.hibernate.connection.DatasourceConnectionProvider.configure(DatasourceConnectionProvider.java:75)
at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:137)
at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:79)
at org.hibernate.cfg.SettingsFactory.createConnectionProvider(SettingsFactory.java:448)
at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:89)
at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2101)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1325)
at org.jbpm.persistence.db.DbPersistenceServiceFactory.getSessionFactory(DbPersistenceServiceFactory.java:105)
at org.jbpm.persistence.db.DbPersistenceService.getSessionFactory(DbPersistenceService.java:84)
at org.jbpm.persistence.db.DbPersistenceService.getSession(DbPersistenceService.java:89)
at org.jbpm.persistence.db.DbPersistenceService.getJobSession(DbPersistenceService.java:340)
at org.jbpm.JbpmContext.getJobSession(JbpmContext.java:596)
at org.jbpm.scheduler.db.DbSchedulerService.<init>(DbSchedulerService.java:49)
at org.jbpm.scheduler.db.DbSchedulerServiceFactory.openService(DbSchedulerServiceFactory.java:32)
at org.jbpm.svc.Services.getService(Services.java:155)
at org.jbpm.svc.Services.getCurrentService(Services.java:93)
at org.jbpm.svc.Services.getCurrentService(Services.java:86)
at org.jbpm.scheduler.def.CreateTimerAction.execute(CreateTimerAction.java:79)
at org.jbpm.graph.def.GraphElement.executeAction(GraphElement.java:280)
at org.jbpm.graph.def.GraphElement.executeActions(GraphElement.java:237)
at org.jbpm.graph.def.GraphElement.fireAndPropagateEvent(GraphElement.java:207)
at org.jbpm.graph.def.GraphElement.fireEvent(GraphElement.java:190)
at org.jbpm.taskmgmt.exe.TaskInstance.create(TaskInstance.java:156)
at org.jbpm.taskmgmt.exe.TaskMgmtInstance.createTaskInstance(TaskMgmtInstance.java:191)
at org.jbpm.graph.node.TaskNode.execute(TaskNode.java:189)
at org.jbpm.graph.def.Node.enter(Node.java:375)
at org.jbpm.graph.def.Transition.take(Transition.java:151)
at org.jbpm.graph.def.Node.leave(Node.java:453)
at org.jbpm.graph.node.StartState.leave(StartState.java:78)
at org.jbpm.graph.exe.Token.signal(Token.java:214)
at org.jbpm.graph.exe.Token.signal(Token.java:143)
at org.jbpm.graph.exe.ProcessInstance.signal(ProcessInstance.java:287)
at org.ejemplosjbpm.test.SubProcesoTest.testMinimo(SubProcesoTest.java:25)
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:597)
at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:607)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:517)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:669)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:956)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:126)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:110)
at org.testng.TestRunner.runWorkers(TestRunner.java:759)
at org.testng.TestRunner.privateRun(TestRunner.java:592)
at org.testng.TestRunner.run(TestRunner.java:486)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:332)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:327)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:299)
at org.testng.SuiteRunner.run(SuiteRunner.java:204)
at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:877)
at org.testng.TestNG.runSuitesLocally(TestNG.java:842)
at org.testng.TestNG.run(TestNG.java:751)
at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:73)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:124)
ERROR [org.jbpm.graph.def.GraphElement] action threw exception: Could not find datasource
org.hibernate.HibernateException: Could not find datasource
at org.hibernate.connection.DatasourceConnectionProvider.configure(DatasourceConnectionProvider.java:79)
at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:137)
at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:79)
at org.hibernate.cfg.SettingsFactory.createConnectionProvider(SettingsFactory.java:448)
at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:89)
at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2101)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1325)
at org.jbpm.persistence.db.DbPersistenceServiceFactory.getSessionFactory(DbPersistenceServiceFactory.java:105)
at org.jbpm.persistence.db.DbPersistenceService.getSessionFactory(DbPersistenceService.java:84)
at org.jbpm.persistence.db.DbPersistenceService.getSession(DbPersistenceService.java:89)
at org.jbpm.persistence.db.DbPersistenceService.getJobSession(DbPersistenceService.java:340)
at org.jbpm.JbpmContext.getJobSession(JbpmContext.java:596)
at org.jbpm.scheduler.db.DbSchedulerService.<init>(DbSchedulerService.java:49)
at org.jbpm.scheduler.db.DbSchedulerServiceFactory.openService(DbSchedulerServiceFactory.java:32)
at org.jbpm.svc.Services.getService(Services.java:155)
at org.jbpm.svc.Services.getCurrentService(Services.java:93)
at org.jbpm.svc.Services.getCurrentService(Services.java:86)
at org.jbpm.scheduler.def.CreateTimerAction.execute(CreateTimerAction.java:79)
at org.jbpm.graph.def.GraphElement.executeAction(GraphElement.java:280)
at org.jbpm.graph.def.GraphElement.executeActions(GraphElement.java:237)
at org.jbpm.graph.def.GraphElement.fireAndPropagateEvent(GraphElement.java:207)
at org.jbpm.graph.def.GraphElement.fireEvent(GraphElement.java:190)
at org.jbpm.taskmgmt.exe.TaskInstance.create(TaskInstance.java:156)
at org.jbpm.taskmgmt.exe.TaskMgmtInstance.createTaskInstance(TaskMgmtInstance.java:191)
at org.jbpm.graph.node.TaskNode.execute(TaskNode.java:189)
at org.jbpm.graph.def.Node.enter(Node.java:375)
at org.jbpm.graph.def.Transition.take(Transition.java:151)
at org.jbpm.graph.def.Node.leave(Node.java:453)
at org.jbpm.graph.node.StartState.leave(StartState.java:78)
at org.jbpm.graph.exe.Token.signal(Token.java:214)
at org.jbpm.graph.exe.Token.signal(Token.java:143)
at org.jbpm.graph.exe.ProcessInstance.signal(ProcessInstance.java:287)
at org.ejemplosjbpm.test.SubProcesoTest.testMinimo(SubProcesoTest.java:25)
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:597)
at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:607)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:517)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:669)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:956)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:126)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:110)
at org.testng.TestRunner.runWorkers(TestRunner.java:759)
at org.testng.TestRunner.privateRun(TestRunner.java:592)
at org.testng.TestRunner.run(TestRunner.java:486)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:332)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:327)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:299)
at org.testng.SuiteRunner.run(SuiteRunner.java:204)
at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:877)
at org.testng.TestNG.runSuitesLocally(TestNG.java:842)
at org.testng.TestNG.run(TestNG.java:751)
at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:73)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:124)
Caused by: java.lang.RuntimeException: PROVIDER_URL not provided in jndi.properties. Automatic discovery not implemented yet.
at org.jboss.naming.JBossRemotingContextFactory.getInitialContext(JBossRemotingContextFactory.java:158)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
at javax.naming.InitialContext.init(InitialContext.java:223)
at javax.naming.InitialContext.<init>(InitialContext.java:175)
at org.hibernate.util.NamingHelper.getInitialContext(NamingHelper.java:51)
at org.hibernate.connection.DatasourceConnectionProvider.configure(DatasourceConnectionProvider.java:75)
... 54 more
FAILED: testMinimo
org.jbpm.graph.def.DelegationException: Could not find datasource
at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:359)
at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:350)
at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:350)
at org.jbpm.graph.def.GraphElement.executeAction(GraphElement.java:296)
at org.jbpm.graph.def.GraphElement.executeActions(GraphElement.java:237)
at org.jbpm.graph.def.GraphElement.fireAndPropagateEvent(GraphElement.java:207)
at org.jbpm.graph.def.GraphElement.fireEvent(GraphElement.java:190)
at org.jbpm.taskmgmt.exe.TaskInstance.create(TaskInstance.java:156)
at org.jbpm.taskmgmt.exe.TaskMgmtInstance.createTaskInstance(TaskMgmtInstance.java:191)
at org.jbpm.graph.node.TaskNode.execute(TaskNode.java:189)
at org.jbpm.graph.def.Node.enter(Node.java:375)
at org.jbpm.graph.def.Transition.take(Transition.java:151)
at org.jbpm.graph.def.Node.leave(Node.java:453)
at org.jbpm.graph.node.StartState.leave(StartState.java:78)
at org.jbpm.graph.exe.Token.signal(Token.java:214)
at org.jbpm.graph.exe.Token.signal(Token.java:143)
at org.jbpm.graph.exe.ProcessInstance.signal(ProcessInstance.java:287)
at org.ejemplosjbpm.test.SubProcesoTest.testMinimo(SubProcesoTest.java:25)
Caused by: org.hibernate.HibernateException: Could not find datasource
at org.hibernate.connection.DatasourceConnectionProvider.configure(DatasourceConnectionProvider.java:79)
at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:137)
at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:79)
at org.hibernate.cfg.SettingsFactory.createConnectionProvider(SettingsFactory.java:448)
at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:89)
at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2101)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1325)
at org.jbpm.persistence.db.DbPersistenceServiceFactory.getSessionFactory(DbPersistenceServiceFactory.java:105)
at org.jbpm.persistence.db.DbPersistenceService.getSessionFactory(DbPersistenceService.java:84)
at org.jbpm.persistence.db.DbPersistenceService.getSession(DbPersistenceService.java:89)
at org.jbpm.persistence.db.DbPersistenceService.getJobSession(DbPersistenceService.java:340)
at org.jbpm.JbpmContext.getJobSession(JbpmContext.java:596)
at org.jbpm.scheduler.db.DbSchedulerService.<init>(DbSchedulerService.java:49)
at org.jbpm.scheduler.db.DbSchedulerServiceFactory.openService(DbSchedulerServiceFactory.java:32)
at org.jbpm.svc.Services.getService(Services.java:155)
at org.jbpm.svc.Services.getCurrentService(Services.java:93)
at org.jbpm.svc.Services.getCurrentService(Services.java:86)
at org.jbpm.scheduler.def.CreateTimerAction.execute(CreateTimerAction.java:79)
at org.jbpm.graph.def.GraphElement.executeAction(GraphElement.java:280)
... 36 more
Caused by: java.lang.RuntimeException: PROVIDER_URL not provided in jndi.properties. Automatic discovery not implemented yet.
at org.jboss.naming.JBossRemotingContextFactory.getInitialContext(JBossRemotingContextFactory.java:158)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
at javax.naming.InitialContext.init(InitialContext.java:223)
at javax.naming.InitialContext.<init>(InitialContext.java:175)
at org.hibernate.util.NamingHelper.getInitialContext(NamingHelper.java:51)
at org.hibernate.connection.DatasourceConnectionProvider.configure(DatasourceConnectionProvider.java:75)
This is my test class:
public class SubProcesoTest{
@Test
public void testMinimo() throws Exception {
JbpmConfiguration jbpmConfig = JbpmConfiguration.getInstance();
JbpmContext jbpmContext = jbpmConfig.createJbpmContext();
try {
ProcessDefinition subProceso = ProcessDefinition
.parseXmlResource("subproceso/processdefinition.xml");
ProcessInstance subProcesoPI = subProceso.createProcessInstance();
Assert.assertEquals(
subProcesoPI.getRootToken().getNode().getName(), "start");
subProcesoPI.signal();
Assert.assertEquals(
subProcesoPI.getRootToken().getNode().getName(), "todo");
} finally {
jbpmContext.close();
}
}
}
This is the persistence unit defined in the persistence.xml for the project:
<persistence-unit name="EjemplosJbpm" transaction-type="JTA">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<jta-data-source>java:/EjemplosJbpmDatasource</jta-data-source>
<properties>
<property name="hibernate.dialect" value="org.hibernate.dialect.MySQL5InnoDBDialect"/>
<property name="hibernate.hbm2ddl.auto" value="update"/>
<property name="hibernate.show_sql" value="true"/>
<property name="hibernate.format_sql" value="true"/>
<!-- Only relevant if Seam is loading the persistence unit (Java SE bootstrap) -->
<property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.JBossTransactionManagerLookup"/>
</properties>
</persistence-unit>
And the jbpm.cfg.xml:
<jbpm-configuration>
<jbpm-context>
<service name="persistence">
<factory>
<bean class="org.jbpm.persistence.db.DbPersistenceServiceFactory">
<field name="isTransactionEnabled">
<false />
</field>
</bean>
</factory>
</service>
<service name="tx" factory="org.jbpm.tx.TxServiceFactory" />
<service name="message" factory="org.jbpm.msg.db.DbMessageServiceFactory" />
<service name="scheduler"
factory="org.jbpm.scheduler.db.DbSchedulerServiceFactory" />
<service name="logging" factory="org.jbpm.logging.db.DbLoggingServiceFactory" />
<service name="authentication"
factory="org.jbpm.security.authentication.DefaultAuthenticationServiceFactory" />
</jbpm-context>
</jbpm-configuration>
I've spent several days reading many threads (like this one http://seamframework.org/Community/UnitTestCouldNotFindDatasourceJavaDefa... ttp://seamframework.org/Community/UnitTestCouldNotFindDatasourceJavaDefaultD) and trying many "workarounds" but nothing of that worked.
Thanks in advance for your help.
Kind regards,
GK
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/580295#580295]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
15 years, 3 months
[jBPM] - problem about compile source code of jbpm5
by HUI LIU
HUI LIU [http://community.jboss.org/people/brianlh] created the discussion
"problem about compile source code of jbpm5"
To view the discussion, visit: http://community.jboss.org/message/580288#580288
--------------------------------------------------------------
Hello
I am trying to compile the source code of jbpm5.
I have downloaded krisv-jbpm-5.0-CR1-35-gc7bef4e.zip and apache-maven-2.2.1-bin.zip.
I have extracted the source code and installed maven (including setting configurations of mvn, environment Variables and proxy server ).
I have created a sample project by maven, compiled and packaged and run it, all is fine.
However when I use mvn to package source code of jbpm5, some problems come out.
Firstly, it can't find droolsl-api jar, (however I can find it through my google chrome).
=========
[INFO] skip non existing resourceDirectory G:\krisv-jbpm\jbpm-flow\src\main\resources
Downloading: https://repository.jboss.org/nexus/content/groups/public//org/drools/droo... https://repository.jboss.org/nexus/content/groups/public//org/drools/droo...
[WARNING] Unable to get resource 'org.drools:drools-api:pom:5.2.0-alpha1' from repository jboss-public-repository-group ( https://repository.jboss.org/nexus/content/groups/public/): https://repository.jboss.org/nexus/content/groups/public/): Error transferring file: Connection refused: connect
Downloading: http://people.apache.org/repo/m2-snapshot-repository//org/drools/drools-a... http://people.apache.org/repo/m2-snapshot-repository//org/drools/drools-a...
=========
Secondly, when compiling jbpm5, it can't find mvel2 jar, even after I have downloaded it from internet and installed it into local repository of maven (
<groupId>org.mvel</groupId>
<artifactId>mvel2</artifactId>
<version>2.0.18-RC5</version>
).
=========
(There are lots of compilation errors, the following is just an example)
[ERROR] /krisv-jbpm/jbpm-flow/src/main/java/org/jbpm/workflow/instance/impl/NodeInstanceResolverFactory.java:[23,34] package org.mvel2.integration.impl does not exist
=========
anybody can give some help?
Thanks
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/580288#580288]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
15 years, 3 months
[JBoss Tools] - execution path tools for Java app API analysis
by Arbi Sookazian
Arbi Sookazian [http://community.jboss.org/people/asookazian] created the discussion
"execution path tools for Java app API analysis"
To view the discussion, visit: http://community.jboss.org/message/580162#580162
--------------------------------------------------------------
I am working on a Java EE app running on JBoss 4.x which is heavily layered. It becomes often difficult to conceptualize/visualize execution path to a certain method in a particular class. Does anybody know of or use a tool that will dynamically show the execution path from your IDE (Eclipse, etc.)?
e.g. Class A method foo to Class B method bar to Class C method baz
I currently have my IDE focus set to the class C method baz. I want to see all execution paths (i.e. all interfaces/classes and methods in a diagram) that invoke method baz in Class C and those that invoke the calling method and those that invoke that calling method, ad nauseum.
The concept is somewhat similar to the dependency analysis tool that the m2e plugin offers as a diagram in Eclipse for Maven. aka dependency graph.
I need this tool to work non-realtime (i.e. I should not have to start up the app server and exec test cases, etc.)
Perhaps this is known as static analysis?
thx.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/580162#580162]
Start a new discussion in JBoss Tools at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
15 years, 3 months
[JBoss Web Services] - missing <wsse:Security> tag in WS-Security
by Himaja Thovi
Himaja Thovi [http://community.jboss.org/people/t.himaja] created the discussion
"missing <wsse:Security> tag in WS-Security"
To view the discussion, visit: http://community.jboss.org/message/580223#580223
--------------------------------------------------------------
Hi,
I made ejb module as web service. And i want to encrypt SOAP message based on WS-Security for that web service.
I followed Jboss in Action to configure WS-Security in Jboss server.
At Server side:
Server.java
import javax.jws.WebService;
import javax.ejb.Stateless;
import org.jboss.ws.annotation.EndpointConfig;
@WebService()
@EndpointConfig(configName="Standard WSSecurity Endpoint")
@Stateless()
public class Server {
public String message(){
return "hello";
}
}
I added jboss-wsse-server.xml, wsse.keystore, wsse.truststore in META-INF folder.
jboss-wsse-server.xml
<jboss-ws-security
xmlns="http://www.jboss.com/ws-security/config"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.jboss.com/ws-security/config
http://www.jboss.com/ws-security/schema/jboss-ws-security_1_0.xsd">
<key-store-file>META-INF/wsse.keystore</key-store-file>
<key-store-type>jks</key-store-type>
<key-store-password>wsseServer</key-store-password>
<trust-store-file>META-INF/wsse.truststore</trust-store-file>
<trust-store-type>jks</trust-store-type>
<trust-store-password>wsseServer</trust-store-password>
<config>
<encrypt type="x509v3" alias="wsseClient"/>
<requires>
<encryption />
</requires>
</config>
</jboss-ws-security>
wsse.keystore
Your keystore contains 2 entries
Alias name: wsseserver
Creation date: 5 Jan, 2011
Entry type: PrivateKeyEntry
Certificate chain length: 1
Certificate[1]:
Owner: CN=wsseServer, OU=esm, O=mq, L=hyd, ST=ap, C=in
Issuer: CN=wsseServer, OU=esm, O=mq, L=hyd, ST=ap, C=in
Serial number: 4d23ffdf
Valid from: Wed Jan 05 10:51:35 IST 2011 until: Tue Apr 05 10:51:35 IST 2011
Certificate fingerprints:
MD5: 8D:6A:3E:C2:5C:B4:70:E1:18:E6:FB:97:4A:9B:74:A1
SHA1: FE:7A:8A:EF:29:18:C4:42:75:E4:1E:18:C5:94:92:FE:D3:FC:41:3F
Signature algorithm name: SHA1withRSA
Version: 3
Alias name: wsseclient
Creation date: 5 Jan, 2011
Entry type: trustedCertEntry
Owner: CN=wsseClient, OU=esm, O=mq, L=hyd, ST=ap, C=in
Issuer: CN=wsseClient, OU=esm, O=mq, L=hyd, ST=ap, C=in
Serial number: 4d2403fc
Valid from: Wed Jan 05 11:09:08 IST 2011 until: Tue Apr 05 11:09:08 IST 2011
Certificate fingerprints:
MD5: 82:09:26:68:DC:AE:FC:47:1E:C8:C5:A8:61:5A:EA:87
SHA1: 0C:02:AE:FA:66:64:38:8F:39:6F:B9:C6:F4:E4:12:7F:AF:78:EF:EE
Signature algorithm name: SHA1withRSA
Version: 3
in wsse.truststore
Your keystore contains 1 entry
Alias name: wsseserver
Creation date: 5 Jan, 2011
Entry type: trustedCertEntry
Owner: CN=wsseServer, OU=esm, O=mq, L=hyd, ST=ap, C=in
Issuer: CN=wsseServer, OU=esm, O=mq, L=hyd, ST=ap, C=in
Serial number: 4d23ffdf
Valid from: Wed Jan 05 10:51:35 IST 2011 until: Tue Apr 05 10:51:35 IST 2011
Certificate fingerprints:
MD5: 8D:6A:3E:C2:5C:B4:70:E1:18:E6:FB:97:4A:9B:74:A1
SHA1: FE:7A:8A:EF:29:18:C4:42:75:E4:1E:18:C5:94:92:FE:D3:FC:41:3F
Signature algorithm name: SHA1withRSA
Version: 3
i added jbossws-core.jar
At Client side:
My client is a stand-alone application and i didnot include any jars at this side
public class Main {
public static void main(String[] args) {
try { // Call Web Service Operation
com.ServerService service = new com.ServerService();
com.Server port = service.getServerPort();
java.lang.String result = port.message();
System.out.println("Result = "+result);
} catch (Exception ex) {
ex.printStackTrace();
}
}
}
jboss-wsse-client.xml
<jboss-ws-security
xmlns="http://www.jboss.com/ws-security/config"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.jboss.com/ws-security/config
http://www.jboss.com/ws-security/schema/jboss-ws-security_1_0.xsd">
<key-store-file>
META-INF/wsseClient.keystore</key-store-file>
<key-store-type>jks</key-store-type>
<key-store-password>wsseClient</key-store-password>
<trust-store-file>
META-INF/wsseClient.truststore</trust-store-file>
<trust-store-type>jks</trust-store-type>
<trust-store-password>wsseClient</trust-store-password>
<config>
<encrypt type="x509v3" alias="wsseServer"/>
<requires>
<encryption/>
</requires>
</config>
</jboss-ws-security>
standard-jaxws-client-config.xml(copied this file from jboss server deployers/jbossws.deployer/META-INF/standard-jaxws-client-config.xml
<jaxws-config xmlns="urn:jboss:jaxws-config:2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:javaee="http://java.sun.com/xml/ns/javaee"
xsi:schemaLocation="urn:jboss:jaxws-config:2.0 jaxws-config_2_0.xsd">
<client-config>
<config-name>Standard WSSecurity Client</config-name>
<post-handler-chains>
<javaee:handler-chain>
<javaee:protocol-bindings>##SOAP11_HTTP ##SOAP11_HTTP_MTOM</javaee:protocol-bindings>
<javaee:handler>
<javaee:handler-name>WSSecurityHandlerOutbound</javaee:handler-name>
<javaee:handler-class>org.jboss.ws.extensions.security.jaxws.WSSecurityHandlerClient</javaee:handler-class>
</javaee:handler>
</javaee:handler-chain>
</post-handler-chains>
</client-config>
</jaxws-config>
wsseClient.keystore
Keystore type: JKS
Keystore provider: SUN
Your keystore contains 2 entries
Alias name: wsseserver
Creation date: 5 Jan, 2011
Entry type: trustedCertEntry
Owner: CN=wsseServer, OU=esm, O=mq, L=hyd, ST=ap, C=in
Issuer: CN=wsseServer, OU=esm, O=mq, L=hyd, ST=ap, C=in
Serial number: 4d23ffdf
Valid from: Wed Jan 05 10:51:35 IST 2011 until: Tue Apr 05 10:51:35 IST 2011
Certificate fingerprints:
MD5: 8D:6A:3E:C2:5C:B4:70:E1:18:E6:FB:97:4A:9B:74:A1
SHA1: FE:7A:8A:EF:29:18:C4:42:75:E4:1E:18:C5:94:92:FE:D3:FC:41:3F
Signature algorithm name: SHA1withRSA
Version: 3
Alias name: wsseclient
Creation date: 5 Jan, 2011
Entry type: PrivateKeyEntry
Certificate chain length: 1
Certificate[1]:
Owner: CN=wsseClient, OU=esm, O=mq, L=hyd, ST=ap, C=in
Issuer: CN=wsseClient, OU=esm, O=mq, L=hyd, ST=ap, C=in
Serial number: 4d2403fc
Valid from: Wed Jan 05 11:09:08 IST 2011 until: Tue Apr 05 11:09:08 IST 2011
Certificate fingerprints:
MD5: 82:09:26:68:DC:AE:FC:47:1E:C8:C5:A8:61:5A:EA:87
SHA1: 0C:02:AE:FA:66:64:38:8F:39:6F:B9:C6:F4:E4:12:7F:AF:78:EF:EE
Signature algorithm name: SHA1withRSA
Version: 3
wsseClient.truststore
Keystore type: JKS
Keystore provider: SUN
Your keystore contains 1 entry
Alias name: wsseclient
Creation date: 5 Jan, 2011
Entry type: trustedCertEntry
Owner: CN=wsseClient, OU=esm, O=mq, L=hyd, ST=ap, C=in
Issuer: CN=wsseClient, OU=esm, O=mq, L=hyd, ST=ap, C=in
Serial number: 4d2403fc
Valid from: Wed Jan 05 11:09:08 IST 2011 until: Tue Apr 05 11:09:08 IST 2011
Certificate fingerprints:
MD5: 82:09:26:68:DC:AE:FC:47:1E:C8:C5:A8:61:5A:EA:87
SHA1: 0C:02:AE:FA:66:64:38:8F:39:6F:B9:C6:F4:E4:12:7F:AF:78:EF:EE
Signature algorithm name: SHA1withRSA
Version: 3
i included all these configuration files in META-INF folder.
but i am getting error as
at client-side
javax.xml.ws.soap.SOAPFaultException: This service requires <wsse:Security>, which is missing.
at com.sun.xml.internal.ws.fault.SOAP11Fault.getProtocolException(SOAP11Fault.java:178)
at com.sun.xml.internal.ws.fault.SOAPFaultBuilder.createException(SOAPFaultBuilder.java:111)
at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:108)
at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:78)
at server-side
Exception during handler processing
org.jboss.ws.core.CommonSOAPFaultException: This service requires <wsse:Security>, which is missing.
at org.jboss.ws.extensions.security.WSSecurityDispatcher.convertToFault(WSSecurityDispatcher.java:264)
at org.jboss.ws.extensions.security.WSSecurityDispatcher.decodeMessage(WSSecurityDispatcher.java:94)
at org.jboss.ws.extensions.security.jaxws.WSSecurityHandler.handleInboundSecurity(WSSecurityHandler.java:81)
when i checked server.log, either incoming soap message or outgoing soap message not encrypted.
please help me in solving out this issue.
I need to solve it as soon as possible.
Thanks in advance.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/580223#580223]
Start a new discussion in JBoss Web Services at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
15 years, 3 months
[JBoss Web Services] - Invalid byte 1 of 1-byte UTF-8 sequence
by Scale It
Scale It [http://community.jboss.org/people/meselfe] created the discussion
"Invalid byte 1 of 1-byte UTF-8 sequence"
To view the discussion, visit: http://community.jboss.org/message/580207#580207
--------------------------------------------------------------
I get an error "Invalid byte 1 of 1-byte UTF-8 sequence." when I deploy a pojo with jaxws webservice annotations on jbossws native.
org.apache.xerces.xni.XNIException: Parser should stop: [domain:http://www.w3.org/TR/1998/REC-xml-19980210]::[key=InvalidByte]::Me... byte 1 of 1-byte UTF-8 sequence.
at org.jboss.ws.metadata.wsdl.xmlschema.JBossXSErrorHandler.fatalError(JBossXSErrorHandler.java:78)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.impl.xs.opti.SchemaParsingConfig.parse(Unknown Source)
at org.apache.xerces.impl.xs.opti.SchemaParsingConfig.parse(Unknown Source)
at org.apache.xerces.impl.xs.opti.SchemaDOMParser.parse(Unknown Source)
at org.apache.xerces.impl.xs.traversers.XSDHandler.getSchemaDocument(Unknown Source)
at org.apache.xerces.impl.xs.traversers.XSDHandler.resolveSchema(Unknown Source)
at org.apache.xerces.impl.xs.traversers.XSDHandler.constructTrees(Unknown Source)
at org.apache.xerces.impl.xs.traversers.XSDHandler.parseSchema(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaLoader.loadSchema(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaLoader.loadGrammar(Unknown Source)
at org.jboss.ws.tools.JavaToXSD.parseSchema(JavaToXSD.java:183)
at org.jboss.ws.tools.wsdl.WSDL11Reader.processTypes(WSDL11Reader.java:394)
at org.jboss.ws.tools.wsdl.WSDL11Reader.processTypes(WSDL11Reader.java:409)
at org.jboss.ws.tools.wsdl.WSDL11Reader.processDefinition(WSDL11Reader.java:175)
at org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory.parse(WSDLDefinitionsFactory.java:128)
at org.jboss.ws.metadata.umdm.ServiceMetaData.getWsdlDefinitions(ServiceMetaData.java:295)
at org.jboss.ws.metadata.builder.jaxws.JAXWSWebServiceMetaDataBuilder.buildWebServiceMetaData(JAXWSWebServiceMetaDataBuilder.java:166)
at org.jboss.ws.metadata.builder.jaxws.JAXWSServerMetaDataBuilder.setupProviderOrWebService(JAXWSServerMetaDataBuilder.java:50)
at org.jboss.ws.metadata.builder.jaxws.JAXWSMetaDataBuilderJSE.buildMetaData(JAXWSMetaDataBuilderJSE.java:63)
The java methods exposed as @webmethods take objects as input that have been generated from XSD using JAXB "xjc". The original XSDs are encoded in utf-8 and use international characters. My guess is that while generating the WSDL jboss somehow rebuilds the original XSD types and tries to insert them in a piece of XML thats not utf-8? Maybe the WSDL itself? I noticed the WSDL that jbossws generates has no XML declaration <?xml version="" encoding=""...>! Is there some way to let jboss know it should use utf-8 all the way through?
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/580207#580207]
Start a new discussion in JBoss Web Services at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
15 years, 3 months