Showing posts with label deployment. Show all posts
Showing posts with label deployment. Show all posts

Monday, January 7, 2013

Out of Memory Error When Deploying From Eclipse


While trying to deploy OSB changes from Eclipse to Weblogic I was getting the following error:

Runtime exception occurred during publish. The publish is aborted. Please report the bug with the stack trace. The stack can be found on the log and the Error Log view. java.lang.reflect.UndeclaredThrowableException






















The below error was reported in the Weblogic Server Log

<Jan 7, 2013 11:34:39 AM MST> <Error> <ALSB Console> <BEA-494002> <Internal error occured in OSBConsole : null
java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at com.bea.alsb.console.support.ConsoleSideMBeanInvocationHandler.__invoke(ConsoleSideMBeanInvocationHandler.java:113)
        Truncated. see log file for complete stacktrace
Caused By: java.lang.OutOfMemoryError: Java heap space
        at java.util.Arrays.copyOf(Arrays.java:2786)


The fix for this problem was very straight forward.  I just had to increase the max java heap space that was available to the Weblogic server.   This was done by setting the USER_MEM_ARGS environmental variable and restarting Weblogic.   Weblogic Service will use the memory settings in this variable when it is starting up. 

export USER_MEM_ARGS="-Xms256m -Xmx1024m -XX:CompileThreshold=8000 -XX:PermSize=256m  -XX:MaxPermSize=1024m"

-Xms -> Minimum Java Heap Size
-Xmx -> Maximum Java Heap Size
-XX:PermSize -> Minimum PermGen Size
-XX:MaxPermSize -> Maximum PermGen Size

Friday, December 28, 2012

Deploying OSB code from Eclipse


The following outlines the steps needed to deploy OSB code from Eclipse

1.  Add a new server connection in Eclipse
      a. Go to File -> New -> Server


















     b.  Set the Server Type, Server Host Name and Server Name.  The server name is the name of the server that will be displayed in Eclipse
























      c.  Set the Server Type and then browse to find the location of the OSB domain that you want to access.  This is usually in $MiddlewareHome/user_projects/domains/<domain>.




















      d.  If you have any OSB configuration projects in OSB, you can associate them with this server( We will do this after we create the OSB configuration project in step 2).  Then select Finish.




















      2.  Create a new Oracle Service Bus Configuration Project. 
            a.  Go to File -> New -> Oracle Service Bus Configuration Project



















           b.   Fill in information on the Oracle Service Bus Configuration Project and then select Finish.   The session name and description will be used when saving the changes in OSB.

























         3.  Link the OSB Configuration project to the server you want to deploy to. 
       a.  Right click on the server in the Servers tab and select  Add and Remove.





















      b.   Move the OSB configuration project that you created in step 2 from the Available section to the Configured section and then select Finish.  You want to be careful on how many OSB configuration projects that you associate with the server at one time.  Keep in mind that changes in all of the OSB configuration projects associated with a server will be published when you publish changes to a server.  It is much cleaner and safer to only have one OSB configuration project associated with a server at a time.























      4.  Create new project in the OSB Configuration Project
            a.  You can either create a new project or import a project.



















      b.  Make any changes needed to your new or imported project.
5.  Publish Changes
      a.  Right click on the server and select Publish.