How to Enable JDK 7 for Websphere Profile - java

I am using Websphere 5.5.0 with Default JDk version as 6.
I installed new jdk 7. The Jdk7 got enabled only for the server and not for the entire profile.
Then I ran the managesdk command to enable the Jdk 7 for the entire profile.
managesdk.bat -enableProfile -profileName AppSrv01 -sdkName 1.7_64 -enableServers
But I see the below error:
CWSDK0009E: Unexpected exception com.ibm.websphere.management.exception.ConfigServiceException: RepositoryException while updating documents in master repository
CWSDK1018I: Profile AppSrv01 could not be enabled to use SDK 1.7_64.
CWSDK1002I: The requested managesdk task failed. See previous messages
List available profiles has the following info:
managesdk.bat -listenabledProfileAll
CWSDK1004I: Profile AppSrv01 :
CWSDK1006I: PROFILE_COMMAND_SDK = 1.6_64
CWSDK1008I: Node mvm-wNode01 SDK name: 1.6_64
CWSDK1009I: Server server1 SDK name: 1.7_64
CWSDK1001I: Successfully performed the requested managesdk task.
Any help from anybody ?
Why cannot the profile be enabled for jdk7 ?

Finally able to resolve it through multiple hits and trial.
Looks like managesdk command needs different permissions from the user who accesses the admin console.
C:\nitesh\websphere8.5.5\IBM\WebSphere\AppServer\profiles\AppSrv01\bin
C:\nitesh\websphere8.5.5\IBM\WebSphere\AppServer\bin\sdk
C:\nitesh\websphere8.5.5\IBM\WebSphere\AppServer\properties\sdk
C:\nitesh\websphere8.5.5\IBM\WebSphere\AppServer\properties
Allowed all file permissions ( on the above folders ) to all the users.

Related

SAP Hybris on Mac OS Catalina

I just update my Mac OS to Catalina version and my Hybris server stopped turning on. So on command ./hybrisserver.sh start I get this
MacBook-Pro-Sasha:platform sashayukhimchuk$ ./hybrisserver.sh start
Starting hybrisPlatform on Tomcat...
/Users/sashayukhimchuk/hybris/CXCOMM181100P_1-70004085/hybris/bin/platform/tomcat/bin/wrapper.sh:
line 1388: 4614 Killed: 9
"/Users/sashayukhimchuk/hybris/CXCOMM181100P_1-70004085/hybris/bin/platform/tomcat/bin/./wrapper-macosx-universal-64"
"/Users/sashayukhimchuk/hybris/CXCOMM181100P_1-70004085/hybris/bin/platform/tomcat/conf/wrapper.conf"
wrapper.syslog.ident="hybrisPlatform"
wrapper.pidfile="/Users/sashayukhimchuk/hybris/CXCOMM181100P_1-70004085/hybris/bin/platform/tomcat/bin/hybrisPlatform.pid"
wrapper.daemonize=TRUE wrapper.name="hybrisPlatform"
wrapper.displayname="hybrisPlatform on Tomcat"
wrapper.statusfile="/Users/sashayukhimchuk/hybris/CXCOMM181100P_1-70004085/hybris/bin/platform/tomcat/bin/hybrisPlatform.status"
wrapper.java.statusfile="/Users/sashayukhimchuk/hybris/CXCOMM181100P_1-70004085/hybris/bin/platform/tomcat/bin/hybrisPlatform.java.status" wrapper.script.version=3.5.29 --
Waiting for hybrisPlatform on Tomcat..................
WARNING: hybrisPlatform on Tomcat may have failed to start.
I had to allow the wrapper-macosx-universal-64 and some other libs in Systemsettings > Security > General while starting the Hybris Server.
Remove the app (and all the necesary side apps) from Mac OS quarantine:
xattr -d com.apple.quarantine wrapper-macosx-universal-64
You can find the blocked wrapper under /bin/platform/tomcat/bin
If you get an error saying that the wrapper-macosx-universal-64 or libwrapper-macosx-universal-64.jnilib cannot be opened because the developer cannot be verified, proceed as follows:
Go to system preferences security and privacy
Click the General tab.
In the list, select the executable that you tried to run, and unblock it.
Run the command again.
to fix it, u need new tomcat in bin/platform. I just create new hybris project with .zip and copy tomcat folder to my hybris project and after some confirming about security in Mac OS setting, it works
It's probably could happen as a result that wrapper-macosx-universal-64 was deleted by macOS during a security check.
You can copy the file from the original path in hybris zip archive -
hybris-dir/bin/platform/tomcat/wrapper-macosx-universal-64
to your installation and follow the actions related to macos developers security check to allow starting the tomcat

