Jeff Gaer

Ranch Hand
+ Follow
since Jun 04, 2001
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Jeff Gaer

I am attempting to deploy a soap webservice on wildfly 9.0.1-Final. I try to access the WebServletContext by resource injection but it is always null. I do have a beans.xml file in WEB-INF. Following is the class definition.

loadProperties is called from the contstructor.

The deployment always fails with the exception from the null test on the WebServletContext

Thank you in advance for any help
3 years ago
bumping the metro version to 2.2 and changing the scope to provided for all the metro artifacts seemed to fix that particular problem.
3 years ago
I am getting the following error trying to deploy a war file that contains a soap service on wildfly 9.0.1.
It looks like an incompatibility in the webservices implementation. I am using the glassfish version 2.1 implementation and the jars are included in my war file. Any pointers on where I should start to resolve this issue? The application deploys without error on tomcat 7.0.25

JBWS024109: Could not get WSDL contract for endpoint at /wsdls/wsc11/wstx-wscoor-1.1-wsdl-200702.wsdl"

Runtime environment

Java(TM) SE Runtime Environment (build 1.8.0_51-b16)
Java HotSpot(TM) Server VM (build 25.51-b03, mixed mode)

build environment
java version "1.7.0_67"


3 years ago
I apologize if I should ask this in the EJB or JBOSS forums, but it seemed to be a general @Resource questions. I am not sure I understand how the @Resource annotation works. I am running on java 1.7, JEE 6, and JBOSS AS 7.1.

The javax.annotation.Resources documentation indicates that the name parameter is the JNDI name of the resource. But lookups that fail using a JNDI name and thev@Resource annotation succeed when a JNDI context is obtained and used to look up the resource. For example in the code below I can successfully get a mail session if I comment out the @Resource annotation and uncomment the @PostConstruct annotation. In both cases the string I use for JNDI name is "mail/yahoo"

If I run the code as shown attempting to use the @Resource annotation jboss reports the following error:

JBAS014775: New missing/unsatisfied dependencies:
service (missing) dependents: [service jboss.deployment.subunit."EJB05EAR.ear"."CHAP05EJB.jar".component.StatusMailerBean.START]

The configuration entry in standalone.xml for the mail session is

<mail-session jndi-name="java:/mail/yahoo" from="">
<smtp-server ssl="true" outbound-socket-binding-ref="mail-smtp-yahoo">
<login name="jeff_gaer" password="xxxxxxxxxxx"/>

I have a similar problem with otherJNDI lookups. I haven't used the @Resource annotation outside of the context of the examples in the "Beginning EJB3" (apress publications),
4 years ago
I have a Junit Test case that is testing some client server code. I create a separate threads to emulate the client and the server and expect to see operations interspersed. However they seemed to run sequentially. Running with debug on in eclipse, it looks as so all the calls are stacked in the same (main) thread. I would have expected that after the new Thread(new myRunnabled()).run a new thread to appear in the debug window. Here's is the stack trace from the main thread and its evident that after the run() methid is called the runnable is executing in the main thread.

The following code executes

Thread thread=new Thread(new Runner());

The first few lines of runnaer are

