Mobilefirst 7.1 - Issue with JAX-ws jars files - ibm-mobilefirst

I a getting some issues(JVM Verify Error) when using jaxb, Jax-ws jar files in Liberty Core 8.5 (Standalone Test environment) installed with mobilefirst.
But the same thing works very well in Development server.
vax.servlet.ServletException: java.lang.VerifyError: JVMVRFY013 class loading constraint violated; class=com/sun/xml/ws/client/WSServiceDelegate, method=createDispatch(Ljavax/xml/namespace/QName;Ljavax/xml/bind/JAXBContext;Ljavax/xml/ws/Service$Mode;)Ljavax/xml/ws/Dispatch;, pc=0
at com.worklight.adapters.rest.JAXRSSandbox$2.doFilter(JAXRSSandbox.java:378)
at com.worklight.adapters.rest.JAXRSSandbox.handleRequest(JAXRSSandbox.java:383)
Caused by: java.lang.VerifyError: JVMVRFY013 class loading constraint violated; class=com/sun/xml/ws/client/WSServiceDelegate, method=createDispatch(Ljavax/xml/namespace/QName;Ljavax/xml/bind/JAXBContext;Ljavax/xml/ws/Service$Mode;)Ljavax/xml/ws/Dispatch;, pc=0
at com.worklight.adapters.rest.JAXRSAdapterRequestInterceptor.accessTheResourceWithIdentity(JAXRSAdapterRequestInterceptor.java:98)
at com.worklight.adapters.rest.JAXRSAdapterRequestInterceptor.access$000(JAXRSAdapterRequestInterceptor.java:41)
at com.worklight.adapters.rest.JAXRSAdapterRequestInterceptor$1.run(JAXRSAdapterRequestInterceptor.java:86)
at com.worklight.adapters.rest.JAXRSAdapterRequestInterceptor$1.run(JAXRSAdapterRequestInterceptor.java:83)
at com.worklight.adapters.rest.JAXRSAdapterRequestInterceptor.handleRequest(JAXRSAdapterRequestInterceptor.java:83)
[4/19/16 23:56:00:135 EDT] 000001a8 com.ibm.ws.logging.internal.impl.IncidentImpl I FFDC1015I: An FFDC Incident has been created: "javax.servlet.ServletException: java.lang.VerifyError: JVMVRFY013 class loading constraint violated; class=com/sun/xml/ws/client/WSServiceDelegate, method=createDispatch(Ljavax/xml/namespace/QName;Ljavax/xml/bind/JAXBContext;Ljavax/xml/ws/Service$Mode;)Ljavax/xml/ws/Dispatch;, pc=0 com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter 82" at ffdc_16.04.19_23.55.59.0.log
[4/19/16 23:56:00:368 EDT] 000001a8 com.ibm.ws.logging.internal.impl.IncidentImpl I FFDC1015I: An FFDC Incident has been created: "javax.servlet.ServletException: java.lang.VerifyError: JVMVRFY013 class loading constraint violated; class=com/sun/xml/ws/client/WSServiceDelegate, method=createDispatch(Ljavax/xml/namespace/QName;Ljavax/xml/bind/JAXBContext;Ljavax/xml/ws/Service$Mode;)Ljavax/xml/ws/Dispatch;, pc=0 com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter 144" at ffdc_16.04.19_23.56.00.0.log
[4/19/16 23:56:00:386 EDT] 000001a8 com.ibm.ws.logging.internal.impl.IncidentImpl I FFDC1015I: An FFDC Incident has been created: "javax.servlet.ServletException: java.lang.VerifyError: JVMVRFY013 class loading constraint violated; class=com/sun/xml/ws/client/WSServiceDelegate, method=createDispatch(Ljavax/xml/namespace/QName;Ljavax/xml/bind/JAXBContext;Ljavax/xml/ws/Service$Mode;)Ljavax/xml/ws/Dispatch;, pc=0 com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters 1064" at ffdc_16.04.19_23.56.00.1.log
[4/19/16 23:56:00:407 EDT] 000001a8 com.ibm.ws.webcontainer.webapp E SRVE0315E: An exception occurred: java.lang.Throwable: javax.servlet.ServletException: java.lang.VerifyError: JVMVRFY013 class loading constraint violated; class=com/sun/xml/ws/client/WSServiceDelegate, method=createDispatch(Ljavax/xml/namespace/QName;Ljavax/xml/bind/JAXBContext;Ljavax/xml/ws/Service$Mode;)Ljavax/xml/ws/Dispatch;, pc=0
Caused by: javax.servlet.ServletException: java.lang.VerifyError: JVMVRFY013 class loading constraint violated; class=com/sun/xml/ws/client/WSServiceDelegate, method=createDispatch(Ljavax/xml/namespace/QName;Ljavax/xml/bind/JAXBContext;Ljavax/xml/ws/Service$Mode;)Ljavax/xml/ws/Dispatch;, pc=0
at com.worklight.adapters.rest.JAXRSSandbox$2.doFilter(JAXRSSandbox.java:378)
at com.worklight.adapters.rest.JAXRSSandbox.handleRequest(JAXRSSandbox.java:383)
Caused by: java.lang.VerifyError: JVMVRFY013 class loading constraint violated; class=com/sun/xml/ws/client/WSServiceDelegate, method=createDispatch(Ljavax/xml/namespace/QName;Ljavax/xml/bind/JAXBContext;Ljavax/xml/ws/Service$Mode;)Ljavax/xml/ws/Dispatch;, pc=0
at com.worklight.adapters.rest.JAXRSAdapterRequestInterceptor.accessTheResourceWithIdentity(JAXRSAdapterRequestInterceptor.java:98)
at com.worklight.adapters.rest.JAXRSAdapterRequestInterceptor.access$000(JAXRSAdapterRequestInterceptor.java:41)
at com.worklight.adapters.rest.JAXRSAdapterRequestInterceptor$1.run(JAXRSAdapterRequestInterceptor.java:86)
at com.worklight.adapters.rest.JAXRSAdapterRequestInterceptor$1.run(JAXRSAdapterRequestInterceptor.java:83)
at com.worklight.adapters.rest.JAXRSAdapterRequestInterceptor.handleRequest(JAXRSAdapterRequestInterceptor.java:83)
javax.servlet.ServletException: java.lang.VerifyError: JVMVRFY013 class loading constraint violated; class=com/sun/xml/ws/client/WSServiceDelegate, method=createDispatch(Ljavax/xml/namespace/QName;Ljavax/xml/bind/JAXBContext;Ljavax/xml/ws/Service$Mode;)Ljavax/xml/ws/Dispatch;, pc=0
at com.worklight.adapters.rest.JAXRSSandbox$2.doFilter(JAXRSSandbox.java:378)
at com.worklight.adapters.rest.JAXRSSandbox.handleRequest(JAXRSSandbox.java:383)
Caused by: java.lang.VerifyError: JVMVRFY013 class loading constraint violated; class=com/sun/xml/ws/client/WSServiceDelegate, method=createDispatch(Ljavax/xml/namespace/QName;Ljavax/xml/bind/JAXBContext;Ljavax/xml/ws/Service$Mode;)Ljavax/xml/ws/Dispatch;, pc=0
at com.worklight.adapters.rest.JAXRSAdapterRequestInterceptor.accessTheResourceWithIdentity(JAXRSAdapterRequestInterceptor.java:98)
at com.worklight.adapters.rest.JAXRSAdapterRequestInterceptor.access$000(JAXRSAdapterRequestInterceptor.java:41)
at com.worklight.adapters.rest.JAXRSAdapterRequestInterceptor$1.run(JAXRSAdapterRequestInterceptor.java:86)
at com.worklight.adapters.rest.JAXRSAdapterRequestInterceptor$1.run(JAXRSAdapterRequestInterceptor.java:83)
at com.worklight.adapters.rest.JAXRSAdapterRequestInterceptor.handleRequest(JAXRSAdapterRequestInterceptor.java:83)
In my server.xml I mapped al the Jar files also used delegation="parentLast" to makes sure Application JARS are loaded first
<application id="MyProject" name="MyProject" location="MyProject.war" type="war">
<classloader delegation="parentLast">
<privateLibrary id="worklightlib_MyProject">
<fileset dir="${shared.resource.dir}/MyProject/lib" includes="worklight-jee-library.jar"/>
<fileset dir="${shared.resource.dir}/MyProject/lib" includes="management-api.jar"/>
<fileset dir="${shared.resource.dir}/MyProject/lib" includes="jaxb-api.jar"/>
<fileset dir="${shared.resource.dir}/MyProject/lib" includes="jaxb-core.jar"/>
<fileset dir="${shared.resource.dir}/MyProject/lib" includes="policy.jar"/>
<fileset dir="${shared.resource.dir}/MyProject/lib" includes="jaxws-rt.jar"/>
<fileset dir="${shared.resource.dir}/MyProject/lib" includes="stax-ex.jar"/>
<fileset dir="${shared.resource.dir}/MyProject/lib" includes="gmbal-api-only.jar"/>
<fileset dir="${shared.resource.dir}/MyProject/lib" includes="streambuffer.jar"/>
<fileset dir="${shared.resource.dir}/MyProject/lib" includes="ha-api.jar"/>
<fileset dir="${shared.resource.dir}/MyProject/lib" includes="jaxb-impl.jar"/>
<fileset dir="${wlp.install.dir}/lib" includes="com.ibm.ws.crypto.passwordutil_*.jar"/>
</privateLibrary>
</classloader>
</application>
If I am not wrong there is come conflict with the JAR files added with the Application War vs the Jars loaded by liberty core by default .
I also tried by removing all the JAXB jars from Application.
That actually fixed the problem and I was able to invoke service but when ever there is exception I started getting the below error.
java.lang.NoClassDefFoundError: Could not initialize class com.sun.xml.internal.ws.fault.SOAPFaultBuilder
at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:107)
at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:78)
at com.sun.xml.internal.ws.client.sei.SEIStub.invoke(SEIStub.java:107)
at $Proxy36.downloadPDB(Unknown Source)
at path.to.my.code.downloadInvalidFileID(SingleMethodTest.java:64)
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:616)
at org.junit.internal.runners.TestMethod.invoke(TestMethod.java:59)
at org.junit.internal.runners.MethodRoadie.runTestMethod(MethodRoadie.java:98)
at org.junit.internal.runners.MethodRoadie$2.run(MethodRoadie.java:79)
at org.junit.internal.runners.MethodRoadie.runBeforesThenTestThenAfters(MethodRoadie.java:87)
at org.junit.internal.runners.MethodRoadie.runTest(MethodRoadie.java:77)
at org.junit.internal.runners.MethodRoadie.run(MethodRoadie.java:42)
at org.junit.internal.runners.JUnit4ClassRunner.invokeTestMethod(JUnit4ClassRunner.java:88)
at org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUnit4ClassRunner.java:51)
at org.junit.internal.runners.JUnit4ClassRunner$1.run(JUnit4ClassRunner.java:44)
at org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:27)
at org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:37)
at org.junit.internal.runners.JUnit4ClassRunner.run(JUnit4ClassRunner.java:42)
at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)
at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140)
at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127)
at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
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:616)
at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:338)
at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:997)

