WebSphere Application Server JVM arguments not being read properly

13,929

Where are you setting these parameters?
You should set them via admin console:
Servers > Server Types > WebSphere application servers > server_name. Then, click Java and process management > Process definition > Java virtual machine

And either put them in the:

  • Generic JVM arguments using -Dparameter=value
  • or Custom Properties defining parameter as name and value as value

UPDATE
When I've pasted your variables, it contained following invisible chars instead of -D and got the same exception:

–Dsecurityresource

However when I went to :

C:\IBM\WebSphere\AppServer85\profiles\AppSrv1\config\cells\cellName\nodes\nodeBame\servers\server1 

and manually fixed entry in the server.xml file, server started correctly.

 <jvmEntries xmi:id="JavaVirtualMachine_1183121908656" .... genericJvmArguments="-Xquickstart -Dsecurityresource=/web/sharedLibraries/security_config.xml -DConfig=/web/properties/Config.ini" ...>

So please open that file with text editor and fix the - char before first D.

Share:
13,929

Related videos on Youtube

naamadheya
Author by

naamadheya

Updated on September 15, 2022

Comments

  • naamadheya
    naamadheya over 1 year

    We are using WebSphere 7- Application server for deploying project and this application server is given simple JVM arguments like this,

    –Dsecurityresource=/web/sharedLibraries/security_config.xml -DConfig=/web/properties/Config.ini
    

    But when tried to start the application server, a native error (native_stderr.log) is thrown as this,

    <?xml version="1.0" ?>
    
    <verbosegc version="GA24_Java6_SR15_20131016_1337_B170922_CMPRSS">
    
    <initialized>
      <attribute name="gcPolicy" value="-Xgcpolicy:optthruput" />
      <attribute name="maxHeapSize" value="0x100000000" />
      <attribute name="initialHeapSize" value="0xc0000000" />
      <attribute name="compressedRefs" value="true" />
      <attribute name="compressedRefsDisplacement" value="0x0" />
      <attribute name="compressedRefsShift" value="0x3" />
      <attribute name="pageSize" value="0x10000" />
      <attribute name="requestedPageSize" value="0x10000" />
    </initialized>
    
    Exception in thread "main" java.lang.NoClassDefFoundError: Dsecurityresource=.web.sharedLibraries.security-config.xml
    Caused by: java.lang.ClassNotFoundException: Dsecurityresource=.web.sharedLibraries.FalconCluster.security-config.xml
        at java.net.URLClassLoader.findClass(URLClassLoader.java:434)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:677)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:358)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:643)
    </verbosegc>
    Could not find the main class: Dsecurityresource=/web/sharedLibraries/security-config.xml.  Program will exit.
    

    The JVM arguments are given at the following location in WebSphere.

    Servers > Server Types > WebSphere application servers > server_name >Java and process management > Process definition > Java virtual machine and in Generic JVM arguments
    

    its strange as it is throwing NoClassDefFoundError.

    or is there any other configuration in Websphere that might be causing this problem?

    Note : files and path provided in the JVM arguments exists and has read and execute permissions

    Thanks in advance.

  • naamadheya
    naamadheya over 9 years
    Yes, Parameters are set at the right location as you said Servers > Server Types > WebSphere application servers > server_name >Java and process management > Process definition > Java virtual machine and in Generic JVM arguments. sorry i forgot to mention that earlier.
  • Gas
    Gas over 9 years
    Since it tells about java.lang.NoClassDefFoundError: Dsecurityresource=.web.sharedLibraries.security-config.xml I'm guessing that there is hidden \n after that paramter. Try to copy these params to plain text editor and back, or clean and type them manually.
  • naamadheya
    naamadheya over 9 years
    no \n characters. All parameters are fine. But still the same issue.
  • Gas
    Gas over 9 years
    @Rajath Updated answer. Probably found your issue.
  • naamadheya
    naamadheya over 9 years
    Am late on reply but thanks a lot. It worked great. If you could help me with my other issues in WAS. It would be really great. stackoverflow.com/questions/25721588/…
  • Venkata Ramireddy CH
    Venkata Ramireddy CH about 8 years
    After adding arguments as we discussed here, then if I restart the server, these arguments are cleaned up. so ending up without having arguments. May I know the reason for this?
  • Gas
    Gas about 8 years
    @VenkataRamireddyCH Please create new question specifying your environment, version and problem in more details. You should add arguments via admin console not directly by editing file, as it might be overwritten in ND cell during synchronization.
  • Nagarajan S R
    Nagarajan S R about 8 years
    I came here for removing a similar issue but I located the file from the answer. Thanks guys