class Runner implements Runnable{

public void run() {
boolean first=true;
try {

I would expect Runnner to be running in its own thread, but the stack trace indicates it is exectuing in the main thread line: 662 line: 78
MockISTest$ line: 140 line: 662
MockISTest.TestMockIS() line: 85

The full stack trace of the main thread follows.
Thread [main] (Suspended)
SocketInputStream.socketRead0(FileDescriptor, byte[], int, int, int) line: not available [native method][], int, int) line: 129 line: 182
AIResponse$Builder(AbstractMessageLite$Builder<BuilderType>).mergeDelimitedFrom(InputStream, ExtensionRegistryLite) line: 276
AIResponse$Builder(AbstractMessage$Builder<BuilderType>).mergeDelimitedFrom(InputStream, ExtensionRegistryLite) line: 705
AIResponse$Builder(AbstractMessageLite$Builder<BuilderType>).mergeDelimitedFrom(InputStream) line: 288
AIResponse$Builder(AbstractMessage$Builder<BuilderType>).mergeDelimitedFrom(InputStream) line: 697
AIResponse.parseDelimitedFrom(InputStream) line: 202
MockIS$ line: 87 line: 662 line: 78
MockISTest$ line: 140 line: 662
MockISTest.TestMockIS() line: 85
NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method]
NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39
DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25
Method.invoke(Object, Object...) line: 597
TestMethod.invoke(Object) line: 59
MethodRoadie.runTestMethod() line: 98
MethodRoadie$ line: 79
MethodRoadie.runBeforesThenTestThenAfters(Runnable) line: 87
MethodRoadie.runTest() line: 77 line: 42
JUnit4ClassRunner.invokeTestMethod(Method, RunNotifier) line: 88
JUnit4ClassRunner.runMethods(RunNotifier) line: 51
JUnit4ClassRunner$ line: 44
ClassRoadie.runUnprotected() line: 27
ClassRoadie.runProtected() line: 37 line: 42
JUnit4TestClassReference(JUnit4TestReference).run(TestExecution) line: 50[]) line: 38
RemoteTestRunner.runTests(String[], String, TestExecution) line: 467
RemoteTestRunner.runTests(TestExecution) line: 683 line: 390
RemoteTestRunner.main(String[]) line: 197
We had been using a flat schema directory and wsimport was working fine. I broke the schemas out into separate directories and created a catalog using systemSuffix entries to map the schemas to a new path relative to the catalog. I tested the catalog with Oxygen and Eclipse XML editor. Validation works fine, the tools correctly found the relocated schemas (tested using validate ). However when using wsimport I get a lot of errors similar to the following:

[ERROR] 'UnsupportedMessageFailure' is already defined
line 440 of file:/data/

[ERROR] (related to above error) the first definition appears here
line 436 of file:/data/

The second line number points to the start of the UnsupportedMessageFailure element and and the first line number points to the start of the following element. This is a consistent problem across many of the elements. The fact that errors reference the relocated schemas tell me the catalog is being interpreted. The catalog entries all looks as follows:

<systemSuffix systemIdSuffix="ServiceMessageTypes.xsd" uri="./foo/ServiceMessageTypes.xsd"/>

Schemas/wsdls all work fine with wsimport in a flat directory without catalogs Any help or pointers are appreciated.
6 years ago
Hi all,

I'm kind of a newbie to both maven and jboss. I have jboss 7.1.1 installed an running and am trying to follow the seam example instructions at I get lost on the following step,

Once you've set the location of JBoss AS and started the application server, you can build any example by typing mvn install in the example root directory. Any example is deployed by changing directory to *-ear or *-web directory in case of existence only *-web submodule. Type in that submodule mvn jboss-as:deploy. Any example that is packaged as an EAR deploys to a URL like /seam-example, where example is the name of the example folder, with one exception. If the example folder begins with seam, the prefix "seam" is ommitted. For instance, if JBoss AS is running on port 8080, the URL for the registration example is http://localhost:8080/seam-registration/, whereas the URL for the seamspace example is http://localhost:8080/seam-space/.

The mv install step completed without errors, but I don't see any directories created ending with war or ear .I am guessing there is a cd step missing somewhere. There was a war file under ./target and I tried

mvn jboss-as:deploy seam-booking.war

but got the following errorl

[ERROR] No plugin found for prefix 'jboss-as' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (/home/jgaer/.m2/repository), jboss-public-repository-group (, central (] -> [Help 1]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1]

Thanks in advance for any help
6 years ago
I can get my web applications to log with out a problem but I dont see any messages from the tomcat server when I configure for log4j. Followed the instrucations at replacing the tomcat-juli.jar file in $CATALINA_HOME/bin with the one from extras and placing the log4j.jar and tomcat-juli-adapters.jar in the lib directory. Running with log4j debug I can see the categories registered. But never see any output from those categories. I do see the output if I replace the file which causes the to use the default logging.
log4j: Handling[null]
log4j: Parsing for [org] with value=[WARN].
log4j: Level token is [WARN].
log4j: Category org set to WARN
log4j: Handling[null]
log4j: Parsing for [org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager]] with value=[DEBUG, TOMCAT, TSOCK].
log4j: Level token is [DEBUG].
log4j: Category org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager] set to DEBUG
log4j: Parsing appender named "TOMCAT".
log4j: Appender "TOMCAT" was already parsed.
log4j: Parsing appender named "TSOCK".
log4j: Appender "TSOCK" was already parsed.
log4j: Handling[Catalina].[localhost].[/host-manager]=[null]
log4j: Parsing for [org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager]] with value=[DEBUG, TOMCAT, TSOCK].
log4j: Level token is [DEBUG].
log4j: Category org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager] set to DEBUG
log4j: Parsing appender named "TOMCAT".
log4j: Appender "TOMCAT" was already parsed.
log4j: Parsing appender named "TSOCK".
log4j: Appender "TSOCK" was already parsed.
log4j: Handling[Catalina].[localhost].[/manager]=[null]
log4j: Finished configuring.

