GetSession Exception
Hi all,
somebody know why when we try to get the session occurr the next
exception. Thanks in advance.
[06/sep/2001 10:34:49:4] warning: DSYNC-007: GetRootNode: could not get
the node
[06/sep/2001 10:34:49:4] error: STATE-002: could not get dsync root from
the dsy
nc module
[06/sep/2001 10:34:49:4] error: SESSION-002: could not find the state
tree belon
ging to the session module
[06/sep/2001 10:34:49:4] error: Exception: SERVLET-execution_failed:
Error in ex
ecuting servlet U1AB00JSInicio: java.lang.NullPointerException
Exception Stack Trace:
java.lang.NullPointerException
at
com.netscape.server.servlet.platformhttp.PlatformNASSession.<init>(Co
mpiled Code)
at
com.netscape.server.servlet.platformhttp.PlatformHttpServletRequest.g
etSession(Compiled Code)
at servlets_conline.U1AB00JSInicio.doGet(U1AB00JSInicio.java:39)
at javax.servlet.http.HttpServlet.service(Compiled Code)
at javax.servlet.http.HttpServlet.service(Compiled Code)
at
com.netscape.server.servlet.servletrunner.ServletInfo.service(Compile
d Code)
at
com.netscape.server.servlet.servletrunner.ServletRunner.execute(Compi
led Code)
at com.kivasoft.applogic.AppLogic.execute(Compiled Code)
at com.kivasoft.applogic.AppLogic.execute(Compiled Code)
at com.kivasoft.thread.ThreadBasic.run(Native Method)
at com.kivasoft.thread.ThreadBasic.run(Native Method)
at com.kivasoft.thread.ThreadBasic.run(Native Method)
at com.kivasoft.thread.ThreadBasic.run(Native Method)
at com.kivasoft.thread.ThreadBasic.run(Compiled Code)
at java.lang.Thread.run(Compiled Code)
Ignacio Ramos Garcia
Division TSO
Area de Telecomunicaciones
Tecsidel
C/ Enrique Jardiel Poncela, 6
28016 Madrid
Tel: (+34) 91 353 08 19
Fax: (+34) 91 353 08 81
<mailto:[email protected]>
www.tecsidel.es
You may want to do some "cowboy debugging" here... Put in some printlns and see what kind of messages you get. Each JDBC driver, app server and connection pooling approach will throw different messages -- oh, and they can vary depending on how the connection was terminated/killed/dropped... So, my recommendation is to put some print statements in the handler and see what gets sent and then account for those situations.
- Don
Similar Messages
-
UWC/CE 6.3 and Access Manager 7.1 SSO sometimes fails (seems like a bug)
PREAMBULA: I started writing this post thinking that our AM SSO setup was at fault in some step. As I was gathering data, checking the doc-links and config files and finally sniffed the servers for HTTP dialogs, I grew pretty sure there's a bug in UWC/CE, AM SDK or Web Server Policy Agent, whatever implements the AM SSO session checking.
In short, as written below, our "sunmail" server can POST a broken cookie to AM server, if the cookie originally contained a "plus" character. The "plus" is replaced by a "space", invalidating the session check. As we know, "+" is often used in URLs to "escape" the space character. Perhaps some URL cleanup routine backfired here. I have double-checked, it is not the reverse proxy on "psam" breaking things. It is "sunmail" (UWC/CE or Policy Agent, don't know for certain) supplying the broken request. On the few occasions when the AM cookie contains no "plus" characters, the SSO works like a charm (also checked by a sniffer). Whenever there is a "plus", it breaks.
Is there some known bug or workaround that matches this description?
Nevertheless, for completeness' sake I kept the description of our setup. Maybe it's at fault after all :)
We have an installation of JCS5 with the latest patches as of early July 2008. And as the subject implies, we have problems with AM SSO in UWC/CE web-interface. I have reported them before, then they seemed fixed (not occuring for several tests in a row), but as time has shown, something wrong is still there.
So I'll try to go into deeper detail now, as we've may have overlooked some nuance... Then again, as my sniffer research below shows, this may be an engine bug and these setup details are irrelevant.
Our setup is split into several Solaris 10 full-root zones hosted on several servers, some of the components are enroute to HA (perhaps we made some mistakes on this part of the way?)
So, we have the following software stack:
1) two MMR Directory Servers (DSEE 6.3 = DSEE 6.2 from JCS5 + 125278-07__DSEE_6.3__x86x64 + 125277-07__DSEE_6.3__x86_sol9 patches) working in zones on two different servers. Except for one time when a manually forced ZFS rollback corrupted one of the server instances, no problems here.
2) two zones with Directory Proxy Servers (6.3, exact versions as above) running at port 389 provide the clients with an illusion that they have a stable Directory Server, even if one of the actual servers is currently rebooting ;)
These DPS zones are hosted on two different servers as well and are primarily used by LDAP clients (JCS components) running in other zones on the same respective servers.
3) A zone with Sun Web Server 7.0U1 and Access Manager 7.1 (+ 126357-01__AM71_x86 patch) and Delegated Admin 6.4-4.01 (from JCS5 + 121582-18__COMMCLI64__x86 patch).
At the moment there is one such zone (named "cos-psam-01.domain.ru" in the logs below), but we expect(-ed) it to become two similar zones as per AM HA setup.
Zones listed in (1-3) use private IP numbers, they belong in our internal DMZ.
Zones listed in (4-5) below use public (routed) IP numbers, they belong in our external DMZ.
4) A zone with Sun Web Server 7.0U1 used primarily as a reverse-proxy server (optionally with a load-balancer libpassthrough.so plugin) successfully used for other hosted projects. One of its configurations now passes connections from an externally routed IP address published as "psam.domain.ru" to "cos-psam-01.domain.ru", per AM HA setup, so HTTP clients believe they work with an Access Manager instance. This zone has a backend interface with a private IP address to communicate with the actual AM instance.
In AM configuration (both LDAP and file-based) we have configured a site ID with the publicly known name and mentioned both names (psam and cos-psam-01) in organization's realm/dns aliases.
5) A zone with the rest of the Sun Java Communications Suite 5, as in Messaging Server 6.3 (6.3-6.03 64-bit: ci-5.0-1.03_solx86_x64__Messaging_Server_6.3-2 + patch 126480-09__MSG63__x86-64), UWC/CE 6.3 (from JCS5 + 122794-17__UWC63-4.01_core__x86), Instant Messaging 7.2 (from JCS5 + 118790-29__IM72__x86-1 + 118787-28__IM72__x86-2), Calendar Server 6.3 (from JCS5 + 121658-28__iCS63__x86). The web-components (UWC/CE, IM, /httpbind) are deployed in a Sun Web Server 7.0U1 as well.
This zone is named "sunmail.domain.ru" and has a routed IP address for direct external access to its servicess.
The AM SDK part is also patched (126357-01__AM71_x86); it points to the load-balancer name ("psam.domain.ru") as an actual AM server.
# imsimta version
Sun Java(tm) System Messaging Server 6.3-6.03 (built Mar 14 2008; 64bit)
libimta.so 6.3-6.03 (built 17:15:08, Mar 14 2008; 64bit)
SunOS sunmail 5.10 Generic_127112-07 i86pc i386 i86pc
While setting up this server set we tried to use AM SSO as the user login method, but it works unreliably.
"Unreliably" means that while most of the time entering a correct uid and password in Access Manager login page ("http://psam.domain.ru/amserver/UI/Login") does redirect a user back to "http://sunmail.domain.ru/uwc/auth" along with a new cookie, and the user is redirected again to his or her mailbox, sometimes the user receives the UWC/CE login page. Entering the same uid and password here does log him in, but it breaks the whole point of SSO and only increases the end-user routine required to log in :\
We have also seen the "missing mail tab" problem - if the users point the browser to any hostname different from "sunmail.domain.ru" (i.e. www.mail.domain.ru which is equivalent in DNS), they have only the Address book, Calendar and Options tabs; no webmail. So far this is resolved by Policy Agent forcing The One name of the server.
Here's the configuration we did specifically for AM SSO:
1) in AMConfig.properties of "sunmail" and "cos-psam-01" we set up
com.iplanet.am.cookie.encode=false
am.encryption.pwd=<the same value>
all hostname-related parameters point to "psam.domain.ru"
2) in AMConfig.properties of "cos-psam-01" a number of FQDN equivalence entries are added (so it does not redirect to a server hostname unknown to visitors):
com.sun.identity.server.fqdnMap[publicname-or-ip]=psam.domain.ru
com.sun.identity.server.fqdnMap[cos-psam-01.domain.ru]=cos-psam-01.domain.ru
3) in "msg.conf" on "sunmail" (entries added via configutil):
local.webmail.sso.amcookiename = iPlanetDirectoryPro
local.webmail.sso.amnamingurl = http://psam.domain.ru:80/amserver/namingservice
local.webmail.sso.singlesignoff = yes
local.webmail.sso.uwcenabled = 1
service.http.ipsecurity = no
(perhaps some more options are required? Looking for confirmation about: local.webmail.sso.uwclogouturl local.webmail.sso.uwccontexturi local.webmail.sso.uwchome service.http.allowadminproxy )
4) Configured Web Policy Agent for Sun Web Server, so that users without an AM session are required to get one. Set up per [http://msg.wikidoc.info/index.php/AM_redirection_using_Policy_Agent], except that com.sun.am.policy.agents.config.notenforced_list points to the many names our server can go known by.
5) Updated the logout URL in /opt/SUNWuwc/webmail/main.js:
--- main.js.orig Sat Jan 26 07:52:09 2008
+++ main.js Mon Jul 21 01:06:29 2008
@@ -667,7 +667,8 @@
function cleanup() {
if(laurel)
- top.window.location = getUWCHost() + "/base/UWCMain?op=logout"
+// top.window.location = getUWCHost() + "/base/UWCMain?op=logout"
+ top.window.location = "http://sunmail.domain.ru:80/base/UWCMain?op=logout"
else
exec('logout', '', 'exit()')
@@ -1707,7 +1708,8 @@
if(lg) {
url = document.location.href
url = url.substr(0,url.indexOf('webmail'))
- uwcurl = url + 'base/UWCMain?op=logout'
+// uwcurl = url + 'base/UWCMain?op=logout'
+ uwcurl = "http://sunmail.domain.ru:80/base/UWCMain?op=logout"
exit()
}6) Calendar SSO - per docs...
According to ngrep sniffing,
1) the browser goes to "http://sunmail.domain.ru/uwc/auth" without any cookies
2) receives a redirect and goes to "http://psam.domain.ru/amserver/UI/Login?gotoOnFail=http://sunmail.domain.ru:80/uwc&goto=http%3A%2F%2Fsunmail.domain.ru%3A80%2Fuwc%2Fauth"; sends no cookies either.
3) The first response from the "psam" server (as redirected from "cos-psam-01") sets a few cookies while rendering the login page:
Set-cookie: JSESSIONID=7EF8F2810D2071CA03CFEAE9972735B2; Path=/
Set-cookie: AMAuthCookie=AQIC5wM2LY4SfcwuT2ASCrsfO78nXdceEHXeH1+xTqH7C3I=@AAJTSQACMDI=#; Domain=.domain.ru; Path=/
Set-cookie: amlbcookie=02; Domain=.domain.ru; Path=/
4) The browser requests the login page resources (javascripts, images, etc) using these cookies, as in this header line:
Cookie: JSESSIONID=7EF8F2810D2071CA03CFEAE9972735B2; AMAuthCookie=AQIC5wM2LY4SfcwuT2ASCrsfO78nXdceEHXeH1+xTqH7C3I=@AAJTSQACMDI=#; amlbcookie=02
5) The browser POSTs the login request to "/amserver/UI/Login" and receives a redirection to http://sunmail.domain.ru:80/uwc/auth
Set-cookie: iPlanetDirectoryPro=AQIC5wM2LY4SfcwuT2ASCrsfO78nXdceEHXeH1+xTqH7C3I=@AAJTSQACMDI=#; Domain=.domain.ru; Path=/
Set-cookie: AMAuthCookie=LOGOUT; Domain=.domain.ru; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/
6) The browser requests "http://sunmail.domain.ru/uwc/auth" using the newly set cookie (looks like the old one to me though):
Cookie: amlbcookie=02; iPlanetDirectoryPro=AQIC5wM2LY4SfcwuT2ASCrsfO78nXdceEHXeH1+xTqH7C3I=@AAJTSQACMDI=#
7) The "sunmail" web-server checks the AM session validity with the same "psam.domain.ru". It sends a series of POSTs to /amserver/namingservice:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<RequestSet vers="1.0" svcid="com.iplanet.am.naming" reqid="685">
<Request><![CDATA[
<NamingRequest vers="1.0" reqid="324" sessid="AQIC5wM2LY4SfcwuT2ASCrsfO78nXdceEHXeH1+xTqH7C3I=@AAJTSQACMDI=#">
<GetNamingProfile>
</GetNamingProfile>
</NamingRequest>]]>
</Request>
</RequestSet>(receives a large XML list of different Access Manager configuration parameters and URLs)
...then a double-request to /amserver/sessionservice:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<RequestSet vers="1.0" svcid="Session" reqid="686">
<Request><![CDATA[
<SessionRequest vers="1.0" reqid="678">
<GetSession reset="true">
<SessionID>AQIC5wM2LY4SfcwuT2ASCrsfO78nXdceEHXeH1+xTqH7C3I=@AAJTSQACMDI=#</SessionID>
</GetSession>
</SessionRequest>]]>
</Request>
<Request><![CDATA[
<SessionRequest vers="1.0" reqid="679">
<AddSessionListener>
<URL>http://sunmail.domain.ru:80/UpdateAgentCacheServlet?shortcircuit=false</URL>
<SessionID>AQIC5wM2LY4SfcwuT2ASCrsfO78nXdceEHXeH1+xTqH7C3I=@AAJTSQACMDI=#</SessionID>
</AddSessionListener>
</SessionRequest>]]>
</Request>
</RequestSet>As a result it receives an XML with a lot of user-specific information (the username, LDAP DN, preferred locale, auth module used, etc.)
!!!*** Now, the problem part ***!!!
8) And then "sunmail" POSTs a broken cookie to "psam" (note the space in mid-text, where the "plus" sign was previously). As we know, "+" is often used in URLs to "escape" the space character. Perhaps some URL cleanup routine backfired here.
I have double-checked, it is not the reverse proxy on "psam" breaking things. It is "sunmail" (UWC/CE or Policy Agent, don't know for certain) supplying the broken request. I looked over the large XML responses to the two previous requests, whenever they mention the session cookie value, the "plus" is there.
For the most detail I can provide, I'll even paste the whole HTTP packet:
POST /amserver/sessionservice HTTP/1.1
Proxy-agent: Sun-Java-System-Web-Server/7.0
Cookie: iPlanetDirectoryPro=AQIC5wM2LY4SfcwuT2ASCrsfO78nXdceEHXeH1 xTqH7C3I=@AAJTSQACMDI=#;amlbcookie=null
Content-type: text/xml;charset=UTF-8
Content-length: 336
Cache-control: no-cache
Pragma: no-cache
User-agent: Java/1.5.0_09
Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
Host: cos-psam-01.domain.ru
Client-ip: 194.xxx.xxx.xxx
Via: 1.1 https-weblb.domain.ru
Connection: keep-alive
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<RequestSet vers="1.0" svcid="session" reqid="258">
<Request><![CDATA[<SessionRequest vers="1.0" reqid="254">
<GetSession reset="true">
<SessionID>AQIC5wM2LY4SfcwuT2ASCrsfO78nXdceEHXeH1 xTqH7C3I=@AAJTSQACMDI=#</SessionID>
</GetSession>
</SessionRequest>]]></Request>
</RequestSet> The server's error response is apparent:
HTTP/1.1 200 OK
Server: Sun-Java-System-Web-Server/7.0
Date: Thu, 31 Jul 2008 05:49:50 GMT
Content-type: text/html
Transfer-encoding: chunked
19b
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ResponseSet vers="1.0" svcid="session" reqid="258">
<Response><![CDATA[<SessionResponse vers="1.0" reqid="254">
<GetSession>
<Exception>AQIC5wM2LY4SfcwuT2ASCrsfO78nXdceEHXeH1 xTqH7C3I=@AAJTSQACMDI=# Invalid session ID
AQIC5wM2LY4SfcwuT2ASCrsfO78nXdceEHXeH1 xTqH7C3I=@AAJTSQACMDI=#</Exception>
</GetSession>
</SessionResponse>]]></Response>
</ResponseSet>On the few occasions when the AM cookie contains no "plus" characters, the SSO works like a charm (also checked by a sniffer). Whenever there is a "plus", it breaks.
For reference, here's a working final request-response (one with a good cookie, as received by the load-balancer web-server). Request looks a bit different:
POST /amserver/sessionservice HTTP/1.1
Cookie: iPlanetDirectoryPro=AQIC5wM2LY4Sfcy/5sEzVmuq9z1ggdHOkBDgVFAwfhqvn4U=@AAJTSQACMDI=#;amlbcookie=null
Content-Type: text/xml;charset=UTF-8
Content-Length: 379
Cache-Control: no-cache
Pragma: no-cache
User-Agent: Java/1.5.0_09
Host: psam.domain.ru
Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
Connection: keep-alive
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<RequestSet vers="1.0" svcid="session" reqid="281">
<Request><![CDATA[<SessionRequest vers="1.0" reqid="277">
<SetProperty>
<SessionID>AQIC5wM2LY4Sfcy/5sEzVmuq9z1ggdHOkBDgVFAwfhqvn4U=@AAJTSQACMDI=#</SessionID>
<Property name="uwcstatus" value="active"></Property>
</SetProperty>
</SessionRequest>]]></Request>
</RequestSet> ...and the response is OK:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ResponseSet vers="1.0" svcid="session" reqid="281">
<Response><![CDATA[<SessionResponse vers="1.0" reqid="277">
<SetProperty>
<OK></OK>
</SetProperty>
</SessionResponse>]]></Response>
</ResponseSet>There have been a few reports of the same behaviour with other customers - specifically with the handling of the encoding of "+" characters to " ". It relates to how cookie encoding/decoding is performed (as you have already observed).
The solution for these customers was the following:
=> AM server/client side:
Ensure that com.iplanet.am.cookie.encode=false in AMConfig.properties and AMAgent.properties on all systems.
=> AM client (UWC) side:
- Set <property name="encodeCookies" value="false"/> in /var/opt/SUNWuwc/WEB-INF/sun-web.xml. This will prevent UWC from trying to urldecode the cookie it receives and therefore stops it turning the + into a space e.g.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sun-web-app PUBLIC '-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 7.0 Servlet 2.3//EN' 'file:///net/wajra.india.sun.com/export/share/dtd/sun-web-app_2_3-1.dtd'>
<sun-web-app>
<property name="encodeCookies" value="false"/>
<session-config>
<session-manager/>
</session-config>
<jsp-config/>
<property name="allowLinking" value="true" />
</sun-web-app>Regards,
Shane. -
SSO Exception : AM GetSession Info query Failed
Hi,
I've setup the following testing environment
a. AM 7.0 server in Internal Zone
b. Sun one Web server with Reverse Proxy plugin to AM Server in DMZ
c. Another SUN one Web with Policy Agent 2.2 in DMZ
I try to configure the policy agent to point AMserver on Web server with reverse proxy to AM 7.0 server. So that the AM 7.0 will be exposed in DMZ. I encounter error 500 after logging in with the ID and password. According to amagent log, exception occurs during the GetSession Info. It failed to retrieve the session ID for the agent login session. I did face the same problem if the agent config point directly to the AM server.
Appreciate if someone could share with me the possible cause of such exception.
Thank you.
-TGHi all,
> It could be deleted now, but I can't manage to do so. The result always is a NameNotFoundException
You might follow https://service.sap.com/sap/support/notes/1265538 - but without success (really, the content of the note - upgrade - is less than funny, and I just had the problem on SPS22).
But: In such a situation, what one can do is to delete the complete view (TicketKeystore). Before doing so, you might want to export the existing (working) cert/key to reimport them after recreating the whole view (by that, you don't have to recreate the SAPLogonTicketKeypair, which might be unwanted as you might have distributed them for SSO).
Hope it helps someone
Detlev -
Float value giving exception.
Hi,
I am using a bean for a shopping cart. I used this code
public float getCost()
Enumeration enum=hashtable.elements();
String[] tmpItem;
float totalCost=0.00f;
while(enum.hasMoreElements())
tmpItem=(String[])enum.nextElement();
//totalCost += (Integer.parseInt(tmpItem[3]) * Float.parseFloat(tmpItem[2]));
totalCost += (Integer.parseInt(tmpItem[3]) * Float.parseFloat(tmpItem[2]));
return totalCost;
which is giving me this exception.
reported this exception: java.lang.Float: method parseFloat(Ljava/lang/String;)F not found. Please report this to the
administrator of the web server.
java.lang.NoSuchMethodError: java.lang.Float: method parseFloat(Ljava/lang/String;)F not found at
ShopBean.getCost(Compiled Code) at Checkout.doGet(Checkout.java:20) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:715) at
javax.servlet.http.HttpServlet.service(Compiled Code) at
com.sun.server.ServletState.callService(Compiled Code) at
com.sun.server.ServletManager.callServletService(Compiled Code) at
com.sun.server.http.servlet.InvokerServlet.service(Compiled Code) at
javax.servlet.http.HttpServlet.service(Compiled Code) at
com.sun.server.ServletState.callService(Compiled Code) at
com.sun.server.ServletManager.callServletService(Compiled Code) at
com.sun.server.ProcessingState.invokeTargetServlet(Compiled Code) at
com.sun.server.http.HttpProcessingState.execute(Compiled Code) at
com.sun.server.http.stages.Runner.process(Compiled Code) at
com.sun.server.ProcessingSupport.process(Compiled Code) at com.sun.server.Service.process(Compiled
Code) at com.sun.server.http.HttpServiceHandler.handleRequest(Compiled Code) at
com.sun.server.http.HttpServiceHandler.handleRequest(Compiled Code) at
com.sun.server.HandlerThread.run(Compiled Code)
Can any one correct me please?
Thanks
UmaHi
Here is the code which will be calling the bean
import javax.servlet.*;
import javax.servlet.http.*;
import java.util.*;
public class Checkout extends HttpServlet
String itemsvalues,itemno;
String[] tmpItem;
public void doGet(HttpServletRequest req,HttpServletResponse res)
try
ServletOutputStream sos = res.getOutputStream();
ShopBean cart =(ShopBean)req.getSession().getValue("cart");
int totalItems = cart.getNumOfItems();
System.out.println("totalItems="+totalItems);
sos.println("<h4>In Checkout.java</h4>");
float totalCost = cart.getCost();
sos.println("<h5>Total cost is:"+totalCost+"</h5>");
catch(Exception e)
e.printStackTrace();
This class is giving me exceptions
Thanks
Uma -
RMI exception calling web service from proxy class
I am getting the following error attempting to call a web service from a proxy. It appears to relate to the type of objects I am trying to send vs the type that is expected. Following the exception I am adding a copy of the control where calling the web service is sucessful, a copy of the proxy class that I am using to make this unsucessful call, and the controller.jpf that has the formBean where I am creating my objects
Caught Exception Calling the Web Service from the Proxy. The Exception is the f
ollowing: java.rmi.RemoteException: web service invoke failed: javax.xml.soap.SO
APException: failed to serialize class org.openuri.www.CreateAccountCheckingReq
uestweblogic.xml.schema.binding.SerializationException: type mapping lookup fail
ure on class=class controls.CheckingService$anyType TypeMapping=TYPEMAPPING SIZE
=5
ENTRY 1:
class: org.openuri.www.CreateAccountCheckingResponse
xsd_type: ['http://www.openuri.org/']:lcl0:CreateAccountCheckingResponse
ser: org.openuri.www.CreateAccountCheckingResponseCodec@c0f4da
deser: org.openuri.www.CreateAccountCheckingResponseCodec@b1dd4
ENTRY 2:
class: org.openuri.www.FundingInfoAnonType
xsd_type: ['http://www.openuri.org/']:lcl0:FundingInfoAnonType
ser: org.openuri.www.FundingInfoAnonTypeCodec@1d36711
deser: org.openuri.www.FundingInfoAnonTypeCodec@13a59e
ENTRY 3:
class: org.openuri.www.AccountInfoAnonType
xsd_type: ['http://www.openuri.org/']:lcl0:AccountInfoAnonType
ser: org.openuri.www.AccountInfoAnonTypeCodec@1de5959
deser: org.openuri.www.AccountInfoAnonTypeCodec@bbf788
ENTRY 4:
class: org.openuri.www.CustomerInfoAnonType
xsd_type: ['http://www.openuri.org/']:lcl0:CustomerInfoAnonType
ser: org.openuri.www.CustomerInfoAnonTypeCodec@7824f9
deser: org.openuri.www.CustomerInfoAnonTypeCodec@1c35fe1
ENTRY 5:
class: org.openuri.www.CreateAccountCheckingRequest
xsd_type: ['http://www.openuri.org/']:lcl0:CreateAccountCheckingRequest
ser: org.openuri.www.CreateAccountCheckingRequestCodec@1cbcd7b
deser: org.openuri.www.CreateAccountCheckingRequestCodec@11f60ce
; nested exception is:
javax.xml.soap.SOAPException: failed to serialize class org.openuri.www
.CreateAccountCheckingRequestweblogic.xml.schema.binding.SerializationException:
type mapping lookup failure on class=class controls.CheckingService$anyType Typ
eMapping=TYPEMAPPING SIZE=5
ENTRY 1:
class: org.openuri.www.CreateAccountCheckingResponse
xsd_type: ['http://www.openuri.org/']:lcl0:CreateAccountCheckingResponse
ser: org.openuri.www.CreateAccountCheckingResponseCodec@c0f4da
deser: org.openuri.www.CreateAccountCheckingResponseCodec@b1dd4
ENTRY 2:
class: org.openuri.www.FundingInfoAnonType
xsd_type: ['http://www.openuri.org/']:lcl0:FundingInfoAnonType
ser: org.openuri.www.FundingInfoAnonTypeCodec@1d36711
deser: org.openuri.www.FundingInfoAnonTypeCodec@13a59e
ENTRY 3:
class: org.openuri.www.AccountInfoAnonType
xsd_type: ['http://www.openuri.org/']:lcl0:AccountInfoAnonType
ser: org.openuri.www.AccountInfoAnonTypeCodec@1de5959
deser: org.openuri.www.AccountInfoAnonTypeCodec@bbf788
ENTRY 4:
class: org.openuri.www.CustomerInfoAnonType
xsd_type: ['http://www.openuri.org/']:lcl0:CustomerInfoAnonType
ser: org.openuri.www.CustomerInfoAnonTypeCodec@7824f9
deser: org.openuri.www.CustomerInfoAnonTypeCodec@1c35fe1
ENTRY 5:
class: org.openuri.www.CreateAccountCheckingRequest
xsd_type: ['http://www.openuri.org/']:lcl0:CreateAccountCheckingRequest
ser: org.openuri.www.CreateAccountCheckingRequestCodec@1cbcd7b
deser: org.openuri.www.CreateAccountCheckingRequestCodec@11f60ce
Java Control for the web service:
package controls;
import weblogic.webservice.context.WebServiceContext;
* @jc:location http-url="http://localhost:7001/Checking.jws"
* @jc:wsdl file="#CheckingWsdl"
* @jc:handler callback="MessageHandler" operation="MessageHandler"
public interface CheckingService extends com.bea.control.ControlExtension, com.bea.control.ServiceControl
public static class CustomerInfo
implements java.io.Serializable
public java.lang.String FirstName;
public java.lang.String LastName;
public java.lang.String MiddleName;
public int SSN;
public int CustomerNumber;
public java.util.Calendar CreationDate;
public java.util.Calendar LastModifiedDate;
public static class FundingInfo
implements java.io.Serializable
public float Amount;
public java.util.Calendar CurrentDate;
public int AccountNumber;
public static class anyType
implements java.io.Serializable
public com.bea.xml.XmlObject[] t;
public static class AccountInfo
implements java.io.Serializable
public int AccountNumber;
public float Balance;
public int CustomerNumber;
public java.util.Calendar LastModifiedDate;
public WebServiceContext context = CheckingService.context;
* @jc:protocol form-post="false" form-get="false"
public AccountInfo CreateAccountChecking (CustomerInfo CustomerInfo, FundingInfo FundingInfo, anyType CommonHeader);
static final long serialVersionUID = 1L;
/** @common:define name="CheckingWsdl" value::
<?xml version="1.0" encoding="utf-8"?>
<!-- @editor-info:link autogen="false" source="" -->
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:conv="http://www.openuri.org/2002/04/soap/conversation/" xmlns:cw="http://www.openuri.org/2002/04/wsdl/conversation/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:jms="http://www.openuri.org/2002/04/wsdl/jms/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:s0="http://www.openuri.org/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" targetNamespace="http://www.openuri.org/">
<types>
<s:schema targetNamespace="http://www.openuri.org/" xmlns:s="http://www.w3.org/2001/XMLSchema">
<s:element name="CreateAccountCheckingRequest">
<s:complexType>
<s:sequence>
<s:element name="CustomerInfo">
<s:complexType>
<s:sequence>
<s:element name="FirstName" type="s:string" nillable="false"/>
<s:element name="LastName" type="s:string" nillable="false"/>
<s:element name="MiddleName" type="s:string" nillable="true"/>
<s:element name="SSN" type="s:int"/>
<s:element name="CustomerNumber" type="s:int"/>
<s:element name="CreationDate" type="s:dateTime"/>
<s:element name="LastModifiedDate" type="s:dateTime"/>
</s:sequence>
</s:complexType>
</s:element>
<s:element name="FundingInfo">
<s:complexType>
<s:sequence>
<s:element name="Amount" type="s:float"/>
<s:element name="CurrentDate" type="s:dateTime"/>
<s:element name="AccountNumber" type="s:int"/>
</s:sequence>
</s:complexType>
</s:element>
<s:element name="CommonHeader" type="s:anyType"/>
</s:sequence>
</s:complexType>
</s:element>
<s:element name="CreateAccountCheckingResponse">
<s:complexType>
<s:sequence>
<s:element name="AccountInfo">
<s:complexType>
<s:sequence>
<s:element name="AccountNumber" type="s:int"/>
<s:element name="Balance" type="s:float"/>
<s:element name="CustomerNumber" type="s:int"/>
<s:element name="LastModifiedDate" type="s:dateTime"/>
</s:sequence>
</s:complexType>
</s:element>
</s:sequence>
</s:complexType>
</s:element>
<s:element name="string" nillable="true" type="s:string"/>
</s:schema>
</types>
<message name="CreateAccountCheckingSoapIn">
<part name="parameters" element="s0:CreateAccountCheckingRequest"/>
</message>
<message name="CreateAccountCheckingSoapOut">
<part name="parameters" element="s0:CreateAccountCheckingResponse"/>
</message>
<portType name="CheckingSoap">
<operation name="CreateAccountChecking">
<input message="s0:CreateAccountCheckingSoapIn"/>
<output message="s0:CreateAccountCheckingSoapOut"/>
</operation>
</portType>
<binding name="CheckingSoap" type="s0:CheckingSoap">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
<operation name="CreateAccountChecking">
<soap:operation soapAction="http://www.openuri.org/CreateAccountChecking" style="document"/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
</binding>
<service name="Checking">
<port name="CheckingSoap" binding="s0:CheckingSoap">
<soap:address location="http://localhost:7001/Checking.jws"/>
</port>
</service>
</definitions>
FOLLOWING IS THE PROXY CLASS THAT IS UNSUCCESSFUL
import controls.CheckingService.anyType;
import java.util.ArrayList;
import java.util.List;
import javax.xml.namespace.QName;
import javax.xml.rpc.handler.HandlerInfo;
import javax.xml.rpc.handler.HandlerRegistry;
import org.openuri.CreateAccountCheckingResponseDocument.CreateAccountCheckingResponse;
import org.openuri.www.CustomerInfoAnonType;
import org.openuri.www.FundingInfoAnonType;
import weblogic.jws.proxies.*;
import weblogic.webservice.context.WebServiceContext;
import weblogic.webservice.context.WebServiceSession;
import weblogic.webservice.core.handler.WSSEClientHandler;
import weblogic.webservice.tools.pagegen.result;
import weblogic.xml.security.UserInfo;
import weblogic.xml.security.wsse.Security;
import weblogic.xml.security.wsse.SecurityElementFactory;
//import weblogic.jws.proxies.WebServiceB;
//import weblogic.jws.proxies.WebServiceB_Impl;
//import weblogic.jws.proxies.WebServiceBSoap;
public class CheckingWSProxy
public static void CallWS(Controller.CreateAccountCheckingForm form)
String user;
String pass;
try{
* Instantiate the main proxy class. The proxy class has the same name as the
* web service, with "_Impl" appended.
Checking myservice = new Checking_Impl("http://localhost:7001/ConsumerAccountApp/schemas/CheckingService.wsdl");
WebServiceContext context = myservice.context();
WebServiceSession session = context.getSession();
* Registers a handler for the SOAP message traffic.
HandlerRegistry registry = myservice.getHandlerRegistry();
List list = new ArrayList();
list.add(new HandlerInfo(WSSEClientHandler.class, null, null));
registry.setHandlerChain(new QName("Checking"), list);
* Set the username and password token for SOAP message sent from the client, through
* the proxy, to the web service.
user = form.getUsername();
pass = form.getPassword();
UserInfo ui = new UserInfo(user, pass);
session.setAttribute(WSSEClientHandler.REQUEST_USERINFO, ui);
* Adds the username / password token to the SOAP header.
SecurityElementFactory factory = SecurityElementFactory.getDefaultFactory();
Security security = factory.createSecurity(null);
security.addToken(ui);
session.setAttribute(WSSEClientHandler.REQUEST_SECURITY, security);
* Get the protocol-specific proxy class.
CheckingSoap msg=myservice.getCheckingSoap();
* Invoke the web service method
msg.createAccountChecking((CustomerInfoAnonType)form.getProxyCustomerInfo(), (FundingInfoAnonType)form.getProxyFundingInfo(), (Object)form.get_CommonHeader());
catch (Exception ex)
System.out.println("Caught Exception Calling the Web Service from the Proxy. The Exception is the following: " + ex.toString());
FOLLOWING IS THE FORMBEAN IN THE CONTROLLER.JPF FILE
* FormData get and set methods may be overwritten by the Form Bean editor.
public static class CreateAccountCheckingForm extends FormData
private anyType _CommonHeader;
private controls.CheckingService.FundingInfo _FundingInfo;
private controls.CheckingService.CustomerInfo _CustomerInfo;
private java.util.Date dOut;
private java.util.Calendar cOut;
private CustomerInfo proxyCustomerInfo;
private FundingInfo proxyFundingInfo;
private String stringDate;
private String currentDate;
private String lastModifiedDate;
private String creationDate;
private String systemMessage;
private String username;
private String password;
private String accountType;
private String trashTransferAccount;
private String trashAccountNumber;
private boolean secureFlag;
public void set_CustomerInfo(controls.CheckingService.CustomerInfo _CustomerInfo)
_CustomerInfo.CreationDate = parseDate(getCreationDate());
_CustomerInfo.LastModifiedDate = parseDate(getLastModifiedDate());
this._CustomerInfo = _CustomerInfo;
public controls.CheckingService.CustomerInfo get_CustomerInfo()
if(this._CustomerInfo == null)
this._CustomerInfo = new controls.CheckingService.CustomerInfo();
_CustomerInfo.CreationDate = dateNow();
_CustomerInfo.LastModifiedDate = dateNow();
return this._CustomerInfo;
public CustomerInfo getProxyCustomerInfo()
this.proxyCustomerInfo = (CustomerInfo)this._CustomerInfo;
return this.proxyCustomerInfo;
public void set_FundingInfo(controls.CheckingService.FundingInfo _FundingInfo)
_FundingInfo.CurrentDate = parseDate(getCurrentDate());
this._FundingInfo = _FundingInfo;
public controls.CheckingService.FundingInfo get_FundingInfo()
if(this._FundingInfo == null)
this._FundingInfo = new controls.CheckingService.FundingInfo();
_FundingInfo.CurrentDate = dateNow();
return this._FundingInfo;
public FundingInfo getProxyFundingInfo()
this.proxyFundingInfo = (FundingInfo)this._FundingInfo;
return this.proxyFundingInfo;
public void set_CommonHeader(anyType _CommonHeader)
this._CommonHeader = _CommonHeader;
public anyType get_CommonHeader()
if(this._CommonHeader == null)
this._CommonHeader = new anyType();
return this._CommonHeader;
public java.util.Calendar dateNow()
this.dOut = new Date();
Calendar cOut = this.cOut.getInstance();
cOut.setTime(this.dOut);
this.cOut = cOut;
return this.cOut;
public java.util.Calendar parseDate( String strDate )
SimpleDateFormat df4 = new SimpleDateFormat( "MM/dd/yyyy" );
Calendar cOut = this.cOut;
df4.setLenient( false );
try
this.dOut = df4.parse( strDate );
} catch ( ParseException e )
cOut.getInstance();
cOut.setTime(dOut);
this.cOut = cOut;
return this.cOut;
public void setStringDate( String stringDate )
this.stringDate = stringDate;
public String getStringDate()
return this.stringDate;
public void setCurrentDate( String currentDate )
this.currentDate = currentDate;
public String getCurrentDate()
SimpleDateFormat df4 = new SimpleDateFormat( "MM/dd/yyyy" );
this.currentDate = df4.format(_FundingInfo.CurrentDate.getTime());
return this.currentDate;
public void setLastModifiedDate( String lastModifiedDate )
this.lastModifiedDate = lastModifiedDate;
public String getLastModifiedDate()
SimpleDateFormat df4 = new SimpleDateFormat( "MM/dd/yyyy" );
this.lastModifiedDate = df4.format(_CustomerInfo.LastModifiedDate.getTime());
return this.lastModifiedDate;
public void setCreationDate( String creationDate )
this.creationDate = creationDate;
public String getCreationDate()
SimpleDateFormat df4 = new SimpleDateFormat( "MM/dd/yyyy" );
this.creationDate = df4.format(_CustomerInfo.CreationDate.getTime());
return this.creationDate;
public void setUsername( String username )
this.username = username;
public String getUsername()
return this.username;
public void setPassword( String password )
this.password = password;
public String getPassword()
return this.password;
public void setAccountType( String accountType )
this.accountType = accountType;
public String getAccountType()
return this.accountType;
public void setTrashTransferAccount( String trashTransferAccount )
this.trashTransferAccount = trashTransferAccount;
public String getTrashTransferAccount()
return this.trashTransferAccount;
public void setTrashAccountNumber( String trashAccountNumber )
this.trashAccountNumber = trashAccountNumber;
public String getTrashAccountNumber()
return this.trashAccountNumber;
public void setSystemMessage( String systemMessage )
this.systemMessage = systemMessage;
public String getSystemMessage()
return this.systemMessage;
public void setSecureFlag( boolean secureFlag )
this.secureFlag = secureFlag;
public boolean getSecureFlag()
return this.secureFlag;
}This exception means that xml namespaces are different.
Etc. soap has xml element which doesn't belong to namespace of parent xml element and namespace is set without prefix.
I had such problem.
Try to set namespace prefix for this element.
Example:
<el1>
<el2 xmlns="http://..."/>
</el1>
Should be
<el1>
<q:el2 xmlns:q="http://..."/>
</el1> -
i am using toplink 10.1.3.0.0 with oracle app server 10.1.2.2, i am using change field optimistic locking and generating the project xml,
application runs great locally in the jdeveloper, but when it is deployed on app server getting following error
here are the headers from both my project.xml as well as session xml..
<?xml version="1.0" encoding="UTF-8"?>
<toplink:object-persistence version="Oracle TopLink - 10g Release 3 (10.1.3.0.0) (Build 060118)" xmlns:opm="http://xmlns.oracle.com/ias/xsds/opm" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:toplink="http://xmlns.oracle.com/ias/xsds/toplink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<opm:name>PROJ</opm:name>
<opm:class-mapping-descriptors>
<opm:class-mapping-descriptor xsi:type="toplink:relational-class-mapping-descriptor">
<?xml version="1.0" encoding="UTF-8"?>
<toplink-sessions version="4.5" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<session xsi:type="server-session">
<name>PROJSession</name>
<event-listener-classes/>
<logging xsi:type="toplink-log">
<log-level>finer</log-level>
</logging>
<primary-project xsi:type="xml">PROJ.xml</primary-project>
<login xsi:type="database-login">
<platform-class>oracle.toplink.platform.database.oracle.OraclePlatform</platform-class>
<user-name></user-name>
any help/idea appreciated...
Exception [TOPLINK-9005] (Oracle TopLink - 10g Release 3 (10.1.3.0.0) (Build 060118)): oracle.toplink.exceptions.SessionLoaderException
Exception Description: An exception was thrown while loading the <project-xml> file [PROJ.xml].
Internal Exception: Exception [TOPLINK-25004] (Oracle TopLink - 10g Release 3 (10.1.3.0.0) (Build 060118)): oracle.toplink.exceptions.XMLMarshalException
Exception Description: An error occurred unmarshalling the document
Internal Exception: Exception [TOPLINK-27101] (Oracle TopLink - 10g Release 3 (10.1.3.0.0) (Build 060118)): oracle.toplink.platform.xml.XMLPlatformException
Exception Description: An error occurred while parsing the document.
Internal Exception: oracle.xml.parser.v2.XMLParseException: xsi:type "toplink:changed-field-locking-policy" not resolved to a type definition
at oracle.toplink.exceptions.SessionLoaderException.failedToLoadProjectXml(SessionLoaderException.java:74)
at oracle.toplink.tools.sessionconfiguration.TopLinkSessionsFactory.loadProjectConfig(TopLinkSessionsFactory.java:316)
at oracle.toplink.tools.sessionconfiguration.TopLinkSessionsFactory.createSession(TopLinkSessionsFactory.java:241)
at oracle.toplink.tools.sessionconfiguration.TopLinkSessionsFactory.buildServerSessionConfig(TopLinkSessionsFactory.java:215)
at oracle.toplink.tools.sessionconfiguration.TopLinkSessionsFactory.buildSession(TopLinkSessionsFactory.java:168)
at oracle.toplink.tools.sessionconfiguration.TopLinkSessionsFactory.buildTopLinkSessions(TopLinkSessionsFactory.java:124)
at oracle.toplink.tools.sessionconfiguration.XMLSessionConfigLoader.load(XMLSessionConfigLoader.java:103)
at oracle.toplink.tools.sessionmanagement.SessionManager.getSession(SessionManager.java:367)
at oracle.toplink.tools.sessionmanagement.SessionManager.getSession(SessionManager.java:334)
at myProjectPackage.common.data.toplink.ToplinkDataManagerPeer.<init>(ToplinkDataManagerPeer.java:41)
at myProjectPackage.common.data.DataManagerFactory.getDataManagerInstance(DataManagerFactory.java:40)
at myProjectPackage.common.servlet.NYSDOTFilter.getDataManager(NYSDOTFilter.java:964)
at myProjectPackage.common.servlet.NYSDOTFilter.doFilter(NYSDOTFilter.java:144)
at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:16)
at myProjectPackage.caf.servlet.NYSDOTCAFFilter.doFilter(NYSDOTCAFFilter.java:90)
at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:20)
at myProjectPackage.common.servlet.NYSDOTLoginFilter.doFilter(NYSDOTLoginFilter.java:95)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:669)
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:340)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:830)
at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:228)
at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:133)
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
at java.lang.Thread.run(Thread.java:570)first thanks for your reply,
i already figured that out and deployed it using 10.1.3.1 jars
my question
1) if it is a bug , how come it works fine with jdeveloper (
i would appreciate if you could provide any info about it.
2) i dont want to sound sarcastic , but 10.1.3.1 has of optimistic locking and the recommended solution i found was to use descriptor.getQueryManager().setUpdateCallCacheSize(0);
looks like 10.1.3.1 fixed one bug and introduced other one which was working fine earlier...
is there any other way of fixing optimistic locking issue other than using the
descriptor.getQueryManager().setUpdateCallCacheSize(0);
where i can find the latest/greatest (up to date patched version of toplink)
thanks again for your help -
"ORA-29532: Java call terminated by uncaught Java exception
Dear Oracle:
I am trying to establish an HTTPS connection from a Java stored
procedure that is wrapped in a PL/SQL procedure and loaded into a
Package. We are running on Oracle 8.1.7.
My Java code compiles and runs fine when run stand-alone outside
Oracle; I can establish the connection to a secure server and talk to
the server. However when I load this Java class (using the loadjava
utility) this class can no longer run and I get a the following
exception:
"ORA-29532: Java call terminated by uncaught Java exception:
javax.net.ssl.SSLException: SSL handshake failed:
X509CertChainIncompleteErr"
I have tried loading the JSSE from Sun and I still get the same error.
Searching in the Discussing Forums I found the following link (which
describes a procedure that logs into the UPS secure server site and
grabs some XML) http://osi.oracle.com/~mbpierma/SSL_Java_DB.html .
This code works ok if we try to connect to UPS server. However this
code doesn't work if we try to log in to a different server (such as
???). If I modify this code slightly and try to log to any other
sever server I get the same error as the one above. Investigation
lead us to understand that the certificate at the UPS web site is a
self-signed certificate -- not one generated by a major 'recognized'
authority such as Verisign or Thawte.
Further research pointed me to the following URL
http://www.znow.com/sales/oracle/network.816/a76932/appf_ora.htm#619367
This URL has the documentation for JAVA SSL for 8.1.6 which I figure
I could read and try to make it work in 8.1.7.
I looked at your Secure Hello World example, however the code is
missing the most critical parts of the whole example, it does not
specify where the certificate or any of the security settings come
from (see the attached JavaCertExample.txt file).
So, my questions are the following:
1) What should I do to avoid the error mentioned above?
2) Do you have a sample piece of code that describes how to make a
HTTPS connection using a Java stored procedure?
3) Can I make the HTTPS connection using a URL class and not using
sockets directly?
4) Do I need to load the JSEE provided by Sun?
5) Will the solution be different for Oracle 9i?
// SecureHelloClient.java
import java.net.*;
import java.io.*;
import java.util.*;
import javax.net.ssl.*;
import javax.security.cert.X509Certificate;
import oracle.security.ssl.OracleSSLCredential;
import oracle.security.ssl.OracleSSLSocketFactory;
import oracle.security.ssl.OracleSSLProtocolVersion;
import oracle.security.ssl.OracleSSLSession;
public class SecureHelloClient
public static void main(String argv[])
String hostName = "localhost";
if(argv.length != 0)
String hostName = argv[0];
// Set the SSLSocketFactoryImpl class as follows:
java.util.Properties prop = System.getProperties();
prop.put("SSLSocketFactoryImplClass",
"oracle.security.ssl.OracleSSLSocketFactoryImpl");
try
// Get the default socket factory
OracleSSLSocketFactory sSocFactory
= (OracleSSLSocketFactory)SSLSocketFactory.getDefault();
sSocFactory.setSSLProtocolVersion(OracleSSLProtocolVersion.SSL_Version_3_0);
OracleSSLCredential sslCredObj = new OracleSSLCredential();
// Where did these values come from? caCert, userCert, trustedCert,
// Set the certificate chain and private key if the
// server requires client authentication
sslCredObj.addCertChain(caCert)
sslCredObj.addCertchain(userCert)
sslCredObj.setPrivateKey(userPvtKey, userPassword)
// Populate credential object
sslCredObj.addTrustedCert(trustedCert);
sSocFactory.setSSLCredentials(sslCredObj);
// Create the socket using factory
SSLSocket jsslSoc =
(SSLSocket)sSocFactory.createSocket(hostName, 8443);
String [] ciphers = jsslSoc.getSupportedCipherSuites() ;
// Select the ciphers you want and put them.
// Here we will put all availabel ciphers
jsslSoc.setEnabledCipherSuites(ciphers);
// We are creating socket in client mode
jsslSoc.setUseClientMode(true);
// Do SSL handshake
jsslSoc.startHandshake();
// Print negotiated cipher
System.out.println("Negotiated Cipher Suite: "
+jsslSoc.getSession().getCipherSuite());
System.out.println("");
X509Certificate[] peerCerts
= ((javax.net.ssl.SSLSocket)jsslSoc).getSession().getPeerCertificateChain();
if (peerCerts != null)
System.out.println("Printing server information:");
for(int i =0; i ? peerCerts.length; i++)
System.out.println("Peer Certificate ["+i+"] Information:");
System.out.println("- Subject: " + peerCerts.getSubjectDN().getName());
System.out.println("- Issuer: " + peerCerts[i].getIssuerDN().getName());
System.out.println("- Version: " + peerCerts[i].getVersion());
System.out.println("- Start Time: " + peerCerts[i].getNotBefore().toString());
System.out.println("- End Time: " + peerCerts[i].getNotAfter().toString());
System.out.println("- Signature Algorithm: " + peerCerts[i].getSigAlgName());
System.out.println("- Serial Number: " + peerCerts[i].getSerialNumber());
else
System.out.println("Failed to get peer certificates");
// Now do data exchange with client
OutputStream out = jsslSoc.getOutputStream();
InputStream in = jsslSoc.getInputStream();
String inputLine, outputLine;
byte [] msg = new byte[1024];
outputLine = "HELLO";
out.write(outputLine.getBytes());
int readLen = in.read(msg, 0, msg.length);
if(readLen > 0)
inputLine = new String(msg, 0, readLen);
System.out.println("");
System.out.println("Server Message:");
System.out.println(inputLine );
else
System.out.println("Can't read data from client");
// Close all sockets and streams
out.close();
in.close();
jsslSoc.close();
catch(SSLException e)
System.out.println("SSL exception caught:");
e.printStackTrace();
catch(IOException e)
System.out.println("IO exception caught:");
e.printStackTrace();
catch(Exception e)
System.out.println("Exception caught:");
e.printStackTrace();Hi,
I have the same problem.
Is some ORACLE guru that can help us ?
We need to communicate with some servlet
via POST method of https (SSL3)
and with using private certificate on the client site.
We need furthermore allow using of some proxy.
Client site is realized as set of stored procedures within ORACLE 8.1.7
In this time I am able to communicate with server without SSL and certificate
using package utl_tcp
(but with this solution without certificate is our customer not satisfied -:))
ORACLE help us please !
Pavel Pospisil
[email protected] -
Exception while importing/converting 9.0.3 MWP file to 10g
Hi,
Using Toplink 10.0.3 (Preview) I am trying to import an existing 9.0.3 Toplink Mapping Workbench Project. It throws the following exception:
Exception Description: The method [isStub] on the object [oracle.toplink.workbench.model.meta.MWClass] triggered an exception.
Internal Exception: java.lang.reflect.InvocationTargetException
Target Invocation Exception: java.lang.NullPointerException
Mapping: oracle.toplink.mappings.DirectToFieldMapping[stub-->class.stub]
Descriptor: XMLDescriptor(oracle.toplink.workbench.model.meta.MWClass --> [DatabaseTable(class)])
Stack trace:
Local Exception Stack:
Exception [TOPLINK-99] (OracleAS TopLink - 10g (10.0.3) Developer Preview (Build 030902.1548)): oracle.toplink.exceptions.DescriptorException
Exception Description: The method [isStub] on the object [oracle.toplink.workbench.model.meta.MWClass] triggered an exception.
Internal Exception: java.lang.reflect.InvocationTargetException
Target Invocation Exception: java.lang.NullPointerException
Mapping: oracle.toplink.mappings.DirectToFieldMapping[stub-->class.stub]
Descriptor: XMLDescriptor(oracle.toplink.workbench.model.meta.MWClass --> [DatabaseTable(class)])
at oracle.toplink.exceptions.DescriptorException.targetInvocationWhileGettingValueThruMethodAccessor(DescriptorException.java:1420)
at oracle.toplink.internal.descriptors.MethodAttributeAccessor.getAttributeValueFromObject(MethodAttributeAccessor.java:45)
at oracle.toplink.mappings.DatabaseMapping.getAttributeValueFromObject(DatabaseMapping.java:313)
at oracle.toplink.mappings.DirectToFieldMapping.buildCloneValue(DirectToFieldMapping.java:97)
at oracle.toplink.mappings.DirectToFieldMapping.buildClone(DirectToFieldMapping.java:82)
at oracle.toplink.internal.descriptors.ObjectBuilder.populateAttributesForClone(ObjectBuilder.java:1457)
at oracle.toplink.publicinterface.UnitOfWork.cloneAndRegisterNewObject(UnitOfWork.java:580)
at oracle.toplink.publicinterface.UnitOfWork.internalRegisterObject(UnitOfWork.java:2330)
at oracle.toplink.publicinterface.UnitOfWork.registerObject(UnitOfWork.java:3133)
at oracle.toplink.mappings.ObjectReferenceMapping.buildCloneForPartObject(ObjectReferenceMapping.java:44)
at oracle.toplink.internal.indirection.NoIndirectionPolicy.cloneAttribute(NoIndirectionPolicy.java:43)
at oracle.toplink.mappings.ForeignReferenceMapping.buildClone(ForeignReferenceMapping.java:161)
at oracle.toplink.internal.descriptors.ObjectBuilder.populateAttributesForClone(ObjectBuilder.java:1457)
at oracle.toplink.mappings.AggregateMapping.buildClonePart(AggregateMapping.java:129)
at oracle.toplink.sdk.SDKAggregateCollectionMapping.buildClonePart(SDKAggregateCollectionMapping.java:87)
at oracle.toplink.mappings.AggregateMapping.buildClone(AggregateMapping.java:105)
at oracle.toplink.internal.descriptors.ObjectBuilder.populateAttributesForClone(ObjectBuilder.java:1457)
at oracle.toplink.publicinterface.UnitOfWork.cloneAndRegisterNewObject(UnitOfWork.java:580)
at oracle.toplink.publicinterface.UnitOfWork.internalRegisterObject(UnitOfWork.java:2330)
at oracle.toplink.publicinterface.UnitOfWork.registerObject(UnitOfWork.java:3133)
at oracle.toplink.mappings.ObjectReferenceMapping.buildCloneForPartObject(ObjectReferenceMapping.java:44)
at oracle.toplink.internal.indirection.NoIndirectionPolicy.cloneAttribute(NoIndirectionPolicy.java:43)
at oracle.toplink.mappings.ForeignReferenceMapping.buildClone(ForeignReferenceMapping.java:161)
at oracle.toplink.internal.descriptors.ObjectBuilder.populateAttributesForClone(ObjectBuilder.java:1457)
at oracle.toplink.mappings.AggregateMapping.buildClonePart(AggregateMapping.java:129)
at oracle.toplink.sdk.SDKAggregateCollectionMapping.buildClonePart(SDKAggregateCollectionMapping.java:87)
at oracle.toplink.mappings.AggregateMapping.buildClone(AggregateMapping.java:105)
at oracle.toplink.internal.descriptors.ObjectBuilder.populateAttributesForClone(ObjectBuilder.java:1457)
at oracle.toplink.publicinterface.UnitOfWork.cloneAndRegisterNewObject(UnitOfWork.java:580)
at oracle.toplink.publicinterface.UnitOfWork.internalRegisterObject(UnitOfWork.java:2330)
at oracle.toplink.publicinterface.UnitOfWork.registerObject(UnitOfWork.java:3133)
at oracle.toplink.mappings.ObjectReferenceMapping.buildCloneForPartObject(ObjectReferenceMapping.java:44)
at oracle.toplink.internal.indirection.NoIndirectionPolicy.cloneAttribute(NoIndirectionPolicy.java:43)
at oracle.toplink.mappings.ForeignReferenceMapping.buildClone(ForeignReferenceMapping.java:161)
at oracle.toplink.internal.descriptors.ObjectBuilder.populateAttributesForClone(ObjectBuilder.java:1457)
at oracle.toplink.mappings.AggregateMapping.buildClonePart(AggregateMapping.java:129)
at oracle.toplink.mappings.AggregateMapping.buildClone(AggregateMapping.java:105)
at oracle.toplink.internal.descriptors.ObjectBuilder.populateAttributesForClone(ObjectBuilder.java:1457)
at oracle.toplink.mappings.AggregateMapping.buildClonePart(AggregateMapping.java:129)
at oracle.toplink.sdk.SDKAggregateCollectionMapping.buildClonePart(SDKAggregateCollectionMapping.java:87)
at oracle.toplink.mappings.AggregateMapping.buildClone(AggregateMapping.java:105)
at oracle.toplink.internal.descriptors.ObjectBuilder.populateAttributesForClone(ObjectBuilder.java:1457)
at oracle.toplink.publicinterface.UnitOfWork.cloneAndRegisterNewObject(UnitOfWork.java:580)
at oracle.toplink.publicinterface.UnitOfWork.internalRegisterObject(UnitOfWork.java:2330)
at oracle.toplink.publicinterface.UnitOfWork.registerObject(UnitOfWork.java:3133)
at oracle.toplink.mappings.ObjectReferenceMapping.buildCloneForPartObject(ObjectReferenceMapping.java:44)
at oracle.toplink.internal.indirection.NoIndirectionPolicy.cloneAttribute(NoIndirectionPolicy.java:43)
at oracle.toplink.mappings.ForeignReferenceMapping.buildClone(ForeignReferenceMapping.java:161)
at oracle.toplink.internal.descriptors.ObjectBuilder.populateAttributesForClone(ObjectBuilder.java:1457)
at oracle.toplink.mappings.AggregateMapping.buildClonePart(AggregateMapping.java:129)
at oracle.toplink.sdk.SDKAggregateCollectionMapping.buildClonePart(SDKAggregateCollectionMapping.java:87)
at oracle.toplink.mappings.AggregateMapping.buildClone(AggregateMapping.java:105)
at oracle.toplink.internal.descriptors.ObjectBuilder.populateAttributesForClone(ObjectBuilder.java:1457)
at oracle.toplink.publicinterface.UnitOfWork.cloneAndRegisterNewObject(UnitOfWork.java:580)
at oracle.toplink.publicinterface.UnitOfWork.internalRegisterObject(UnitOfWork.java:2330)
at oracle.toplink.publicinterface.UnitOfWork.registerObject(UnitOfWork.java:3133)
at oracle.toplink.mappings.ObjectReferenceMapping.buildCloneForPartObject(ObjectReferenceMapping.java:44)
at oracle.toplink.internal.indirection.NoIndirectionPolicy.cloneAttribute(NoIndirectionPolicy.java:43)
at oracle.toplink.mappings.ForeignReferenceMapping.buildClone(ForeignReferenceMapping.java:161)
at oracle.toplink.internal.descriptors.ObjectBuilder.populateAttributesForClone(ObjectBuilder.java:1457)
at oracle.toplink.mappings.AggregateMapping.buildClonePart(AggregateMapping.java:129)
at oracle.toplink.mappings.AggregateMapping.buildClone(AggregateMapping.java:105)
at oracle.toplink.internal.descriptors.ObjectBuilder.populateAttributesForClone(ObjectBuilder.java:1457)
at oracle.toplink.mappings.AggregateMapping.buildClonePart(AggregateMapping.java:129)
at oracle.toplink.sdk.SDKAggregateCollectionMapping.buildClonePart(SDKAggregateCollectionMapping.java:87)
at oracle.toplink.mappings.AggregateMapping.buildClone(AggregateMapping.java:105)
at oracle.toplink.internal.descriptors.ObjectBuilder.populateAttributesForClone(ObjectBuilder.java:1457)
at oracle.toplink.publicinterface.UnitOfWork.cloneAndRegisterNewObject(UnitOfWork.java:580)
at oracle.toplink.publicinterface.UnitOfWork.internalRegisterObject(UnitOfWork.java:2330)
at oracle.toplink.publicinterface.UnitOfWork.registerObject(UnitOfWork.java:3133)
at oracle.toplink.mappings.ObjectReferenceMapping.buildCloneForPartObject(ObjectReferenceMapping.java:44)
at oracle.toplink.internal.indirection.NoIndirectionPolicy.cloneAttribute(NoIndirectionPolicy.java:43)
at oracle.toplink.mappings.ForeignReferenceMapping.buildClone(ForeignReferenceMapping.java:161)
at oracle.toplink.internal.descriptors.ObjectBuilder.populateAttributesForClone(ObjectBuilder.java:1457)
at oracle.toplink.mappings.AggregateMapping.buildClonePart(AggregateMapping.java:129)
at oracle.toplink.sdk.SDKAggregateCollectionMapping.buildClonePart(SDKAggregateCollectionMapping.java:87)
at oracle.toplink.mappings.AggregateMapping.buildClone(AggregateMapping.java:105)
at oracle.toplink.internal.descriptors.ObjectBuilder.populateAttributesForClone(ObjectBuilder.java:1457)
at oracle.toplink.publicinterface.UnitOfWork.cloneAndRegisterNewObject(UnitOfWork.java:580)
at oracle.toplink.publicinterface.UnitOfWork.internalRegisterObject(UnitOfWork.java:2330)
at oracle.toplink.publicinterface.UnitOfWork.registerObject(UnitOfWork.java:3133)
at oracle.toplink.mappings.ObjectReferenceMapping.buildCloneForPartObject(ObjectReferenceMapping.java:44)
at oracle.toplink.internal.indirection.NoIndirectionPolicy.cloneAttribute(NoIndirectionPolicy.java:43)
at oracle.toplink.mappings.ForeignReferenceMapping.buildClone(ForeignReferenceMapping.java:161)
at oracle.toplink.internal.descriptors.ObjectBuilder.populateAttributesForClone(ObjectBuilder.java:1457)
at oracle.toplink.mappings.AggregateMapping.buildClonePart(AggregateMapping.java:129)
at oracle.toplink.mappings.AggregateMapping.buildClone(AggregateMapping.java:105)
at oracle.toplink.internal.descriptors.ObjectBuilder.populateAttributesForClone(ObjectBuilder.java:1457)
at oracle.toplink.mappings.AggregateMapping.buildClonePart(AggregateMapping.java:129)
at oracle.toplink.sdk.SDKAggregateCollectionMapping.buildClonePart(SDKAggregateCollectionMapping.java:87)
at oracle.toplink.mappings.AggregateMapping.buildClone(AggregateMapping.java:105)
at oracle.toplink.internal.descriptors.ObjectBuilder.populateAttributesForClone(ObjectBuilder.java:1457)
at oracle.toplink.publicinterface.UnitOfWork.cloneAndRegisterNewObject(UnitOfWork.java:580)
at oracle.toplink.publicinterface.UnitOfWork.internalRegisterObject(UnitOfWork.java:2330)
at oracle.toplink.publicinterface.UnitOfWork.registerObject(UnitOfWork.java:3133)
at oracle.toplink.mappings.ObjectReferenceMapping.buildCloneForPartObject(ObjectReferenceMapping.java:44)
at oracle.toplink.internal.indirection.NoIndirectionPolicy.cloneAttribute(NoIndirectionPolicy.java:43)
at oracle.toplink.mappings.ForeignReferenceMapping.buildClone(ForeignReferenceMapping.java:161)
at oracle.toplink.internal.descriptors.ObjectBuilder.populateAttributesForClone(ObjectBuilder.java:1457)
at oracle.toplink.publicinterface.UnitOfWork.cloneAndRegisterNewObject(UnitOfWork.java:580)
at oracle.toplink.publicinterface.UnitOfWork.internalRegisterObject(UnitOfWork.java:2330)
at oracle.toplink.publicinterface.UnitOfWork.registerObject(UnitOfWork.java:3133)
at oracle.toplink.mappings.CollectionMapping.buildElementClone(CollectionMapping.java:152)
at oracle.toplink.mappings.CollectionMapping.buildCloneForPartObject(CollectionMapping.java:101)
at oracle.toplink.internal.indirection.NoIndirectionPolicy.cloneAttribute(NoIndirectionPolicy.java:43)
at oracle.toplink.mappings.ForeignReferenceMapping.buildClone(ForeignReferenceMapping.java:161)
at oracle.toplink.internal.descriptors.ObjectBuilder.populateAttributesForClone(ObjectBuilder.java:1457)
at oracle.toplink.publicinterface.UnitOfWork.cloneAndRegisterNewObject(UnitOfWork.java:580)
at oracle.toplink.publicinterface.UnitOfWork.internalRegisterObject(UnitOfWork.java:2330)
at oracle.toplink.publicinterface.UnitOfWork.registerObject(UnitOfWork.java:3133)
at oracle.toplink.workbench.ui.WorkbenchSession.registerProject(WorkbenchSession.java:563)
at oracle.toplink.workbench.ui.WorkbenchSession.addProject(WorkbenchSession.java:147)
at oracle.toplink.workbench.ui.WorkbenchSession.addNewProject(WorkbenchSession.java:133)
at oracle.toplink.workbench.ui.MainView.addNewProject(MainView.java:239)
at oracle.toplink.workbench.filesystem.MWFileFactory.openImp(MWFileFactory.java:204)
at oracle.toplink.workbench.filesystem.MWFileFactory.open(MWFileFactory.java:156)
at oracle.toplink.tsceditor.persistence.PersistenceManager.open(PersistenceManager.java:747)
at oracle.toplink.tsceditor.ui.persistence.DefaultUIPersistence.open(DefaultUIPersistence.java:181)
at oracle.toplink.tsceditor.ui.persistence.UIPersistenceManager.open(UIPersistenceManager.java:625)
at oracle.toplink.tsceditor.ui.persistence.UIPersistenceManager$OpenFile.execute(UIPersistenceManager.java:1095)
at oracle.toplink.tsceditor.utility.Thread.run(Thread.java:114)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.GeneratedMethodAccessor99.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at oracle.toplink.internal.descriptors.MethodAttributeAccessor.getAttributeValueFromObject(MethodAttributeAccessor.java:39)
... 119 more
Caused by: java.lang.NullPointerException
at oracle.toplink.workbench.model.meta.MWClass.superclassIsDefaultValue(MWClass.java:1253)
at oracle.toplink.workbench.model.meta.MWClass.isStub(MWClass.java:1214)
... 123 more
Has anyone a clue where I should look? Are there features in the 9.0.3 Mapping Workbench not yet supported in 10.0.3?
Do I need to make settings in 10g before attempting the import/conversion?
Could there be a wrongly set Classpath?
When attempting to have the 9.0.3 generated deployment-xml file for this application interpreted using the 10g toplink.jar, I receive the following error:
Exception [TOPLINK-7094] (OracleAS TopLink - 10g (10.0.3) Developer Preview (Build 030902.1548)): oracle.toplink.exceptions.ValidationException Exception Description: Local Exception Stack: Exception Description: Several [2] SessionLoaderExceptions were thrown: *** Exception [TOPLINK-9005] (OracleAS TopLink - 10g (10.0.3) Developer Preview (Build 030902.1548)): oracle.toplink.exceptions.SessionLoaderException Exception Description: An exception was thrown while loading the file [UdoToplink.xml]. Internal Exception: java.lang.VerifyError: (class: oracle/toplink/tools/workbench/XMLProjectReader, method: read signature: (Ljava/lang/String;)Loracle/toplink/sessions/Project;) Incompatible argument to function *** Exception [TOPLINK-9001] (OracleAS TopLink - 10g (10.0.3) Developer Preview (Build 030902.1548)): oracle.toplink.exceptions.SessionLoaderException Exception Description: Unknown tag name: [session] in XML node: [toplink-configuration]. Internal Exception: java.lang.reflect.InvocationTargetException Target Invocation Exception: java.lang.NullPointerException at oracle.toplink.exceptions.SessionLoaderException.finalException(SessionLoaderException.java:90) at oracle.toplink.tools.sessionconfiguration.XMLLoader.load(Unknown Source)
*** Local Exception Stack: Exception [TOPLINK-9005] (OracleAS TopLink - 10g (10.0.3) Developer Preview (Build 030902.1548)): oracle.toplink.exceptions.SessionLoaderException Exception Description: An exception was thrown while loading the file [UdoToplink.xml]. Internal Exception: java.lang.VerifyError: (class: oracle/toplink/tools/workbench/XMLProjectReader, method: read signature: (Ljava/lang/String;)Loracle/toplink/sessions/Project;) Incompatible argument to function at oracle.toplink.exceptions.SessionLoaderException.failedToLoadProjectXml(SessionLoaderException.java:75) at oracle.toplink.tools.sessionconfiguration.XMLLoader.process_project_xml_Tag(Unknown Source) at java.lang.reflect.Method.invoke(Native Method) at oracle.toplink.tools.sessionconfiguration.XMLLoader.process_session_Tag(Unknown Source) at java.lang.reflect.Method.invoke(Native Method) at oracle.toplink.tools.sessionconfiguration.XMLLoader.processRootTag(Unknown Source) at oracle.toplink.tools.sessionconfiguration.XMLLoader.load(Unknown Source) at oracle.toplink.tools.sessionmanagement.SessionManager.getSession(Unknown Source) at oracle.toplink.tools.sessionmanagement.SessionManager.getSession(Unknown Source) at oracle.toplink.tools.sessionmanagement.SessionManager.getSession(Unknown Source) at
Local Exception Stack: Exception [TOPLINK-9001] (OracleAS TopLink - 10g (10.0.3) Developer Preview (Build 030902.1548)): oracle.toplink.exceptions.SessionLoaderException Exception Description: Unknown tag name: [session] in XML node: [toplink-configuration]. Internal Exception: java.lang.reflect.InvocationTargetException Target Invocation Exception: java.lang.NullPointerException at oracle.toplink.exceptions.SessionLoaderException.unkownTagAtNode(SessionLoaderException.java:60) at oracle.toplink.tools.sessionconfiguration.XMLLoader.processRootTag(Unknown Source) at oracle.toplink.tools.sessionconfiguration.XMLLoader.load(Unknown Source) at oracle.toplink.tools.sessionmanagement.SessionManager.getSession(Unknown Source) at oracle.toplink.tools.sessionmanagement.SessionManager.getSession(Unknown Source) at oracle.toplink.tools.sessionmanagement.SessionManager.getSession(Unknown Source) at
Thanks for any help you may provide.
Lucas JellemaLucas,
I have not seen this issue before. We'll investigate and contact you directly for more info. I'll post the resolution back to this forum once available.
Doug -
Can't validate BR in EAS 11.1.2.1 - Exception Occurred
We can't validate ANY Business Rules in EAS 11.1.2.1 against ANY applications including Sample. BR in EAS are used only for Essbase. EAS is on separate server than Essbase. 64-bit Windows
Error message:
Exception occurred. Please check your log file for details.
Also, on one particular rule we are getting this when opening:
Erro while sending command to HBR server running within the EAS server.
Details:com.hyperion.hbr.excp.DataException.<init>(java.lang.String,(Ljava.lang.Object;,com.hyperion.hbr.excp.ExceptionSeverity,java.lang.Throwable)
hbrserver:
2012-04-13 12:57:15,232 DEBUG [ACTIVE] ExecuteThread: '16' for queue: 'weblogic.kernel.Default (self-tuning)' com.hyperion.hbr.cache.GenericCache - Retrieve: HBRLocation
2012-04-13 12:57:15,232 DEBUG [ACTIVE] ExecuteThread: '16' for queue: 'weblogic.kernel.Default (self-tuning)' com.hyperion.hbr.cache.GenericCache - Class: com.hyperion.hbr.cache.impl.LocationID [id: 3]
2012-04-13 12:57:15,232 DEBUG [ACTIVE] ExecuteThread: '16' for queue: 'weblogic.kernel.Default (self-tuning)' com.hyperion.hbr.cache.GenericCache - Not Found
2012-04-13 12:57:15,232 WARN [ACTIVE] ExecuteThread: '16' for queue: 'weblogic.kernel.Default (self-tuning)' com.hyperion.hbr.db.DBLocationTable - Unable to find Location with ID: 3
2012-04-13 12:57:15,232 DEBUG [ACTIVE] ExecuteThread: '16' for queue: 'weblogic.kernel.Default (self-tuning)' com.hyperion.hbr.db.DBLocationTable - Exiting method. com.hyperion.hbr.db.DBLocationTable:getLocation
2012-04-13 12:57:15,232 WARN [ACTIVE] ExecuteThread: '16' for queue: 'weblogic.kernel.Default (self-tuning)' com.hyperion.hbr.core.AccessControlManagerServer - Error in AccessControl retrieving location.
2012-04-13 12:57:15,232 DEBUG [ACTIVE] ExecuteThread: '16' for queue: 'weblogic.kernel.Default (self-tuning)' com.hyperion.hbr.core.AccessControlManagerServer - Exiting method. com.hyperion.hbr.common.HBRLogger:warningExit
2012-04-13 12:57:15,232 DEBUG [ACTIVE] ExecuteThread: '16' for queue: 'weblogic.kernel.Default (self-tuning)' com.hyperion.hbr.core.HBRCmdListener - Entering method. com.hyperion.hbr.core.HBRCmdListener:addExceptionToXto
2012-04-13 12:57:15,232 DEBUG [ACTIVE] ExecuteThread: '16' for queue: 'weblogic.kernel.Default (self-tuning)' com.hyperion.hbr.core.HBRCmdListener - Exiting method. com.hyperion.hbr.core.HBRCmdListener:addExceptionToXto
2012-04-13 12:57:15,232 DEBUG [ACTIVE] ExecuteThread: '16' for queue: 'weblogic.kernel.Default (self-tuning)' com.hyperion.hbr.core.AccessControlCmdListener - Exiting method. com.hyperion.hbr.core.AccessControlCmdListener:getLocation
2012-04-13 12:57:15,435 DEBUG Thread-61 com.hyperion.hbr.core.PluginDataManager - Entering method. com.hyperion.hbr.core.PluginDataManager:getNewEvents()
2012-04-13 12:57:15,435 DEBUG Thread-61 com.hyperion.hbr.db.DBPluginDataTable - Entering method. com.hyperion.hbr.db.DBPluginDataTable:getPluginDataAfter
2012-04-13 12:57:15,435 DEBUG Thread-61 com.hyperion.hbr.db.HBRDBConnectionPool - Entering method. com.hyperion.hbr.db.HBRDBConnectionPool:getConnection()
2012-04-13 12:57:15,435 DEBUG Thread-61 com.hyperion.hbr.db.HBRDBConnectionPool - Entering method. com.hyperion.hbr.db.HBRDBConnectionPool:checkout()
2012-04-13 12:57:15,435 DEBUG Thread-61 com.hyperion.hbr.db.HBRDBConnectionPool - Exiting method. com.hyperion.hbr.db.HBRDBConnectionPool:checkout()
2012-04-13 12:57:15,435 DEBUG Thread-61 com.hyperion.hbr.db.HBRDBConnectionPool - Exiting method. com.hyperion.hbr.db.HBRDBConnectionPool:getConnection()
2012-04-13 12:57:15,435 ERROR Thread-61 com.hyperion.hbr.db.HBRDBConnectionHandler - No resource is associated with key "######## Getting connection. Number Checked Out = 1".
2012-04-13 12:57:15,435 DEBUG Thread-61 com.hyperion.hbr.db.HBRDBConnectionHandler - ######## Getting connection. Number Checked Out = 1
2012-04-13 12:57:15,435 DEBUG Thread-61 com.hyperion.hbr.db.BaseRepository - Entering method. com.hyperion.hbr.db.BaseRepository:prepareSelect
2012-04-13 12:57:15,435 INFO Thread-61 com.hyperion.hbr.db.BaseRepository - select PlanningServer, PlanningRmiPort, PlanningAppName, OlapServerName, OlapUserName, OlapPassword, EntryTime from HBRPluginData
2012-04-13 12:57:15,435 DEBUG Thread-61 com.hyperion.hbr.db.BaseRepository - Exiting method. com.hyperion.hbr.db.BaseRepository:prepareSelect
2012-04-13 12:57:15,435 ERROR Thread-61 com.hyperion.hbr.db.DBPluginDataTable - No resource is associated with key "trying to close statement in getPluginDataAfter ".
2012-04-13 12:57:15,435 DEBUG Thread-61 com.hyperion.hbr.db.DBPluginDataTable - trying to close statement in getPluginDataAfter
2012-04-13 12:57:15,435 DEBUG Thread-61 com.hyperion.hbr.db.RepositoryManager - Entering method. com.hyperion.hbr.db.RepositoryManager:createRepository
2012-04-13 12:57:15,435 DEBUG Thread-61 com.hyperion.hbr.db.RepositoryManager - Exiting method. com.hyperion.hbr.db.RepositoryManager:createRepository
2012-04-13 12:57:15,435 DEBUG Thread-61 com.hyperion.hbr.db.BaseRepository - Entering method. com.hyperion.hbr.db.BaseRepository:getConnMgr
2012-04-13 12:57:15,435 DEBUG Thread-61 com.hyperion.hbr.db.BaseRepository - Exiting method. com.hyperion.hbr.db.BaseRepository:getConnMgr
2012-04-13 12:57:15,435 ERROR Thread-61 com.hyperion.hbr.db.HBRDBConnectionHandler - No resource is associated with key "######## Freeing connection. Number Checked Out = 0".
2012-04-13 12:57:15,435 DEBUG Thread-61 com.hyperion.hbr.db.HBRDBConnectionHandler - ######## Freeing connection. Number Checked Out = 0
2012-04-13 12:57:15,435 DEBUG Thread-61 com.hyperion.hbr.db.DBPluginDataTable - Exiting method. com.hyperion.hbr.db.DBPluginDataTable:getPluginDataAfter
2012-04-13 12:57:15,435 DEBUG Thread-61 com.hyperion.hbr.core.PluginDataManager - Exiting method. com.hyperion.hbr.core.PluginDataManager:getNewEvents()
hbrclient:
2012-04-13 10:19:49,761 DEBUG AWT-EventQueue-0 com.hyperion.hbr.api.UserManagerClient - Exiting method. com.hyperion.hbr.api.UserManagerClient:getUserServerList
2012-04-13 10:19:49,761 DEBUG AWT-EventQueue-0 com.hyperion.hbr.api.SessionClient - Exiting method. com.hyperion.hbr.api.SessionClient:updateUserConnect
2012-04-13 10:19:49,761 DEBUG AWT-EventQueue-0 com.hyperion.hbr.api.MetadataManagerClient - Entering method. com.hyperion.hbr.api.MetadataManagerClient:validateConnectStringForValidateLaunch
2012-04-13 10:19:49,761 DEBUG AWT-EventQueue-0 com.hyperion.hbr.api.MetadataManagerClient - Entering method. com.hyperion.hbr.api.MetadataManagerClient:getConnectedRootElement
2012-04-13 10:19:49,761 WARN AWT-EventQueue-0 com.hyperion.hbr.core.MetadataManagerServerRemote - Cannot retrieve connected root element for Essbase/...
com.hyperion.hbr.common.HBRLogger$HBRLogThrowable
at com.hyperion.hbr.core.MetadataManagerServerRemote.getConnectedRootElement(Unknown Source)
at com.hyperion.hbr.api.MetadataManagerClient.getConnectedRootElement(Unknown Source)
at com.hyperion.hbr.api.MetadataManagerClient.validateConnectStringForValidateLaunch(Unknown Source)
at com.hyperion.hbr.client.LauncherWindow.validateExecDBValue(Unknown Source)
at com.hyperion.hbr.client.LauncherWindow.validateRuleLaunchValues(Unknown Source)
at com.hyperion.hbr.client.LauncherWindow.handleLaunch(Unknown Source)
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 com.essbase.eas.ui.CButton.doAction(Unknown Source)
at com.essbase.eas.ui.CButton$1.actionPerformed(Unknown Source)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
at java.awt.Component.processMouseEvent(Component.java:6267)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
at java.awt.Component.processEvent(Component.java:6032)
at java.awt.Container.processEvent(Container.java:2041)
at java.awt.Component.dispatchEventImpl(Component.java:4630)
at java.awt.Container.dispatchEventImpl(Container.java:2099)
at java.awt.Component.dispatchEvent(Component.java:4460)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4577)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
at java.awt.Container.dispatchEventImpl(Container.java:2085)
at java.awt.Window.dispatchEventImpl(Window.java:2478)
at java.awt.Component.dispatchEvent(Component.java:4460)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:178)
at java.awt.Dialog$1.run(Dialog.java:1046)
at java.awt.Dialog$3.run(Dialog.java:1098)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.Dialog.show(Dialog.java:1096)
at com.essbase.eas.ui.StandardDialog.show(Unknown Source)
at com.essbase.eas.ui.StandardDialog.doModal(Unknown Source)
at com.essbase.eas.ui.StandardDialog.doModal(Unknown Source)
at com.hyperion.hbr.client.MainFrame.handleValidate(Unknown Source)
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 com.essbase.eas.ui.CButton.doAction(Unknown Source)
at com.essbase.eas.ui.CButton$1.actionPerformed(Unknown Source)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
at java.awt.Component.processMouseEvent(Component.java:6267)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
at java.awt.Component.processEvent(Component.java:6032)
at java.awt.Container.processEvent(Container.java:2041)
at java.awt.Component.dispatchEventImpl(Component.java:4630)
at java.awt.Container.dispatchEventImpl(Container.java:2099)
at java.awt.Component.dispatchEvent(Component.java:4460)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4577)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
at java.awt.Container.dispatchEventImpl(Container.java:2085)
at java.awt.Window.dispatchEventImpl(Window.java:2478)
at java.awt.Component.dispatchEvent(Component.java:4460)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
2012-04-13 10:19:49,776 DEBUG AWT-EventQueue-0 com.hyperion.hbr.core.MetadataManagerServerRemote - Exiting method. com.hyperion.hbr.common.HBRLogger:warningExit
2012-04-13 10:19:49,776 DEBUG AWT-EventQueue-0 com.hyperion.hbr.core.MetadataManagerServerRemote - Entering method. com.hyperion.hbr.core.MetadataManagerServerRemote:connect
2012-04-13 10:19:49,776 INFO AWT-EventQueue-0 com.hyperion.hbr.api.ClientSessionManager - getSession: Thread = Thread[AWT-EventQueue-0,6,main], Session = com.hyperion.hbr.api.SessionC
We have check assess rights in shared services, Location and Privileges for Rules, SQL memory and disk space, removing and re-adding servers.
Any suggestions will be greatly appreciated!!!!!!!!!This article from My Oracle Support might be useful: Troubleshooting the Business Rules Command Line Launcher (CmdLnLauncher) [ID 1173313.1]
And specifically this part:
Error: "Error While Sending Command to HBR Server Running Within the EAS Server"
Symptoms
CmdLnLauncher utility fails with the following error,
"Error while sending command to HBR Server running within the EAS server."
Cause
JDK 1.6 installed on the server. This is picked up as the default Java Runtime resulting in issues running CmdLnLauncher utility. The 11.1.1.x release supports JDK 1.5
You can verify what version of Java is installed on the server by executing command 'Java -version' from a command prompt.
Solution
Uninstall JDK 1.6 and install version 1.5.
If uninstalling is not an option you can perform the following steps to workaround the issue:
1. Edit CmdLnLauncher.bat
2. Add path to JRE 1.5 before -DHBR_HOME
Example of CmdLnLauncher.bat:
set CPATH=..\lib\CmdLnLauncher.jar
set CPATH=%CPATH%;..\lib\easclientplugin.jar
set CPATH=%CPATH%;..\lib\log4j-1.2.8.jar
set CPATH=%CPATH%;..\lib\framework_common.jar
set CPATH=%CPATH%;..\lib\eas_common.jar
rem set CPATH=%CPATH%;..\lib\jaxp-api.jar
rem set CPATH=%CPATH%;..\lib\jdom.jar
set CPATH=%CPATH%;..\lib\dom.jar
set CPATH=%CPATH%;..\lib\xercesImpl.jar
C:\Hyperion\common\JRE\Sun\1.5.0\bin\java -DHBR_HOME=..\.. -cp %CPATH% com.hyperion.hbr.cmdlnlauncher.CmdLineLauncher %1 %2 %3 %4 %5 %6
3. Save Changes to CmdLnLauncher.bat file.
References
BUG:9545394 - CMDLNLAUNCHER - ERROR WHILE SENDING COMMAND TO HBR SERVER RUNNING WITHIN THE EAS
Cheers,
Mehmet -
GetUserRoles in viewobject throws null pointer exception
Hello,
I've set up security for our jsf-adf-bc4j application.
I now want to get the user role in our viewobject.
I use the following code :
SessionImpl session = (SessionImpl) this.getDBTransaction().getSession();
String[] roles = session.getUserRoles();
for (String role : roles){
System.out.println(role);
This throws a null pointer exception at the"System.out.println(role);" line .
The user has a role (I can read the role in the viewcontroller project)
In the view object i can also get the session.getUserPrincipalName(). This works fine.
Can anybody help me with this problem ?You define a local ArrayList here:public MonthlySchedule()
ArrayList<Request> monthlyschedule= new ArrayList<Request>() ;
}Just instanciate the instance variable. -
1 to 1 Mapping using Indirection is causing a StackOverflowError exception
I am trying to map a database column that contains a BLOB (i.e. PDF) to a persistent object's attribute that will contain the BLOB as a "1 to 1 mapping" utilizing "Indirection".
The type of the persistent object's attribute is ValueHolderInterface and it is initialized as ValueHolder in the object's constructor.
The column that contains the BLOB is not a primary key therefore in the "Table Reference" tab of the TopLink Workbench I use the database table's primary key for the "Source Field" and "Target Field".
The mapping seems find until I test the code. When the code is executed a java.lang.StackOverflowError exception is thrown in the following method ServerSession(DatabaseSession).initializeDescriptors(Hashtable).
In this scenario I am using "indirection" for obvious reasons. I want to have the ability to retrieve all the data in the row(s) except the PDF(s) so I can build a list for the user to choose from. If the user makes a selection I want to then go and retrieve the PDF via the persistent object's get/set methods that utilize the ValueHolder's interface methods getValue/setValue.
Does anyone have any idea why this exception is being thrown and anyway to fix it? ANY help would be greatly appreciated. I included the stack trace below.
The IDE our company is using at the moment is IBM's VisualAge for Java 4.0....don't ask.
Debugger Stack Trace Report:
Thread[P=359251:O=0:CT,5,main] (Alive)
Uncaught exception (java.lang.StackOverflowError)
ServerSession(DatabaseSession).initializeDescriptors(Hashtable)
this=(oracle.toplink.threetier.ServerSession) ServerSession(
DatabaseAccessor(connected)
OraclePlatform)
arg_1=(java.util.Hashtable) {class com.nwprov.provconnect.qss.domain.QssStatementTypes=Descriptor(com.nwprov.provconnect.qss.domain.QssStatementTypes --> [DatabaseTable(QSS_STATEMENT_TYPES)]), class com.nwprov.provconnect.qss.domain.QssTransactionTypes=Descriptor(com.nwprov.provconnect.qss.domain.QssTransactionTypes --> [DatabaseTable(QSS_TRANSACTION_TYPES)]), class com.nwprov.provconnect.qss.domain.QssTransactions=Descriptor(com.nwprov.provconnect.qss.domain.QssTransactions --> [DatabaseTable(QSS_TRANSACTIONS)]), class com.nwprov.provconnect.qss.domain.QssPolicyStatements=Descriptor(com.nwprov.provconnect.qss.domain.QssPolicyStatements --> [DatabaseTable(QSS_POLICY_STATEMENTS)]), class com.nwprov.provconnect.qss.domain.QssSubaccountPerformance=Descriptor(com.nwprov.provconnect.qss.domain.QssSubaccountPerformance --> [DatabaseTable(QSS_SUBACCOUNT_PERFORMANCE)])}
ServerSession(DatabaseSession).initializeDescriptors()
this=(oracle.toplink.threetier.ServerSession) ServerSession(
DatabaseAccessor(connected)
OraclePlatform)
ServerSession(DatabaseSession).login()
this=(oracle.toplink.threetier.ServerSession) ServerSession(
DatabaseAccessor(connected)
OraclePlatform)
SessionManager.getSession(XMLLoader, String, ClassLoader, boolean, boolean)
this=(oracle.toplink.tools.sessionmanagement.SessionManager) oracle.toplink.tools.sessionmanagement.SessionManager@5172
arg_1=(oracle.toplink.tools.sessionconfiguration.XMLLoader) oracle.toplink.tools.sessionconfiguration.XMLLoader@146c
arg_2=(java.lang.String) qss
arg_3=(java.lang.ClassLoader) sun.misc.Launcher$AppClassLoader@51e4
arg_4=(boolean) true
arg_5=(boolean) false
SessionManager.getSession(XMLLoader, String, ClassLoader)
this=(oracle.toplink.tools.sessionmanagement.SessionManager) oracle.toplink.tools.sessionmanagement.SessionManager@5172
arg_1=(oracle.toplink.tools.sessionconfiguration.XMLLoader) oracle.toplink.tools.sessionconfiguration.XMLLoader@146c
arg_2=(java.lang.String) qss
arg_3=(java.lang.ClassLoader) sun.misc.Launcher$AppClassLoader@51e4
SessionManager.getSession(String)
this=(oracle.toplink.tools.sessionmanagement.SessionManager) oracle.toplink.tools.sessionmanagement.SessionManager@5172
arg_1=(java.lang.String) qss
SessionSingleton.initializeSession(String)
this=(com.nwprov.toplink.SessionSingleton) com.nwprov.toplink.SessionSingleton@4e0
projectName=(java.lang.String) qss
SessionSingleton.getSession(String)
this=(com.nwprov.toplink.SessionSingleton) com.nwprov.toplink.SessionSingleton@4e0
projectName=(java.lang.String) qss
serverSession=(oracle.toplink.threetier.ServerSession) null
PerformancePdfRetriever(TopLinkPdfAccessor).queryForPdf(Expression)
this=(com.nwprov.provconnect.qss.statement.PerformancePdfRetriever) [email protected]
topLinkExpression=(oracle.toplink.expressions.Expression)
Logical operator AND
Logical operator AND
Relation operator =
Query Key legacyProductCode
Base QUERY OBJECT
Constant 00001
Relation operator =
Query Key statementPerformanceDate
Base QUERY OBJECT
Constant 2003-07-01
Relation operator =
Query Key legacyCoCode
Base QUERY OBJECT
Constant 01
PerformancePdfRetriever.getPdf(String, Date, String)
this=(com.nwprov.provconnect.qss.statement.PerformancePdfRetriever) [email protected]
legacyProdCode=(java.lang.String) 00001
stmntPrfmncDate=(java.sql.Date) 2003-07-01
legacyCoCode=(java.lang.String) 01
pdfTopLinkObject=(com.nwprov.provconnect.qss.domain.IPdf) com.nwprov.provconnect.qss.domain.QssSubaccountPerformance@28ea
expression=(oracle.toplink.expressions.Expression)
Logical operator AND
Logical operator AND
Relation operator =
Query Key legacyProductCode
Base QUERY OBJECT
Constant 00001
Relation operator =
Query Key statementPerformanceDate
Base QUERY OBJECT
Constant 2003-07-01
Relation operator =
Query Key legacyCoCode
Base QUERY OBJECT
Constant 01
Object.Doit()
retrievePerformancePdfHelper=(com.nwprov.provconnect.qss.statement.PerformancePdfRetriever) [email protected]
legacyProdCode=(java.lang.String) 00001
statementPerfDate=(java.sql.Date) 2003-07-01
legacyCoCode=(java.lang.String) 01Hello Don,
Let me preface by saying thanks for being a brave soul to assist with this.
Is there anything in the output leading up to the exception? No. There isn't any other output because the part of the code that I am unit testing just performs the function of retrieving the BLOB (i.e. PDF) from the database. I used hard coded values for the multi-value primary key in the driver.
Is there some sort of obvious recursive query going on? No, not from what I can tell.
Stack overflows usually result from bi-directional relationships where caching is turned off. If this is the case, use a Weak cache.This is not a bi-directinal relationship so let me provide you with details that lead up to the stack overflow.
Details:
- An expression is built using the hard coded values for the primary key:
Expression exp1 = builder.get(LEGACY_PRODUCT_CODE).equal(legacyProdCode);
Expression exp2 = builder.get(STATEMENT_PERFORMANCE_DATE).equal(stmntPrfmncDate);
Expression exp3 = builder.get(LEGACY_CO_CODE).equal(legacyCoCode);
Expression finalExp = exp1.and(exp2);
finalExpression = finalExpression.and(exp3);
- Expression is being executed:
Session session = SessionSingleton.getInstance().getSession(SESSION_NAME);
Collection pdfTopLinkObjects = new Vector();
pdfTopLinkObjects = session.readAllObjects(queryObject.getClass(), topLinkExpression);
- Returned Collection is investigated & utilized for values using Iterator
BTW, in my first post there was an error. Here is the correction:
The column that contains the BLOB is not a primary key therefore in the "Table Reference" tab of the TopLink Workbench I tried both os these situations:
1. Used the database table's primary key for the "Source Field" and "Target Field".
2. Used the database table's column that stores the BLOB (i.e. PDF) for the "Source Field" and "Target Field".
Am I using the write type of mapping for this? As stated before I am currently using "one to one with Indirection" or should I be using something else.
Dan, is this enough info to help diagnose the problem? I hope so :-( -
Class cast exception in jsp plz help
i have written a jsp where i displayed a text box with value given by user inside it
when the user enters some other value in text box and clicks on update button then i forwarded reqeust to servlet which will some data base work
servlet will forward again to the same jsp with the new value in text box.
but i am getting CLASS CAST EXCEPTION when servlet is forwarding reqeust to same JSP
help me what to do ........
thanking you in advance ..cheersdisplay cart.jsp file:
<%@ page import="java.util.*,org.*" %>
<html>
<body>
<%
Vector cartupdate = (Vector)session.getAttribute("cartlist");
for (int i = 0; i < cartupdate.size(); i++) {
CartListBean clb = (CartListBean)cartupdate.elementAt(i);
%>
<form name="itemslist<%=i%>" action="updateCart" method="post">
<input type="hidden" name="itemcode" value="<%=clb.getItemCode()%>">
<input type="hidden" name="itemname" value="<%= clb.getItemName()%>">
<input type="hidden" name="price" value="<%= clb.getPrice()%>">
<%= clb.getItemName() %>
<input type="text" name="qty" value="<%=clb.getQuantity()%>">
<input type="submit" name="<%=clb.getItemCode()%>" value="update">
</form>
<br>
<%
%>
<form name="tobuy" action="buysrv" method="post">
<input type="submit" name="buy" value="BUY">
</form>
</body>
</html>
updatecart servlet code:
import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
import org.*;
import java.sql.*;
import java.util.*;
public class UpdateCart extends HttpServlet
public void service(HttpServletRequest request,HttpServletResponse response) throws IOException,ServletException
HttpSession session=request.getSession(false);
Vector cartupdate = (Vector)session.getAttribute("cartlist");
for (int i = 0; i < cartupdate.size(); i++) {
org.CartListBean cart = (org.CartListBean)cartupdate.elementAt(i);
if((cart.getItemCode()).equals(request.getParameter("itemcode")))
org.CartListBean clb=new org.CartListBean();
clb.setItemCode(request.getParameter("itemcode"));
clb.setQuantity(request.getParameter("qty"));
clb.setItemName(request.getParameter("itemname"));
clb.setPrice(request.getParameter("price"));
cartupdate.setElementAt(clb,i);
session.setAttribute("cartlist",cart);
ServletContext application=getServletContext();
System.out.println("got finished");
RequestDispatcher rd=application.getRequestDispatcher("/displaycart.jsp");
rd.forward(request,response);
Message was edited by:
143java -
Exception while excel processing after upload using commons file upload
Hi all,
I am experiencing problem while creating a workbook after getting the input stream from the uploaded file. its not going catch block instead it is going to finally and giving null pointer exeption in finally as one variable in finally is not defined. the variable is defined in try as well as catch but during run time the variable is not getting assigned any value also. I'll put the code over here. please help me with a solution
import org.w3c.dom.* ;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import jxl.*;
import org.apache.commons.fileupload.*;
import org.apache.commons.fileupload.disk.*;
import org.apache.commons.fileupload.servlet.*;
import org.apache.poi.poifs.filesystem.POIFSFileSystem;
import org.apache.poi.hssf.usermodel.HSSFCell;
import org.apache.poi.hssf.usermodel.HSSFSheet;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.hssf.usermodel.HSSFRow;
public class CescoreUploadServlet extends baseHttpServlet
private DataSource cesDS = null;
public void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {
doPost(req, res);
public void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {
String targetPage = null;
File f = null;
System.out.println("Upload Controller");
HttpSession session = req.getSession(true);
try
if(cesDS == null){
cesDS = new JNDIDataSource(getServletContext().getInitParameter(Constants.DATA_SOURCE_NAME));
CesRepository cRep = new CesRepository(cesDS);
if (session.getAttribute("DataContainerInfo") == null) {
System.out.println("Initializing DataContainerInfo");
DataContainer DataContainer = new DataContainer();
cRep.setInitialParameters(DataContainer);
session.setAttribute("DataContainerInfo",DataContainer);
else System.out.println("DataContainerInfo is available");
UserInfo userInfo = null;
String login_id = req.getRemoteUser();
if(session.getAttribute("UserID") != null) login_id = (String)session.getAttribute("UserID");
if(session.getAttribute("userProfile") == null ) session.setAttribute("userProfile", cRep.getUserInfo(login_id));
userInfo = (UserInfo)session.getAttribute("userProfile");
System.out.println("<<<<<< userInfo contains : "+userInfo.getHrID()+" >>>>>>");
String projIdValue = null;
String msg = null;
boolean isMultipart = FileUpload.isMultipartContent(req);
if(isMultipart){
System.out.println("is MultiPart");
DiskFileUpload upload = new DiskFileUpload();
List fileList = upload.parseRequest(req);
InputStream uploadedFileStream = null;
String uploadedFileName = null;
ArrayList impArray = new ArrayList();
Iterator iter = fileList.iterator();
while (iter.hasNext()) {
System.out.println("inside while");
FileItem item = (FileItem) iter.next();
if (!item.isFormField()) {
System.out.println("item is not form field");
if (item.getSize() < 1)
throw new Exception("No file was uploaded");
else
uploadedFileName = item.getName();
System.out.println("uploaded file name "+uploadedFileName);
System.out.println("uploaded file size is "+item.getSize());
uploadedFileStream = item.getInputStream();
System.out.println("uploaded input stream available size is "+uploadedFileStream.available());
else
System.out.println("item is form field");
String key = item.getFieldName();
String value = item.getString();
System.out.println("key is"+key);
System.out.println("value is"+value);
if(key.equals("projectId2")){
projIdValue = value;
System.out.println("outside while");
POIFSFileSystem fs = new POIFSFileSystem(uploadedFileStream);
System.out.println("got POIFSFileSystem");//this is been printed in logs
HSSFWorkbook wb = new HSSFWorkbook(fs);//it is breaking over here
System.out.println("got HSSFWorkbook");//this is not been printed in logs
HSSFSheet sheet = wb.getSheetAt(0);
System.out.println("got HSSFSheet");
Iterator rows = sheet.rowIterator();
if(rows.hasNext()){
while( rows.hasNext() ) {
System.out.println("rows iteration");
HSSFRow row = (HSSFRow) rows.next();
Iterator cells = row.cellIterator();
while( cells.hasNext() ) {
System.out.println("cell iteration");
HSSFCell cell = (HSSFCell) cells.next();
HashMap hm = new HashMap();//if everything is fine i'll use this hashmap to store values
System.out.println("CES UPLOAD.SERVLET. After adding");
msg = "Attendees have been added successfully";
req.setAttribute("msgText", msg);
targetPage = "/ces_disp.jsp";
else
throw new Exception("The Excel Sheet Uploaded has no entries. Please check and try again");
else{
throw new Exception("The Form is not Multipart");
catch (Exception e)
System.out.println("CES UPLOAD.SERVLET.EXCEPTION ::: Exception");
targetPage = "/ces_disp.jsp";
if(e != null) req.setAttribute("msgText", e.getMessage());
else req.setAttribute(Constants.EXCEPTION_ATTR_NAME, new Exception("Unknown Exception"));
e.printStackTrace();
finally{
System.out.println("CES UPLOAD.SERVLET. ::: Finally");
ServletContext stx = getServletConfig().getServletContext();
RequestDispatcher dispatcher = sCx.getRequestDispatcher(targetPage);
dispatcher.forward(req, res);
Message was edited by: Noufal
Noufal_k
Message was edited by:
Noufal_kimport org.w3c.dom.* ;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import jxl.*;
import org.apache.commons.fileupload.*;
import org.apache.commons.fileupload.disk.*;
import org.apache.commons.fileupload.servlet.*;
import org.apache.poi.poifs.filesystem.POIFSFileSystem;
import org.apache.poi.hssf.usermodel.HSSFCell;
import org.apache.poi.hssf.usermodel.HSSFSheet;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.hssf.usermodel.HSSFRow;
public class CescoreUploadServlet extends baseHttpServlet
private DataSource cesDS = null;
public void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {
doPost(req, res);
public void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {
//including only relevant code
String targetPage = null;
System.out.println("Upload Controller");
HttpSession session = req.getSession(true);
try
String projIdValue = null;
String msg = null;
boolean isMultipart = FileUpload.isMultipartContent(req);
if(isMultipart){
System.out.println("is MultiPart");
DiskFileUpload upload = new DiskFileUpload();
List fileList = upload.parseRequest(req);
InputStream uploadedFileStream = null;
String uploadedFileName = null;
Iterator iter = fileList.iterator();
while (iter.hasNext()) {
System.out.println("inside while");
FileItem item = (FileItem) iter.next();
if (!item.isFormField()) {
System.out.println("item is not form field");
if (item.getSize() < 1)
throw new Exception("No file was uploaded");
else
uploadedFileName = item.getName();
System.out.println("uploaded file name "+uploadedFileName);//printing c:/excelsheets/fileToUpload.xls
System.out.println("uploaded file size is "+item.getSize());//printing size is 15872
uploadedFileStream = item.getInputStream();
System.out.println("uploaded input stream available size is "+uploadedFileStream.available());//printing available input stream size is 15872
else
System.out.println("item is form field");
String key = item.getFieldName();
String value = item.getString();
System.out.println("key is"+key);
System.out.println("value is"+value);
if(key.equals("projectId2")){
projIdValue = value;
System.out.println("outside while");
POIFSFileSystem fs = new POIFSFileSystem(uploadedFileStream);
System.out.println("got POIFSFileSystem");//this is been printed in logs
HSSFWorkbook wb = new HSSFWorkbook(fs);//it is breaking over here
System.out.println("got HSSFWorkbook");//this is not been printed in logs
HSSFSheet sheet = wb.getSheetAt(0);
System.out.println("got HSSFSheet");
Iterator rows = sheet.rowIterator();
if(rows.hasNext()){
while( rows.hasNext() ) {
System.out.println("rows iteration");
HSSFRow row = (HSSFRow) rows.next();
Iterator cells = row.cellIterator();
while( cells.hasNext() ) {
System.out.println("cell iteration");
HSSFCell cell = (HSSFCell) cells.next();
HashMap hm = new HashMap();//if everything is fine i'll use this hashmap to store values
System.out.println("CES UPLOAD.SERVLET. After adding");
msg = "Attendees have been added successfully";
req.setAttribute("msgText", msg);
targetPage = "/ces_disp.jsp";
else
throw new Exception("The Excel Sheet Uploaded has no entries. Please check and try again");
else{
throw new Exception("The Form is not Multipart");
catch (Exception e)
System.out.println("CES UPLOAD.SERVLET.EXCEPTION ::: Exception");
targetPage = "/ces_disp.jsp";
if(e != null) req.setAttribute("msgText", e.getMessage());
else req.setAttribute(Constants.EXCEPTION_ATTR_NAME, new Exception("Unknown Exception"));
e.printStackTrace();
finally{
System.out.println("CES UPLOAD.SERVLET. ::: Finally");
ServletContext stx = getServletConfig().getServletContext();
RequestDispatcher dispatcher = stx.getRequestDispatcher(targetPage);//throwing null pointer exception for this line
dispatcher.forward(req, res);
} -
It takes long time to invoke the Exception handler code
In our setup there is firewall between the Appserver that is using toplink and the database.The firewall terminates idle connection on any port if the connection is idle for 1 hr.So i have implemented an exception handler to reconnect when the connection is broken.The code works fine but It takes 15 mins for the exception handler code to be invoked.
The database is Oracle and the driver is thin driver,OS is solaris.No external connection pool
I had registered the exceptionhandler to the serversession,should i register it with each ClientSession?yes ,15 mins is the time taken before the server session's exception handler code is invoked.
The following is the exception handler code on the sever session.Any thing wrong?
server.setExceptionHandler(new ExceptionHandler()
public Object handleException(RuntimeException ex)
{//This method is executed only after 15 min ,if the connection is broken
String mess=ex.getMessage();
System.out.println("In handler excep mess is "+mess);
if ((ex instanceof DatabaseException) && (mess.equals("connection reset by peer.")||(mess.indexOf("IOException :Broken pipe")!=-1)))
DatabaseException dbex = (DatabaseException) ex;
dbex.getAccessor().reestablishConnection (dbex.getSession());
return dbex.getSession().executeQuery(dbex.getQuery());
return null;
What could be wrong ?
I tried Oracle's connection cache Impl created a connection pool using the same thin driver and on the same env.SQLException is thrown immediately on using the broken connection.so I feel the driver is not causing any problem.
Is there any way in toplink to keep the connections active?or Is there any way to poll all connections in the connection pool and check If they are connected instead of waiting until the exception gets thrown and handle it? -
EXCEPTION [TOPLINK-7056] The wrong object was registered into the UnitOfWor
Hello,
I am using Toplink 9.0.3.4. I have a one to many relationship defined. One DTOStep can have several DTOStepTexte. The XML descriptions for the relationship are:
DTOStep:
<database-mapping>
<attribute-name>texteList</attribute-name>
<read-only>false</read-only>
<reference-class>com.bnpparibas.bfi.ttk.dto.DTOStepTexte</reference-class>
<is-private-owned>true</is-private-owned>
<uses-batch-reading>true</uses-batch-reading>
<indirection-policy>
<mapping-indirection-policy>
<type>oracle.toplink.internal.indirection.NoIndirectionPolicy</type>
</mapping-indirection-policy>
</indirection-policy>
<container-policy>
<mapping-container-policy>
<container-class>java.util.ArrayList</container-class>
<type>oracle.toplink.internal.queryframework.ListContainerPolicy</type>
</mapping-container-policy>
</container-policy>
<ascending-order-by-query-key>noSeq</ascending-order-by-query-key>
<source-key-fields>
<field>BATCH_SP2.ID_BATCH</field>
</source-key-fields>
<target-foreign-key-fields>
<field>BATCH_SP2_TEXTE.ID_BATCH</field>
</target-foreign-key-fields>
<type>oracle.toplink.mappings.OneToManyMapping</type>
</database-mapping>
DTOStepTexte:
<database-mapping>
<attribute-name>step</attribute-name>
<read-only>false</read-only>
<reference-class>com.bnpparibas.bfi.ttk.dto.DTOStep</reference-class>
<is-private-owned>true</is-private-owned>
<uses-batch-reading>true</uses-batch-reading>
<indirection-policy>
<mapping-indirection-policy>
<type>oracle.toplink.internal.indirection.NoIndirectionPolicy</type>
</mapping-indirection-policy>
</indirection-policy>
<uses-joining>true</uses-joining>
<foreign-key-fields>
<field>BATCH_SP2_TEXTE.ID_BATCH</field>
</foreign-key-fields>
<source-to-target-key-field-associations>
<association>
<association-key>BATCH_SP2_TEXTE.ID_BATCH</association-key>
<association-value>BATCH_SP2.ID_BATCH</association-value>
</association>
</source-to-target-key-field-associations>
<type>oracle.toplink.mappings.OneToOneMapping</type>
</database-mapping>
I do the following:
- A DTOStep containing 4 DTOStepTexte is read from the Oracle database in a session bean and sent to a swing client.
- The DTOStep is modified on the client.
- The modified DTOStep is sent back to the session bean where the following code is executed:
public DTOStep modifyStep(DTOStep step) throws TTKDataNotFoundException
Session session = null;
try
// Récupération de la session.
session = getSession();
// Récupération de l'unité de travail.
UnitOfWork uow = session.getActiveUnitOfWork();
uow.performFullValidation();
// Vérification que le step existe. Lecture sur clé primaire.
if (!session.doesObjectExist(step))
throw new TTKDataNotFoundException();
// Registration du step à modifier en incorporant les modifs utilisateur.
m_logger.debug("step = " + FmkCommonUtilities.toStringFromGetters(step));
DTOStep stepClone = (DTOStep) uow.mergeCloneWithReferences(step);
m_logger.debug("stepClone = " + FmkCommonUtilities.toStringFromGetters(stepClone));
// Mise à jour des champs techniques.
Date date = new Date(System.currentTimeMillis());
stepClone.setCUtiMaj(getCUti());
stepClone.setDMaj(date);
// Renvoi du step tel que dans la base.
// Une copie en est faite puisque le clone ne doit pas être
// utilisé en dehors de la transaction.
DTOUtilities.setFromGetters(stepClone, step);
return step;
catch (TTKDataNotFoundException e)
context.setRollbackOnly();
throw e;
catch (EJBException e)
context.setRollbackOnly();
throw e;
catch (Throwable t)
context.setRollbackOnly();
m_logger.error("Error in " + FmkCommonUtilities.getCurrentMethodName(), t);
throw new EJBException(t.toString());
finally
// On libère la session.
if (session != null)
session.release();
I have the folowing behaviour:
- if the list of DTOStepTexte is not modified, everything is ok.
- if a new DTOStepTexte is added, everything is ok.
- if a DTOStepTexte is removed, I have the following exception on the mergeCloneWithReferences() call:
EXCEPTION [TOPLINK-7056] (TopLink - 9.0.3.4 (Build 432)): oracle.toplink.exceptions.ValidationException
EXCEPTION DESCRIPTION: The wrong object was registered into the UnitOfWork. The object [com.bnpparibas.bfi.ttk.dto.DTOStep@1a772d] should be the object from the parent cache [com.bnpparibas.bfi.ttk.dto.DTOStep@2cfd62].
at oracle.toplink.exceptions.ValidationException.wrongObjectRegistered(Unknown Source)
at oracle.toplink.publicinterface.UnitOfWork.checkExistence(Unknown Source)
at oracle.toplink.publicinterface.UnitOfWork.internalRegisterObject(Unknown Source)
at oracle.toplink.internal.sessions.MergeManager.getTargetVersionOfSourceObject(Unknown Source)
at oracle.toplink.mappings.ObjectReferenceMapping.mergeIntoObject(Unknown Source)
at oracle.toplink.internal.descriptors.ObjectBuilder.mergeIntoObject(Unknown Source)
at oracle.toplink.internal.sessions.MergeManager.mergeChangesOfCloneIntoWorkingCopy(Unknown Source)
at oracle.toplink.internal.sessions.MergeManager.mergeChanges(Unknown Source)
at oracle.toplink.mappings.CollectionMapping.mergeIntoObject(Unknown Source)
at oracle.toplink.internal.descriptors.ObjectBuilder.mergeIntoObject(Unknown Source)
at oracle.toplink.internal.sessions.MergeManager.mergeChangesOfCloneIntoWorkingCopy(Unknown Source)
at oracle.toplink.internal.sessions.MergeManager.mergeChanges(Unknown Source)
at oracle.toplink.publicinterface.UnitOfWork.mergeCloneWithReferences(Unknown Source)
at com.bnpparibas.bfi.ttk.server.ejb.TestToplinkServiceBean.modifyStep(TestToplinkServiceBean.java:795)
at TestToplinkService_StatelessSessionBeanWrapper2.modifyStep(TestToplinkService_StatelessSessionBeanWrapper2.java:2032)
at java.lang.reflect.Method.invoke(Native Method)
at com.evermind.server.rmi.RMICallHandler.run(RMICallHandler.java:119)
at com.evermind.server.rmi.RMICallHandler.run(RMICallHandler.java:48)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
at java.lang.Thread.run(Thread.java:479)
Can someone please tell me what is wrong in the way I use toplink ?
Thank you in advance for your answer.
Best regards.
Pierre LarocheWhat does the method DTOUtilities.setFromGetters(stepClone, step); do? If you are copying from step into stepClone you must ensure that all of the references from step are registered first. You should not need to perform this copy anyway as the mergeCloneWithReferences would have copied the data from step.
--Gordon
Maybe you are looking for
-
VSR in automatic PO creation ME59
We have set up a lot of VSR (Vendor Sub Ranges) for a certain vendor. This vendor functions as a Procurement Service Provider. The purpose is that he gets a PO per VSR. Conditions, vendor master data and so on is all the same for all VSRs. In a contr
-
Ok here is my problem, the drive got corrupted (my fault, the drive was getting scanned and it lost power) now i hade hopes of restoring it, but that fell through (nothing important was on it) so now i try to format the drive and i get an input and o
-
I am importing all of my music from my hard drive over into iTunes. I notice that it sorts it by artist, then by album, but then my track number. Is there any way to change it to where it sorts like the following: artist, album, song (in alphebetical
-
3 Bugs in LR3 that need to be fixed.
1. Ratings do not carry over to modified .tiffs from Photoshop. After sending a file to Photoshop to be edited, saved, and the resulting .tiff automatically added to LR3, the rating does not carry over to the new tiff from the original file. 2. Fi
-
How do I get my camera to work?
When I open the camera app it shows a closed shutter. When I use a third party app the front facing camera works but not the rear facing camers