|
| Passing in NULL to stored procedure on MS SQL 2005 |
 |
Wed, 23 Apr 2008 05:47:50 -070 |
We are using ALDSP 2.5 and are trying to invoke a stored procedure on a MS SQL
2005 database. This procedure has two optional parameters, but not sending these
optional parameters from ALDSP results in a nullpointer exception.
The procedure function in ALDSP looks like this:
declare function f1:NEW_SESSION($x1 as xsd:string, $x2 as xsd:integer, $x3 as
xsd:integer, $x4 as xsd:integer?, $x5 as xsd:string?, $x6 as xsd:dateTime) as
xsd:int external;
And we are invoking it from a logical function like this:
ns2:NEW_SESSION($Log/ns0:Session/ns0:sessionId,
$Log/ns0:Session/ns0:applicationId, $Log/ns0:Session/ns0:aId,
$Log/ns0:Session/ns0:bId, $Log/ns0:Session/ns0:cId,
$Log/ns0:Session/ns0:startingTime)
Calling the logical function without parameter 4 and 5 results in this
stacktrace in the workshop:
java.lang.NullPointerException: null
at
com.bea.ld.wrappers.procedure.ProcedureAdapter$CallableWrapper.executeQuery(Proc
edureAdapter.java:540)
at
com.bea.ld.wrappers.procedure.ProcedureIterator.getNextToken(ProcedureIterator.j
ava:207)
at
com.bea.ld.wrappers.procedure.ProcedureIterator.fetchNext(ProcedureIterator.java
:125)
at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:113)
at
weblogic.xml.query.runtime.compare.ComparisonIterator.fetchNext(ComparisonIterat
or.java:40)
at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:113)
at weblogic.xml.query.runtime.logic.BoolEffValue.exec(BoolEffValue.java:51)
at
weblogic.xml.query.runtime.logic.BoolEffValue.fetchNext(BoolEffValue.java:47)
at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:113)
at weblogic.xml.query.runtime.core.IfThenElse.fetchNext(IfThenElse.java:79)
at
weblogic.xml.query.iterators.GenericIterator.peekNext(GenericIterator.java:151)
at
weblogic.xml.query.runtime.typing.SeqTypeMatching.fetchNext(SeqTypeMatching.java
:147)
at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:113)
at
weblogic.xml.query.runtime.querycide.QueryAssassin.fetchNext(QueryAssassin.java:
54)
at
weblogic.xml.query.iterators.GenericIterator.peekNext(GenericIterator.java:151)
at
weblogic.xml.query.runtime.qname.InsertNamespaces.fetchNext(InsertNamespaces.jav
a:161)
at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:113)
at
weblogic.xml.query.runtime.core.QueryIterator.fetchNext(QueryIterator.java:127)
at
weblogic.xml.query.iterators.GenericIterator.hasNext(GenericIterator.java:134)
at weblogic.xml.query.xdbc.util.Serializer.serializeItems(Serializer.java:142)
at com.bea.ld.server.QueryInvocation.getResult(QueryInvocation.java:461)
at com.bea.ld.EJBRequestHandler.executeFunction(EJBRequestHandler.java:346)
at com.bea.ld.ServerBean.executeFunction(ServerBean.java:95)
at
com.bea.ld.Server_ydm4ie_EOImpl.executeFunction(Server_ydm4ie_EOImpl.java:1008)
at com.bea.ld.Server_ydm4ie_EOImpl_WLSkel.invoke(Unknown Source)
at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:491)
at
weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:120
)
at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:434)
at
weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.ja
va:363)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:147)
at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:429)
at
weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:35)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:224)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:183)
|
| Post Reply
|
|
|
|
|
|
|
|
|
|