Any help would be appreciated.
8 years ago
I 've been using the @schemavalidation tag successfully with Metro 2.0 with simpler schemas, but a recent update to our schemas has cause the attached error to occur IFF schemavalidation is on. The service functions correctly if it is not. I have been able to validate messages against the schemas used to generate the services using tools like Oxygen. The error occurs at server startup not in response to a particular in or out bound message. Looking at the error messages it looks like the metro framework builds the schemas from the annotations in the generate code and is failing at doing that. I make that assumption since the schema names in the errors do not match the schemas used to generate the code. I had hoped that the wsdlLocation attribute on the @webservice annotation or the sun-jax-ws definitions would solve that issue ( wsdl and all schemas are deployed to WEB-INF/wsdl directory). I understand the cause to be an abstract base class but don't want to constrain the interface developers from using valid schema constructs. In a nutshell is there any way to force the metro framework to take the top down approach and validate against the schemas used to generate the code instead of a bottom up approach of reading the annotations and regenerating the schemas from the generated code?

Dec 3, 2010 8:16:50 PM contextInitialized
SEVERE: WSSERVLET11: failed to parse runtime descriptor: org.xml.sax.SAXParseException: src-resolve.4.2: Error resolving component 'ns1:MessageType'. It was detected that 'ns1:MessageType' is in namespace '', but components from this namespace are not referenceable from schema document 'file:/AudioStreamServicesPortImplService_schema1.xsd'. If this is the incorrect namespace, perhaps the prefix of 'ns1:MessageType' needs to be changed. If this is the correct namespace, then an appropriate 'import' tag should be added to 'file:/AudioStreamServicesPortImplService_schema1.xsd'. org.xml.sax.SAXParseException: src-resolve.4.2: Error resolving component 'ns1:MessageType'. It was detected that 'ns1:MessageType' is in namespace '', but components from this namespace are not referenceable from schema document 'file:/AudioStreamServicesPortImplService_schema1.xsd'. If this is the incorrect namespace, perhaps the prefix of 'ns1:MessageType' needs to be changed. If this is the correct namespace, then an appropriate 'import' tag should be added to 'file:/AudioStreamServicesPortImplService_schema1.xsd'.
8 years ago
I'm having trouble getting to code examples now that oracle has rearranged the web pages. Most of the google links are invalid going to the old sun URLS. Links off off the new oracle JMF page seem to all go to pages without content, i.e goes to a generic oracle page with no specific content. I am using firefox 5.0 as a browser on RedHat 5. Is anyone else experiencing this? Can I download the contents via ftp from somewhere?
8 years ago
To answer my own question

Service service = new Service();
port = service.getPort();
((BindingProvider) port).getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
9 years ago

I'm having problems trying to implement a callback that has a client defined endpoint. I used wsimport to build the interfaces.
I did a simple implementation of the callback method that just printlns a message. Every thing works fine if I dont try to override the
endpoint and just use the endpoint defined in the wsdl that the code was generated from.

cbService=new AudioStreamCallbackServices();

However if I try to pass in a url the constructor for the service throws an exception

SEVERE: {}AudioStreamCallbackServices is not a valid service.
Valid services are: {}AudioStreamCallbackPortImplService {}AudioStreamCallbackServices
is not a valid service. Valid services are: {}AudioStreamCallbackPortImplService

The url in the wsdl is

<soap:address location="http://localhost:8055/AudioStreamCallback/"/>

I have tried building urls from


I get the same result when I used the contructor that accepts a url , In each case I can see the schemas streaming back to the service that
is calling the callback (using tcpmon).

The annotations in the generated Service proxy are
new QName("", "AudioStreamCallbackServices");

I grepped my entire source tree for AudioStreamCallbackPortImplService and it doesnt occur, but I do see the sample name as the
service name when I use the Oxygen WSDL soap analyzer so it must be generated by jax-ws based on the schema contents.

find . -exec grep AudioStreamCallbackPortImplService {} \;

Simple question is what is the easiest way for me to dynamically set the service endpoint address at run time.
9 years ago
I know I am missing something obvious, but creating a connection with the following code on java 1.4.2 the content length is always 0 even though it is explicitly set.

