which of the following is the fastest data type in java?
In java data types(byte,short,int,float,double,boolean) which is the
fastest data type for compilation and why?please list the reason clearly
to understand
Thursday, 3 October 2013
Wednesday, 2 October 2013
Trying to use CDI on Glassfish 4 results in javax.el.PropertyNotFoundException: Target Unreachable, identifier 'indexMB' resolved to null
Trying to use CDI on Glassfish 4 results in
javax.el.PropertyNotFoundException: Target Unreachable, identifier
'indexMB' resolved to null
I am getting an error on a single page, and the only error occurs after I
click the SUBMIT button.
I followed the recommendations of the topic JSF2 form submit " Target
Unreachable, identifier 'myModel' resolved to null ONLY on submit but did
not help me.
Any help will be very useful.
Follow my setup and my files:
Glassfish 4
Primefaces 3.5
commons-fileupload 1.3
commons-io 2.4
** index.xhtml
<html ...>
<f:loadBundle basename="i18n" var="bundle" />
<h:head>
<title>#{bundle['index_title']}</title>
</h:head>
<h:body>
#{bundle['index_appname']}
<br />
<h:form id="frmIndex">
<p:panelGrid columns="2">
<p:outputLabel for="user" value="#{bundle['lblUser']}" />
<p:inputText id="user" value="#{indexMB.user}" />
<p:outputLabel for="password" value="#{bundle['lblPassword']}" />
<p:password id="password" value="#{indexMB.password}" />
</p:panelGrid>
<p:commandButton action="#{indexMB.loginTest}"
value="#{bundle['btn_login']}" />
</h:form>
</h:body>
** IndexMB.java
@ManagedBean ("indexMB")
@RequestScoped
public class IndexMB {
private String password;
private String user;
public IndexMB() {
}
public String loginTest(){
...
}
// getters and setters
}
** log (Glassfish)
javax.el.PropertyNotFoundException: /index.xhtml @18,66
value="#{indexMB.user}": Target Unreachable, identifier 'indexMB' resolved
to null
at
com.sun.faces.facelets.el.TagValueExpression.getType(TagValueExpression.java:100)
at
org.primefaces.renderkit.InputRenderer.findImplicitConverter(InputRenderer.java:170)
at
org.primefaces.renderkit.InputRenderer.findConverter(InputRenderer.java:190)
at
org.primefaces.renderkit.InputRenderer.getConvertedValue(InputRenderer.java:196)
at javax.faces.component.UIInput.getConvertedValue(UIInput.java:1046)
at javax.faces.component.UIInput.validate(UIInput.java:976)
at javax.faces.component.UIInput.executeValidate(UIInput.java:1249)
at javax.faces.component.UIInput.processValidators(UIInput.java:712)
at
javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1261)
at javax.faces.component.UIForm.processValidators(UIForm.java:253)
at
javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1261)
at
javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1261)
at javax.faces.component.UIViewRoot.processValidators(UIViewRoot.java:1195)
at
com.sun.faces.lifecycle.ProcessValidationsPhase.execute(ProcessValidationsPhase.java:76)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:198)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:646)
at
org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1682)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:318)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:160)
at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:734)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:673)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:99)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:174)
at
org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:357)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:260)
at
com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:188)
at
org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:191)
at
org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:168)
at
org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:189)
at
org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
at
org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:288)
at
org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:206)
at
org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:136)
at
org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:114)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
at
org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:838)
at
org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:113)
at
org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:115)
at
org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:55)
at
org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:135)
at
org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:564)
at
org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:544)
at java.lang.Thread.run(Thread.java:724)
Caused by: javax.el.PropertyNotFoundException: Target Unreachable,
identifier 'indexMB' resolved to null
at com.sun.el.parser.AstValue.getTarget(AstValue.java:174)
at com.sun.el.parser.AstValue.getType(AstValue.java:86)
at com.sun.el.ValueExpressionImpl.getType(ValueExpressionImpl.java:201)
at org.jboss.weld.el.WeldValueExpression.getType(WeldValueExpression.java:93)
at
com.sun.faces.facelets.el.TagValueExpression.getType(TagValueExpression.java:98)
... 43 more
** web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
<context-param>
<param-name>javax.faces.PROJECT_STAGE</param-name>
<param-value>Development</param-value>
</context-param>
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>/faces/*</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>
30
</session-timeout>
</session-config>
<welcome-file-list>
<welcome-file>faces/index.xhtml</welcome-file>
</welcome-file-list>
** faces-config.xml
<?xml version='1.0' encoding='UTF-8'?>
<faces-config version="2.2"
xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
http://xmlns.jcp.org/xml/ns/javaee/web-facesconfig_2_2.xsd">
<application>
<locale-config>
<default-locale>pt_BR</default-locale>
<supported-locale>en</supported-locale>
<supported-locale>fr</supported-locale>
</locale-config>
</application>
** beans.xml
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/beans_1_0.xsd">
</beans>
javax.el.PropertyNotFoundException: Target Unreachable, identifier
'indexMB' resolved to null
I am getting an error on a single page, and the only error occurs after I
click the SUBMIT button.
I followed the recommendations of the topic JSF2 form submit " Target
Unreachable, identifier 'myModel' resolved to null ONLY on submit but did
not help me.
Any help will be very useful.
Follow my setup and my files:
Glassfish 4
Primefaces 3.5
commons-fileupload 1.3
commons-io 2.4
** index.xhtml
<html ...>
<f:loadBundle basename="i18n" var="bundle" />
<h:head>
<title>#{bundle['index_title']}</title>
</h:head>
<h:body>
#{bundle['index_appname']}
<br />
<h:form id="frmIndex">
<p:panelGrid columns="2">
<p:outputLabel for="user" value="#{bundle['lblUser']}" />
<p:inputText id="user" value="#{indexMB.user}" />
<p:outputLabel for="password" value="#{bundle['lblPassword']}" />
<p:password id="password" value="#{indexMB.password}" />
</p:panelGrid>
<p:commandButton action="#{indexMB.loginTest}"
value="#{bundle['btn_login']}" />
</h:form>
</h:body>
** IndexMB.java
@ManagedBean ("indexMB")
@RequestScoped
public class IndexMB {
private String password;
private String user;
public IndexMB() {
}
public String loginTest(){
...
}
// getters and setters
}
** log (Glassfish)
javax.el.PropertyNotFoundException: /index.xhtml @18,66
value="#{indexMB.user}": Target Unreachable, identifier 'indexMB' resolved
to null
at
com.sun.faces.facelets.el.TagValueExpression.getType(TagValueExpression.java:100)
at
org.primefaces.renderkit.InputRenderer.findImplicitConverter(InputRenderer.java:170)
at
org.primefaces.renderkit.InputRenderer.findConverter(InputRenderer.java:190)
at
org.primefaces.renderkit.InputRenderer.getConvertedValue(InputRenderer.java:196)
at javax.faces.component.UIInput.getConvertedValue(UIInput.java:1046)
at javax.faces.component.UIInput.validate(UIInput.java:976)
at javax.faces.component.UIInput.executeValidate(UIInput.java:1249)
at javax.faces.component.UIInput.processValidators(UIInput.java:712)
at
javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1261)
at javax.faces.component.UIForm.processValidators(UIForm.java:253)
at
javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1261)
at
javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1261)
at javax.faces.component.UIViewRoot.processValidators(UIViewRoot.java:1195)
at
com.sun.faces.lifecycle.ProcessValidationsPhase.execute(ProcessValidationsPhase.java:76)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:198)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:646)
at
org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1682)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:318)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:160)
at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:734)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:673)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:99)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:174)
at
org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:357)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:260)
at
com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:188)
at
org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:191)
at
org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:168)
at
org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:189)
at
org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
at
org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:288)
at
org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:206)
at
org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:136)
at
org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:114)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
at
org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:838)
at
org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:113)
at
org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:115)
at
org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:55)
at
org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:135)
at
org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:564)
at
org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:544)
at java.lang.Thread.run(Thread.java:724)
Caused by: javax.el.PropertyNotFoundException: Target Unreachable,
identifier 'indexMB' resolved to null
at com.sun.el.parser.AstValue.getTarget(AstValue.java:174)
at com.sun.el.parser.AstValue.getType(AstValue.java:86)
at com.sun.el.ValueExpressionImpl.getType(ValueExpressionImpl.java:201)
at org.jboss.weld.el.WeldValueExpression.getType(WeldValueExpression.java:93)
at
com.sun.faces.facelets.el.TagValueExpression.getType(TagValueExpression.java:98)
... 43 more
** web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
<context-param>
<param-name>javax.faces.PROJECT_STAGE</param-name>
<param-value>Development</param-value>
</context-param>
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>/faces/*</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>
30
</session-timeout>
</session-config>
<welcome-file-list>
<welcome-file>faces/index.xhtml</welcome-file>
</welcome-file-list>
** faces-config.xml
<?xml version='1.0' encoding='UTF-8'?>
<faces-config version="2.2"
xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
http://xmlns.jcp.org/xml/ns/javaee/web-facesconfig_2_2.xsd">
<application>
<locale-config>
<default-locale>pt_BR</default-locale>
<supported-locale>en</supported-locale>
<supported-locale>fr</supported-locale>
</locale-config>
</application>
** beans.xml
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/beans_1_0.xsd">
</beans>
hadoop running application- ERROR security.UserGroupInformation: PriviledgedActionException
hadoop running application- ERROR security.UserGroupInformation:
PriviledgedActionException
I have written WordCount code of hadoop as an java application in eclipse
to test hadoop for running applications, but when I try to run it as hdfs
user, this error will appear:
./hadoop jar
/home/masi/eclipse_workspace/WordCount_apacheSample/bin/test2.jar
WordCountApacheSample /user/hdfs/wordCountInput /user/hdfs/wordCountOutput
13/10/02 17:14:50 INFO service.AbstractService:
Service:org.apache.hadoop.yarn.client.YarnClientImpl is inited.
13/10/02 17:14:50 INFO service.AbstractService:
Service:org.apache.hadoop.yarn.client.YarnClientImpl is started.
13/10/02 17:14:50 ERROR security.UserGroupInformation:
PriviledgedActionException as:hdfs (auth:SIMPLE)
cause:java.net.ConnectException: Call From virtual-machine/127.0.1.1 to
localhost:9000 failed on connection exception: java.net.ConnectException:
Connection refused; For more details see:
http://wiki.apache.org/hadoop/ConnectionRefused
Exception in thread "main" java.net.ConnectException: Call From
virtual-machine/127.0.1.1 to localhost:9000 failed on connection
exception: java.net.ConnectException: Connection refused; For more details
see: http://wiki.apache.org/hadoop/ConnectionRefused
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:532)
at org.apache.hadoop.net.NetUtils.wrapWithMessage(NetUtils.java:780)
at org.apache.hadoop.net.NetUtils.wrapException(NetUtils.java:727)
at org.apache.hadoop.ipc.Client.call(Client.java:1239)
at
org.apache.hadoop.ipc.ProtobufRpcEngine$Invoker.invoke(ProtobufRpcEngine.java:202)
at sun.proxy.$Proxy9.getFileInfo(Unknown Source)
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.hadoop.io.retry.RetryInvocationHandler.invokeMethod(RetryInvocationHandler.java:164)
at
org.apache.hadoop.io.retry.RetryInvocationHandler.invoke(RetryInvocationHandler.java:83)
at sun.proxy.$Proxy9.getFileInfo(Unknown Source)
at
org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolTranslatorPB.getFileInfo(ClientNamenodeProtocolTranslatorPB.java:630)
at org.apache.hadoop.hdfs.DFSClient.getFileInfo(DFSClient.java:1559)
at
org.apache.hadoop.hdfs.DistributedFileSystem.getFileStatus(DistributedFileSystem.java:811)
at org.apache.hadoop.fs.FileSystem.exists(FileSystem.java:1345)
at
org.apache.hadoop.mapreduce.lib.output.FileOutputFormat.checkOutputSpecs(FileOutputFormat.java:140)
at
org.apache.hadoop.mapreduce.JobSubmitter.checkSpecs(JobSubmitter.java:418)
at
org.apache.hadoop.mapreduce.JobSubmitter.submitJobInternal(JobSubmitter.java:333)
at org.apache.hadoop.mapreduce.Job$11.run(Job.java:1218)
at org.apache.hadoop.mapreduce.Job$11.run(Job.java:1215)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:416)
at
org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1478)
at org.apache.hadoop.mapreduce.Job.submit(Job.java:1215)
at org.apache.hadoop.mapreduce.Job.waitForCompletion(Job.java:1236)
at WordCountApacheSample.main(WordCountApacheSample.java:71)
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.hadoop.util.RunJar.main(RunJar.java:212)
Caused by: java.net.ConnectException: Connection refused
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:597)
at
org.apache.hadoop.net.SocketIOWithTimeout.connect(SocketIOWithTimeout.java:206)
at org.apache.hadoop.net.NetUtils.connect(NetUtils.java:526)
at org.apache.hadoop.net.NetUtils.connect(NetUtils.java:490)
at
org.apache.hadoop.ipc.Client$Connection.setupConnection(Client.java:508)
at
org.apache.hadoop.ipc.Client$Connection.setupIOstreams(Client.java:603)
at org.apache.hadoop.ipc.Client$Connection.access$2100(Client.java:253)
at org.apache.hadoop.ipc.Client.getConnection(Client.java:1288)
at org.apache.hadoop.ipc.Client.call(Client.java:1206)
... 29 more
although I have tested input and output paths with hdfs://localhost:9000/
, there is no difference! BTW, I have studied many posts related to my
problem but they were not useful
any help is appreciated. thanks.
PriviledgedActionException
I have written WordCount code of hadoop as an java application in eclipse
to test hadoop for running applications, but when I try to run it as hdfs
user, this error will appear:
./hadoop jar
/home/masi/eclipse_workspace/WordCount_apacheSample/bin/test2.jar
WordCountApacheSample /user/hdfs/wordCountInput /user/hdfs/wordCountOutput
13/10/02 17:14:50 INFO service.AbstractService:
Service:org.apache.hadoop.yarn.client.YarnClientImpl is inited.
13/10/02 17:14:50 INFO service.AbstractService:
Service:org.apache.hadoop.yarn.client.YarnClientImpl is started.
13/10/02 17:14:50 ERROR security.UserGroupInformation:
PriviledgedActionException as:hdfs (auth:SIMPLE)
cause:java.net.ConnectException: Call From virtual-machine/127.0.1.1 to
localhost:9000 failed on connection exception: java.net.ConnectException:
Connection refused; For more details see:
http://wiki.apache.org/hadoop/ConnectionRefused
Exception in thread "main" java.net.ConnectException: Call From
virtual-machine/127.0.1.1 to localhost:9000 failed on connection
exception: java.net.ConnectException: Connection refused; For more details
see: http://wiki.apache.org/hadoop/ConnectionRefused
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:532)
at org.apache.hadoop.net.NetUtils.wrapWithMessage(NetUtils.java:780)
at org.apache.hadoop.net.NetUtils.wrapException(NetUtils.java:727)
at org.apache.hadoop.ipc.Client.call(Client.java:1239)
at
org.apache.hadoop.ipc.ProtobufRpcEngine$Invoker.invoke(ProtobufRpcEngine.java:202)
at sun.proxy.$Proxy9.getFileInfo(Unknown Source)
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.hadoop.io.retry.RetryInvocationHandler.invokeMethod(RetryInvocationHandler.java:164)
at
org.apache.hadoop.io.retry.RetryInvocationHandler.invoke(RetryInvocationHandler.java:83)
at sun.proxy.$Proxy9.getFileInfo(Unknown Source)
at
org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolTranslatorPB.getFileInfo(ClientNamenodeProtocolTranslatorPB.java:630)
at org.apache.hadoop.hdfs.DFSClient.getFileInfo(DFSClient.java:1559)
at
org.apache.hadoop.hdfs.DistributedFileSystem.getFileStatus(DistributedFileSystem.java:811)
at org.apache.hadoop.fs.FileSystem.exists(FileSystem.java:1345)
at
org.apache.hadoop.mapreduce.lib.output.FileOutputFormat.checkOutputSpecs(FileOutputFormat.java:140)
at
org.apache.hadoop.mapreduce.JobSubmitter.checkSpecs(JobSubmitter.java:418)
at
org.apache.hadoop.mapreduce.JobSubmitter.submitJobInternal(JobSubmitter.java:333)
at org.apache.hadoop.mapreduce.Job$11.run(Job.java:1218)
at org.apache.hadoop.mapreduce.Job$11.run(Job.java:1215)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:416)
at
org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1478)
at org.apache.hadoop.mapreduce.Job.submit(Job.java:1215)
at org.apache.hadoop.mapreduce.Job.waitForCompletion(Job.java:1236)
at WordCountApacheSample.main(WordCountApacheSample.java:71)
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.hadoop.util.RunJar.main(RunJar.java:212)
Caused by: java.net.ConnectException: Connection refused
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:597)
at
org.apache.hadoop.net.SocketIOWithTimeout.connect(SocketIOWithTimeout.java:206)
at org.apache.hadoop.net.NetUtils.connect(NetUtils.java:526)
at org.apache.hadoop.net.NetUtils.connect(NetUtils.java:490)
at
org.apache.hadoop.ipc.Client$Connection.setupConnection(Client.java:508)
at
org.apache.hadoop.ipc.Client$Connection.setupIOstreams(Client.java:603)
at org.apache.hadoop.ipc.Client$Connection.access$2100(Client.java:253)
at org.apache.hadoop.ipc.Client.getConnection(Client.java:1288)
at org.apache.hadoop.ipc.Client.call(Client.java:1206)
... 29 more
although I have tested input and output paths with hdfs://localhost:9000/
, there is no difference! BTW, I have studied many posts related to my
problem but they were not useful
any help is appreciated. thanks.
VBScript - copy local file to a FTPS TLS (implicit) server
VBScript - copy local file to a FTPS TLS (implicit) server
I have a script that connects to a DataBase, executes a StoredProcedure,
saves the results into a normal TXT file, compresses the file into a *.rar
file (with a password) and sends the file by e-mail. Our client now wants
we to copy the file to his FTP server, instead of by e-mail.
The problem is that the connection type is implicit FTP over TLS.
I have the following script to test the file copy to an FTP:
'FTP Upload
Dim oShell, objFSO, ftpUser, ftpPass, ftpHost, ftpDir, path
Set oShell = CreateObject("Shell.Application")
Set objFSO = CreateObject("Scripting.FileSystemObject")
'FTP Server details:
ftpUser = "user"
ftpPass = "password"
ftpHost = "IP address:port"
ftpDir = "/FolderName/"
'File I want to upload:
path = "D:\test.txt"
Call FTPUpload(ftpUser, ftpPass, ftpHost, ftpDir, path)
Public Function FTPUpload(ftpUser, ftpPass, ftpHost, ftpDir, path)
'Upload a file to an FTP server
'Copy Options: 16 = Yes to All
Const copyType = 16
'FTP Wait Time in ms
waitTime = 80000
strFTP = "ftp://" & ftpUser & ":" & ftpPass & "@" & ftpHost & ftpDir
Set objFTP = oShell.NameSpace(strFTP)
'Upload single file
If objFSO.FileExists(path) Then
Set objFile = objFSO.getFile(path)
strParent = objFile.ParentFolder
Set objFolder = oShell.NameSpace(strParent)
Set objItem = objFolder.ParseName(objFile.Name)
objFTP.CopyHere objItem, copyType
End If
'Wait for upload
WScript.Sleep waitTime
End Function
This code works fine with a normal FTP (simple FTP connection), it copies
the file correctly, but with an implicit FTP over TLS connection I think
it doesn't even establish the connection.
With FileZilla I'm able to connect to that server and copy files, but I
want it to be automatic because it's a file we have to send every day.
When I open a Web browser and type ftp://[user]:[password]@host, it shows
me the folders in that FTP server, but with the implicit FTP it doesn't
work even on the web browser. Does it have a different syntax? I'v already
tried with ftps://, but it doesn't work either way.
Is there a way to copy a file to an implicit FTP over TLS using VBScript?
Thanks.
I have a script that connects to a DataBase, executes a StoredProcedure,
saves the results into a normal TXT file, compresses the file into a *.rar
file (with a password) and sends the file by e-mail. Our client now wants
we to copy the file to his FTP server, instead of by e-mail.
The problem is that the connection type is implicit FTP over TLS.
I have the following script to test the file copy to an FTP:
'FTP Upload
Dim oShell, objFSO, ftpUser, ftpPass, ftpHost, ftpDir, path
Set oShell = CreateObject("Shell.Application")
Set objFSO = CreateObject("Scripting.FileSystemObject")
'FTP Server details:
ftpUser = "user"
ftpPass = "password"
ftpHost = "IP address:port"
ftpDir = "/FolderName/"
'File I want to upload:
path = "D:\test.txt"
Call FTPUpload(ftpUser, ftpPass, ftpHost, ftpDir, path)
Public Function FTPUpload(ftpUser, ftpPass, ftpHost, ftpDir, path)
'Upload a file to an FTP server
'Copy Options: 16 = Yes to All
Const copyType = 16
'FTP Wait Time in ms
waitTime = 80000
strFTP = "ftp://" & ftpUser & ":" & ftpPass & "@" & ftpHost & ftpDir
Set objFTP = oShell.NameSpace(strFTP)
'Upload single file
If objFSO.FileExists(path) Then
Set objFile = objFSO.getFile(path)
strParent = objFile.ParentFolder
Set objFolder = oShell.NameSpace(strParent)
Set objItem = objFolder.ParseName(objFile.Name)
objFTP.CopyHere objItem, copyType
End If
'Wait for upload
WScript.Sleep waitTime
End Function
This code works fine with a normal FTP (simple FTP connection), it copies
the file correctly, but with an implicit FTP over TLS connection I think
it doesn't even establish the connection.
With FileZilla I'm able to connect to that server and copy files, but I
want it to be automatic because it's a file we have to send every day.
When I open a Web browser and type ftp://[user]:[password]@host, it shows
me the folders in that FTP server, but with the implicit FTP it doesn't
work even on the web browser. Does it have a different syntax? I'v already
tried with ftps://, but it doesn't work either way.
Is there a way to copy a file to an implicit FTP over TLS using VBScript?
Thanks.
Codefirst "invalid column name xxx" ?
Codefirst "invalid column name xxx" ?
BaseEntity
public abstract class BaseEntity
{
public int Id { get; set; }
}
User
public class User : BaseEntity
{
public User()
{
Roles = new HashSet<Role>();
}
public string UserName { get; set; }
public string DisplayName { get; set; }
public string Password { get; set; }
public string Email { get; set; }
public string ProfileImageUrl { get; set; }
public DateTime? LastLoginDate { get; set; }
public string LastLoginIp { get; set; }
public int? LanguageId { get; set; }
public virtual ICollection<Role> Roles { get; set; }
}
user mapping
public class UserMap : EntityTypeConfiguration<User>
{
public UserMap()
{
ToTable("User");
HasKey(x => x.Id);
Property(x => x.DisplayName).HasMaxLength(100);
Property(x => x.Email).HasMaxLength(250);
Property(x => x.LastLoginIp).HasMaxLength(20);
Property(x => x.Password).HasMaxLength(50);
Property(x => x.ProfileImageUrl).HasMaxLength(500);
Property(x => x.UserName).HasMaxLength(50);
HasMany(h => h.Roles).
WithMany(e => e.Users).
Map(
m =>
{
m.MapLeftKey("UserId");
m.MapRightKey("RoleId");
m.ToTable("User_Role");
}
);
}
}
test metod
private MvcProjectContext _context;
private IUnitOfWork _uow;
private IUserService _userService;
[TestInitialize]
public void TestInitialize()
{
_context = new MvcProjectContext();
_uow = new UnitOfWork(_context);
_userService = new UserService(_uow);
}
[TestMethod]
public void TestMethodAddUser()
{
_userService.Insert(new User
{
DisplayName = "test display name",
Email = "test_email@mail.com",
LanguageId = 1,
LastLoginDate = DateTime.Now,
LastLoginIp = "192.168.1.1",
Password = "12345",
ProfileImageUrl = "profile image",
UserName = "test_user"
});
Assert.AreEqual(1,_uow.SaveChanges());
}
I debugged it and checked it, user is adding dbcontext, but when
savechanges method firing, I get error
"invalid column name 'LanguageId'"
I cant find any solution. In DB there is column that named 'LanguageId'.
it does not seem to be something missing. Any advice?
BaseEntity
public abstract class BaseEntity
{
public int Id { get; set; }
}
User
public class User : BaseEntity
{
public User()
{
Roles = new HashSet<Role>();
}
public string UserName { get; set; }
public string DisplayName { get; set; }
public string Password { get; set; }
public string Email { get; set; }
public string ProfileImageUrl { get; set; }
public DateTime? LastLoginDate { get; set; }
public string LastLoginIp { get; set; }
public int? LanguageId { get; set; }
public virtual ICollection<Role> Roles { get; set; }
}
user mapping
public class UserMap : EntityTypeConfiguration<User>
{
public UserMap()
{
ToTable("User");
HasKey(x => x.Id);
Property(x => x.DisplayName).HasMaxLength(100);
Property(x => x.Email).HasMaxLength(250);
Property(x => x.LastLoginIp).HasMaxLength(20);
Property(x => x.Password).HasMaxLength(50);
Property(x => x.ProfileImageUrl).HasMaxLength(500);
Property(x => x.UserName).HasMaxLength(50);
HasMany(h => h.Roles).
WithMany(e => e.Users).
Map(
m =>
{
m.MapLeftKey("UserId");
m.MapRightKey("RoleId");
m.ToTable("User_Role");
}
);
}
}
test metod
private MvcProjectContext _context;
private IUnitOfWork _uow;
private IUserService _userService;
[TestInitialize]
public void TestInitialize()
{
_context = new MvcProjectContext();
_uow = new UnitOfWork(_context);
_userService = new UserService(_uow);
}
[TestMethod]
public void TestMethodAddUser()
{
_userService.Insert(new User
{
DisplayName = "test display name",
Email = "test_email@mail.com",
LanguageId = 1,
LastLoginDate = DateTime.Now,
LastLoginIp = "192.168.1.1",
Password = "12345",
ProfileImageUrl = "profile image",
UserName = "test_user"
});
Assert.AreEqual(1,_uow.SaveChanges());
}
I debugged it and checked it, user is adding dbcontext, but when
savechanges method firing, I get error
"invalid column name 'LanguageId'"
I cant find any solution. In DB there is column that named 'LanguageId'.
it does not seem to be something missing. Any advice?
Tuesday, 1 October 2013
cubic lighting integral.
cubic lighting integral.
I am trying to integrate:
(xa-ia+yb-jb+zc-kc)/((x-I)^2+(y-j)^2+(z-k)^2)^(3/2)dxdydz from generic x y
and z initiqls to finals. I have completed part of it, but I am stick on
the part dx/(x^2-2xi+i^2+f)^(3/2) The initial formula is not complete,
right now I am primarily honeing my integration, so please show me your
work as best you can.
A b and c are componentes of a surface normal and i j and k are the
position of the pixel. X y and z are points inside the rectangular prism
light.
I am trying to integrate:
(xa-ia+yb-jb+zc-kc)/((x-I)^2+(y-j)^2+(z-k)^2)^(3/2)dxdydz from generic x y
and z initiqls to finals. I have completed part of it, but I am stick on
the part dx/(x^2-2xi+i^2+f)^(3/2) The initial formula is not complete,
right now I am primarily honeing my integration, so please show me your
work as best you can.
A b and c are componentes of a surface normal and i j and k are the
position of the pixel. X y and z are points inside the rectangular prism
light.
Is there a way to make ' ' mean \s* in Perl regular expressions?
Is there a way to make ' ' mean \s* in Perl regular expressions?
This would greatly improve the readability of many regular expressions I
write, and when I write a single literal space in my regexes I almost
always mean \s*, so is there a "mode" that enables this, like /s to make .
match newlines, etc.? A cursory read through perlre didn't give anything,
but maybe I missed something or maybe there's a different way to achieve
this?
This would greatly improve the readability of many regular expressions I
write, and when I write a single literal space in my regexes I almost
always mean \s*, so is there a "mode" that enables this, like /s to make .
match newlines, etc.? A cursory read through perlre didn't give anything,
but maybe I missed something or maybe there's a different way to achieve
this?
Find the result of a weird looking sum
Find the result of a weird looking sum
How do I find the value of such ridiculous-looking sum?
$$\sum^{100}_{i=1}\lfloor \sqrt{i}\rfloor$$
How do I find the value of such ridiculous-looking sum?
$$\sum^{100}_{i=1}\lfloor \sqrt{i}\rfloor$$
Is it possible to make transparent / translucent pastry=?iso-8859-1?Q?=3F_=96_cooking.stackexchange.com?=
Is it possible to make transparent / translucent pastry? –
cooking.stackexchange.com
I'm looking for something that works like pastry (malleable before baking,
rigid after baking, mild unobtrusive flavour) that is transparent or
translucent. The idea is to use for topping savoury …
cooking.stackexchange.com
I'm looking for something that works like pastry (malleable before baking,
rigid after baking, mild unobtrusive flavour) that is transparent or
translucent. The idea is to use for topping savoury …