Saturday, April 26, 2014

IBM Websphere application server: org.omg.CORBA.INTERNAL: CREATE_LISTENER_FAILED_4 vmcid: 0x49421000 minor code: 56 completed: No

Problem:
[25.04.14 23:24:16:249 MSK] 00000001 FfdcProvider  W com.ibm.ws.ffdc.impl.FfdcProvider logIncident FFDC1003I: FFDC Incident emitted on C:\Program Files (x86)\IBM\WebSphere\AppServer\profiles\AppSrv01\logs\ffdc\server1_fe8083c6_14.04.25_23.24.16.1698058784286750537299.txt com.ibm.ws.orbimpl.transport.WSTransport.createServerSocket 1387
[25.04.14 23:24:16:259 MSK] 00000001 ORBRas        E com.ibm.ws.orbimpl.transport.WSTransport createServerSocket P=855989:O=0:CT ORBX0390E: Cannot create listener thread. Exception=[ java.net.BindException: Address already in use: JVM_Bind - received while attempting to open server socket on port 9100 ].
[25.04.14 23:24:16:289 MSK] 00000001 FfdcProvider  W com.ibm.ws.ffdc.impl.FfdcProvider logIncident FFDC1003I: FFDC Incident emitted on C:\Program Files (x86)\IBM\WebSphere\AppServer\profiles\AppSrv01\logs\ffdc\server1_fe8083c6_14.04.25_23.24.16.2598351352287321564927.txt com.ibm.ws.orbimpl.transport.WSTransport.startListening 805
[25.04.14 23:24:16:329 MSK] 00000001 FfdcProvider  W com.ibm.ws.ffdc.impl.FfdcProvider logIncident FFDC1003I: FFDC Incident emitted on C:\Program Files (x86)\IBM\WebSphere\AppServer\profiles\AppSrv01\logs\ffdc\server1_fe8083c6_14.04.25_23.24.16.2991816491395556670990.txt com.ibm.ws.orbimpl.transport.WSTransport.createListener 724
[25.04.14 23:24:16:329 MSK] 00000001 WsServerImpl  E   WSVR0009E: Error occurred during startup
com.ibm.ws.exception.RuntimeError: org.omg.CORBA.INTERNAL: CREATE_LISTENER_FAILED_4  vmcid: 0x49421000  minor code: 56  completed: No
    at com.ibm.ws.runtime.component.ORBImpl.start(ORBImpl.java:489)
    at com.ibm.ws.runtime.component.ContainerHelper.startComponents(ContainerHelper.java:539)
    at com.ibm.ws.runtime.component.ContainerImpl.startComponents(ContainerImpl.java:627)
    at com.ibm.ws.runtime.component.ContainerImpl.start(ContainerImpl.java:618)
    at com.ibm.ws.runtime.component.ServerImpl.start(ServerImpl.java:523)
    at com.ibm.ws.runtime.WsServerImpl.bootServerContainer(WsServerImpl.java:310)
    at com.ibm.ws.runtime.WsServerImpl.start(WsServerImpl.java:223)
    at com.ibm.ws.runtime.WsServerImpl.main(WsServerImpl.java:686)
    at com.ibm.ws.runtime.WsServer.main(WsServer.java:59)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
    at java.lang.reflect.Method.invoke(Method.java:611)
    at com.ibm.wsspi.bootstrap.WSLauncher.launchMain(WSLauncher.java:234)
    at com.ibm.wsspi.bootstrap.WSLauncher.main(WSLauncher.java:96)
    at com.ibm.wsspi.bootstrap.WSLauncher.run(WSLauncher.java:77)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
    at java.lang.reflect.Method.invoke(Method.java:611)
    at org.eclipse.equinox.internal.app.EclipseAppContainer.callMethodWithException(EclipseAppContainer.java:587)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:198)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
    at java.lang.reflect.Method.invoke(Method.java:611)
    at org.eclipse.core.launcher.Main.invokeFramework(Main.java:340)
    at org.eclipse.core.launcher.Main.basicRun(Main.java:282)
    at org.eclipse.core.launcher.Main.run(Main.java:981)
    at com.ibm.wsspi.bootstrap.WSPreLauncher.launchEclipse(WSPreLauncher.java:380)
    at com.ibm.wsspi.bootstrap.WSPreLauncher.main(WSPreLauncher.java:151)
Caused by: org.omg.CORBA.INTERNAL: CREATE_LISTENER_FAILED_4  vmcid: 0x49421000  minor code: 56  completed: No
    at com.ibm.ws.orbimpl.transport.WSTransport.createListener(WSTransport.java:867)
    at com.ibm.ws.orbimpl.transport.WSTransport.initTransports(WSTransport.java:605)
    at com.ibm.rmi.iiop.TransportManager.initTransports(TransportManager.java:166)
    at com.ibm.rmi.corba.ORB.set_parameters(ORB.java:1277)
    at com.ibm.CORBA.iiop.ORB.set_parameters(ORB.java:1691)
    at org.omg.CORBA.ORB.init(ORB.java:364)
    at com.ibm.ws.orb.GlobalORBFactory.init(GlobalORBFactory.java:92)
    at com.ibm.ejs.oa.EJSORBImpl.initializeORB(EJSORBImpl.java:179)
    at com.ibm.ejs.oa.EJSServerORBImpl.<init>(EJSServerORBImpl.java:102)
    at com.ibm.ejs.oa.EJSORB.init(EJSORB.java:55)
    at com.ibm.ws.runtime.component.ORBImpl.start(ORBImpl.java:481)
    ... 34 more
