Win a copy of OCP Java SE 8 Programmer II Exam Study Guide this week in the OCP forum!

Laurency Heo

Greenhorn
+ Follow
since May 21, 2003
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 Laurency Heo

take easy and forgot it at all.
score can only come out 3 weeks later.just turn back to your work, valuable experience is in work.
i got 390K, and a good score for me.
overide method are distingushied on the method name and parameter signature.
a new method need define as
int print(int a,int b, int c)
---------------------------
class Overload001{
int print(int a,int b, int c){
return (int)(a+b+c);
}
hi,
i deploeyed a test .ear (Servlet->CMP EJB1.0->Mysql DB), method transaction is Required.
What do in the servlet:
home.findByPrimaryKey(theName);
// Found sucessfully!

home.create("Wang Wang", "Laurency");
//no external transaction here.
//RollbackException thown.
Please help a ideal, thanks a lot.
------------------------------------
Caused by: java.rmi.RemoteException: Transaction aborted (possibly due to transaction time out).; nested exception is: javax.transaction.RollbackException: Transaction marked for rollback; nested exce
ption is:
javax.transaction.RollbackException: Transaction marked for rollback
at com.sun.enterprise.iiop.POAProtocolMgr.mapException(POAProtocolMgr.java:389)
at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:431)
at PetBean_PM_RemoteHomeImpl.create(PetBean_PM_RemoteHomeImpl.java:32)
at _PetHome_Stub.create(Unknown Source)
... 37 more
Caused by: javax.transaction.RollbackException: Transaction marked for rollback
at com.sun.enterprise.distributedtx.J2EETransaction.commit(J2EETransaction.java:161)
at com.sun.enterprise.distributedtx.J2EETransactionManagerOpt.commit(J2EETransactionManagerOpt.java:243)
at com.sun.ejb.containers.BaseContainer.completeNewTx(BaseContainer.java:1485)
at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:1303)
at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:403)
DONE!
made change on javasoft\jsdkee\lib\security\server.policy
// additional permissions for servlets
grant codeBase "file:${com.sun.enterprise.home}/public_html/ipower/WEB-INF/lib/commons-beanutils.jar" {
// +++++Required for getting BeanInfo
//permission java.lang.RuntimePermission "accessDelaredMembers.*";
permission java.security.AllPermission;
};
[ May 23, 2003: Message edited by: Laurency Heo ]
15 years ago
access previlage check in file,
org.apache.commons.beanutils.MappedPropertyDescriptor.java,
how to work around the java.lang.RuntimePermission accessDelaredMembers
??
/*
* Internal method to return *public* methods within a class.
*/
private static synchronized Method[] getPublicDeclaredMethods(Class clz) {
// Looking up Class.getDeclaredMethods is relatively expensive,
// so we cache the results.
final Class fclz = clz;
Method[] result = (Method[]) declaredMethodCache.get(fclz);
if (result != null) {
return result;
}
// We have to raise privilege for getDeclaredMethods
result = (Method[])
AccessController.doPrivileged(new PrivilegedAction() {
public Object run() {
return fclz.getDeclaredMethods();
}
});
.....

ref to http://www.coderanch.com/t/46525/Struts/help-security-warning-Struts-configuration
15 years ago
access previlage check in file,
org.apache.commons.beanutils.MappedPropertyDescriptor.java,
how to work around the java.lang.RuntimePermission accessDelaredMembers
??
/*
* Internal method to return *public* methods within a class.
*/
private static synchronized Method[] getPublicDeclaredMethods(Class clz) {
// Looking up Class.getDeclaredMethods is relatively expensive,
// so we cache the results.
final Class fclz = clz;
Method[] result = (Method[]) declaredMethodCache.get(fclz);
if (result != null) {
return result;
}
// We have to raise privilege for getDeclaredMethods
result = (Method[])
AccessController.doPrivileged(new PrivilegedAction() {
public Object run() {
return fclz.getDeclaredMethods();
}
});
.....
15 years ago
Not allowed bean reflection under Sun JSDKEE!.3?
-------------------------
[WARN] RequestProcessor - -Unhandled Exception thrown: class javax.servlet.ServletException
[ERROR] Example - -RegistrationForm.populate <java.security.AccessControlException: access denied (java.lang.RuntimePerm
ission accessDeclaredMembers)>java.security.AccessControlException: access denied (java.lang.RuntimePermission accessDec
laredMembers)
at java.security.AccessControlContext.checkPermission(AccessControlContext.java:267)
at java.security.AccessController.checkPermission(AccessController.java:394)
15 years ago
I configure Struts 1.1 on J2SDKEE 1.3.1
when staring, it give a security warning message, else are ok!
[INFO] PropertyMessageResources - -Initializing, config='org.apache.struts.action.ActionResources', returnNull=true
[WARN] MethodUtils - -Cannot use JVM pre-1.4 access bug workaround die to restrictive security manager.
Another solved problems:
For the origianl WEB-INF/validation.xml,validator-rules.xml, i removed the dtd declaration,
because server says 'can not found the entity' on startup.
15 years ago
wong,contratuation.
i am wating my score.
i submitted assignment on May 5,
and went for PIII on May 8.
Last fri, i login to wwww.2test.com , found my that exam(where i scheduled for test site) was failed.
However, there were still no score result by https://www.certmanager.net/.
Are they related with each others?
It will be big pity as faliure already shown by 2test.
have you idea about this?
what is ur status on www.2test.com for PIII?
maybe i need preparing earlier for project refinement.
thanks a lot
15 years ago