Try PubSub+

Meet error javax.naming.NamingException: Username must be specified when consume solace

OwenOwen Member Posts: 10

Hi gurus,
My scenario is capture Solace JMS message then deliver to oracle via OGG Application Adapter (jmsvam).
throw below error message when start ogg extract process
it's stranger what username should be specified? but i already setup java.naming.security.principal
does my reference solace jars are correct?

May 21, 2021 7:29:34 AM oracle.goldengate.messaging.VamMain main
INFO: Starting main: class oracle.goldengate.messaging.VamMain, with arguments [length=0]: {}  => using context(s): -o, /oracle/goldengate/messaging/default-vam-jms-context.xml
2021-05-21 07:29:35: JMSPROVIDER(jmsprovider.c:528) [ERROR]: Error occurred (Java exception): Error calling static void Method UserExitMain.main:  org.springframework.beans.factory.Bea
nCreationException: Error creating bean with name 'jndiConnectionFactory' defined in class path resource [oracle/goldengate/messaging/default-vam-jms-context.xml]: Invocation of init m
ethod failed; nested exception is javax.naming.NamingException: Username must be specified 

properties configuration

java.naming.provider.url=smf://ip:55555
java.naming.factory.initial=com.solacesystems.jndi.SolJNDIInitialContextFactory
[email protected]
java.naming.security.credentials=default
gg.source=jms
gg.jms.connectionFactory=/jms/cf/default
gg.jms.destination=queue/ogg/1
jvm.bootoptions=-Djava.class.path=dirprm:ggjava/ggjava.jar:/home/opc/oggadapter/soljmslib/sol-jms-10.10.0.jar:/home/opc/oggadapter/soljmslib/sol-jcsmp-10.10.0.jar:/home/opc/oggadapter/soljmslib/sol-common-10.10.0.jar:/home/opc/oggadapter/soljmslib/javaee-api-8.0.jar:/home/opc/oggadapter/soljmslib/commons-lang-2.6.jar:/home/opc/oggadapter/soljmslib/commons-logging-1.1.3.jar:/home/opc/oggadapter/soljmslib/geronimo-jms_1.1_spec-1.1.1.jar:/home/opc/oggadapter/soljmslib/org.apache.servicemix.bundles.jzlib-1.0.7_2.jar:/home/opc/oggadapter/soljmslib/org.osgi.annotation-6.0.0.jar

Comments

  • amackenzieamackenzie Member, Employee Posts: 80 Solace Employee

    Are you missing: gg.handler.oggjms.useJndi=true

  • OwenOwen Member Posts: 10

    tried add gg.handler.oggjms.useJndi=true still not work

  • amackenzieamackenzie Member, Employee Posts: 80 Solace Employee

    You could add the username to the url.
    Try smf://[email protected]:55555

  • OwenOwen Member Posts: 10
    edited May 24 #5

    @amackenzie after add username to url that error was resolved, but there is new error
    what is the mean 401: The RADIUS profile is shutdown?

    2021-05-24 11:14:03  INFO    OGG-00178  VAM Client Report <Error occured in jmsprovider.c[528]: Error oc
    curred (Java exception): Error calling static void Method UserExitMain.main:  org.springframework.beans.
    factory.BeanCreationException: Error creating bean with name 'jndiConnectionFactory' defined in class pa
    th resource [oracle/goldengate/messaging/default-vam-jms-context.xml]: Invocation of init method failed;
     nested exception is javax.naming.NamingException: JNDI lookup failed - 401: The RADIUS profile is shutd
    own [Root exception is ((Client name: dedwdbadm02.corpdev.hkjc.com/20237/#00190001/Ssl4SEoaYr   Local ad
    dr: 1.19.14.22 Local port: 46543   Remote addr: 1.19.13.23  Remote port: 55555) - )  com.solaces
    ystems.jcsmp.JCSMPErrorResponseException: 401: The RADIUS profile is shutdown [Subcode:1]]
    
  • OwenOwen Member Posts: 10

    it's strange that it can success connect to my testing solace (docker version with default configuration) , but it encounter 401: The RADIUS profile is shutdown error when connect to customer solace environment.

  • OwenOwen Member Posts: 10

    @amackenzie said:
    You could add the username to the url.
    Try smf://[email protected]:55555

    Hi @amackenzie, may i know how to add vpn for this format url?
    like that "smf://[email protected]@ip:55555"?

  • marcmarc Member, Administrator, Moderator, Employee Posts: 421 admin

    Hi @Owen,
    My guess is that your app is fine if it connects to your environment. The event broker has different ways to configure basic authentication, RADIUS being one of them. You'll need to follow-up with the customer and have them check on the RADIUS profiles configured and make sure they aren't shutdown. Here is some info from docs that shows how to configure RADIUS: https://docs.solace.com/Configuring-and-Managing/Configuring-RADIUS-Authentication.htm

    Note that caution in yellow/orange:

    When you shut down a RADIUS profile, all users and/or clients attempting to authenticate using the RADIUS profile will fail until it is enabled again .

    Hope that helps!

  • amackenzieamackenzie Member, Employee Posts: 80 Solace Employee

    @Owen said:

    @amackenzie said:
    You could add the username to the url.
    Try smf://[email protected]:55555

    Hi @amackenzie, may i know how to add vpn for this format url?
    like that "smf://[email protected]@ip:55555"?

    I am not sure you can add the VPN on the URI. There is a property you can pass: Solace_JMS_VPN=vpn_name if you need a VPN that isn't Default.

Sign In or Register to comment.