Skip to Main Content

Chinese

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

[求助] 麻烦看看这个异常是什么原因造成的〔域的用户名/密码加密无效导致 JSAFE_PaddingException,从而不允许服务器启动〕?

702619Feb 11 2006 — edited Feb 22 2006
在应用完全重新部署时,报如下错误。
导致在portal admin中无法使用现有的portal文件建立新的门户。
<2006-2-11 上午10时55分14秒 CST> <Error> <WSRP-Consumer> <BEA-420731> <Exception
[weblogic.security.internal.encryption.EncryptionServiceException - with nested
exception:
[com.rsa.jsafe.JSAFE_PaddingException: Could not perform unpadding: invalid pad
byte.]] thrown while trying to do task [handleTimerNotification] in class [com.b
ea.wsrp.consumer.management.portlet.ProxyPortletRemoveListener].
com.rsa.jsafe.JSAFE_PaddingException: Could not perform unpadding: invalid pad b
yte.
at com.rsa.jsafe.JA_PKCS5Padding.a([BIILjava/lang/Object;)I(Unknown Sour
ce)
at com.rsa.jsafe.JG_BlockCipher.decryptFinal([BI)I(Unknown Source)
at weblogic.security.internal.encryption.JSafeEncryptionServiceImpl.decr
yptBytes([B)[B(JSafeEncryptionServiceImpl.java:67)
at weblogic.security.internal.encryption.JSafeEncryptionServiceImpl.decr
yptString([B)Ljava/lang/String;(JSafeEncryptionServiceImpl.java:93)
at weblogic.security.internal.encryption.ClearOrEncryptedService.decrypt
(Ljava/lang/String;)Ljava/lang/String;(ClearOrEncryptedService.java:56)
at weblogic.management.EncryptionHelper.decryptString([BLweblogic/securi
ty/acl/internal/AuthenticatedSubject;)Ljava/lang/String;(EncryptionHelper.java:4
5)
at com.bea.wsrp.consumer.management.portlet.ProxyPortletRemoveListener$P
roxyPortletRemover.getAdminPassword()Ljava/lang/String;(ProxyPortletRemoveListen
er.java:484)
at com.bea.wsrp.consumer.management.portlet.ProxyPortletRemoveListener$P
roxyPortletRemover.run()Ljava/lang/Object;(ProxyPortletRemoveListener.java:266)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Lweblogic/se
curity/subject/AbstractSubject;Ljava/security/PrivilegedExceptionAction;)Ljava/l
ang/Object;(AuthenticatedSubject.java:363)
at weblogic.security.service.SecurityManager.runAs(Lweblogic/security/ac
l/internal/AuthenticatedSubject;Lweblogic/security/acl/internal/AuthenticatedSub
ject;Ljava/security/PrivilegedExceptionAction;)Ljava/lang/Object;(SecurityManage
r.java:147)
at com.bea.wsrp.consumer.management.portlet.ProxyPortletRemoveListener.h
andleNotification(Ljavax/management/Notification;Ljava/lang/Object;)V(ProxyPortl
etRemoveListener.java:216)
at javax.management.NotificationBroadcasterSupport$Triple.fire(Ljavax/ma
nagement/Notification;)V(NotificationBroadcasterSupport.java:40)
at javax.management.NotificationBroadcasterSupport.sendNotification(Ljav
ax/management/Notification;)V(NotificationBroadcasterSupport.java:121)
at javax.management.timer.Timer.sendNotification(Ljava/util/Date;Ljavax/
management/timer/TimerNotification;)V(Timer.java:1119)
at javax.management.timer.Timer.notifyAlarmClock(Ljavax/management/timer
/TimerAlarmClockNotification;)V(Timer.java:1089)
at javax.management.timer.TimerAlarmClock.run()V(Timer.java:1165)
at java.lang.Thread.startThreadFromVM(Ljava/lang/Thread;)V(Unknown Sourc
e)
--------------- nested within: ------------------
weblogic.security.internal.encryption.EncryptionServiceException - with nested e
xception:
[com.rsa.jsafe.JSAFE_PaddingException: Could not perform unpadding: invalid pad
byte.]
at weblogic.security.internal.encryption.JSafeEncryptionServiceImpl.decr
yptBytes([B)[B(JSafeEncryptionServiceImpl.java:77)
at weblogic.security.internal.encryption.JSafeEncryptionServiceImpl.decr
yptString([B)Ljava/lang/String;(JSafeEncryptionServiceImpl.java:93)
at weblogic.security.internal.encryption.ClearOrEncryptedService.decrypt
(Ljava/lang/String;)Ljava/lang/String;(ClearOrEncryptedService.java:56)
at weblogic.management.EncryptionHelper.decryptString([BLweblogic/securi
ty/acl/internal/AuthenticatedSubject;)Ljava/lang/String;(EncryptionHelper.java:4
5)
at com.bea.wsrp.consumer.management.portlet.ProxyPortletRemoveListener$P
roxyPortletRemover.getAdminPassword()Ljava/lang/String;(ProxyPortletRemoveListen
er.java:484)
at com.bea.wsrp.consumer.management.portlet.ProxyPortletRemoveListener$P
roxyPortletRemover.run()Ljava/lang/Object;(ProxyPortletRemoveListener.java:266)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Lweblogic/se
curity/subject/AbstractSubject;Ljava/security/PrivilegedExceptionAction;)Ljava/l
ang/Object;(AuthenticatedSubject.java:363)
at weblogic.security.service.SecurityManager.runAs(Lweblogic/security/ac
l/internal/AuthenticatedSubject;Lweblogic/security/acl/internal/AuthenticatedSub
ject;Ljava/security/PrivilegedExceptionAction;)Ljava/lang/Object;(SecurityManage
r.java:147)
at com.bea.wsrp.consumer.management.portlet.ProxyPortletRemoveListener.h
andleNotification(Ljavax/management/Notification;Ljava/lang/Object;)V(ProxyPortl
etRemoveListener.java:216)
at javax.management.NotificationBroadcasterSupport$Triple.fire(Ljavax/ma
nagement/Notification;)V(NotificationBroadcasterSupport.java:40)
at javax.management.NotificationBroadcasterSupport.sendNotification(Ljav
ax/management/Notification;)V(NotificationBroadcasterSupport.java:121)
at javax.management.timer.Timer.sendNotification(Ljava/util/Date;Ljavax/
management/timer/TimerNotification;)V(Timer.java:1119)
at javax.management.timer.Timer.notifyAlarmClock(Ljavax/management/timer
/TimerAlarmClockNotification;)V(Timer.java:1089)
at javax.management.timer.TimerAlarmClock.run()V(Timer.java:1165)
at java.lang.Thread.startThreadFromVM(Ljava/lang/Thread;)V(Unknown Sourc
e)
>


该帖由 weiyun_pang 在 Feb 22, 2006 3:41 PM 编辑过

Comments

Timo Hahn
Only root applications modules use their own transaction. If you use a nested application module the commit covers all changes done in all application modules nested under the root application module which is hte parent of your nested application module. As your log shows that you use a nested application module the commit works as expected.

Now the question is how did you create the datacontrols and how are the application modules used for the data controls related to each other?

Timo
user10867691
Hi Timo.

I don't want my application modules to be nested.

I created AppModule the first.

When creating the AppModuleWS I simply created it as I did with the first one. In fact, in the Data Control Pane they appear one following the other, but in the same level. They don't appear to be nested at all.

I annexed you the xml of the second AppModule (the first is very long because has all application VO) in order you to understand my explanation.
user10867691
Here it is the XML of the second ApplModule:

<?xml version="1.0" encoding="windows-1252" ?>
<!DOCTYPE AppModule SYSTEM "jbo_03_01.dtd">
<!---->
<AppModule
xmlns="http://xmlns.oracle.com/bc4j"
Name="AppModuleWS"
Version="11.1.1.59.23"
ComponentClass="edu.esade.model.AppModuleWSImpl"
DefClass="edu.esade.model.AppModuleWSDefImpl"
ClearCacheOnRollback="true">
<DesignTime>
<Attr Name="_deployType" Value="0"/>
<Attr Name="_isDefCodegen" Value="true"/>
<Attr Name="_isCodegen" Value="true"/>
</DesignTime>
<Properties>
<SchemaBasedProperties>
<LABEL
ResId="edu.esade.model.AppModuleWS_LABEL"/>
</SchemaBasedProperties>
</Properties>
<ViewUsage
Name="EstadoObjetoWflTablaView1"
ViewObjectName="edu.esade.model.VO.EstadoObjetoWflTablaView"/>
<ViewUsage
Name="SvComunicacionesSaView1"
ViewObjectName="edu.esade.model.VO.SvComunicacionesSaView"/>
<ResourceBundle>
<PropertiesBundle
PropertiesFile="edu.esade.model.ModelBundle"/>
</ResourceBundle>
</AppModule>


Is it nested ? I don't think so....
user10867691
Any idea Timo ?
Timo Hahn
Sorry, I'm traveling and don't have access at some time.

Do you use both data controls on one page?


Timo
User_HWHT9
Is this work being performed in a bounded task flow? If yes what transaction options and data control scope options are you using in the BTFs?

CM.
user10867691
Yes, I use both data controls in one page.

In the pageDef (bindings) of the JSF I have defined bindings from the two AppModules.

All fields displayed in the page are mapped to bindings of AppModuleDataControl.

The bindings of the AppModuleWSDataControl are only used in a method of a backing bean.

My idea was to be able to manage an independent transaction in the backing bean without affecting the pages transaction that is working on AppModuleDataControl.

As an alternative (I wouldn't prefer it) I could do a PLSQL Database call executing an autonomous transaction, but this is not my preferred option. (Among other things because I have already developed all this in an ADF backing bean.... :-)
user10867691
Chris,

As I have told to Timo, all this is executed in a page and its backingbean. Everything is defined inside of a bounded task flow with "Always begin new transaction" and "Share data controls" deactivated.

I don't think this could affect the behaviour inside the task flow as I think all updates and changes are executed inside the environment of the same task flow, doesn't I.
User_HWHT9
Under 11gR1 the task flow options cause an automagical nesting of AMs (See: http://one-size-doesnt-fit-all.blogspot.com.au/2011/05/jdev-11g-task-flows-adf-bc-one-root.html) potentially explaining the behaviour you're are using. Try using <No Controller Transaction> instead which turns the task flow transaction options off.

This automagical nesting behavior is an implementation detail of the framework and one that changes in 11gR2 and (the future) 12c releases.

CM.
User_HWHT9
I'm just doing some testing of my own, get back to you soon.

CM.
User_HWHT9
So I've been able to get this to work. Basically my page is in a task flow with <No Controller Transaction> set. However there's a messy thing you need to get right (and I'll raise a bug on once we get this working).

You're aware that each of your root AMs have separate JNDIs pointing to your different data source? Let's say JNDI#1 and JNDI#2. (as a sanity check, just ensure they are different).

You're also aware that in your Model project properties -> ADF Business Components options you have the Connection drop box. Make sure that the Connection drop box points to your first JNDI#1, not JNDI#2.

Let me know how you go.

CM.
user10867691
1.Defining all BTF as "No controller transaction" I can assume both AppModule will always work with different transactions and one transaction in one AppModule will persist trough pages and BTF until I execute a commit via java or via BTF Task Flow Return ?

2.What impact can have this in reusing BTF ? I have a jsf page reusing the same task flow in two regions. The taskflow performs some initialization. Will the regions undesirably interact one with the other ? That is one of the reasons I had to activate the "Always begin new transaction" property with "Share data" deactivated. I need pointers to current records in VO be different, some default createInsert records be different, etc.

Depending on a button I dynamically terminate and initiate the task flow.
User_HWHT9
Answer
"1.Defining all BTF as "No controller transaction" I can assume both AppModule will always work with different transactions "

As long as they're defined as separate root AMs and you've used the <No Controller Transaction> option they will work with different db connections, therefore different transactions too.

"and one transaction in one AppModule will persist trough pages"

Within scope of one BTF yes. In scope of chained BTFs that's dependent on the BTF data control scope option. If you set that to isolated, each instance of a BTF will spawn a new instance of the AM in question (and new connections/transactions with the database). If you use shared, 1 instance of the AM will be shared (1 connection/transaction).

"2.What impact can have this in reusing BTF ? I have a jsf page reusing the same task flow in two regions. The taskflow performs some initialization. Will the regions undesirably interact one with the other ?"

That depends on the data control scope option as specified above. If you want them to be independent, use the isolated data control scope options on the BTF.

Consider reading the ADF Task Flow Transaction Fundamentals paper on this website for more information: http://www.oracle.com/technetwork/developer-tools/adf/learnmore/adfarchitect-1639592.html

CM.
Marked as Answer by user10867691 · Sep 27 2020
User_HWHT9
Actually, what you didn't confirm for me, did it work, and you discover the project property connection issue?

CM.
user10867691
Chris,

It has worked !

I have only changed the "Always begin new transaction" to "No controller Transaction" and it has worked.

I have activated the logs (as I did before) but now after executing

AppModuleWSImpl am=(AppModuleWSImpl)Util.getApplicationModule("AppModuleWSDataControl");

I no longer get the

<ADFLogger> <begin> Create nested Application Module

Now ADF creates a new transaction.

Thank you very much.

What about my previous question ? :-)

How do I manage reusing of BTF without managing transactions in the BTF ?
User_HWHT9
Great, thanks for letting me know.

So on that Model project ADF BC connection option, I've detected a minor bug where when you change that setting, in your relating bc4j.xcfg file it's overriding all the datasource JNDIs with the one you selected, yet if you look at the AM configuration JNDIs via the declarative editor, they're correctly the old separate JNDIs. I'll log a bug on this, but simple thing is to edit the bc4j.xcfg file to get the correct settings.

CM.
User_HWHT9
On your last question I'm not sure I follow. The BTFs are still reusable. What's your concern on the transactions, can you be more specific.

CM.
user10867691
Chris,

Forget the last part of my last comment. It has overlapped with your previous comment. Now it's clear.

Fortunately I have not had to change anything in both AppModules. Both are definied on the same Datasource and it seems to work ok. No problem.

I don't really understand very well the bug that you tell me.


In my case, I need both AppModule connections be definied exactly the same way: The same username, etc.

If you are interested, you can give me a step by step procedure in order to test the bug you tell me. Perhaps I will reproduce it in the future, but after the first tests it seem to be ok.

Thank you again.
User_HWHT9
Don't worry about investigating the bug, it's an obscure one.

Happy JDevelopering.

CM.
1 - 19
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Mar 22 2006
Added on Feb 11 2006
2 comments
4,642 views