Confluence configuration Spring Application context has not been set

I tried to install confluence on my own ubuntu server, but always failed. The error is:
com.atlassian.util.concurrent.LazyReference$InitializationException: java.lang.IllegalStateException: Spring Application context has not been set
at com.atlassian.util.concurrent.LazyReference.getInterruptibly(LazyReference.java:149)
caused by: java.lang.IllegalStateException: Spring Application context has not been set
at com.atlassian.spring.container.SpringContainerContext.getComponent(SpringContainerContext.java:48)
I saw some solutions in the jira confluence forum saying try to fix the permission of installed directory and home directory. I tried but failed again. How can I fix the problem.
In my case the issue was corrupted confluence.cfg.xml file (contains DB connection stings and other settings). The file size was 0 bytes.
I would suggest to use a VM to create a new installation and borrow confluence.cfg.xml from that installation.
It's embarrassing that this behavior has been allowed to exist for nearly 7 years in a commercial product. This is a basic stuff...
I wish that was on instructions somewhere:
Make single backup copy of confluence.cfg.xml immediately before any writes to it by the application. Application should be able to restore from backed up copy if it gets corrupted.
Atlassian documentation lists the following causes of this problem:
The user running Confluence does not have write permissions to the home folder defined in <install>/confluence/WEB-INF/classes/confluence-init.properties or the install directory.
You are running Confluence as the root user or if you have an application firewall enabled (SeLinux or AppArmor).
The database driver is not located in the <install>/confluence/WEB-INF/lib folder or you are using a database version that is incompatible with the bundled driver.
The hostname of the server can not be resolved.
In my case I was running it as root user inside docker container.

Apache tomcat7 as windows service

I am trying to create a windows service for Apache tomcat 7.0.45.
( in windows version 7)
I executed this :
C:/tomcat7/bin> service install Mytomcat7
Windows service has been created. but it wont start and throws "specific server error code 4".
Can you please help with the steps to create windows service.
I had the same problem!
Found out, that the service.bat didn't configure the service the right way. If you enable the logging from your service starter:
Then you'll see in your loggs something like:
[2014-02-19 16:40:35] [error] ( javajni.c:863 ) [ 2636] FindClass org/apache/catalina/startup/Bootstrap failed
[2014-02-19 16:40:35] [debug] ( javajni.c:964 ) [ 2636] Java Worker thread finished org/apache/catalina/startup/Bootstrap:main with status=3
[2014-02-19 16:40:35] [error] ( prunsrv.c:1183) [ 5000] Failed to start Java
[2014-02-19 16:40:35] [error] ( prunsrv.c:1536) [ 5000] ServiceStart returned 4
You'll notice that there is some classpath problem with the starter. In fact that's the problem! Your service.bat didn't configure the service the right way:
Note: You can also choose "Use default" above "Java Virtual Machine" to use whatever JVM is defined in JAVA_HOME
You'll need to set the classpath correctly:
c:\webclient\apache-tomcat\bin\tomcat-juli.jar;c:\webclient\apache-tomcat\bin\tomcat-juli.jar;c:\webclient\apache-tomcat\bin\bootstrap.jar
In my case i "installed" tomcat at: c:\webclient\apache-tomcat replace that part with yours. In my case not even the Java VM was set.. I'm not shure whether this is a problem with the current versions of tomcat (and it's service.bat), or with some sort of permission problem on the windows server itself..
To solve this error perform the following steps:
Run the tomcat7w.exe monitor application found in <TOMCAT_HOME>/bin.Tomcat7w is a GUI application for monitoring and configuring Tomcat services. If you named your service Mytomcat7 you will need to rename this file to Mytomcat7.exe before running it
In the "Startup" tab change the value of "Mode" from jvm to Java
Do the same in the "Shutdown" tab
The easiest way to setup a tomcat Windows service is to use the Tomcat Windows Service Installer found on the same page as tomcat downloads.
http://tomcat.apache.org/download-70.cgi
However, if you are unable to use this installer. Then you can as you have try the above. The service created 'Mytomcat7' can be managed by the tomcat7w.exe file, after you rename it to 'Mytomcat7w.exe'.
Run the renamed file and you will be able to see all options for the service. The error you are seeing is likely related to an invalid JVM location or JVM mode not set to auto.
Details of settings found here:
http://tomcat.apache.org/tomcat-7.0-doc/windows-service-howto.html
I would just use the installer, it will make your life easier.
http://mirror.ox.ac.uk/sites/rsync.apache.org/tomcat/tomcat-7/v7.0.50/bin/apache-tomcat-7.0.50.exe

