Help coderanch get a
new server
by contributing to the fundraiser

Tom Z. Smith

+ Follow
since Aug 17, 2011
Merit badge: grant badges
For More
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 Tom Z. Smith

Specifically, I'm trying to use a single installation of Tomcat 6 to provide our developers with the ability to use more than 1 instance of Tomcat and the problem I'm having pertains to how the JAR files aren't being loaded inside each instance's "lib" directory.

Example: I have 2 instances of Tomcat running on this machine (i.e. - "test1" and "test2"; both are used for various stages of testing and migration).
To start test1, I would use the following approximate console command: "test1_instance start".
For test2, it would be "test2_instance start", respectively.

Instead of putting all JAR files inside the root Tomcat lib directory, we thought it would be efficient to let each instance directory have their own lib directory and load stage-specific JAR files inside these while leaving all "GLOBAL" JAR files inside the Tomcat root's lib directory. Unfortunately, it's not working and we're pretty lost as to why.

test1 startup script -

test2 startup script -

And the "base" startup script that the above tie into has the following:

Do you have any idea what we're doing wrong here?
Anyone? If you need more info, let me know. This problem is really making me scratch a hole into my head...
12 years ago
So it turns out that my team has installed 2 instances of Tomcat 6 on our Red Hat server. This server is used for testing and each instance represents a layer of testing as it pertains to the migration path of our application development...

Anyway, we're trying to implement a fairly unique approach for class loading. Right now, we have demarcated Tomcat by providing our developers the means to reference "GLOBAL" jar files inside the $CATALINA_HOME/lib directory whereas for each testing stage (i.e. - "test1" and "test2"), we would like to provide the means to reference jar files inside each testing directory.

So to better illustrate our intentions, let's say you're working on our server and need to test it inside "test1" first before deploying into "test2." The only concern is that your application uses a specific jar file that provides some functionality a client needs, but you don't want it available to every instance--just test1.

In other words, how can we make each instance have their own lib? From what I understand, this involves the use of the CATALINA.PROPERTIES file, but I'm uncertain as to how this needs to be configured.

Any insight into this is appreciated.
12 years ago
I'm trying to implement a web service using Eclipse Indigo and CXF 2.x with Java 1.6 and I keep bombing out when I try to run and test the client locally through Eclipse. In the console, I keep getting an error message about "None of the policy alternatives can be satisfied" and so far there has been absolutely nobody capable of both understanding this situation and or fixing it. I'm not even completely sure where it's coming from...

It seems the basic approach to creating a TOP-DOWN web service in Eclipse is as follows:

1.) Create a Dynamic Web Project.
2.) Import your WSDL file.
3.) Create a Web Service.
4.) Create a Client Web Service.

Basic, right? Well, it doesn't seem to properly work this way if you intend on using security features (which, duh, we all want, right?). That said, the addition of security means that one needs to use the following element inside a WSDL:

Unless I'm mistaken, this should basically imply that some form of authentication between the two consuming parties will be used, but is this even right?

We've been trying to get this implemented for the past 2 months and no matter what we tweak, change, edit, or update, it just doesn't work or seem to do a single thing and we've suspected that it has something to do with how the WSDL has been made (we've received it from a client)...

Our entire WSDL is as follows:

We've had quite the time getting this implemented due to a plethora of reasons. At first, we tried the antiquated version of AXIS and with this, we got it to work but without any kind of security. As soon as we put the security inside the WSDL, it bombed. We then tried AXIS2, but that couldn't get anything generated in the form of a stub. Finally, we tried CXF and in my opinion, this seems to get us further than both but some tiny issue is preventing us from finishing the routine and I'm thinking it's a tiny bottleneck somewhere--just don't know where it's coming from. I'm worried it has something to do with the WSDL, but who knows?

XML is definitely a foreign technology when it comes to WSDL stuff. I've learned a lot, for sure, but truly need help getting all this working. If anyone could shine some light, it would be appreciated.
12 years ago
My apologies everyone, but I solved it...

I had been not only using single-quotes around the replacement token or substitution variable, but also included a semi-colon at the end of the query string! Ha. Hot damn!
(Java Ranch lingo, kiddies.)
Hi everyone... This is my first post, so let me know if you need anything else from me...

Basically, I'm having problems with my database object being able to do setString(). I'm not sure why. I think it's something to do with how I'm trying to use FOREACH logic with a hashmap to swap SQL queries? Who knows, but I do hope that someone around here can help me understand what's causing my woes.

Here's some of the code:

And here's the stack dump it's generating:

java.sql.SQLException: Invalid column index
at oracle.jdbc.driver.DatabaseError.throwSqlException(
at oracle.jdbc.driver.DatabaseError.throwSqlException(
at oracle.jdbc.driver.DatabaseError.throwSqlException(
at oracle.jdbc.driver.OraclePreparedStatement.setStringInternal(
at oracle.jdbc.driver.OraclePreparedStatement.setString(
at <mypackage>.UserCheck_2.Authenticate.authenticate(
at <mypackage>.UserCheck_2.UserCheckPortBindingImpl.checkUser(
at <mypackage>.UserCheckPortBindingSkeleton.checkUser(
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.axis.strategies.InvocationStrategy.visit(
at org.apache.axis.SimpleChain.doVisiting(
at org.apache.axis.SimpleChain.invoke(
at org.apache.axis.handlers.soap.SOAPService.invoke(
at org.apache.axis.server.AxisServer.invoke(
at org.apache.axis.transport.http.AxisServlet.doPost(
at javax.servlet.http.HttpServlet.service(
at org.apache.axis.transport.http.AxisServletBase.service(
at javax.servlet.http.HttpServlet.service(
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
at org.apache.catalina.core.ApplicationFilterChain.doFilter(
at org.apache.catalina.core.StandardWrapperValve.invoke(
at org.apache.catalina.core.StandardContextValve.invoke(
at org.apache.catalina.core.StandardHostValve.invoke(
at org.apache.catalina.valves.ErrorReportValve.invoke(
at org.apache.catalina.core.StandardEngineValve.invoke(
at org.apache.catalina.connector.CoyoteAdapter.service(
at org.apache.coyote.http11.Http11Processor.process(
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(
at Source)

What's causing this? As far as I know, the data types are correct...