Found the solution finally.
I matched my configuration from development environment. The only difference was I did not include these jars in myProject.war/WEB-INF/lib. After adding to that it resolved the issue.
However I am not convinced with the solution because I already had these jars in in shared location and also referred in server.xml. So deploying it with WAR shouldn't be required. But it solved my problem.

Related

ignite upgrade from 2.7 to 2.11 , error occurred during startup

I use ansible install ignite, just replace artiface zip. The error log for the startup script is as follows, it's strange ClassNotFoundException:ZkDiscoveryNodeFailEventData( which occur in 2.7 version).
Caused by: java.lang.ClassNotFoundException: org.apache.ignite.spi.discovery.zk.internal.ZkDiscoveryNodeFailEventData
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at org.apache.ignite.internal.util.IgniteUtils.forName(IgniteUtils.java:9064)
at org.apache.ignite.internal.util.IgniteUtils.forName(IgniteUtils.java:9002)
at org.apache.ignite.marshaller.jdk.JdkMarshallerObjectInputStream.resolveClass(JdkMarshallerObjectInputStream.java:59)
at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1866)
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1749)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2040)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1571)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:431)
at java.util.TreeMap.buildFromSorted(TreeMap.java:2568)
at java.util.TreeMap.buildFromSorted(TreeMap.java:2551)
at java.util.TreeMap.buildFromSorted(TreeMap.java:2508)
at java.util.TreeMap.readObject(TreeMap.java:2454)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:1158)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2176)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2067)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1571)
at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2285)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2209)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2067)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1571)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:431)
at org.apache.ignite.marshaller.jdk.JdkMarshaller.unmarshal0(JdkMarshaller.java:124)
... 11 more
Failed to start grid: Failed to start manager: GridManagerAdapter [enabled=true, name=org.apache.ignite.internal.managers.discovery.GridDiscoveryManager]
Note! You may use 'USER_LIBS' environment variable to specify your classpath.
tail: /opt/rdx/log/ignite/ignite_console.out: file truncated
I have solved this problem , just change zkRootPath from /apacheIgnite to /otherPath, or connect zookeeper shell and rmr /apacheIgnite
<property name="discoverySpi">
<bean class="org.apache.ignite.spi.discovery.zk.ZookeeperDiscoverySpi">
<property name="zkConnectionString" value="ip1:2181,ip2:2181,ip3:2181"/>
<property name="zkRootPath" value="/apacheIgnite"/>
<property name="sessionTimeout" value="400000"/>
</bean>
</property>
besides, you need to delete the data for the paths in the following properties
<property name="storagePath" value="/xxx/persistent" />
<property name="walPath" value="/xxx/wal_store"/>
<property name="walArchivePath" value="/xxx/wal_archive"/>

