Jack Lau

Ranch Hand
+ Follow
since Aug 30, 2002
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Jack Lau

Can I use the code "f.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, true);" instead of "transFact.setFeature(XMLConstants.ACCESS_EXTERNAL_DTD, false);"? Is it the same purpose to prevent accessing external XML ?


TransformerFactory f = TransformerFactory.newInstance();
f.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, true);
Transformer t = f.newTransformer();
t.transform(xmlSource, result);


Thanks,
Jack
8 years ago
Hi all,

The following code cannot be compiled in JDK 1.6 but can be compiled in JDK 1.7, do anyone know any other solution with the same function as the code provided which can be compiled in JDK 1.6 ?



Error message:
Caused by: javax.xml.transform.TransformerConfigurationException: [ERR 0337] Cannot set the feature 'http://javax.xml.XMLConstants/property/accessExternalDTD' on this TransformerFactory.
at com.ibm.xtq.xslt.jaxp.AbstractTransformerFactory.setFeature(Unknown Source)
at com.pru.hk.pruone.service.DefaultEAIMQService.doGetXMLDocument(DefaultEAIMQService.java:107)

at com.pru.hk.pruone.service.DefaultEAIMQService.getXMLDocument(DefaultEAIMQService.java:76)

Thanks,
Jack
8 years ago
Hi all,

I am setup a JBoss EAP 6 cluster. I just submit the form and click some hyperlink, it works properly. However, after I repeat the action with 4-5 times, it throws the following exception and the web page cannot be access. Does anyone know how to solve it ? Thanks in advance!

19:18:50,325 ERROR [org.apache.catalina.connector.CoyoteAdapter] An exception or error occurred in the container during the request processing: java.lang.RuntimeException: JBAS018060: Exception acquiring ownership of msgLtmIv7E0gg3zFihkNZqXo
at org.jboss.as.web.session.ClusteredSession.acquireSessionOwnership(ClusteredSession.java:528) [jboss-as-web-7.1.2.Final-redhat-1.jar:7.1.2.Final-redhat-1]
at org.jboss.as.web.session.ClusteredSession.access(ClusteredSession.java:496) [jboss-as-web-7.1.2.Final-redhat-1.jar:7.1.2.Final-redhat-1]
at org.apache.catalina.connector.Request.doGetSession(Request.java:2625) [jbossweb-7.0.16.Final-redhat-1.jar:]
at org.apache.catalina.connector.Request.getSession(Request.java:2375) [jbossweb-7.0.16.Final-redhat-1.jar:]
at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:81) [jboss-as-web-7.1.2.Final-redhat-1.jar:7.1.2.Final-redhat-1]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.16.Final-redhat-1.jar:]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.16.Final-redhat-1.jar:]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.16.Final-redhat-1.jar:]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368) [jbossweb-7.0.16.Final-redhat-1.jar:]
at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:505) [jbossweb-7.0.16.Final-redhat-1.jar:]
at org.apache.coyote.ajp.AjpProtocol$AjpConnectionHandler.process(AjpProtocol.java:452) [jbossweb-7.0.16.Final-redhat-1.jar:]
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:931) [jbossweb-7.0.16.Final-redhat-1.jar:]
at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_35]
Caused by: org.jboss.as.clustering.lock.TimeoutException: JBAS010213: Cannot acquire lock default-host/eu-feedin/msgLtmIv7E0gg3zFihkNZqXo from cluster
at org.jboss.as.clustering.lock.SharedLocalYieldingClusterLockManager.lock(SharedLocalYieldingClusterLockManager.java:439)
at org.jboss.as.clustering.web.infinispan.DistributedCacheManager.acquireSessionOwnership(DistributedCacheManager.java:372)
at org.jboss.as.web.session.ClusteredSession.acquireSessionOwnership(ClusteredSession.java:520) [jboss-as-web-7.1.2.Final-redhat-1.jar:7.1.2.Final-redhat-1]
... 12 more

Thanks,
Jack
11 years ago
Hi all,

I am using JBoss EAP 6 with clustering (in 2 app servers) and Apache 2.0 (in web server).
I have set the mod_jk to JBoss in worker.properties.
In war file, the web.xml include <distributable/> tag.
After I deployed the war file to JBoss, I access the web page via web server, it seems lost the session.
If I remove the <distributable/> tag from web.xml and access the web page via both application server, it is ok.
After that I also added a jboss-web.xml , but the problem still happen.

