IBM Worklight 6.1 - Unable to initialize the project due to DB2 error - db2

I'm getting the following error while trying to access the Worklight server deployed in my machine:
Error 500: Worklight Console initialization failed.Logged Exception:
java.lang.RuntimeException: FWLSE0206E: The project /worklight failed to initialize, because the project database schema for data source jdbc:db2://xxxxx:50000/WRKLGHT is from version N/A, which is not supported by the server from version 6.1.0.00.20131126-0630. Use the Worklight ant tasks to upgrade the project database schema. [project worklight]

Follow what the error message suggests.
Make sure that the database schema you use for your DB2 database is one that fits Worklight 6.1
Upgrading from a previous version
How to manually update the database
How to configure the database using Ant
Make sure that you have properly configured your application server for working with DB2
Also make sure that you have properly set up DB2...

Related

Connect Firebird Database with Entity Framework model - Connection Failed

I want to connect the Firebird database with Entity Framework Model. Completed the successful installation and created the database. But, I am facing the issue 'Index was outside the bounds of the array' while connecting the database. Refer the below image.
Visual Studio 2015
Firebird client version 4.10.0.0
DDEX Provider version 3.0.2.0
Firebird setup v3.0.4
I followed the steps as suggested in this link. But I choose 'Embedded Server' as server type. https://firebirdsql.org/file/documentation/reference_manuals/fbdevgd-en/html/fbdg30-efw-vs-prepare.html
After done the above configurations, I faced the below.
Unable to load dll 'fbembed': The specified module could not be found. (Exception from HRESULT:0x8007007E)
So, I set 'fbclient.dll' as a client library in the advanced option. After that I am facing this error
Index was outside the bounds of the array
What I have done wrong here? Please correct me.

Whille deploying RESTful webservice, Shows error JdbcDataSource. not found

I have been trying to create my first RESTful execrcise using. But I am unable to deploy module due to error "com.sun.appserv.connectors.internal.api.ConnectorRuntimeException: Invalid resource : jdbc/playerDB__pm"
I checked and I have JNDI, daata source created.
Unlike specified in link. I am using:
-Netbeans 8.0.3, Java EE 7, GlassFish Server 4.
Also I have checked GlassFish is running fine.
Edit 1:
I have re-checked my 'Services' tab, and I could not find jdbc/__playedDB ,even though I have created it.
Its a bug, the JDBC resource file is not being created (atleast with versions I am using: GlassFish 4.1, Netbeans 8.0.2). Using GlassFish manually create.
There could still be different error untill you set following connectins:
database(data source) <- connection pool <- JNDI.

MobileFirst authenticationConfig.xml 7.1 migration error on Security Access Manager sample project - how to resolve?