Setting up Jetty/JDBC workspace

I am getting this error when setting up an existing workspace in IntelliJ.
I have setup the database, it exists in pgadmin3 and is searchable. It is set for localhost, port 5432.
2018-07-15 16:27:42.812:INFO:oeja.AnnotationConfiguration:Scanner-1: Scanning elapsed time=629ms
2018-07-15 16:27:42.826:WARN:oejw.WebAppContext:Scanner-1: Failed startup of context o.e.j.w.WebAppContext#5796ab81{/,file:///Users/mihai-oprescu/Documents/witnex/witnex/target/Witnex/,UNAVAILABLE}
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.eclipse.jetty.webapp.IterativeDescriptorProcessor.visit(IterativeDescriptorProcessor.java:84)
at org.eclipse.jetty.webapp.IterativeDescriptorProcessor.process(IterativeDescriptorProcessor.java:71)
at org.eclipse.jetty.webapp.MetaData.resolve(MetaData.java:409)
at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1457)
at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:848)
at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:287)
at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:545)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at org.eclipse.jetty.deploy.bindings.StandardStarter.processBinding(StandardStarter.java:46)
at org.eclipse.jetty.deploy.AppLifeCycle.runBindings(AppLifeCycle.java:192)
at org.eclipse.jetty.deploy.DeploymentManager.requestAppGoal(DeploymentManager.java:505)
at org.eclipse.jetty.deploy.DeploymentManager.addApp(DeploymentManager.java:151)
at org.eclipse.jetty.deploy.providers.ScanningAppProvider.fileAdded(ScanningAppProvider.java:180)
at org.eclipse.jetty.deploy.providers.WebAppProvider.fileAdded(WebAppProvider.java:453)
at org.eclipse.jetty.deploy.providers.ScanningAppProvider$1.fileAdded(ScanningAppProvider.java:64)
at org.eclipse.jetty.util.Scanner.reportAddition(Scanner.java:610)
at org.eclipse.jetty.util.Scanner.reportDifferences(Scanner.java:529)
at org.eclipse.jetty.util.Scanner.scan(Scanner.java:392)
at org.eclipse.jetty.util.Scanner$1.run(Scanner.java:329)
at java.util.TimerThread.mainLoop(Timer.java:555)
at java.util.TimerThread.run(Timer.java:505)
Caused by:
java.lang.IllegalStateException: Nothing to bind for name jdbc/witnex
at org.eclipse.jetty.plus.webapp.PlusDescriptorProcessor.bindEntry(PlusDescriptorProcessor.java:916)
at org.eclipse.jetty.plus.webapp.PlusDescriptorProcessor.bindResourceRef(PlusDescriptorProcessor.java:836)
at org.eclipse.jetty.plus.webapp.PlusDescriptorProcessor.visitResourceRef(PlusDescriptorProcessor.java:256)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.eclipse.jetty.webapp.IterativeDescriptorProcessor.visit(IterativeDescriptorProcessor.java:84)
at org.eclipse.jetty.webapp.IterativeDescriptorProcessor.process(IterativeDescriptorProcessor.java:71)
at org.eclipse.jetty.webapp.MetaData.resolve(MetaData.java:409)
at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1457)
at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:848)
at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:287)
at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:545)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at org.eclipse.jetty.deploy.bindings.StandardStarter.processBinding(StandardStarter.java:46)
at org.eclipse.jetty.deploy.AppLifeCycle.runBindings(AppLifeCycle.java:192)
at org.eclipse.jetty.deploy.DeploymentManager.requestAppGoal(DeploymentManager.java:505)
at org.eclipse.jetty.deploy.DeploymentManager.addApp(DeploymentManager.java:151)
at org.eclipse.jetty.deploy.providers.ScanningAppProvider.fileAdded(ScanningAppProvider.java:180)
at org.eclipse.jetty.deploy.providers.WebAppProvider.fileAdded(WebAppProvider.java:453)
at org.eclipse.jetty.deploy.providers.ScanningAppProvider$1.fileAdded(ScanningAppProvider.java:64)
at org.eclipse.jetty.util.Scanner.reportAddition(Scanner.java:610)
at org.eclipse.jetty.util.Scanner.reportDifferences(Scanner.java:529)
at org.eclipse.jetty.util.Scanner.scan(Scanner.java:392)
at org.eclipse.jetty.util.Scanner$1.run(Scanner.java:329)
at java.util.TimerThread.mainLoop(Timer.java:555)
at java.util.TimerThread.run(Timer.java:505)
[2018-07-15 04:27:43,090] Artifact Witnex.com:war exploded: Artifact is deployed successfully
[2018-07-15 04:27:43,090] Artifact Witnex.com:war exploded: Deploy took 3,117 milliseconds
In my context.xml, i have:
<New id="witnex" class="org.eclipse.jetty.plus.jndi.Resource">
<Arg>
<Ref id='wac' />
</Arg>
<Arg>jdbc/witnex</Arg>
<Arg>
<New class="org.postgresql.ds.PGSimpleDataSource">
<Set name="User">witnex</Set>
<Set name="Password">XXXXXXX</Set>
<Set name="DatabaseName">witnex</Set>
<Set name="ServerName">localhost</Set>
<Set name="PortNumber">5432</Set>
</New>
</Arg>
</New>
And my jetty configuration settings:
I am not quite sure how to set the jetty server to read the context.xml, perhaps that's the issue that I'm dealing with here.

