[ 
https://issues.apache.org/jira/browse/DRILL-5910?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16223096#comment-16223096
 ] 

Sorabh Hamirwasia commented on DRILL-5910:
------------------------------------------

I tried this and am seeing below exception. In the stack trace I don't see a 
message for the DrillRuntimeException and this PR is adding factory info only 
in the message of DrillRuntimeException which will again get lost. If it's not 
true can you please share the trace after your fix ?


{code:java}
[mapr@qa-node163 bin]$ ./sqlline -u 
"jdbc:drill:drillbit=10.10.100.163;auth=plain"
java.lang.ExceptionInInitializerError
apache drill 1.12.0-SNAPSHOT
"a drill in the hand is better than two in the bush"
0: jdbc:drill:drillbit=10.10.100.163> !quit
java.lang.NoClassDefFoundError: Could not initialize class 
org.apache.drill.exec.rpc.security.ClientAuthenticatorProvider$Holder
        at 
org.apache.drill.exec.rpc.security.ClientAuthenticatorProvider.getInstance(ClientAuthenticatorProvider.java:45)
        at 
org.apache.drill.exec.rpc.user.UserClient.getAuthenticatorFactory(UserClient.java:284)
        at 
org.apache.drill.exec.rpc.user.UserClient.authenticate(UserClient.java:240)
        at 
org.apache.drill.exec.rpc.user.UserClient.connect(UserClient.java:171)
        at 
org.apache.drill.exec.client.DrillClient.connect(DrillClient.java:432)
        at 
org.apache.drill.exec.client.DrillClient.connect(DrillClient.java:379)
        at 
org.apache.drill.jdbc.impl.DrillConnectionImpl.<init>(DrillConnectionImpl.java:158)
        at 
org.apache.drill.jdbc.impl.DrillJdbc41Factory.newDrillConnection(DrillJdbc41Factory.java:72)
        at 
org.apache.drill.jdbc.impl.DrillFactory.newConnection(DrillFactory.java:69)
        at 
org.apache.calcite.avatica.UnregisteredDriver.connect(UnregisteredDriver.java:143)
        at org.apache.drill.jdbc.Driver.connect(Driver.java:72)
        at sqlline.DatabaseConnection.connect(DatabaseConnection.java:167)
        at sqlline.DatabaseConnection.getConnection(DatabaseConnection.java:213)
        at sqlline.Commands.close(Commands.java:925)
        at sqlline.Commands.quit(Commands.java:889)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at 
sqlline.ReflectiveCommandHandler.execute(ReflectiveCommandHandler.java:36)
        at sqlline.SqlLine.dispatch(SqlLine.java:742)
        at sqlline.SqlLine.begin(SqlLine.java:621)
        at sqlline.SqlLine.start(SqlLine.java:375)
        at sqlline.SqlLine.main(SqlLine.java:268)
Exception in thread "main" java.lang.NoClassDefFoundError: Could not initialize 
class org.apache.drill.exec.rpc.security.ClientAuthenticatorProvider$Holder
        at 
org.apache.drill.exec.rpc.security.ClientAuthenticatorProvider.getInstance(ClientAuthenticatorProvider.java:45)
        at 
org.apache.drill.exec.rpc.user.UserClient.getAuthenticatorFactory(UserClient.java:284)
        at 
org.apache.drill.exec.rpc.user.UserClient.authenticate(UserClient.java:240)
        at 
org.apache.drill.exec.rpc.user.UserClient.connect(UserClient.java:171)
        at 
org.apache.drill.exec.client.DrillClient.connect(DrillClient.java:432)
        at 
org.apache.drill.exec.client.DrillClient.connect(DrillClient.java:379)
        at 
org.apache.drill.jdbc.impl.DrillConnectionImpl.<init>(DrillConnectionImpl.java:158)
        at 
org.apache.drill.jdbc.impl.DrillJdbc41Factory.newDrillConnection(DrillJdbc41Factory.java:72)
        at 
org.apache.drill.jdbc.impl.DrillFactory.newConnection(DrillFactory.java:69)
        at 
org.apache.calcite.avatica.UnregisteredDriver.connect(UnregisteredDriver.java:143)
        at org.apache.drill.jdbc.Driver.connect(Driver.java:72)
        at sqlline.DatabaseConnection.connect(DatabaseConnection.java:167)
        at sqlline.DatabaseConnection.getConnection(DatabaseConnection.java:213)
        at sqlline.Commands.close(Commands.java:925)
        at sqlline.Commands.closeall(Commands.java:899)
        at sqlline.SqlLine.begin(SqlLine.java:649)
        at sqlline.SqlLine.start(SqlLine.java:375)
        at sqlline.SqlLine.main(SqlLine.java:268)
{code}


> ClassNotFoundException message enhancement 
> -------------------------------------------
>
>                 Key: DRILL-5910
>                 URL: https://issues.apache.org/jira/browse/DRILL-5910
>             Project: Apache Drill
>          Issue Type: Improvement
>    Affects Versions: 1.11.0
>            Reporter: Volodymyr Tkach
>            Assignee: Volodymyr Tkach
>            Priority: Minor
>              Labels: ready-to-commit
>             Fix For: 1.12.0
>
>
> We need to add factory name in exception message  when ClassNotFoundException 
> is caught and DrillRuntimeException is than re-thrown in 
> ClientAuthenticatorProvider constructor.
> Steps to repoduce:
> 1) Configure plain authentication
> 2) Add 
> -Ddrill.customAuthFactories=org.apache.drill.exec.rpc.security.maprsasl.MapRSaslFactory
>  to SQLLINE_JAVA_OPTS or another class that is not present in classpath.
> 3) Run sqlline and connect to drillbit



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to