我从Web下载了这个工作区,我尝试在全新安装的Eclipse Ganymede的tomcat服务器上运行它.这个特殊项目带有自己的工作空间.
当我选择Tomcat v6.0时,我收到一条消息
无法使用所选类型创建服务器
但是,可以使用较旧的tomcat版本.
我想我必须重新创建一些配置设置.问题是哪一个?这似乎是一个奇怪的错误,因为创建一个新的动态Web项目让我为它们配置tomcat
我在应用程序中有两个主要类.当我将它打包到一个可运行的jar(使用Eclipse导出函数)时,我必须选择一个默认的主类.
有没有办法在运行时从jar访问非默认主类?
有什么建议我如何记录我的Perl代码?您使用了什么以及可以使用哪些工具来帮助我?
您使用哪个模块将pod转换为html?
如何使用XSLT添加样式表引用?
我试图用第一个转换删除一些大的输入XML,并且需要在客户端上应用第二个转换.因此,第一个转换必须输出正确的引用,例如:
<?xml-stylesheet type="text/xsl" href="client.xsl"?>
Run Code Online (Sandbox Code Playgroud)
回顾一下它的XML-> transform1(服务器) - > XML-> transform2(客户端) - > HTML
到目前为止,我能使它工作的唯一方法是使用xsl:text disable-output-escaping和CDATA:
<xsl:text disable-output-escaping="yes"><![CDATA[<?xml-stylesheet type="text/xsl" href="/efo/efo_class.xsl"?>]]>
当然必须有一个更好的方法.
不适用于其他模块,但举一个例子.我使用CPAN设置安装了Text :: CSV_XS:
'makepl_arg' => q[PREFIX=~/lib],
Run Code Online (Sandbox Code Playgroud)
当我尝试运行test.pl脚本时:
$ perl test.pl
#!/usr/bin/perl
use lib "/homes/foobar/lib/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi";
use Text::CSV_XS;
print "test";
Run Code Online (Sandbox Code Playgroud)
我明白了
Can't load '/homes/foobar/lib/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/auto/Text/CSV_XS/CSV_XS.so' for module Text::CSV_XS: /homes/foobar/lib/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/auto/Text/CSV_XS/CSV_XS.so: cannot open shared object file: No such file or directory at /www/common/perl/lib/5.8.2/i686-linux/DynaLoader.pm line 229. at test.pl line 6 Compilation failed in require at test.pl line 6. BEGIN failed--compilation aborted at test.pl line 6.
我将错误追溯到DynaLoader.pm它发生在这一行:
# Many dynamic extension loading problems will appear to come from
# this section of code: XYZ failed at line …Run Code Online (Sandbox Code Playgroud) build.xml包含<scp>和<sshexec>任务,所以我在build.xml中提供了jsch.jar和其他库在同一目录中.
以下taskdef:
<taskdef name="scp"
classname="org.apache.tools.ant.taskdefs.optional.ssh.Scp"
classpath="WebContent/WEB-INF/lib/jsch-0.1.43.jar" />
Run Code Online (Sandbox Code Playgroud)
抛出错误
A class needed by class org.apache.tools.ant.taskdefs.optional.ssh.Scp
cannot be found: com/jcraft/jsch/UserInfo
Run Code Online (Sandbox Code Playgroud)
我无法修改标准的Ant安装(例如将jsch.jar放在ant lib目录中,或删除ant-jsch.jar),或添加命令行标志,或修改系统环境变量等:脚本必须默认运行Ant在不同的系统上.
我实际上是在重新提出这里最初提出的问题:http: //ant.1045680.n5.nabble.com/specifying-location-of-an-external-library-within-build-xml-td1344969.html
但是无法得到关于classloader工作的答案.
我正在使用具有磁盘存储持久性的缓存.在应用程序的后续重新运行中,我收到以下错误:
net.sf.ehcache.store.DiskStore deleteIndexIfCorrupt
WARNING: The index for data file MyCache.data is out of date,
probably due to an unclean shutdown. Deleting index file MYCache.index
Run Code Online (Sandbox Code Playgroud)
有没有办法解决这个问题,除了明确调用net.sf.ehcache.CacheManager.shutdown()应用程序中的某个地方?
缓存配置:
<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="ehcache.xsd"
updateCheck="true" monitoring="autodetect">
<diskStore path="C:\work"/>
<cacheManagerEventListenerFactory class="" properties=""/>
<cacheManagerPeerProviderFactory
class="net.sf.ehcache.distribution.RMICacheManagerPeerProviderFactory"
properties="peerDiscovery=automatic,
multicastGroupAddress=230.0.0.1,
multicastGroupPort=4446, timeToLive=1"
propertySeparator=","
/>
<cacheManagerPeerListenerFactory
class="net.sf.ehcache.distribution.RMICacheManagerPeerListenerFactory"/>
<defaultCache
maxElementsInMemory="1"
eternal="false"
timeToIdleSeconds="0"
timeToLiveSeconds="86400"
overflowToDisk="true"
diskSpoolBufferSizeMB="1"
maxElementsOnDisk="10000"
diskPersistent="true"
diskExpiryThreadIntervalSeconds="120"
memoryStoreEvictionPolicy="LFU"
/>
</ehcache>
Run Code Online (Sandbox Code Playgroud)
用于复制问题的代码:
import java.util.ArrayList;
import java.util.List;
import net.sf.ehcache.Cache;
import net.sf.ehcache.CacheManager;
import net.sf.ehcache.Element;
public class CacheTest {
static CacheManager manager = …Run Code Online (Sandbox Code Playgroud) 给定
@Entity
public class Document {
@Id
@Column(name = "DOCUMENT_ID")
private Long id;
@ElementCollection
@CollectionTable(
name="TAG",
joinColumns=@JoinColumn(name="DOCUMENT_ID")
)
@Column(name="TAG")
private Set<String> tags;
}
Run Code Online (Sandbox Code Playgroud)
查找带有特定标签集合的所有文档。本质上,EclipseLink 相当于:
SELECT d FROM Document d WHERE :tag1 MEMBER OF d.tags
INTERSECT
SELECT d FROM Document d WHERE :tag2 MEMBER OF d.tags
...
SELECT d FROM Document d WHERE :tagn MEMBER OF d.tags
Run Code Online (Sandbox Code Playgroud)
但使用 JPA CritieraQuery。