Error in sqoop action in oozie while fetching data from teradata to hive

I am using HDP 2.3. I am getting the following error in sqoop action in oozie while fetching data from teradata to hive.
Sqoop action in my workflow.xml:
<sqoop xmlns="uri:oozie:sqoop-action:0.3">
<job-tracker>${hadoop_jobTrackerURL}</job-tracker>
<name-node>${hadoop_nameNodeURL}</name-node>
<job-xml>lib/hive-site.xml</job-xml>
<configuration>
<property>
<name>oozie.launcher.mapreduce.user.classpath.first</name>
<value>true</value>
</property>
<property>
<name>mapred.job.queue.name</name>
<value>${hadoop_yarnQueueName}</value>
</property>
</configuration>
<arg>import</arg>
<arg>--connect</arg>
<arg>jdbc:teradata://192.168.145.129/DBS_PORT=1025,DATABASE=DS_TBL_DB</arg>
<arg>--username</arg>
<arg>dbc</arg>
<arg>--password</arg>
<arg>dbc</arg>
<arg>--driver</arg>
<arg>com.teradata.jdbc.TeraDriver</arg>
<arg>--query</arg>
<arg>select * from ds_tbl_db.catalog_page WHERE $CONDITIONS</arg>
<arg>--hive-import</arg>
<arg>--hive-table</arg>
<arg>catalog_page123</arg>
<arg>--target-dir</arg>
<arg>/user/root/db/catalog_page1234</arg>
<arg>-m</arg>
<arg>1</arg>
<arg>--verbose</arg>
NOTE: I added tdgssconfig.jar & terajdbc4.jar and all hive dependency jars in /share/lib. Also tried with including the dependencies in the lib folder for workflow.
Error Stack:
ERROR [main] tool.ImportTool (ImportTool.java:run(613)) - Encountered
IOException running import job: java.io.IOException: Cannot run
program "hive": error=13, Permission denied
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1047)
at java.lang.Runtime.exec(Runtime.java:617)
at java.lang.Runtime.exec(Runtime.java:528)
at org.apache.sqoop.util.Executor.exec(Executor.java:76)
at org.apache.sqoop.hive.HiveImport.executeExternalHiveScript(HiveImport.java:391)
at org.apache.sqoop.hive.HiveImport.executeScript(HiveImport.java:344)
at org.apache.sqoop.hive.HiveImport.importTable(HiveImport.java:245)
at org.apache.sqoop.tool.ImportTool.importTable(ImportTool.java:514)
at org.apache.sqoop.tool.ImportTool.run(ImportTool.java:605)
at org.apache.sqoop.Sqoop.run(Sqoop.java:148)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
at org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:184)
at org.apache.sqoop.Sqoop.runTool(Sqoop.java:226)
at org.apache.sqoop.Sqoop.runTool(Sqoop.java:235)
at org.apache.sqoop.Sqoop.main(Sqoop.java:244)
at org.apache.oozie.action.hadoop.SqoopMain.runSqoopJob(SqoopMain.java:197)
at org.apache.oozie.action.hadoop.SqoopMain.run(SqoopMain.java:177)
at org.apache.oozie.action.hadoop.LauncherMain.run(LauncherMain.java:47)
at org.apache.oozie.action.hadoop.SqoopMain.main(SqoopMain.java:46)
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 org.apache.oozie.action.hadoop.LauncherMapper.map(LauncherMapper.java:236)
at org.apache.hadoop.mapred.MapRunner.run(MapRunner.java:54)
at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:453)
at org.apache.hadoop.mapred.MapTask.run(MapTask.java:343)
at org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:164)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:415)
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1657)
at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:158) Caused by: java.io.IOException: error=13, Permission denied
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.(UNIXProcess.java:186)
at java.lang.ProcessImpl.start(ProcessImpl.java:130)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1028)
... 31 more