Solution:
1. "Address already in use: JVM_Bind - received while attempting to open server socket on port 9100 ]." Check that port is free.
2. Check that file 'hosts' contains string
'127.0.0.1     localhost'
 In my case that was the problem, 'cause SOAP communication addresses server as localhost:8880.

Monday, October 28, 2013

Eclipse error: Required class javax.faces.FactoryFinder does not exist in selected libraries.

Error
When adding user Faces implementation to a project in Eclipse you can get the following error:

Required class javax.faces.FactoryFinder does not exist in selected libraries.


Solution for J2EE 6.0
Some people recommend to add jsf-api jar but it doesn't solve the problem for Java EE 6.0. Actually you have to add j2ee.jar from your appserver directory to Eclipse library. Here's the screenshot.




Friday, June 21, 2013

IBM Connections 4.0. How to change ownership for wiki owned by an inactive user?

Few days ago I received a question like that: person was fired, his user in LDAP was deleted and his profile in Connections was deactivated. How to change his wiki's ownership to continue editing it?

The answer: there is no means to do it from administrative interface. But as long as we store all the data in DB2 database - we can do whatever we want. Here's a small procedure that will help us:

CREATE OR REPLACE PROCEDURE WIKI_CHANGE_OWNER ( IN WIKILABEL VARCHAR(256), IN OWNER_NAME VARCHAR(256), IN NEW_OWNER_NAME VARCHAR(256) )
LANGUAGE SQL
BEGIN
 DECLARE CURRENT_OWNER_ID CHAR(16) FOR BIT DATA;
 DECLARE NEW_OWNER_ID CHAR(16) FOR BIT DATA;
 DECLARE WIKI_ID CHAR(16) FOR BIT DATA;

 SET WIKI_ID = (SELECT "ID" from "WIKIS"."LIBRARY" where "LABEL" like WIKILABEL and "OWNER_USER_ID" = CURRENT_OWNER_ID);
 IF WIKI_ID IS NULL THEN
  CALL DBMS_OUTPUT.PUT_LINE('WIKI_ID not found. Probably the title was misspelled.');
  RETURN -1;
 END IF;


 SET CURRENT_OWNER_ID = (SELECT "ID" from "WIKIS"."USER" where "NAME" like OWNER_NAME);
 
 IF CURRENT_OWNER_ID IS NULL THEN
  CALL DBMS_OUTPUT.PUT_LINE('CURRENT_OWNER_ID not found. Probably the name was misspelled.');
  RETURN -1;
 END IF;
 
 SET NEW_OWNER_ID = (SELECT "ID" from "WIKIS"."USER" where "NAME" like NEW_OWNER_NAME);
 IF NEW_OWNER_ID IS NULL THEN
  CALL DBMS_OUTPUT.PUT_LINE('NEW_OWNER_ID not found. Probably the name was misspelled.');
 END IF;
 
 UPDATE "WIKIS"."LIBRARY" SET "OWNER_USER_ID"=NEW_OWNER_ID WHERE "ID" = WIKI_ID;
 UPDATE "WIKIS"."USER_TO_LIBRARY_ROLE" SET "USER_ID"=NEW_OWNER_ID WHERE "LIBRARY_ID"=WIKI_ID AND "USER_ID"=CURRENT_OWNER_ID;
 CALL DBMS_OUTPUT.PUT_LINE('OWNERSHIP SUCCESSFULLY CHANGED');
END!

How to use it:

  1. Save it to file proc.sql
  2. In application server console stop the Wikis application.
  3. Log in to database with dbadm authorities:
    > db2 connect to wikis user db2admin
  4. Backup the database. Like this (example for Windows):
    > db2 force application all
    > db2 backup db wikis to d:\
  5. After db backup deploy the procedure:
    > db2 -td! -vf proc.sql
  6. Now you can use this procedure as many times as you want. 'Full user name' means full name that you can copy from Connections web-interface. Like this:
    > db2 set serveroutput on
    > db2 call wiki_change_owner('wiki name', 'Full User Name', 'New Owner Name')
  7. If everything went well you'll get  Return Status = 0
  8. If something went wrong you will see the explanation.



Thursday, June 6, 2013

IBM Launchpad doesn't draw left pane including the links.

Here's a normal view.
 

And here's that defective view:

The problem is described here http://www-01.ibm.com/support/docview.wss?uid=swg21586443
but sometimes it's hard to find the solution on ibm site and articles move often.
So, easy solution is to remove all the spaces from  launchpad path. For example "C:\distr\IBM Connections\launchpad.exe"  replace with "C:\distr\IBM_Connections\launchpad.exe".


Wednesday, June 5, 2013

TDI 7.1 Error CTGDIJ037E. Cannot connect to Database when configuring JDBC Connector.

Problem:
Cannot connect to database configuring TDI JDBC connector. Getting CTGDIJ037E error or SQLCODE=-204, SQLSTATE=42704 (which means 'no such table').
Here's an example:
or another one:
Answer:
Both errors mean 'Wrong schema name'. Let's see. Username is LCUSER. Then default schema name is LCUSER. But my actual schema name is EMPINST. That means I should specify my schema name somewhere. In second case I tried to give it in a table name field but that didn't work. I also cannot do it using connection string. But lower there's a field for Extra Provider Paramaters. There I point real schema name like this:
and press Connect. The problem is solved.

DB2 JDBC Driver. How to set default schema name?

Popular question "How to set default schema name creating connection to DB2 database?".

Answer is here:  http://publib.boulder.ibm.com/infocenter/db2luw/v8/index.jsp?topic=/com.ibm.db2.udb.doc/ad/rjvdsprp.htm

You cannot specify schema name in connection string but you always can add some extra parameters.
So you should use extended driver parameter currentSchema=your_schema_name.