我有一个applet,它在浏览器中运行,并从Javascript调用.有两个类:PortalLauncher和ParamSplitter,它们都在默认包中.JavaScript调用的方法PortalLauncher这反过来又调用一个函数ParamSplitter.小程序在一个签名的jar中.
这大部分时间都有效.但是,一些用户不时会遇到问题.在当天的某个时间(即不在第一次访问时),抛出以下异常:
java.lang.SecurityException: class "ParamSplitter"'s signer information does not
match signer information of other classes in the same package
at java.lang.ClassLoader.checkCerts(Unknown Source)
at java.lang.ClassLoader.preDefineClass(Unknown Source)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$000(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at sun.applet.AppletClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at PortalLauncher.openFile(PortalLauncher.java:313)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) …
Run Code Online (Sandbox Code Playgroud) 我试图获取所有Product
在CheckedOutToGuid
为空或为当前用户的GUID.我试过使用以下QueryOver:
public IEnumerable<IProduct> GetProducts(IUser user, Expression<Func<IProduct, bool>> predicate)
{
return Context.GetSession().QueryOver<Product>()
.Where(x => (x.CheckedOutByGuid == null) || Guid.Equals(user.UserGuid, x.CheckedOutByGuid)
.OrderBy(x => x.Version).Desc
.OrderBy(x => x.DisplayName).Asc.List();
}
Run Code Online (Sandbox Code Playgroud)
但是我收到一个错误:
Atf.NUnit.Model.TestDatabase.TestModule1():
System.Exception : Unrecognised method call: System.Object:Boolean Equals(System.Object, System.Object)
Run Code Online (Sandbox Code Playgroud)
这个错误的原因是什么?我尝试删除,(x.CheckedOutByGuid == null)
以便不需要OR但仍然得到相同的错误.
UPDATE
正如建议的那样@Andrew Whitaker
,我换了一行
.Where(x => (x.CheckedOutByGuid == null) || (user.UserGuid == x.CheckedOutByGuid))
Run Code Online (Sandbox Code Playgroud)
这现在导致以下异常:
Atf.NUnit.Model.TestDatabase.TestModule1():
NHibernate.QueryException : could not resolve property: user of: Atf.Model.Internal.Product
bei NHibernate.Persister.Entity.AbstractPropertyMapping.ToType(String propertyName) in p:\nhibernate-core\src\NHibernate\Persister\Entity\AbstractPropertyMapping.cs:Zeile 37.
bei NHibernate.Persister.Entity.AbstractEntityPersister.GetSubclassPropertyTableNumber(String propertyPath) in …
Run Code Online (Sandbox Code Playgroud) 我被要求创建一种家庭网站,亲戚可以发布各种家庭成员(主要是祖先)的论文和照片.
面对大量的个人信息,如出生日期,出生地,结婚日期等,我想知道应该在网上提供多少这样的信息.我将在网站上设置密码保护,因此它不会对所有人完全开放.
你对此有何看法?
我可能完全错误地解决了这个问题,但是这里......
我们希望使用 Gitlab 和 Nexus 实现development
-> releases/x.y.z
->master
工作流程。这些工件应分别标记为x.y.z-SNAPSHOT
、x.y.z-rc
和x.y.z
。
在 中ci-build.yml
,我尝试根据当前分支修改 POM,以便创建正确标记的工件。问题显然是,更改将比当前构建提交提前一次提交,并且构建中使用的 POM 具有原始版本。
例如
ci-build
,修改为 2.3.4-rc 并提交并推送到 git我的问题如下:
我可以修改 POM 并在后续所有阶段使用更新后的 POM 吗ci-build
?
(我不认为这是正确的程序,但这是我的团队领导所要求的,所以我正在尝试实施它......)
将连接字符串与密码放在app.config文件中真的很好吗?
在我看来,app.config没有以任何方式加密,并且可以轻松读取密码信息.
我有一个应用程序访问数据库,目标最终用户没有身份验证.使用组用户/密码.仅当当前Windows用户位于Active Directory组中时,才会启动该应用程序.因此,一旦进入应用程序,用户就可以使用组用户连接到数据库.
处理此类连接字符串的正确方法是什么?在源代码中隐藏它们?
注意这是一个独立的应用程序 - 而不是ASP,IIS等
这对我有用
(感谢Jon Galloway - http://weblogs.asp.net/jgalloway/archive/2008/04/13/encrypting-passwords-in-a-net-app-config-file.aspx)
private void EncryptConfigSection()
{
Configuration config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
ConfigurationSection section = config.AppSettings;
if (section != null)
{
if (!section.SectionInformation.IsProtected)
{
if (!section.ElementInformation.IsLocked)
{
section.SectionInformation.ProtectSection("DataProtectionConfigurationProvider");
section.SectionInformation.ForceSave = true;
config.Save(ConfigurationSaveMode.Full);
}
}
}
}
Run Code Online (Sandbox Code Playgroud)
这通过在应用程序第一次运行时加密exe配置文件来实现.我没有找到一种方法在安装过程中执行此操作,因此配置文件完全可读,直到第一次启动应用程序.也许有人有个主意......
我有一个表,其中有一列被定义为自动生成键。执行以下代码时,我希望生成一个新密钥,但事实并非如此。插入了一行,但 ResultSet 为ps.getGeneratedKeys()
空。
我正在使用 DB2:SQLLIB_ADCL_V97FP1。
conn = getConnection();
conn.setAutoCommit(false);
String query =
"INSERT INTO MyTable " +
" (messe_nr, land5, variable_nr, bezeichnung_en, bezeichnung_de) " +
"VALUES (?,?,?,?,?)";
PreparedStatement ps = conn.prepareStatement(query, Statement.RETURN_GENERATED_KEYS);
ps.setInt(1, fair.getFairId());
ps.setString(2, variable.getCountryCode());
ps.setInt(3, variable.getSort());
ps.setString(4, variable.getLabel_en());
ps.setString(5, variable.getLabel_de());
log.debug(query);
int count = ps.executeUpdate();
if(count == 1) {
ResultSet rs = ps.getGeneratedKeys();
if(rs.next()) {
variable.setId(rs.getBigDecimal(1).intValue());
} else {
log.error("Could not get autogen key after variable insert");
throw new AVMSException(1500);
}
rs.close();
}
log.debug("inserted " + …
Run Code Online (Sandbox Code Playgroud) 我们的生产Sharepoint服务器为大约800个用户提供服务,并在物理双核机器上与其SQL Server一起运行.
网络人员现在尽可能多地放在VMWare上.Sharepoint服务器和SQL Server将放在不同的服务器上.
有没有人有在VM上运行生产级别Sharepoint服务器的经验?
在为Websphere平台开发Web应用程序多年之后,我最近一直在研究OSGi,特别是与RAP(RichAjayPlatform)项目有关.
过去,我已经能够使用JNDI查找访问EAR中定义的连接池.
如何在OSGi环境中创建连接池并访问它们?我创建了一个包含jdbc驱动程序的DB2包,但我不确定如何创建池.以前,这是EAR中的一个配置,Websphere处理它.
那里有任何示例,教程吗?
我的 View XAML 中有以下内容
<GroupBox Grid.Row="0" Header="Aktionen bei Prüfung Aufbau">
<ContentControl Content="{Binding BuildUpActions}" ContentTemplate="{StaticResource FullActionListTemplate}" x:Name="BuildUp"/>
</GroupBox>
<GroupBox Grid.Row="1" Header="Aktionen bei Prüfung Abbau">
<ContentControl Content="{Binding TearDownActions}" ContentTemplate="{StaticResource FullActionListTemplate}" x:Name="TearDown"/>
</GroupBox>
Run Code Online (Sandbox Code Playgroud)
DataTemplate 在单独的资源中定义
<DataTemplate x:Key="FullActionListTemplate">
<DockPanel LastChildFill="True">
<StackPanel DockPanel.Dock="Bottom" Orientation="Horizontal" HorizontalAlignment="Right">
<Button Content="Neuer Ausgang" Style="{StaticResource ButtonRowStyle}"
Command="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type TabControl}}, Path=DataContext.NewFullIOCommand}"
CommandParameter="{Binding **?HOW?**}"
/>
<more buttons here...>
</StackPanel>
<ContentControl Content="{Binding}" >
</ContentControl>
</DockPanel>
</DataTemplate>
Run Code Online (Sandbox Code Playgroud)
命令在 ViewModel 中定义
public ICommand NewFullIOCommand
{
get
{
if (this._newFullIOCommand == null)
{
this._newFullIOCommand = …
Run Code Online (Sandbox Code Playgroud) .net ×1
app-config ×1
applet ×1
binding ×1
datatemplate ×1
db2 ×1
genealogy ×1
gitlab ×1
gitlab-ci ×1
java ×1
jdbc ×1
maven ×1
nhibernate ×1
osgi ×1
privacy ×1
queryover ×1
sharepoint ×1
social ×1
sql ×1
sql-server ×1
vmware ×1
web ×1
wpf ×1