x509.CertAndKeyGen is not found in JVM at OpenAM initial configuration

In the combination of OSX Mavericks, OpenAM 10.1.0, Tomcat8 and JDK8,
OpenAM initial GUI configuration doesn't success, resulting in an error:
[Click] [error] handleException: java.lang.RuntimeException: Error occurred invoking public method: public boolean com.sun.identity.config.wizard.Wizard.createConfig()
at org.apache.click.util.ClickUtils.invokeMethod(ClickUtils.java:3335)
at org.apache.click.util.ClickUtils.invokeListener(ClickUtils.java:2088)
at org.apache.click.control.AbstractControl$1.onAction(AbstractControl.java:228)
at org.apache.click.ActionEventDispatcher.fireActionEvent(ActionEventDispatcher.java:259)
at org.apache.click.ActionEventDispatcher.fireActionEvents(ActionEventDispatcher.java:236)
at org.apache.click.ActionEventDispatcher.fireActionEvents(ActionEventDispatcher.java:180)
at org.apache.click.ClickServlet.performOnProcess(ClickServlet.java:746)
at org.apache.click.ClickServlet.processAjaxPageEvents(ClickServlet.java:1860)
at org.apache.click.ClickServlet.processPage(ClickServlet.java:559)
at org.apache.click.ClickServlet.handleRequest(ClickServlet.java:383)
at org.apache.click.ClickServlet.doGet(ClickServlet.java:276)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.forgerock.openam.validation.ResponseValidationFilter.doFilter(ResponseValidationFilter.java:44)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.sun.identity.setup.AMSetupFilter.doFilter(AMSetupFilter.java:99)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ExceptionInInitializerError: A security class cannot be found in this JVM because of the following reason: sun.security.x509.CertAndKeyGen
at org.opends.server.util.Platform$PlatformIMPL.(Platform.java:127)
at org.opends.server.util.Platform.(Platform.java:80)
at org.opends.server.util.CertificateManager.generateSelfSignedCertificate(CertificateManager.java:283)
at org.opends.server.admin.AdministrationConnector.createSelfSignedCertifIfNeeded(AdministrationConnector.java:698)
at org.opends.server.admin.AdministrationConnector.initializeAdministrationConnector(AdministrationConnector.java:181)
at org.opends.server.core.ConnectionHandlerConfigManager.initializeAdministrationConnectorConfig(ConnectionHandlerConfigManager.java:350)
at org.opends.server.core.DirectoryServer.initializeAdministrationConnector(DirectoryServer.java:2898)
at org.opends.server.core.DirectoryServer.startServer(DirectoryServer.java:1401)
at org.opends.server.util.EmbeddedUtils.startServer(EmbeddedUtils.java:88)
at com.sun.identity.setup.EmbeddedOpenDS.startServer(EmbeddedOpenDS.java:545)
at com.sun.identity.setup.EmbeddedOpenDS.setup(EmbeddedOpenDS.java:364)
at com.sun.identity.setup.AMSetupServlet.setupEmbeddedDS(AMSetupServlet.java:813)
at com.sun.identity.setup.AMSetupServlet.setupSMDatastore(AMSetupServlet.java:869)
at com.sun.identity.setup.AMSetupServlet.configure(AMSetupServlet.java:945)
at com.sun.identity.setup.AMSetupServlet.processRequest(AMSetupServlet.java:628)
at com.sun.identity.config.wizard.Wizard.createConfig(Wizard.java:294)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.apache.click.util.ClickUtils.invokeMethod(ClickUtils.java:3317)
... 30 more
I also changed JDK to 7 or Tomcat to 7, it was useless.
A security class cannot be found in this JVM because of the following reason: sun.security.x509.CertAndKeyGen
I know JBoss seems to be fixed for this error, but I'm at a loss how to get over under my environment.
The CertAndKeyGen class issue is actually OPENDJ-1142, which happens when the configurator tries to set up the embedded OpenDJ (which does not support JDK8 yet). Even then, OpenAM does not run yet on JDK8 (doesn't even compile at the moment - mainly because of OPENAM-141), so you will certainly need to use JDK7 and a container that runs fine on JDK7.
The JDK7 and Tomcat 7 setup is actually supported, so you may want to provide more info on why that installation attempt failed and how.
We need to prepare jboss for openam deployments, by adding following contents to jboss-deployment-structure.xml:
<exclude-subsystems>
<subsystem name="jaxrs" />
<subsystem name="webservices" />
</exclude-subsystems>
<dependencies>
<module name="sun.jdk" >
<imports>
<exclude-set>
<path name="com/sun/org/apache/xml/internal/security/transforms/implementations"/>
</exclude-set>
</imports>
</module>
<system>
<paths>
<path name="sun/security/x509" />
<path name="com/sun/org/apache/xpath/internal" />
<path name="com/sun/org/apache/xerces/internal/dom" />
<path name="com/sun/org/apache/xml/internal/utils" />
</paths>
</system>
</dependencies>

tomee persistence.xml in EJB JAR META-INF crashes my application deployment

I am using TomEE to deploy an EAR file, that contains one EJB JAR and one WAR.
I want to add entities using the default provider. I have created a resource in tomee.xml to use MySQL DB.
Then I would like to use entity manager so I am trying to create the following persistence.xml in the EJB JAR META-INF directory:
<persistence xmlns="http://java.sun.com/xml/ns/persistence" version="1.0">
<persistence-unit name="MyProjectDataBase" transaction-type="JTA">
<provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>
<jta-data-source>MyProjectDS</jta-data-source>
<non-jta-data-source>MyProjectDSUnmanaged</non-jta-data-source>
<properties>
<property name="openjpa.jdbc.DBDictionary" value="mysql" />
<property name="openjpa.jdbc.SynchronizeMappings" value="buildSchema" />
</properties>
</persistence-unit>
</persistence>
MyProject & MyProjectUnmanaged are the resources Ids I created in tomee.xml.
Once I add this persistence.xml I get the following exception in catalina.out and my app is not deployed:
SEVERE: Application could not be deployed: /Users/avitale/Development/apache-tomee-jaxrs-1.5.0/apps/projecteam-ear
org.apache.openejb.OpenEJBException: Creating application failed: /Users/avitale/Development/apache-tomee-jaxrs-1.5.0/apps/projecteam-ear: loader (instance of org/apache/catalina/loader/StandardClassLoader): attempted duplicate class definition for name: "org/apache/openejb/cdi/CdiPlugin"
at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:940)
at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:532)
at org.apache.openejb.assembler.classic.Assembler.buildContainerSystem(Assembler.java:433)
at org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:341)
at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:144)
at org.apache.openejb.OpenEJB.init(OpenEJB.java:290)
at org.apache.tomee.catalina.TomcatLoader.initialize(TomcatLoader.java:231)
at org.apache.tomee.catalina.TomcatLoader.init(TomcatLoader.java:131)
at org.apache.tomee.catalina.ServerListener.lifecycleEvent(ServerListener.java:113)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:401)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:110)
at org.apache.catalina.startup.Catalina.load(Catalina.java:633)
at org.apache.catalina.startup.Catalina.load(Catalina.java:658)
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.apache.catalina.startup.Bootstrap.load(Bootstrap.java:281)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:450)
Caused by: java.lang.LinkageError: loader (instance of org/apache/catalina/loader/StandardClassLoader): attempted duplicate class definition for name: "org/apache/openejb/cdi/CdiPlugin"
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:295)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at org.apache.openejb.cdi.OptimizedLoaderService.loadWebBeansPlugins(OptimizedLoaderService.java:70)
at org.apache.openejb.cdi.OptimizedLoaderService.load(OptimizedLoaderService.java:53)
at org.apache.openejb.cdi.OptimizedLoaderService.load(OptimizedLoaderService.java:47)
at org.apache.webbeans.plugins.PluginLoader.startUp(PluginLoader.java:75)
at org.apache.openejb.cdi.OpenEJBLifecycle.startApplication(OpenEJBLifecycle.java:159)
at org.apache.openejb.cdi.ThreadSingletonServiceImpl.initialize(ThreadSingletonServiceImpl.java:150)
at org.apache.openejb.cdi.CdiBuilder.build(CdiBuilder.java:44)
at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:794)
... 20 more
Once I remove the persistence.xml then the application is successfully deployed.
Please help me as I don't understand how to proceed :(
Thanks in advance.
Would be helpful if you could specify the version you are actually using.
More over, did you check you won't deliver TomEE or any related dependencies in your EAR file (I mean lib/ or WEB-INF/lib)?
For your information, TomEE 1.5.1 will be released shortly with some fixes around EAR deployments.