I'm working with IBM MobileFirst 7.1, and trying to get integration for ISAM working. So far I've been working with the sample application provided here, but I'm having issues with it when working with 7.1 MobileFirst client-side tools.
If I download and unzip the v3.5 integration package, and unzip the ISAMforMobileFirst test project, and I build it with the v7.0 CLI, it builds successfully. However, if I build it with the v7.1 CLI, I get an error like this:
Migrating project from version 7.0.0.00.20150211-0917 to version 7.1.0.00.20150807-0630.
[Error:
BUILD FAILED
/Applications/IBM/MobileFirst-CLI-7.1/mobilefirst-cli/node_modules/generator-worklight-server/lib/build.xml:497: com.worklight.upgrader.UpgradeEngineException: FWLPL0019E: Migrating the ISAMforMobileFirst project from version 7.0.0.00.20150211-0917 to version 7.1.0.00.20150807-0630 has failed because Cannot parse /Users/ferriera/Downloads/AmWorklightAdapter-3.5/sample/ISAMforMobileFirst/server/conf/authenticationConfig.xml
at com.worklight.upgrader.WLUpgradeEngine.upgradeProject(WLUpgradeEngine.java:271)
at com.worklight.upgrader.ant.UpgraderTask.execute(UpgraderTask.java:100)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
A colleague also sees this exact error in MobileFirst Studio 7.1 (in Eclipse) so I'm guessing it's not a CLI-specific error.
I would assume that support for something has changed in authenticationConfig.xml in 7.1, and this hasn't been reflected in the migrator.
A few questions:
Is ISAM integration supported in 7.1?
Whilst I realise the sample application isn't technically supported in 7.1, if/since ISAM integration is, in theory it should be feasible to make it work. What's changed in authenticationConfig.xml syntax?
Edit: looks like the failure happens due to the following: <parameter name="embedded-pki-bridge-ca-p12-file-path" value="<file-path>"/> and more specifically: <file-path>.
Change it to the actual file path, and it will not fail importing.
Nothing in the authenticationConfig.xml file is about ISAM really; it's all declarations of realms, login modules, security tests...
There is a clear failure, and a PMR should be opened.
As for a local workaround, I've attempted to remove segments in the file that I thought might trigger it, but did not succeed to find a pattern that causes it...

IBM Worklight 6.1 - Project fails to initialize because the project database schema is from version N/A

I got the following error message when I try to deploy my .war file to the application server:
Error 500: javax.servlet.ServletException: Worklight Console
initialization failed.Logged Exception: java.lang.RuntimeException:
FWLSE0206E: The project /rmbp failed to initialize, because the
project database schema for data source
jdbc:db2://192.168.1.80:50001/APPCNTR is from version N/A, which is
not supported by the server from version 6.1.0.00.20131126-0630. Use
the Worklight ant tasks to upgrade the project database schema.
[project rmbp]
I already doing some research and ask IBM's about our issue as wellas reviewed the following similar question: IBM Worklight 6.1 - Unable to initialize the project due to DB2 error
It looks like you try to install a Worklight runtime to the APPCNTR database. This database is used for Application Center and is not related to the Worklight runtime database that is called WRKLGHT.
How do you install your Worklight war file : with the server configuration tool, the deployment ant scripts (that can be found in the configuration-samples directory of the Worklight installation) or manually ?
See http://pic.dhe.ibm.com/infocenter/wrklight/v6r1m0/index.jsp?topic=/com.ibm.worklight.deploy.doc/devref/r_ant_tasks_configure_dbs.html that explains how to configure the Worklight runtime database and deploy a Worklight runtime war file.
Have you create a jdbc connection in your Websphere Application Server?
It will be needed by the application inside the WAR file to connect to the database.
If you have done it, you can check inside your WAR file and look for web.xml file in WEB-INF/ folder. In my case I found a jdbc hardcoded inside the file, for example:
<resource-ref>
<description>Worklight Server Database</description>
<res-ref-name>jdbc/WorklightDS</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
<resource-ref>
<description>Reports Database</description>
<res-ref-name>jdbc/WorklightReportsDS</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
You can rename those hardcoded file into the same name of the jdbc that you created in you WAS.
For the database issue, you can follow this link to use ant for DB creation.
http://pic.dhe.ibm.com/infocenter/wrklight/v6r1m0/index.jsp?topic=/com.ibm.worklight.deploy.doc/devref/r_ant_tasks_configure_dbs.html
If you follow the 1st ant script for DB2 creation which will have two different databases, you need to create the new user for this line if you haven't done so.
Because as you can see, in the xml script, user and password will be needed to create the WRKLGHT database. For example:
<db2 database="WRKLGHT" server="proddb.example.com"
user="wl6admin" password="wl6pass">
If you use non-default port for your DB2 connection, you can add on your port number parameter after the server parameter.
For example:
port="50001"
For user creation, u can follow this link:
http://publib.boulder.ibm.com/infocenter/db2luw/v9r5/index.jsp?topic=%2Fcom.ibm.db2.luw.qb.server.doc%2Fdoc%2Ft0006742.html
The error message looks pretty clear to me. You seem to have upgraded your Worklight installation, but did not upgrade the database scheme used for Application Center.
You need to consult with the IBM Worklight Information Center.
Upgrading to Worklight Server V6.1.0 in a production environment
You do not mention how did you upgrade your installation to v6.1.0, nor what did you do. So take a look at the following topic as well regarding database upgrade, since as mentioned it looks like your DB2 database scheme for the APPCNTR database did not take place:
Manually upgrading the Worklight Server V6.1.0 databases

Ant build in Eclipse with Weblogic 9.2 - deployment exception - Unable to connect to 't3://localhost:7001': invalid type code: 31

It gives me the following exception message as I am trying to deploy an application.
BUILD FAILED
C:\eclipse\workspace\SLGIADMIN\build.xml:14: The following error occurred while executing this line:
C:\eclipse\buildcommon.xml:243: weblogic.Deployer$DeployerException: weblogic.deploy.api.tools.deployer.DeployerException: Unable to connect to 't3://localhost:7001': invalid type code: 31. Ensure the url represents a running admin server and that the credentials are correct. If using http protocol, tunneling must be enabled on the admin server.
I am using ant build in Eclipse and deploying to Weblogic 9.2.
I have been trying to find solution online. I have tried enable the tunneling in the Weblogic console. Doesn't work.
I have seen people mention we can use JDK 1.5 which will turn on tunneling on deploying. I have verified mine version is 1.5 too. I have ensured that too but did not fix the issue.
Invalid type code 31 is always because you're connecting with a different version of Java than what the server is running. Weblogic 9.2 only supports Java 1.5. Make sure that's what your ant task is using. You can also connect with later versions of Java if you set the following property in your client:
-Dsun.lang.ClassLoader.allowArraySyntax=true