Calling a webservices method, paramaters are not pass correctly - weblogic.developer.interest.examples(Archived)

Hi, I would like a Eclipse's MedRec tutorial...All project build, compil, deploy correctly.
When I invoke the "public PatientWS findPatientBySsn(String pId): ---> parameter "888888888" " Webservice's method from the WBL8.1 amin console, all is working correctly: it response me Patient[Id: 105 |...
But the same thing, call from the PhysicianWebApp, the webservices paramter invocation is NULL? I don't understan why!
standalone trace fromm admin console:
**********************************************************15:17:57,102 MedRecWebServicesEJB INFO executeThread:
'14' for queue
: 'weblogic.kernel.Default' - Finding patient by ssn.
03/01/2006 15:17:57,112 MedRecWebServicesEJB DEBUG ExecuteThread: '14' for queue
: 'weblogic.kernel.Default' - SSN: 888888888
**********************************************************
paramater invocation trace from PhysicianWebApp
**********************************************************
03/01/2006 15:23:02,040 MedRecWebServicesEJB DEBUG ExecuteThread: '14' for queue
: 'weblogic.kernel.Default' - <b>SSN: null</b>
03/01/2006 15:23:02,040 PatientSessionEJB DEBUG ExecuteThread: '14' for queue: '
weblogic.kernel.Default' - SSN: null
**********************************************************
Thank                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            

I find the solution, it was webServicesEjb_client.jar file problem. I use in the physicianEar.ear the jar providing from the tutorial!
When I generate my own webServicesEjb_client.jar and place it in the ear, it's all right!
For generate this librairie look at:
-->Tutorial 12-Procedure 1-step3
Personnal I add to my ant build.xml script:
<target name="build.ws.client">
     <clientgen
     wsdl="http://localhost:7101/ws_medrec/MedRecWebServices?WSDL"
     packageName="com.bea.medrec.webservices"
     keepGenerated="true"
               clientjar="./deploy/webServicesEjb_client.jar" />
     </target>
Thank a lot Stef-âne

Related

ALSB 3.0 + WS Security + ALDSP 3.0 = java.lang.SecurityException

I've spent a couple days trying to solve this problem without success, so I appreciate any help...
Architecture:
[Security-enabled proxy service] --> [business service] --(T3 dsp transport)--> [ALDSP data service]
Problem:
I got a erro when it calls data service throw T3 protocol.
<ALDSP.DSPTransport> <MyMachine> <MyServer> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<anonymous>> <> <> <1221610407703> <BEA-000000> <[Security:090398]Invalid Subject: principals=[Myuser, MyGroup] 
Invalid Subject: principals=Myuser, MyGroupSounds like you need to enable domain trust between the two domains.
- Mike Reiche 
Thanks Mike!
It was helpfull, but I checked on documentation and WLS cross-domain security feature does not work in the following situations:
* WLI domain
* With ALSB, when ALSB is configured to use the SB and DSP transports.
* ALDSP domain
I solved this problem by enabling Global Trust between WLS domains, now It's working well.
Thanks!

automatic key generation problem using weblogic 10 and oracle

