[Installation, Configuration & Deployment] - Re: JBoss to use UTF-8
by jimisola
"kavithak" wrote : Hi,
|
| Can anybody know how to configure the jboss application server use the utf-8 character encoding instead of the default one.
Hi,
I'm a newbie and I haven't verified this yet. But, I know that it works for a regular web application (war) and also that liferay uses it in its DataSource file:
| <datasources>
| <local-tx-datasource>
| <jndi-name>DefaultDS</jndi-name>
| <connection-url>jdbc:mysql://localhost:3306/jbossdb?useUnicode=true&characterEnc
| oding=UTF-8</connection-url>
| <driver-class>com.mysql.jdbc.Driver</driver-class>
| <user-name>user</user-name>
| <password>password</password>
| <min-pool-size>5</min-pool-size>
| <max-pool-size>20</max-pool-size>
|
| <metadata>
| <type-mapping>mySQL</type-mapping>
| </metadata>
| </local-tx-datasource>
| </datasources>
Please let me know if it works.
Regards,
Jimisola
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4052955#4052955
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4052955
18Â years, 11Â months
[JBoss jBPM] - Re: loading resource from process class
by gogoasa
I fixed the class ProcessClassLoader in order to correctly load resources.
Either it is a bug it has always been there and nobody ever loaded a resource in a .par, or I don't get resource location inside par archives at all...
### Eclipse Workspace Patch 1.0
#P jbpm.3_HEAD
Index: jpdl/jar/src/main/java/org/jbpm/instantiation/ProcessClassLoader.java
===================================================================
RCS file: /cvsroot/jbpm/jbpm.3/jpdl/jar/src/main/java/org/jbpm/instantiation/ProcessClassLoader.java,v
retrieving revision 1.1
diff -u -r1.1 ProcessClassLoader.java
--- jpdl/jar/src/main/java/org/jbpm/instantiation/ProcessClassLoader.java 28 Apr 2006 15:09:22 -0000 1.1
+++ jpdl/jar/src/main/java/org/jbpm/instantiation/ProcessClassLoader.java 10 Jun 2007 20:02:19 -0000
@@ -28,7 +28,8 @@
import org.jbpm.graph.def.*;
public class ProcessClassLoader extends ClassLoader {
-
+ final static protected String CLASSES_SUBDIR = "classes/";
+
private ProcessDefinition processDefinition = null;
public ProcessClassLoader( ClassLoader parent, ProcessDefinition processDefinition ) {
@@ -37,10 +38,11 @@
}
public InputStream getResourceAsStream(String name) {
+ String filename = CLASSES_SUBDIR + name;
InputStream inputStream = null;
FileDefinition fileDefinition = processDefinition.getFileDefinition();
if (fileDefinition!=null) {
- byte[] bytes = fileDefinition.getBytes(name);
+ byte[] bytes = fileDefinition.getBytes(filename);
if (bytes!=null) {
inputStream = new ByteArrayInputStream(bytes);
}
@@ -53,7 +55,7 @@
FileDefinition fileDefinition = processDefinition.getFileDefinition();
if (fileDefinition!=null) {
- String fileName = "classes/" + name.replace( '.', '/' ) + ".class";
+ String fileName = CLASSES_SUBDIR + name.replace( '.', '/' ) + ".class";
byte[] classBytes;
try {
classBytes = fileDefinition.getBytes(fileName);
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4052948#4052948
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4052948
18Â years, 11Â months
[JBoss jBPM] - Re: loading resource from process class
by gogoasa
I have just tried to include the .properties file inside the .par again, same result :
| org.jbpm.JbpmException: couldn't get value for file 'jndi-services.properties'
| at org.jbpm.file.def.FileDefinition.getBytes(FileDefinition.java:196)
| at org.jbpm.instantiation.ProcessClassLoader.getResourceAsStream(ProcessClassLoader.java:43)
| at fr.bnf.entrychain.jbpm.actions.ServiceClusterJndiProperties.<init>(ServiceClusterJndiProperties.java:31)
| at fr.bnf.entrychain.jbpm.actions.OnStartAction.execute(OnStartAction.java:24)
| at org.jbpm.graph.def.Action.execute(Action.java:122)
|
| ...
|
| Caused by: java.lang.NullPointerException
| at org.jbpm.file.def.FileDefinition.getBytesFromDb(FileDefinition.java:213)
| at org.jbpm.file.def.FileDefinition.getBytes(FileDefinition.java:193)
| ... 74 more
|
Has anyone succeeded in doing this ? To me, as BPM typically orchestrates distant clusters, it looks like a very common thing to do.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4052945#4052945
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4052945
18Â years, 11Â months