We're getting this random warning from JBoss.. any idea why?
It happens at random times when there are no active threads. Everything works when any processing resumes.
13:49:31,764 WARN [JBossManagedConnectionPool] [ ] Unable to fill pool
org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (java.sql.SQLException: Listener ref
used the connection with the following error:
ORA-12516, TNS:listener could not find available handler with matching protocol stack
The Connection descriptor used by the client was:
//localhost:1521/orcl
)
at org.jboss.resource.adapter.jdbc.xa.XAManagedConnectionFactory.createManagedConnection(XAManagedConnectionFactory.java
:144)
at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.createConnectionEventListener(InternalManagedConne
ctionPool.java:577)
at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.fillToMin(InternalManagedConnectionPool.java:524)
at org.jboss.resource.connectionmanager.PoolFiller.run(PoolFiller.java:74)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.sql.SQLException: Listener refused the connection with the following error:
ORA-12516, TNS:listener could not find available handler with matching protocol stack
The Connection descriptor used by the client was:
//localhost:1521/orcl
Update: As per richj's post, here is the format of one of the four data sources we are using:
<xa-datasource>
<jndi-name>ABCOracleDS</jndi-name>
<track-connection-by-tx/>
<isSameRM-override-value>false</isSameRM-override-value>
<xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class>
<xa-datasource-property name="URL">jdbc:oracle:thin:#//localhost:1521/orcl</xa-datasource-property>
<xa-datasource-property name="User">myuser</xa-datasource-property>
<xa-datasource-property name="Password">mypw</xa-datasource-property>
<min-pool-size>20</min-pool-size>
<max-pool-size>200</max-pool-size>
<valid-connection-checker-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleValidConnectionChecker
</valid-connection-checker-class-name>
<exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter
</exception-sorter-class-name>
<no-tx-separate-pools/>
<metadata>
<type-mapping>Oracle10g</type-mapping>
</metadata>
</xa-datasource>
The Connection descriptor used by the client was:
//localhost:1521/orcl
I think the problem is likely to be somewhere in the datasource definitions.
Do you have more than one datasource definition in your JBoss hot deploy directory?
Are your datasource definitions correct and complete - particularly the properties used to build the connection URL?
Update 1
I'm not sure about the slashes, I think maybe the URL:
jdbc:oracle:thin:#//localhost:1521/orcl
should look like this:
jdbc:oracle:thin:#localhost:1521:orcl
Update 2
Here is a reference from Oracle that supports the syntax with slashes.
Here is a reference from Orafaq that supports the syntax with colons.
Perhaps it's worth a try even if the slashes are legal?
Update 3
Just a few more ideas from the "getting desperate" box of tricks:
ORA-12516: TNS:listener could not find available handler with matching protocol stack
This message looks like a TNS configuration issue. The JDBC thin driver shouldn't need a TNS configuration, but I've found that sometimes it just refuses to work without one.
You could also try the fully qualified host name instead of localhost. Sometimes machine.company.com works when machine on its own doesn't.
Related
I'm currently in the process of migrating an application from AIX to LINUX. One of the processes is to install and setup MQ.
I've gotten past setting up the Connection Factory and Activation Spec in my server.xml. My application is connecting to the MQ(which is on the same box). However, it's unable to find my local queue I've defined.
From my reading, it looks like I have to setup matching JMS objects in MQ. However, I cannot find anywhere on the AIX server where there is any configuration for that MQ's JMS.
I can't find a .bindings file anywhere which I believe would tell me that it's a local file. However, LDAP makes sense, because we connect to this MQ from other servers.
Sorry if this seems like a silly question or is easy, but I'm at a loss and cannot move forward with my project until I figure this issue out.
However, here is my server.xml for my connection information just in case anyone sees anything wrong.
<variable name="wmqJmsClient.rar.location" value="${shared.config.dir}/wmq/wmq.jmsra.rar"/>
<jmsQueueConnectionFactory connectionManagerRef="ConnMgr" id="QueueConnectionFactory" jndiName="jms/QueueConnectionFactory">
<properties.wmqJms channel="JAVA.CHANNEL" hostName="10.1.1.45" port="1517" queueManager="MY_QMGR" transportType="CLIENT" userName="appuser" />
</jmsQueueConnectionFactory>
<jmsConnectionFactory connectionManagerRef="ConnMgr" jndiName="jms/QueueConnFactory">
<properties.wmqJms channel="JAVA.CHANNEL" hostName="10.1.1.45" port="1517" queueManager="MY_QMGR" userName="appuser" />
</jmsConnectionFactory>
<connectionManager id="ConnMgr" maxPoolSize="2"/>
<jmsQueue id="Q1" jndiName="jms/Q1">
<properties.wmqJms baseQueueManagerName="MY_QMGR" baseQueueName="Q1"/>
</jmsQueue>
<jmsActivationSpec id="application/APPMessageBean">
<properties.wmqJms destinationRef="Q1" hostName="10.1.1.45" port="1517" queueManager="MY_QMGR" transportType="CLIENT" />
</jmsActivationSpec>
Error I'm getting, this is in the Liberty server console.log. I'm not getting any errors in the MQ AMQERR01.LOG
[ERROR ] J2CA8802E: The message endpoint activation failed for resource adapter wmqJms due to exception: com.ibm.mq.connector.DetailedResourceException: MQJCA0003: A JNDI naming exception was thrown. See the linked exception for details., error code: MQJCA0003 An attempt to look up a JMS destination in the JNDI namespace failed. Either the namespace cannot be accessed, or a destination with the supplied name is not bound in the namespace. See the linked exception for details of the failure. Check that the JNDI namespace is available, that a destination with the correct name is bound in the JNDI namespace, and that the value of the property called destination is correctly defined.
at com.ibm.mq.connector.services.JCAExceptionBuilder.buildException(JCAExceptionBuilder.java:169)
at com.ibm.mq.connector.services.JCAExceptionBuilder.buildException(JCAExceptionBuilder.java:135)
at com.ibm.mq.connector.DestinationBuilder.createDestination(DestinationBuilder.java:238)
at com.ibm.mq.connector.inbound.MessageEndpointDeployment.startDelivery(MessageEndpointDeployment.java:337)
at com.ibm.mq.connector.inbound.MessageEndpointDeployment.<init>(MessageEndpointDeployment.java:230)
at com.ibm.mq.connector.ResourceAdapterImpl.endpointActivation(ResourceAdapterImpl.java:556)
at com.ibm.ws.jca.service.EndpointActivationService.activateEndpoint(EndpointActivationService.java:524)
at [internal classes]
Caused by: javax.naming.NameNotFoundException: Q1
at com.ibm.ws.jndi.internal.ContextNode.lookup(ContextNode.java:218)
at [internal classes]
at javax.naming.InitialContext.lookup(InitialContext.java:423)
at com.ibm.mq.connector.DestinationBuilder.createDestination(DestinationBuilder.java:190)
... 5 more
I have a working Spring Boot app (1.2) that uses Postgres. Today I am trying to switch it to Oracle, but when I try to connect I get an exception that says:
java.sql.SQLRecoverableException: IO Error: The Network Adapter could not establish the connection
And below that,
Caused by: java.net.ConnectException: Connection refused
So of course that looks like bad credentials, but I know they are good, and they are working in Oracle SQL Developer just fine. I'm baffled. Here are my properties file entries:
# Properties for Hibernate and Oracle
spring.datasource.driverClassName=oracle.jdbc.driver.OracleDriver
spring.datasource.url=jdbc:oracle:thin:#//earth-db-11:5121/stardev
spring.datasource.username=ops$abcdefg
spring.datasource.password=mypassword
spring.jpa.database-platform=org.hibernate.dialect.Oracle10gDialect
The only idea I have is that there is a $ in the user name, and I have tried escaping it and putting double quotes around it.
Any ideas?
Thanks...
UPDATE:
Many thanks to BonanzaOne, I did have the port number wrong. Correcting that results in a new error:
java.sql.SQLRecoverableException: Listener refused the connection with the following error:
ORA-12514, TNS:listener does not currently know of service requested in connect descriptor
I looked it up of course, but I don't follow what its telling me:
ORA-12514: TNS:listener does not currently know of service requested in connect descriptor
Cause: The listener received a request to establish a connection to a database
or other service. The connect descriptor received by the listener specified a
service name for a service (usually a database service) that either has not yet
dynamically registered with the listener or has not been statically configured
for the listener. This may be a temporary condition such as after the listener
has started, but before the database instance has registered with the listener.
Still, SQL Explorer connects fine.
That exception means that the Oracle listener is not up, or you are trying to connect to a listener that don't exist/not accessible.
My guess is that you trying the wrong port "5121". Oracle default port is 1521.
Can you try with that and see what happens?
From the FAQ there are basically two ways of composing your JDBC string URL:
Old syntax
jdbc:oracle:thin:#[HOST][:PORT]:SID
New syntax
jdbc:oracle:thin:#//[HOST][:PORT]/SERVICE
My guess is that you are using the wrong syntax-SID/Service name combination, in other words, you are using the new syntax that requires the SERVICE name, but you are using the SID name to do it.
Try this: jdbc:oracle:thin:#earth-db-11:1521:stardev
Or maybe find out the Service name and apply it to the new syntax that you are using, instead of the SID name.
First of all, my error is almost identical to what is reported in this question: WSDLException : An error occurred trying to resolve schema referenced at
Here is a snippet of my stack dump:
javax.wsdl.WSDLException: WSDLException (at /definitions/types/xs:schema/xs:schema): faultCode=OTHER_ERROR: An error occurred trying to resolve schema referenced at 'http://www.w3.org/2005/05/xmlmime', relative to 'http://server.subdom.domain.com:13080/SM/7/Common.xsd'.: java.net.ConnectException: Connection timed out: connect] MDC{}
2015-05-24 14:36:33,751 ERROR (c.d.g.w.c.ContexteApplicatif.contextInitialized) [main] catching MDC{}
javax.xml.rpc.ServiceException: Error processing WSDL document:
javax.wsdl.WSDLException: WSDLException (at /definitions/types/xs:schema/xs:schema): faultCode=OTHER_ERROR: An error occurred trying to resolve schema referenced at 'http://www.w3.org/2005/05/xmlmime', relative to 'http://server.subdom.domain.com:13080/SM/7/Common.xsd'.: java.net.ConnectException: Connection timed out: connect
at org.apache.axis.client.Service.initService(Service.java:250) ~[axis-1.4.jar:?]
This occurs in my embedded Tomcat server running from within Eclipse. It is running on a Windows machine and there is an httpProxy at the system level. However, the URL is an internal address for which no proxy is needed. Anyhow, I implemented programmatically a proxy with the following code just before the reference to the WSDL file:
System.setProperty("http.proxySet", "true");
System.setProperty("http.proxyHost", "proxyhost.subdom.domain.com");
System.setProperty("http.proxyPort", "8080");
System.setProperty("https.proxyHost", "proxyhost.subdom.domain.com");
System.setProperty("https.proxyPort", "8080");
And now I am getting an HTTP 502 error which indicate a bad gateway. So, I suppose this solution is the wrong one since I shouldn't need a proxy in first place. I can access the page from within a browser, indistinctly if I enable or disable the proxy settings. In addition, there is a script to configure the proxy and if I use the proxy host shown above and hardcode it in my browser instead of "system proxy" or "automatic setting" I cannot access the page.
To summarize, it behaves like there is like it needs a proxy setup, however it doesn't. The problem is elsewhere and I have no idea how I can make significant progress to debug this problem.
Any hints? Something with Tomcat? Something with Eclipse?
I haven't tried yet on a standalone Tomcat server since my code is not yet ready for deployement.
NOTE: BTW, I tried the command from the quoted post and I am getting the same error as well. Connect timed out without system properties defined for the proxy and 502 code otherwise. At the same time, if I am launching the Web Service Explorer from Eclipse I am perfectly able to access the webservice and invoke operations.
Further investigation: I decided to use WireShark to see what is going on with the request and it appears both HTTP requests (the wsdl and the common types definitions) were fulfilled without a glitch and no connection timed out at all, not a single error. I can see the XML in WireShark and the HTTP status is 200 OK and everything is perfectly fine at this level.
So, what is going on here? I have the same problem on a Linux server while the message is a bit different. What wsdl2java is doing to believe there was a problem and abort?
After further investigation and testing with Axis2 and CXF, I finally found the problem, thanks to the CXF's version of the wsdl2java script which is giving a bit more details.
First of all, the original solution proposed was almost correct. I actually need to add all the proxy information, however I also needed to specify the non-proxy hosts otherwise I am getting the 502 error. The messages from the Axis script were not very detailed about the offending request, while CXF's version was very clear and enabled me to finally solve my problem.
So, in addition, if you modify the wsdl2java script, add -Dhttp.nonProxyHosts=... in addition to other options. The same thing if you need to specify a proxy programmatically.
I have a servlet in an enterprise application on WebSphere Application Server 7.
I want the servlet to read configuration parameters from a custom resource environment provider.
This particular environment is not WebSphere Portal, and I'm not using Spring, but I'm trying to adapt the code from this page about using resource envirnment providers with Spring:
http://blogs.perficient.com/portals/2012/03/28/using-wps-style-resource-environment-providers-with-spring
I'm having a problem with the first line of my test method:
com.ibm.websphere.management.configservice.ConfigService service
=com.ibm.websphere.management.configservice.ConfigServiceFactory.getConfigService();
The getConfigService() method in this line always returns null in my servlet. The method doesn't throw any exceptions, and no errors appear in the server logs; it just returns null.
(Note I show package names in the above code for clarity. In the real code, I import the relevant classes.)
How do I get a ConfigService object in my servlet?
The ConfigServiceFactory class also has a createConfigService(boolean enable, java.util.Properties props) method, but the Javadoc doesn't say what's expected for its arguments, and I can't find any examples using it.
Edit:
I've tried using a ConfigServiceProxy as per http://www-01.ibm.com/support/docview.wss?uid=swg21411254, as suggested by Magic Wand, and can't get that to work either.
Details of the problems follow. Does anyone know how to make this work?
Point 5 near the bottom of the page about using ConfigServiceProxy says:
Modify the properties connectProps.setProperty(AdminClient.CONNECTOR_HOST, "localhost"); and connectProps.setProperty(AdminClient.CONNECTOR_PORT, "8880") if needed.
But it doesn't say how to determine the correct host and port, and I haven't found that information elsewhere, so I'm just guessing.
To find host names and ports, I've logged into the WebSphere Integrated Solutions Console, gone to Servers -> Server Types -> WebSphere application servers, clicked the app server my servlet runs on, and clicked "Ports".
Here's the part of my code that tries to get a ConfigServiceProxy, in which I change only the host name and port number depending on which port I'm trying:
Properties connectProps = new Properties();
connectProps.setProperty(AdminClient.CONNECTOR_TYPE,
AdminClient.CONNECTOR_TYPE_SOAP);
connectProps.setProperty(AdminClient.CONNECTOR_HOST,"localhost");
connectProps.setProperty(AdminClient.CONNECTOR_PORT,"9634");
AdminClient adminClient=AdminClientFactory.createAdminClient(connectProps);
ConfigService service=new ConfigServiceProxy(adminClient);
First, I tried the only port for which the host is "localhost", because that's what the linked example uses. The port name for that is "IPC_CONNECTOR_ADDRESS", and the port number is 9634.
This produces an exception on calling AdminClientFactory.createAdminClient. The stack trace starts with:
com.ibm.websphere.management.exception.ConnectorException: ADMC0016E: The system cannot create a SOAP connector to connect to host localhost at port 9634.
at com.ibm.websphere.management.AdminClientFactory.createAdminClientPrivileged(AdminClientFactory.java:634)
at com.ibm.websphere.management.AdminClientFactory.access$000(AdminClientFactory.java:126)
at com.ibm.websphere.management.AdminClientFactory$1.run(AdminClientFactory.java:209)
at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:63)
at com.ibm.websphere.management.AdminClientFactory.createAdminClient(AdminClientFactory.java:205)
at com.isw.ResourceEnvironmentProviderPlaceHolderConfigurer.getConfigService(ResourceEnvironmentProviderPlaceHolderConfigurer.java:113)
And the nested causes are:
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:56)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:39)
at java.lang.reflect.Constructor.newInstance(Constructor.java:527)
at com.ibm.websphere.management.AdminClientFactory.createAdminClientPrivileged(AdminClientFactory.java:456)
... 38 more
Caused by: com.ibm.websphere.management.exception.ConnectorNotAvailableException: [SOAPException: faultCode=SOAP-ENV:Client; msg=Connection reset; targetException=java.net.SocketException: Connection reset]
at com.ibm.ws.management.connector.soap.SOAPConnectorClient.reconnect(SOAPConnectorClient.java:422)
at com.ibm.ws.management.connector.soap.SOAPConnectorClient.(SOAPConnectorClient.java:222)
... 43 more
Caused by: [SOAPException: faultCode=SOAP-ENV:Client; msg=Connection reset; targetException=java.net.SocketException: Connection reset]
at org.apache.soap.transport.http.SOAPHTTPConnection.send(SOAPHTTPConnection.java:479)
at org.apache.soap.rpc.Call.WASinvoke(Call.java:451)
at com.ibm.ws.management.connector.soap.SOAPConnectorClient$4.run(SOAPConnectorClient.java:372)
at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:118)
at com.ibm.ws.management.connector.soap.SOAPConnectorClient.reconnect(SOAPConnectorClient.java:365)
... 44 more
Next, I tried a port named "SOAP_CONNECTOR_ADDRESS", where the host is the server's fully qualified domain name, and the port number is 8881, so the lines setting host and port look like:
connectProps.setProperty(AdminClient.CONNECTOR_HOST,"server.company.net.au");
connectProps.setProperty(AdminClient.CONNECTOR_PORT,"9634");
This produced an exception on trying to construct the ConfigServiceProxy. The stack trace starts with these lines, and has no cause:
javax.management.InstanceNotFoundException: WebSphere:process=InfraCluster_server1,type=ConfigService,*
at com.ibm.websphere.management.configservice.ConfigServiceProxy.(ConfigServiceProxy.java:67)
at com.isw.ResourceEnvironmentProviderPlaceHolderConfigurer.getConfigService(ResourceEnvironmentProviderPlaceHolderConfigurer.java:114)
at com.isw.ResourceEnvironmentProviderPlaceHolderConfigurer.loadEnvironmentProviderProperties(ResourceEnvironmentProviderPlaceHolderConfigurer.java:205)
at com.isw.insight.client.REPTest.doGet(REPTest.java:50)
Finally, I tried a port named "WC_adminhost", where the host is "*" and the port is 9062. I've tried this both with the host name set to "localhost" and the server's fully qualified domain name, and both fail with the same exception.
Like the IPC_CONNECTOR_ADDRESS port, this produces an exception on calling AdminClientFactory.createAdminClient. The stack trace starts with:
com.ibm.websphere.management.exception.ConnectorException: ADMC0016E: The system cannot create a SOAP connector to connect to host server.company.net.au at port 9062.
at com.ibm.websphere.management.AdminClientFactory.createAdminClientPrivileged(AdminClientFactory.java:634)
at com.ibm.websphere.management.AdminClientFactory.access$000(AdminClientFactory.java:126)
at com.ibm.websphere.management.AdminClientFactory$1.run(AdminClientFactory.java:209)
at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:63)
at com.ibm.websphere.management.AdminClientFactory.createAdminClient(AdminClientFactory.java:205)
at com.isw.ResourceEnvironmentProviderPlaceHolderConfigurer.getConfigService(ResourceEnvironmentProviderPlaceHolderConfigurer.java:113)
And the nested causes are:
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:56)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:39)
at java.lang.reflect.Constructor.newInstance(Constructor.java:527)
at com.ibm.websphere.management.AdminClientFactory.createAdminClientPrivileged(AdminClientFactory.java:456)
... 36 more
Caused by: com.ibm.websphere.management.exception.ConnectorNotAvailableException: [SOAPException: faultCode=SOAP-ENV:Client; msg=Error opening socket: java.net.ConnectException: Connection refused; targetException=java.lang.IllegalArgumentException: Error opening socket: java.net.ConnectException: Connection refused]
at com.ibm.ws.management.connector.soap.SOAPConnectorClient.reconnect(SOAPConnectorClient.java:422)
at com.ibm.ws.management.connector.soap.SOAPConnectorClient.(SOAPConnectorClient.java:222)
... 41 more
Caused by: [SOAPException: faultCode=SOAP-ENV:Client; msg=Error opening socket: java.net.ConnectException: Connection refused; targetException=java.lang.IllegalArgumentException: Error opening socket: java.net.ConnectException: Connection refused]
at org.apache.soap.transport.http.SOAPHTTPConnection.send(SOAPHTTPConnection.java:475)
at org.apache.soap.rpc.Call.WASinvoke(Call.java:451)
at com.ibm.ws.management.connector.soap.SOAPConnectorClient$4.run(SOAPConnectorClient.java:372)
at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:118)
at com.ibm.ws.management.connector.soap.SOAPConnectorClient.reconnect(SOAPConnectorClient.java:365)
... 42 more
I couldn't determine why ConfigServiceFactory.getConfigService() always returns null, but I have managed to obtain a working ConfigService instance using AdminClient and ConfigServiceProxy based on the code from http://www-01.ibm.com/support/docview.wss?uid=swg21411254.
The basic code is this, with the host name and port number possibly changing depending on the server configuration:
Properties connectProps = new Properties();
connectProps.setProperty(AdminClient.CONNECTOR_TYPE,
AdminClient.CONNECTOR_TYPE_SOAP);
connectProps.setProperty(AdminClient.CONNECTOR_HOST,"localhost");
connectProps.setProperty(AdminClient.CONNECTOR_PORT,"8880");
AdminClient adminClient=AdminClientFactory.createAdminClient(connectProps);
ConfigService service=new ConfigServiceProxy(adminClient);
The IBM support document doesn't say how to determine the correct host and port. Here is some detail about that:
Host name "localhost" and port number 8880 are the defaults when WebSphere Application Server is configured as a single server with no deployment manager. In a clustered environment, at least the port number will be different for each application server.
In my clustered test environment, I first checked the ports listed for each application server in the WebSphere Integrated Solutions Console (ISC). None of those were correct.
I subsequently found (via Google searching) that each server has several files controlling the actual ports used.
These files are found on each application server's file system in ${USER_INSTALL_ROOT}/properties.
The value of ${USER_INSTALL_ROOT} can be found in "Environment -> Websphere variables" in the ISC.
The complete directory path on Linux is typically /opt/IBM/WebSphere/AppServer/profiles/AppSrv01/properties.
In that directory, the correct host name and port can be found in the file "wsadmin.properties".
As well as using the correct host and port, my environment also required username/password authentication for the SOAP connection. This can be done in two ways.
The credentials can be set in code, with these two lines added to the above code before calling AdminClientFactory.createAdminClient:
connectProps.setProperty(AdminClient.USERNAME,"username");
connectProps.setProperty(AdminClient.PASSWORD,"password");
This requires the password in plain-text, which is not recommended.
Alternatively, credentials can be set in the "soap.client.props" file in the same directory as the "wsadmin.properties" file.
In "soap.client.props" on every application server on which the code runs, these properties must be set:
com.ibm.SOAP.securityEnabled=true
com.ibm.SOAP.loginUserid=username
com.ibm.SOAP.loginPassword=password
Note the com.ibm.SOAP.securityEnabled property in particular: its value must be true for the username and password to be used.
After setting these properties and saving the file on each server, use the "PropFilePasswordEncoder" command in an operating-system console to encode the password.
I used the following documentation for this command:
http://publib.boulder.ibm.com/infocenter/wsdoc400/v6r0/index.jsp?topic=/com.ibm.websphere.iseries.doc/info/ae/ae/qshpropenc.htm
The actual command used on my application server was:
/opt/IBM/WebSphere/AppServer/bin/PropFilePasswordEncoder.sh /opt/IBM/WebSphere/AppServer/profiles/AppSrv01/properties/soap.client.props com.ibm.SOAP.loginPassword
This only encodes the password for basic authentication, as my configuration doesn't use SSL for SOAP.
After all this, my code works.
I did not have to restart any servers at any point in the above process.
I'm using the MiniAccumuloCluster (MAC) 1.5 jar and attempting to even just instantiate a MAC object but can't seem to connect to it. I get a ton of errors akin to the following:
13/07/08 14:31:29 INFO zookeeper.ClientCnxn: Opening socket connection to server localhost/127.0.0.1:14060
13/07/08 14:31:29 WARN zookeeper.ClientCnxn: Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.ConnectException: Connection refused
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:692)
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1143)
And ending with the following error:
Exception in thread "main" java.lang.RuntimeException: Failed to connect to zookeeper (localhost:14060) within 2x zookeeper timeout period 30000
at org.apache.accumulo.fate.zookeeper.ZooSession.connect(ZooSession.java:96)
at org.apache.accumulo.fate.zookeeper.ZooSession.getSession(ZooSession.java:146)
at org.apache.accumulo.fate.zookeeper.ZooReader.getSession(ZooReader.java:36)
at org.apache.accumulo.fate.zookeeper.ZooReader.getZooKeeper(ZooReader.java:40)
at org.apache.accumulo.fate.zookeeper.ZooCache.getZooKeeper(ZooCache.java:56)
at org.apache.accumulo.fate.zookeeper.ZooCache.retry(ZooCache.java:127)
at org.apache.accumulo.fate.zookeeper.ZooCache.get(ZooCache.java:233)
at org.apache.accumulo.fate.zookeeper.ZooCache.get(ZooCache.java:188)
at org.apache.accumulo.core.client.ZooKeeperInstance.getInstanceID(ZooKeeperInstance.java:143)
at org.apache.accumulo.core.client.ZooKeeperInstance.<init>(ZooKeeperInstance.java:104)
at org.apache.accumulo.core.client.ZooKeeperInstance.<init>(ZooKeeperInstance.java:85)
at Accumulo.Accumulo.connectToMiniCluster(Accumulo.java:454)
at Accumulo.Accumulo.<init>(Accumulo.java:140)
at Accumulo.FrontEnd.main(FrontEnd.java:56)
Accumulo.Accumulo.connectoToMiniCluster (line 454) is:
Instance inst = new ZooKeeperInstance(mac.getInstanceName(), mac.getZooKeepers());
Any suggestions? The Internet is wildly lacking documentation for a lot of the Accumulo framework, including MAC.
Did you start your MiniAccumuloCluster instance before attempting to instantiate the ZooKeeperInstance?
Make sure you call mac.start().
It turns out that I was missing a handful of JAR libraries and I discerned this by looking through the JUnit TemporaryFolder log files. After downloading all the appropriate libraries I resolved my issue.
Download all the dependency jars to get any java code that works with accumulo from here:
http://mvnrepository.com/artifact/org.apache.accumulo/accumulo-core/1.5.0
and that should fix be a good starting point for addressing accumulo java code.