I'm jumping straight off the deep end into weblogic 10 converting some old cmp stuff from 6.1, and I've encountered a problem using what appears to be supported syntax of automatic key generation.
From my weblogic-cmp-rdbms-jar.xml:
<automatic-key-generation>
<generator-type>ORACLE</generator-type>
<generator-name>SQ_OPERATOR_ID</generator-name>
<key-cache-size>1</key-cache-size>
</automatic-key-generation>
My ear appears to deploy fine, but when I attempt to look at my deployed ejb's from the console, I get the following in my log:
####<Jul 5, 2007 2:09:03 PM PDT> <Error> <Console> <dev7> <OnAirServer> <[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'> <system> <> <> <1183669743673> <BEA-240003> <Console encountered the following error javax.enterprise.deploy.spi.exceptions.ConfigurationException: [J2EE Deployment SPI:260106]Failed to parse descriptor at 'META-INF/weblogic-cmp-rdbms-jar.xml' for module 'groundEJB': java.lang.IllegalArgumentException: ORACLE is not a legal value for GeneratorType. The value must be one of the following: [Identity, Sequence, SequenceTable]
at weblogic.deploy.api.spi.config.BasicDConfigBeanRoot.getDConfigBean(BasicDConfigBeanRoot.java:192)
at weblogic.deploy.api.spi.config.DeploymentConfigurationImpl.addSecondaryModule(DeploymentConfigurationImpl.java:1036)
at weblogic.deploy.api.spi.config.DeploymentConfigurationImpl.collectSecondaryEjbConfig(DeploymentConfigurationImpl.java:1178)
The documentation on the subject (http://e-docs.bea.com/wls/docs100/ejb/DDreference-cmp-jar.html#wp1203428)
doesn't seem (to me) to indicate that I'm doing it incorrectly. Hopefully someone here has some helpful insight and can tell me what I'm doing wrong. Anyone?
Thanks much - 
I think the weblogic documentation is wrong here.
I had similar problem while using sql server. At first i gave <generator-type>SQL-SERVER</generator-type> as per documentation . then i got similar sort of error.
I rectified it by giving <generator-type>Identity</generator-type>.
Then it worked fine for me.
Like wise try this, <generator-type>Sequence</generator-type>
Ithink this should work for u.
vivek
I'm jumping straight off the deep end into weblogic
10 converting some old cmp stuff from 6.1, and I've
encountered a problem using what appears to be
supported syntax of automatic key generation.
From my weblogic-cmp-rdbms-jar.xml:
<automatic-key-generation>
<generator-type>ORACLE</generator-type>
<generator-name>SQ_OPERATOR_ID</generator-name>
<key-cache-size>1</key-cache-size>
</automatic-key-generation>
My ear appears to deploy fine, but when I attempt to
look at my deployed ejb's from the console, I get the
following in my log:
####<Jul 5, 2007 2:09:03 PM PDT> <Error> <Console>
<dev7> <OnAirServer>
<[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'>
<system> <> <> <1183669743673> <BEA-240003> <Console
encountered the following error
javax.enterprise.deploy.spi.exceptions.ConfigurationEx
ception: [J2EE Deployment SPI:260106]Failed to parse
descriptor at 'META-INF/weblogic-cmp-rdbms-jar.xml'
for module 'groundEJB':
java.lang.IllegalArgumentException: ORACLE is not a
legal value for GeneratorType. The value must be one
of the following: [Identity, Sequence,
SequenceTable]
at
at
at
at
weblogic.deploy.api.spi.config.BasicDConfigBeanRoot.ge
tDConfigBean(BasicDConfigBeanRoot.java:192)
at
at
at
at
weblogic.deploy.api.spi.config.DeploymentConfiguration
Impl.addSecondaryModule(DeploymentConfigurationImpl.ja
va:1036)
at
at
at
at
weblogic.deploy.api.spi.config.DeploymentConfiguration
Impl.collectSecondaryEjbConfig(DeploymentConfiguration
Impl.java:1178)
The documentation on the subject
(http://e-docs.bea.com/wls/docs100/ejb/DDreference-cmp
-jar.html#wp1203428)
doesn't seem (to me) to indicate that I'm doing it
t incorrectly. Hopefully someone here has some
helpful insight and can tell me what I'm doing wrong.
Anyone?
Thanks much -

Stuck execute thread

Hi All
I am getting a lot of stuck thread errors. I want to know what are the possible reason behind it and what are the alternatives. I think, I know one of the main reason is application is not tuned properly.
<Oct 26, 2009 6:23:56 PM CDT> <Error> <WebLogicServer> <BEA-000337> <[STUCK] ExecuteThread: '133' for queue: 'weblogic.kernel.Default (self-tuning)' has been busy for "717" seconds working on the request "Http Request: /lhs/acs/rs/route/gohere", which is more than the configured time (StuckThreadMaxTime) of "600" seconds. Stack trace:
Thread-41174 "[STUCK] ExecuteThread: '133' for queue: 'weblogic.kernel.Default (self-tuning)'" <alive, in native, suspended, waiting, priority=1, DAEMON> {
-- Waiting for notification on: weblogic.jdbc.common.internal.ConnectionPool#ad852a2[fat lock]
java.lang.Object.wait(Object.java:???)
weblogic.common.resourcepool.ResourcePoolImpl.reserveResourceInternal(ResourcePoolImpl.java:317)
weblogic.common.resourcepool.ResourcePoolImpl.reserveResource(ResourcePoolImpl.java:291)
weblogic.jdbc.common.internal.ConnectionPool.reserve(ConnectionPool.java:363)
weblogic.jdbc.common.internal.ConnectionPool.reserve(ConnectionPool.java:357)
weblogic.jdbc.common.internal.ConnectionPoolManager.reserve(ConnectionPoolManager.java:75)
weblogic.jdbc.jts.Driver.newConnection(Driver.java:864)
weblogic.jdbc.jts.Driver.createLocalConnection(Driver.java:323)
weblogic.jdbc.jts.Driver.connect(Driver.java:113)
bla bla bla
java.lang.reflect.Method.invoke(Method.java:570)
weblogic.wsee.component.ejb.EjbComponent.invoke(EjbComponent.java:82)
weblogic.wsee.ws.dispatch.server.ComponentHandler.handleRequest(ComponentHandler.java:43)
weblogic.wsee.handler.HandlerIterator.handleRequest(HandlerIterator.java:105)
weblogic.wsee.ws.dispatch.server.ServerDispatcher.dispatch(ServerDispatcher.java:54)
weblogic.wsee.ws.WsSkel.invoke(WsSkel.java:71)
weblogic.wsee.server.servlet.SoapProcessor.handlePost(SoapProcessor.java:54)
bla bla bla bla
weblogic.work.ExecuteThread.execute(ExecuteThread.java:206)
weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
}
Please Help me out with your valuable suggestions! 
Look like the execute thread is stuck getting connection from database. Can you please post full execute thread log?.
Thanks.
Vijay Bheemineni. 
Thanks Vijay
can you please tell me (in detail ) what you need. Because I am kindda new in this filed.. 
Hi,
We can get more info about execute threads by getting thread dumps. Below are few ways to get
1. From weblogic admin console. Servers --> Monitoring --> Performance --> Dump Thread.
2. On the unix box enter the command "kill -3 <pid>".
3. Using WLST
java weblogic.WLST
>connect('<adminUsername>','<adminPassword>','<t3://adminServerUrl:port>')
>threadDump('true','VASLog.txt','<ServerName>')
>exit()
4. Using welogic.Admin command tool
java weblogic.Admin -adminurl t3://<adminServer>:<port> -username <adminUsername> -password <adminPassword> THREAD_DUMP
Except for point 3, all the output is written to "<ManagedServerLog>.out" file.
Thanks.
Vijay Bheemineni. 
Thank you so much for the commands!!

Problem in running code from web service

All,
We are experiencing a problem while running a code from a web service. The code based on ecliselink. The same code works from JUnit. When running from webservice, we observed the the following warning
*0 WARN [[ACTIVE] ExecuteThread: '20' for queue: 'weblogic.kernel.Default (self-tuning)'] openjpa.Runtime - The configuration property named "openjpa.Id" was not recognized and will be ignored, although the name closely matches a valid property called "openjpa.Id".*
*0 INFO [[ACTIVE] ExecuteThread: '20' for queue: 'weblogic.kernel.Default (self-tuning)'] openjpa.Runtime - Starting BEA Kodo 4.2.0*
Does this mean it is picking kodo implementation? Our expectation is to use eclipselink implementation. What could this warning? Any pointers would be of great help.
Thanks, 
Sounds like it is using Kodo, is anything from EclipseLink logged?
Have you configured your JPA provider in your persistence.xml? If you have not, then you will just get the default.
---
James : http://ww.eclipselink.org

EclipseLink-Redeploying a DBWS WS on PL/SQL package after changing return

Issue concerning: EclipseLink 2.4.1 (DBWS) on WebLogic
Hi,
I've created a DBWS webservice based on a Oracle (10g) PL/SQL package, by using EclipseLink DBWS builder. The PL/SQL function exposed as a webservice call has a Object type return type, e.g.:
create or replace type eclipse_type as
object
(
num number
);
/
create or replace package test_eclipselink_pkg as
function test return eclipse_type;
end;
/
As I understand it, EclipseLink-DBWS translates this Oracle object type to an Java type when calling the PL/SQL function over JDBC and translates the Java object to XML to be encapsulated in a SOAP message.
The problem is that when changing the specification of the return type (e.g. changing the name of the field num to nmb in the Oracle type eclipse_type) of the Oracle PL/SQL function, regenerating the webservice (WAR-file) with DBWS builder and redeploying it on WebLogic 10.3.6, calling the webservice results in a java.lang.reflect.InvocationTargetException.
Restarting the WebLogic server (or the appropriate managed server) resolves the problem, what shouldn't be a problem in a development environment, but is not always possible in a production environment.
The problem seems to be that redeploying the webservice doesn't result in the XR Operations/Queries being recreated and as a result the old result type definition is used.
Has anybody a solution for this problem?
Kind regards,
Jan 
I'm not that familar with the setup you describe, but it sounds like when redeploying the service, the underlying EclipseLink sessions are not being logged out and then recreated with the new classloader. How are you obtaining the session?
Best Regards,
Chris 
Hi Chris,
Thanks for your response! In answer to your question "How are you obtaining the session?" the answer is: I don't know :-)
To clarify this: the tool DBWS Builder - delivered by the EclipseLink project - generates a WAR file which contains this hierarchy:
* WEB-INF folder
*** classes folder
****** dbws folder:
********* ProviderListener.class (which impelements ServletContextListener)
********* DBWSProvider.class (which implements Provider<SOAPMessage>)
****** META-INF folder:
********* eclipselink-dbws.xml (which lists the queries executed and the session file used)
********* eclipselink-dbws-or.xml (which lists the OR mappings and PL/SQL procedure or functions the queries are using)
********* eclipselink-dbws-ox.xml (which lists the OX mappings)
********* eclipselink-dbws-sessions.xml (which describes a session of type "server-session" with the server platform (WebLogic 10), the logging level the OX mapping file and the login type (Database - Platofrm Oracle 11) and a session of type "database-session" with the OX mapping file and a logging level)
*** wsdl folder: this contains the WSDL and the XSD file which describes the webservice
This all generated - by the DBWS Builder tool - based on a DBWS builderfile that only contains a Database, a datasource, a log level, a SOAP version and a list of PL/SQL procedures that should be wrapped into a webservice call.
So there's no user code involved for obtaining EclipseLink sessions. I believe that indeed that when redeploying the WAR-file, the underlying EclipseLink sessions are not being logged out, but I have no idea how to change this. All suggestions are welcome! I hope it doesn't mean losing the ability to generate the complete webservice "from a XML file" (the DBWS builder file), but we'll see about that later.
Kind regards,
Jan
Edited by: user5198974 on Aug 27, 2012 2:32 AM 
I was pointed to the DBWS code that looks up the sessions, and it should log out any existing sessions when the XRServiceFactory is initialized, but I don't know the flow or if something else isn't being statically held. If possible, I'd recommend modifying the sessoins.xml (eclipselink-dbws-sessions.xml?) to turn logging on to see if this is occuring or if something else is the problem. You might try deploying the service in a ear file and include the eclipselink.jar within the ear so it is used from the local classloader instead of the server classloader. This might workaround the issue if it is something behing held statically at the server level.
Either way, a bug should be filed so it can be looked into further.
Best Regards,
Chris 
Hi,
I checked the logging while redeploying the WAR file. This part of the output seems to indicate, as you suggested, that the EcliipseLink session is not correctly logged of (InstanceAlreadyExistsException):
*** <Info> <J2EE Deployment SPI> <BEA-260121> <Initiating redeploy operation for application, PLUS_WS [archive: P:\WS-I\eclipselink-2.4.0\runtime\eclipselink-2.4.1.v20120712-r11838\eclipselink\utils\dbws\output\PLUS_WS.war], to AdminServer .>
*** <Notice> <Stdout> <BEA-000000> <[EL Warning]: server: 2012-09-03 16:40:16.598--ServerSession(28419523)--Thread(Thread[[ACTIVE] ExecuteThread: '22' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--Problem while unregistering MBean: weblogic.management.NoAccessRuntimeException: Access not allowed for subject: principals=[], on ResourceType: Configuration Action: unregister, Target: null>
*** <Notice> <Stdout> <BEA-000000> <[EL Config]: connection: 2012-09-03
*** <Notice> <Stdout> <BEA-000000> <[EL Info]: connection: 2012-09-03 16:40:16.599--ServerSession(28419523)--Thread(Thread[[ACTIVE] ExecuteThread: '22' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--schapkaarten-dbws-or-session logout successful>
*** <Info> <Deployer> <BEA-149060> <Module PLUS_WS.war of application PLUS_WS successfully transitioned from STATE_PREPARED to STATE_NEW on server AdminServer.>
*** <Notice> <Stdout> <BEA-000000> <[EL Info]: connection: 2012-09-03 16:40:17.07--ServerSession(9455819)--Thread(Thread[[ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--schapkaarten-dbws-or-session login successful>
*** <Notice> <Stdout> <BEA-000000> <[EL Warning]: server: 2012-09-03 16:40:17.071--ServerSession(9455819)--Thread(Thread[[ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--Problem while registering MBean: javax.management.InstanceAlreadyExistsException: TopLink:Name=Development-schapkaarten-dbws-or-session,Type=Configuration>
*** <Notice> <Stdout> <BEA-000000> <[EL Warning]: server: 2012-09-03 16:40:17.071--ServerSession(9455819)--Thread(Thread[[ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--Problem while registering MBean: javax.management.InstanceAlreadyExistsException: TopLink:Name=Session(schapkaarten-dbws-or-session)>
What I cannot see, is: who is responsible for this logout? This must be clear so I know I have to log a bug for WebLogic or for EclipseLink.
Anyone a suggestion how to determine this?
Thanks,
Jan

Categories

Resources