Newrelic Install for WebSphere - ClassNotFoundException

We've installed the NewRelic java agent on our WebSphere Application / WebSphere Commerce system and in the NewRelic logs we are seeing this:
Sep 3, 2013 22:47:53 -0400 NewRelic 14 INFO: The data collector is temporarily unavailable. This can happen periodically. In the event that availability of our servers is not restored after a period of time, then please report this to New Relic. java.net.SocketException: java.lang.ClassNotFoundException: Cannot find the specified class com.ibm.websphere.ssl.protocol.SSLSocketFactory
at javax.net.ssl.DefaultSSLSocketFactory.a(SSLSocketFactory.java:11)
at javax.net.ssl.DefaultSSLSocketFactory.createSocket(SSLSocketFactory.java:6)
at com.ibm.net.ssl.www2.protocol.https.c.afterConnect(c.java:161)
at com.ibm.net.ssl.www2.protocol.https.d.connect(d.java:36)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1184)
at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:390)
at com.ibm.net.ssl.www2.protocol.https.b.getResponseCode(b.java:75)
at com.newrelic.agent.transport.DataSenderImpl.connectAndSend(DataSenderImpl.java:550)
at com.newrelic.agent.transport.DataSenderImpl.send(DataSenderImpl.java:600)
at com.newrelic.agent.transport.DataSenderImpl.invoke(DataSenderImpl.java:480)
at com.newrelic.agent.transport.DataSenderImpl.invokeNoRunId(DataSenderImpl.java:475)
at com.newrelic.agent.transport.DataSenderImpl.getRedirectHost(DataSenderImpl.java:203)
at com.newrelic.agent.transport.DataSenderImpl.connect(DataSenderImpl.java:193)
at com.newrelic.agent.RPMService.launch(RPMService.java:194)
at com.newrelic.agent.rpm.RPMConnectionServiceImpl$RPMConnectionTask.attemptConnection(RPMConnectionServiceImpl.java:301)
at com.newrelic.agent.rpm.RPMConnectionServiceImpl$RPMConnectionTask.access$1100(RPMConnectionServiceImpl.java:101)
at com.newrelic.agent.rpm.RPMConnectionServiceImpl$RPMConnectionTask$3.run(RPMConnectionServiceImpl.java:235)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:452)
at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:328)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:161)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:109)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:191)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:215)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:897)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:919)
at java.lang.Thread.run(Thread.java:738)
Caused by: java.lang.ClassNotFoundException: Cannot find the specified class com.ibm.websphere.ssl.protocol.SSLSocketFactory
at javax.net.ssl.SSLJsseUtil.b(SSLJsseUtil.java:125)
at javax.net.ssl.SSLSocketFactory.getDefault(SSLSocketFactory.java:3)
at javax.net.ssl.HttpsURLConnection.getDefaultSSLSocketFactory(HttpsURLConnection.java:41)
at javax.net.ssl.HttpsURLConnection.<init>(HttpsURLConnection.java:46)
at com.ibm.net.ssl.www2.protocol.https.b.<init>(b.java:26)
at com.ibm.net.ssl.www2.protocol.https.Handler.openConnection(Handler.java:1)
at com.ibm.net.ssl.www2.protocol.https.Handler.openConnection(Handler.java:5)
at java.net.URL.openConnection(URL.java:957)
at com.newrelic.agent.transport.DataSenderImpl.createConnection(DataSenderImpl.java:676)
at com.newrelic.agent.transport.DataSenderImpl.connectAndSend(DataSenderImpl.java:540)
... 18 more
There seems to be some documentation about how to update an Eclipse based IDE environment to overcome this error in other situations, but nothing specific to NewRelic. Has anyone seen this before that can offer suggestions on how to fix the issue?
The next release of New Relics Java agent should make it possible to run without any configuration changes. With version 2.21.X and earlier please submit a request for support at support.newrelic.com
Read and see if this publication gives you a hint:
http://www-01.ibm.com/support/docview.wss?uid=swg21584437
I went through the same thing. As you might have gathered from the article liked by Robban WebSphere has some restriction in the SSLConnectionFactory, so a quit fix would be to just edit the newrelic.yml and configure:
# The agent communicates with New Relic via https by
# default. If you want to communicate with newrelic via http,
# then turn off SSL by setting this value to false.
# This work is done asynchronously to the threads that process your
# application code, so response times will not be directly affected
# by this change.
# Default is true.
ssl: false
Good luck.
Version 3.0.0 or later of New Relic's Java Agent should completely resolve this issue without any custom configuration, certainly without turning off SSL! Release notes.

