警告:签名者证书已过期.
当我尝试使用jarsigner进行签名时,我得到以下内容,并且输出jar不会生成.
如何续订我的jar签名?
java se 6项目是否支持eclipselink jpa2的标准api?如果没有,那就是我的问题.我是否需要在persistence.xml中为条件api指定任何特殊内容?
这是我的标准查询:
final EntityType<Meaning> Meaning_ = em.getMetamodel().entity(Meaning.class);
final CriteriaBuilder cb = em.getCriteriaBuilder();
CriteriaQuery<Integer> cq = cb.createQuery(Integer.class);
final Root<Meaning> meng = cq.from(Meaning.class);
cq.where(meng.get(Meaning_.lastPublishedDate)); //this attributes are not recognized/found
cq.select(meng.get(Meaning_.objId)); // " "
TypedQuery<Integer> q = em.createQuery(cq);
return q.getResultList();
Run Code Online (Sandbox Code Playgroud)
这是我的意义实体:
@Entity
public class Meaning implements Serializable{
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private int objId;
public int getObjId() {
return objId;
}
@Temporal(javax.persistence.TemporalType.DATE)
private Date lastPublishedDate = null;//never
public Date getLastPublishedDate(){
return lastPublishedDate;
} …Run Code Online (Sandbox Code Playgroud) 考虑一个testCycle与模块家长DummyCore和TestFramework.
TestFramework取决于DummyCore,并DummyCore具有测试dedepency TestFramework.
独立构建和测试每个模块maven没有问题.但mvn test父母的testCycle结果是:
The projects in the reactor contain a cyclic reference: Edge between 'Vertex{label='com.mysimpatico:TestFramework:1.0-SNAPSHOT'}' and 'Vertex{label='org.apache:DummyCore:1.0-SNAPSHOT'}' introduces to cycle in the graph org.apache:DummyCore:1.0-SNAPSHOT --> com.mysimpatico:TestFramework:1.0-SNAPSHOT --> org.apache:DummyCore:1.0-SNAPSHOT -> [Help 1]
To see the full stack trace of the errors, re-run Maven with the -e switch.
Re-run Maven using the -X switch to enable full debug logging.
For more information about the …Run Code Online (Sandbox Code Playgroud) inheritance circular-dependency dependency-management pom.xml maven
我正在尝试使用类路径中的本地jar运行mvn exec:exec(或mvn exec:java)运行我的程序.但是jar无法加载:
Exception in thread "main" java.lang.Error: Unable to load voice directory. java.lang.ClassNotFoundException: com.sun.speech.freetts.en.us.cmu_us_slt_arctic.ArcticVoiceDirectory
at com.sun.speech.freetts.VoiceManager.getVoiceDirectories(VoiceManager.java:211)
at com.sun.speech.freetts.VoiceManager.getVoices(VoiceManager.java:111)
at com.sun.speech.freetts.VoiceManager.getVoice(VoiceManager.java:521)
at xpress.audio.TTS.<init>(TTS.java:66)
at xpress.audio.TTS.<init>(TTS.java:62)
at xpress.audio.AudioProducer.main(AudioProducer.java:18)
Run Code Online (Sandbox Code Playgroud)
使用以下java工作直接从CLI运行程序:
C:\XpressAudio\target\classes>java -cp "C:\XpressAudio\target\XpressAudio-1.0-SN
APSHOT-jar-with-dependencies.jar;C:\XpressAudio\cmu_us_slt_arctic.jar;C:\XpressA
udio\en_us.jar;C:\XpressAudio\*" xpress.audio.AudioProducer
Run Code Online (Sandbox Code Playgroud)
这<build>是我的一部分pom.xml:
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version>
<executions>
<execution>
<goals>
<goal>exec</goal>
</goals>
</execution>
</executions>
<configuration>
<executable>java</executable>
<mainClass>xpress.audio.AudioProducer</mainClass>
</configuration>
<dependencies>
<dependency>
<groupId>cmu_us</groupId>
<artifactId>slt_arctic</artifactId>
<version>1.0</version>
<scope>system</scope>
<systemPath>${basedir}/cmu_us_slt_arctic.jar</systemPath>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
Run Code Online (Sandbox Code Playgroud)
有人能告诉我,我应该怎么修改pom.xml,这样mvn exec:exec的工作方式类似于 …
我的理解是,请求文件系统路径(例如/aFile)的用户应用程序将调用文件系统并取回所请求文件的虚拟地址。然后应用程序将尝试使用该地址作为参数进行读/写操作,作为 CPU 指令?在执行读命令时,内存管理单元会将该地址转换为物理地址,并查看页表。如果用户无权访问该内存位置(该信息携带在哪里?),操作将中止。否则,如果在内存中找到物理地址页,则对其进行读/写操作,否则从磁盘带入该页并重复该操作。
所以,似乎根本没有系统调用。有人可以纠正上述程序细节中可能存在的错误吗?
Stonebraker的论文(数据库管理操作系统支持)解释说,"从缓冲池管理器获取块的开销通常包括系统调用和核心到核心的移动." 忘记缓冲区替换策略等.我唯一提出的问题是引用.
我的理解是,当DBMS想要读取块x时,它会发出一条公共读取指令.应该与请求阅读的任何其他应用程序没有区别.
我不是在寻找通用答案(我得到了它们,并阅读了论文).我寻求所述问题的详细答案.请参阅从Java应用程序读取的文件是否调用系统调用?
无论以下persistence.xml配置如何,数据库都会保留在磁盘上.
<persistence-unit name="com.mysimpatico_inmemory_persistence_nbm_1.0-SNAPSHOTPU" transaction-type="RESOURCE_LOCAL">
<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
<class>com.mysimpatico.memoplatform.persistence.entities.Expression</class>
<properties>
<property name="javax.persistence.jdbc.url" value="jdbc:derby:memory:tempDb;create=true"/>
<property name="javax.persistence.jdbc.password" value=""/>
<property name="javax.persistence.jdbc.driver" value="org.apache.derby.jdbc.EmbeddedDriver"/>
<property name="javax.persistence.jdbc.user" value=""/>
</properties>
Run Code Online (Sandbox Code Playgroud)
编写测试我希望测试的方法返回某些输出.通常我正在检查对于给定的数据库操作,我得到一定的输出.我的做法通常是在测试本身中将数组编写为快速映射/属性文件.此解决方案很快,并且不容易受到外部文件的运行时更改以从中加载预期结果.
一个解决方案是将数据放在一个java源文件中,这样我就可以减少测试并且仍然可以进行编译时检查.这个怎么样?
或者将预期结果作为资源加载更好的方法?.properties文件不够好,因为每个键只能有一个值.commons-config是否可行?
我宁愿一个简单的解决方案,我的名字每个键的属性,所以对于每个条目我可能有一个doc-length和numFound属性值(听起来像一个XML节点的元素)?
你是怎么做到这一点的?
我正在尝试将svn repo转换为mercurial但我失败了.
$ hg convert http://memorizeasy.googlecode.com/svn hg-client
hg: unknown command 'convert'
Mercurial Distributed SCM
$ hg --version
Mercurial Distributed SCM (version 1.7.3)
(see http://mercurial.selenic.com for more information)
Run Code Online (Sandbox Code Playgroud) 在这里,我选择节点:
$ xmlstarlet sel -t -c "/configuration/property[name='http.agent.name']"/value conf/nutch-default.xml
<value/>
Run Code Online (Sandbox Code Playgroud)
这不会对其进行编辑:
$ xmlstarlet edit "/configuration/property[name='http.agent.name']"/value -v 'test' conf/nutch-default.xml
I/O warning : failed to load external entity "/configuration/property[name='http.agent.name']/value"
Run Code Online (Sandbox Code Playgroud)
会更改更改的xmlstartlet命令是什么?xmlstartlet还不支持AFAIK -x。
$ xmlstarlet ed --help
XMLStarlet Toolkit: Edit XML document(s)
Usage: xml ed <global-options> {<action>} [ <xml-file-or-uri> ... ]
where
<global-options> - global options for editing
<xml-file-or-uri> - input XML document file name/uri (stdin otherwise)
<global-options> are:
-P (or --pf) - preserve original formatting
-S (or --ps) - preserve …Run Code Online (Sandbox Code Playgroud) java ×3
eclipselink ×2
filesystems ×2
jpa-2.0 ×2
maven ×2
xml ×2
bash ×1
classpath ×1
criteria-api ×1
database ×1
derby ×1
exec ×1
file ×1
file-io ×1
inheritance ×1
jar-signing ×1
jarsigner ×1
mercurial ×1
pom.xml ×1
properties ×1
svn ×1
testing ×1