URL url = new URL("http://localhost:" + port);
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
String testData="this is a test!";
String LEN_HDR="Content-Length";
String TYPE_HDR="Content-Type";


OutputStream os = conn.getOutputStream();
PrintStream ps = new;

here are the headers are received on the server

Content-Type: text/html
Content-Length: 0
TESTContent-Length: 15
User-Agent: Java/1.4.2
Host: localhost:91
Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
Connection: keep-alive

Thanks in advance for any help

Trying to create some webservice interfaces for methods that take maps as parameters. I think I have the wsdl correct and am guessing that the wizards just dont support collectin types correctly. I get the message

iwab0237w the sample jsp client does not support arrays:item correctly.

If anybody can point me to some examples/tutorials on the web that deal specifically with handling HashMaps or Collections in general in wsdl and JAX RPC particulary in working with them on WSAD and websphere I'd appreciate it. I've found lots of links for complex types and beans but few collection examples beyond arrays. And not a lot on handling untyped (any) objects in the collection.

for referencer here is the wsdl I was using to test a bean that echos back the contents of a map. I couldnt get anythign to work without specifically typing the keys and values as strings, but figured better to start simpled.
<?xml version="1.0" encoding="UTF-8"? >

<wsdl efinitions targetNamespace="http://sample" xmlns="" xmlns:apachesoap="" xmlns:impl="http://sample" xmlns:intf="http://sample" xmlns:wsdl="" xmlns:wsdlsoap="" xmlns:xsd="" >
<wsdl:types >
<schema elementFormDefault="qualified" targetNamespace="http://sample" xmlns="" >
<element name="sendMap" >
<complexType >
<sequence >
<element name="item" minOccurs="0" maxOccurs="unbounded" >
<complexType >
<sequence >
<element name="key" type="xsd:string"/ >
<element name="value" type="xsd:string"/ >
</sequence >
</complexType >
</element >
</sequence >
</complexType >
</element >
<element name="sendMapResponse" >
<complexType >
<sequence >
<element name="sendMapReturn" type="xsd:string"/ >
</sequence >
</complexType >
</element >
</schema >
</wsdl:types >
<wsdl:message name="sendMapRequest" >
<wsdl art element="intf:sendMap" name="parameters"/ >
</wsdl:message >
<wsdl:message name="sendMapResponse" >
<wsdl art element="intf:sendMapResponse" name="parameters"/ >
</wsdl:message >
<wsdl ortType name="mapPort" >
<wsdl peration name="sendMap" >
<wsdl:input message="intf:sendMapRequest" name="sendMapRequest"/ >
<wsdl utput message="intf:sendMapResponse" name="sendMapResponse"/ >
</wsdl peration >
</wsdl ortType >
<wsdl:binding name="sendMapSoapBinding" type="intf:mapPort" >
<wsdlsoap:binding style="document" transport=""/ >
<wsdl peration name="sendMap" >
<wsdlsoap peration soapAction=""/ >
<wsdl:input name="sendMapRequest" >
<wsdlsoap:body use="literal"/ >
</wsdl:input >
<wsdl utput name="sendMapResponse" >
<wsdlsoap:body use="literal"/ >
</wsdl utput >
</wsdl peration >
</wsdl:binding >
<wsdl:service name="sendMapService" >
<wsdl ort binding="intf:sendMapSoapBinding" name="sendMap" >
<wsdlsoap:address location="http://localhost:9080/map/services/sendMap"/ >
</wsdl ort >
</wsdl:service >
</wsdl efinitions>
[ May 12, 2005: Message edited by: Jeff Gaer ]
14 years ago
My understanding is that the jsp:usebean tag should instantiate a bean if it can not find it. However the code generated from jps in wsad 5.1 throws an execption in that case. Is this wrong or am I misunderstanding. I came across this after I realized that usebean tags failed unless I used the IDE to generate them.

// end
// begin [file="/iteratorTest.jsp";from=(25,0);to=(26,53)]
test.stubs.iterator.TestList tableTest = null;
boolean _jspx_specialtableTest = false;
synchronized (session) {
tableTest= (test.stubs.iterator.TestList)
if (tableTest == null)
throw new java.lang.InstantiationException ("bean tableTest not found within scope ");
if(_jspx_specialtableTest == true) {
// end
// HTML // begin [file="/iteratorTest.jsp";from=(26,53);to=(27,0)]
14 years ago