Unable to start Neo4j on Windows, no error messages

I'm using the following on Windows 7:
neo4j-community-1.9.2
Java 7 Update 25
I have Windows Firewall disabled.
When I start Neo4j.bat, both as Administrator and normally, I get the following message:
c:\Tools\neo4j\bin>Neo4j.bat
28/07/13 9:34:27 PM org.neo4j.server.AbstractNeoServer INFO: Setting startup tim
eout to: 120000ms based on -1
A blank Java console window pops up, no messages, then the window disappears after a minute or so.
When I go to http://localhost:7474/, I just get a server not found error.
If I try to install it as a service, the service wouldn't start.
Any ideas what I need to do to start Neo4j? I see here that Neo4j 1.9 does support Java 7:
http://blog.neo4j.org/2013/03/neo4j-19m05-released-wrapping-up.html
base.bat correctly points to windows-service-wrapper-5.jar, so not the windows-service-wrapper-*.jar problem that some people have had in the past. It would be helpful if it outputted an error message.
I just tried it with neo4j 2.0 milestone, and it didn't make any difference. The Java window pops up with no messages, http://localhost:7474/ gets a server not found error, then the Java window closes after a minute or two.
I added JAVA_HOME and JRE_HOME system variables, made no difference. I think I would get an error if Neo4j was not able to locate Java anyway.
I've fixed it.
With help from Neo4j's Google Group, I looked at the logs in data/logs/*.log and data/graph.db/messages.log, and found the following exception:
Caused by: java.rmi.server.ExportException: Port already in use: 1337; nested exception is:
java.net.BindException: Address already in use: JVM_Bind
Once I disabled my other service that uses that port, Neo4j's web admin at http://localhost:7474 worked. I then found out port 1337 is used by Neo4j's remote shell, I disabled it by adding enable_remote_shell = false to neo4j.properties, then I was able to have both Neo4j and my other service running.
I'm using the version 2.2.1 community edition of Neo4j on Windows 7, Java 1.8 update 45
In my case the log file messages.log was under default.graphdb directory. In there, you'll see the root cause of the problem.

Categories