javax.naming.NamingException

tip

This might be an issue with the file location in the Spark submit command. Try it with "spark-submit --master spark://master:7077 hello_world_from_pyspark.py {file location}"

tip

Check if you've set a name in Application -> Run. If you didn't, the generated XML is gonna have missing information and then this exception will be thrown.

tip

You might've forgot to add a dependency or it's written wrong. Also, you might be using incompatible versions of Java and Hibernate. More on this here: https://goo.gl/SjSlRA

tip

If you're using Hibernate, this indicates you're missing FasterXML Classmate dependency, which you can add to your dependencies. To add it, the groupId is com.fasterxml and artifactId is Classmate.

tip

Check if you didn't forget to instantiate your topic in the kafka broker.

tip

NoClassDefFoundError means java has failed to find a class you're trying to instantiate, look if you've added the class you're trying to instantiate to the dependencies.

tip

This error means there's a class missing in your classpath during runtime. You need to create a jar with all your dependencies and have it in your classpath. Check Maven Assembly Plugin and how to add your dependencies to a jar: https://goo.gl/U2zr8k

tip

jsp-api and servlet-api jars must NOT be deployed by your web app. They should be marked as provided but not deployed by your app.

tip

You need to add httpcore to your dependencies. Try adding version 4.3 or further.

tip

