BaseX 8.4
Wednesday, 20 July 2016 · 2 messages
BC
Bondeson, Carl20 Jul 2016 15:05 #
We just upgraded from 7.8 to 8.4. We are using BaseX in a JBoss multi-threaded application. Something has changed with ClientSession. I have log4j at trace level and the server is started but when I attempt to create a ClientSession in Java nothing happens.
static final int BASEX_SERVER_PORT = 1990;
static final String BASEX_USER = "admin";
static final String BASEX_PASSWORD = "admin";
static final String BASEX_HOST = "localhost";
try {
// get server status
boolean serverstarted = BaseXServer.ping(BASEX_HOST, BASEX_SERVER_PORT);
// server started?
if (!serverstarted) {
instance.basexlog.trace("BaseXDictionary: BaseX: Start BaseX server");
// no-> create a new instance using server and client ports
// BaseXServer server = new BaseXServer("-p" + BASEX_SERVER_PORT);
} else {
// yes-> log the event
instance.basexlog.trace("BaseXDictionary: BaseX: BaseX server already started"); }
// start initialization process
instance.basexlog.debug("BaseXDictionary: BaseX: Server started");
// create client session for managing database construction
instance.mapperDBSession = new ClientSession(BaseXDictionary.BASEX_HOST, BaseXDictionary.BASEX_SERVER_PORT,
BaseXDictionary.BASEX_USER, BaseXDictionary.BASEX_PASSWORD);This next log4j output is never seen in the log file
instance.basexlog.trace("BaseXDictionary: BaseX: Client Session created ");
Has the default username/password been changed due to security reasons?
Great product.
Thanks
Carl R Bondeson
IT Analyst 3
Information Technology
Connecticut Department of Public Health
410 Capitol Ave
Hartford, CT 06134
Phone: 860-509-7434
carl.bondeson at ct.gov<mailto:carl.bondeson at ct.gov>
[logosmall]
CG
Christian Grün20 Jul 2016 16:08 #
Hi Carl,
Did you switch to the latest client code? Please check out our documentation for more details.
Christian
Quoted text · Bondeson, Carl · 125 lines
Am 20.07.2016 3:06 nachm. schrieb "Bondeson, Carl" <Carl.Bondeson at ct.gov>: > We just upgraded from 7.8 to 8.4. We are using BaseX in a JBoss > multi-threaded application. Something has changed with ClientSession. I > have log4j at trace level and the server is started but when I attempt to > create a ClientSession in Java nothing happens. > > > > > > static final int BASEX_SERVER_PORT = 1990; > > static final String BASEX_USER = "admin"; > > static final String BASEX_PASSWORD = "admin"; > > static final String BASEX_HOST = "localhost"; > > > > try { > > > > // get server status > > boolean serverstarted = > BaseXServer.ping(BASEX_HOST, BASEX_SERVER_PORT); > > // server started? > > if (!serverstarted) { > > > instance.basexlog.trace("BaseXDictionary: BaseX: Start BaseX server"); > > // no-> > create a new instance using server and client ports > > // > BaseXServer server = new BaseXServer("-p" + > BASEX_SERVER_PORT); > > > > } else { > > // yes-> > log the event > > > instance.basexlog.trace("BaseXDictionary: BaseX: BaseX server already > started"); > > > > } > > > > // start initialization > process > > > instance.basexlog.debug("BaseXDictionary: BaseX: Server started"); > > > > // create client session > for managing database construction > > instance.mapperDBSession = > new ClientSession(BaseXDictionary.BASEX_HOST, > BaseXDictionary.BASEX_SERVER_PORT, > > > BaseXDictionary.BASEX_USER, BaseXDictionary.BASEX_PASSWORD); > > > > > > This next log4j output is never seen in the log file > > > > > instance.basexlog.trace("BaseXDictionary: BaseX: Client Session created "); > > > > > > Has the default username/password been changed due to security reasons? > > > > Great product. > > > > Thanks > > > > Carl R Bondeson > > IT Analyst 3 > > Information Technology > > Connecticut Department of Public Health > > 410 Capitol Ave > > Hartford, CT 06134 > > Phone: 860-509-7434 > > carl.bondeson at ct.gov > > [image: logosmall] > > >
Written for BaseX 8.5. BaseX may have changed since: please check the current documentation.
⚡Generated with XQuery