I am using Struts 2.0, Apache dbcp.

Does anyone know what configuration file should I change ?

In addition, both console always throws the following exceptions:


Thanks,
Jack
11 years ago
Hi all,

I am using struts2 with JBoss Clustering.

In web.xml, I added tag "<distributable/>".

After I deployed the war file to JBoss with JBoss manager, when I login, return to login page again.

I am using redirectAction "<result name="success" type="redirectAction">menu</result>"

Is redirectAction support clustering ?

Thanks,
Jack
11 years ago
Hello,

Do not know why struts show the following error message occasionally. Please help, thank in advance!!

Error message
------------------
javax.servlet.ServletException: No getter method available for property schoolLevelIdList for bean under name null

struts-config.xml
-------------------
<action path="/jsp/Import"
type="websams.web.ExportAction"
name="exportForm"
scope="request">
<forward name="ok" path="/jsp/export.jsp"/>
</action>

<form-bean name="exportForm"
type="websams.web.ExportForm"/>


ExportForm.java
---------------
public ExportForm {
private ArrayList schoolLevelIdList = new ArrayList();

public ArrayList getSchoolLevelIdList() {
return schoolLevelIdList;
}

public void setSchoolLevelIdList(ArrayList schoolLevelIdList) {
this.schoolLevelIdList = schoolLevelIdList;
}

public void setSchoolLevelIdList(String schoolLevelId)
{
schoolLevelIdList.add(schoolLevelId);
}

public String getSchoolLevelIdList(int aIndex)
{
while (this.schoolLevelIdList.size() <= aIndex)
{
this.schoolLevelIdList.add("");
}
return (String) schoolLevelIdList.get(aIndex);
}

}


export.jsp
----------
<jsp:useBean id="exportForm" class="websams.web.ExportForm" scope="request" />

schYear : <%=exportForm.getSchYear()%>

<html:select property="schLevel" onchange="changeSchoolLevel()">
<html:options labelProperty="schoolLevelEnDescList" property="schoolLevelIdList"/>
</html:select>

-----------

Thanks,
Jack
12 years ago
Hello,

There is a Use case (e.g. student application) and now a deadline is added for this use case. How can I represent the deadline in the use case diagram ? Should I use extend, to extend the use case - student application ?

Thanks,
Jack
I tried to add the "JKMountCopy On" under "VirtualHost", it is ok now!


<VirtualHost localhost:443>
JkMountCopy On
#.....
</VirtualHost>



Thanks,
Jack
13 years ago
Hello,

I configured apache2.2.14 + JBoss2.4.8 + OpenSSL0.9.8k, if using http://localhost/
to access the apache server, it will forward to index.jsp which in JBoss.
However, when I type https://localhost:443 (HTTPS), it shows "The page cannot be found".

I checked that in jk.log, there is a error message as below:
mod_jk.c (3404): missing uri map for localhost:/jsp/index.jsp

Could anyone know how to resolve this problem? (I don't know why I use http://localhost can work but not https://localhost:443)

Thanks,
Jack
13 years ago
Hello,

I configured apache2.2.14 + JBoss2.4.8 + OpenSSL0.9.8k, if using http://localhost/
to access the apache server, it will forward to index.jsp which in JBoss.
However, when I type https://localhost:443 (HTTPS), it shows "The page cannot be found".

I disabled the mod_jk.so and just using index.html with some html tags in apache server,
then I type https://localhost:443 (HTTPS), it works!
I don't know what is going wrong...

Could anyone tell me how can I narrow down the problem ?

Thanks,
Jack
13 years ago
I have checked that JBoss 5.1.0 contains Servlet-api.jar and JSP-api.jar which support struts 2. Base on the website http://struts.apache.org/2.1.8.1/ mentioned

Apache Struts 2 requires:

* Servlet API 2.4
* JSP API 2.0
* Java 5

I think JBoss 5.1.0 can support struts 2.

Am I right ?
13 years ago
Hello,

Does anyone know JBoss 5.1.0 can support struts up to which version (the latest and the oldest)?

Thanks,
Jack
13 years ago
Hi,

How do I know which ejb version does jboss is using ? (e.g. JBoss 2.4.8)

Thanks,
Jack
13 years ago
Hello,

Is EJB 3.0 support EJB 1.0 ?

Thanks,
Jack
Hi,

Could anyone tell me is JDK6.0 can support all the java code worked in JDK1.3 ?

Thanks,
Jack
13 years ago