The server rejects all jars that already belong to the server runtime (such as tomcat-**.jar, servlet**.jar). Consider substituting the CORS filter you're using for this one: https://goo.gl/ctQ7Fs

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

  • Dynamic classloading issue | JBoss Developer
    via by Unknown author,
  • I've pointed pom.xml to the preinstalled V3 b74b. I've configured appserver with mysql and created correspondent resources in appserver. In pom.xml was useed dbVendorName=mssql and createTables=true. I've tried to deploy cmpcustomer sample. But I saw SQL exceptions during the deployment: java.lang.ClassNotFoundException: com.mysql.jdbc.jdbc2.optional.MysqlDataSource See all messages bellow. To reproduce the issue. 1) Install appserver, create S1AS_HOME 2) cvs co appserver-sqe/bootstrap.xml, create SPS_HOME 3) ant -f bootstrap.xml co-ejb 4) cd to appserver-sqe/pe/ejb/ejb30/persistence/datatypes 5) ant mysql-setup (it will setup appserver with mysql) 6) In buildJava2DB.xml replace resources names with your names. For cmpcusomer.ear: cmpcustomer-pool/jdbc/cmpcustomer. I've attached buildJava2DB.xml with these names. 7) ant -f buildJava2DB.xml setup (it will create jdbc resources in appserver) 8) execute through maven cmpcustomer.ear deployment with dbVendorName=mssql and createTables=true, pointing to preinstalled appserver. I've attached an archive INFO: Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver. Dec 16, 2009 1:59:13 PM com.sun.gjc.common.DataSourceObjectBuilder getDataSourceObject SEVERE: jdbc.exc_cnfe_ds java.lang.ClassNotFoundException: com.mysql.jdbc.jdbc2.optional.MysqlDataSource at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:303) at java.lang.ClassLoader.loadClass(ClassLoader.java:248) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:316) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:247) at com.sun.gjc.common.DataSourceObjectBuilder.getDataSourceObject(DataSourceObjectBuilder.java:279) at com.sun.gjc.common.DataSourceObjectBuilder.constructDataSourceObject(DataSourceObjectBuilder.java:108) at com.sun.gjc.spi.ManagedConnectionFactory.getDataSource(ManagedConnectionFactory.java:1167) at com.sun.gjc.spi.DSManagedConnectionFactory.getDataSource(DSManagedConnectionFactory.java:135) at com.sun.gjc.spi.DSManagedConnectionFactory.createManagedConnection(DSManagedConnectionFactory.java:90) at com.sun.enterprise.resource.allocator.LocalTxConnectorAllocator.createResource(LocalTxConnectorAllocator.java:72) at com.sun.enterprise.resource.pool.ConnectionPool.createSingleResource(ConnectionPool.java:834) at com.sun.enterprise.resource.pool.ConnectionPool.createResource(ConnectionPool.java:1087) at com.sun.enterprise.resource.pool.datastructure.ListDataStructure.addResource(ListDataStructure.java:121) at com.sun.enterprise.resource.pool.ConnectionPool.addResource(ConnectionPool.java:268) at com.sun.enterprise.resource.pool.ConnectionPool.createResourceAndAddToPool(ConnectionPool.java:1381) at com.sun.enterprise.resource.pool.ConnectionPool.createResources(ConnectionPool.java:862) at com.sun.enterprise.resource.pool.ConnectionPool.initPool(ConnectionPool.java:220) at com.sun.enterprise.resource.pool.ConnectionPool.internalGetResource(ConnectionPool.java:446) at com.sun.enterprise.resource.pool.ConnectionPool.getResource(ConnectionPool.java:360) at com.sun.enterprise.resource.pool.PoolManagerImpl.getResourceFromPool(PoolManagerImpl.java:227) at com.sun.enterprise.resource.pool.PoolManagerImpl.getResource(PoolManagerImpl.java:151) at com.sun.enterprise.connectors.ConnectionManagerImpl.getResource(ConnectionManagerImpl.java:321) at com.sun.enterprise.connectors.ConnectionManagerImpl.internalGetConnection(ConnectionManagerImpl.java:280) at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:172) at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:149) at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:144) at com.sun.gjc.spi.base.DataSource.getConnection(DataSource.java:105) at org.glassfish.persistence.common.Java2DBProcessorHelper.getConnection(Java2DBProcessorHelper.java:636) at org.glassfish.persistence.common.Java2DBProcessorHelper.executeDDLStatement(Java2DBProcessorHelper.java:572) at org.glassfish.persistence.common.Java2DBProcessorHelper.createOrDropTablesInDB(Java2DBProcessorHelper.java:267) at com.sun.jdo.spi.persistence.support.ejb.ejbc.CMPProcessor.process(CMPProcessor.java:128) at com.sun.jdo.spi.persistence.support.ejb.codegen.CMPDeployerImpl.deploy(CMPDeployerImpl.java:225) at org.glassfish.ejb.startup.EjbDeployer.generateArtifacts(EjbDeployer.java:321) at org.glassfish.javaee.core.deployment.JavaEEDeployer.prepare(JavaEEDeployer.java:209) at com.sun.enterprise.v3.server.ApplicationLifecycle.prepareModule(ApplicationLifecycle.java:644) at org.glassfish.javaee.full.deployment.EarDeployer.prepareBundle(EarDeployer.java:269) at org.glassfish.javaee.full.deployment.EarDeployer.access$200(EarDeployer.java:79) at org.glassfish.javaee.full.deployment.EarDeployer$1.doBundle(EarDeployer.java:131) at org.glassfish.javaee.full.deployment.EarDeployer$1.doBundle(EarDeployer.java:129) at org.glassfish.javaee.full.deployment.EarDeployer.doOnBundles(EarDeployer.java:197) at org.glassfish.javaee.full.deployment.EarDeployer.doOnAllTypedBundles(EarDeployer.java:206) at org.glassfish.javaee.full.deployment.EarDeployer.doOnAllBundles(EarDeployer.java:232) at org.glassfish.javaee.full.deployment.EarDeployer.prepare(EarDeployer.java:129) at com.sun.enterprise.v3.server.ApplicationLifecycle.prepareModule(ApplicationLifecycle.java:644) at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:296) at org.glassfish.kernel.embedded.EmbeddedDeployerImpl.deploy(EmbeddedDeployerImpl.java:214) at org.glassfish.kernel.embedded.EmbeddedDeployerImpl.deploy(EmbeddedDeployerImpl.java:144) at org.glassfish.maven.DeployMojo.execute(DeployMojo.java:75) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:453) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:559) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:500) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:479) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:331) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:292) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129) at org.apache.maven.cli.MavenCli.main(MavenCli.java:301) 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 org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) at org.codehaus.classworlds.Launcher.main(Launcher.java:375) Dec 16, 2009 1:59:13 PM com.sun.enterprise.resource.allocator.LocalTxConnectorAllocator createResource WARNING: poolmgr.create_resource_error Dec 16, 2009 1:59:13 PM com.sun.enterprise.connectors.ConnectionManagerImpl internalGetConnection WARNING: poolmgr.get_connection_failure Dec 16, 2009 1:59:13 PM com.sun.gjc.spi.base.DataSource getConnection WARNING: jdbc.exc_get_conn Dec 16, 2009 1:59:13 PM org.glassfish.persistence.common.Java2DBProcessorHelper logI18NWarnMessage WARNING: Cannot connect to database via JNDI name 'jdbc/cmpcustomer': java.sql.SQLException: Error in allocating a connection. Cause: Class name is wrong or classpath is not set for : com.mysql.jdbc.jdbc2.optional.MysqlDataSource.
    via by easarina,
  • Glassfish 3.1.2 OSE on IBM J9 JVM
    via by petino,
  • Re: ZooInspector on Mac OS X
    via by Kevin Gao,
  • Error in spark-submit but not in pyspark
    via Stack Overflow by nanounanue
    ,
    • javax.naming.NamingException: Could not dereference object [Root exception is java.lang.RuntimeException: Can not find interface declared by Proxy in our CL + org.jboss.web.tomcat.service.WebCtxLoader$ENCLoader@112b0e5] at org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(NamingContext.java:1504) at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:822) at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:686) at javax.naming.InitialContext.lookup(InitialContext.java:392) at com.MyBean.lookupLocationC2MyBean(MyBean.java:53) at java.lang.Thread.run(Thread.java:619) Caused by: java.lang.RuntimeException: Can not find interface declared by Proxy in our CL + org.jboss.web.tomcat.service.WebCtxLoader$ENCLoader@112b0e5 at org.jboss.ejb3.proxy.impl.objectfactory.ProxyObjectFactory.redefineProxyInTcl(ProxyObjectFactory.java:343) at org.jboss.ejb3.proxy.impl.objectfactory.session.SessionProxyObjectFactory.createProxy(SessionProxyObjectFactory.java:134) at org.jboss.ejb3.proxy.impl.objectfactory.session.stateless.StatelessSessionProxyObjectFactory.getProxy(StatelessSessionProxyObjectFactory.java:79) at org.jboss.ejb3.proxy.impl.objectfactory.ProxyObjectFactory.getObjectInstance(ProxyObjectFactory.java:158) at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304) at org.jnp.interfaces.NamingContext.getObjectInstance(NamingContext.java:1479) at org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(NamingContext.java:1496) ... 6 more Caused by: java.lang.ClassNotFoundException: com.MyBeanLocal at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:303) at java.lang.ClassLoader.loadClass(ClassLoader.java:248) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:316) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:247) at org.jboss.ejb3.proxy.impl.objectfactory.ProxyObjectFactory.redefineProxyInTcl(ProxyObjectFactory.java:339) ... 12 more

    Users with the same issue

    zsamboki
    1 times, last one,
    Pilleo
    2 times, last one,
    kimihanif
    1 times, last one,
    Unknown visitor1 times, last one,
    SteVio1989
    2 times, last one,
    1376 more bugmates